This document aims to explain how the X Layer protocol manages the layer 2 rollup’s states while providing state transition verifiability and security.
The trusted sequencer generates batches for quick layer 2 transaction finality. Instead of waiting for the next layer 1 block, these batches are shared with layer 2 nodes through a broadcast channel. Each node processes the batches locally to compute the layer 2 state. After the trusted sequencer commits batch sequences from layer 1, layer 2 nodes independently re-execute them, eliminating the need for complete trust. Off-chain batch execution is later verified on-chain using zero-knowledge proofs, and the resulting layer 2 state root is committed. With ZKEVM advancements, layer 2 nodes sync new layer 2 state roots directly from layer 1.
In the diagram above, layer 2 nodes receive batch data through three methods:
ZkEVM.sol
contractWorth noting, these three batch data formats arrive in the order mentioned above.