Quickstart
Kailua enables rollup operators to add a new fault proof system to their rollup via the Optimism DisputeGameFactory
contract.
Kailua's contracts rely on RISC-Zero zkVM proofs to finalize/dismiss output proposals, and are compatible with
Optimism's Bedrock contracts v1.4.0 and above.
Prerequisites
Live Chain
You can test out Kailua's validity proving on a running chain through the following commands:
just build- Compiles a release build of Kailua
just demo [BLOCKS_PER_PROOF] [L1_RPC] [BEACON_RPC] [L2_RPC] [OP_NODE_RPC]:- Runs the release build against the target chain endpoints.
- See here for advanced proving configuration
Local Devnet
You can deploy a local optimism devnet equipped with Kailua through the following commands:
just devnet-fetch- Fetches
v1.9.1of theoptimismmonorepo.
- Fetches
just devnet-build- Builds the local cargo and foundry projects.
just devnet-up- Starts a local OP Stack devnet using docker.
- Dumps the output into
devnetlog.txtfor inspection.
just devnet-upgrade- Upgrades the devnet to use the
KailuaGamecontract. - Assumes the default values of the local optimism devnet, but can take parameters.
- Upgrades the devnet to use the
just devnet-propose- Launches the Kailua proposer.
- This runs the sequences, which periodically creates new
KailuaGameinstances.
just devnet-validate- Launches the Kailua validator.
- This monitors
KailuaGameinstances for disputes and creates proofs to resolve them. - (VALIDITY PROVING) Use
just devnet-validate [block-height]to generate validity proofs to fast-forward finality until the specified L2 block height. - (DEVELOPMENT MODE): Use
RISC0_DEV_MODE=1to use fake proofs.
just devnet-rpc- Launches the Kailua RPC.
- This provides utility RPC methods for initiating withdrawals.
- Listens on http://127.0.0.1:1337 and ws://127.0.0.1:1337 by default.
just devnet-fault- Deploys a single
KailuaGameinstance with a faulty sequencing proposal. - Tests the validator's fault proving functionality.
- Tests the proposer's canonical chain tracking functionality.
- Deploys a single
- After you're done:
just devnet-downto stop the running docker containers.just devnet-cleanto cleanup the docker volumes.