Section 1: ZkNode Overview
Last updated
Last updated
zkNode is the software required to run any zkEVM node. It has the following two roles:
Acts as a node to understand the network status.
As a participant in the batch production process, play one of two roles: sequencer or aggregator.
The zkNode architecture is modular in nature. To understand zknode, you can look at the complete process of a transaction; that is, from the time the user submits the transaction to the zkEVM network until the transaction is finalized and included in the L1 state; This is achieved by leveraging multiple actors. Below is a list of relevant components;
RPC node, connected to the zkEVM network via RPC, users submit their transactions to a database named Pool DB.
Pool DB is the storage of transactions submitted by users. They are held in a pool, waiting for the sorter to put them into the batch.
Sequencer, the sequencer, is responsible for getting transactions from Pool DB, checking whether the transactions are valid, and then putting valid transactions into the batch. The sorter submits all batches to L1 and then sorts the batches. By doing this, the sorted batch should be included in the L1 state.
Synchronizer, a component that obtains data from Ethereum through Etherman to update the state database.
Etherman, is a low-level component that implements methods for all interactions with the L1 network and smart contracts.
State DB, is a database used to permanently store state data (but not Merkle trees).
Aggregator, an aggregator is another node whose role is to generate proofs proving the integrity of the state changes proposed by the sequencer. These proofs are zero-knowledge proofs (or ZK proofs), and aggregators employ cryptographic components called provers for this purpose.
Prover, is a sophisticated cryptographic tool capable of generating hundreds of batches of ZK proofs and aggregating them into a single ZK proof, published as a proof of validity.
Among them, RPC, Sequencer, Synchronize, Aggregator, Etherman, etc. are the core components of zknode.