From a528103260c10aac9723a224db2f1b62dbf99cdc Mon Sep 17 00:00:00 2001 From: georgehao Date: Wed, 28 Aug 2024 17:36:04 +0800 Subject: [PATCH] disable hardfork check (#1514) Co-authored-by: georgehao --- common/version/version.go | 2 +- .../logic/provertask/batch_prover_task.go | 16 ++++++++-------- .../logic/provertask/bundle_prover_task.go | 16 ++++++++-------- .../logic/provertask/chunk_prover_task.go | 16 ++++++++-------- coordinator/internal/types/auth_test.go | 4 ++-- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/common/version/version.go b/common/version/version.go index 471a45e9a9..4ef13b1453 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.4.55" +var tag = "v4.4.56" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/coordinator/internal/logic/provertask/batch_prover_task.go b/coordinator/internal/logic/provertask/batch_prover_task.go index caac3ee788..b87031eb90 100644 --- a/coordinator/internal/logic/provertask/batch_prover_task.go +++ b/coordinator/internal/logic/provertask/batch_prover_task.go @@ -120,14 +120,14 @@ func (bp *BatchProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinato return nil, ErrCoordinatorInternalFailure } - if _, ok := taskCtx.HardForkNames[hardForkName]; !ok { - bp.recoverActiveAttempts(ctx, batchTask) - log.Error("incompatible prover version", - "requisite hard fork name", hardForkName, - "prover hard fork name", taskCtx.HardForkNames, - "task_id", batchTask.Hash) - return nil, ErrCoordinatorInternalFailure - } + //if _, ok := taskCtx.HardForkNames[hardForkName]; !ok { + // bp.recoverActiveAttempts(ctx, batchTask) + // log.Error("incompatible prover version", + // "requisite hard fork name", hardForkName, + // "prover hard fork name", taskCtx.HardForkNames, + // "task_id", batchTask.Hash) + // return nil, ErrCoordinatorInternalFailure + //} proverTask := orm.ProverTask{ TaskID: batchTask.Hash, diff --git a/coordinator/internal/logic/provertask/bundle_prover_task.go b/coordinator/internal/logic/provertask/bundle_prover_task.go index f3b8ef2bc9..9cb0239955 100644 --- a/coordinator/internal/logic/provertask/bundle_prover_task.go +++ b/coordinator/internal/logic/provertask/bundle_prover_task.go @@ -117,14 +117,14 @@ func (bp *BundleProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinat return nil, ErrCoordinatorInternalFailure } - if _, ok := taskCtx.HardForkNames[hardForkName]; !ok { - bp.recoverActiveAttempts(ctx, bundleTask) - log.Error("incompatible prover version", - "requisite hard fork name", hardForkName, - "prover hard fork name", taskCtx.HardForkNames, - "task_id", bundleTask.Hash) - return nil, ErrCoordinatorInternalFailure - } + //if _, ok := taskCtx.HardForkNames[hardForkName]; !ok { + // bp.recoverActiveAttempts(ctx, bundleTask) + // log.Error("incompatible prover version", + // "requisite hard fork name", hardForkName, + // "prover hard fork name", taskCtx.HardForkNames, + // "task_id", bundleTask.Hash) + // return nil, ErrCoordinatorInternalFailure + //} proverTask := orm.ProverTask{ TaskID: bundleTask.Hash, diff --git a/coordinator/internal/logic/provertask/chunk_prover_task.go b/coordinator/internal/logic/provertask/chunk_prover_task.go index afd2398bf3..314a3b5752 100644 --- a/coordinator/internal/logic/provertask/chunk_prover_task.go +++ b/coordinator/internal/logic/provertask/chunk_prover_task.go @@ -115,14 +115,14 @@ func (cp *ChunkProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinato return nil, ErrCoordinatorInternalFailure } - if _, ok := taskCtx.HardForkNames[hardForkName]; !ok { - cp.recoverActiveAttempts(ctx, chunkTask) - log.Error("incompatible prover version", - "requisite hard fork name", hardForkName, - "prover hard fork name", taskCtx.HardForkNames, - "task_id", chunkTask.Hash) - return nil, ErrCoordinatorInternalFailure - } + //if _, ok := taskCtx.HardForkNames[hardForkName]; !ok { + // cp.recoverActiveAttempts(ctx, chunkTask) + // log.Error("incompatible prover version", + // "requisite hard fork name", hardForkName, + // "prover hard fork name", taskCtx.HardForkNames, + // "task_id", chunkTask.Hash) + // return nil, ErrCoordinatorInternalFailure + //} proverTask := orm.ProverTask{ TaskID: chunkTask.Hash, diff --git a/coordinator/internal/types/auth_test.go b/coordinator/internal/types/auth_test.go index 824e57468c..9287dae3eb 100644 --- a/coordinator/internal/types/auth_test.go +++ b/coordinator/internal/types/auth_test.go @@ -60,8 +60,8 @@ func TestGenerateSignature(t *testing.T) { authMsg := LoginParameter{ Message: Message{ ProverName: "test", - ProverVersion: "v4.4.43-37af5ef5-38a68e2-1c5093c", - Challenge: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQ4MzUyNzksIm9yaWdfaWF0IjoxNzI0ODMxNjc5LCJyYW5kb20iOiJRQ1lqU3g5U2I1RWEzbUM4anFBSndoR3VSUEpTdzFYWW9RUG9VcGxRRjRzPSJ9.92rT5UzGQVQO6Wvpz5fD5vHD1yuo_y1Xd_ExOhAAli0", + ProverVersion: "v4.4.45-37af5ef5-38a68e2-1c5093c", + Challenge: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQ4Mzg0ODUsIm9yaWdfaWF0IjoxNzI0ODM0ODg1LCJyYW5kb20iOiJ6QmdNZGstNGc4UzNUNTFrVEFsYk1RTXg2TGJ4SUs4czY3ejM2SlNuSFlJPSJ9.x9PvihhNx2w4_OX5uCrv8QJCNYVQkIi-K2k8XFXYmik", ProverTypes: []ProverType{ProverTypeChunk}, VKs: []string{"mock_vk"}, },