diff --git a/beacon/engine/types.go b/beacon/engine/types.go index a73691ca05..6ef8862c72 100644 --- a/beacon/engine/types.go +++ b/beacon/engine/types.go @@ -18,6 +18,7 @@ package engine import ( "fmt" + params2 "github.com/ethereum/go-ethereum/params" "math/big" "slices" @@ -199,7 +200,7 @@ func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash, if err != nil { return nil, err } - if len(params.ExtraData) > 32 { + if len(params.ExtraData) > int(params2.MaximumExtraDataSize) { return nil, fmt.Errorf("invalid extradata length: %v", len(params.ExtraData)) } if len(params.LogsBloom) != 256 { diff --git a/consensus/beacon/consensus.go b/consensus/beacon/consensus.go index b8946e0c71..19763ed303 100644 --- a/consensus/beacon/consensus.go +++ b/consensus/beacon/consensus.go @@ -229,7 +229,7 @@ func (beacon *Beacon) VerifyUncles(chain consensus.ChainReader, block *types.Blo // (c) the extradata is limited to 32 bytes func (beacon *Beacon) verifyHeader(chain consensus.ChainHeaderReader, header, parent *types.Header) error { // Ensure that the header's extra-data section is of a reasonable size - if len(header.Extra) > 32 { + if len(header.Extra) > int(params.MaximumExtraDataSize) { return fmt.Errorf("extra-data longer than 32 bytes (%d)", len(header.Extra)) } // Verify the seal parts. Ensure the nonce and uncle hash are the expected value.