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

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

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

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.

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.

Referenced Types

Last updated