Skip to content

Block override ​

Changes to the block fields that a call sees, for example the number or the time.

eth_call, eth_estimateGas, debug_traceCall, trace_call, the bundles of eth_callMany and the blocks of eth_simulateV1 accept it. All fields are optional.

Fields ​

FieldTypeMeaning
numberhex numberThe block number (NUMBER). blockNumber is also accepted. A value above 64 bits gives NUMBER the full 256-bit value, as in reth.
timehex number, secondsThe block time (TIMESTAMP). timestamp is also accepted.
gasLimithex numberThe block gas limit (GASLIMIT).
feeRecipientaddressThe fee recipient (COINBASE). coinbase is also accepted.
prevRandao32-byte hashThe randomness value (PREVRANDAO). random is also accepted.
baseFeePerGashex number, weiThe base fee (BASEFEE). baseFee is also accepted.
blockHashobject: block number in decimal to 32-byte hashThe answers of BLOCKHASH for these numbers.
blobBaseFeehex number, weiThe blob base fee (BLOBBASEFEE and the blob fee check of a blob call).
difficultyhex numbereth_simulateV1 only: the difficulty of the simulated block.
beaconRoot32-byte hasheth_simulateV1 only: the parentBeaconBlockRoot of the simulated block.

Notes ​

  • difficulty and beaconRoot have no effect on a call, as in reth.
  • BLOCKHASH of a block above the head gives a zero hash, as in reth. BLOCKHASH(0) gives the genesis hash.
  • BLOCKHASH of another block below the first header of the node gives the error 4444 pruned history unavailable: requested N, earliest available M. reth gives the hash. The node has no headers below its first block before v1.0.
  • A value with the wrong format gives -32602 Invalid params, with the text of reth in data. Numbers can also be decimal strings or JSON numbers, as in reth.

Used by ​

eth_call, eth_estimateGas, trace_call.