Skip to content

Commit 8f2e471

Browse files
authored
Remove retry on signature (#1451)
1 parent 2b6b894 commit 8f2e471

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

aggregator/pkg/server.go

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ import (
66
"fmt"
77
"net/http"
88
"net/rpc"
9-
"strings"
109
"time"
1110

12-
"github.com/Layr-Labs/eigensdk-go/crypto/bls"
13-
eigentypes "github.com/Layr-Labs/eigensdk-go/types"
1411
retry "github.com/yetanotherco/aligned_layer/core"
1512
"github.com/yetanotherco/aligned_layer/core/types"
1613
)
@@ -72,7 +69,7 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
7269

7370
agg.logger.Info("Starting bls signature process")
7471
go func() {
75-
err := agg.ProcessNewSignature(
72+
err := agg.blsAggregationService.ProcessNewSignature(
7673
context.Background(), taskIndex, signedTaskResponse.BatchIdentifierHash,
7774
&signedTaskResponse.BlsSignature, signedTaskResponse.OperatorId,
7875
)
@@ -109,34 +106,6 @@ func (agg *Aggregator) ServerRunning(_ *struct{}, reply *int64) error {
109106
return nil
110107
}
111108

112-
// |---RETRYABLE---|
113-
114-
/*
115-
- Errors:
116-
Permanent:
117-
- SignatureVerificationError: Verification of the sigature within the BLS Aggregation Service failed. (https://github.com/Layr-Labs/eigensdk-go/blob/dev/services/bls_aggregation/blsagg.go#L42).
118-
Transient:
119-
- All others.
120-
- Retry times (3 retries): 12 sec (1 Blocks), 24 sec (2 Blocks), 48 sec (4 Blocks)
121-
- NOTE: TaskNotFound errors from the BLS Aggregation service are Transient errors as block reorg's may lead to these errors being thrown.
122-
*/
123-
func (agg *Aggregator) ProcessNewSignature(ctx context.Context, taskIndex uint32, taskResponse interface{}, blsSignature *bls.Signature, operatorId eigentypes.Bytes32) error {
124-
processNewSignature_func := func() error {
125-
err := agg.blsAggregationService.ProcessNewSignature(
126-
ctx, taskIndex, taskResponse,
127-
blsSignature, operatorId,
128-
)
129-
if err != nil {
130-
if strings.Contains(err.Error(), "Failed to verify signature") {
131-
err = retry.PermanentError{Inner: err}
132-
}
133-
}
134-
return err
135-
}
136-
137-
return retry.Retry(processNewSignature_func, retry.MinDelayChain, retry.RetryFactor, retry.NumRetries, retry.MaxIntervalChain, retry.MaxElapsedTime)
138-
}
139-
140109
func (agg *Aggregator) GetTaskIndex(batchIdentifierHash [32]byte) (uint32, error) {
141110
getTaskIndex_func := func() (uint32, error) {
142111
agg.taskMutex.Lock()

0 commit comments

Comments
 (0)