> 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/synccommittee-proof.md).

# SyncCommittee Proof

The Verifier always needs the pubkeys of the sync committee for a given period in order to verify the BLS signature of a Beacon BlockHeader.

If a verifier requests a proof from a remote prover, the verifier may use the c4-property of the RPC-Request to describe its state of the known periods or checkpoint. If the verifier only reports a checkpoint, a bootstrap is added proving the current\_sync\_committee for the given checkpoint. If the requested header has a higher period than the bootstrap or the latest known period, all required lightClientUpdates will be proved.

## if

[chains/eth/ssz/verify\_types.c](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_types.c#L194)

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\_ETH\_SYNCDATA\_UPDATE\_UNION

[chains/eth/ssz/verify\_types.c](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_types.c#L213)

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.

```c
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)

**Returns**

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

## \&C4\_REQUEST\_CONTAINER

[chains/eth/ssz/verify\_types.c](https://github.com/corpus-core/colibri-stateless/blob/dev/src/chains/eth/ssz/verify_types.c#L233)

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.

```c
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

## C4EthLcSyncdata

The main container type definition for C4Request, wrapping all request fields Union type for a single LightClient Update, which can be either Deneb or Electra format LC SyncData contains all the proofs needed to bootstrap and update to the current period.

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

```python
class C4EthLcSyncdata(Container):
    bootstrap : Union [                          # optional bootstrap data for the sync committee, which is only accepted by the verifier, if it matches the checkpoint set.
        None,                                    # 
        DenepLightClientBootstrap,               # Deneb-fork structured LightClient Bootstrap
        ElectraLightClientBootstrap,             # Electra-fork structured LightClient Bootstrap
        EthCheckpointProof]                      # slim WSP anchor (header + currentSyncCommitteeBranch + aggregate)
    update    : List [C4EthSyncdataUpdate, 1024] # optional update data for the sync committee
```

**Referenced Types**

* [DenepLightClientBootstrap](https://ethereum.github.io/consensus-specs/specs/altair/light-client/sync-protocol/#lightclientbootstrap)
* [EthCheckpointProof](/specification-colibri-stateless/specifications/ethereum/header-proof.md#ethcheckpointproof)
* C4EthSyncdataUpdate

## C4EthZkSyncdata

ZK SyncData contains the recursive zk proof of the sync committee update. Legacy SP1 v5 layout with a fixed 260-byte groth16 proof. Kept unchanged so the prover can keep serving `zk_proof.ssz` to released clients (< 2.0.0) during the SP1 v5 -> v6 dual-serve window. See `C4_ETH_ZK_SYNCDATA_V6` for the v6 variant.

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

```python
class C4EthZkSyncdata(Container):
    vk_hash    : Bytes32                       # the hash of the vk used to generate the proof
    proof      : ByteVector [260]              # the recursive zk proof of the sync committee update as groth16 proof
    header     : BeaconBlockHeader
    pubkeys    : Vector [blsPubky, 512]        # the pubkeys of the sync committee
    checkpoint : Union [                       # the proof from the checkpoint to 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)
    signatures : List [secp256k1Signature, 16] # the signatures for the checkpoint
```

**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/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)

## C4EthZkSyncdataV6

SP1 v6 ("Hypercube") variant of `ZKSyncData`. Structurally identical to the legacy `C4_ETH_ZK_SYNCDATA` except for the groth16 proof size: SP1 v6 emits a 356-byte proof (selector + exit\_code + vk\_root + proof\_nonce + A/B/C) instead of the v5 260-byte proof. The differing fixed-size `proof` field shifts every following field, so v5 and v6 cannot share one container definition -- they are distinct union variants selected by client version (see `c4_zk_syncdata_type`).

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

```python
class C4EthZkSyncdataV6(Container):
    vk_hash    : Bytes32                       # the hash of the vk used to generate the proof
    proof      : ByteVector [356]              # the recursive zk proof of the sync committee update as SP1 v6 groth16 proof
    header     : BeaconBlockHeader
    pubkeys    : Vector [blsPubky, 512]        # the pubkeys of the sync committee
    checkpoint : Union [                       # the proof from the checkpoint to 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)
    signatures : List [secp256k1Signature, 16] # the signatures for the checkpoint
```

**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/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)
