@@ -54,7 +54,7 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
5454 taskIndex := uint32 (0 )
5555
5656 // TODO: Add Retryable
57- taskIndex , err := agg .GetTaskIndex (signedTaskResponse .BatchIdentifierHash )
57+ taskIndex , err := agg .GetTaskIndexRetryable (signedTaskResponse .BatchIdentifierHash )
5858
5959 if err != nil {
6060 agg .logger .Warn ("Task not found in the internal map, operator signature will be lost. Batch may not reach quorum" )
@@ -73,7 +73,7 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
7373
7474 agg .logger .Info ("Starting bls signature process" )
7575 go func () {
76- err := agg .ProcessNewSignature (
76+ err := agg .ProcessNewSignatureRetryable (
7777 context .Background (), taskIndex , signedTaskResponse .BatchIdentifierHash ,
7878 & signedTaskResponse .BlsSignature , signedTaskResponse .OperatorId ,
7979 )
@@ -125,7 +125,7 @@ func (agg *Aggregator) ServerRunning(_ *struct{}, reply *int64) error {
125125 - Retry times (3 retries): 12 sec (1 Blocks), 24 sec (2 Blocks), 48 sec (4 Blocks)
126126 - NOTE: TaskNotFound errors from the BLS Aggregation service are Transient errors as block reorg's may lead to these errors being thrown.
127127*/
128- func (agg * Aggregator ) ProcessNewSignature (ctx context.Context , taskIndex uint32 , taskResponse interface {}, blsSignature * bls.Signature , operatorId eigentypes.Bytes32 ) error {
128+ func (agg * Aggregator ) ProcessNewSignatureRetryable (ctx context.Context , taskIndex uint32 , taskResponse interface {}, blsSignature * bls.Signature , operatorId eigentypes.Bytes32 ) error {
129129 processNewSignature_func := func () error {
130130 err := agg .blsAggregationService .ProcessNewSignature (
131131 ctx , taskIndex , taskResponse ,
@@ -142,8 +142,12 @@ func (agg *Aggregator) ProcessNewSignature(ctx context.Context, taskIndex uint32
142142 return retry .Retry (processNewSignature_func , retry .ChainRetryConfig ())
143143}
144144
145- // TODO: Add Retryable + Comment
146- func (agg * Aggregator ) GetTaskIndex (batchIdentifierHash [32 ]byte ) (uint32 , error ) {
145+ // Checks Internal mapping for Signed Task Response, returns its TaskIndex.
146+ /*
147+ - All errors are considered Transient Errors
148+ - Retry times (3 retries): 1 sec, 2 sec, 4 sec
149+ */
150+ func (agg * Aggregator ) GetTaskIndexRetryable (batchIdentifierHash [32 ]byte ) (uint32 , error ) {
147151 getTaskIndex_func := func () (uint32 , error ) {
148152 agg .taskMutex .Lock ()
149153 agg .AggregatorConfig .BaseConfig .Logger .Info ("- Locked Resources: Starting processing of Response" )
0 commit comments