# 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 it's state of the knpown 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 header requested has a higher period that the bootstrap or the latest period, all required lightClientUpdates will be proved.

## if

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

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/v1.1.26/src/chains/eth/ssz/verify_types.c#L191)

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/v1.1.26/src/chains/eth/ssz/verify_types.c#L211)

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/v1.1.26/src/chains/eth/ssz/verify_types.c#L146).

```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,               # Denep Fork Structureed LightClient Bootstrap
        ElectraLightClientBootstrap]             # Electra Fork Structureed LightClient Bootstrap
    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)
* C4EthSyncdataUpdate

## C4EthZkSyncdata

ZK SyncData contains the recursive zk proof of the sync committee update

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

```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 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.
    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/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)


---

# 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/synccommittee-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.
