Initialize exec payload fields and enforce order (#13372)

Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
Justin Traglia
2024-01-09 15:49:35 -06:00
committed by GitHub
parent c6ebe157a6
commit 703cfc5819
26 changed files with 133 additions and 87 deletions

View File

@@ -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 {