EIP-3045: Adds `baseFee` to `eth_getUncleByBlockHashAndIndex`


Metadata
Status: StagnantStandards Track: InterfaceCreated: 2020-10-14
Authors
Abdelhamid Bakhta (@abdelhamidbakhta)

Simple Summary


Add basefee field to eth_getUncleByBlockHashAndIndex RPC endpoint response.

Abstract


Adds baseFee property to the eth_getUncleByBlockHashAndIndex JSON-RPC request result object. This property will contain the value of the base fee for any block after the EIP-1559 fork.

Motivation


EIP-1559 introduces a base fee per gas in protocol. This value is maintained under consensus as a new field in the block header structure. Users may need value of the base fee at a given block. Base fee value is important to make gas price predictions more accurate.

Specification


eth_getUncleByBlockHashAndIndex

Description

Returns information about an uncle specified by block hash and uncle index position Every block returned by this endpoint whose block number is before the EIP-1559 fork block MUST NOT include a baseFee field. Every block returned by this endpoint whose block number is on or after the EIP-1559 fork block MUST include a baseFee field.

Parameters

Parameters remain unchanged.

Returns

For the full specification of eth_getUncleByBlockHashAndIndex see EIP-1474. Add a new JSON field to the result object for block headers containing a base fee (post EIP-1559 fork block).

  • {Quantity} baseFee - base fee for this block

Example


Rationale


The addition of a single parameter instead of introducing a whole new endpoint was the simplest change that would be easiest to get integrated. For backward compatibility we decided to not include the base fee in the response for pre-1559 blocks.

Backwards Compatibility


Backwards compatible. Calls related to block prior to EIP-1559 fork block will omit the base fee field in the response.

Security Considerations


The added field (baseFee) is informational and does not introduce technical security issues.

Copyright


Copyright and related rights waived via CC0.