-
Notifications
You must be signed in to change notification settings - Fork 624
[Fix] Compatible with prover from 4.5.33 #1733
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import ( | |
"gorm.io/gorm" | ||
|
||
"scroll-tech/common/types/message" | ||
"scroll-tech/common/version" | ||
|
||
"scroll-tech/coordinator/internal/config" | ||
"scroll-tech/coordinator/internal/logic/libzkp" | ||
|
@@ -201,6 +202,23 @@ func (b *BaseProverTask) applyUniversal(schema *coordinatorType.GetTaskSchema) ( | |
return schema, []byte(metadata), nil | ||
} | ||
|
||
const CompatibilityVersion = "4.5.43" | ||
|
||
func isCompatibilityFixingVersion(ver string) bool { | ||
return !version.CheckScrollRepoVersion(ver, CompatibilityVersion) | ||
} | ||
Comment on lines
+205
to
+209
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVersion gate likely inverted and threshold appears inconsistent with PR intent.
Proposed if the fix targets >= 4.5.33: -const CompatibilityVersion = "4.5.43"
+const CompatibilityVersion = "4.5.33"
@@
-func isCompatibilityFixingVersion(ver string) bool {
- return !version.CheckScrollRepoVersion(ver, CompatibilityVersion)
-}
+func isCompatibilityFixingVersion(ver string) bool {
+ // apply fix for provers >= 4.5.33
+ return version.CheckScrollRepoVersion(ver, CompatibilityVersion)
+} To verify usages and avoid regressions, run: If the fix is intended for “older than X,” replace X with the true minimum and keep the negation, but please update the comment to state that explicitly. 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -nP 'CompatibilityVersion|isCompatibilityFixingVersion\s*\(' -C3
rg -nP 'CheckScrollRepoVersion\(' common/version Length of output: 2956 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Dump implementation of CheckScrollRepoVersion
sed -n '1,200p' common/version/prover_version.go
# Dump tests for CheckScrollRepoVersion
sed -n '1,200p' common/version/prover_version_test.go Length of output: 3503 Align CompatibilityVersion and predicate with intended target version
🤖 Prompt for AI Agents
|
||
|
||
func fixCompatibility(schema *coordinatorType.GetTaskSchema) error { | ||
|
||
fixedTask, err := libzkp.UnivTaskCompatibilityFix(schema.TaskData) | ||
if err != nil { | ||
return err | ||
} | ||
schema.TaskData = fixedTask | ||
|
||
return nil | ||
} | ||
|
||
func newGetTaskCounterVec(factory promauto.Factory, taskType string) *prometheus.CounterVec { | ||
getTaskCounterInitOnce.Do(func() { | ||
getTaskCounterVec = factory.NewCounterVec(prometheus.CounterOpts{ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.