> For the complete documentation index, see [llms.txt](https://corpus-core.gitbook.io/specification-colibri-stateless/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/account-proof.md).

# Account Proof

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

1. **Execution-Layer Proof** A **Patricia Merkle Proof** is constructed for the account object in the execution layer. This proof includes the account’s `balance`, `nonce`, `codeHash`, and `storageRoot`, as well as separate proofs for all accessed storage keys. The resulting root of this proof corresponds to the block’s **stateRoot**. (Equivalent to the data returned by `eth_getProof`.)
2. **State Proof** An **SSZ Merkle Proof** links the `stateRoot` from the execution layer to the **ExecutionPayload**, and further through the **BeaconBlockBody** to its root hash, which is included in the **BeaconBlockHeader**.
3. **Consensus Reference** The **BeaconBlockHeader** is included in the proof to provide the `slot` information, which identifies the sync committee period 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` containing the block hash. The signing domain is derived from the fork version and the **Genesis Validator Root**, confirming that the account data originates from a block included in the canonical chain.

![](/files/QeiYAD1SQj7oIDSwhgPE)

This Proof is used for the following RPC-Methods:

* [eth\_getProof](https://www.alchemy.com/docs/node/ethereum/ethereum-api-endpoints/eth-get-proof)
* [eth\_getBalance](https://www.alchemy.com/docs/node/ethereum/ethereum-api-endpoints/eth-get-balance)
* [eth\_getCode](https://www.alchemy.com/docs/node/ethereum/ethereum-api-endpoints/eth-get-code)
* [eth\_getTransactionCount](https://www.alchemy.com/docs/node/ethereum/ethereum-api-endpoints/eth-get-transaction-count)
* [eth\_getStorageAt](https://www.alchemy.com/docs/node/ethereum/ethereum-api-endpoints/eth-get-storage-at)

## EthStateCheckpointProof

Proof for the latest finalized or justified checkpoint. If the user requested `safe`, `checkpoint_proof` contains the `current_justified_checkpoint` field; otherwise the `finalized_checkpoint` field is used. The timestamp and its branch to the execution payload are also included in order to verify the freshness of the checkpoint. The header itself must be the latest beacon header for which a signature of the SyncCommittee in the following block is available.

The Type is defined in [src/chains/eth/ssz/verify\_proof\_types.h](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_proof_types.h#L441).

```python
class EthStateCheckpointProof(Container):
    header           : BeaconBlockHeader      # the header of the head block
    header_signature : EthSignatureBlockProof # the signature of the header
    timestamp        : Uint64                 # the timestamp of the head block
    timestamp_proof  : List [bytes32, 256]    # the branch of the timestamp from the execution payload to the body root
    checkpoint_proof : List [bytes32, 256]    # the branch of the finalized_checkpoint or current_justified_checkpoint from the state to the state_root
```

**Referenced Types**

* [BeaconBlockHeader](https://ethereum.github.io/consensus-specs/specs/phase0/beacon-chain/#beaconblockheader)
* [EthSignatureBlockProof](/specification-colibri-stateless/specifications/ethereum/header-proof.md#ethsignatureblockproof)

## EthCallBlockContext

Compact block context for EVM execution (selector 3). All fields are proved via the same multi-merkle proof as stateRoot.

The Type is defined in [src/chains/eth/ssz/verify\_proof\_types.h](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_proof_types.h#L450).

```python
class EthCallBlockContext(Container):
    blockNumber   : Uint64  # execution payload index 6
    timestamp     : Uint64  # execution payload index 9
    coinbase      : Address # execution payload feeRecipient index 1
    prevRandao    : Bytes32 # execution payload index 5
    baseFeePerGas : Bytes32 # execution payload index 11 (uint256)
    blockHash     : Bytes32 # execution payload index 12 (enables eth_call with block hash)
    gasLimit      : Uint64  # execution payload index 7
    excessBlobGas : Uint64  # execution payload index 16 (verifier derives blobBaseFee)
```

## EthStateProof

The stateRoot proof is used as part of different other types since it contains all relevant proofs to validate the stateRoot of the execution layer.

The Type is defined in [src/chains/eth/ssz/verify\_proof\_types.h](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_proof_types.h#L473).

```python
class EthStateProof(Container):
    block        : Union [             # the block to be proven
        None,                          # no additional block-proof
        Bytes32,                       # proof for the right blockhash
        Uint64,                        # proof for the right blocknumber
        EthCallBlockContext,           # compact header for EVM block context (multi-proof)
        Uint64,                        # timestamp-only proof for account `latest` freshness gate
        EthStateCheckpointProof]       # proof for `finalized` or `safe` checkpoints
    proof        : List [bytes32, 256] # the merkle proof from the executionPayload.state down to the blockBodyRoot hash
    header       : BeaconBlockHeader   # the header of the beacon block
    header_proof : Union [             # the proof for the correctness of the header
        EthSignatureBlockProof,        # proof by providing the signature of the sync committee
        EthHistoricBlockProof,         # proof for a historic block using the state_root of a current block
        EthHeadersBlockProof,          # proof block giving a chain of headers up to a verifiable header
        EthCheckpointProof]            # WSP anchor via LightClientBootstrap (currentSyncCommittee branch)
```

**Referenced Types**

* [EthCallBlockContext](#ethcallblockcontext)
* [EthStateCheckpointProof](#ethstatecheckpointproof)
* [BeaconBlockHeader](https://ethereum.github.io/consensus-specs/specs/phase0/beacon-chain/#beaconblockheader)
* [EthSignatureBlockProof](/specification-colibri-stateless/specifications/ethereum/header-proof.md#ethsignatureblockproof)
* [EthHistoricBlockProof](https://github.com/corpus-core/colibri-stateless-doc/tree/main/specification/specifications/ethereum/historic-block-proof.md#ethhistoricblockproof)
* [EthHeadersBlockProof](https://github.com/corpus-core/colibri-stateless-doc/tree/main/specification/specifications/ethereum/historic-block-proof.md#ethheadersblockproof)
* [EthCheckpointProof](/specification-colibri-stateless/specifications/ethereum/header-proof.md#ethcheckpointproof)

## 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](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_proof_types.h#L482).

```python
class EthStorageProof(Container):
    key   : Bytes32                 # the key to be proven
    proof : List [bytes_1024, 1024] # Patricia merkle proof
```

## EthAccountProof

The main proof data for an account.

The Type is defined in [src/chains/eth/ssz/verify\_proof\_types.h](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_proof_types.h#L490).

```python
class EthAccountProof(Container):
    accountProof : List [bytes_1024, 256]      # Patricia merkle proof
    address      : Address                     # the address of the account
    storageProof : List [EthStorageProof, 256] # the storage proofs of the selected
    state_proof  : EthStateProof               # the state proof of the account
```

**Referenced Types**

* [EthStorageProof](#ethstorageproof)
* [EthStateProof](#ethstateproof)

## 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](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_data_types.h#L235).

```python
class EthStorageProofData(Container):
    key   : Bytes32                # the key
    value : Bytes32                # the value
    proof : List [bytesList, 1024] # Patricia merkle proof (simplified)
```

## 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](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_data_types.h#L246).

```python
class EthProofData(Container):
    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 : List [bytesList, 256]           # Patricia Merkle proof for the account (from state root to account)
    storageProof : List [EthStorageProofData, 256] # the storage proofs for requested storage keys
```

**Referenced Types**

* [EthStorageProofData](#ethstorageproofdata)
