Author: Kyrian Alex Source: medium Translation: Shan Ouba, Golden Finance
The need for scaling solutions for blockchain technology has long been a controversial topic.
I think everyone knows that as blockchain networks grow, transactions per second (TPS) becomes a key issue. The current capacity of major blockchains such as Bitcoin and Ethereum is not enough to handle the transaction volume required for widespread adoption.
For example, Bitcoin processes about 7 transactions per second, while Ethereum processes about 15 transactions per second. In comparison,Visa processes about 1,700 transactions per second on average. Without scaling solutions, blockchain cannot compete with traditional financial systems and achieve mass adoption.
What if we look at the actual cost of these transactions?
As more and more people use a blockchain at once, transaction fees become very high, and then during peak usage times, it can hinder users and make small transactions impractical. For example, during the DeFi craze in 2020 and 2021, Ethereum gas fees soared, making even small transactions too expensive.
How to solve the problem?
We solve this problem by introducing an extension solution.
Scaling solutions are technologies designed to increase the capacity and efficiency of a blockchain network to handle more transactions. The primary goal of scaling solutions is to increase network throughput, measured in transactions per second (TPS), while maintaining or improving security, decentralization, and cost-effectiveness.
Scaling solutions are essential to reducing transaction costs so that blockchain technology can be accessible to a wider audience and used for everyday purposes. Slow transaction times and high fees degrade the user experience, discourage new users, and limit the usability 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’ll explore how different networks address these challenges, specifically by comparing zk Rollups on Ethereum and zk Compression on Solana. Both technologies aim to enhance scalability, but they do so in different ways, reflecting the unique design philosophies and priorities of their respective ecosystems.
What are ZK Rollups?
Zk-rollups are L2 scaling solutions that improve blockchain scalability by moving computation and state off-chain while storing transaction data on-chain in bundled batches.
They use cryptographic proofs called zero-knowledge proofs to prove the validity of these bundled transactions without revealing the actual data. This not only ensures the security of the Ethereum mainnet, but also makes transactions on the sidechain faster and cheaper.
How do they work?
The sequencer batches off-chain transactions.
The sequencer generates a zk-SNARK (Succinct Non-Crypto Argument of Knowledge) proof, which is a compact cryptographic proof that verifies the validity of the transaction without revealing all the details.
The proof and transaction data are submitted to the Ethereum mainnet.
Anyone can verify the proof on the mainnet to ensure that the transaction is valid.
If there is a dispute, anyone can submit the original transaction data for on-chain settlement, thereby leveraging Ethereum's strong security. Rollup contains a cryptographic proof (specifically, a zero-knowledge proof) that verifies the correctness of the bundled transactions. The Ethereum network only needs to verify this proof, rather than having to verify each transaction, greatly reducing the computational load.
Transactions are grouped off-chain in a rollup.
A zero-knowledge proof is generated to confirm the validity of the aggregated transaction.
The proof and minimal summary data are submitted to the Ethereum mainnet for verification.
Once the verification is successful, the state on the Ethereum mainnet will be updated to reflect the aggregated transaction
What is ZK Compression?
ZK Compression is a technology that reduces the cost of data storage on the Solana blockchain by storing only the “fingerprint” (hash) of the compressed data on-chain while maintaining the privacy of the data.
The “ZK” in ZK Compression stands for Zero Knowledge, indicating that the privacy of the compressed data is preserved. This approach helps to significantly reduce the amount of data that needs to be stored on-chain, thereby reducing storage costs for developers.
How does ZK Compression work in full?
ZK Compression reduces state costs on Solana by leveraging zero-knowledge (ZK) technology, which is the cost of storing and maintaining data such as account balances and smart contract storage on the blockchain.
Here is a detailed breakdown of how it works:
The data for each account is compressed into a unique hash value. This hash includes not only 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.
2. The state tree is a data structure similar to a Merkle tree, where each node is the hash value of its child nodes. The state tree aggregates all account information and data, compressing it into a single top-level hash value, called the state root.
3. The state root, the top-level hash value of the state tree, is stored on the blockchain. This root acts as a fingerprint for the entire state tree, ensuring the integrity and completeness of all data in the tree.
4. 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, which greatly reduces storage costs while ensuring data security.
5. 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 the actual content of the data, ensuring that even compressed data remains secure and verifiable.
Note that ZK Compression is not an L2 solution, but an upgrade to improve data storage efficiency on Solana.
ZK Compression is not a layer 2 rollup because, unlike L2 solutions, transaction execution and state storage in ZK Compression occurs directly on the layer 1 (L1) chain, in this case Solana.
The key difference is where the execution and state are managed. With zk Rollups, these processes occur on auxiliary chains, which periodically send commitments and proofs to the main L1 chain. In contrast, ZK Compression keeps all execution and state on Solana itself, rather than on a separate chain.
This fundamental difference means that while zk Rollups offload some processes to auxiliary layers to enhance scalability, ZK Compression optimizes data storage directly on the main blockchain without creating a separate execution layer.
Main Differences Between zk Rollups and zk Compression on Ethereum and Solana
The main difference between zk Rollups on Ethereum and zk Compression on Solana fundamentally lies in their approaches to enhancing blockchain scalability and optimizing data storage:
1. Execution and State Management:
zk Rollups: Transaction execution and state storage occur on an auxiliary chain independent of the Ethereum mainnet. The auxiliary chain periodically sends commitments and proofs to the Ethereum mainnet.
zk Compression: All transaction execution and state storage occur directly on the Layer 1 (L1) chain, which is Solana in this article. No separate auxiliary chain is 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 greatly reduces the amount of data stored on the chain, thereby reducing storage costs.
3. Privacy and integrity:
zk Rollups: Use zk-SNARK (Succinct Non-Crypto Argument of Knowledge) proofs to ensure transaction validity without revealing detailed transaction data. This protects privacy while protecting the security of the Ethereum mainnet.
zk Compression: Combines data compression with 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, thereby protecting privacy.
4. Nature of the Solution:
zk Rollups: Considered a Layer 2 (L2) scaling solution as they offload transaction execution and state management to secondary chains, thereby enhancing scalability and reducing the cost of the mainnet.
zk Compression: Not a Layer 2 Rollup, but an upgrade on the Solana Layer 1 chain that aims to directly improve data storage efficiency. It optimizes storage costs without introducing a separate execution layer.
Conclusion:
In summary, both perspectives on scaling highlight the importance of a balanced approach to ensure blockchain networks can achieve sustainable growth while maintaining their core principles.
Solana’s achievements in this regard provide a compelling case for the adoption of advanced scaling solutions across the blockchain industry, paving the way for broader adoption and innovation.
Preview
Gain a broader understanding of the crypto industry through informative reports, and engage in in-depth discussions with other like-minded authors and readers. You are welcome to join us in our growing Coinlive community:https://t.me/CoinliveSG