diff --git a/beacon-chain/blockchain/execution_engine_test.go b/beacon-chain/blockchain/execution_engine_test.go index 46872771c6..8b3912ba7a 100644 --- a/beacon-chain/blockchain/execution_engine_test.go +++ b/beacon-chain/blockchain/execution_engine_test.go @@ -151,8 +151,10 @@ func Test_NotifyForkchoiceUpdate(t *testing.T) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), + Transactions: make([][]byte, 0), }, }, }}) @@ -494,8 +496,10 @@ func Test_NotifyNewPayload(t *testing.T) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), + Transactions: make([][]byte, 0), }, }, }, @@ -597,8 +601,10 @@ func Test_NotifyNewPayload(t *testing.T) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), + Transactions: make([][]byte, 0), }, }, }, diff --git a/beacon-chain/blockchain/process_block_test.go b/beacon-chain/blockchain/process_block_test.go index ad3860ed91..f4bc1a29a8 100644 --- a/beacon-chain/blockchain/process_block_test.go +++ b/beacon-chain/blockchain/process_block_test.go @@ -923,8 +923,10 @@ func Test_validateMergeTransitionBlock(t *testing.T) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), + Transactions: make([][]byte, 0), }, }, { @@ -968,6 +970,7 @@ func Test_validateMergeTransitionBlock(t *testing.T) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), TransactionsRoot: make([]byte, fieldparams.RootLength), diff --git a/beacon-chain/core/blocks/genesis.go b/beacon-chain/core/blocks/genesis.go index 24ec15155f..0091183d4d 100644 --- a/beacon-chain/core/blocks/genesis.go +++ b/beacon-chain/core/blocks/genesis.go @@ -105,6 +105,7 @@ func NewGenesisBlockForState(ctx context.Context, st state.BeaconState) (interfa ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), Transactions: make([][]byte, 0), @@ -136,6 +137,7 @@ func NewGenesisBlockForState(ctx context.Context, st state.BeaconState) (interfa ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), Transactions: make([][]byte, 0), @@ -168,6 +170,7 @@ func NewGenesisBlockForState(ctx context.Context, st state.BeaconState) (interfa ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), Transactions: make([][]byte, 0), diff --git a/beacon-chain/core/blocks/payload_test.go b/beacon-chain/core/blocks/payload_test.go index a8b0e63264..eab6487e7f 100644 --- a/beacon-chain/core/blocks/payload_test.go +++ b/beacon-chain/core/blocks/payload_test.go @@ -853,10 +853,10 @@ func emptyPayloadHeader() (interfaces.ExecutionData, error) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), TransactionsRoot: make([]byte, fieldparams.RootLength), - ExtraData: make([]byte, 0), }) } @@ -868,11 +868,11 @@ func emptyPayloadHeaderCapella() (interfaces.ExecutionData, error) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), TransactionsRoot: make([]byte, fieldparams.RootLength), WithdrawalsRoot: make([]byte, fieldparams.RootLength), - ExtraData: make([]byte, 0), }, 0) } @@ -884,10 +884,10 @@ func emptyPayload() *enginev1.ExecutionPayload { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), } } @@ -899,10 +899,10 @@ func emptyPayloadCapella() *enginev1.ExecutionPayloadCapella { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), Withdrawals: make([]*enginev1.Withdrawal, 0), - ExtraData: make([]byte, 0), } } diff --git a/beacon-chain/core/capella/upgrade_test.go b/beacon-chain/core/capella/upgrade_test.go index c801268062..45f09434ec 100644 --- a/beacon-chain/core/capella/upgrade_test.go +++ b/beacon-chain/core/capella/upgrade_test.go @@ -84,6 +84,7 @@ func TestUpgradeToCapella(t *testing.T) { GasLimit: prevHeader.GasLimit(), GasUsed: prevHeader.GasUsed(), Timestamp: prevHeader.Timestamp(), + ExtraData: prevHeader.ExtraData(), BaseFeePerGas: prevHeader.BaseFeePerGas(), BlockHash: prevHeader.BlockHash(), TransactionsRoot: txRoot, diff --git a/beacon-chain/core/deneb/upgrade.go b/beacon-chain/core/deneb/upgrade.go index 269bda7bc8..ea7b06b58e 100644 --- a/beacon-chain/core/deneb/upgrade.go +++ b/beacon-chain/core/deneb/upgrade.go @@ -101,10 +101,10 @@ func UpgradeToDeneb(state state.BeaconState) (state.BeaconState, error) { ExtraData: payloadHeader.ExtraData(), BaseFeePerGas: payloadHeader.BaseFeePerGas(), BlockHash: payloadHeader.BlockHash(), - ExcessBlobGas: 0, - BlobGasUsed: 0, TransactionsRoot: txRoot, WithdrawalsRoot: wdRoot, + ExcessBlobGas: 0, + BlobGasUsed: 0, }, NextWithdrawalIndex: wi, NextWithdrawalValidatorIndex: vi, diff --git a/beacon-chain/core/deneb/upgrade_test.go b/beacon-chain/core/deneb/upgrade_test.go index 003b371940..d3518b53fd 100644 --- a/beacon-chain/core/deneb/upgrade_test.go +++ b/beacon-chain/core/deneb/upgrade_test.go @@ -85,6 +85,7 @@ func TestUpgradeToDeneb(t *testing.T) { GasLimit: prevHeader.GasLimit(), GasUsed: prevHeader.GasUsed(), Timestamp: prevHeader.Timestamp(), + ExtraData: prevHeader.ExtraData(), BaseFeePerGas: prevHeader.BaseFeePerGas(), BlockHash: prevHeader.BlockHash(), TransactionsRoot: txRoot, diff --git a/beacon-chain/core/execution/upgrade.go b/beacon-chain/core/execution/upgrade.go index 60505750f3..fea264c0f4 100644 --- a/beacon-chain/core/execution/upgrade.go +++ b/beacon-chain/core/execution/upgrade.go @@ -79,6 +79,7 @@ func UpgradeToBellatrix(state state.BeaconState) (state.BeaconState, error) { GasLimit: 0, GasUsed: 0, Timestamp: 0, + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), diff --git a/beacon-chain/core/execution/upgrade_test.go b/beacon-chain/core/execution/upgrade_test.go index 2f07929ab0..a18df89a9b 100644 --- a/beacon-chain/core/execution/upgrade_test.go +++ b/beacon-chain/core/execution/upgrade_test.go @@ -79,6 +79,7 @@ func TestUpgradeToBellatrix(t *testing.T) { GasLimit: 0, GasUsed: 0, Timestamp: 0, + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), diff --git a/beacon-chain/core/transition/bellatrix_transition_no_verify_sig_test.go b/beacon-chain/core/transition/bellatrix_transition_no_verify_sig_test.go index ecc3529d9c..ec9f3d5428 100644 --- a/beacon-chain/core/transition/bellatrix_transition_no_verify_sig_test.go +++ b/beacon-chain/core/transition/bellatrix_transition_no_verify_sig_test.go @@ -245,10 +245,10 @@ func createFullBellatrixBlockWithOperations(t *testing.T) (state.BeaconState, ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: bytesutil.PadTo([]byte{1, 2, 3, 4}, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), }, }, }, @@ -284,11 +284,11 @@ func createFullCapellaBlockWithOperations(t *testing.T) (state.BeaconState, ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: bytesutil.PadTo([]byte{1, 2, 3, 4}, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), Withdrawals: make([]*enginev1.Withdrawal, 0), - ExtraData: make([]byte, 0), }, }, }, diff --git a/beacon-chain/core/transition/state-bellatrix.go b/beacon-chain/core/transition/state-bellatrix.go index 4f4e346237..9a4f098dc2 100644 --- a/beacon-chain/core/transition/state-bellatrix.go +++ b/beacon-chain/core/transition/state-bellatrix.go @@ -209,6 +209,7 @@ func OptimizedGenesisBeaconStateBellatrix(genesisTime uint64, preState state.Bea ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), Transactions: make([][]byte, 0), @@ -269,6 +270,7 @@ func EmptyGenesisStateBellatrix() (state.BeaconState, error) { ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), diff --git a/beacon-chain/execution/engine_client.go b/beacon-chain/execution/engine_client.go index 57c4964bf5..4de713b03e 100644 --- a/beacon-chain/execution/engine_client.go +++ b/beacon-chain/execution/engine_client.go @@ -761,8 +761,8 @@ func fullPayloadFromExecutionBlock( BlockHash: blockHash[:], Transactions: txs, Withdrawals: block.Withdrawals, - ExcessBlobGas: ebg, BlobGasUsed: bgu, + ExcessBlobGas: ebg, }, 0) // We can't get the block value and don't care about the block value for this instance default: return nil, fmt.Errorf("unknown execution block version %d", block.Version) @@ -941,10 +941,10 @@ func buildEmptyExecutionPayload(v int) (proto.Message, error) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), }, nil case version.Capella: return &pb.ExecutionPayloadCapella{ @@ -954,10 +954,10 @@ func buildEmptyExecutionPayload(v int) (proto.Message, error) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), Withdrawals: make([]*pb.Withdrawal, 0), }, nil case version.Deneb: @@ -968,10 +968,10 @@ func buildEmptyExecutionPayload(v int) (proto.Message, error) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), Withdrawals: make([]*pb.Withdrawal, 0), }, nil default: diff --git a/beacon-chain/execution/engine_client_fuzz_test.go b/beacon-chain/execution/engine_client_fuzz_test.go index 363983df58..c84a8137e7 100644 --- a/beacon-chain/execution/engine_client_fuzz_test.go +++ b/beacon-chain/execution/engine_client_fuzz_test.go @@ -85,7 +85,7 @@ func FuzzExecutionPayload(f *testing.F) { GasLimit: math.MaxUint64, GasUsed: math.MaxUint64, Timestamp: 100, - ExtraData: nil, + ExtraData: []byte{}, BaseFeePerGas: big.NewInt(math.MaxInt), BlockHash: common.Hash([32]byte{0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01}), Transactions: [][]byte{{0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01}, {0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01}, {0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01}, {0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01}}, diff --git a/beacon-chain/rpc/eth/shared/conversions_block.go b/beacon-chain/rpc/eth/shared/conversions_block.go index b0c5f94798..2eae9907a2 100644 --- a/beacon-chain/rpc/eth/shared/conversions_block.go +++ b/beacon-chain/rpc/eth/shared/conversions_block.go @@ -2333,10 +2333,10 @@ func ExecutionPayloadHeaderDenebFromConsensus(payload *enginev1.ExecutionPayload Timestamp: fmt.Sprintf("%d", payload.Timestamp), ExtraData: hexutil.Encode(payload.ExtraData), BaseFeePerGas: baseFeePerGas, - BlobGasUsed: fmt.Sprintf("%d", payload.BlobGasUsed), - ExcessBlobGas: fmt.Sprintf("%d", payload.ExcessBlobGas), BlockHash: hexutil.Encode(payload.BlockHash), TransactionsRoot: hexutil.Encode(payload.TransactionsRoot), WithdrawalsRoot: hexutil.Encode(payload.WithdrawalsRoot), + BlobGasUsed: fmt.Sprintf("%d", payload.BlobGasUsed), + ExcessBlobGas: fmt.Sprintf("%d", payload.ExcessBlobGas), }, nil } diff --git a/beacon-chain/rpc/eth/shared/structs_block.go b/beacon-chain/rpc/eth/shared/structs_block.go index 0dfccb0678..c911cac571 100644 --- a/beacon-chain/rpc/eth/shared/structs_block.go +++ b/beacon-chain/rpc/eth/shared/structs_block.go @@ -325,11 +325,11 @@ type ExecutionPayloadDeneb struct { Timestamp string `json:"timestamp"` ExtraData string `json:"extra_data"` BaseFeePerGas string `json:"base_fee_per_gas"` - BlobGasUsed string `json:"blob_gas_used"` - ExcessBlobGas string `json:"excess_blob_gas"` BlockHash string `json:"block_hash"` Transactions []string `json:"transactions"` Withdrawals []*Withdrawal `json:"withdrawals"` + BlobGasUsed string `json:"blob_gas_used"` + ExcessBlobGas string `json:"excess_blob_gas"` } type ExecutionPayloadHeaderDeneb struct { @@ -345,9 +345,9 @@ type ExecutionPayloadHeaderDeneb struct { Timestamp string `json:"timestamp"` ExtraData string `json:"extra_data"` BaseFeePerGas string `json:"base_fee_per_gas"` - BlobGasUsed string `json:"blob_gas_used"` - ExcessBlobGas string `json:"excess_blob_gas"` BlockHash string `json:"block_hash"` TransactionsRoot string `json:"transactions_root"` WithdrawalsRoot string `json:"withdrawals_root"` + BlobGasUsed string `json:"blob_gas_used"` + ExcessBlobGas string `json:"excess_blob_gas"` } diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix_test.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix_test.go index a35a646119..04d2877780 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix_test.go @@ -113,17 +113,18 @@ func TestServer_setExecutionData(t *testing.T) { require.NoError(t, err) bid := ðpb.BuilderBidCapella{ Header: &v1.ExecutionPayloadHeaderCapella{ + ParentHash: params.BeaconConfig().ZeroHash[:], FeeRecipient: make([]byte, fieldparams.FeeRecipientLength), StateRoot: make([]byte, fieldparams.RootLength), ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + BlockNumber: 2, + Timestamp: uint64(ti.Unix()), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), TransactionsRoot: bytesutil.PadTo([]byte{1}, fieldparams.RootLength), - ParentHash: params.BeaconConfig().ZeroHash[:], - Timestamp: uint64(ti.Unix()), - BlockNumber: 2, WithdrawalsRoot: make([]byte, fieldparams.RootLength), }, Pubkey: sk.PublicKey().Marshal(), @@ -176,17 +177,18 @@ func TestServer_setExecutionData(t *testing.T) { builderValue := bytesutil.ReverseByteOrder(big.NewInt(1e9).Bytes()) bid := ðpb.BuilderBidCapella{ Header: &v1.ExecutionPayloadHeaderCapella{ + ParentHash: params.BeaconConfig().ZeroHash[:], FeeRecipient: make([]byte, fieldparams.FeeRecipientLength), StateRoot: make([]byte, fieldparams.RootLength), ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + BlockNumber: 2, + Timestamp: uint64(ti.Unix()), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), TransactionsRoot: bytesutil.PadTo([]byte{1}, fieldparams.RootLength), - ParentHash: params.BeaconConfig().ZeroHash[:], - Timestamp: uint64(ti.Unix()), - BlockNumber: 2, WithdrawalsRoot: wr[:], }, Pubkey: sk.PublicKey().Marshal(), diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go index cf35fbad27..f949236a64 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go @@ -336,6 +336,7 @@ func emptyPayload() *enginev1.ExecutionPayload { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), @@ -350,6 +351,7 @@ func emptyPayloadCapella() *enginev1.ExecutionPayloadCapella { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), @@ -365,6 +367,7 @@ func emptyPayloadDeneb() *enginev1.ExecutionPayloadDeneb { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go index 76a971f40f..63f3b70bf1 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go @@ -363,8 +363,11 @@ func TestServer_GetBeaconBlock_Capella(t *testing.T) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), + Transactions: make([][]byte, 0), + Withdrawals: make([]*enginev1.Withdrawal, 0), }, }, }, @@ -388,14 +391,15 @@ func TestServer_GetBeaconBlock_Capella(t *testing.T) { ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, fieldparams.LogsBloomLength), PrevRandao: random, - BaseFeePerGas: make([]byte, fieldparams.RootLength), - BlockHash: make([]byte, fieldparams.RootLength), - Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), BlockNumber: 1, GasLimit: 2, GasUsed: 3, Timestamp: uint64(timeStamp.Unix()), + ExtraData: make([]byte, 0), + BaseFeePerGas: make([]byte, fieldparams.RootLength), + BlockHash: make([]byte, fieldparams.RootLength), + Transactions: make([][]byte, 0), + Withdrawals: make([]*enginev1.Withdrawal, 0), } proposerServer := getProposerServer(db, beaconState, parentRoot[:]) diff --git a/proto/prysm/v1alpha1/cloners.go b/proto/prysm/v1alpha1/cloners.go index 491bf1fed7..ab726975e0 100644 --- a/proto/prysm/v1alpha1/cloners.go +++ b/proto/prysm/v1alpha1/cloners.go @@ -623,8 +623,8 @@ func CopyExecutionPayloadHeader(payload *enginev1.ExecutionPayloadHeader) *engin GasLimit: payload.GasLimit, GasUsed: payload.GasUsed, Timestamp: payload.Timestamp, - BaseFeePerGas: bytesutil.SafeCopyBytes(payload.BaseFeePerGas), ExtraData: bytesutil.SafeCopyBytes(payload.ExtraData), + BaseFeePerGas: bytesutil.SafeCopyBytes(payload.BaseFeePerGas), BlockHash: bytesutil.SafeCopyBytes(payload.BlockHash), TransactionsRoot: bytesutil.SafeCopyBytes(payload.TransactionsRoot), } @@ -646,8 +646,8 @@ func CopyExecutionPayloadHeaderCapella(payload *enginev1.ExecutionPayloadHeaderC GasLimit: payload.GasLimit, GasUsed: payload.GasUsed, Timestamp: payload.Timestamp, - BaseFeePerGas: bytesutil.SafeCopyBytes(payload.BaseFeePerGas), ExtraData: bytesutil.SafeCopyBytes(payload.ExtraData), + BaseFeePerGas: bytesutil.SafeCopyBytes(payload.BaseFeePerGas), BlockHash: bytesutil.SafeCopyBytes(payload.BlockHash), TransactionsRoot: bytesutil.SafeCopyBytes(payload.TransactionsRoot), WithdrawalsRoot: bytesutil.SafeCopyBytes(payload.WithdrawalsRoot), @@ -812,13 +812,13 @@ func CopyExecutionPayloadHeaderDeneb(payload *enginev1.ExecutionPayloadHeaderDen GasLimit: payload.GasLimit, GasUsed: payload.GasUsed, Timestamp: payload.Timestamp, - BlobGasUsed: payload.BlobGasUsed, - ExcessBlobGas: payload.ExcessBlobGas, - BaseFeePerGas: bytesutil.SafeCopyBytes(payload.BaseFeePerGas), ExtraData: bytesutil.SafeCopyBytes(payload.ExtraData), + BaseFeePerGas: bytesutil.SafeCopyBytes(payload.BaseFeePerGas), BlockHash: bytesutil.SafeCopyBytes(payload.BlockHash), TransactionsRoot: bytesutil.SafeCopyBytes(payload.TransactionsRoot), WithdrawalsRoot: bytesutil.SafeCopyBytes(payload.WithdrawalsRoot), + BlobGasUsed: payload.BlobGasUsed, + ExcessBlobGas: payload.ExcessBlobGas, } } @@ -838,13 +838,13 @@ func CopyExecutionPayloadDeneb(payload *enginev1.ExecutionPayloadDeneb) *enginev GasLimit: payload.GasLimit, GasUsed: payload.GasUsed, Timestamp: payload.Timestamp, - BlobGasUsed: payload.BlobGasUsed, - ExcessBlobGas: payload.ExcessBlobGas, ExtraData: bytesutil.SafeCopyBytes(payload.ExtraData), BaseFeePerGas: bytesutil.SafeCopyBytes(payload.BaseFeePerGas), BlockHash: bytesutil.SafeCopyBytes(payload.BlockHash), Transactions: bytesutil.SafeCopy2dBytes(payload.Transactions), Withdrawals: CopyWithdrawalSlice(payload.Withdrawals), + BlobGasUsed: payload.BlobGasUsed, + ExcessBlobGas: payload.ExcessBlobGas, } } diff --git a/runtime/interop/premine-state.go b/runtime/interop/premine-state.go index b2babe0ca0..fa98a95cbb 100644 --- a/runtime/interop/premine-state.go +++ b/runtime/interop/premine-state.go @@ -462,6 +462,7 @@ func (s *PremineGenesisConfig) setLatestBlockHeader(g state.BeaconState) error { ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), Transactions: make([][]byte, 0), @@ -486,6 +487,7 @@ func (s *PremineGenesisConfig) setLatestBlockHeader(g state.BeaconState) error { ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), Transactions: make([][]byte, 0), @@ -512,12 +514,11 @@ func (s *PremineGenesisConfig) setLatestBlockHeader(g state.BeaconState) error { ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), Transactions: make([][]byte, 0), Withdrawals: make([]*enginev1.Withdrawal, 0), - ExcessBlobGas: 0, - BlobGasUsed: 0, }, BlsToExecutionChanges: make([]*ethpb.SignedBLSToExecutionChange, 0), BlobKzgCommitments: make([][]byte, 0), @@ -623,8 +624,8 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error { BlockHash: gb.Hash().Bytes(), Transactions: make([][]byte, 0), Withdrawals: make([]*enginev1.Withdrawal, 0), - ExcessBlobGas: 0, - BlobGasUsed: 0, + ExcessBlobGas: *gb.ExcessBlobGas(), + BlobGasUsed: *gb.BlobGasUsed(), } wep, err := blocks.WrappedExecutionPayloadDeneb(payload, 0) if err != nil { diff --git a/testing/util/bellatrix_state.go b/testing/util/bellatrix_state.go index c0fbecf48e..0dc8669cd5 100644 --- a/testing/util/bellatrix_state.go +++ b/testing/util/bellatrix_state.go @@ -207,8 +207,10 @@ func buildGenesisBeaconStateBellatrix(genesisTime uint64, preState state.BeaconS ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), + Transactions: make([][]byte, 0), }, }).HashTreeRoot() if err != nil { @@ -241,6 +243,7 @@ func buildGenesisBeaconStateBellatrix(genesisTime uint64, preState state.BeaconS ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), diff --git a/testing/util/block.go b/testing/util/block.go index b179194233..951b380bc4 100644 --- a/testing/util/block.go +++ b/testing/util/block.go @@ -653,9 +653,10 @@ func HydrateV2BellatrixBeaconBlockBody(b *v2.BeaconBlockBodyBellatrix) *v2.Beaco ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, fieldparams.RootLength), - ExtraData: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), + Transactions: make([][]byte, 0), } } return b @@ -772,10 +773,10 @@ func HydrateBeaconBlockBodyBellatrix(b *ethpb.BeaconBlockBodyBellatrix) *ethpb.B ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), } } return b @@ -839,10 +840,10 @@ func HydrateBlindedBeaconBlockBodyBellatrix(b *ethpb.BlindedBeaconBlockBodyBella ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, fieldparams.RootLength), - ExtraData: make([]byte, 0), } } return b @@ -906,6 +907,7 @@ func HydrateV2BlindedBeaconBlockBodyBellatrix(b *v2.BlindedBeaconBlockBodyBellat ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, fieldparams.RootLength), @@ -972,10 +974,11 @@ func HydrateBeaconBlockBodyCapella(b *ethpb.BeaconBlockBodyCapella) *ethpb.Beaco ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), + Withdrawals: make([]*enginev1.Withdrawal, 0), } } return b @@ -1039,10 +1042,10 @@ func HydrateBlindedBeaconBlockBodyCapella(b *ethpb.BlindedBeaconBlockBodyCapella ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, fieldparams.RootLength), - ExtraData: make([]byte, 0), WithdrawalsRoot: make([]byte, fieldparams.RootLength), } } @@ -1107,6 +1110,7 @@ func HydrateV2BlindedBeaconBlockBodyCapella(b *v2.BlindedBeaconBlockBodyCapella) ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, fieldparams.RootLength), @@ -1217,10 +1221,11 @@ func HydrateBeaconBlockBodyDeneb(b *ethpb.BeaconBlockBodyDeneb) *ethpb.BeaconBlo ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), + Withdrawals: make([]*enginev1.Withdrawal, 0), } } return b @@ -1258,10 +1263,11 @@ func HydrateV2BeaconBlockBodyDeneb(b *v2.BeaconBlockBodyDeneb) *v2.BeaconBlockBo ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, fieldparams.RootLength), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, fieldparams.RootLength), BlockHash: make([]byte, fieldparams.RootLength), Transactions: make([][]byte, 0), - ExtraData: make([]byte, 0), + Withdrawals: make([]*enginev1.Withdrawal, 0), } } return b @@ -1351,10 +1357,10 @@ func HydrateBlindedBeaconBlockBodyDeneb(b *ethpb.BlindedBeaconBlockBodyDeneb) *e ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, fieldparams.RootLength), - ExtraData: make([]byte, 0), WithdrawalsRoot: make([]byte, fieldparams.RootLength), } } @@ -1393,10 +1399,10 @@ func HydrateV2BlindedBeaconBlockBodyDeneb(b *v2.BlindedBeaconBlockBodyDeneb) *v2 ReceiptsRoot: make([]byte, fieldparams.RootLength), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, fieldparams.RootLength), - ExtraData: make([]byte, 0), WithdrawalsRoot: make([]byte, fieldparams.RootLength), } } diff --git a/testing/util/capella_state.go b/testing/util/capella_state.go index 2a15c9d312..a46e4cf50f 100644 --- a/testing/util/capella_state.go +++ b/testing/util/capella_state.go @@ -200,8 +200,11 @@ func buildGenesisBeaconStateCapella(genesisTime uint64, preState state.BeaconSta ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), + Transactions: make([][]byte, 0), + Withdrawals: make([]*enginev1.Withdrawal, 0), }, }).HashTreeRoot() if err != nil { @@ -240,6 +243,7 @@ func buildGenesisBeaconStateCapella(genesisTime uint64, preState state.BeaconSta ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), diff --git a/testing/util/deneb.go b/testing/util/deneb.go index 9a9d915c23..23340ef0cf 100644 --- a/testing/util/deneb.go +++ b/testing/util/deneb.go @@ -87,10 +87,11 @@ func GenerateTestDenebBlockWithSidecar(t *testing.T, parent [32]byte, slot primi Timestamp: 0, ExtraData: make([]byte, 0), BaseFeePerGas: bytesutil.PadTo([]byte("baseFeePerGas"), fieldparams.RootLength), - ExcessBlobGas: 0, - BlobGasUsed: 0, BlockHash: blockHash[:], Transactions: encodedBinaryTxs, + Withdrawals: make([]*enginev1.Withdrawal, 0), + BlobGasUsed: 0, + ExcessBlobGas: 0, } block := NewBeaconBlockDeneb() block.Block.Body.ExecutionPayload = payload diff --git a/testing/util/deneb_state.go b/testing/util/deneb_state.go index 24197275d1..4bee14125e 100644 --- a/testing/util/deneb_state.go +++ b/testing/util/deneb_state.go @@ -200,8 +200,11 @@ func buildGenesisBeaconStateDeneb(genesisTime uint64, preState state.BeaconState ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), + Transactions: make([][]byte, 0), + Withdrawals: make([]*enginev1.Withdrawal, 0), }, }).HashTreeRoot() if err != nil { @@ -240,6 +243,7 @@ func buildGenesisBeaconStateDeneb(genesisTime uint64, preState state.BeaconState ReceiptsRoot: make([]byte, 32), LogsBloom: make([]byte, 256), PrevRandao: make([]byte, 32), + ExtraData: make([]byte, 0), BaseFeePerGas: make([]byte, 32), BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), diff --git a/validator/client/beacon-api/propose_beacon_block.go b/validator/client/beacon-api/propose_beacon_block.go index 536adb5100..fd48d72ca9 100644 --- a/validator/client/beacon-api/propose_beacon_block.go +++ b/validator/client/beacon-api/propose_beacon_block.go @@ -223,19 +223,19 @@ func marshallBeaconBlockBellatrix(block *ethpb.SignedBeaconBlockBellatrix) ([]by SyncCommitteeSignature: hexutil.Encode(block.Block.Body.SyncAggregate.SyncCommitteeSignature), }, ExecutionPayload: &shared.ExecutionPayload{ - BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayload.BaseFeePerGas).String(), - BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayload.BlockHash), - BlockNumber: uint64ToString(block.Block.Body.ExecutionPayload.BlockNumber), - ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayload.ExtraData), + ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayload.ParentHash), FeeRecipient: hexutil.Encode(block.Block.Body.ExecutionPayload.FeeRecipient), + StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.StateRoot), + ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.ReceiptsRoot), + LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayload.LogsBloom), + PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayload.PrevRandao), + BlockNumber: uint64ToString(block.Block.Body.ExecutionPayload.BlockNumber), GasLimit: uint64ToString(block.Block.Body.ExecutionPayload.GasLimit), GasUsed: uint64ToString(block.Block.Body.ExecutionPayload.GasUsed), - LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayload.LogsBloom), - ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayload.ParentHash), - PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayload.PrevRandao), - ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.ReceiptsRoot), - StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.StateRoot), Timestamp: uint64ToString(block.Block.Body.ExecutionPayload.Timestamp), + ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayload.ExtraData), + BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayload.BaseFeePerGas).String(), + BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayload.BlockHash), Transactions: jsonifyTransactions(block.Block.Body.ExecutionPayload.Transactions), }, }, @@ -267,19 +267,19 @@ func marshallBeaconBlockBlindedBellatrix(block *ethpb.SignedBlindedBeaconBlockBe SyncCommitteeSignature: hexutil.Encode(block.Block.Body.SyncAggregate.SyncCommitteeSignature), }, ExecutionPayloadHeader: &shared.ExecutionPayloadHeader{ - BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayloadHeader.BaseFeePerGas).String(), - BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.BlockHash), - BlockNumber: uint64ToString(block.Block.Body.ExecutionPayloadHeader.BlockNumber), - ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ExtraData), + ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ParentHash), FeeRecipient: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.FeeRecipient), + StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.StateRoot), + ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ReceiptsRoot), + LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.LogsBloom), + PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.PrevRandao), + BlockNumber: uint64ToString(block.Block.Body.ExecutionPayloadHeader.BlockNumber), GasLimit: uint64ToString(block.Block.Body.ExecutionPayloadHeader.GasLimit), GasUsed: uint64ToString(block.Block.Body.ExecutionPayloadHeader.GasUsed), - LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.LogsBloom), - ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ParentHash), - PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.PrevRandao), - ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ReceiptsRoot), - StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.StateRoot), Timestamp: uint64ToString(block.Block.Body.ExecutionPayloadHeader.Timestamp), + ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ExtraData), + BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayloadHeader.BaseFeePerGas).String(), + BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.BlockHash), TransactionsRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.TransactionsRoot), }, }, @@ -311,19 +311,19 @@ func marshallBeaconBlockCapella(block *ethpb.SignedBeaconBlockCapella) ([]byte, SyncCommitteeSignature: hexutil.Encode(block.Block.Body.SyncAggregate.SyncCommitteeSignature), }, ExecutionPayload: &shared.ExecutionPayloadCapella{ - BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayload.BaseFeePerGas).String(), - BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayload.BlockHash), - BlockNumber: uint64ToString(block.Block.Body.ExecutionPayload.BlockNumber), - ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayload.ExtraData), + ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayload.ParentHash), FeeRecipient: hexutil.Encode(block.Block.Body.ExecutionPayload.FeeRecipient), + StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.StateRoot), + ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.ReceiptsRoot), + LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayload.LogsBloom), + PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayload.PrevRandao), + BlockNumber: uint64ToString(block.Block.Body.ExecutionPayload.BlockNumber), GasLimit: uint64ToString(block.Block.Body.ExecutionPayload.GasLimit), GasUsed: uint64ToString(block.Block.Body.ExecutionPayload.GasUsed), - LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayload.LogsBloom), - ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayload.ParentHash), - PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayload.PrevRandao), - ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.ReceiptsRoot), - StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayload.StateRoot), Timestamp: uint64ToString(block.Block.Body.ExecutionPayload.Timestamp), + ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayload.ExtraData), + BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayload.BaseFeePerGas).String(), + BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayload.BlockHash), Transactions: jsonifyTransactions(block.Block.Body.ExecutionPayload.Transactions), Withdrawals: jsonifyWithdrawals(block.Block.Body.ExecutionPayload.Withdrawals), }, @@ -357,19 +357,19 @@ func marshallBeaconBlockBlindedCapella(block *ethpb.SignedBlindedBeaconBlockCape SyncCommitteeSignature: hexutil.Encode(block.Block.Body.SyncAggregate.SyncCommitteeSignature), }, ExecutionPayloadHeader: &shared.ExecutionPayloadHeaderCapella{ - BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayloadHeader.BaseFeePerGas).String(), - BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.BlockHash), - BlockNumber: uint64ToString(block.Block.Body.ExecutionPayloadHeader.BlockNumber), - ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ExtraData), + ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ParentHash), FeeRecipient: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.FeeRecipient), + StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.StateRoot), + ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ReceiptsRoot), + LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.LogsBloom), + PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.PrevRandao), + BlockNumber: uint64ToString(block.Block.Body.ExecutionPayloadHeader.BlockNumber), GasLimit: uint64ToString(block.Block.Body.ExecutionPayloadHeader.GasLimit), GasUsed: uint64ToString(block.Block.Body.ExecutionPayloadHeader.GasUsed), - LogsBloom: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.LogsBloom), - ParentHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ParentHash), - PrevRandao: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.PrevRandao), - ReceiptsRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ReceiptsRoot), - StateRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.StateRoot), Timestamp: uint64ToString(block.Block.Body.ExecutionPayloadHeader.Timestamp), + ExtraData: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.ExtraData), + BaseFeePerGas: bytesutil.LittleEndianBytesToBigInt(block.Block.Body.ExecutionPayloadHeader.BaseFeePerGas).String(), + BlockHash: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.BlockHash), TransactionsRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.TransactionsRoot), WithdrawalsRoot: hexutil.Encode(block.Block.Body.ExecutionPayloadHeader.WithdrawalsRoot), },