Skip to content

Commit 9b5c42e

Browse files
author
colinlyguo
committed
tweak logs
1 parent 60877d3 commit 9b5c42e

File tree

7 files changed

+10
-23
lines changed

7 files changed

+10
-23
lines changed

common/types/message/message.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77

88
"github.com/scroll-tech/go-ethereum/common"
99
"github.com/scroll-tech/go-ethereum/common/hexutil"
10-
"github.com/scroll-tech/go-ethereum/log"
1110
)
1211

1312
const (
@@ -108,7 +107,6 @@ type ChunkProof interface {
108107

109108
// NewChunkProof creates a new ChunkProof instance.
110109
func NewChunkProof(hardForkName string) ChunkProof {
111-
log.Info("NewChunkProof", "hardForkName", hardForkName, "euclidForkName", EuclidFork, "euclidV2ForkName", EuclidV2Fork)
112110
switch hardForkName {
113111
case EuclidFork, EuclidV2Fork:
114112
return &OpenVMChunkProof{}
@@ -143,7 +141,6 @@ type BatchProof interface {
143141

144142
// NewBatchProof creates a new BatchProof instance.
145143
func NewBatchProof(hardForkName string) BatchProof {
146-
log.Info("NewBatchProof", "hardForkName", hardForkName, "euclidForkName", EuclidFork, "euclidV2ForkName", EuclidV2Fork)
147144
switch hardForkName {
148145
case EuclidFork, EuclidV2Fork:
149146
return &OpenVMBatchProof{}
@@ -201,7 +198,6 @@ type BundleProof interface {
201198

202199
// NewBundleProof creates a new BundleProof instance.
203200
func NewBundleProof(hardForkName string) BundleProof {
204-
log.Info("NewBundleProof", "hardForkName", hardForkName, "euclidForkName", EuclidFork, "euclidV2ForkName", EuclidV2Fork)
205201
switch hardForkName {
206202
case EuclidFork, EuclidV2Fork:
207203
return &OpenVMBundleProof{}

coordinator/internal/logic/auth/login.go

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

12+
"scroll-tech/common/types/message"
1213
"scroll-tech/common/version"
1314

1415
"scroll-tech/coordinator/internal/config"
@@ -42,7 +43,7 @@ func NewLoginLogic(db *gorm.DB, cfg *config.Config, vf *verifier.Verifier) *Logi
4243

4344
var highHardForks []string
4445
highHardForks = append(highHardForks, cfg.ProverManager.Verifier.HighVersionCircuit.ForkName)
45-
if cfg.ProverManager.Verifier.HighVersionCircuit.ForkName != "euclid" && cfg.ProverManager.Verifier.HighVersionCircuit.ForkName != "euclidV2" {
46+
if cfg.ProverManager.Verifier.HighVersionCircuit.ForkName != message.EuclidFork && cfg.ProverManager.Verifier.HighVersionCircuit.ForkName != message.EuclidV2Fork {
4647
highHardForks = append(highHardForks, cfg.ProverManager.Verifier.LowVersionCircuit.ForkName)
4748
}
4849
proverVersionHardForkMap[cfg.ProverManager.Verifier.HighVersionCircuit.MinProverVersion] = highHardForks

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,16 @@ func (bp *BatchProverTask) formatProverTask(ctx context.Context, task *orm.Prove
239239
return nil, fmt.Errorf("failed to marshal chunk proofs, taskID:%s err:%w", task.TaskID, err)
240240
}
241241

242-
log.Info("get batch task", "task_id", task.TaskID, "public_key", task.ProverPublicKey, "prover_name", task.ProverName, "prover_version", task.ProverVersion)
243-
log.Info("chunkProofsBytes", "chunkProofsBytes", string(chunkProofsBytes))
244-
245242
taskMsg := &coordinatorType.GetTaskSchema{
246243
UUID: task.UUID.String(),
247244
TaskID: task.TaskID,
248245
TaskType: int(message.ProofTypeBatch),
249246
TaskData: string(chunkProofsBytes),
250247
HardForkName: hardForkName,
251248
}
249+
250+
log.Debug("TaskData", "task_id", task.TaskID, "task_type", message.ProofTypeChunk.String(), "hard_fork_name", hardForkName, "task_data", taskMsg.TaskData)
251+
252252
return taskMsg, nil
253253
}
254254

coordinator/internal/logic/provertask/bundle_prover_task.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ func (bp *BundleProverTask) formatProverTask(ctx context.Context, task *orm.Prov
219219
TaskData: string(batchProofsBytes),
220220
HardForkName: hardForkName,
221221
}
222+
223+
log.Debug("TaskData", "task_id", task.TaskID, "task_type", message.ProofTypeChunk.String(), "hard_fork_name", hardForkName, "task_data", taskMsg.TaskData)
224+
222225
return taskMsg, nil
223226
}
224227

coordinator/internal/logic/provertask/chunk_prover_task.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ func (cp *ChunkProverTask) formatProverTask(ctx context.Context, task *orm.Prove
217217
HardForkName: hardForkName,
218218
}
219219

220-
log.Info("format prover task", "task_id", task.TaskID, "task_type", message.ProofTypeChunk.String(), "hard_fork_name", hardForkName)
221-
log.Info("TaskData", "task_id", task.TaskID, "task_data", proverTaskSchema.TaskData, "taskDetail", string(taskDetailBytes))
220+
log.Debug("TaskData", "task_id", task.TaskID, "task_type", message.ProofTypeChunk.String(), "hard_fork_name", hardForkName, "task_data", proverTaskSchema.TaskData)
222221

223222
return proverTaskSchema, nil
224223
}

zkvm-prover/src/prover.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,16 @@ impl ProvingService for LocalProver {
6464
async fn get_vks(&self, req: GetVkRequest) -> GetVkResponse {
6565
let mut vks = vec![];
6666
for hard_fork_name in self.config.circuits.keys() {
67-
println!("\n\n\nhard fork = {:?}", hard_fork_name);
6867
let handler = self.new_handler(hard_fork_name);
69-
println!("request proof-types = {:?}", req.proof_types);
7068
for proof_type in &req.proof_types {
7169
let vk = handler.get_vk(*proof_type).await;
72-
println!("proof type = {:?}, vk = {:?}", proof_type, vk);
7370

7471
if let Some(vk) = vk {
75-
let vk_base64 = base64::encode(vk);
76-
println!("vk (base64) = {:?}", vk_base64);
77-
vks.push(vk_base64);
72+
vks.push(base64::encode(vk));
7873
}
7974
}
8075
}
8176

82-
println!("\n\n\nall vks = {:#?}", vks);
83-
8477
GetVkResponse { vks, error: None }
8578
}
8679
async fn prove(&mut self, req: ProveRequest) -> ProveResponse {
@@ -186,7 +179,6 @@ impl LocalProver {
186179
}
187180

188181
fn new_handler(&self, hard_fork_name: &str) -> Arc<dyn CircuitsHandler> {
189-
println!("in new_handler");
190182
// if we got assigned a task for an unknown hard fork, there is something wrong in the
191183
// coordinator
192184
let config = self.config.circuits.get(hard_fork_name).unwrap();

zkvm-prover/src/zk_circuits_handler/euclidV2.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ unsafe impl Send for EuclidV2Handler {}
2020
impl EuclidV2Handler {
2121
pub fn new(workspace_path: &str) -> Self {
2222
let workspace_path = Path::new(workspace_path);
23-
println!("ok 1");
2423

2524
let cache_dir = workspace_path.join("cache");
2625
let chunk_exe = workspace_path.join("chunk/app.vmexe");
@@ -34,7 +33,6 @@ impl EuclidV2Handler {
3433
},
3534
)
3635
.expect("Failed to setup chunk prover");
37-
println!("ok 2");
3836

3937
let batch_exe = workspace_path.join("batch/app.vmexe");
4038
let batch_app_config = workspace_path.join("batch/openvm.toml");
@@ -47,7 +45,6 @@ impl EuclidV2Handler {
4745
},
4846
)
4947
.expect("Failed to setup batch prover");
50-
println!("ok 3");
5148

5249
let bundle_exe = workspace_path.join("bundle/app.vmexe");
5350
let bundle_app_config = workspace_path.join("bundle/openvm.toml");
@@ -60,7 +57,6 @@ impl EuclidV2Handler {
6057
},
6158
)
6259
.expect("Failed to setup bundle prover");
63-
println!("ok 4");
6460

6561
Self {
6662
chunk_prover,

0 commit comments

Comments
 (0)