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 = ethereum1 :
major
. the major version of the proofer.2 :
minor
. the minor version of the proofer.3 :
patch
. the patch version of the proofer.
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 hold 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.
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, domaon=1 = eth
data : Union [ # the data to proof
None, #
Bytes32, # the blochash 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
proof : Union [ # the proof of the data
None, #
EthAccountProof, # a Proof of an Account like eth_getBalance or eth_getStorageAt
EthTransactionProof, # a Proof of a Transaction like eth_getTransactionByHash
EthReceiptProof, # a Proof of a TransactionReceipt
List [EthLogsBlock, 256], # a Proof for multiple Receipts and txs
EthCallProof, # a Proof of a Call like eth_call
EthSyncProof, # Proof as input data for the sync committee transition used by zk
EthBlockProof, # Proof for BlockData
EthBlockNumberProof, # Proof for BlockNumber
C4WitnessSigned] # Proof for Witness
sync_data : Union [ # the sync data containing proofs for the transition between the two periods
None, #
List [DenepLightClientUpdate, 512], # this light client update can be fetched directly from the beacon chain API
List [ElectraLightClientUpdate, 512]] # this light client update can be fetched directly from the beacon chain API
Referenced Types
C4WitnessSigned
Last updated