EIP-3044 Adding base fee to block lookups (Adds `baseFee` to `eth_getBlockByNumber`)

No call decision · Fees & gas · EIP status Stagnant · created 2020-10-14

A proposal to add a field carrying the EIP-1559 base fee value to the eth_getBlockByNumber JSON-RPC response of an Ethereum node.

Why it is needed

With EIP-1559, Ethereum determines a base fee for each block at the protocol level and manages this value as a new field in the block header. However, eth_getBlockByNumber, the primary endpoint for looking up block information, did not include this value in its response. Users, wallets, and analytics tools need this value for gas fee prediction when they want to know the base fee at a specific block, but there was no way to check it through the most commonly used block lookup API. This EIP proposes filling this gap by adding a single field to the existing endpoint.

What changes

Today

After EIP-3044

Who is affected

In depth

Scope of change

This EIP limits its scope to adding a field to the response of the single existing eth_getBlockByNumber endpoint, without creating a new RPC endpoint. According to the Rationale, this approach was chosen because adding a single parameter to an existing endpoint is the simplest change and the easiest to integrate, compared to creating a new endpoint.

Field addition rules

The Specification states two MUST requirements. If the queried block number is before the EIP-1559 fork block, the response MUST NOT include a baseFee field. Conversely, if it is the fork block or later, the response MUST include a baseFee field. This rule causes the response format to differ before and after the fork. The parameters themselves remain unchanged.

Field format

The newly added field is baseFee, of type Quantity. Its value holds the base fee for this block. In the example response it is represented as a hexadecimal string ("0x7"). The remaining return fields and the overall format follow the eth_getBlockByNumber specification in EIP-1474 as is.

Backward compatibility

Existing callers of this API are unaffected. Querying a block number before the EIP-1559 fork block returns the same response as before, without a baseFee field, so existing logic is not broken. The new field is only added to blocks after the fork.

Security considerations

The original text specifies that the added baseFee field is purely informational data and does not introduce any technical security issues. In other words, this field itself does not create a new attack surface for consensus or validation logic.

Predecessor EIPs and current status

This EIP depends on EIP-1474 (the JSON-RPC API specification) and EIP-1559 (the base fee mechanism). The baseFee value itself is defined by EIP-1559; this EIP only inserts that value into the eth_getBlockByNumber response format defined by EIP-1474. The status listed at the top of the original is Stagnant, meaning discussion has stalled without the standard being adopted.

Original EIP · ← EIPs