Skip to content

Commit 131599f

Browse files
authored
fix: use the retryable InitializeNewTask function (#1437)
1 parent 698de75 commit 131599f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

aggregator/pkg/aggregator.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,7 @@ func (agg *Aggregator) AddNewTask(batchMerkleRoot [32]byte, senderAddress [20]by
384384
quorumNums := eigentypes.QuorumNums{eigentypes.QuorumNum(QUORUM_NUMBER)}
385385
quorumThresholdPercentages := eigentypes.QuorumThresholdPercentages{eigentypes.QuorumThresholdPercentage(QUORUM_THRESHOLD)}
386386

387-
err := agg.blsAggregationService.InitializeNewTask(batchIndex, taskCreatedBlock, quorumNums, quorumThresholdPercentages, agg.AggregatorConfig.Aggregator.BlsServiceTaskTimeout)
388-
// FIXME(marian): When this errors, should we retry initializing new task? Logging fatal for now.
387+
err := agg.InitializeNewTaskRetryable(batchIndex, taskCreatedBlock, quorumNums, quorumThresholdPercentages, agg.AggregatorConfig.Aggregator.BlsServiceTaskTimeout)
389388
if err != nil {
390389
agg.logger.Fatalf("BLS aggregation service error when initializing new task: %s", err)
391390
}
@@ -399,7 +398,7 @@ func (agg *Aggregator) AddNewTask(batchMerkleRoot [32]byte, senderAddress [20]by
399398
// |---RETRYABLE---|
400399

401400
/*
402-
InitializeNewTask
401+
InitializeNewTaskRetryable
403402
Initialize a new task in the BLS Aggregation service
404403
- Errors:
405404
Permanent:
@@ -408,7 +407,7 @@ Initialize a new task in the BLS Aggregation service
408407
- All others.
409408
- Retry times (3 retries): 1 sec, 2 sec, 4 sec
410409
*/
411-
func (agg *Aggregator) InitializeNewTask(batchIndex uint32, taskCreatedBlock uint32, quorumNums eigentypes.QuorumNums, quorumThresholdPercentages eigentypes.QuorumThresholdPercentages, timeToExpiry time.Duration) error {
410+
func (agg *Aggregator) InitializeNewTaskRetryable(batchIndex uint32, taskCreatedBlock uint32, quorumNums eigentypes.QuorumNums, quorumThresholdPercentages eigentypes.QuorumThresholdPercentages, timeToExpiry time.Duration) error {
412411
initializeNewTask_func := func() error {
413412
err := agg.blsAggregationService.InitializeNewTask(batchIndex, taskCreatedBlock, quorumNums, quorumThresholdPercentages, timeToExpiry)
414413
if err != nil {

0 commit comments

Comments
 (0)