Skip to content

Commit f0e8fbe

Browse files
feat(coordinator): add version check for sdk provers (#1551)
Co-authored-by: 0xmountaintop <[email protected]>
1 parent 2059b49 commit f0e8fbe

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

common/version/prover_version.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import (
99

1010
// CheckScrollProverVersion check the "scroll-prover" version, if it's different from the local one, return false
1111
func CheckScrollProverVersion(proverVersion string) bool {
12+
if strings.HasPrefix(proverVersion, "sdk") {
13+
return CheckProverSDKVersion(proverVersion)
14+
}
15+
1216
// note the version is in fact in the format of "tag-commit-scroll_prover-halo2",
1317
// so split-by-'-' length should be 4
1418
remote := strings.Split(proverVersion, "-")
@@ -23,8 +27,18 @@ func CheckScrollProverVersion(proverVersion string) bool {
2327
return remote[2] == local[2]
2428
}
2529

30+
// CheckProverSDKVersion check prover sdk version, it simply returns true for now,
31+
// and more checks will be added as we evolve.
32+
func CheckProverSDKVersion(proverVersion string) bool {
33+
return true
34+
}
35+
2636
// CheckScrollRepoVersion checks if the proverVersion is at least the minimum required version.
2737
func CheckScrollRepoVersion(proverVersion, minVersion string) bool {
38+
if strings.HasPrefix(proverVersion, "sdk") {
39+
return CheckProverSDKWithMinVersion(proverVersion, minVersion)
40+
}
41+
2842
c, err := semver.NewConstraint(">= " + minVersion + "-0")
2943
if err != nil {
3044
log.Error("failed to initialize constraint", "minVersion", minVersion, "error", err)
@@ -39,3 +53,9 @@ func CheckScrollRepoVersion(proverVersion, minVersion string) bool {
3953

4054
return c.Check(v)
4155
}
56+
57+
// CheckProverSDKWithMinVersion check prover sdk version is at least the minimum required version, it simply returns true for now,
58+
// and more checks will be added as we evolve.
59+
func CheckProverSDKWithMinVersion(proverVersion string, minVersion string) bool {
60+
return true
61+
}

common/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"runtime/debug"
66
)
77

8-
var tag = "v4.4.71"
8+
var tag = "v4.4.72"
99

1010
var commit = func() string {
1111
if info, ok := debug.ReadBuildInfo(); ok {

0 commit comments

Comments
 (0)