mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
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:
4
proto/engine/v1/electra.pb.go
generated
4
proto/engine/v1/electra.pb.go
generated
@@ -234,7 +234,7 @@ type ExecutionRequests struct {
|
||||
|
||||
Deposits []*DepositRequest `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty" ssz-max:"8192"`
|
||||
Withdrawals []*WithdrawalRequest `protobuf:"bytes,2,rep,name=withdrawals,proto3" json:"withdrawals,omitempty" ssz-max:"16"`
|
||||
Consolidations []*ConsolidationRequest `protobuf:"bytes,3,rep,name=consolidations,proto3" json:"consolidations,omitempty" ssz-max:"1"`
|
||||
Consolidations []*ConsolidationRequest `protobuf:"bytes,3,rep,name=consolidations,proto3" json:"consolidations,omitempty" ssz-max:"2"`
|
||||
}
|
||||
|
||||
func (x *ExecutionRequests) Reset() {
|
||||
@@ -426,7 +426,7 @@ var file_proto_engine_v1_electra_proto_rawDesc = []byte{
|
||||
0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43,
|
||||
0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x31, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x73, 0x74, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73,
|
||||
0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9e, 0x02, 0x0a, 0x16, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x6c,
|
||||
0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x43, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -35,7 +35,7 @@ mainnet = {
|
||||
"pending_deposits_limit": "134217728",
|
||||
"pending_partial_withdrawals_limit": "134217728",
|
||||
"pending_consolidations_limit": "262144",
|
||||
"max_consolidation_requests_per_payload.size": "1",
|
||||
"max_consolidation_requests_per_payload.size": "2",
|
||||
"field_elements_per_cell.size": "64",
|
||||
"field_elements_per_ext_blob.size": "8192",
|
||||
"bytes_per_cell.size": "2048", # FIELD_ELEMENTS_PER_CELL * BYTES_PER_FIELD_ELEMENT
|
||||
@@ -61,8 +61,8 @@ minimal = {
|
||||
"logs_bloom.size": "256",
|
||||
"extra_data.size": "32",
|
||||
"max_blobs_per_block.size": "6",
|
||||
"max_blob_commitments.size": "16",
|
||||
"kzg_commitment_inclusion_proof_depth.size": "9",
|
||||
"max_blob_commitments.size": "32",
|
||||
"kzg_commitment_inclusion_proof_depth.size": "10",
|
||||
"max_withdrawal_requests_per_payload.size":"2",
|
||||
"max_deposit_requests_per_payload.size": "4",
|
||||
"max_attesting_indices.size": "8192",
|
||||
@@ -72,7 +72,7 @@ minimal = {
|
||||
"pending_deposits_limit": "134217728",
|
||||
"pending_partial_withdrawals_limit": "64",
|
||||
"pending_consolidations_limit": "64",
|
||||
"max_consolidation_requests_per_payload.size": "1",
|
||||
"max_consolidation_requests_per_payload.size": "2",
|
||||
"field_elements_per_cell.size": "64",
|
||||
"field_elements_per_ext_blob.size": "8192",
|
||||
"bytes_per_cell.size": "2048", # FIELD_ELEMENTS_PER_CELL * BYTES_PER_FIELD_ELEMENT
|
||||
|
||||
Reference in New Issue
Block a user