Corpus Core Docs

Account Proof

An Account Proof represents the account and storage values, including the Merkle proof, of the specified account.

  1. Execution Block: The execution block is verified via ETH_EL_PROOF_UNION (c4_verify_block). This yields a verified RLP EL header and its keccak blockHash.
  2. Account Inclusion: A Patricia Merkle proof against the header's stateRoot delivers the account object (nonce, balance, storageRoot, codeHash). Equivalent to the data returned by eth_getProof.
  3. Storage Inclusion: Each requested storage key has its own Patricia Merkle proof against the account's storageRoot. The value is the leaf of that proof.

This Proof is used for the following RPC-Methods:

EthAccountProof

The main proof data for an account.

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

class EthAccountProof(Container):
    accountProof : ProgList [bytes_1024]      # Patricia merkle proof
    address      : Address                    # the address of the account
    storageProof : ProgList [EthStorageProof] # the storage proofs of the selected
    elProof      : Union [                    # EL header proof of the account
        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

EthStorageProof

Represents the storage proof of a key. The value can be taken from the last entry, which is the leaf of the proof.

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

class EthStorageProof(Container):
    key   : Bytes32               # the key to be proven
    proof : ProgList [bytes_1024] # Patricia merkle proof

EthProofData

Container type for storage proof data Account proof data as returned by eth_getProof. Contains the account state and Merkle proofs for account and storage values.

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

class EthProofData(Container):
    address      : Address                        # the account address (per JSON-RPC spec)
    balance      : Uint256                        # the account balance
    codeHash     : Bytes32                        # the hash of the contract code (empty for EOA)
    nonce        : Uint256                        # the account nonce
    storageHash  : Bytes32                        # the root hash of the storage trie
    accountProof : ProgList [bytesList]           # Patricia Merkle proof for the account (from state root to account)
    storageProof : ProgList [EthStorageProofData] # the storage proofs for requested storage keys

Referenced Types

EthStorageProofData

Represents the storage proof of a key. The value can be taken from the last entry, which is the leaf of the proof.

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

class EthStorageProofData(Container):
    key   : Bytes32              # the key
    value : Uint256              # the value (QUANTITY per RPC spec)
    proof : ProgList [bytesList] # Patricia merkle proof (simplified)