ZK Rollup infrastructure¶
Overview¶
The infrastructure that is required to run our ZK Rollup solution consists of several components. The diagram below shows the high-level interactions between these components.
graph LR
WalletClient(("Wallet Client"))
Indexer["Data Indexer"]
Aggregator["Transaction Aggregation Server"]
subgraph Blockchain["Blockchain"]
SC["ZK Rollup Smart Contract"]
end
Blockchain --> Indexer
Indexer --> WalletClient
WalletClient <--> Aggregator
Aggregator <--> SC
Core Components¶
Wallet Client¶
It is the software that runs on the client machine. In general, it could be a browser extension or a native app. The support for our ZK Rollup is enabled with a library module that is repsonsible for
- maintaining the user's address history on the Rollup ledger,
- creating and proving Rollup transactions,
- submitting them to the aggregation server,
- and monitoring the Rollup state.
See also the Smart Wallet documentation.
ZK Rollup Smart Contract¶
The smart contract enforces ZK Rollup ledger rules, as well as bridging assets in and out of the ZK Rollup ledger.
Transaction Aggregation Server¶
A server that aggregates ZK Rollup transactions into batches, creates a batch proof from the individual transaction proofs, and updates the on-chain state of the Rollup. It is also responsible for posting the batch data on-chain.
Data Indexer¶
A service that fetches blockchain data on demand. It is used by the Wallet Client to retrieve the latest state of their wallet on the blockchain and the latest state of the Rollup ledger.