Ensure pre-cancun payload does not have blob transactions #4670
Labels
A-consensus
Related to the consensus engine
A-rpc
Related to the RPC implementation
C-bug
An unexpected or incorrect behavior
Describe the bug
The hive pyspec test
cancun/eip4844_blobs/blob_txs/blob_type_tx_pre_fork/001-fork=ShanghaiToCancunAtTime15k-one_blob_tx
fails because we do not returnINVALID_PARAMS
when processing a new payload that is pre-cancun and has blob transactions:We may need to change how we use
try_into_sealed_block
and changeensure_well_formed_payload
to support this. We will need to add a variant toBeaconOnNewPayloadError
that maps toINVALID_PARAMS_CODE
:reth/crates/rpc/rpc-engine-api/src/error.rs
Lines 113 to 117 in 8012942
We should probably verify this property after transactions are parsed, which is why I suggest doing this in
ensure_well_formed_payload
. We could also just check the EIP-2718 prefix before they're decoded, when they are still stored asBytes
in theExecutionPayload
:reth/crates/rpc/rpc-types/src/eth/engine/payload.rs
Lines 136 to 138 in 8012942
But doing this after decoding seems like the best solution.
Steps to reproduce
Run hive:
Node logs
No response
Platform(s)
No response
What version/commit are you on?
No response
What database version are you on?
No response
If you've built Reth from source, provide the full command you used
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: