Skip to content

fix(coordinator): set v4.4.56 as minimum prover version #1641

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

Merged
merged 10 commits into from
Apr 11, 2025

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Apr 10, 2025

Purpose or design rationale of this PR

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • fix: A bug fix

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change

Summary by CodeRabbit

  • Chores
    • Updated the application version to v4.5.2.
  • Bug Fixes
    • Adjusted the login process to enhance compatibility with prior versions by implementing a hardcoded version check.
    • Increased minimum required prover versions for circuit configurations to improve compatibility with newer implementations.
    • Relaxed version acceptance criteria for prover compatibility checks.

Copy link

coderabbitai bot commented Apr 10, 2025

Walkthrough

This pull request updates the version tag in common/version/version.go from "v4.5.1" to "v4.5.2". Additionally, it modifies the Check method in coordinator/internal/logic/auth/login.go to use a hardcoded prover version of "v4.4.56" instead of a configurable minimum version. This change is intended for backward compatibility, with comments indicating that the hardcoded version is temporary until a future upgrade is implemented. The minimum prover versions in configuration files have also been updated.

Changes

File(s) Summary
common/version/version.go Updated the version tag from "v4.5.1" to "v4.5.2".
coordinator/internal/logic/auth/login.go Modified the Check method in LoginLogic to use a hardcoded version "v4.4.56" instead of a configurable minimum, with inline comments for clarity.
coordinator/cmd/api/app/mock_app.go, coordinator/test/api_test.go Updated MinProverVersion for LowVersionCircuit from "v4.2.0" to "v4.4.57" and for HighVersionCircuit from "v4.3.0" to "v4.4.89" in both files.
coordinator/internal/logic/provertask/prover_task.go Modified the hardForkSanityCheck method to use strings.HasPrefix for ProverVersion check instead of an exact match with "v4.4.56".

Possibly related PRs

Suggested labels

bump-version

Suggested reviewers

  • georgehao
  • yiweichi

Poem

I'm a coding rabbit, full of cheer,
Hopping through versions with a joyful gear.
A little bump in the tag, precise and fine,
And a hardcoded check keeping things in line.
Happy hops to our code—swift and divine!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (1.64.8)

level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package zstd: could not load export data: no export data for "github.com/scroll-tech/da-codec/encoding/zstd""
level=error msg="Running error: can't run linter goanalysis_metalinter\nbuildir: failed to load package zstd: could not load export data: no export data for "github.com/scroll-tech/da-codec/encoding/zstd""

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 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 7fa05a2 and d14fa7c.

📒 Files selected for processing (1)
  • coordinator/test/api_test.go (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • coordinator/test/api_test.go
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check

🪧 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 plan to trigger planning for file edits and PR creation.
  • @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.

yiweichi
yiweichi previously approved these changes Apr 10, 2025
Copy link

@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: 0

🧹 Nitpick comments (1)
coordinator/internal/logic/auth/login.go (1)

82-83: Error message inconsistency.

The error message references l.cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion but the actual check uses the hardcoded "v4.4.56". This could be confusing for users who see an error message with a different version than what's actually being enforced.

 	if !version.CheckScrollRepoVersion(login.Message.ProverVersion, "v4.4.56") {
-		return fmt.Errorf("incompatible prover version. please upgrade your prover, minimum allowed version: %s, actual version: %s",
-			l.cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion, login.Message.ProverVersion)
+		return fmt.Errorf("incompatible prover version. please upgrade your prover, minimum allowed version: %s, actual version: %s",
+			"v4.4.56", login.Message.ProverVersion)
 	}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a34c01d and 3f654df.

📒 Files selected for processing (2)
  • common/version/version.go (1 hunks)
  • coordinator/internal/logic/auth/login.go (1 hunks)
🔇 Additional comments (3)
common/version/version.go (1)

8-8: Version bump looks appropriate.

The version tag has been updated from v4.5.1 to v4.5.2, which aligns with the PR objectives to update deployment tag versioning.

coordinator/internal/logic/auth/login.go (2)

78-81: Temporary fix for backward compatibility looks appropriate.

The hardcoded version check is properly documented with a FIXME comment explaining the rationale and future plans. This approach maintains backward compatibility with older prover versions while allowing for the configuration to be used for other checks.


78-81: Don't forget to address the FIXME after Euclid upgrade.

The comment indicates this is a temporary solution until after the Euclid upgrade. Consider creating a follow-up task to track this technical debt and ensure it gets addressed at the appropriate time.

yiweichi
yiweichi previously approved these changes Apr 10, 2025
Copy link

@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: 0

🧹 Nitpick comments (1)
coordinator/internal/logic/provertask/prover_task.go (1)

124-125:

❓ Verification inconclusive

Approved: Version check relaxed to include patch versions

The change from exact matching to prefix matching allows prover versions like "v4.4.56-patch1" or "v4.4.56.1" to pass the check, which aligns with the PR objective of setting v4.4.56 as the minimum prover version.

Consider updating the comment on line 124 to explicitly mention that any version starting with "v4.4.56" is now accepted:

- // for backward compatibility, darwin chunk prover can still prove darwinV2 chunk tasks
+ // for backward compatibility, darwin chunk prover version v4.4.56 or any patched version (starting with v4.4.56) can still prove darwinV2 chunk tasks

Verify that the current implementation allows for proper version validation. Consider if you need more robust version comparison:


🏁 Script executed:

#!/bin/bash
# Check if there are any other version checks in the codebase that might need similar updates
rg -A 2 "ProverVersion\s*(==|!=)" --type go

Length of output: 45


Update Required: Comment and Manual Verification Request for Prover Version Check

The update to use a prefix match for prover versions (accepting versions like "v4.4.56-patch1" or "v4.4.56.1") is in line with relaxing the version check. Please update the comment on line 124 as follows:

- // for backward compatibility, darwin chunk prover can still prove darwinV2 chunk tasks
+ // for backward compatibility, darwin chunk prover version v4.4.56 or any patched version (starting with v4.4.56) can still prove darwinV2 chunk tasks

Additionally, the automated search for other version checks using == or != with ProverVersion produced no results. However, please perform a manual verification to ensure that no further parts of the codebase rely on an exact version match and require the same relaxation.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 97fabd3 and 3492e92.

📒 Files selected for processing (1)
  • coordinator/internal/logic/provertask/prover_task.go (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
coordinator/internal/logic/provertask/prover_task.go (2)
common/types/message/message.go (1)
  • ProofTypeChunk (41-41)
coordinator/internal/types/auth.go (1)
  • ProverVersion (20-20)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: rollup-db-cli
  • GitHub Check: rollup_relayer
  • GitHub Check: gas_oracle
  • GitHub Check: coordinator-cron
  • GitHub Check: bridgehistoryapi-db-cli
  • GitHub Check: bridgehistoryapi-fetcher
  • GitHub Check: coordinator-api
  • GitHub Check: bridgehistoryapi-api
  • GitHub Check: tests
  • GitHub Check: tests

omerfirmak
omerfirmak previously approved these changes Apr 11, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 41.42%. Comparing base (a34c01d) to head (d14fa7c).

Files with missing lines Patch % Lines
coordinator/cmd/api/app/mock_app.go 0.00% 2 Missing ⚠️
...ordinator/internal/logic/provertask/prover_task.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1641      +/-   ##
===========================================
+ Coverage    41.35%   41.42%   +0.07%     
===========================================
  Files          222      222              
  Lines        18319    18319              
===========================================
+ Hits          7575     7589      +14     
+ Misses       10004     9987      -17     
- Partials       740      743       +3     
Flag Coverage Δ
coordinator 34.41% <40.00%> (+0.41%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@colinlyguo colinlyguo merged commit 6b1b822 into develop Apr 11, 2025
6 checks passed
@colinlyguo colinlyguo deleted the fix-coordinator-mask-v4.4.56-prover-version branch April 11, 2025 08:35
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.

5 participants