Quick Start
This tutorial will run you through on how to spin up a local OP Kailua devnet for development purposes.
Before you get started, you will need the following dependencies installed:
Clone the Kailua repo
git clone https://github.com/risc0/kailua.git && cd kailuaRun the following commands to spin up a 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-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.