-
Notifications
You must be signed in to change notification settings - Fork 264
Kona guide #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kona guide #1223
Changes from all commits
5168f74
b2e7f56
60929d8
78b8a33
0e9eea9
e44c215
c3b7a12
c5dd71f
267e731
b6d0e6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
title: "Fault proof program - Kona" | ||
lang: en-US | ||
sidebar_label: "Fault proof program: Kona" | ||
description: "Learn about Kona and its default operation as part of Optimism's Fault Proof Virtual Machine." | ||
--- | ||
|
||
# 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 | ||
krofax marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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](./asterisc.mdx). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Fix broken documentation link - Confirmed The verification confirms that the Asterisc documentation file does not exist. The presence of a commented-out link elsewhere in the file suggests this documentation is planned but not yet available.
🔗 Analysis chainFix broken documentation link. The link to the Asterisc documentation is broken as the file doesn't exist yet. Until the Asterisc documentation is available, either:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check if Asterisc documentation exists
fd -t f "asterisc.mdx" pages/stack/fault-proofs/
# Check for any references to Asterisc documentation
rg -i "asterisc.*\.mdx" pages/stack/fault-proofs/
Length of output: 206 Script: #!/bin/bash
# Search for any files with "asterisc" in their name
fd -t f -i "asterisc"
# Search for mentions of "asterisc" in content
rg -i "asterisc" -g "!{package-lock.json,yarn.lock}" -A 2 -B 2
Length of output: 4947 |
||
|
||
|
||
|
||
## 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: | ||
|
||
1. **Clone the repository:** | ||
```bash | ||
git clone https://github.com/anton-rs/kona.git | ||
cd kona | ||
``` | ||
|
||
2. **Install Dependencies:** | ||
Ensure you have the Rust toolchain installed. Use `rustup` to set up Rust: | ||
```bash | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
rustup install stable | ||
``` | ||
|
||
3. **Compile the program:** | ||
Build the Kona fault-proof program: | ||
```bash | ||
cargo build --release | ||
``` | ||
|
||
4. **Run Tests:** | ||
Execute the test suite to verify your setup: | ||
```bash | ||
cargo test | ||
``` | ||
|
||
5. **Explore further documentation:** | ||
Check the [Kona repo docs](https://github.com/anton-rs/kona) for advanced usage and implementation details. | ||
|
||
## Benefits of Kona | ||
|
||
1. **Rust-Based Implementation:** | ||
* Provides performance advantages and memory safety. | ||
|
||
2. **Integration with Asterisc:** | ||
* Designed to fully utilize the RISC-V-based VM's capabilities. | ||
|
||
3. **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. | ||
|
||
## Next steps | ||
|
||
* [Kona Repository](https://github.com/anton-rs/kona) | ||
* [Kona Book](https://anton-rs.github.io/kona/) | ||
* [Optimism Fault-Proofs Explainer](./explainer) | ||
* [Cannon Documentation](./cannon) | ||
{/* * [Asterisc Documentation](./asterisc) */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Fix inconsistent header
The H1 header should match the format used in the frontmatter title for consistency.
📝 Committable suggestion