You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I'm building an ethereum light-client, and one of the steps is verifying the block hash, however there's a mismatch between the block header returned by the RPC API and the actual header stored, as such I cannot recompute the block hash, preventing frontier from working with ethereum light-clients that relies on the RPC API.
After a investigation I realized this happens because of two issues:
The timestamp is important for TIMESTAMP opcode, a ethereum light-client relies on getting the contract state using eth_createAccessList and eth_getProof for executing the call locally, by returning the wrong timestamp the light-client and the real node will get different results.
Example, the eth_getBlockByNumber endpoint returns:
hey @sorpaas, are you currently working on this fix ?
wanted to check since we are seeing an issue with forge when trying to send transaction so we are falling back to legacy instead
Description
I'm building an ethereum light-client, and one of the steps is verifying the block hash, however there's a mismatch between the block header returned by the RPC API and the actual header stored, as such I cannot recompute the block hash, preventing frontier from working with ethereum light-clients that relies on the RPC API.
After a investigation I realized this happens because of two issues:
baseFeePerGas
field, but this field is not encoded in the header. EIP-1559 says this field MUST be part of the block header:eth_createAccessList
andeth_getProof
for executing the call locally, by returning the wrong timestamp the light-client and the real node will get different results.Example, the
eth_getBlockByNumber
endpoint returns:But for correctly represent the block header, it should omit the
baseFeePerGas
and return the correct timestamp:Steps to Reproduce
To reproduce the issue above, simply build the
Header
using the block returned by theeth_getBlockBy*
and notice the hash doesn't match:For testing the
baseFeePerGas
example, see thereth
RLP encoder as reference:https://github.com/paradigmxyz/reth/blob/v0.1.0-alpha.10/crates/primitives/src/header.rs#L324-L391
The text was updated successfully, but these errors were encountered: