This Document describes enhancing support of historical blocks related to the work defined in HIP-584.
Ongoing user experience work needs EVM execution to enable features such as making queries to historical blocks via eth_call.
Enhancing Mirror Archive Nodes with historical support will enable users to implement dApps for monitoring, analyzing tools and any other use cases that need to use historical data.
Eth_call immediately executes a new message call without creating a transaction. Currently in Hedera, we are supporting its most fundamental use cases which are:
However, eth_call has additional capabilities that we may want to enable for developers on Hedera, such as:
The JSON-RPC endpoint eth_call accepts a block number as an input argument. This block number specifies that the execution of eth_call has to be based on the state that is produced after the execution of all transactions into the specified block. In this way, the state would reliably reflect the changes included in the given block. As defined in HIP-415, in Hedera, the block number is the consecutive number of a record file that was streamed from the consensus nodes.
The block number can be specified in a hexadecimal format or with string values - “latest” or “earliest”. The other string values defined in Ethereum will default to “latest”, as Hedera architecture incorporates finality of a block right after a given block is created. These are - “pending”, “safe” and “finalized”. We will throw HTTP code BAD_REQUEST exception for a block that is malformed or has a value above the current latest block.
In order to be possible to query historical blocks, we should meet some requirements:
CONTRACT_BYTECODE , CONTRACT_STATE_CHANGE sidecar types enabled.