> For the complete documentation index, see [llms.txt](https://docs.zetrix.com/zetrix-l2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zetrix.com/zetrix-l2-documentation/architecture/overall-architecture.md). Agents can also search and read this documentation through its [MCP server](https://docs.zetrix.com/zetrix-l2-documentation/~gitbook/mcp).

# Overall Architecture

## High-Level Architecture

At the highest level, Z2 is a pipeline: users submit transactions to the **Z2 Nodes**, which run them and produce L2 blocks; **Sequencers** pack those blocks into batches, send the data to the **committee's data availability (DA)** and post the commitment to the **Sequencer Inbox** on L1; the **Main Validator** replays the batches and proposes an assertion on the **Rollup**; the **Committee** (five bundles sharing one reexecutor) checks the assertion and, with **3 of 5** signatures, an **Aggregator** submits the **soft confirmation**; and **Watchers** re-check the result during the challenge window and can open a dispute on the **Challenger**. Supporting services provide observability, operations, bridging, and developer access.

![Zetrix Layer 2 architecture. Sequencers batch transactions from the Z2 nodes and post them to Zetrix L1. A proposer asserts the result, five committee bundles (a node and a validator each) share one reexecutor and sign it, and watchers can challenge before it is confirmed.](https://2208647221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftb2llNZXY6vV8lLZP1Sk%2Fuploads%2Fgit-blob-d2951251369f202fe6d98b35b6606a0f952efd01%2Fz2-architecture.svg?alt=media)

{% hint style="info" %}
**Need a closer look?** [**Open the architecture diagram at full size**](https://github.com/Maslan501/Zetrix-L2-Documentation/tree/main/docs/.gitbook/assets/z2-architecture.svg). It opens in a new tab at double size, so you can scroll around it. It is a vector image, so you can also zoom further (Ctrl/Cmd + scroll) and it stays sharp.
{% endhint %}

![Life of a Zetrix Layer 2 transaction in seven steps: Send, Batch, Propose, Verify, Soft-confirm, Challenge window, Final.](https://2208647221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftb2llNZXY6vV8lLZP1Sk%2Fuploads%2Fgit-blob-38f64fced76f14d0cf2d55d3173397b9e4efd9da%2Fz2-life-of-a-transaction.svg?alt=media)

The diagrams above show the full deployment and how a transaction moves through it:

* **Ecosystem Support** — Refueler, Monitoring, Explorer, Zetrix MCP, and Faucet.
* **Z2 Nodes** run **Hyperledger Besu with QBFT** consensus (5-second block period). **Three Sequencers**, each reading its own node, batch the transactions, send the data to the committee's DA, and post the commitment to the **Sequencer Inbox** on Zetrix L1.
* **Z2 Relayer** relays messages **from L1 to L2** (e.g. deposits).
* **Layer 2 Committee** — five bundles, each a **Z2 Node + Z2 Validator** (committee and aggregator roles) with its own copy of the batch data. The five validators check each assertion with **one shared Z2 Reexecutor**, sign off-chain, and an aggregator submits the soft confirmation.
* **Main Validator** (Proposer + Watcher) **replays the new batches with its own reexecutor** and proposes the resulting state as an assertion on the Rollup.
* **External Validators** (Watcher + their own Reexecutor) **fetch L2 data from the DAC** and re-execute to detect any mismatch, disputing when needed.
* **Sync-only node** (dashed in the diagram) — a Z2 Node run on its own to sync and serve the chain.

The numbered badges **1–7** on the architecture diagram match the steps in the **Life of a transaction** strip below it: **Send → Batch → Propose → Verify → Soft-confirm → Challenge window → Final**.

Components group by the **plane** each part lives in:

| Plane                      | Contains                                                                                                                 | Role                                                                                             |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| **L2 Execution**           | Z2 Nodes (Besu, QBFT), Sequencers (3)                                                                                    | Run transactions, produce blocks, batch them                                                     |
| **Data Availability**      | Committee bundles (Z2 Node + Z2 Validator, ×5), shared Reexecutor, Aggregator, DA                                        | Store and attest batch data (AnyTrust); verify and sign the assertion                            |
| **Zetrix L1 (settlement)** | Sequencer Inbox, Rollup, Committee & Staking, Challenger, Bridge & Outbox                                                | Record batches, hold assertions, track committee stakes, settle disputes, custody bridged assets |
| **Services**               | Main Validator, Watchers (each with its own Reexecutor), Relayer, Refueler, Explorer, Monitoring, MCP, Faucet, z2-signer | Propose/verify assertions, bridge, operate, observe, sign (HSM)                                  |

> **Validator roles.** *Proposer* — replays the new batches and proposes an assertion. *Watcher* — verifies the soft-confirmed assertion and disputes on mismatch. The Main Validator runs both roles; External Validators run the Watcher role and can **earn a reward** for an honest dispute.

> **Layer 2 Committee.** The committee has **five members**. Each member is a bundle of a **Z2 Node and a Z2 Validator** (committee and aggregator roles) with its own copy of the batch data. The five validators check each assertion with **one shared Z2 Reexecutor**; signatures are exchanged **off-chain over the committee's gossip bus**, and once **3 of 5** agree, an aggregator submits the soft confirmation to the Rollup. Members do not send their own L1 transaction to sign. **Each bundle runs on its own server, with the shared reexecutor alongside them — at least five servers are needed for the bundles.**

> **Sync-only nodes.** You can run a Z2 Node on its own to sync and serve the chain. A sync-only node needs no committee, validator or reexecutor. Only committee operators deploy the full bundle.

## Data Flow Summary

| Stage | Component                 | Responsibility                                                                                                                                        | Output                  |
| ----- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| 1     | Wallet                    | Sign transactions                                                                                                                                     | Signed tx               |
| 2     | RPC / LB                  | Accept, route, rate-limit                                                                                                                             | Forwarded tx            |
| 3     | Z2 Nodes                  | Mempool, EVM execution, QBFT block production (Besu, 5 s blocks)                                                                                      | Blocks                  |
| 4     | Sequencers (3)            | Batch blocks; send the data to the 5 committee members; with 3 attestations build the data certificate and post the commitment to the Sequencer Inbox | Commitment + data       |
| 5     | Main Validator            | Replay the new batches with its own reexecutor; propose the resulting state as an assertion on the Rollup                                             | Proposed assertion      |
| 6     | Committee validators (×5) | Have the shared reexecutor replay the same batches; sign off-chain only if the result matches; share signatures over the gossip bus                   | Signatures              |
| 7     | Aggregator                | With 3 of 5 matching signatures, submit the soft confirmation to the Rollup                                                                           | Soft confirmation       |
| 8     | Watchers                  | Fetch data from the DAC, re-execute, open a dispute on the Challenger on mismatch                                                                     | Fraud proof (if needed) |
| 9     | Zetrix L1                 | Confirm the assertion after the challenge window; settle disputes; finality                                                                           | Final confirmation      |

## Trust and Confirmation Timeline

```mermaid
sequenceDiagram
    participant User
    participant Seq as Sequencers
    participant DA as Committee DA
    participant Prop as Main Validator
    participant Comm as Committee validators
    participant Agg as Aggregator
    participant L1 as Zetrix L1
    participant Watch as Watchers

    User->>Seq: Submit transaction
    Seq->>Seq: Pack L2 blocks into a batch
    Seq->>DA: Send batch data (3 attestations = data certificate)
    Seq->>L1: Post commitment (Sequencer Inbox)
    Prop->>Prop: Replay batches with own reexecutor
    Prop->>L1: Propose assertion (Rollup)
    Comm->>Comm: Shared reexecutor replays, sign if match
    Comm->>Agg: Signatures over gossip bus
    Agg->>L1: Submit soft confirmation at 3 of 5 (Rollup)
    Agg-->>User: Soft confirmation (fast)
    Note over L1,Watch: Challenge window opens (120 s on testnet)
    Watch->>DA: Fetch data and re-execute
    Watch->>L1: Dispute on Challenger if mismatch
    L1-->>User: Final confirmation (no challenge)
```

The challenge window is a testnet setting of **120 seconds**; confirm the value before relying on it as a general rule. On the testnet, one committee verification takes about 1.4 seconds.

***

[← Introduction](https://docs.zetrix.com/zetrix-l2-documentation/introduction.md) · [Index](https://docs.zetrix.com/zetrix-l2-documentation/readme.md) · [Trust Model →](https://docs.zetrix.com/zetrix-l2-documentation/architecture/trust-model.md)
