Skip to content

Commit a55c7bd

Browse files
authored
refactor(coordinator): remove outdated logic (#1668)
Co-authored-by: colinlyguo <[email protected]>
1 parent 47b1a03 commit a55c7bd

File tree

4 files changed

+2
-90
lines changed

4 files changed

+2
-90
lines changed

common/libzkp/impl/src/verifier.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#![allow(static_mut_refs)]
22

3-
mod euclid;
43
mod euclidv2;
5-
64
use anyhow::{bail, Result};
7-
use euclid::EuclidVerifier;
85
use euclidv2::EuclidV2Verifier;
96
use serde::{Deserialize, Serialize};
107
use std::{cell::OnceCell, path::Path, rc::Rc};
@@ -42,26 +39,14 @@ pub struct VerifierConfig {
4239
type HardForkName = String;
4340

4441
struct VerifierPair(HardForkName, Rc<Box<dyn ProofVerifier>>);
45-
46-
static mut VERIFIER_LOW: OnceCell<VerifierPair> = OnceCell::new();
4742
static mut VERIFIER_HIGH: OnceCell<VerifierPair> = OnceCell::new();
4843

4944
pub fn init(config: VerifierConfig) {
50-
let verifier = EuclidVerifier::new(&config.high_version_circuit.assets_path);
51-
unsafe {
52-
VERIFIER_LOW
53-
.set(VerifierPair(
54-
"euclid".to_string(),
55-
Rc::new(Box::new(verifier)),
56-
))
57-
.unwrap_unchecked();
58-
}
59-
6045
let verifier = EuclidV2Verifier::new(&config.high_version_circuit.assets_path);
6146
unsafe {
6247
VERIFIER_HIGH
6348
.set(VerifierPair(
64-
"euclidV2".to_string(),
49+
config.high_version_circuit.fork_name,
6550
Rc::new(Box::new(verifier)),
6651
))
6752
.unwrap_unchecked();
@@ -70,12 +55,6 @@ pub fn init(config: VerifierConfig) {
7055

7156
pub fn get_verifier(fork_name: &str) -> Result<Rc<Box<dyn ProofVerifier>>> {
7257
unsafe {
73-
if let Some(verifier) = VERIFIER_LOW.get() {
74-
if verifier.0 == fork_name {
75-
return Ok(verifier.1.clone());
76-
}
77-
}
78-
7958
if let Some(verifier) = VERIFIER_HIGH.get() {
8059
if verifier.0 == fork_name {
8160
return Ok(verifier.1.clone());

common/libzkp/impl/src/verifier/euclid.rs

Lines changed: 0 additions & 65 deletions
This file was deleted.

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.5.17"
8+
var tag = "v4.5.18"
99

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

coordinator/internal/logic/auth/login.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"github.com/scroll-tech/go-ethereum/log"
1010
"gorm.io/gorm"
1111

12-
"scroll-tech/common/types/message"
1312
"scroll-tech/common/version"
1413

1514
"scroll-tech/coordinator/internal/config"
@@ -34,7 +33,6 @@ func NewLoginLogic(db *gorm.DB, cfg *config.Config, vf *verifier.Verifier) *Logi
3433

3534
var highHardForks []string
3635
highHardForks = append(highHardForks, cfg.ProverManager.Verifier.HighVersionCircuit.ForkName)
37-
highHardForks = append(highHardForks, message.EuclidFork, message.EuclidV2Fork)
3836
proverVersionHardForkMap[cfg.ProverManager.Verifier.HighVersionCircuit.MinProverVersion] = highHardForks
3937

4038
return &LoginLogic{

0 commit comments

Comments
 (0)