Description
This issue is to keep track of the conversation started at the JSON-RPC session at devconnect.
Most state-related methods which take in a blocktag allow users to specify "pending". The semantic difference to "latest" is that the EL keeps track of a pending state by applying all of the pending transactions on top of the current state.
We're questioning the practical use of this tag as it depends heavily on the local view of the txpool. The mempool is fluid, there is no guarantee that the transactions there will be mined. Moreover different nodes within an RPC provider infrastructure have different views on the mempool and some notable ones do not serve pending state.
The path to deprecating "pending" we are proposing is to create an empty pending block. This means the block context fields such as number and timestamp will reflect the "next" block, but state is from that of "latest". This also means that there will be no guarantees that the client can deliver pending logs. The only exception would be eth_getTransactionCount
which should return the latest nonce for an account, considering also txes in the mempool.
This will alleviate some load from nodes to build the pending block and maintain its state while keeping most of the current use-cases.
Looking into the future: by adding block context overrides to relevant methods such as eth_call
, eth_estimateGas
and eth_createAccessList
we remove the need for creating an empty pending block. Users can simulate on top of "latest" but pass in overrides for the next block. Furthermore if clients implement eth_multicall
, it will be possible to simulate the pending state by passing higher weighted pending txes to multicall.