zkEVM Workflow
Happy weekend, everyone! Today, we're going to briefly dive into the workflow of a zkEVM. This content was originally posted as a thread.
Now, let's get to it!
Modular everything; because that's the now, not the future. From the image below, we are the users, and the Rollup Operator is the zkR. In today's context, the base layer is L1-ETH.
Unlike ETH L1, which relies on the re-execution of smart contracts, zkEVM relies on the validity proof of zkEVM circuits. The zkEVM is divided into three parts: the execution environment, proving circuit, and verifier contract.
The zkEVM’s execution environment functions like the EVM. It's where programs (smart contracts) are run. It takes the initial state (the state of the system before any transactions have been executed) and the current transaction to output a final state (referring to the state of the blockchain after all pending transactions have been processed and verified).
The proving circuit produces ZKPs that verify the validity of transactions computed in the execution environment. It takes the states mentioned above as inputs, and then the prover generates a succinct proof of validity to show that states are updated correctly.
The verifier contract is an L1 contract found on ETH. It receives the proof and transaction information, confirms transaction validity, and updates the states without re-executing the transactions.
Conclusion
The zkEVM approach can significantly reduce the gas cost and improve the transaction speed compared to re-executing contracts on the Ethereum Layer 1. By relying on the validity proof of zkEVM circuits, Layer 2 transactions can be processed off-chain. The state can be updated without re-executing the transactions, making it a promising solution for improving the scalability of the Ethereum network.