Summary
Low blockchain scalability can lead to slowdowns, higher transaction fees, and poor user experience. Layer 1 (e.g. sharding) and Layer 2 (e.g. aggregation) solutions are expected to solve this problem.
Layer 1 solutions aim to upgrade the blockchain itself, while Layer 2 solutions build a framework on top of the existing chain.
Aggregation is a commonly used Layer 2 solution that bundles transactions off-chain to speed up calculations.
Zero-knowledge rollup is one of the rollup implementations, using an encryption technology called "zero-knowledge proof".
Zero-knowledge proof can be verified without leaking basic data, ensuring transaction privacy and security.
Cryptocurrencies are becoming increasingly popular and widely used, and it is imperative to solve the scalability problem of blockchain networks. Blockchain congestion can cause speeds to slow down and transaction fees to rise. To solve this problem, there are two main frameworks available, Layer 1 and Layer 2 solutions.
Layer 1 Solution: This type of solution directly updates the blockchain’s infrastructure, thereby increasing the throughput of the entire system. Sharding is a typical example of this. By dividing the blockchain into different partitions, it expands the system capacity and allows simultaneous processing of transactions.
Layer 2 solution: This type of solution runs on top of the basic blockchain. Transactions in Layer 2 are uniformly submitted to the basic chain after being processed off-chain. Main technologies include: state channels, side chains, and aggregation. Zero-knowledge summary is a summary form using zero-knowledge proof.
To understand zero-knowledge aggregation, you must first understand aggregation and zero-knowledge proof.
Blockchain can bundle transaction data together and process it offline through aggregation. After processing, the final results will be officially submitted to the base chain. Processing transactions in batches at the same time can alleviate the congestion pressure on the blockchain, and both computing speed and cost will be optimized. Aggregation is divided into two categories: optimistic aggregation and zero-knowledge aggregation.
Optimistic aggregation: Optimistic aggregation operates on the assumption that all transactions in the aggregation are legitimate and reasonable. Transactions need to go through a waiting period before being submitted to the blockchain. During the waiting period, the network will dispute the transaction in question. Optimism, Arbitrum and opBNB all use optimistic aggregation.
Zero-knowledge rollup: Unlike optimistic rollups, zero-knowledge rollups verify each transaction through zero-knowledge-driven validity proofs. While more complex to implement, zero-knowledge rollups are designed to bypass the objection resolution period of optimistic rollups. In theory, this should allow transactions to be processed faster.
Zero-knowledge proof will be introduced below.
Zero-knowledge proof (ZKP) is a cryptographic tool that allows one party (the prover) to prove the truth of a statement to another party (the verifier) without revealing any complex details of the statement.
ZKP must have the following three qualities:
Integrity: If the statement is true and both parties are honest and trustworthy, the certificate can always confirm its authenticity.
Reliability: Except in extremely rare circumstances, a dishonest prover should not be able to convince an honest verifier of the validity of a false statement.
Zero Knowledge: The most important feature. At the end of the process, the verifier only knows the validity of the statement, not its content.
How exactly does ZKP work? This proof method can be divided into three steps:
Evidence: In the first stage, the prover provides a piece of confidential information or "evidence" to the verifier. The logic is to prove to the verifier that the prover can access specific data without explicitly mentioning it. Evidence asks a set of questions about the information that can only be answered by the true prover.
Challenge: In this stage, the verifier randomly selects the set of questions to challenge the prover.
Response: The prover successfully answers the verifier’s questions to prove his credibility.
After understanding the concepts of aggregation and ZKP, you can understand the working principle of zero-knowledge aggregation by combining the two.
Zero-knowledge summary is divided into two core components:
On-chain contract: A smart contract that defines the operating rules of the zero-knowledge summary protocol. It consists of a main contract and a validator contract. The main contract stores summary blocks, tracks deposits, and makes important updates. The verifier contract verifies the generated ZKP.
Off-Chain Virtual Machine: A virtual machine handles transaction execution outside of L2’s underlying Ethereum blockchain. Off-chain virtual machines run independently of the Ethereum chain.
Although in its own layer, Zero-Knowledge Aggregation is still closely connected to the Ethereum blockchain. Rather than stuffing Ethereum with the exhaustive details of transactions, the off-chain virtual machine intelligently provides bundled summaries to ensure the base layer remains smooth and efficient.
So, what are the benefits of using zero-knowledge aggregation? The following is a detailed introduction.
Throughput Improvement: Zero-knowledge aggregation moves transaction execution from the base layer to a more efficient computing environment. Since transactions are not processed individually on-chain, overall throughput is improved.
Reduce congestion: Zero-knowledge aggregation can reduce the load on the blockchain and help improve the operating efficiency of Layer 1. In addition, full nodes only need to store zero-knowledge proofs instead of all data.
Fees Reduction: Zero-knowledge aggregation helps reduce overall fees as congestion is alleviated.
Security Measures: Zero-knowledge aggregation comes with security measures. Even if there is a problem with the aggregation network, users can still withdraw funds. This is obviously an advantage compared to side chains where network failure will endanger the security of funds.
Shortened transaction questioning period: Using zero-knowledge aggregation, only the validity proof in the aggregation needs to be verified, thus shortening the transaction questioning period.
Complexity: The biggest disadvantage of zero-knowledge aggregation is its own complexity, and its execution is far more complicated than optimistic aggregation.
Limited by the base layer: Although zero-knowledge aggregation is highly efficient, it is still subject to the limitations of the underlying base layer.
Liquidity Dispersion: All Layer 2 will lead to liquidity dispersion in the ecosystem. Weak base layer protocol liquidity can lead to potential problems.
The following is a comparison between optimistic summarization and zero-knowledge summarization.
Scalability is often praised as the "magic weapon" in blockchain technology. If the system isn't running optimally, there's no point in using it. Both optimistic aggregation and zero-knowledge aggregation provide superior solutions to this age-old problem. With its unique approach, zero-knowledge aggregation promises increased speed, reduced load, and enhanced security. Zero-knowledge aggregation is complex, but has huge potential. People who are concerned about the development prospects of digital currencies must first understand zero-knowledge aggregation. As we work to improve blockchain performance, it’s time to take a closer look at zero-knowledge aggregation and its future prospects.
The above is the detailed content of What is Layer-2 scalability technology - zero-knowledge aggregation?. For more information, please follow other related articles on the PHP Chinese website!