Skip to content

Commit a776ca7

Browse files
authored
refactor: remove unused check (#1685)
1 parent ea38ae7 commit a776ca7

File tree

7 files changed

+15
-33
lines changed

7 files changed

+15
-33
lines changed

common/types/message/message.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ import (
1010
"github.com/scroll-tech/go-ethereum/common/hexutil"
1111
)
1212

13-
const (
14-
EuclidV2Fork = "euclidV2"
15-
16-
EuclidV2ForkNameForProver = "euclidv2"
17-
)
18-
1913
// ProofType represents the type of task.
2014
type ProofType uint8
2115

coordinator/cmd/api/app/mock_app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (c *CoordinatorApp) MockConfig(store bool) error {
9393
MinProverVersion: "v4.4.89",
9494
Verifiers: []coordinatorConfig.AssetConfig{{
9595
AssetsPath: "",
96-
ForkName: "euclidV2",
96+
ForkName: "feynman",
9797
},
9898
}},
9999
BatchCollectionTimeSec: 60,

coordinator/conf/config.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
"chunk_collection_time_sec": 180,
99
"verifier": {
1010
"min_prover_version": "v4.4.45",
11-
"verifiers": [{
12-
"assets_path": "assets",
13-
"fork_name": "euclidV2"
14-
}]
11+
"verifiers": [
12+
{
13+
"assets_path": "assets",
14+
"fork_name": "euclidV2"
15+
},
16+
{
17+
"assets_path": "assets",
18+
"fork_name": "feynman"
19+
}
20+
]
1521
}
1622
},
1723
"db": {

coordinator/internal/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestConfig(t *testing.T) {
2323
"min_prover_version": "v4.4.45",
2424
"verifiers": [{
2525
"assets_path": "assets",
26-
"fork_name": "euclidV2"
26+
"fork_name": "feynman"
2727
}]
2828
},
2929
"max_verifier_workers": 4

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,7 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []*
293293
taskDetail := &message.BatchTaskDetail{
294294
ChunkInfos: chunkInfos,
295295
ChunkProofs: chunkProofs,
296-
}
297-
298-
if hardForkName == message.EuclidV2Fork {
299-
taskDetail.ForkName = message.EuclidV2ForkNameForProver
300-
} else {
301-
log.Error("unsupported hard fork name", "hard_fork_name", hardForkName)
302-
return nil, fmt.Errorf("unsupported hard fork name: %s", hardForkName)
296+
ForkName: hardForkName,
303297
}
304298

305299
dbBatchCodecVersion := encoding.CodecVersion(dbBatch.CodecVersion)

coordinator/internal/logic/provertask/bundle_prover_task.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,7 @@ func (bp *BundleProverTask) formatProverTask(ctx context.Context, task *orm.Prov
250250

251251
taskDetail := message.BundleTaskDetail{
252252
BatchProofs: batchProofs,
253-
}
254-
255-
if hardForkName == message.EuclidV2Fork {
256-
taskDetail.ForkName = message.EuclidV2ForkNameForProver
257-
} else {
258-
log.Error("unsupported hard fork name", "hard_fork_name", hardForkName)
259-
return nil, fmt.Errorf("unsupported hard fork name: %s", hardForkName)
253+
ForkName: hardForkName,
260254
}
261255

262256
taskDetail.BundleInfo = &message.OpenVMBundleInfo{

coordinator/internal/logic/provertask/chunk_prover_task.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,7 @@ func (cp *ChunkProverTask) formatProverTask(ctx context.Context, task *orm.Prove
228228
taskDetail := message.ChunkTaskDetail{
229229
BlockHashes: blockHashes,
230230
PrevMsgQueueHash: common.HexToHash(chunk.PrevL1MessageQueueHash),
231-
}
232-
233-
if hardForkName == message.EuclidV2Fork {
234-
taskDetail.ForkName = message.EuclidV2ForkNameForProver
235-
} else {
236-
log.Error("unsupported hard fork name", "hard_fork_name", hardForkName)
237-
return nil, fmt.Errorf("unsupported hard fork name: %s", hardForkName)
231+
ForkName: hardForkName,
238232
}
239233

240234
var err error

0 commit comments

Comments
 (0)