ロールアップ
OptimisticとZK
「ロールアップ」はCoddyKit上の無料Web3 & DApp Development Fundamentalsレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはWeb3 & DApp Development Fundamentals学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Web3 & DApp Development Fundamentalsコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
What Is a Rollup?
A rollup executes transactions on a Layer 2 and posts the transaction data (and a state commitment) back to Layer 1.
The L1 stores enough information to reconstruct and verify the L2 state, which is what gives rollups their security.
Two Main Types
There are two dominant rollup families:
- Optimistic Rollups — assume transactions are valid, allow challenges
- ZK Rollups — prove validity with cryptographic proofs
They differ in how they convince L1 the L2 state is correct.
Optimistic Rollups
Optimistic rollups assume every batch is valid by default — hence optimistic.
They post the new state to L1 without proving it immediately, relying on the threat of fraud proofs to keep operators honest.
Fraud Proofs and the Challenge Window
After a batch is posted, a challenge window (often ~7 days) opens. Anyone can submit a fraud proof showing the batch was invalid.
If a valid challenge succeeds, the bad batch is reverted and the dishonest operator is penalized.
post batch -> 7-day challenge window
no valid challenge -> finalized
valid fraud proof -> batch revertedWithdrawal Delays
The challenge window means withdrawing from an optimistic rollup back to L1 takes time (often a week).
Liquidity providers offer instant withdrawals for a fee by fronting the funds during the wait.
ZK Rollups
ZK rollups generate a cryptographic validity proof (a zero-knowledge proof) for each batch.
L1 verifies the proof mathematically, so there is no need to trust the operator or wait for a challenge period.
Validity Proofs
A validity proof (such as a SNARK or STARK) demonstrates that the new state was computed correctly from the old state and the transactions.
If the proof verifies, the state is definitively correct — no challenges needed.
proof = prove(oldState, txs, newState)
L1.verify(proof) == true
-> newState accepted instantlyFaster Finality on ZK
Because ZK proofs are verified immediately, ZK rollups offer fast finality and quick withdrawals.
The trade-off is that generating proofs is computationally expensive and historically harder for general smart contracts.
Optimistic vs ZK Trade-offs
Comparing the two:
- Optimistic: EVM-compatible, cheaper proving, slow withdrawals
- ZK: instant finality, fast withdrawals, complex proving
Both post data to L1, so both inherit Ethereum security.
Data Availability
Rollups must publish transaction data so anyone can reconstruct the state — this is data availability.
Posting data to L1 (calldata or blobs) is a major cost; innovations like EIP-4844 blobs made it much cheaper.
Putting It Together
Rollups execute off-chain and settle on L1. Optimistic rollups assume validity and use fraud proofs; ZK rollups prove validity cryptographically. Data availability anchors their security.
Next we look at moving assets between layers with bridges.
Quick Check
Test your rollup knowledge.
Recap: Rollups
You learned that:
- Rollups execute off-chain and settle data on L1
- Optimistic rollups use fraud proofs + a challenge window
- ZK rollups use validity proofs for instant finality
- Data availability on L1 anchors security
Next: bridging assets between layers.
よくある質問
「ロールアップ」レッスンは無料ですか?
はい。「ロールアップ」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Web3 & DApp Development Fundamentalsコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Web3 & DApp Development Fundamentalsコースには全4レッスンが含まれています。
「ロールアップ」で何を学びますか?
OptimisticとZK ブラウザで直接実行するハンズオンコードでWeb3 & DApp Development Fundamentalsを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Web3 & DApp Development Fundamentalsを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのWeb3 & DApp Development Fundamentalsは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。
「ロールアップ」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このWeb3 & DApp Development Fundamentalsレッスンでコードを書いて実行できますか?
はい。すべてのWeb3 & DApp Development Fundamentalsレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。