Skip to content

Prover update for morph203#736

Merged
chengwenxi merged 1 commit intomainfrom
prover-morph203
Mar 26, 2025
Merged

Prover update for morph203#736
chengwenxi merged 1 commit intomainfrom
prover-morph203

Conversation

@chengwenxi
Copy link
Copy Markdown
Collaborator

@chengwenxi chengwenxi commented Mar 19, 2025

Summary by CodeRabbit

  • New Features

    • Updated contract verification settings across multiple network deployments to bolster security, enhance consistency, and support smoother interactions across environments.
    • Enhanced network hardfork support by integrating updated specifications for Morph networks, ensuring smoother operational performance and improved reliability for all users.
  • Documentation

    • Improved code block formatting in documentation to enhance clarity and readability for end users.

@chengwenxi chengwenxi requested a review from a team as a code owner March 19, 2025 04:19
@chengwenxi chengwenxi requested review from SecurityLife and removed request for a team March 19, 2025 04:19
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2025

Walkthrough

The changes update configuration values and formatting across multiple files. In the deploy configuration files under contracts, the programVkey property is updated with a new hexadecimal string. Minor formatting adjustments were made to the Cargo.toml and README.md in the prover package. In addition, the hardfork configuration was enhanced for Morph networks by adding a new field for the Morph203 block, an associated setter method, and updated logic to choose the correct specification ID based on block number.

Changes

Files Change Summary
contracts/src/deploy-config/holesky.ts
contracts/src/deploy-config/l1.ts
contracts/src/deploy-config/qanetl1.ts
contracts/src/deploy-config/sepolia.ts
contracts/src/deploy-config/testnetl1.ts
Updated programVkey from 0x0067523b285111b45b465b927d56449351e78d802252ccbf4bcf5eae588b7356 to 0x006c835a4c049b699a3675fefa51b182c7efe404a656151c0410245966724bc3 in the configuration object.
prover/Cargo.toml Removed five empty lines between the license declaration and the [workspace.dependencies] section.
prover/README.md Added a closing code block delimiter (```) after the cargo prove build command for proper formatting.
prover/crates/core/src/hardfork.rs Updated comments to reference Morph networks; added the morph203_block field and the set_morph203_block method in HardforkConfig; modified get_spec_id logic.

Sequence Diagram(s)

sequenceDiagram
    participant B as Block Number
    participant HC as HardforkConfig
    participant S as SpecId Selector
    B->>HC: Provide block number
    HC->>S: Check if block > morph203_block
    alt Block exceeds threshold
        S-->>HC: Return SpecId::MORPH203
    else Block below threshold
        S-->>HC: Return fallback SpecId
    end
Loading

Suggested reviewers

  • songyaoshun
  • FletcherMan

Poem

I’m a happy rabbit in the code field bright,
Hopping over changes with all my might.
New keys and blocks make the system sing,
Morph networks now take a brand-new wing.
Cheers to updates — a joyful byte delight!
🐰✨

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e896ae5 and 312d31b.

⛔ Files ignored due to path filters (1)
  • prover/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • contracts/src/deploy-config/holesky.ts (1 hunks)
  • contracts/src/deploy-config/l1.ts (1 hunks)
  • contracts/src/deploy-config/qanetl1.ts (1 hunks)
  • contracts/src/deploy-config/sepolia.ts (1 hunks)
  • contracts/src/deploy-config/testnetl1.ts (1 hunks)
  • prover/Cargo.toml (0 hunks)
  • prover/README.md (1 hunks)
  • prover/crates/core/src/hardfork.rs (4 hunks)
💤 Files with no reviewable changes (1)
  • prover/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: build
🔇 Additional comments (12)
prover/README.md (1)

29-29: Added missing code block closing delimiter.

This addition correctly closes the code block opened on line 27, improving the documentation formatting.

contracts/src/deploy-config/testnetl1.ts (1)

16-16:

Details

✅ Verification successful

Updated programVkey with new verification key.

The verification key has been updated to match the new prover implementation for Morph203.


🏁 Script executed:

#!/bin/bash
# Verify that the same programVkey value is used consistently across all deployment config files
echo "Checking for consistent programVkey across deployment configs:"
grep -r "programVkey:" --include="*.ts" contracts/src/deploy-config/ | sort

Length of output: 837


Consistency Verified: Updated Verification Key

The new programVkey has been consistently updated across all deployment configuration files in the repository, as confirmed by the verification script output. No discrepancies were found.

  • Files reviewed:
    • contracts/src/deploy-config/holesky.ts
    • contracts/src/deploy-config/l1.ts
    • contracts/src/deploy-config/qanetl1.ts
    • contracts/src/deploy-config/sepolia.ts
    • contracts/src/deploy-config/testnetl1.ts

The updated verification key correctly reflects the new prover implementation for Morph203.

contracts/src/deploy-config/l1.ts (1)

20-20: Updated programVkey with new verification key.

The verification key has been updated to match the new prover implementation for Morph203.

contracts/src/deploy-config/sepolia.ts (1)

21-21: Updated programVkey with new verification key.

The verification key has been updated to match the new prover implementation for Morph203.

contracts/src/deploy-config/qanetl1.ts (1)

19-19:

Details

✅ Verification successful

Verified the updated programVkey value

The change to the programVkey value appears to be consistent with similar changes across all configuration files as noted in the PR summary.


🏁 Script executed:

#!/bin/bash
# Verify that the programVkey value is consistent across all configuration files
echo "Checking programVkey consistency across config files:"
rg "programVkey: '.+'" --only-matching --no-filename contracts/src/deploy-config/ | sort | uniq -c

Length of output: 313


Verified: ProgramVkey value consistency confirmed
The updated programVkey value correctly appears in all deployment configuration files as intended. The shell script output shows that the same value is used across 5 instances in the configuration, which aligns with the PR summary.

contracts/src/deploy-config/holesky.ts (1)

17-17: Approved programVkey update

This change aligns with the programVkey updates in other configuration files, ensuring consistency across environments.

prover/crates/core/src/hardfork.rs (6)

16-17: Updated documentation to reflect Morph networks

The comment has been appropriately updated to reflect that the hardfork heights are for Morph networks.


19-30: Added MORPH203 to hardfork heights for all chain IDs

The hardfork heights have been properly expanded to include the new SpecId::MORPH203 for all Morph chain IDs, maintaining the same structure for consistency.


40-40: Added morph203_block field to HardforkConfig struct

The struct has been properly extended to support the new hardfork configuration.


50-50: Updated default_from_chain_id to initialize morph203_block

The method correctly initializes the new morph203_block field from the HARDFORK_HEIGHTS map, following the existing pattern for other blocks.


73-77: Added setter for morph203_block

The new setter method follows the same pattern as existing setters, maintaining code consistency.


84-85:

Details

✅ Verification successful

Updated get_spec_id to include MORPH203 logic

The method properly implements the chain of conditionals to return the appropriate SpecId based on block number, now including the new MORPH203 specification.


🏁 Script executed:

#!/bin/bash
# Check if there are any usages of get_spec_id that might need updates to handle the new SpecId
echo "Checking for get_spec_id usage patterns that might need updates:"
rg "get_spec_id|SpecId::MORPH203" -A 3 -B 3

Length of output: 3215


MORPH203 Spec Integration Verified

The updated get_spec_id logic now correctly returns SpecId::CURIE when the block number is less than morph203_block and defaults to SpecId::MORPH203 otherwise. Verification via the grep output shows that all usages—in hardfork.rs and in the executor builder—properly reference the new SpecId::MORPH203, ensuring consistency across the codebase.

  • prover/crates/core/src/hardfork.rs: The conditional chain in get_spec_id is updated as intended.
  • prover/crates/core/src/executor/builder.rs: Calls to get_spec_id correctly reflect the new spec logic.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@chengwenxi chengwenxi requested review from a team and anylots March 19, 2025 04:23
@chengwenxi chengwenxi merged commit 96e2b50 into main Mar 26, 2025
5 checks passed
@chengwenxi chengwenxi deleted the prover-morph203 branch March 26, 2025 06:59
chengwenxi added a commit that referenced this pull request Mar 26, 2025
This was referenced Nov 24, 2025
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