
- The Users, who connect to the zkEVM network by means of an RPC node (e.g., MetaMask), submit their transactions to a database called Pool DB.
- The Pool DB is the storage for transactions submitted by Users. These are kept in the pool waiting to be put in a batch by the Sequencer.
- The Sequencer is a node responsible for fetching transactions from Pool DB, checking if the transactions are valid, then putting valid ones into a batch. The sequencer submits all batches to the L1 and then sequences the batches. By doing so, the sequenced batches should be included in the L1 State.
- The Synchronizer is the component that updates the State DB by fetching data from Ethereum through Etherman.
- The Etherman is a low-level component that implements methods for all interactions with the L1 network and smart contracts.
- The State DB is a database for permanently storing state data (but not the Merkle trees).
- The Aggregator is another node whose role is to produce proofs attesting to the integrity of the Sequencer’s proposed state change. These proofs are zero-knowledge proofs (or ZK-proofs) and the Aggregator employs a cryptographic component called the Prover for this purpose.
- The Prover is a complex cryptographic tool capable of producing ZK-proofs of hundreds of batches, and aggregating these into a single ZK-proof which is published as the validity proof.
zkNode roles
The zkNode software is designed to support execution of multiple roles. Each role requires different services to work. Although most of the services can run in different instances, the JSON RPC can run in many instances (all the other services must have a single instance).RPC endpoints
Any user can participate in this role, as an RPC node. Required services and components:- JSON RPC: can run on a separated instance, and can have multiple instances.
- Synchronizer: single instance that can run on a separate instance.
- Executor & Merkletree: service that can run on a separate instance.
- State DB: Postgres SQL that can run on a separate instance.
Trusted sequencer
This role can only be performed by a single entity. This is enforced in the smart contract, as the related methods of the trusted sequencer can only be performed by the owner of a particular private key. Required services and components:- JSON RPC: can run on a separated instance, and can have multiple instances.
- Sequencer & synchronizer: single instance that needs to run them together.
- Executor & Merkletree: service that can run on a separate instance.
- Pool DB: Postgres SQL that can run on a separate instance.
- State DB: Postgres SQL that can run on a separate instance.
Aggregator
This role can be performed by anyone. Required services and components:- Synchronizer: single instance that can run on a separate instance.
- Executor & Merkletree: service that can run on a separate instance.
- State DB: Postgres SQL that can be run on a separate instance.
- Aggregator: single instance that can run on a separate instance.
- Prover: single instance that can run on a separate instance.
- Executor: single instance that can run on a separate instance.