ToolszkEVMArchitectureUnified LxLy

Sequencing and verification flows

This section entails the flows for sequencing and verification of proofs. ### Sequencing flow The sequencing flow starts with the sequencer invoking the $ extt

This section entails the flows for sequencing and verification of proofs.

Sequencing flow

The sequencing flow starts with the sequencer invoking the sequenceBatches()\texttt{sequenceBatches()} function, which is within the consensus contract, to send batches that are to be sequenced.

Since state information must be stored within the RollupManager\texttt{RollupManager} contract, a callback function called onSequenceBatches()\texttt{onSequenceBatches()} is triggered to store this data in the corresponding RollupData\texttt{RollupData} struct.

The figure below depicts a simplified sequencing flow within the rollup manager component:

  • It starts when the sequencer calls the sequenceBatches()\texttt{sequenceBatches()} function,
  • Which in turn invokes a callback function onSequenceBatches()\texttt{onSequenceBatches()},
  • Followed by the rollup manager storing the sequence data in the RollupData\texttt{RollupData} struct.

ulxly-sequencer-consensus-rollupmanager

Verification flow

Recall that the aggregator is responsible for constructing proofs that validate correct processing of batches.

Once a proof is constructed, the Aggregator transmits it to the RollupManager\texttt{RollupManager} for verification, by invoking the verifyBatches()\texttt{verifyBatches()} function.

The RollupManager\texttt{RollupManager} calls the verifyProof()\texttt{verifyProof()} function in the verifier contract, which either validates the proof or reverts if the proof is invalid.

If verification of the proof is successful, a callback function onVerifyBatches()\texttt{onVerifyBatches()} in the consensus contract is called.

The onVerifyBatches()\texttt{onVerifyBatches()} function emits the VerifyBatches\texttt{VerifyBatches} event, containing important details of the processed batches, such as the last verified batch.

The figure below depicts the verification flow within the rollup manager component:

  • It starts when the aggregator calls verifyBatches()\texttt{verifyBatches()} function.
  • Then the rollup manager invokes the verifyProof()\texttt{verifyProof()} function, which involves a secondary stateless Verifier\texttt{Verifier} contract.
  • Successful verification of a proof is followed by a call to the onVerifyBatches()\texttt{onVerifyBatches()} function.
  • At the end of the process, the consensus contract emits the verifyBatches\texttt{verifyBatches} event.

ulxly-consensus-rollupmanager-aggregator

Edit on GitHub

Last updated on