Skip to content

Commit 7c86125

Browse files
docs: add operator registration instructions (#373)
Co-authored-by: Mauro Toscano <12560266+MauroToscano@users.noreply.github.com>
1 parent ac27480 commit 7c86125

3 files changed

Lines changed: 141 additions & 0 deletions

File tree

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ operator_start:
8383

8484
operator_register_and_start: operator_full_registration operator_start
8585

86+
build_operator: deps
87+
@echo "Building Operator..."
88+
@go build -o ./operator/build/aligned-operator ./operator/cmd/main.go
89+
@echo "Operator built into /operator/build/aligned-operator"
90+
8691
bindings:
8792
cd contracts && ./generate-go-bindings.sh
8893

README.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [Table of Contents](#table-of-contents)
1010
- [The Project](#the-project)
1111
- [How to use the testnet](#how-to-use-the-testnet)
12+
- [Register as an Aligned operator in testnet](#register-as-an-aligned-operator-in-testnet)
1213
- [Local Devnet Setup](#local-devnet-setup)
1314
- [Deploying Aligned Contracts to Holesky or Testnet](#deploying-aligned-contracts-to-holesky-or-testnet)
1415
- [Metrics](#metrics)
@@ -118,6 +119,111 @@ aligned \
118119
--conn wss://batcher.alignedlayer.com
119120
```
120121

122+
## Register as an Aligned operator in testnet
123+
124+
### Requirements
125+
126+
> [!NOTE]
127+
> You must be whitelisted to become an Aligned operator.
128+
129+
This guide assumes you are already [registered as an operator with EigenLayer](https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-installation).
130+
131+
Ensure you have the following installed:
132+
133+
- [Go](https://go.dev/doc/install)
134+
- [Rust](https://www.rust-lang.org/tools/install)
135+
- [Foundry](https://book.getfoundry.sh/getting-started/installation)
136+
137+
To install foundry, run:
138+
139+
```bash
140+
make install_foundry
141+
foundryup
142+
```
143+
144+
#### Install the Operator Binary
145+
146+
To install the operator binary, run:
147+
148+
```bash
149+
make build_operator
150+
```
151+
152+
#### Update the operator
153+
154+
To update the operator, first stop the process running the operator (if there is any) and then run:
155+
156+
```bash
157+
git pull
158+
make build_operator
159+
```
160+
161+
#### Configuration
162+
163+
Update the following placeholders in `./config-files/config-operator.yaml`:
164+
165+
- `"<ecdsa_key_store_location_path>"`
166+
- `"<bls_key_store_location_path>"`
167+
- `"<operator_address>"`
168+
- `"<earnings_receiver_address>"`
169+
170+
`"<ecdsa_key_store_location_path>"` and `"<bls_key_store_location_path>"` are the paths to your keys generated with the EigenLayer CLI, `"<operator_address>"` and `"<earnings_receiver_address>"` can be found in the `operator.yaml` file created in the EigenLayer registration process.
171+
172+
### Deposit Strategy Tokens
173+
174+
We are using [WETH](https://holesky.eigenlayer.xyz/restake/WETH) as the strategy token.
175+
176+
To do so there are 2 options, either doing it through Eigen website, and following their guide, or running the commands specified by us below.
177+
178+
The eigen guide can be found [here](https://docs.eigenlayer.xyz/eigenlayer/restaking-guides/restaking-user-guide/liquid-restaking/restake-lsts).
179+
180+
You will need to stake a minimum of a 1000 Wei in WETH. We recommend to stake a maximium amount of 10 Eth.
181+
182+
If you have Eth and need to convert it to WETH you can use the following command, that will convert 1 Eth to WETH. Change the parameter in ```---value``` if you want to wrap a different amount:
183+
184+
```bash
185+
cast send 0x94373a4919B3240D86eA41593D5eBa789FEF3848 --rpc-url https://ethereum-holesky-rpc.publicnode.com --private-key <private_key> --value 1ether
186+
```
187+
188+
`<private_key>` is the one specified in the output when generating your keys with the EigenLayer CLI.
189+
190+
Finally, to end the staking process, you need to deposit into the strategy, as shown in the Eigen guide, or alternatively, you can run the following command to deposit one WETH:
191+
192+
```bash
193+
./operator/build/aligned-operator deposit-into-strategy --config ./config-files/config-operator.yaml --strategy-address 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9 --amount 1000000000000000000
194+
```
195+
196+
If you don't have Holesky Eth, these are some useful faucets:
197+
198+
- [Google Cloud for Web3 Holesky Faucet](https://cloud.google.com/application/web3/faucet/ethereum/holesky)
199+
- [Holesky PoW Faucet](https://holesky-faucet.pk910.de/)
200+
201+
### Register as an operator with Aligned
202+
203+
To register the operator with Aligned, run:
204+
205+
```bash
206+
./operator/build/aligned-operator register --config ./config-files/config-operator.yaml
207+
```
208+
209+
### Start the operator
210+
211+
To start the Aligned operator, run:
212+
213+
```bash
214+
./operator/build/aligned-operator start --config ./config-files/config-operator.yaml
215+
```
216+
217+
### Unregister the operator from Aligned
218+
219+
To unregister the Aligned operator, run:
220+
221+
```bash
222+
cast send --rpc-url https://ethereum-holesky-rpc.publicnode.com --private-key <private_key> 0x3aD77134c986193c9ef98e55e800B71e72835b62 'deregisterOperator(bytes)' 0x00
223+
```
224+
225+
`<private_key>` is the one specified in the output when generating your keys with the EigenLayer CLI.
226+
121227
## Local Devnet Setup
122228

123229
### Dependencies

config-files/config-operator.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Common variables for all the services
2+
# 'production' only prints info and above. 'development' also prints debug
3+
environment: "production"
4+
aligned_layer_deployment_config_file_path: "./contracts/script/output/holesky/alignedlayer_deployment_output.json"
5+
eigen_layer_deployment_config_file_path: "./contracts/script/output/holesky/eigenlayer_deployment_output.json"
6+
eth_rpc_url: "https://ethereum-holesky-rpc.publicnode.com"
7+
eth_ws_url: "wss://ethereum-holesky-rpc.publicnode.com"
8+
eigen_metrics_ip_port_address: "localhost:9090"
9+
10+
## ECDSA Configurations
11+
ecdsa:
12+
private_key_store_path: "<ecdsa_key_store_location_path>"
13+
private_key_store_password: ""
14+
15+
## BLS Configurations
16+
bls:
17+
private_key_store_path: "<bls_key_store_location_path>"
18+
private_key_store_password: ""
19+
20+
## Operator Configurations
21+
operator:
22+
aggregator_rpc_server_ip_port_address: aggregator.alignedlayer.com:8090
23+
address: "<operator_address>"
24+
earnings_receiver_address: "<earnings_receiver_address>" #Can be the same as the operator.
25+
delegation_approver_address: "0x0000000000000000000000000000000000000000"
26+
staker_opt_out_window_blocks: 0
27+
metadata_url: "https://yetanotherco.github.io/operator_metadata/metadata.json"
28+
enable_metrics: true
29+
metrics_ip_port_address: localhost:9092
30+
max_batch_size: 268435456 # 256 MiB

0 commit comments

Comments
 (0)