-
Notifications
You must be signed in to change notification settings - Fork 623
fix coordiantor assign bug #1621
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
Conversation
WalkthroughThis pull request updates the software version tag and refactors hard-fork validation in prover tasks. The version tag in Changes
Possibly related PRs
Suggested reviewers
Poem
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.62.2)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"" 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…scroll into fix/coordinator_assign_task
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1621 +/- ##
===========================================
+ Coverage 41.32% 41.40% +0.08%
===========================================
Files 222 222
Lines 18226 18236 +10
===========================================
+ Hits 7531 7551 +20
+ Misses 9963 9952 -11
- Partials 732 733 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
Makefile
(1 hunks)coordinator/internal/logic/provertask/bundle_prover_task.go
(3 hunks)coordinator/internal/orm/orm_test.go
(1 hunks)coordinator/test/api_test.go
(1 hunks)rollup/internal/config/config.go
(1 hunks)rollup/internal/controller/sender/sender_test.go
(1 hunks)rollup/internal/controller/watcher/watcher_test.go
(1 hunks)rollup/internal/orm/orm_test.go
(1 hunks)rollup/tests/bridge_test.go
(1 hunks)tests/integration-test/integration_test.go
(1 hunks)
✅ Files skipped from review due to trivial changes (8)
- tests/integration-test/integration_test.go
- coordinator/internal/orm/orm_test.go
- rollup/internal/controller/watcher/watcher_test.go
- coordinator/test/api_test.go
- rollup/internal/config/config.go
- rollup/internal/controller/sender/sender_test.go
- rollup/internal/orm/orm_test.go
- rollup/tests/bridge_test.go
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: tests
🔇 Additional comments (5)
coordinator/internal/logic/provertask/bundle_prover_task.go (5)
20-23
: LGTM: Clean import organizationThe imports have been properly organized, separating the scroll-tech common packages from external dependencies.
78-80
: LGTM: Clean variable declarationProper variable declaration for
hardForkName
that will hold the return value from the hardForkSanityCheck function.
104-106
: LGTM: Task context setupSetting the task type and bundleTask before performing the hard fork sanity check is a logical flow.
168-173
: LGTM: Consistent error handling with recoveryThe error handling consistently uses the hardForkName from the sanity check result. This maintains atomicity by recovering attempts on failure.
107-112
:✅ Verification successful
Verify the error handling behavior for concurrent prover operations
The addition of
hardForkSanityCheck
appears to be part of a refactoring to centralize hard-fork name validation. However, the PR objectives mention fixing a bug related to concurrent prover operations not giving the coordinator enough time to recover. This error path may play a role in that fix by returning early withnil
instead of an error.
🏁 Script executed:
#!/bin/bash # Search for the hardForkSanityCheck implementation to understand its behavior ast-grep --pattern 'func (bp *BundleProverTask) hardForkSanityCheck' -A 30Length of output: 76
I'll try a broader search to locate the implementation of
hardForkSanityCheck
since the initial attempt returned no output. Please run the following script to search for any occurrence of "hardForkSanityCheck" within the codebase:If this search still produces no output, please perform a manual verification of the presence and implementation of
hardForkSanityCheck
to ensure its behavior aligns with the intended error handling for concurrent prover operations.
🏁 Script executed:
#!/bin/bash # Search for any occurrence of "hardForkSanityCheck" in the repository to locate its definition or references. rg "hardForkSanityCheck" -A 30Length of output: 13050
Review: Early Return on HardForkSanityCheck Failure is Consistent and Intentional
After reviewing the code, we found that:
- The
hardForkSanityCheck
function (located incoordinator/internal/logic/provertask/prover_task.go
) returns an error if the hard fork name extracted from the context isn’t present in the task context’s list.- In
bundle_prover_task.go
, the result of this check is handled by logging a debug message and returningnil, nil
if an error occurs. This early return prevents further dispatching of the same failing task.- Similar handling is observed in chunk and batch prover tasks, confirming a consistent refactoring approach aimed at preventing concurrent prover operations from overloading or destabilizing the coordinator.
This approach appears intentional to allow the coordinator extra time to recover from transient issues, aligning with the PR objective to address the bug related to concurrent prover operations.
Purpose or design rationale of this PR
Describe your change. Make sure to answer these three questions: What does this PR do? Why does it do it? How does it do it?
The bug:
when provers try it more concurrently, there is no time for the coordinator to recover the attempts.
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:
Deployment tag versioning
Has
tag
incommon/version.go
been updated or have you addedbump-version
label to this PR?Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit