Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Kona guide #1223

wants to merge 10 commits into from

Conversation

krofax
Copy link
Contributor

@krofax krofax commented Jan 6, 2025

Description

This is an high level guide to Kona, an alternative fault-proof program for the OP Stack.

Tests

Additional context

Metadata

@krofax krofax requested a review from a team as a code owner January 6, 2025 16:08
Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit b6d0e6a
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/67911af85cb5510008fd07c6
😎 Deploy Preview https://deploy-preview-1223--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Jan 6, 2025

📝 Walkthrough

Walkthrough

This pull request introduces documentation updates across multiple files in the Optimism documentation repository. The changes primarily focus on two main aspects: renaming "Further reading" sections to "Next steps" in various documentation files, and adding documentation for the new Kona Fault Proof Virtual Machine (FPVM). A new page for Kona has been created in the fault proofs section, providing detailed information about its implementation, architecture, and role in the OP Stack ecosystem. Additionally, the words.txt file has been updated with new terms related to the Kona and Asterisc fault proof systems. The modifications aim to improve documentation clarity and provide more comprehensive information about the latest developments in the Optimism fault proof infrastructure.

Sequence Diagram

sequenceDiagram
    participant User
    participant Docs
    participant Kona FPVM
    participant Asterisc FPVM

    User->>Docs: Access Fault Proofs Documentation
    Docs->>User: Display Kona FPVM Information
    User->>Kona FPVM: Explore Implementation Details
    Kona FPVM-->>User: Provide Step-by-Step Execution Info
    User->>Asterisc FPVM: Compare Implementations
    Asterisc FPVM-->>User: Show Architectural Differences
Loading

Possibly related PRs

Suggested labels

flag:merge-pending-release

Suggested reviewers

  • sbvegan

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b40b78 and 5168f74.

📒 Files selected for processing (9)
  • pages/chain/identity/individuals.mdx (1 hunks)
  • pages/chain/identity/projects.mdx (1 hunks)
  • pages/stack/fault-proofs.mdx (1 hunks)
  • pages/stack/fault-proofs/_meta.json (1 hunks)
  • pages/stack/fault-proofs/cannon.mdx (2 hunks)
  • pages/stack/fault-proofs/explainer.mdx (1 hunks)
  • pages/stack/fault-proofs/kona.mdx (1 hunks)
  • pages/stack/fault-proofs/mips.mdx (1 hunks)
  • words.txt (7 hunks)
✅ Files skipped from review due to trivial changes (5)
  • pages/stack/fault-proofs/_meta.json
  • pages/chain/identity/projects.mdx
  • pages/stack/fault-proofs/mips.mdx
  • pages/stack/fault-proofs/cannon.mdx
  • pages/chain/identity/individuals.mdx
🧰 Additional context used
📓 Path-based instructions (3)
pages/stack/fault-proofs/explainer.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
pages/stack/fault-proofs.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
pages/stack/fault-proofs/kona.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
🪛 LanguageTool
pages/stack/fault-proofs/explainer.mdx

[style] ~108-~108: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...plainer guide on cannon. * Read about the [components of the fault proo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (1)
words.txt (1)

13-13: LGTM!

The new terms are properly capitalized and alphabetically sorted.

Also applies to: 16-16, 155-155, 177-177, 207-207, 305-305, 341-341, 417-417

pages/stack/fault-proofs/explainer.mdx Outdated Show resolved Hide resolved
pages/stack/fault-proofs/explainer.mdx Outdated Show resolved Hide resolved
pages/stack/fault-proofs.mdx Outdated Show resolved Hide resolved
pages/stack/fault-proofs/kona.mdx Show resolved Hide resolved
pages/stack/fault-proofs/kona.mdx Outdated Show resolved Hide resolved
pages/stack/fault-proofs/kona.mdx Outdated Show resolved Hide resolved
krofax and others added 4 commits January 6, 2025 17:19
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@krofax krofax changed the title Kona Guide Kona guide Jan 6, 2025
@krofax krofax requested a review from pauldowman January 17, 2025 14:07
Copy link
Contributor

@pauldowman pauldowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I left a bunch of inline comments.

@krofax
Copy link
Contributor Author

krofax commented Jan 21, 2025

Thanks! I left a bunch of inline comments.

Thanks for your review, I've resolved your comments.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
pages/stack/fault-proofs/kona.mdx (2)

10-10: Add missing comma for better readability.

Add a comma after "OP Stack" to improve sentence structure.

Apply this diff:

-Kona is an alternative fault-proof program for the OP Stack providing a Rust-based implementation
+Kona is an alternative fault-proof program for the OP Stack, providing a Rust-based implementation
🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: Possible missing comma found.
Context: ...uivalent system to Cannon and op-program but with distinct architectural and impleme...

(AI_HYDRA_LEO_MISSING_COMMA)


56-78: Add language identifiers to code blocks.

For better syntax highlighting and documentation consistency, add language identifiers to all code blocks.

Apply these changes:

-    ```bash
+    ```shell
     git clone https://github.com/anton-rs/kona.git
     cd kona
     ```

-    ```bash
+    ```shell
     curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
     rustup install stable
     ```

-    ```bash
+    ```shell
     cargo build --release
     ```

-    ```bash
+    ```shell
     cargo test
     ```
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5dd71f and 267e731.

📒 Files selected for processing (3)
  • pages/stack/fault-proofs.mdx (1 hunks)
  • pages/stack/fault-proofs/_meta.json (1 hunks)
  • pages/stack/fault-proofs/kona.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pages/stack/fault-proofs/_meta.json
🧰 Additional context used
📓 Path-based instructions (2)
pages/stack/fault-proofs.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
pages/stack/fault-proofs/kona.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
🪛 LanguageTool
pages/stack/fault-proofs/kona.mdx

[uncategorized] ~10-~10: Possible missing comma found.
Context: ...uivalent system to Cannon and op-program but with distinct architectural and impleme...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
  • GitHub Check: pr-workflow
🔇 Additional comments (2)
pages/stack/fault-proofs.mdx (2)

11-11: LGTM! Clear and concise description.

The updated description effectively communicates the scope of the documentation while maintaining proper capitalization of technical terms.


16-16: LGTM! Card added with correct formatting.

The new card follows the established pattern and properly links to the Kona documentation.

pages/stack/fault-proofs/kona.mdx Outdated Show resolved Hide resolved
* 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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

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.

  • Remove the link and add a TODO comment: {/* TODO: Add link to Asterisc documentation once available */}
🔗 Analysis chain

Fix 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:

  1. Remove the link and add a TODO comment, or
  2. Link to an existing resource about Asterisc
🏁 Scripts executed

The 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

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@krofax
Copy link
Contributor Author

krofax commented Jan 22, 2025

@pauldowman This is ready for another review.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
pages/stack/fault-proofs/kona.mdx (1)

10-10: Add missing comma for better readability

Add a comma before "but" in the compound sentence.

-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.
+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.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: Possible missing comma found.
Context: ...uivalent system to Cannon and op-program but with distinct architectural and impleme...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 267e731 and b6d0e6a.

📒 Files selected for processing (1)
  • pages/stack/fault-proofs/kona.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/stack/fault-proofs/kona.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
🪛 LanguageTool
pages/stack/fault-proofs/kona.mdx

[uncategorized] ~10-~10: Possible missing comma found.
Context: ...uivalent system to Cannon and op-program but with distinct architectural and impleme...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
  • GitHub Check: pr-workflow
🔇 Additional comments (6)
pages/stack/fault-proofs/kona.mdx (6)

1-6: LGTM! Frontmatter follows documentation guidelines.

The title, sidebar label, and description are properly formatted and provide clear, accurate information.


13-13: Standardize header casing

According to the coding guidelines, H2 headers should use sentence case.

-## Overview
+## Overview

33-33: Fix broken documentation link

The Asterisc documentation file doesn't exist yet.

-For more on Asterisc, see the [Asterisc documentation](./asterisc.mdx).
+For more on Asterisc, see the [Asterisc documentation](./asterisc.mdx).
{/* TODO: Add link to Asterisc documentation once available */}

53-82: LGTM! Clear and well-structured setup instructions.

The step-by-step guide with code examples is clear and easy to follow.


83-99: LGTM! Clear presentation of benefits and limitations.

The sections provide a balanced view of Kona's capabilities and constraints.


100-106: LGTM! Comprehensive list of resources.

The next steps section provides valuable links for further learning.

description: "Learn about Kona and its default operation as part of Optimism's Fault Proof Virtual Machine."
---

# FPVM: Kona
Copy link
Contributor

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.

-# FPVM: Kona
+# Fault proof program - Kona
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# FPVM: Kona
# Fault proof program - Kona

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants