EIP-3045 Add base fee to uncle block queries (Adds `baseFee` to `eth_getUncleByBlockHashAndIndex`)

No call decision · Networking & nodes · EIP status Stagnant · created 2020-10-14

A proposal to add the EIP-1559 base fee (baseFee) field to the eth_getUncleByBlockHashAndIndex RPC response, which retrieves uncle block information.

Why it is needed

With the introduction of EIP-1559, every block header includes a base fee value as part of the consensus rules. However, the response from the eth_getUncleByBlockHashAndIndex RPC method, which queries uncle blocks, does not include this value. Wallets and apps need to know a block's base fee to predict gas costs, but there was no way to retrieve this information for uncle blocks. This EIP fills that gap by adding a baseFee field to the RPC response, improving gas fee prediction accuracy.

What changes

Today

After EIP-3045

Who is affected

In depth

Scope of application

This EIP only changes the response format of a single JSON-RPC method, eth_getUncleByBlockHashAndIndex. The parameters (block hash, uncle index) remain unchanged; only a single baseFee field is added to the result object.

Field definition

The added baseFee is of Quantity type (a hexadecimal string), following the Quantity format defined in EIP-1474. The value is the base fee per gas for that block.

Branching based on the fork

Blocks with a number before the EIP-1559 fork block MUST NOT include a baseFee field in the response, and blocks at or after the fork block MUST include it. This is because pre-fork block headers do not actually have a base fee value.

Design choices

Rather than creating a new RPC endpoint, the approach taken was to add a single field to the existing eth_getUncleByBlockHashAndIndex response. The author describes this as the simplest change to integrate.

Security impact

The added baseFee field is for informational purposes only, and the original text states that it introduces no technical security issues.

Status and prerequisites

This EIP depends on EIP-1474 (the JSON-RPC specification) and EIP-1559 (the introduction of the base fee), and its status is Stagnant. Stagnant means discussion has stopped and is no longer progressing, so actual adoption status and details may have changed or not progressed since the original was written.

Original EIP · ← EIPs