Comparison of Ethereum and Solana: Which ZK Technology is Stronger?
Author: Kyrian Alex
Compiled by: Baihua Blockchain
The demand for scaling solutions in blockchain technology has long been a contentious topic. It is well known that as blockchain networks scale, transactions per second (TPS) become a critical issue. Currently, the capacity of major blockchains like Bitcoin and Ethereum is insufficient to handle the transaction volume required for widespread adoption.
For example, Bitcoin processes about 7 transactions per second, while Ethereum handles around 15. In contrast, Visa processes approximately 1,700 transactions per second on average. Without scaling solutions, blockchains cannot compete with traditional financial systems and achieve mass adoption.
So, what about the cost of actual transactions?
The reality is similar… As more people use the blockchain simultaneously, transaction fees become extremely high, especially during peak times, hindering users and making small transactions impractical. For instance, during the DeFi boom in 2020 and 2021, Ethereum's gas fees skyrocketed, making even small transactions exceedingly expensive.
So, how do we solve this problem? We address it by introducing scaling solutions.
Scaling solutions are technologies designed to increase the capacity and efficiency of blockchain networks to handle higher transaction volumes. The primary goal of scaling solutions is to increase the network's throughput, i.e., transactions per second (TPS), while maintaining or improving security, decentralization, and cost-effectiveness.
Scaling solutions are crucial for reducing transaction costs, enabling blockchain technology to be more widely accepted and used in everyday applications. Slow transaction times and high fees diminish user experience, hinder new user adoption, and limit the availability of decentralized applications (DApps).
To attract and retain users, blockchain networks must provide seamless, fast, and cost-effective transactions, which can be achieved through effective scaling solutions.
Today, we will explore how different networks address these challenges, particularly comparing zk Rollups on Ethereum and zk Compression on Solana. Both technologies aim to enhance scalability, but they achieve this through different methods, reflecting the unique design philosophies and priorities of their respective ecosystems.
1. What are ZK Rollups?
ZK Rollups are an L2 scaling solution that increases blockchain scalability by moving computation and state off-chain while bundling transaction data into batches stored on-chain.
They utilize cryptographic proofs known as zero-knowledge proofs to validate the effectiveness of these bundled transactions without revealing the actual data. This allows for faster and cheaper transactions on sidechains while maintaining security on the Ethereum mainnet.
How do they work?
A sequencer batches transactions off-chain.
The sequencer generates zk-SNARK (Succinct Non-Interactive Argument of Knowledge) proofs, which are compact cryptographic proofs that verify the validity of transactions without disclosing all details.
The proofs and transaction data are submitted to the Ethereum mainnet, where anyone can verify the proofs to ensure the validity of the transactions. In case of disputes, anyone can submit the original transaction data for on-chain settlement, leveraging Ethereum's robust security. Rollups include a cryptographic proof (specifically, a zero-knowledge proof) to verify the correctness of the bundled transactions. The Ethereum network only needs to verify this proof instead of each transaction, significantly reducing the computational load. Transactions are grouped off-chain into the Rollup. Zero-knowledge proofs are generated to confirm the validity of the aggregated transactions. The proof and minimal summary data are submitted to the Ethereum mainnet for verification. Upon successful verification, the state on the Ethereum mainnet is updated to reflect the Rollup transactions.
2. What is ZK Compression?
ZK Compression is a technique used on the Solana blockchain to reduce data storage costs by only storing a "fingerprint" (hash) of the compressed data on-chain while maintaining data privacy.
The "ZK" in ZK Compression stands for zero-knowledge, indicating that the privacy of the compressed data is protected. This approach helps significantly reduce the amount of data that needs to be stored on-chain, thereby lowering storage costs for developers.
How does ZK Compression work in full effect?
ZK Compression reduces state costs on Solana by utilizing zero-knowledge (ZK) technology, which refers to the costs of storing and maintaining data (such as account balances and smart contract storage) on the blockchain.
Here’s a detailed breakdown of how it works:
Each account's data is compressed into a unique hash value. This hash not only includes the account's information but also its position in the state tree, ensuring its uniqueness. This hash is stored in the leaf nodes of the state tree.
The state tree is a data structure similar to a Merkle tree, where each node is a hash of its child nodes. The state tree summarizes all account information and data, compressing it into a top-level hash value known as the state root.
The state root is the top-level hash value of the state tree, stored on the blockchain. This root serves as a fingerprint for the entire state tree, ensuring the integrity and completeness of all data within the tree.
Detailed account data is not stored directly on the blockchain. Instead, it is stored as call data in the cheaper Solana ledger space. Only the state root and some basic metadata are stored on-chain, significantly reducing storage costs while maintaining data security.
To ensure the integrity and authenticity of the compressed data, ZK Compression uses zero-knowledge proofs (ZK-proofs). These proofs verify the accuracy and integrity of the data without revealing its actual content, ensuring that even the compressed data remains secure and verifiable.
It is important to note that ZK Compression is not an L2 solution but an upgrade aimed at improving the efficiency of data storage on Solana.
ZK Compression differs from L2 rollup solutions because, in ZK Compression, transaction execution and state storage occur directly on the first layer (L1) chain, i.e., on Solana itself.
The key difference lies in the location of execution and state management. In zk Rollups, these processes occur on a secondary chain that periodically sends commitments and proofs to the main L1 chain. In contrast, ZK Compression retains all execution and state on Solana itself, rather than on a separate chain.
This fundamental difference means that while ZK Rollups shift some processes to a second layer to enhance scalability, ZK Compression optimizes data storage directly on the main blockchain without creating a separate layer for execution.
3. Differences Between the Two
The key differences between zk Rollups and zk Compression on Ethereum and Solana fundamentally reflect their methods of enhancing blockchain scalability and optimizing data storage:
1) Execution and State Management:
zk Rollups: Transaction execution and state storage occur on a secondary chain, separate from the Ethereum mainnet. This secondary chain periodically sends commitments and proofs to the Ethereum mainnet.
zk Compression: All transaction execution and state storage occur directly on the first layer (L1) chain, i.e., on the Solana chain. There is no separate auxiliary chain involved.
2) On-Chain Data Processing:
zk Rollups: Only cryptographic proofs and minimal summary data are submitted to the Ethereum mainnet for verification. This approach minimizes the computational load on the mainnet.
zk Compression: Only the "fingerprint" (hash) of the compressed data and the corresponding ZK proof are stored on the Solana blockchain. This significantly reduces the amount of data stored on-chain, thereby lowering storage costs.
3) Privacy and Integrity:
zk Rollups: Utilize zk-SNARK (Succinct Non-Interactive Argument of Knowledge) proofs to ensure the validity of transactions while not disclosing detailed transaction data. This method ensures security while protecting the privacy of the Ethereum mainnet.
zk Compression: Combines data compression and ZK proofs to optimize blockchain storage while mathematically proving the integrity of the compressed data. It ensures that the decompressed data matches the original data without revealing the content, thus protecting privacy.
4) Nature of the Solutions:
zk Rollups: Considered a second-layer (L2) scaling solution as they shift transaction execution and state management to a secondary chain, enhancing scalability and reducing costs on the mainnet.
zk Compression: Not classified as a second-layer rollup solution but rather an upgrade that directly improves data storage efficiency on Solana's first-layer chain. It optimizes storage costs without introducing a separate execution layer.
4. Conclusion
In summary, both scaling methods emphasize the importance of a balanced approach to ensuring sustainable growth of blockchain networks while maintaining the core principles of the technology.
In this regard, Solana has made significant strides in adopting advanced scaling solutions, paving the way for widespread adoption and innovation in the blockchain industry.