mirror of
https://github.com/autistic-symposium/blockchains-security-toolkit.git
synced 2025-05-12 11:42:15 -04:00
.. | ||
circom.md | ||
README.md |
l2s && rollups
tl; dr
-
the current Ethereum version has low transaction throughput and high latency in processing. This means that transactions are both slow and prohibitively expensive, due to high demand, relative to what the network can take at any given time.
-
there are two types of scaling solutions:
- On-chain scaling refers to any direct modification made to a blockchain, like data sharding and execution sharding in the incoming Ethereum 2.0.
- Off-chain scaling refers to any innovation outside of a blockchain, i.e., the execution of transaction bytecode happens externally instead of on Ethereum. hese solutions are called L2, because layer 2 works above layer 1 (Ethereum) to optimize and speed up processing. Arbitrum and Optimism Ethereum are two well-known examples of L2 scaling solutions.
-
there are two leading L2 solutions:
- Zero-Knowledge (zk) rollups, and
- Optimistic rollups
zk-rollups
- zk-rollups bundle together many off-chain transactions into a single verifiable batch using zk-SNARK.
- zk-SNARK is an extremely efficient, zero-knowledge proof that allows one party to prove it possesses certain information without revealing that information. These validity proofs are then posted to the Ethereum blockchain.
optimistic rollups
- Instead of executing and storing all the data on Ethereum, where transactions are only processed at a premium, we only store a summary.
- All the actual computation and storage of contracts and data is done on L2.
- Rollups inherit Ethereum's security guarantess, while still acting as an efficient scalin solution.
- Optimistic rollup batch together off-chain transactions into braches, without a proof of their validity.
- When assertions of the L2 state are posted on-chain, validators of the rollup can challenge the assetion when they think there is a malicious state (fraud detection).
state channel
- setting up channels between parties to form an off-chain network within which many transactions take place
- final state is updated on ethereum
side cain
- conduct txs in a separate blockchain with its own consensus mechanism
- assets and data are transferred with ethereum through a smart contract that locks assets and recreates representative opens in the side chain
plasma chain
- similar to side chains, functioning as separate chains with their own consensus mechanisms
- roots of each block are published to ethereum, which makes the system more secure but limits its ability for complex operations