Web3 Beginner Series: Introduction to Ethereum Rollups

CN
7 hours ago

Ethereum, as one of the most active blockchain platforms today, supports a large number of decentralized applications, from DeFi (Decentralized Finance) to NFTs (Non-Fungible Tokens), making the ecosystem very prosperous. However, the boom in on-chain transactions also comes with some inherent challenges, such as transaction fees skyrocketing due to network congestion, longer transaction times, and increased failure rates, which significantly affect the enthusiasm of on-chain participants.

To address these issues without compromising the distributed nature of the main chain, the community primarily adopts L2 scaling solutions. The core principle of L2 is to execute computations and transactions on a second-layer network (L2) while only submitting the final transaction results to the main network (L1). This allows transactions to be more efficient and cost-effective while still inheriting the security of the main network.

Notable L2 solutions include Rollups, sidechains, and others.

Rollups are further divided into Optimistic Rollups and Zero-Knowledge Rollups (ZK-Rollups).

OP-Rollups

First, let's look at Optimistic Rollups, which perform all transaction computations and state updates on the L2 network (this speeds up transaction times and reduces transaction fees) and then batch-compress the original transaction data before publishing it to the main network (this is to ensure transaction validity). When submitting, L2 nodes assume that these transactions are valid and do not contain malicious transactions, using a principle from real-world law: if no one can prove you guilty, you should be considered innocent. This model eliminates a lot of unnecessary verification, greatly speeding up transaction confirmation times and improving transaction efficiency.

After a transaction is submitted by a node, if a validator discovers an issue with a transaction, they can submit a fraud proof within seven days. This proof will be verified by a smart contract on L1. Since the submitter needs to clearly point out the problematic transaction, the validator only needs to verify the specified transaction, allowing for quick proof of whether the transaction is indeed problematic. If it does contain a problematic transaction, the batch containing that transaction and all subsequent batches must roll back, and the L2 chain will revert to the state before the malicious transaction was executed. The malicious node will be penalized (forfeiting their staked collateral), while the validator will receive some rewards.

If no fraud proof is submitted by any node within seven days, all transactions will be confirmed as legitimate by the blockchain network.

Currently, the "fraud proof" is a quite practical design; it is like the sword of Damocles in mythological stories, where its existence is more useful than actually imposing penalties. The sword holder can effectively deter pests, far exceeding the combat power it brings. In practice, almost no nodes have ever submitted fraud proofs, let alone actually proving node malfeasance. The reasons are multifaceted, such as projects implementing Op-Rollups having undergone thorough testing, severe penalties leading to high costs of malfeasance, and the economic and credit losses from node malfeasance far outweighing the negligible gains from wrongdoing.

In fact, compared to node malfeasance, people more commonly encounter network fluctuations or interruptions caused by software bugs. The drawbacks of Op-Rollups mainly lie in the liquidity issues caused by the seven-day challenge period and centralization risks.

ZK-Rollups

In contrast to the inherently optimistic Op-Rollups, ZK-Rollups require a validity proof in addition to the compressed data itself when submitting data to the chain. In other words, ZK-Rollups also conduct transactions off-chain and package them for submission to the main network, but before the formal submission, a validity proof must be computed off-chain.

The concept of ZK actually existed before the birth of blockchain, but the complexity of the real world limited its application scenarios, often needing to be confined to a small scope, such as specific privacy issues between two parties, and usually requiring a centralized verifier, which necessitates a certain degree of trust. The advantage of blockchain in applying ZK technology is that it can naturally converge complexity into smart contracts; it only needs to verify the data and computations on the blockchain, and it cannot verify things that smart contracts cannot do. Therefore, compared to the former, people only need to trust decentralized smart contracts, and this trust does not need to anchor any centralized organization or individual.

The complexity of ZK-Rollups compared to Op-Rollups also lies here; it needs to compile a complex logical circuit diagram based on the data during transaction execution and the actual logic through which the transaction was executed. Then, based on this circuit diagram, a specialized prover uses cryptographic calculations to generate a result that can be quickly verified (this requires some time). Since mathematical operations depend on powerful computing resources, there are usually dedicated compilers and verifiers to perform these tasks.

Layer2 Costs

So, another question arises: one of the purposes of the L2 network is to reduce the costs for users interacting on L1, but what about their own costs?

First, for Op-Rollups, its costs mainly come from two aspects: one is the transaction fees required to submit the compressed transaction data to L1; the other is the operational costs of L2 nodes (including their hardware and profits). Ultimately, these costs will be passed on to users.

The good news is that Ethereum's EIP-4844 proposal has significantly reduced the costs of L2 interacting with the main network.

In addition, maintaining nodes requires locking a large amount of funds, which cannot be used for other purposes, potentially causing investors to miss opportunities and incur indirect losses.

The costs of ZK-Rollups mainly come from computational costs, as generating zero-knowledge proofs requires a significant amount of computational resources and the deployment of specialized hardware. Like Op-Rollups, it also needs to bear the transaction fees for submitting data to the chain.

Moreover, the specialized hardware can deter ordinary users, which may lead to greater centralization of the network.

Conclusion

Whether Optimistic Rollups or ZK-Rollups, both are key answers provided by the Ethereum ecosystem to address scalability challenges. Currently, both solutions are still evolving, and with upgrades like Ethereum EIP-4844 being implemented, the data publishing costs for L2 have been significantly reduced, which will further unleash the potential of both solutions.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

ad
追热点必备!注册HTX领1500U
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink