Call Proof

eth_call returns the result of a smart contract call. To verify that this result is correct, every referenced account, contract code, and storage value must be validated against the canonical chain state.

  1. Execution-Layer Proof A Patricia Merkle Proof is constructed for each involved account and all accessed storage values in the execution layer. For every account, this includes the balance, nonce, codeHash, and storageRoot, as well as the specific storage slots read or modified during the call. Each of these elements is verified through its corresponding Merkle proof, resulting in a verified stateRoot for the execution block. (Equivalent to the combined data returned by eth_getProof for all accounts and storage keys involved.)

  2. State Proof An SSZ Merkle Proof connects the stateRoot of the execution layer to the ExecutionPayload, and continues through the BeaconBlockBody to its root hash, which is referenced in the BeaconBlockHeader.

  3. Consensus Reference The BeaconBlockHeader is included in the proof to provide the slot information. This determines which sync committee is responsible for signing the corresponding block root.

  4. Sync Committee Signature The BLS aggregate signature from the sync committee of the following block is verified against the SignData that includes the block hash. The signing domain is derived from the fork version and the Genesis Validator Root, confirming that the block and its execution state belong to the canonical chain.

The Call Proof provides full verifiability of eth_call results by cryptographically proving all involved account and storage states without reliance on any RPC provider.

This Proof is used for the following RPC-Methods:

EthCallAccount

A proof for a single account.

The Type is defined in src/chains/eth/ssz/verify_proof_types.h.

class EthCallAccount(Container):
    accountProof : List [bytes_1024, 256]       # Patricia merkle proof
    address      : Address                      # the address of the account
    code         : Union [                      # the code of the contract
        Boolean,                                # no code delivered
        Bytes[4194304]]                         # the code of the contract
    storageProof : List [EthStorageProof, 4096] # the storage proofs of the selected

Referenced Types

EthCallProof

The main proof data for a call.

The Type is defined in src/chains/eth/ssz/verify_proof_types.h.

class EthCallProof(Container):
    accounts    : List [EthCallAccount, 256] # used accounts
    state_proof : EthStateProof              # the state proof of the account

Referenced Types

Last updated