Implement consensus spec v1.5.0-alpha.10 (#14733)

* Use 16 bit random value

* enforce 0x02 credentials for consolidations

* Limit consolidating balance by validator effective balance

* Update max blob commitment size

* Fix next sync committee indices

* Bytes to little endian

* Handle proposer computations in between forks

* Fix config and tests

Fix tests

Fix tests

* Fix test stream events by properly set effective balance

Fix test stream events by properly set effective balance

* Preallocate buffers to avoid repeated allocations

* Potuz's feedback

* Use 16 bit random value

* enforce 0x02 credentials for consolidations

* Limit consolidating balance by validator effective balance

* Update max blob commitment size

* Fix next sync committee indices

* Bytes to little endian

* Handle proposer computations in between forks

* Fix config and tests

Fix tests

Fix tests

* Fix test stream events by properly set effective balance

Fix test stream events by properly set effective balance

* Preallocate buffers to avoid repeated allocations

* Potuz's feedback

* Fix change log
This commit is contained in:
terence
2024-12-23 09:32:41 -08:00
committed by GitHub
parent dbd53bd70d
commit 6ce6b869e5
20 changed files with 217 additions and 176 deletions

View File

@@ -1,5 +1,5 @@
// Code generated by fastssz. DO NOT EDIT.
// Hash: 8a6de344d09e1816df88ecbd15d95382cdc9872ebae99c397396da1ed2c83688
// Hash: dfb7f78543ce7294636fd17455b09e2220fe944af918e21f7d89189d590738d7
package enginev1
import (
@@ -365,8 +365,8 @@ func (e *ExecutionRequests) MarshalSSZTo(buf []byte) (dst []byte, err error) {
}
// Field (2) 'Consolidations'
if size := len(e.Consolidations); size > 1 {
err = ssz.ErrListTooBigFn("--.Consolidations", size, 1)
if size := len(e.Consolidations); size > 2 {
err = ssz.ErrListTooBigFn("--.Consolidations", size, 2)
return
}
for ii := 0; ii < len(e.Consolidations); ii++ {
@@ -447,7 +447,7 @@ func (e *ExecutionRequests) UnmarshalSSZ(buf []byte) error {
// Field (2) 'Consolidations'
{
buf = tail[o2:]
num, err := ssz.DivideInt2(len(buf), 116, 1)
num, err := ssz.DivideInt2(len(buf), 116, 2)
if err != nil {
return err
}
@@ -525,7 +525,7 @@ func (e *ExecutionRequests) HashTreeRootWith(hh *ssz.Hasher) (err error) {
{
subIndx := hh.Index()
num := uint64(len(e.Consolidations))
if num > 1 {
if num > 2 {
err = ssz.ErrIncorrectListSize
return
}
@@ -534,7 +534,7 @@ func (e *ExecutionRequests) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
hh.MerkleizeWithMixin(subIndx, num, 1)
hh.MerkleizeWithMixin(subIndx, num, 2)
}
hh.Merkleize(indx)