Skip to content

Generating absolute prestate and preimage files for permissionless proofs #1610

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

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

Conversation

krofax
Copy link
Collaborator

@krofax krofax commented May 15, 2025

Description

This PR adds documentation to guide chain operators on how to generate absolute prestate and preimage files needed for running cannon/permissionless proofs on the OP Stack.

Changes

  • Add step-by-step guide for generating absolute prestate files
  • Include instructions for using the latest 64-bit MIPS multi-threaded Cannon
  • Document the process for both chains in the Superchain Registry and custom chains
  • Add troubleshooting section and next steps
  • Include reference to official prestate hashes in the Superchain Registry
  • Mark sections that require SME review for completion

Why this Is Important

As chains migrate from permissioned to permissionless fault proofs, operators need clear guidance on generating and managing the required prestate files. This documentation fills a critical gap for operators deploying or upgrading their chains to use permissionless proofs.

Tests

Additional context

Metadata

Copy link

netlify bot commented May 15, 2025

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit d3fd8a6
🔍 Latest deploy log https://app.netlify.com/projects/docs-optimism/deploys/682b6af8918f420008218f1e
😎 Deploy Preview https://deploy-preview-1610--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 project configuration.

@krofax krofax marked this pull request as ready for review May 19, 2025 17:26
@krofax krofax requested a review from a team as a code owner May 19, 2025 17:26
Copy link
Contributor

coderabbitai bot commented May 19, 2025

📝 Walkthrough

Walkthrough

The changes introduce a new tutorial titled "Generating absolute prestate and preimage files" for chain operators, explaining how to prepare these files for permissionless fault proofs on the OP Stack. The tutorial is added as a new Markdown file and referenced in the tutorials listing and metadata JSON. Additionally, the order of existing tutorial cards is adjusted, specifically moving the "Deploying new dispute games with OPCM" card and inserting the new tutorial card immediately after it. The metadata JSON is updated to include entries for both the dispute games and absolute prestate tutorials.

Sequence Diagram(s)

sequenceDiagram
    participant Operator
    participant DocsSite
    participant MetadataJSON
    participant TutorialsList

    Operator->>DocsSite: Access tutorials page
    DocsSite->>MetadataJSON: Load tutorial entries
    DocsSite->>TutorialsList: Render tutorials in new order
    Operator->>DocsSite: Select "Generating absolute prestate and preimage files"
    DocsSite->>Operator: Display new tutorial content
Loading
sequenceDiagram
    participant Operator
    participant GitRepo
    participant BuildSystem
    participant OpChallenger

    Operator->>GitRepo: Clone Optimism monorepo
    Operator->>GitRepo: Checkout release tag
    Operator->>BuildSystem: Build op-program binary
    Operator->>BuildSystem: Generate absolute prestate file
    BuildSystem-->>Operator: Output prestate hashes and preimage file
    Operator->>OpChallenger: Configure with prestate and preimage files
    OpChallenger-->>Operator: Ready for permissionless fault proofs
Loading

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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: 2

🧹 Nitpick comments (4)
pages/operators/chain-operators/tutorials/_meta.json (1)

8-9: Ensure consistent JSON spacing.
Add a space after the colon in the new entries to match the existing style of key–value pairs.

Apply this diff:

-    "dispute-games":"Deploying new dispute games with OPCM",
+    "dispute-games": "Deploying new dispute games with OPCM",
-    "absolute-prestate":"Generating absolute prestate and preimage files",
+    "absolute-prestate": "Generating absolute prestate and preimage files",
pages/operators/chain-operators/tutorials/absolute-prestate.mdx (3)

1-15: Frontmatter validation and title casing.
All required metadata fields are present and non-empty. Please confirm that topic: generating absolute prestate files is a valid key in keywords.config.yaml.
Additionally, page names should use Title Case in the title frontmatter:

- title: Generating absolute prestate and preimage files
+ title: Generating Absolute Prestate and Preimage Files

123-129: Capitalize the proper noun “Superchain Registry.”
The registry name should have both words capitalized:

-## Official prestate hashes for Superchain registry chains
+## Official prestate hashes for Superchain Registry chains

245-247: Header sentence case.
Use sentence case for headers; change “Next Steps” to:

-## Next Steps
+## Next steps
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between ce2b7c7 and 6825305.

📒 Files selected for processing (3)
  • pages/operators/chain-operators/tutorials.mdx (1 hunks)
  • pages/operators/chain-operators/tutorials/_meta.json (1 hunks)
  • pages/operators/chain-operators/tutorials/absolute-prestate.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.mdx`: "ALWAYS review Markdown content THOROUGHLY with the following criteria: - First, check the frontmatter section at the top of the file: 1. For regular pages, ensure AL...

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

  • First, check the frontmatter section at the top of the file:
    1. For regular pages, ensure ALL these fields are present and not empty:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    personas: [non-empty array]
    categories: [non-empty array]
    content_type: [valid type]
    ---
    1. For landing pages (index.mdx or files with ), only these fields are required:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    ---
    1. If any required fields are missing or empty, comment:
      'This file appears to be missing required metadata. Please check keywords.config.yaml for valid options and add the required fields manually. You can validate your changes by running:
    pnpm validate-metadata
    ```'
  • 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/operators/chain-operators/tutorials.mdx
  • pages/operators/chain-operators/tutorials/absolute-prestate.mdx
🪛 LanguageTool
pages/operators/chain-operators/tutorials/absolute-prestate.mdx

[misspelling] ~33-~33: This word is normally spelled as one.
Context: ... and memory ## Using the latest AP and multi-threaded Cannon As of the latest releases, OP S...

(EN_COMPOUNDS_MULTI_THREADED)


[misspelling] ~35-~35: This word is normally spelled as one.
Context: ...chains should utilize the 64-bit MIPS multi-threaded version of Cannon. This upgrade offers...

(EN_COMPOUNDS_MULTI_THREADED)


[grammar] ~72-~72: The verb ‘prestate’ does not usually follow articles like ‘the’. Check that ‘prestate’ is spelled correctly; using ‘prestate’ as a noun may be non-standard.
Context: ...enerate the absolute prestate Generate the prestate by running the op-program binary direct...

(A_INFINITIVE)


[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...three prestate hashes: * Cannon64: The current production absolute prestat...

(UNLIKELY_OPENING_PUNCTUATION)


[grammar] ~109-~109: The verb ‘prestate’ does not usually follow articles like ‘the’. Check that ‘prestate’ is spelled correctly; using ‘prestate’ as a noun may be non-standard.
Context: ...e the preimage file After generating the prestate, find the preimage file. You should s...

(A_INFINITIVE)


[duplication] ~135-~135: Possible typo: you repeated a word.
Context: ...onfiguration. This applies to: * New chains * Chains with custom configurations For these c...

(ENGLISH_WORD_REPEAT_RULE)


[grammar] ~168-~168: The verb ‘prestate’ does not usually follow articles like ‘the’. Check that ‘prestate’ is spelled correctly; using ‘prestate’ as a noun may be non-standard.
Context: ...rocess using op-deployer. ### Generate the prestate From the root of the monorepo, run: `...

(A_INFINITIVE)


[grammar] ~248-~248: This phrase is duplicated. You should probably use “fault proofs” only once.
Context: ...games) * Migrating to permissionless fault proofs * [Fault proofs explainer](/stack/fault-proofs/explaine...

(PHRASE_REPETITION)

🔇 Additional comments (2)
pages/operators/chain-operators/tutorials.mdx (2)

43-44: New tutorial card approved.
The insertion of the “Deploying new dispute games with OPCM” card follows the sentence-case style of surrounding entries and the href matches the new tutorial file.


45-46: New tutorial card approved.
The “Generating absolute prestate and preimage files” card is correctly placed, uses sentence case, and the href points to the added MDX file.

@krofax krofax marked this pull request as draft May 19, 2025 17:31
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

2 participants