> 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/op-stack/main-proof-request.md).

# Main Proof Request

The proofs are always wrapped into a ssz-container with the name `C4Request`. This Container holds the a version (4 bytes) and unions for different proof types.

The 4 `Version` Bytes are encoded as `dom, major, minor, patch`.

* 0 : `domain` . describe which chain-type is used. 6 = OP-Stack
* 1 : `major` . the major version of the prover.
* 2 : `minor` . the minor version of the prover.
* 3 : `patch` . the patch version of the prover.

The `data` union can hold different types which represents the final data to be verified.

The `proof` union can hold different types which represents the proof of the data.

The `sync_data` union holds optional data used to update the sync\_committee. Most of the time this is empty since syncing the pubkey only is used whenever it is needed. But the structure allows to include those sync\_proofs enabling a fully stateless proof. Note: OP-Stack uses the same sync\_data structure as Ethereum since it shares the consensus layer.

## if

[chains/op/ssz/op\_types.c](https://github.com/corpus-core/colibri-stateless/blob/v2.0.4/src/chains/op/ssz/op_types.c#L88)

Finds the index of a target definition within an array of SSZ definitions. Searches for a container type whose elements pointer matches the target.

```c
static inline size_t array_idx(const ssz_def_t* array, size_t len, const ssz_def_t* target) {
  for (size_t i = 0; i < len; i++) {
    if (array[i].type >= SSZ_TYPE_CONTAINER && array[i].def.container.elements == target) return i;
```

**Parameters**

* **`array`** : Array of SSZ definitions to search
* **`len`** : Length of the array
* **`target`** : Target definition to find (compares elements pointer)

**Returns**

Index of the matching definition, or 0 if not found

## \&C4\_REQUEST\_CONTAINER

[chains/op/ssz/op\_types.c](https://github.com/corpus-core/colibri-stateless/blob/v2.0.4/src/chains/op/ssz/op_types.c#L108)

Returns the SSZ type definition for a given OP-Stack verification type enum. Maps op\_ssz\_type\_t enum values to their corresponding SSZ definition pointers. Used to retrieve the correct type definition for parsing and validating SSZ-encoded proof data.

```c
const ssz_def_t* op_ssz_verification_type(op_ssz_type_t type) {
  switch (type) {
    case OP_SSZ_VERIFY_REQUEST:
      return &C4_REQUEST_CONTAINER;
```

**Parameters**

* **`type`** : The verification type enum value

**Returns**

Pointer to the corresponding SSZ definition, or NULL for invalid types

## C4OpRequest

a Proof for multiple accounts the main container defining the incoming data processed by the verifier

The Type is defined in [src/chains/op/ssz/op\_types.c](https://github.com/corpus-core/colibri-stateless/blob/v2.0.4/src/chains/op/ssz/op_types.c#L68).

```python
class C4OpRequest(Container):
    version   : ByteVector [4]          # the [domain, major, minor, patch] version of the request, domain=6 = OP-Stack
    data      : Union [                 # the data to prove (OP-Stack reuses Ethereum's data union for compatibility)
        None,                           # 
        Bytes32,                        # the blockhash  which is used for blockhash proof
        Bytes[1073741824],              # the bytes of the data
        Uint256,                        # the balance of an account
        EthTxData,                      # the transaction data
        EthReceiptData,                 # the transaction receipt
        List [EthReceiptDataLog, 1024], # result of eth_getLogs
        EthBlockData,                   # the block data
        EthProofData,                   # the result of an eth_getProof
        EthSimulationResult,            # the result of an colibri_simulateTransaction
        EthBlockHeaderData,             # compact block header data
        List [EthReceiptData, 2048]]    # all receipts of a block
    proof     : Union [                 # the proof of the data (OP-Stack specific proof types)
        None,                           # 
        OpAccountProof,                 # a Proof of an Account like eth_getBalance or eth_getStorageAt
        OpTransactionProof,             # a Proof of a Transaction like eth_getTransactionByHash
        OpReceiptProof,                 # a Proof of a TransactionReceipt
        List [OpLogsBlock, 256],        # a Proof for multiple Receipts and txs
        OpCallProof,                    # a Proof of a Call like eth_call
        OpBlockProof]                   # Proof for BlockData
    sync_data : Union [                 # the sync data containing proofs for the transition between the two periods (OP-Stack reuses Ethereum's sync_data union)
        None,                           # 
        C4EthLcSyncdata,                # Light Client Sync Data
        C4EthZkSyncdata,                # ZK Proof Sync Data (legacy SP1 v5, 260-byte groth16 proof)
        C4EthZkSyncdataV6]              # ZK Proof Sync Data (SP1 v6 "Hypercube", 356-byte groth16 proof)
```

**Referenced Types**

* [EthTxData](/specification-colibri-stateless/specifications/ethereum/transaction-proof.md#ethtxdata)
* [EthReceiptData](/specification-colibri-stateless/specifications/ethereum/receipt-proof.md#ethreceiptdata)
* [EthReceiptDataLog](/specification-colibri-stateless/specifications/ethereum/logs-proof.md#ethreceiptdatalog)
* [EthBlockData](/specification-colibri-stateless/specifications/ethereum/block-proof.md#ethblockdata)
* [EthProofData](/specification-colibri-stateless/specifications/ethereum/account-proof.md#ethproofdata)
* [EthSimulationResult](/specification-colibri-stateless/specifications/ethereum/colibri-rpc-methods/colibri_simulatetransaction.md#ethsimulationresult)
* [EthBlockHeaderData](/specification-colibri-stateless/specifications/ethereum/block-proof.md#ethblockheaderdata)
* [OpAccountProof](/specification-colibri-stateless/specifications/op-stack/account-proof.md#opaccountproof)
* [OpTransactionProof](/specification-colibri-stateless/specifications/op-stack/transaction-proof.md#optransactionproof)
* [OpReceiptProof](/specification-colibri-stateless/specifications/op-stack/receipt-proof.md#opreceiptproof)
* [OpLogsBlock](/specification-colibri-stateless/specifications/op-stack/logs-proof.md#oplogsblock)
* [OpCallProof](/specification-colibri-stateless/specifications/op-stack/call-proof.md#opcallproof)
* [OpBlockProof](/specification-colibri-stateless/specifications/op-stack/block-proof.md#opblockproof)
* [C4EthLcSyncdata](https://github.com/corpus-core/colibri-stateless-doc/tree/main/specification/specifications/ethereum/synccommittee.md#c4ethlcsyncdata)
* [C4EthZkSyncdata](/specification-colibri-stateless/specifications/ethereum/synccommittee-proof.md#c4ethzksyncdata)
* [C4EthZkSyncdataV6](/specification-colibri-stateless/specifications/ethereum/synccommittee-proof.md#c4ethzksyncdatav6)
