top of page

Exploring Blockchain Scalability: ZK-Rollups, ZK-EVMs, and ZK-Hardware Acceleration



Table of Contents


Introduction


Blockchain networks keep a decentralized ledger of transactions, verified and recorded by a network of nodes, ensuring the system's security and transparency. As the network grows in size, the demand for computational resources to handle the increasing number of nodes and transactions also rises. This is because each transaction needs to be processed and verified, which requires a significant amount of computing power. Inefficient network performance, high transaction fees, and slower transaction times are some of the consequences that may arise.


The scalability problem makes it difficult for the subsequent billion users to adopt Web 3. There has been a great deal of research and development into how to solve this problem, and one of the most widely accepted approaches to scaling blockchains is to use rollups.


Rollups are a layer-2 scaling solution where we move the computation of transactions to some off-chain network and store back a small amount of data that is succinct enough to prove the validity of off-chain computation. This way, we reduce computation and the stored data on-chain.


Exploring Zero-Knowledge Proofs


Zero-Knowledge proofs are cryptographic protocols that enable one party to prove a statement's truth to another party without revealing any additional information beyond its validity. This privacy-preserving property is crucial for ensuring security in various applications, including blockchain and cryptocurrency.


Polynomial Computation Proof Concept:


Polynomial Computation Proofs are a type of Zero-Knowledge proof used to demonstrate the validity of computations. They involve constructing polynomials that represent specific computations. By revealing only evaluations of these polynomials at certain points, the prover can prove correctness while keeping the actual computation private. This technique is applied in ZK-Rollups to create succinct data commitments for off-chain computations, enhancing blockchain scalability and efficiency.


ZK-Rollups: Scalability with Security and Privacy


ZK-rollups are a type of scaling solution that uses zero-knowledge proofs to achieve scalability while maintaining security and privacy. The transaction data is stored off-chain and only the compressed data is submitted to the main chain, giving it several advantages over other scaling solutions. For example, they offer high scalability while maintaining the same level of security as the underlying blockchain. ZK-rollups also provide privacy, as the transaction data is kept off-chain and not publicly available on the blockchain.


This greatly reduces the load on the main blockchain since you don't have to spend resources on complex computation as well as on storing hefty amounts of data. Instead, ZK-rollups complete the computation off-chain while maintaining a compressed data format that gets posted on the main blockchain in batches to prove the validity of transactions being executed.


How does ZK-rollup work?


The execution process can be broken down into two parts - first part is performed off-chain where all the computation occurs, and the second part is posting data on the blockchain, confirming the validity of transactions being executed whilst providing the security that blockchain provides. Let’s break down each process in detail to understand the overall execution.


Off-chain


When the user initiates the transaction on the rollup, there are a few ways the transaction is handled. If the rollup chooses to utilize a centralized entity known as a "sequencer" (a decision that can be made at its inception), the transaction is processed by the sequencer. The outcomes are then aggregated into a batch, which is subsequently published to the main chain. This method requires trust to be placed in a single entity, the sequencer, and is more attack prone. One other mechanism that can be adopted is similar to how POS works in Ethereum, where “validators” or “provers” are introduced with staking. Validators stake rollups primary token in order to participate in producing new batches, for which they are rewarded, on a successful production and can be kicked out of the network, or their staked token can be slashed when or if they produce an invalid batch.


Off-chain to on-chain


Rollups maintain a smart contract on-chain where they publish all the state changes, the data for which is published as calldata. Calldata is an effective way of passing data to Ethereum. The rollup operator can call the required function in the rollup contract and pass the compressed data as a function argument. This helps reduce costs for users since a large part of rollup fees goes towards storing transaction data on-chain.


On-chain


The ZK-rollup protocol has smart contracts deployed on Ethereum; these contracts store rollup blocks, track deposits, monitor state updates, and verify zero knowledge proofs submitted by validators. This allows rollups to extend the security feature from the main blockchain.


Data availability


On the protocols’ end, a rollup state is maintained, which is updated every time a new batch of transactions is executed on layer-2. A data availability layer handles the data of the batches while also compressing the data to be uploaded on layer-1. Once the new batch is uploaded to layer-1, rollup state is updated, and since we are doing zero-knowledge rollup, the crypto mechanism itself proves the validity of the off-chain computation, so there is no need to re-evaluate the updates sent from layer-2. But in case a company or business wants to verify off-chain transactions, they can do so by checking the state data posted on Layer 1. Storing data on-chain is important because it allows permissionless, independent verification of the L2 chain's state. On-chain data is also required for users to interact with the rollup, in case they want to check their account balance or initiate a transaction.


Figure 1: Zk-rollups bundle transactions into batches, Chainlink


Now that we know how a rollup works. Let us try to understand some of the important mechanisms involved in making a zk-rollup function.


Walkthrough of ZKP (Zero-Knowledge Proofs)


Zero-knowledge proofs are a cryptographic technique to prove the validity of a statement without actually revealing any information about the statement itself. For example, a prover wants to prove that they know the solution to a mathematical problem without revealing the solution itself.


This has huge implications for blockchain technology. For example, let's say we want to hide some sensitive information about the transaction or the contract itself while still acknowledging that the transaction or the contract has gone through. We can use zero-knowledge proof for that. This enables the blockchain network to achieve greater privacy, as well as higher security and efficiency.


Two of the most used ZK technologies on the market today are zk-SNARK and zk-STARK. Both are acronyms for the methods they execute, zk-SNARK stands for zero-knowledge succinct non-interactive argument of knowledge, and zk-STARK stands for zero-knowledge scalable transparent argument of knowledge. Both have their own benefits and drawbacks, SNARKs have smaller proof sizes than STARKs, which means verifying SNARKs takes lesser time and lesser gas fees than STARKs. STARKs, on the other hand, do not require a trusted setup, thus offering enhanced security; STARKs are also known to be post-quantum secure.


Merkle Trees: Building Blocks of Security

Figure 2: Merkle Trees, Ethereum Whitepaper


A Merkle tree is a mathematical data structure composed of hashes of the underlying data (transactions in a block). The root of the Merkle tree (the top node) acts as a summary provider for all the data a Merkle tree holds. It can be used for general verification purposes. In the figure shown above, root is calculated from all the hashes present in the tree. Now let's say a malicious actor introduces any invalid transaction into the system; this will change the hash of the particular node, which in turn will change our root hash. A change in the root hash alerts us that some invalid transactions have taken place. This property makes it a fundamental part of the blockchain technology, allowing for efficient and secure verification of the content in a large body of data.


State Commitments in ZK-Rollups


In ZK-rollup the state maintained, which includes L2 accounts and balances, is represented as a Merkle tree. The on-chain contract stores the cryptographic hash of the Merkle tree’s root, keeping track of changes in the state of the ZK-rollup. The rollup transitions to a new state after the next batch of transactions arrives. The validator who executed the transactions is responsible for generating the new Merkle root and submitting it to the on-chain contract, where it gets verified. After verification, the new root is considered to be the ZK-rollup’s canonical state root.


Introducing Zero-Knowledge EVM (zkEVM)


ZK-rollups are not readily compatible with the Ethereum Virtual Machine (EVM), which makes them hard for developers to use. As discussed above, we need to generate ZKP for the validation of an off-chain transaction. For generating zero-knowledge proofs, one needs to generate a form of algebraic circuit, which is a necessary condition in zero-knowledge technology. Making general-purpose EVM computing circuits is more difficult and resource intensive than proving simple computations.


Advances in zero-knowledge technology plan to solve this issue by making a zero-knowledge EVM (zkEVM), which can verify the correctness of program execution. A zkEVM allows the execution of complex smart contracts while generating zero-knowledge proofs for them, making the process developer friendly and compatible with the Ethereum Virtual Machine.


Implementations of the zkEVMs on the market.

Figure 3: Implementations of the zkEVMs on the market, BingX


zkSync: zkSync is a layer-2 scaling solution for Ethereum that focuses on scalability and efficient transaction processing. It utilizes zkSNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) to enable off-chain transaction execution and aggregation. By leveraging optimistic transfers, zkSync significantly increases transaction throughput, allowing for fast and cost-effective transfers while maintaining security through Ethereum's main chain.


StarkNet: StarkNet is a layer-2 scaling protocol that uses STARKs (Scalable Transparent ARguments of Knowledge) for secure and private computation on Ethereum. Its focus extends beyond scalability to enable complex smart contract execution, particularly in decentralized finance (DeFi) applications. The use of STARKs allows for off-chain computation and sharding, resulting in high throughput and low fees without compromising Ethereum's security.


Polygon Hermez: Polygon Hermez introduces the Hermez zkEVM, which targets scalability and privacy for Ethereum. Built on zkSNARKs, the Hermez zkEVM allows for faster transaction processing by verifying transactions off-chain and bundling them into a single on-chain transaction. Additionally, it enhances privacy by enabling confidential transactions, appealing to a broad range of use cases including those that require privacy and efficiency.


Scroll: Scroll is a decentralized protocol that adopts zk-rollups to address Ethereum's scalability challenges. By aggregating transactions off-chain and submitting concise proofs to the main chain, Scroll reduces congestion and transaction costs. Notably, Scroll maintains EVM compatibility, making it effortless for developers to migrate existing applications while benefiting from enhanced scalability and performance.


ZK-Hardware Acceleration: Speeding Up Zero-Knowledge Proofs


Whilst zk-EVMs do the job they were supposed to do, when it comes to matching the current standards for transactions per second (TPS) executed in the web2 market, we are nowhere close to meeting them, which hinders the adoption of web3 technologies. ZKPs are slow and will require hardware acceleration to speed up the process.


This is where hardware acceleration with zero knowledge comes in. These are specialized hardware components designed to perform the specific tasks required for zero-knowledge proofs much faster and more efficiently than general-purpose computing hardware.


Research is still ongoing in this area, but if we want to consider a winner in the current scenario the technology that matters the most for ZK hardware acceleration is FPGAs and not GPUs or ASICs. Factors supporting FPGAs over others include cost, energy efficiency, flexibility and long iteration cycles. This makes FPGAs a more agile and adaptable solution, particularly in fast-moving fields like cryptography. However, it won’t be long before companies like Ingonyama, Accseal roll out their ZKP dedicated ASICs that will dramatically decrease cost and increase efficiency.


Conclusion


Overall, ZK-rollups, ZK-EVMs, and ZK-Hardware accelerators drive blockchain scalability and efficiency, revolutionizing the adoption of decentralized technologies in various industries. The future of Web3 and blockchain holds great promise for secure, fast, and privacy-preserving digital interactions and transactions.


Disclaimer: This material has been shared solely for information purposes, and must not be relied upon for the purpose of entering into any transaction nor investment. Newman Capital is not an investment adviser, and is not purporting to provide you with investment, legal or tax advice. You are always advised to DO YOUR OWN RESEARCH before making any investment decision. Newman Capital is an investor in Scroll and Polygon.
bottom of page