Skip to content

Commit

Permalink
pull fixes from testnet (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce authored Dec 2, 2024
2 parents 94fcec9 + 8b6ef0c commit f0d9115
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 47 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ SHELL := /bin/bash
OS := $(shell uname -s)

CONFIG_FILE?=config-files/config.yaml
export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE))
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml

OPERATOR_VERSION=v0.12.0
OPERATOR_VERSION=v0.12.1

ifeq ($(OS),Linux)
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
Expand Down
2 changes: 1 addition & 1 deletion batcher/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion batcher/aligned-batcher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ impl Batcher {
let current_batch_len = batch_state_lock.batch_queue.len();
let last_uploaded_batch_block_lock = self.last_uploaded_batch_block.lock().await;

if current_batch_len < 2 {
if current_batch_len < 1 {
info!(
"Current batch has {} proofs. Waiting for more proofs...",
current_batch_len
Expand Down
2 changes: 1 addition & 1 deletion batcher/aligned/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aligned"
version = "0.12.0"
version = "0.12.1"
edition = "2021"

[dependencies]
Expand Down
34 changes: 34 additions & 0 deletions config-files/config-operator-mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Common variables for all the services
# 'production' only prints info and above. 'development' also prints debug
environment: 'production'
aligned_layer_deployment_config_file_path: './contracts/script/output/mainnet/alignedlayer_deployment_output.json'
eigen_layer_deployment_config_file_path: './contracts/script/output/mainnet/eigenlayer_deployment_output.json'
eth_rpc_url: 'https://ethereum-rpc.publicnode.com' # DO NOT USE PUBLIC NODE IN PRODUCTION
eth_rpc_url_fallback: 'https://ethereum-rpc.publicnode.com'
eth_ws_url: 'wss://ethereum-rpc.publicnode.com' # DO NOT USE PUBLIC NODE IN PRODUCTION
eth_ws_url_fallback: 'wss://ethereum-rpc.publicnode.com'
eigen_metrics_ip_port_address: 'localhost:9090'

## ECDSA Configurations
ecdsa:
private_key_store_path: '<ecdsa_key_store_location_path>'
private_key_store_password: '<ecdsa_key_store_password>'

## BLS Configurations
bls:
private_key_store_path: '<bls_key_store_location_path>'
private_key_store_password: '<bls_key_store_password>'

## Operator Configurations
operator:
aggregator_rpc_server_ip_port_address: mainnet.aggregator.alignedlayer.com:8090
operator_tracker_ip_port_address: https://mainnet.telemetry.alignedlayer.com
address: '<operator_address>'
earnings_receiver_address: '<earnings_receiver_address>' #Can be the same as the operator.
delegation_approver_address: '0x0000000000000000000000000000000000000000'
staker_opt_out_window_blocks: 0
metadata_url: <metadata_url>
enable_metrics: true
metrics_ip_port_address: localhost:9092
max_batch_size: 268435456 # 256 MiB
last_processed_batch_filepath: 'config-files/operator.last_processed_batch.json'
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"addresses": {
"alignedLayerProxyAdmin": "0x487e0347B96bE3606845A3aaDC7B0D8138952b47",
"alignedLayerServiceManager": "0xeF2A435e5EE44B2041100EF8cbC8ae035166606c",
"alignedLayerServiceManagerImplementation": "0x4A5D61ABa7d845bC71d4E2f2Dd7C35D9c5fb55B8",
"blsApkRegistry": "0x3CcfB7e6e8fe2A8d941a8Ce4C69A944a770E8228",
"blsApkRegistryImplementation": "0x15ca88A3D1bDA5e0CA8b84A8759009b1d46d0031",
"indexRegistry": "0x9Bf1275e18eC8FA3cA7f9bffF1b0DF3e14C6E134",
"indexRegistryImplementation": "0xc97bF0d5F6adf3B364DD77b6a5554d83445d31F1",
"operatorStateRetriever": "0x6e0046205cAfA503F6b7465195A6C63C47d214f1",
"pauserRegistry": "0xbb8fF0382bFC9B37C38286EA4724900aA49DF28F",
"registryCoordinator": "0xA8CC0749b4409c3c47012323E625aEcBA92f64b9",
"registryCoordinatorImplementation": "0xc33364cf6BfAE261EEE8564814cA368aac5E781d",
"serviceManagerRouter": "0xB975bf77E1df8a3e217Bee2F06Ff026C0FC8e004",
"stakeRegistry": "0x45F5290a3630Cd6dc277B6f92227526121ca7c22",
"stakeRegistryImplementation": "0x8eEc7185dbDe1BC0cB2F9E026188cf40bB96AEBa",
"batcherPaymentService": "0xb0567184A52cB40956df6333510d6eF35B89C8de",
"batcherPaymentServiceImplementation": "0xDBf12f0D41fa0cf778DB9f809E0209362944ff20"
},
"chainInfo": {
"chainId": 1,
"deploymentBlock": 21289146
},
"permissions": {
"alignedLayerAggregator": "0x0b9AacA2C28a7ECAcB68BAef0d2F596AC27aaE32",
"alignedLayerChurner": "0xfC135A861efF65b7644Fb03d9f851251546C0835",
"alignedLayerEjector": "0xfC135A861efF65b7644Fb03d9f851251546C0835",
"alignedLayerOwner": "0xfC135A861efF65b7644Fb03d9f851251546C0835",
"alignedLayerPauser": "0xfC135A861efF65b7644Fb03d9f851251546C0835",
"alignedLayerUpgrader": "0xfC135A861efF65b7644Fb03d9f851251546C0835"
}
}
37 changes: 37 additions & 0 deletions contracts/script/output/mainnet/eigenlayer_deployment_output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"addresses": {
"avsDirectory": "0x135DDa560e946695d6f155dACaFC6f1F25C1F5AF",
"avsDirectoryImplementation": "0xdAbdB3Cd346B7D5F5779b0B614EdE1CC9DcBA5b7",
"baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3",
"beaconOracle": "0x343907185b71aDF0eBa9567538314396aa985442",
"delayedWithdrawalRouter": "0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8",
"delayedWithdrawalRouterImplementation": "0x4bB6731B02314d40aBbfFBC4540f508874014226",
"delegationManager": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A",
"delegationManagerImplementation": "0x1784BE6401339Fc0Fedf7E9379409f5c1BfE9dda",
"eigenLayerPauserReg": "0x0c431C66F4dE941d089625E5B423D00707977060",
"eigenLayerProxyAdmin": "0x8b9566AdA63B64d1E1dcF1418b43fd1433b72444",
"eigenPodBeacon": "0x5a2a4F2F3C18f09179B6703e63D9eDD165909073",
"eigenPodImplementation": "0x28144C53bA98B4e909Df5bC7cA33eAf0404cFfcc",
"eigenPodManager": "0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338",
"eigenPodManagerImplementation": "0xe4297e3DaDBc7D99e26a2954820f514CB50C5762",
"emptyContract": "0x1f96861fEFa1065a5A96F20Deb6D8DC3ff48F7f9",
"rewardsCoordinator": "0x7750d328b314EfFa365A0402CcfD489B80B0adda",
"rewardsCoordinatorImplementation": "0x5bf7c13D5FAdba224ECB3D5C0a67A231D1628785",
"slasher": "0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd",
"slasherImplementation": "0xF3234220163a757edf1E11a8a085638D9B236614",
"strategies": "",
"strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A",
"strategyManagerImplementation": "0x70f44C13944d49a236E3cD7a94f48f5daB6C619b"
},
"chainInfo": {
"chainId": 1,
"deploymentBlock": 20341789
},
"parameters": {
"communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598",
"executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111",
"operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90",
"pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390",
"timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF"
}
}
2 changes: 1 addition & 1 deletion docs/3_guides/1_SDK_how_to.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use this SDK in your Rust project, add the following to your `Cargo.toml`:

```toml
[dependencies]
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.12.0" }
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.12.1" }
```

To find the latest release tag go to [releases](https://github.com/yetanotherco/aligned_layer/releases) and copy the
Expand Down
99 changes: 57 additions & 42 deletions docs/operator_guides/0_running_an_operator.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Register as an Aligned operator in testnet

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

```bash
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.12.0
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.12.1
cd aligned_layer
```

Expand Down Expand Up @@ -80,7 +80,7 @@ This will display the current version of the operator binary.

## Step 3 - Update the configuration for your specific Operator

Update the following placeholders in `./config-files/config-operator.yaml`:
Update the following placeholders in `./config-files/config-operator-mainnet.yaml`:

- `"<operator_address>"`
- `"<earnings_receiver_address>"`
Expand All @@ -95,7 +95,7 @@ The keys are stored by default in the `~/.eigenlayer/operator_keys/` directory,

{% hint style="danger" %}

Don't keep the Operator Key in the Aligned Operator Node
Don't keep the Operator Key in the Aligned Operator Node. If you already registered, don't use it. If you need to register, delete it after step 4.

{% endhint %}

Expand Down Expand Up @@ -125,53 +125,23 @@ eth_ws_url: "wss://<RPC_1>"
eth_ws_url_fallback: "wss://<RPC_2>"
```
## Step 4 - Deposit Strategy Tokens
## Step 4 - Register Operator on AlignedLayer
We are using [WETH](https://holesky.eigenlayer.xyz/restake/WETH) as the strategy token.
To do so, there are two options, either doing it through EigenLayer's website, and following their guide, or running the commands specified by us below.
You will need to stake a minimum of 1000 WEI in WETH. We recommend to stake a maximum amount of 10 WETH. If you are staking more than 10 WETH please unstake any surplus over 10.
### Option 1
EigenLayer's guide can be found [here](https://docs.eigenlayer.xyz/eigenlayer/restaking-guides/restaking-user-guide/liquid-restaking/restake-lsts).
### Option 2
If you have ETH and need to convert it to WETH you can use the following command, that will convert 1 ETH to WETH.
Make sure to have [foundry](https://book.getfoundry.sh/getting-started/installation) already installed.
Change the parameter in ```---value``` if you want to wrap a different amount:
Then you must register as an Operator on AlignedLayer. To do this, you must run:
```bash
cast send 0x94373a4919B3240D86eA41593D5eBa789FEF3848 --rpc-url https://ethereum-holesky-rpc.publicnode.com --private-key <private_key> --value 1ether
make operator_register_with_aligned_layer CONFIG_FILE=./config-files/config-operator-mainnet.yaml
```

Here `<private_key>` is the placeholder for the ECDSA key specified in the output when generating your keys with the EigenLayer CLI.

Finally, to end the staking process, you need to deposit into the WETH strategy,
as shown in the EigenLayer guide.

<details>
<summary>An alternative using the CLI</summary>

Run the following command to deposit one WETH

```bash
./operator/build/aligned-operator deposit-into-strategy --config ./config-files/config-operator.yaml --strategy-address 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9 --amount 1000000000000000000
```

</details>

If you don't have Holesky ETH, these are some useful faucets:

- [Google Cloud for Web3 Holesky Faucet](https://cloud.google.com/application/web3/faucet/ethereum/holesky)
- [Holesky PoW Faucet](https://holesky-faucet.pk910.de/)
{% hint style="danger" %}
If you are going to run the server in this machine,
delete the operator key
{% endhint %}

## Step 5 - Start the operator

```bash
./operator/build/aligned-operator start --config ./config-files/config-operator.yaml
./operator/build/aligned-operator start --config ./config-files/config-operator-mainnet.yaml
```

### Run Operator using Systemd
Expand Down Expand Up @@ -243,3 +213,48 @@ cast send --rpc-url https://ethereum-holesky-rpc.publicnode.com --private-key <p
```

`<private_key>` is the one specified in the output when generating your keys with the EigenLayer CLI.


## Deposit Strategy Tokens in Testnet

We are using [WETH](https://holesky.eigenlayer.xyz/restake/WETH) as the strategy token.

To do so, there are two options, either doing it through EigenLayer's website, and following their guide, or running the commands specified by us below.

You will need to stake a minimum of 1000 WEI in WETH. We recommend to stake a maximum amount of 10 WETH. If you are staking more than 10 WETH please unstake any surplus over 10.

### Option 1

EigenLayer's guide can be found [here](https://docs.eigenlayer.xyz/eigenlayer/restaking-guides/restaking-user-guide/liquid-restaking/restake-lsts).

### Option 2

If you have ETH and need to convert it to WETH you can use the following command, that will convert 1 ETH to WETH.
Make sure to have [foundry](https://book.getfoundry.sh/getting-started/installation) already installed.
Change the parameter in ```---value``` if you want to wrap a different amount:

```bash
cast send 0x94373a4919B3240D86eA41593D5eBa789FEF3848 --rpc-url https://ethereum-holesky-rpc.publicnode.com --private-key <private_key> --value 1ether
```

Here `<private_key>` is the placeholder for the ECDSA key specified in the output when generating your keys with the EigenLayer CLI.

Finally, to end the staking process, you need to deposit into the WETH strategy,
as shown in the EigenLayer guide.

<details>
<summary>An alternative using the CLI</summary>

Run the following command to deposit one WETH

```bash
./operator/build/aligned-operator deposit-into-strategy --config ./config-files/config-operator.yaml --strategy-address 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9 --amount 1000000000000000000
```

</details>

If you don't have Holesky ETH, these are some useful faucets:

- [Google Cloud for Web3 Holesky Faucet](https://cloud.google.com/application/web3/faucet/ethereum/holesky)
- [Holesky PoW Faucet](https://holesky-faucet.pk910.de/)

0 comments on commit f0d9115

Please sign in to comment.