Corpus Core Docs

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 Block: The execution block is verified via ETH_EL_PROOF_UNION (c4_verify_block). This yields a verified RLP EL header. EVM block context (blockNumber, timestamp, coinbase, prevRandao, baseFeePerGas, blockHash, gasLimit, excessBlobGas) is read from that header.
  2. Account and Storage Proofs: A Patricia Merkle proof is constructed for each involved account and all accessed storage values. Each account proof reconstructs the header's stateRoot. Contract code is included when needed and checked against codeHash.
  3. Stateless Execution: The EVM is executed against the proven accounts and storage. The returned output must match the proven call result.

This Proof is used for the following RPC-Methods:

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 : ProgList [EthCallAccount] # used accounts
    elProof  : Union [                   # EL header proof of the accounts
        Bytes32,                         # 0: cached: verifier already holds this verified EL header
        EthClHeaderProof,                # 1: full consensus-layer proof of the EL header
        EthSequencerProof,               # 2: sequencer-signed execution payload (OP-Stack)
        EthWitnessHeaderProof,           # 3: reserved; c4_verify_block rejects until ecrecover+allow-list exist
        EezL1Proof,                      # 4: Proof of the blockhash based on the EEZ Proxy contract in L1
        EthEip2935Proof,                 # 5: Proof of the blockhash based on EIP-2935; accepted by c4_verify_block on every chain
        ArbFeedProof]                    # 6: Arbitrum sequencer feed signature

Referenced Types

EthCallAccount

A proof for a single account.

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

class EthCallAccount(Container):
    accountProof : ProgList [bytes_1024]      # 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 : ProgList [EthStorageProof] # the storage proofs of the selected

Referenced Types