How Do Optimistic Rollups Work (The Complete Guide)

optimistic rollup 的设计哲学会带领Optimism/Arbitrum走向何方? - 知乎

⬆️ Great High Level Architecture Image

Optimistic Rollups | ethereum.org

Rollup Protocol Overview | Optimism Docs

Main Structure[2]

Untitled

Compress Technique[4]

In Bedrock L2 blocks are saved to the Ethereum blockchain using a non-contract address (0xff00..0010on Ethereum) to minimize the L1 gas expense. As these blocks are submitted as transaction calldata on Ethereum, there is no way to modify or censor them after the "transaction" is included in a block that has enough attestations. This is the way that OP Mainnet inherits the availability and integrity guarantees of Ethereum.

Blocks are written to L1 in a compressed format to reduce costs. This is important because writing to L1 is the major cost of OP Mainnet transactions.

Untitled

Comparasion with ZK-Rollup[1]

Features Optimistic Rollups ZK Rollups
Proof Uses fraud proofs to prove transaction validity. Uses validity (zero-knowledge) proofs to prove transaction validity.
Capital Efficieny Requires waiting through a 1-week delay (dispute period) before withdrawing funds. Users can withdraw funds immediately because validity proofs provide incontrovertible evidence of the authenticity of off-chain transactions.
Data Compression Publishes full transaction data as calldata to Ethereum Mainnet, which increases rollup costs. Doesn't need to publish transaction data on Ethereum because ZK-SNARKs and ZK-STARKs already guarantee the accuracy of the rollup state.
EVM Compatibility Uses a simulation of the Ethereum Virtual Machine (EVM), which allows it to run arbitrary logic and support smart contracts. Doesn't widely support EVM computation, although a few EVM-compatible ZK-rollups have appeared.
Rollup Costs Reduces costs since it publishes minimal data on Ethereum and doesn't have to post proofs for transactions, except in special circumstances. Faces higher overhead from costs involved in generating and verifying proofs for every transaction block. ZK proofs require specialized, expensive hardware to create and have high on-chain verification costs.
Trust Assumptions Doesn't require a trusted setup. Requires a trusted setup to work.
Liveness Requirements Verifiers are needed to keep tabs on the actual rollup state and the one referenced in the state root to detect fraud. Users don't need someone to watch the L2 chain to detect fraud.
Security Properties Relies on cryptoeconomic incentives to assure users of rollup security. Relies on cryptographic guarantees for security.

OP-Stack

截屏2024-08-31 上午9.50.48.png