Requirements: Op Integration Requirements
|
Contents |
This document focuses on functions for each component.
generateAttestation: Generate an attestation proving that the batcher is
running in a TEE that can be trusted.
initializeBatcherState: Initialize the batcher’s state based on finalized data
from Espresso and L1.
submitToEspresso: Submit transactions with the batcher signature to
Espresso for fast confirmation, and handle errors during submission.
computeBlobHashes: Compute the hashes for finalized transaction blobs
within a batch.
signBlobHashes: Sign the computed blob hashes using the batcher’s attested
private key.
submitToL1: Submit finalized and validated batches to L1.
register: verify a TEE attestation on an ephemeral key and add it to the
set of allowed keys
authenticate: verify an ephemeral key signature on a batch commitment
and record the commitment as an acceptable batch to post
isValidBatchInfo: check if a batch is acceptable to post
constructor(address teeBatcher, address nonTeeBatcher, address batchAuthenticator):
initializes the batch inbox contract with the two batchers addresses and set
one of the two as active. Also sets the addresss of the batch authenticator
contract.
fallback(): accept batches, reverting if they are not authenticated with
the Batch Authentication Contract in the case of a TEE batcher or the
batcher is not active.
switch(): set the current active batcher as inactive and the other batcher
as active.
fetchFinalizedBatches: Retrieve finalized batches from Espresso using the
HotShot query service.
validateBatchConsistency: Validate batch consistency using Merkle proofs
and sequence numbers.
reprocessForReorg: Handle L1 reorgs by re-fetching and re-processing
affected transactions.
deriveState: Reconstruct the state according to the processed batches.