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:
config
Inspect the configuration of a running rollupfast-track
Fast-track migrate a rollup to use Kailuapropose
Start the agent for publishing on-chain sequencing proposalsvalidate
Start the agent for resolving on-chain Kailua disputesprove
Run the prover to generate an execution/fault/validity prooftest-fault
Publish a faulty sequencing proposal to test fault proofsbenchmark
Benchmark proving cost and performancedemo
Validity prove any running OP Stack rolluprpc
Start the RPC server for assisting withdrawalsbonsai
Download a receipt from Bonsaiboundless
Download a receipt from Boundlessexport
Export 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 aroundKona
with 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-kona
with Eigen DA support.crates/hokulea
: A wrapper crate aroundkailua-kona
with Celestia DA support.