Corpus Core Docs

Ethereum 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. 1 = ethereum
  • 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.

C4_ETH_SYNCDATA_UPDATE_UNION

chains/eth/ssz/verify_types.c

Returns the SSZ definition for a LightClient Update based on the fork ID. Maps fork identifiers to the corresponding update type in the union array.

const ssz_def_t* eth_get_light_client_update(fork_id_t fork) {
  switch (fork) {
    case C4_FORK_DENEB:
      return C4_ETH_SYNCDATA_UPDATE_UNION;

Parameters

  • fork : Fork identifier (C4_FORK_DENEB, C4_FORK_ELECTRA, C4_FORK_FULU, C4_FORK_GLOAS)

Returns

Pointer to the SSZ definition for the update type, or NULL for unsupported forks

&FULU_LIGHT_CLIENT_FINALITY_UPDATE_CONTAINER

chains/eth/ssz/verify_types.c

Returns the SSZ definition for a LightClient Bootstrap based on the fork ID. This is the single source of truth for mapping a fork to the correct bootstrap container, so callers do not have to keep local fork -> array-pointer switches in sync when new forks are added.

const ssz_def_t* eth_get_light_client_finality_update(fork_id_t fork) {
  switch (fork) {
    case C4_FORK_FULU:
      return &FULU_LIGHT_CLIENT_FINALITY_UPDATE_CONTAINER;

Parameters

  • fork : Fork identifier

Returns

Pointer to the SSZ container definition for the bootstrap variant, or NULL for unsupported forks

&C4_REQUEST_CONTAINER

chains/eth/ssz/verify_types.c

Returns the SSZ type definition for a given verification type enum. Maps eth_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.

const ssz_def_t* eth_ssz_verification_type(eth_ssz_type_t type) {
  switch (type) {
    case ETH_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

C4Request

the main container defining the incoming data processed by the verifier

The Type is defined in src/chains/eth/ssz/verify_types.c.

class C4Request(Container):
    version   : ByteVector [4]        # the [domain, major, minor, patch] version of the request, domain=1 = eth
    data      : Union [               # the data to proof
        None,                         # 
        Bytes32,                      # the blockhash  which is used for blockhash proof
        ProgBytes,                    # the bytes of the data
        Uint256,                      # the balance of an account
        EthTxData,                    # the transaction data
        EthReceiptData,               # the transaction receipt
        ProgList [EthReceiptDataLog], # 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
        ProgList [EthReceiptData]]    # all receipts of a block
    proof     : Union [               # the proof of the data
        None,                         # 
        EthAccountProof,              # 1: Account (eth_getBalance, eth_getStorageAt, ...)
        EthTransactionProof,          # 2: Transaction (eth_getTransactionByHash, ...)
        EthReceiptProof,              # 3: TransactionReceipt
        ProgList [EthLogsBlock],      # 4: Logs inclusion (eth_getLogs / eth_verifyLogs)
        EthLogsCompletenessProof,     # 5: Logs completeness over a contiguous block range
        EthCallProof,                 # 6: Call (eth_call)
        EthBlockProof,                # 7: BlockData (body union: NONE = header-only proof)
        EthBlockReceiptsProof,        # 8: All receipts of a block
        EthSyncProof]                 # 9: Sync-committee transition input for zk
    sync_data : Union [               # the sync data containing proofs for the transition between the two periods
        None,                         # 
        EthLcSyncdata,                # Light Client Sync Data
        EthZkSyncdata,                # ZK Proof Sync Data (356-byte Groth16)
        ArbSignerSyncdata]            # Arbitrum batch poster, proven on L1

Referenced Types

ArbSignerSyncdata

Proves that signer is a batch poster. account is the L1 account proof. sync_data is the L1 prover's own sync update (none, light client, or ZK).

The Type is defined in src/chains/eth/ssz/verify_types.c.

class ArbSignerSyncdata(Container):
    signer    : Address
    account   : EthAccountProof
    sync_data : Union [ 
        None,              # 
        EthLcSyncdata,     # Light Client Sync Data
        EthZkSyncdata,     # ZK Proof Sync Data (356-byte Groth16)
        ArbSignerSyncdata] # Arbitrum batch poster, proven on L1

Referenced Types