From f0c6ccd34d00d954613a2ad64289006a474bd2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Fri, 7 Feb 2025 20:19:07 +0300 Subject: [PATCH] fix: re-enable supported forks check --- .../logic/provertask/batch_prover_task.go | 16 ++++++++-------- .../logic/provertask/bundle_prover_task.go | 16 ++++++++-------- .../logic/provertask/chunk_prover_task.go | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/coordinator/internal/logic/provertask/batch_prover_task.go b/coordinator/internal/logic/provertask/batch_prover_task.go index 36409abf9a..28ec5685a5 100644 --- a/coordinator/internal/logic/provertask/batch_prover_task.go +++ b/coordinator/internal/logic/provertask/batch_prover_task.go @@ -144,14 +144,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 aac066f5e4..50d01295d1 100644 --- a/coordinator/internal/logic/provertask/bundle_prover_task.go +++ b/coordinator/internal/logic/provertask/bundle_prover_task.go @@ -144,14 +144,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 90084bb6a7..19cd103b3d 100644 --- a/coordinator/internal/logic/provertask/chunk_prover_task.go +++ b/coordinator/internal/logic/provertask/chunk_prover_task.go @@ -142,14 +142,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,