Project
Kailua's project structure is primarily as follows:
kailua // Root project directory
├── bin
│ └── cli // Main Kailua CLI
├── book // This document
├── build
│ └── risczero // RISC Zero zkVM proving binaries
│ ├── hokulea // Eigen DA
│ ├── hana // Celestia DA
│ └── kona // Native ETH DA
├── crates
│ ├── contracts // Fault proof contracts
│ ├── hana // Celestia DA support
│ ├── hokulea // Eigen DA support
│ ├── kona // Core Kona proving primitives
│ ├── proposer // Sequencing proposal submitter
│ ├── prover // Proof generation orcherstrator
│ ├── rpc // RPC server for introspection
│ ├── sync // Sequencing proposal tracker
│ └── validator // Sequencing proposal validator
└── justfile // Convenience commands
CLI
The CLI for Kailua the main entry point for all supported commands:
configInspect the configuration of a running rollupfast-trackFast-track migrate a rollup to use KailuaproposeStart the agent for publishing on-chain sequencing proposalsvalidateStart the agent for resolving on-chain Kailua disputesproveRun the prover to generate an execution/fault/validity prooftest-faultPublish a faulty sequencing proposal to test fault proofsbenchmarkBenchmark proving cost and performancedemoValidity prove any running OP Stack rolluprpcStart the RPC server for assisting withdrawalsbonsaiDownload a receipt from BonsaiboundlessDownload a receipt from BoundlessexportExport the FPVM binaries and their hardcoded image ids
Contracts
The contracts directory is a foundry project comprised of the following main contracts:
KailuaTournament.sol: Logic for resolving disputes between contradictory proposals.KailuaTreasury.sol: Logic for maintaining collateral and paying out provers for resolving disputes.KailuaGame.sol: Logic for introducing new sequencing proposals.KailuaLib.sol: Misc. utilities.
The kailua-contracts crate builds and exports these contracts in Rust.
FPVM
The Kailua FPVM executes Optimism's Kona inside the RISC Zero zkVM to derive and execute optimism blocks and create fault proofs.
The following project components work together to enable this functionality:
build/risczero/kona: The zkVM binary to create ZK fault proofs withKona.crates/kona: A wrapper crate aroundKonawith utilities for efficient ZK fault proving.crates/prover: An orchestrator for proof generation locally, remotely on Bonsai, or through Boundless.
Rollups with alternative DA requirements are supported through the following components:
build/risczero/hokulea: The zkVM binary for rollups on EigenDA.build/risczero/hana: The zkVM binary for rollups on Celestia.crates/hokulea: A wrapper crate aroundkailua-konawith Eigen DA support.crates/hokulea: A wrapper crate aroundkailua-konawith Celestia DA support.