Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull hotfixes #1765

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE))
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml

OPERATOR_VERSION=v0.13.0
EIGEN_SDK_GO_VERSION_TESTNET=v0.2.0-beta.1
EIGEN_SDK_GO_VERSION_MAINNET=v0.1.13

ifeq ($(OS),Linux)
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
Expand All @@ -29,6 +31,16 @@ endif
ifeq ($(OS),Darwin)
BUILD_OPERATOR = $(MAKE) build_operator_macos
endif

ifeq ($(ENVIRONMENT), devnet)
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_devnet
else ifeq ($(ENVIRONMENT), testnet)
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_testnet
else ifeq ($(ENVIRONMENT), mainnet)
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_mainnet
else
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_error
endif


FFI_FOR_RELEASE ?= true
Expand Down Expand Up @@ -140,7 +152,13 @@ anvil_start_with_block_time_with_more_prefunded_accounts:

_AGGREGATOR_:

build_aggregator:
$(GET_SDK_VERSION)
@echo "Building aggregator"
@go build -o ./build/aligned-aggregator ./aggregator/cmd/main.go

aggregator_start:
$(GET_SDK_VERSION)
@echo "Starting Aggregator..."
@go run aggregator/cmd/main.go --config $(AGG_CONFIG_FILE) \
2>&1 | zap-pretty
Expand All @@ -156,15 +174,31 @@ test_go_retries:
__OPERATOR__:

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

operator_set_eigen_sdk_go_version_testnet:
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_TESTNET)"
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_TESTNET)

operator_set_eigen_sdk_go_version_devnet: operator_set_eigen_sdk_go_version_mainnet

operator_set_eigen_sdk_go_version_mainnet:
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_MAINNET)"
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_MAINNET)

operator_set_eigen_sdk_go_version_error:
@echo "Error setting Eigen SDK version, missing ENVIRONMENT. Possible values for ENVIRONMENT=<devnet|testnet|mainnet>"
exit 1

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

operator_register_and_start: operator_full_registration operator_start

build_operator: deps
$(GET_SDK_VERSION)
$(BUILD_OPERATOR)

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

update_operator:
$(GET_SDK_VERSION)
@echo "Updating Operator..."
@./scripts/fetch_latest_release.sh
@make build_operator
Expand Down
10 changes: 5 additions & 5 deletions docs/3_guides/6_setup_aligned.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,27 @@ make bindings
To start the [Aggregator](../2_architecture/components/5_aggregator.md):

```bash
make aggregator_start
make aggregator_start ENVIRONMENT=devnet
```

or with a custom config:

```bash
make aggregator_start CONFIG_FILE=<path_to_config_file>
make aggregator_start ENVIRONMENT=devnet CONFIG_FILE=<path_to_config_file>
```

## Operator

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

```bash
make operator_register_and_start
make operator_register_and_start ENVIRONMENT=devnet
```

or with a custom config:

```bash
make operator_register_and_start CONFIG_FILE=<path_to_config_file>
make operator_register_and_start ENVIRONMENT=devnet CONFIG_FILE=<path_to_config_file>
```

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

```bash
make operator_start CONFIG_FILE=<path_to_config_file>
make operator_start ENVIRONMENT=devnet CONFIG_FILE=<path_to_config_file>
```

</details>
Expand Down
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* [Operator FAQ](operator_guides/1_operator_FAQ.md)
* [Troubleshooting](operator_guides/2_troubleshooting.md)
* Upgrading Guides
* [Upgrading to v0.14.0](operator_guides/upgrading_guides/v0_14_0.md)
* [Upgrading to v0.10.2](operator_guides/upgrading_guides/v0_10_2.md)
* [Upgrading to v0.9.2](operator_guides/upgrading_guides/v0_9_2.md)

Expand Down
20 changes: 16 additions & 4 deletions docs/operator_guides/0_running_an_operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,30 @@ make install_foundry
foundryup
```

To build the operator binary, run:
To build the operator binary for **Testnet**, run:

```bash
make build_operator
make build_operator ENVIRONMENT=testnet
```

To build the operator binary for **Mainnet**, run:

```bash
make build_operator ENVIRONMENT=mainnet
```

### Upgrading the Operator

If you want to upgrade the operator, run:
If you want to upgrade the operator in **Testnet**, run:

```bash
make update_operator ENVIRONMENT=testnet
```

If you want to upgrade the operator in **Mainnet**, run:

```bash
make update_operator
make update_operator ENVIRONMENT=mainnet
```

This will recreate the binaries. You can then proceed to restart the operator.
Expand Down
120 changes: 120 additions & 0 deletions docs/operator_guides/upgrading_guides/v0_14_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Upgrading to V0.14.0

This guide will walk you through the process of upgrading your Aligned Operator to v0.14.0.

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.

The EigenSDK version [v0.1.13](https://github.com/Layr-Labs/eigensdk-go/releases/tag/v0.1.13) is compatible with Mainnet.

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.

## Changes

This version includes the following changes:

* hotfix: eigensdk on Operator and Aggregator boot in [#1740](https://github.com/yetanotherco/aligned_layer/pull/1740)

## How to upgrade

Depending on the network you are running, you will need to upgrade the EigenSDK version on your operator.

For Mainnet this upgrade is optional, but for Holesky Testnet it is mandatory.

### Mainnet Operator

This upgrade is OPTIONAL for Mainnet operators. But, if you want to upgrade, you can follow the steps below:

#### Step 1 - Pull the latest changes

```shell
cd <path/to/aligned/repository>
git fetch origin
git checkout v0.14.0
```

#### Step 2 - Update the Operator

```shell
make build_operator ENVIRONMENT=mainnet
```

This will install the version v0.1.13 of the EigenSDK, and then it will recompile the binaries.

#### Step 3 - Check the Operator Version

To see the operator version, run:

```shell
./operator/build/aligned-operator --version
```

This will display the current version of the operator binary. The output should be:

```
Aligned Layer Node Operator version v0.14.0
```

#### Step 4 - Restart the Operator

Restart the operator based on your system configuration.

### Testnet Operator

This upgrade is MANDATORY for Testnet operators. Follow the steps below to upgrade your operator:

#### Step 1 - Pull the latest changes

```shell
cd <path/to/aligned/repository>
git fetch origin
git checkout v0.14.0
```

#### Step 2 - Update the Operator

```shell
make build_operator ENVIRONMENT=testnet
```

This will install the version v0.2.0-beta.1 of the EigenSDK, and then it will recompile the binaries.

#### Step 3 - Check the Operator Version

To see the operator version, run:

```shell
./operator/build/aligned-operator --version
```

This will display the current version of the operator binary. The output should be:

```
Aligned Layer Node Operator version v0.14.0
```

#### Step 4 - Restart the Operator

Restart the operator based on your system configuration.

### Troubleshooting

#### Operator not registered on Aligned

If your operator is not registered on Aligned, or it was ejected from the network, you can follow the registration process again.

- Mainnet:

```bash
make operator_register_with_aligned_layer CONFIG_FILE=./config-files/config-operator-mainnet.yaml
```

- Holesky:

```bash
make operator_register_with_aligned_layer CONFIG_FILE=./config-files/config-operator-holesky.yaml
```

{% hint style="danger" %}
If you are going to run the server in this machine,
delete the operator key
{% endhint %}
2 changes: 1 addition & 1 deletion operator/pkg/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (o *Operator) Start(ctx context.Context) error {
}
case err := <-subV3:
o.Logger.Infof("Error in websocket subscription", "err", err)
subV2, err = o.SubscribeToNewTasksV3()
subV3, err = o.SubscribeToNewTasksV3()
if err != nil {
o.Logger.Fatal("Could not subscribe to new tasks V3")
}
Expand Down
Loading