Skip to content

Commit a61a817

Browse files
uri-99MarcosNicolauJuArceMauroToscano
authored
hotfix: eigensdk on Operator and Aggregator boot (#1740)
Co-authored-by: Marcos Nicolau <[email protected]> Co-authored-by: JuArce <[email protected]> Co-authored-by: Mauro Toscano <[email protected]>
1 parent c0422f5 commit a61a817

File tree

5 files changed

+177
-9
lines changed

5 files changed

+177
-9
lines changed

Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE))
88
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
99

1010
OPERATOR_VERSION=v0.13.0
11+
EIGEN_SDK_GO_VERSION_TESTNET=v0.2.0-beta.1
12+
EIGEN_SDK_GO_VERSION_MAINNET=v0.1.13
1113

1214
ifeq ($(OS),Linux)
1315
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
@@ -29,6 +31,16 @@ endif
2931
ifeq ($(OS),Darwin)
3032
BUILD_OPERATOR = $(MAKE) build_operator_macos
3133
endif
34+
35+
ifeq ($(ENVIRONMENT), devnet)
36+
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_devnet
37+
else ifeq ($(ENVIRONMENT), testnet)
38+
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_testnet
39+
else ifeq ($(ENVIRONMENT), mainnet)
40+
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_mainnet
41+
else
42+
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_error
43+
endif
3244

3345

3446
FFI_FOR_RELEASE ?= true
@@ -140,7 +152,13 @@ anvil_start_with_block_time_with_more_prefunded_accounts:
140152

141153
_AGGREGATOR_:
142154

155+
build_aggregator:
156+
$(GET_SDK_VERSION)
157+
@echo "Building aggregator"
158+
@go build -o ./build/aligned-aggregator ./aggregator/cmd/main.go
159+
143160
aggregator_start:
161+
$(GET_SDK_VERSION)
144162
@echo "Starting Aggregator..."
145163
@go run aggregator/cmd/main.go --config $(AGG_CONFIG_FILE) \
146164
2>&1 | zap-pretty
@@ -156,15 +174,31 @@ test_go_retries:
156174
__OPERATOR__:
157175

158176
operator_start:
177+
$(GET_SDK_VERSION)
159178
@echo "Starting Operator..."
160179
go run operator/cmd/main.go start --config $(CONFIG_FILE) \
161180
2>&1 | zap-pretty
162181

182+
operator_set_eigen_sdk_go_version_testnet:
183+
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_TESTNET)"
184+
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_TESTNET)
185+
186+
operator_set_eigen_sdk_go_version_devnet: operator_set_eigen_sdk_go_version_mainnet
187+
188+
operator_set_eigen_sdk_go_version_mainnet:
189+
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_MAINNET)"
190+
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_MAINNET)
191+
192+
operator_set_eigen_sdk_go_version_error:
193+
@echo "Error setting Eigen SDK version, missing ENVIRONMENT. Possible values for ENVIRONMENT=<devnet|testnet|mainnet>"
194+
exit 1
195+
163196
operator_full_registration: operator_get_eth operator_register_with_eigen_layer operator_mint_mock_tokens operator_deposit_into_mock_strategy operator_whitelist_devnet operator_register_with_aligned_layer
164197

165198
operator_register_and_start: operator_full_registration operator_start
166199

167200
build_operator: deps
201+
$(GET_SDK_VERSION)
168202
$(BUILD_OPERATOR)
169203

170204
build_operator_macos:
@@ -178,6 +212,7 @@ build_operator_linux:
178212
@echo "Operator built into /operator/build/aligned-operator"
179213

180214
update_operator:
215+
$(GET_SDK_VERSION)
181216
@echo "Updating Operator..."
182217
@./scripts/fetch_latest_release.sh
183218
@make build_operator

docs/3_guides/6_setup_aligned.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,27 @@ make bindings
7474
To start the [Aggregator](../2_architecture/components/5_aggregator.md):
7575

7676
```bash
77-
make aggregator_start
77+
make aggregator_start ENVIRONMENT=devnet
7878
```
7979

8080
or with a custom config:
8181

8282
```bash
83-
make aggregator_start CONFIG_FILE=<path_to_config_file>
83+
make aggregator_start ENVIRONMENT=devnet CONFIG_FILE=<path_to_config_file>
8484
```
8585

8686
## Operator
8787

8888
To setup an [Operator](../2_architecture/components/4_operator.md) run:
8989

9090
```bash
91-
make operator_register_and_start
91+
make operator_register_and_start ENVIRONMENT=devnet
9292
```
9393

9494
or with a custom config:
9595

9696
```bash
97-
make operator_register_and_start CONFIG_FILE=<path_to_config_file>
97+
make operator_register_and_start ENVIRONMENT=devnet CONFIG_FILE=<path_to_config_file>
9898
```
9999

100100
Different configs for operators can be found in `config-files/config-operator`.
@@ -111,7 +111,7 @@ make operator_full_registration CONFIG_FILE<path_to_config_file>
111111
and to start it once it has been registered:
112112

113113
```bash
114-
make operator_start CONFIG_FILE=<path_to_config_file>
114+
make operator_start ENVIRONMENT=devnet CONFIG_FILE=<path_to_config_file>
115115
```
116116

117117
</details>

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* [Operator FAQ](operator_guides/1_operator_FAQ.md)
4141
* [Troubleshooting](operator_guides/2_troubleshooting.md)
4242
* Upgrading Guides
43+
* [Upgrading to v0.14.0](operator_guides/upgrading_guides/v0_14_0.md)
4344
* [Upgrading to v0.10.2](operator_guides/upgrading_guides/v0_10_2.md)
4445
* [Upgrading to v0.9.2](operator_guides/upgrading_guides/v0_9_2.md)
4546

docs/operator_guides/0_running_an_operator.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,30 @@ make install_foundry
5454
foundryup
5555
```
5656

57-
To build the operator binary, run:
57+
To build the operator binary for **Testnet**, run:
5858

5959
```bash
60-
make build_operator
60+
make build_operator ENVIRONMENT=testnet
61+
```
62+
63+
To build the operator binary for **Mainnet**, run:
64+
65+
```bash
66+
make build_operator ENVIRONMENT=mainnet
6167
```
6268

6369
### Upgrading the Operator
6470

65-
If you want to upgrade the operator, run:
71+
If you want to upgrade the operator in **Testnet**, run:
72+
73+
```bash
74+
make update_operator ENVIRONMENT=testnet
75+
```
76+
77+
If you want to upgrade the operator in **Mainnet**, run:
6678

6779
```bash
68-
make update_operator
80+
make update_operator ENVIRONMENT=mainnet
6981
```
7082

7183
This will recreate the binaries. You can then proceed to restart the operator.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Upgrading to V0.14.0
2+
3+
This guide will walk you through the process of upgrading your Aligned Operator to v0.14.0.
4+
5+
Since EigenLayer released Slashing on Holesky Testnet, there are two versions of the [EigenSDK](https://github.com/Layr-Labs/eigensdk-go), one is compatible with Mainnet and the other one is compatible with Holesky Testnet. This guide will help you to upgrade your operator with the correct version of the EigenSDK.
6+
7+
The EigenSDK version [v0.1.13](https://github.com/Layr-Labs/eigensdk-go/releases/tag/v0.1.13) is compatible with Mainnet.
8+
9+
The EigenSDK version [v0.2.0-beta.1](https://github.com/Layr-Labs/eigensdk-go/releases/tag/v0.2.0-beta.1) is compatible with Holesky Testnet.
10+
11+
## Changes
12+
13+
This version includes the following changes:
14+
15+
* hotfix: eigensdk on Operator and Aggregator boot in [#1740](https://github.com/yetanotherco/aligned_layer/pull/1740)
16+
17+
## How to upgrade
18+
19+
Depending on the network you are running, you will need to upgrade the EigenSDK version on your operator.
20+
21+
For Mainnet this upgrade is optional, but for Holesky Testnet it is mandatory.
22+
23+
### Mainnet Operator
24+
25+
This upgrade is OPTIONAL for Mainnet operators. But, if you want to upgrade, you can follow the steps below:
26+
27+
#### Step 1 - Pull the latest changes
28+
29+
```shell
30+
cd <path/to/aligned/repository>
31+
git fetch origin
32+
git checkout v0.14.0
33+
```
34+
35+
#### Step 2 - Update the Operator
36+
37+
```shell
38+
make build_operator ENVIRONMENT=mainnet
39+
```
40+
41+
This will install the version v0.1.13 of the EigenSDK, and then it will recompile the binaries.
42+
43+
#### Step 3 - Check the Operator Version
44+
45+
To see the operator version, run:
46+
47+
```shell
48+
./operator/build/aligned-operator --version
49+
```
50+
51+
This will display the current version of the operator binary. The output should be:
52+
53+
```
54+
Aligned Layer Node Operator version v0.14.0
55+
```
56+
57+
#### Step 4 - Restart the Operator
58+
59+
Restart the operator based on your system configuration.
60+
61+
### Testnet Operator
62+
63+
This upgrade is MANDATORY for Testnet operators. Follow the steps below to upgrade your operator:
64+
65+
#### Step 1 - Pull the latest changes
66+
67+
```shell
68+
cd <path/to/aligned/repository>
69+
git fetch origin
70+
git checkout v0.14.0
71+
```
72+
73+
#### Step 2 - Update the Operator
74+
75+
```shell
76+
make build_operator ENVIRONMENT=testnet
77+
```
78+
79+
This will install the version v0.2.0-beta.1 of the EigenSDK, and then it will recompile the binaries.
80+
81+
#### Step 3 - Check the Operator Version
82+
83+
To see the operator version, run:
84+
85+
```shell
86+
./operator/build/aligned-operator --version
87+
```
88+
89+
This will display the current version of the operator binary. The output should be:
90+
91+
```
92+
Aligned Layer Node Operator version v0.14.0
93+
```
94+
95+
#### Step 4 - Restart the Operator
96+
97+
Restart the operator based on your system configuration.
98+
99+
### Troubleshooting
100+
101+
#### Operator not registered on Aligned
102+
103+
If your operator is not registered on Aligned, or it was ejected from the network, you can follow the registration process again.
104+
105+
- Mainnet:
106+
107+
```bash
108+
make operator_register_with_aligned_layer CONFIG_FILE=./config-files/config-operator-mainnet.yaml
109+
```
110+
111+
- Holesky:
112+
113+
```bash
114+
make operator_register_with_aligned_layer CONFIG_FILE=./config-files/config-operator-holesky.yaml
115+
```
116+
117+
{% hint style="danger" %}
118+
If you are going to run the server in this machine,
119+
delete the operator key
120+
{% endhint %}

0 commit comments

Comments
 (0)