zkProver

Attest to the validity of off-chain state transitions using ZKPs

zkProver is responsible for generating zero-knowledge proofs (ZKPs) that attest to the validity of off-chain state transitions performed by the network, through complex polynomial computations. That is, each valid batch must satisfies certain polynomial constraints. Once the zkProver generates a valid proof, it sends the proof to the Aggregator, which collects the data from the Sequencer and sends it to the smart contract for validation. The use of ZKPs ensures that the state transitions are valid without revealing the specific details of the transaction or the state changes to anyone other than the participants involved in the transaction.

The zkProver is made up of a Main State Machine Executor, a group of secondary State Machines (each with its own executor), a STARK-proof builder, and a SNARK-proof builder. The detailed architecture of zkProver is outlined in Figure 3 below.

Figure 3. A Simplified zkProver Structure

Main State Machine Executor

The Main State Machine Executor (MSME) is one of the key components of the zkNode architecture. It is designed to be modular and pluggable, which enables for flexibility in the types of applications that can be built on top of the zkEVM.

MSME is responsible for executing state transitions, including interpret EVM Bytecodes and establish the polynomial constraints for every valid batches. In addition, it also plays a role in generating ZKPs. It does this by providing input data to the proof builders, which then use this data to generate proofs that attest to the correctness of the state transitions.

Secondary State Machines

Secondary State Machines (SSM) are a collection of sub-state machines that specialize in particular functions, such as contract code execution, storage access, and others.

Each SSM has its own executor that handles its specific functionality, and all of them are coordinated by the MSME. These SSMs are designed to operate within the zero-knowledge framework of zkEVM, ensuring the confidentiality and integrity of the data they handle.

STARK Proof Builder

STARK, which stands for "Scalable Transparent Argument of Knowledge", is a proof system that allows for the creation of verifiable proofs without a trusted setup.

In zkEVM, state machines generate polynomial constraints, and zk-STARK proofs will attest to the fact that all the constraints are satisfied by a given batch of transactions. The STARK Proof Builder is responsible for producing these proofs, which are used to validate the transactions and ensure the integrity of the system.

The zkProver uses a technique called "Fast Reed-Solomon Interactive Oracle Proofs of Proximity (RS-IOPP)," also known as FRI, to facilitate fast zk-STARK proving. This allows for efficient and secure processing of large amounts of transaction data in a timely manner.

SNARK Proof Builder

SNARK, or Succinct Non-interactive Argument of Knowledge, is a type of proof system that deployed in zkEVM to produces verifiable proofs. SNARK is utilized to prove the correctness of STARK proofs, as STARK proofs tend to be larger in size. These SNARK proofs are then published as validity proofs, as they are cheaper to verify on Layer 1.

A SNARK Proof Builder, also known as a SNARK circuit builder, is a subcomponent of the zkProver that is responsible for constructing the circuit that generates or verifies a SNARK proof. The circuit is designed to satisfy the polynomial constraints generated by the state machines and can be used to prove that a particular computation was carried out correctly without revealing the details of the computation itself.

To generate or verify SNARK proofs, a CIRCOM circuit is created. Either The PLONK or GROTH16 SNARK proofs will be used.

Last updated