Rollup Architecture Comparison

Comprehensive guide for rollup architecture comparison covering essential concepts, practical examples, and production best practices.

Rollup architectures are the backbone of scalable Ethereum-like blockchains. When a system needs to process thousands of transactions per second beyond the limits of a single chain, rollups compress and batch transactions off-chain, publishing only minimal proofs or summaries to a base layer. This page compares the design choices in rollup implementations, focusing on how engineers select, configure, and troubleshoot rollups based on their operational needs.

Core Design Dimensions

Proof Generation and Verification

The choice of proof system determines how efficiently state transitions are verified on the base layer. A rollup uses a prover to generate a succinct proof over a batch of transactions, and the verifier contract on the base chain checks the proof's validity.

For a zk-rollup, the proof generation is typically done using a ZK-SNARK or ZK-STARK. The prover consumes a set of transactions and outputs a proof that the state transition is correct. The base chain contract expects a verifyProof(bytes32 proof, bytes32 stateRoot, bytes32 prevRoot, uint256 batchId) function.

function verifyProof(
    bytes32 proof,
    bytes32 stateRoot,
    bytes32 prevRoot,
    uint256 batchId
) external view returns (bool valid) {
    // Verify SNARK proof using BLS12-381 curve
    bytes memory input = abi.encode(stateRoot, prevRoot, batchId);
    bool success = verifier.verify(proof, input);

    return success;
}

The prover is often a separate service running in a Docker container, configured with a prover.yaml file:

prover:
  batch-size: 1024
  proof-type: "SNARK"
  curve: "BLS12-381"
  circuit: "eth2-merge"
  timeout: "300s"
  storage:
    type: "S3"
    bucket: "rollup-proofs"
    region: "us-east-1"
  workers:
    count: 8
    memory: "16GB"
    cpu: "8"

When the prover fails, the error is logged in prover.log:

2023-10-05T12:34:56.789Z ERROR [prover] Failed to generate proof for batch #12345: 
    Circuit not found: 'eth2-merge'
    Required: /opt/circuits/eth2-merge.r1cs
    Found: /opt/circuits/eth2-merge_1.1.r1cs

This mismatch between expected and actual circuit files is a frequent production issue. The proof size and verification cost are critical: a 512-byte SNARK proof can be verified for 80,000 gas on Ethereum, while a 1 KB STARK proof may cost 150,000 gas but allow for faster updates.

Data Availability and Submission

Rollups require that the full transaction data for a batch be available on the base layer or a decentralized data layer. Two common patterns exist: on-chain data availability and off-chain data availability with a challenge window.

For on-chain data availability, the rollup submits the full transaction list to the base chain using a submitBatch(bytes32[] transactions, bytes32 stateRoot) transaction.

{
  "to": "0x1234567890abcdef1234567890abcdef12345678",
  "data": "0x12345678...",
  "inputs": [
    {
      "name": "transactions",
      "type": "bytes32[]",
      "value": [
        "0x1111111111111111111111111111111111111111111111111111111111111111",
        "0x2222222222222222222222222222222222222222222222222222222222222222"
      ]
    },
    {
      "name": "stateRoot",
      "type": "bytes32",
      "value": "0x3333333333333333333333333333333333333333333333333333333333333333"
    }
  ]
}

A common failure is data availability loss — when a batch is posted but the transactions are not available for the full challenge window. The base chain can detect this by checking if the keccak256(abi.encode(transactions)) matches the expected root. If not, the rollup can initiate a challenge via a challengeData(bytes32 batchId) call, and the challenger must provide the missing data.

For off-chain data availability, rollups use a data availability committee (DAC) or erasure coding. The rollup node first encodes the transaction data into a Reed-Solomon code, then uploads the encoded data to IPFS or Arweave. The base layer stores only the Merkle root of the encoded data.


$ ipfs add -q -r batch-data-12345/
QmXyZ1234567890abcdef1234567890abcdef1234567890

# Submit the Merkle root to the base chain
$ curl -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "rollup_submitBatch",
    "params": {
      "batchId": 12345,
      "dataRoot": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
      "dataLocation": "ipfs://QmXyZ1234567890abcdef1234567890abcdef1234567890"
    },
    "id": 1
  }' \
  https://mainnet.infura.io/eth/v1

A silent failure occurs when the data availability challenge window is too short. If the challenge window is 7 days, but the prover takes 5 days to generate a proof, the rollup may publish a batch with stale data — a data availability mismatch.

Execution and State Transition

Rollups execute transactions in a virtual machine (VM) that emulates the base chain. The VM state is updated after each transaction, and the final state root is used to verify the rollup’s correctness.

The execution engine runs a loop that processes batches, applying transactions one by one. A typical configuration uses execution-config.yaml:

execution:
  chain-id: 1000
  vm: "EVM"
  block-time: 12s
  max-txs-per-block: 1024
  gas-limit: 10000000
  fee-model: "dynamic"
  storage:
    type: "PostgreSQL"
    connection-string: "host=db rollup dbname=execution user=rollup password=secret"
  cache:
    type: "Redis"
    address: "redis://redis:6379"
    ttl: "30m"

The engine processes batches by calling applyTransactions(bytes32[] txs) on the VM. The VM state is represented as a Merkle Patricia trie, and the final state root is derived using keccak256(serialize(state)).

A common failure is state root mismatch between the VM and the base layer. The rollup node logs:

2023-10-05T14:22:33.111Z ERROR [execution] State root mismatch after batch #12345:
    Expected: 0x1111111111111111111111111111111111111111111111111111111111111111
    Actual:   0x1111111111111111111111111111111111111111111111111111111111111112

This error often arises when the transaction gas cost calculation is inconsistent between the VM and the base layer. The rollup uses a gas model that defines how much gas each VM instruction consumes. If the gas model is not aligned with the base chain’s EVM, the state root will drift over time.

Finality and Inclusion

Finality in rollups depends on how quickly the base layer confirms the rollup’s batches. A batch is provisionally included when it is submitted to the base chain, and final when the base layer confirms it with sufficient depth.

The rollup node checks the inclusion of a batch using getTransactionReceipt on the base chain:

{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
  ],
  "id": 1
}

The response includes status, gasUsed, and logs. The rollup node expects status: 1 (success) and logs[0].topics[0] to match keccak256("BatchSubmitted(bytes32,bytes32,uint256)").

A common failure mode is double submission — the rollup submits the same batch twice, either due to network failure or a crash in the submission service. The base chain logs:

Transaction already exists: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef

The rollup node must detect this and deduplicate submissions. One approach is to maintain a submitted_batches table with batch_id and tx_hash, and use INSERT ... ON CONFLICT DO NOTHING to avoid duplicates.

Fraud Proofs and Challenge Mechanisms

When a rollup publishes an incorrect state root, users can submit a fraud proof to challenge the rollup’s validity. The challenge process is asynchronous and relies on challenge windows.

A fraud proof consists of a sequence of proof steps, each step verifying a part of the state transition. The challenge starts with a submitFraudProof transaction, which includes the proof data and the root of the challenged batch.

{
  "to": "0x1234567890abcdef1234567890abcdef12345678",
  "data": "0x12345678...",
  "inputs": [
    {
      "name": "batchId",
      "type": "uint256",
      "value": 12345
    },
    {
      "name": "proof",
      "type": "bytes",
      "value": "0xabcdef123456..."
    },
    {
      "name": "challengedRoot",
      "type": "bytes32",
      "value": "0x1111111111111111111111111111111111111111111111111111111111111111"
    }
  ]
}

The challenge is resolved when the base layer contract verifies the proof and updates the rollup’s state root. The resolution process is on-chain, and the challenge winner receives a reward.

A subtle failure is challenge latency: if the challenge window is 7 days, but the fraud proof is 10 days long, the challenger must provide the proof in stages. The rollup node must manage challenge state machines that track the progress of each challenge.

State Sync and Node Bootstrapping

New rollup nodes must sync from the base layer to catch up to the latest batch. The process involves:

  1. Fetching the list of submitted batches from the base chain.
  2. Downloading the transaction data for each batch.
  3. Applying the transactions sequentially to build the state.

The bootstrap process is configured via sync-config.yaml:

sync:
  start-batch: 1
  batch-size: 100
  parallel-downloads: 8
  data-source: "IPFS"
  cache-size: "10GB"
  checkpoint-interval: 1000

The node uses curl to query the base chain for batch metadata:

$ curl -s 'https://mainnet.infura.io/eth/v1' \
  -X POST \
  -d '{
    "jsonrpc": "2.0",
    "method": "rollup_getBatches",
    "params": {
      "fromBatch": 1,
      "toBatch": 100
    },
    "id": 1
  }' \
  | jq '.result[] | { batchId, dataRoot, stateRoot }'

A common bootstrapping failure is checkpointing lag — when the node reaches batch 1000, but the latest checkpoint is only at batch 900. The node must replay the last 100 batches to catch up.

Key Trade-offs and Decision Points

Common Failure Modes

Rollup architecture is not a one-size-fits-all solution. Choosing the right combination of proof system, data availability, execution model, and finality mechanism requires deep understanding of the trade-offs and failure modes. This page equips engineers to make those decisions with precision.

This page was rewritten on 18 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.