# Account Proof

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

1. **Patricia Merkle Proof** for the Account Object in the execution layer (balance, nonce, codeHash, storageHash) and the storage values with its own Proofs. (using eth\_getProof): Result StateRoot
2. **State Proof** is a SSZ Merkle Proof from the StateRoot to the ExecutionPayload over the BeaconBlockBody to its root hash which is part of the header.
3. **BeaconBlockHeader** is passed because also need the slot in order to find out which period and which sync committee is used.
4. **Signature of the SyncCommittee** (taken from the following block) is used to verify the SignData where the blockhash is part of the message and the Domain is calculated from the fork and the Genesis Validator Root.

![](https://1306347641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhWyjkndFSkqQ8UEoWFD1%2Fuploads%2Fgit-blob-9642c11a1e71871115dab5b18cf168174a879ffe%2Fmermaid_aed51d89.png?alt=media)

This Proof is used for the following RPC-Methods:

* [eth\_getProof](https://docs.alchemy.com/reference/eth-getproof)
* [eth\_getBalance](https://docs.alchemy.com/reference/eth-getbalance)
* [eth\_getCode](https://docs.alchemy.com/reference/eth-getcode)
* [eth\_getTransactionCount](https://docs.alchemy.com/reference/eth-gettransactioncount)
* [eth\_getStorageAt](https://docs.alchemy.com/reference/eth-getstorageat)

## 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#L261).

```python
class EthStateProof(Container):
    block                    : Union [             # the block to be proven
        None,                                      # no block-proof for latest
        Bytes32,                                   # proof for the right blockhash
        Uint64]                                    # proof for the right blocknumber
    proof                    : List [bytes32, 256] # the merkle prooof from the executionPayload.state down to the blockBodyRoot hash
    header                   : BeaconBlockHeader   # the header of the beacon block
    historic_proof           : Union [             # optional historic proof. If non null, the block is verified by this proof and the signature confirm the future block.
        None,                                      # no block-proof for latest
        EthHistoricBlockProof,                     # proof for a historic block using the state_root
        EthHeadersBlockProof]                      # proof block giving headers
    sync_committee_bits      : BitVector [512]     # the bits of the validators that signed the block
    sync_committee_signature : ByteVector [96]     # the signature of the sync committee
```

**Referenced Types**

* [BeaconBlockHeader](https://ethereum.github.io/consensus-specs/specs/phase0/beacon-chain/#beaconblockheader)
* [EthHistoricBlockProof](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/historic-block-proof#ethhistoricblockproof)
* [EthHeadersBlockProof](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/historic-block-proof#ethheadersblockproof)

## 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#L272).

```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#L280).

```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#L156).

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

## EthProofData

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#L164).

```python
class EthProofData(Container):
    balance      : Uint256
    codeHash     : Bytes32
    nonce        : Uint256
    storageHash  : Bytes32
    accountProof : List [bytes_1024, 256]          # Patricia merkle proof
    storageProof : List [EthStorageProofData, 256] # the storage proofs of the selected
```

**Referenced Types**

* [EthStorageProofData](#ethstorageproofdata)
