Rollups

30 min8 pages

What is Rollups?

Layer 2 scaling with on-chain data availability

~30 min8 pages
rollupslayer2scaling

Rollups are a family of Layer 2 scaling solutions designed to increase blockchain throughput while preserving the security guarantees of the underlying base layer. The core idea is to move most of the computation off-chain and only post essential data or proofs to the main chain. There are two broad families: optimistic rollups and zero-knowledge (ZK) rollups. Both aim to bundle or summarize many user transactions into a single rollup block, which reduces load on the base layer and lowers fees for users. Rollups keep data availability and finality aligned with the base chain, meaning users can still verify state transitions by inspecting on-chain data or cryptographic proofs. The design choices revolve around how data is posted, how disputes are handled, and how proofs are generated and verified. In optimistic rollups, transactions are assumed valid and disputes can trigger fraud proofs; in ZK rollups, validity proofs are produced to convince the base chain that every state transition is correct. Rollups thus provide a path to high throughput, lower cost, and strong decentralization without sacrificing security guarantees. As with any Layer 2 approach, developers must consider user experience, data availability, monitoring, and governance when architecting an application on rollups.

Which statement best describes data availability in rollups?

Rollups execute all computations on the base chain
Rollups post minimal data to the base chain and rely on the chain for data availability
Rollups never publish any data to the base chain
Rollups store data exclusively off-chain with no on-chain proofs

Sign up to unlock quizzes

Example: Conceptual data flow in a rollup

On a rollup, wallets submit a batch of transactions to the rollup operator. The operator computes the new state off-chain and posts a compact representation of the batch to the base chain. In an optimistic rollup, this batch is accompanied by a fraud-proof window during which challengers can contest invalid state transitions. If no fraud is proven, the batch becomes final after the challenge period. In a ZK rollup, the operator posts a succinct cryptographic proof (validity proof) that all transactions in the batch produce the correct state transition; the base chain then confirms the proof and finalizes the batch immediately or after a short finality period.

What is the primary difference between optimistic rollups and ZK rollups?

Optimistic rollups use on-chain validity proofs, ZK rollups do not
ZK rollups rely on fraud proofs, while optimistic rollups rely on validity proofs
Optimistic rollups assume correctness and use fraud proofs; ZK rollups publish validity proofs
There is no difference; they are the same mechanism

Sign up to unlock quizzes

In the context of rollups, data availability ensures that the data necessary to reconstruct the state and verify correctness remains accessible. Data can be posted to the base chain or stored by operators with proofs that allow others to reconstruct state. The trade-offs involve throughput, data download costs for validators, and the latency of finality. Rollups often publish transaction data or compressed state snapshots to the base chain, while keeping heavy computation and storage off-chain. Ensuring robust data availability is critical for security: if data becomes unavailable, users may be unable to reconstitute the state or prove fraud, undermining trust in the system.

Rollups use a data availability approach that determines how user data and state updates are published to the base chain. In optimistic rollups, there is a data availability layer that posts necessary transaction data after the optimistic period, enabling users and sequencers to reconstruct the state if needed. In ZK rollups, the proofs themselves are designed to be compact, but there is also data that must be posted to enable validators to verify proofs and recover state. The two most common strategies are: (1) publish data blobs that include all transactions in a batch, enabling anyone to recompute the state; (2) publish compressed or indexed data with on-chain commitments that reference the original transactions. Data availability is the backbone that preserves security when skipping full on-chain computation, ensuring that users can access the information required to challenge misbehavior or verify correctness.

Example: Data availability on optimistic vs ZK rollups

Optimistic rollups typically publish transaction data so challengers can reconstruct the batch and verify correctness during the fraud-proof window. ZK rollups publish a validity proof along with a compact data representation; if needed, the underlying data can be requested to audit assumptions, but the proof provides strong guarantees without recomputing every transaction.

Which data flow best describes standard data publication in optimistic rollups?

Publish full data only after fraud is proven
Publish data upfront for immediate finality without challenges
Publish transaction data with a fraud-proof window for disputes
Publish only cryptographic proofs with no data

Sign up to unlock quizzes

Data availability also affects how nodes recompute state. Validators and sequencers rely on available data to reconstruct the exact sequence of transactions and verify the resulting state. If data is unavailable or incomplete, a validator cannot determine whether the rollup state is valid, which could lead to disputes or stalled finality. Therefore, robust data channels and redundancy are essential in Rollup designs. Operators may use data availability sampling techniques to reduce on-chain data load while preserving the ability to reconstruct state, balancing on-chain data with off-chain storage and retrieval.

What technique helps reduce on-chain data while preserving the ability to reconstruct state in rollups?

Data availability sampling
On-chain computation of all transactions
Never posting any data to the base chain
Using a single centralized server for data

Sign up to unlock quizzes

A rollup must ensure integrity of state transitions through two levers: data availability and validity proofs (or fraud proofs). In a ZK rollup, the prover generates a cryptographic proof that the new state is correct given the old state and the batched transactions. The base chain verifies this proof without re-executing transactions, enabling high throughput with strong security guarantees. In optimistic rollups, the system trusts the batch to be valid initially and only checks correctness if someone submits a fraud proof within a designated challenge window. This model incentivizes validators to monitor batches and report misbehavior, while allowing fast initial throughput.

Example: Validity proof vs fraud proof

ZK rollup: a validity proof certifies that the batched transactions lead to the correct next state. Base chain validates the proof and commits. Optimistic rollup: batched transactions are posted; validators assume correctness; if someone discovers an error, they submit a fraud proof within the window to revert or correct the state.

Which mechanism provides immediate finality once the proof is verified on-chain?

Fraud proof window
Validity proof in ZK rollups
Manual auditor review
No finality occurs in any rollup

Sign up to unlock quizzes

Security posture matters for developers choosing a rollup. ZK rollups typically require sophisticated proving systems and cryptographic assurances, which can increase development complexity but offer strong, near-instant finality. Optimistic rollups reduce proof costs but depend on economic incentives and social consensus to enforce correct behavior. Both approaches share goals: scalability, data availability, and robust security relative to the base chain. Practical deployments often balance cost, latency, and user experience, sometimes integrating bridging and sequencing layers to optimize for specific dApps.

What is a common trade-off when choosing a ZK rollup over an optimistic rollup?

ZK rollups have slower finality but cheaper on-chain data
ZK rollups require complex proving systems, potentially higher upfront costs, but offer strong finality guarantees
ZK rollups do not publish any data to the base chain
ZK rollups cannot verify state transitions securely

Sign up to unlock quizzes

A practical rollback to the concept of rollups involves understanding the architecture: the user interface and wallets submit transactions to a rollup smart contract on the base chain. The rollup operator or sequencer aggregates, validates, and batches these transactions off-chain, then posts data and/or proofs to the base chain. Validators on the base chain monitor the posted data or proofs and verify state transitions. For optimistic rollups, disputes are resolved via fraud proofs during a challenge period, after which the batch is finalized. For ZK rollups, the validity proof is verified on-chain; once accepted, the state update is final and requires minimal or no further on-chain disputes.

Example: End-to-end flow (simplified)

1) User submits a transaction to the rollup. 2) The operator batches multiple transactions and updates off-chain state. 3) The operator posts data (and proofs, in ZK rollups) to the base chain. 4) In optimistic rollups, a fraud window opens; anyone can challenge. 5) If valid fraud proof is submitted, the state is rolled back. 6) If no fraud occurs or the proof is verified, the batch is finalized and users can withdraw or rely on the new state.

Which component is primarily responsible for computing state updates off-chain in a rollup?

Base chain validator
Rollup operator/sequencer
External oracle
Hardhat test suite

Sign up to unlock quizzes

Security guarantees in rollups depend on: (a) data availability: can the data required to recompute state be accessed? (b) proof of correctness: is the state transition guaranteed to be valid? (c) dispute resolution: what mechanisms exist to challenge incorrect states? (d) economic incentives: are rewards and penalties aligned to promote honest behavior? Well-designed rollups implement redundant data channels, robust proofs, efficient dispute processes, and well-thought-out governance to align incentives.

Which element is least related to the security model of a rollup?

Data availability
Proof of correctness
Economic incentives
User interface color scheme

Sign up to unlock quizzes

You've previewed 4 of 8 pages

Sign up free to unlock the rest of this lesson and start tracking your progress.

4 more pages waiting:

  • Page 4
  • Page 5
  • Page 6
  • Page 7

Related Topics