Skip to content

Commit 2f2434f

Browse files
authored
Merge branch 'staging' into 1401-1414-aggregator-retry-improvements
2 parents 087b5f3 + 089be52 commit 2f2434f

File tree

8 files changed

+17
-56
lines changed

8 files changed

+17
-56
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OS := $(shell uname -s)
66
CONFIG_FILE?=config-files/config.yaml
77
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
88

9-
OPERATOR_VERSION=v0.10.3
9+
OPERATOR_VERSION=v0.11.1
1010

1111
ifeq ($(OS),Linux)
1212
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux

aggregator/pkg/server.go

Lines changed: 3 additions & 45 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.ProcessNewSignatureRetryable(
72+
err := agg.blsAggregationService.ProcessNewSignature(
7673
context.Background(), taskIndex, signedTaskResponse.BatchIdentifierHash,
7774
&signedTaskResponse.BlsSignature, signedTaskResponse.OperatorId,
7875
)
@@ -99,9 +96,6 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
9996
*reply = 0
10097
}
10198

102-
agg.AggregatorConfig.BaseConfig.Logger.Info("- Unlocked Resources: Task response processing finished")
103-
agg.taskMutex.Unlock()
104-
10599
return nil
106100
}
107101

@@ -112,48 +106,12 @@ func (agg *Aggregator) ServerRunning(_ *struct{}, reply *int64) error {
112106
return nil
113107
}
114108

115-
// |---RETRYABLE---|
116-
117-
func ProcessNewSignatureFunc(agg *Aggregator, ctx context.Context, taskIndex uint32, taskResponse interface{}, blsSignature *bls.Signature, operatorId eigentypes.Bytes32) func() error {
118-
119-
processNewSignature_func := func() error {
120-
err := agg.blsAggregationService.ProcessNewSignature(
121-
ctx, taskIndex, taskResponse,
122-
blsSignature, operatorId,
123-
)
124-
if err != nil {
125-
if strings.Contains(err.Error(), "Failed to verify signature") {
126-
err = retry.PermanentError{Inner: err}
127-
}
128-
}
129-
return err
130-
}
131-
return processNewSignature_func
132-
}
133-
134-
/*
135-
- Errors:
136-
Permanent:
137-
- 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).
138-
Transient:
139-
- All others.
140-
- Retry times (3 retries): 12 sec (1 Blocks), 24 sec (2 Blocks), 48 sec (4 Blocks)
141-
- NOTE: TaskNotFound errors from the BLS Aggregation service are Transient errors as block reorg's may lead to these errors being thrown.
142-
*/
143-
func (agg *Aggregator) ProcessNewSignatureRetryable(ctx context.Context, taskIndex uint32, taskResponse interface{}, blsSignature *bls.Signature, operatorId eigentypes.Bytes32) error {
144-
145-
return retry.Retry(ProcessNewSignatureFunc(agg, ctx, taskIndex, taskResponse, blsSignature, operatorId), retry.ChainRetryConfig())
146-
}
147-
148-
func GetTaskIndexFunc(agg *Aggregator, batchIdentifierHash [32]byte) func() (uint32, error) {
149-
109+
func (agg *Aggregator) GetTaskIndex(batchIdentifierHash [32]byte) (uint32, error) {
150110
getTaskIndex_func := func() (uint32, error) {
151111
agg.taskMutex.Lock()
152-
agg.AggregatorConfig.BaseConfig.Logger.Info("- Locked Resources: Starting processing of Response")
153112
taskIndex, ok := agg.batchesIdxByIdentifierHash[batchIdentifierHash]
113+
agg.taskMutex.Unlock()
154114
if !ok {
155-
agg.taskMutex.Unlock()
156-
agg.logger.Info("- Unlocked Resources: Task not found in the internal map")
157115
return taskIndex, fmt.Errorf("Task not found in the internal map")
158116
} else {
159117
return taskIndex, nil

batcher/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

batcher/aligned/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aligned"
3-
version = "0.10.3"
3+
version = "0.11.1"
44
edition = "2021"
55

66
[dependencies]

contracts/script/output/holesky/alignedlayer_deployment_output.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"addresses": {
33
"alignedLayerProxyAdmin": "0x3eb924d928c138898FC089328f840105969bD6a0",
44
"alignedLayerServiceManager": "0x58F280BeBE9B34c9939C3C39e0890C81f163B623",
5-
"alignedLayerServiceManagerImplementation": "0x24F764c18609D5e92fC5646Ff0725280144E644b",
5+
"alignedLayerServiceManagerImplementation": "0x48d70037cC01c31039d476CbbbAe2Aa36F86Ef16",
66
"blsApkRegistry": "0xD0A725d82649f9e4155D7A60B638Fe33b3F25e3b",
77
"blsApkRegistryImplementation": "0xB05BB98a966F58aDAB8dF58350b77fF2131A3b87",
88
"indexRegistry": "0x4A7DE0a9fBBAa4fF0270d31852B363592F68B81F",
@@ -14,7 +14,8 @@
1414
"stakeRegistry": "0x51462D5511563A0F97Bb3Ce5475E1c3905b83F4b",
1515
"stakeRegistryImplementation": "0xd1555Be14931C061E06D3CE1D1Daadc1B3c6F8c7",
1616
"batcherPaymentService": "0x815aeCA64a974297942D2Bbf034ABEe22a38A003",
17-
"batcherPaymentServiceImplementation": "0x07802Aa18a16E6F4d1a3411657a0f6b0a9Cb8Ea1"
17+
"batcherPaymentServiceImplementation": "0x07802Aa18a16E6F4d1a3411657a0f6b0a9Cb8Ea1",
18+
"pauserRegistry": "0x0CBc10A1142465B2042f3804107A7283044dC6eD"
1819
},
1920
"chainInfo": {
2021
"chainId": 17000,
@@ -26,6 +27,7 @@
2627
"alignedLayerEjector": "0x97aEC5F28181abe5d2aD40dBe7FbaEe014529b7D",
2728
"alignedLayerOwner": "0x97aEC5F28181abe5d2aD40dBe7FbaEe014529b7D",
2829
"alignedLayerUpgrader": "0x97aEC5F28181abe5d2aD40dBe7FbaEe014529b7D",
29-
"pauserRegistry": "0x85Ef7299F8311B25642679edBF02B62FA2212F06"
30+
"pauserRegistry": "0x85Ef7299F8311B25642679edBF02B62FA2212F06",
31+
"alignedLayerPauser": "0x97aEC5F28181abe5d2aD40dBe7FbaEe014529b7D"
3032
}
3133
}

contracts/script/output/holesky/alignedlayer_deployment_output.stage.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"stakeRegistryImplementation": "0x52A9e264b98fe2d53805937Bc094a981E7eB6BeE",
1616
"batcherPaymentService": "0x7577Ec4ccC1E6C529162ec8019A49C13F6DAd98b",
1717
"batcherPaymentServiceImplementation": "0x230FF8F073C188732856990b070485FD1A9b1039"
18+
"pauserRegistry": "0xBCd09a605906a13F917230F82BdAC15B778A5B03"
1819
},
1920
"chainInfo": {
2021
"chainId": 17000,
@@ -25,7 +26,7 @@
2526
"alignedLayerEjector": "0xE3C695b73dbe27106aF4530b152de3e57456B385",
2627
"alignedLayerOwner": "0xE3C695b73dbe27106aF4530b152de3e57456B385",
2728
"alignedLayerUpgrader": "0xE3C695b73dbe27106aF4530b152de3e57456B385",
28-
"pauserRegistry": "0x85Ef7299F8311B25642679edBF02B62FA2212F06",
29-
"alignedLayerAggregator": "0x2855F89C56d3C94e98F61A3Dea5E9Ca0AA2FA946"
29+
"alignedLayerAggregator": "0x2855F89C56d3C94e98F61A3Dea5E9Ca0AA2FA946",
30+
"alignedLayerPauser": "0xE3C695b73dbe27106aF4530b152de3e57456B385"
3031
}
3132
}

docs/3_guides/1_SDK_how_to.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To use this SDK in your Rust project, add the following to your `Cargo.toml`:
1212

1313
```toml
1414
[dependencies]
15-
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.10.3" }
15+
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.11.1" }
1616
```
1717

1818
To find the latest release tag go to [releases](https://github.com/yetanotherco/aligned_layer/releases) and copy the

docs/operator_guides/0_running_an_operator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Register as an Aligned operator in testnet
22

33
> **CURRENT VERSION:**
4-
> Aligned Operator [v0.10.3](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.10.3)
4+
> Aligned Operator [v0.11.1](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.11.1)
55
66
> **IMPORTANT:**
77
> You must be [whitelisted](https://docs.google.com/forms/d/e/1FAIpQLSdH9sgfTz4v33lAvwj6BvYJGAeIshQia3FXz36PFfF-WQAWEQ/viewform) to become an Aligned operator.
@@ -26,7 +26,7 @@ Minimum hardware requirements:
2626
To start with, clone the Aligned repository and move inside it
2727

2828
```bash
29-
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.10.3
29+
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.11.1
3030
cd aligned_layer
3131
```
3232

0 commit comments

Comments
 (0)