Home  >  Article  >  Blockchain Scaling: Sidechains vs. Rollups

Blockchain Scaling: Sidechains vs. Rollups

DDD
DDDforward
2024-03-06 14:21:24587browse

The scalability of blockchain means that as more and more users adopt the service, it can easily cope with the growing user data computing needs.

When it comes to scalability, the discussion narrows down to two methods: sidechains and rollups, but these two methods are not either/or.

01

About side chain

1. What is side chain?

The side chain can be said to be a side chain that is compatible with the main chain. Usually transactions are processed off-chain, and if necessary, they are packaged and sent to the main chain. Sidechains are connected to the mainnet via a two-way bridge, but they operate as independent blockchains with their own consensus mechanisms. Therefore, the main network using PoW can cooperate with the side chain using PoS.

Blockchain Scaling: Sidechains vs. Rollups

2. How does sidechain work?

In order to support transactions between different chains, side chains need to maintain a two-way link with the main chain they are connected to.

For example, when a user sends assets on the Ethereum main chain to the Polygon side chain, the asset transfer does not actually occur. A two-way peg simply locks the transferred amount on the main chain and mints a mirrored version of the asset on the side chain. This is achieved through smart contracts that burn Tokens on the main chain and mint Tokens on the side chain. This is why Ethereum sent to Polygon is available as wETH (Wrapped Ethereum: Wrapped ETH, pegged 1:1 to ETH).

3. Is side chain safe?

As the name suggests, sidechains run in parallel with the underlying main chain rather than being built on top of the main chain, which means additional security risks need to be considered. For example, sidechains cannot take advantage of the security of the main chain, unlike Rollups, which we will discuss later. The security of the side chain needs to be solved by the side chain itself. Typically, the more popular a blockchain is, the more validator nodes it has and therefore the more secure the chain, although whether sidechains can become a security threat is debatable.

4.Does sidechain have a future?

Overall, sidechains have amazing scalability potential, and in addition to being great at relieving network congestion, they can act as bridges between different chains, bringing the entire cryptocurrency ecosystem together. This doesn’t mean they are the ultimate solution to the impossible triangle of blockchain (decentralization, scalability, and security), but they will certainly have a place in future developments.

02

About Rollups

1. What are Rollups?

Rollups is a Layer 2 extension solution built on the main chain. They roll multiple transactions together into a block, which is then packaged and sent back to the main chain for processing. This approach significantly reduces gas fees, as well as the time required to process transactions.

2.How do Rollups work?

If we think of a transaction on the blockchain as a simple piece of data, imagine what would happen if a single block of data contained 50 transactions? This is exactly how Rollups work, because they are able to package (roll up) thousands of transactions into a Rollup block, which means that Rollups will increase efficiency based on the main chain. Therefore, the higher the efficiency of the main chain, the higher the efficiency of aggregation.

Blockchain Scaling: Sidechains vs. Rollups

There are currently two different types of Rollups: Optimistic rollups and Zero-knowledge rollups.

The working principle of Optimistic rollups is that all transactions are valid by default. If no one raises objections and proves their error within the specified time, it will pass. Optimistic rollups can be sped up due to the validity of this assumption. To prevent fraudulent transactions, the Optimistic rollups protocol allows people to cast false doubt on transactions. Suspected fraudulent transactions are submitted directly on the Ethereum network to check whether they are legitimate and to resolve disputes.

Zero-knowledge rollups (aka zk-rollups) work by relying on a type of cryptography called zero-knowledge proofs, which allow someone to mathematically prove that a statement is true without No additional information is required to be disclosed regarding this statement.

zk-rollups works by bundling thousands of transactions on the main chain and giving cryptographic proofs, that is, by default all transactions must be suspected, and each transaction needs to have a corresponding validity proof. This is called a validity proof or Snark (succinct non-interactive knowledge argument). It is then published to the main chain for approval.

zk-rollups also have the advantage that transaction time is greatly shortened, and at the same time, they are less vulnerable to attacks than Optimistic rollups.

3.Does Rollups have a future?

In short, Rollups are a great scaling solution that leverages existing on-chain security, making it indispensable.

03

Summary

The relationship between sidechains and Rollups is not direct competition, but can coexist peacefully, because both solutions have their own advantages and Challenges to overcome.

The above is the detailed content of Blockchain Scaling: Sidechains vs. Rollups. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:zhihu.com. If there is any infringement, please contact admin@php.cn delete