Skip to content

Commit 9033471

Browse files
author
colinlyguo
committed
tmp comment out a Don't dispatch logic
1 parent 886af07 commit 9033471

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"scroll-tech/coordinator/internal/config"
2525
"scroll-tech/coordinator/internal/orm"
2626
coordinatorType "scroll-tech/coordinator/internal/types"
27-
cutils "scroll-tech/coordinator/internal/utils"
2827
)
2928

3029
// BatchProverTask is prover task implement for batch proof
@@ -115,18 +114,18 @@ func (bp *BatchProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinato
115114
}
116115

117116
// Don't dispatch the same failing job to the same prover
118-
proverTasks, getFailedTaskError := bp.proverTaskOrm.GetFailedProverTasksByHash(ctx.Copy(), message.ProofTypeBatch, tmpBatchTask.Hash, 2)
119-
if getFailedTaskError != nil {
120-
log.Error("failed to get prover tasks", "proof type", message.ProofTypeBatch.String(), "task ID", tmpBatchTask.Hash, "error", getFailedTaskError)
121-
return nil, ErrCoordinatorInternalFailure
122-
}
123-
for i := 0; i < len(proverTasks); i++ {
124-
if proverTasks[i].ProverPublicKey == taskCtx.PublicKey ||
125-
taskCtx.ProverProviderType == uint8(coordinatorType.ProverProviderTypeExternal) && cutils.IsExternalProverNameMatch(proverTasks[i].ProverName, taskCtx.ProverName) {
126-
log.Debug("get empty batch, the prover already failed this task", "height", getTaskParameter.ProverHeight)
127-
return nil, nil
128-
}
129-
}
117+
//proverTasks, getFailedTaskError := bp.proverTaskOrm.GetFailedProverTasksByHash(ctx.Copy(), message.ProofTypeBatch, tmpBatchTask.Hash, 2)
118+
//if getFailedTaskError != nil {
119+
// log.Error("failed to get prover tasks", "proof type", message.ProofTypeBatch.String(), "task ID", tmpBatchTask.Hash, "error", getFailedTaskError)
120+
// return nil, ErrCoordinatorInternalFailure
121+
//}
122+
//for i := 0; i < len(proverTasks); i++ {
123+
// if proverTasks[i].ProverPublicKey == taskCtx.PublicKey ||
124+
// taskCtx.ProverProviderType == uint8(coordinatorType.ProverProviderTypeExternal) && cutils.IsExternalProverNameMatch(proverTasks[i].ProverName, taskCtx.ProverName) {
125+
// log.Debug("get empty batch, the prover already failed this task", "height", getTaskParameter.ProverHeight)
126+
// return nil, nil
127+
// }
128+
//}
130129

131130
rowsAffected, updateAttemptsErr := bp.batchOrm.UpdateBatchAttempts(ctx.Copy(), tmpBatchTask.Index, tmpBatchTask.ActiveAttempts, tmpBatchTask.TotalAttempts)
132131
if updateAttemptsErr != nil {

0 commit comments

Comments
 (0)