FPVM: Kona
Kona is an alternative fault-proof program for the OP Stack, providing a Rust-based implementation to complement the Asterisc fault-proof VM. Together, they form an equivalent system to Cannon and op-program but with distinct architectural and implementation differences.
Overview
Kona works as the fault-proof program within the Asterisc fault-proof system. It operates by executing program logic step-by-step and generating commitments for every state transition. These commitments allow disputing parties to identify and resolve divergences in execution traces through interactive fraud proofs.
Key features of Kona include:
- Written in Rust: High performance and memory safety.
- Optimized for Asterisc: Specifically tailored to work with the Asterisc RISC-V-based fault-proof VM.
- Deterministic Execution: Ensures consistency in state transitions during disputes.
Kona + Asterisc is analogous to Cannon + op-program, providing an alternative pathway to secure optimistic rollups.
Relationship to Asterisc
Kona is designed to:
- Complement Asterisc, which serves as the RISC-V fault-proof VM.
- Validate execution traces using the interactive fraud-proof mechanism.
- Offer an alternative to the Cannon + op-program system, leveraging Rust and RISC-V for distinct performance characteristics.
For more on Asterisc, see the Asterisc documentation.
Key differences
Architecture
System | Fault-Proof VM | Fault-Proof Program | Language | Architecture |
---|---|---|---|---|
Asterisc + Kona | Asterisc | Kona | Rust | RISC-V |
Cannon + op-program | Cannon | op-program | Go | MIPS |
Performance
- Kona benefits from Rust's memory safety and performance optimizations.
- Asterisc uses RISC-V, offering a simpler and more adaptable instruction set.
Getting started
To set up and use Kona, follow these steps:
-
Clone the repository:
git clone https://github.com/anton-rs/kona.git cd kona
-
Install Dependencies: Ensure you have the Rust toolchain installed. Use
rustup
to set up Rust:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup install stable
-
Compile the program: Build the Kona fault-proof program:
cargo build --release
-
Run Tests: Execute the test suite to verify your setup:
cargo test
-
Explore further documentation: Check the Kona repo docs (opens in a new tab) for advanced usage and implementation details.
Benefits of Kona
-
Rust-Based Implementation:
- Provides performance advantages and memory safety.
-
Integration with Asterisc:
- Designed to fully utilize the RISC-V-based VM's capabilities.
-
Focused Functionality:
- Tailored for the OP Stack's fault-proofing needs without additional complexity.
Limitations
Kona is not a general-purpose program and is specifically designed for use within the Optimism fault-proofing stack. It does not support arbitrary RISC-V programs, focusing solely on its role as the fault-proof program for Asterisc.
Kona is currently in the experimental stage. While it provides a functional alternative, it may lack the maturity and stability of Cannon + op-program. Users are encouraged to contribute to its development and provide feedback.