# Logs Proof

A **Logs Proof** verifies that specific log entries, returned by `eth_getLogs`, are correctly included within transaction receipts of a verified execution block.

1. **Transaction Root Calculation:** For each transaction producing a log entry, the **transaction payload** is used to compute its **SSZ hash tree root**.
2. **Execution Payload Proof:** An **SSZ Merkle proof** is constructed, linking the `transactions` field within the **ExecutionPayload** to the `blockBodyRoot`. The total proof depth for this structure is **29**.
3. **Consensus Reference:** The **BeaconBlockHeader** is included in the proof to provide the `slot` information. This identifies which sync committee is responsible for signing the corresponding block root.
4. **Sync Committee Signature:** The **BLS aggregate signature** of the **following block’s** sync committee is verified against the `SignData` that includes the block hash. The signing domain is derived from the fork version and the **Genesis Validator Root**. Successful verification confirms that the block—and therefore all contained receipts and logs—is part of the canonical chain.

Each log proof must reference its corresponding **receipt proof**, ensuring that every verified log entry is linked to a valid transaction and included in a verified execution block.

This Proof is used for the following RPC-Methods:

* [eth\_getLogs](https://www.alchemy.com/docs/node/ethereum/ethereum-api-endpoints/eth-get-logs) - currently everthing except the logIndex is verified
* [eth\_verifyLogs](https://www.alchemy.com/docs/node/ethereum/ethereum-api-endpoints/eth-verify-logs)
* [eth\_getLogs](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-logs) - currently everthing except the logIndex is verified
* [eth\_verifyLogs](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-verify-logs)

## EthLogsTx

Represents one single transaction receipt with the required transaction and receipt-proof. The proof contains the raw receipt as part of its last leaf.

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

```python
class EthLogsTx(Container):
    transaction      : Bytes[1073741824]      # the raw transaction payload
    transactionIndex : Uint32                 # the index of the transaction in the block
    proof            : List [bytes_1024, 256] # the Merkle Patricia Proof of the transaction receipt ending in the receipt root
```

## EthLogsBlock

A single Block with its proof containing all the receipts or txs required to proof for the logs.

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

```python
class EthLogsBlock(Container):
    blockNumber  : Uint64                # the number of the execution block containing the transaction
    blockHash    : Bytes32               # the blockHash of the execution block containing the transaction
    proof        : List [bytes32, 1024]  # the multi proof of the transaction, receipt_root,blockNumber and blockHash
    header       : BeaconBlockHeader     # the header of the beacon block
    header_proof : Union [               # the proof for the correctness of the header
        EthSignatureBlockProof,          # proof fby provding signature of the sync_committee
        EthHistoricBlockProof,           # proof for a historic block using the state_root of a current block.
        EthHeadersBlockProof]            # proof block giving headers up to a verifyable header.
    txs          : List [EthLogsTx, 256] # the transactions of the block
```

**Referenced Types**

* [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/blob/main/specification/specifications/ethereum/historic-block-proof.md#ethhistoricblockproof)
* [EthHeadersBlockProof](https://github.com/corpus-core/colibri-stateless-doc/blob/main/specification/specifications/ethereum/historic-block-proof.md#ethheadersblockproof)
* [EthLogsTx](#ethlogstx)

## EthReceiptDataLog

A log entry in the receipt.

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v1.1.26/src/chains/eth/ssz/verify_data_types.h#L133).

```python
class EthReceiptDataLog(Container):
    blockHash        : Bytes32           # the blockHash of the execution block containing the transaction
    blockNumber      : Uint64            # the number of the execution block containing the transaction
    transactionHash  : Bytes32           # the hash of the transaction
    transactionIndex : Uint32            # the index of the transaction in the block
    address          : Address           # the address of the log
    logIndex         : Uint32            # the index of the log in the transaction
    removed          : Boolean           # whether the log was removed
    topics           : List [bytes32, 8] # the topics of the log
    data             : Bytes[1073741824] # the data of the log
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/logs-proof.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
