EigenLayer Operator Guides
EigenLayer Operator Guides
Currently only the Ethereum holesky test network and AO are supported, and the Ethereum main network and other networks will be gradually supported in the future.
Software/Hardware Requirement
- vCPUs: 2+
- Memory: 4GiB+
- Storage: 100GiB+
Install
Please reference to official documentation: Install Docker Engine.
Next, pull the image:
docker pull padolabs/pado-network:latest
Clone pado-labs/pado-worker-setup:
git clone https://github.com/pado-labs/pado-worker-setup.git
cd pado-worker-setup/pado-node
Register as Operator on EigenLayer
NOTE: You may skip this section if you are already a registered operator on the EigenLayer testnet and mainnet.
This setup step focuses on generating ecdsa key, bls key, and registering yourself as an operator on EigenLayer.
Complete the following steps according to EigenLayer guide:
- Install EigenLayer CLI.
- Generate ECDSA and BLS keypair. You can also import existing ECDSA and BLS keys.
- Fund some ETH to the ECDSA address above generated. These ETH will be used to cover the gas cost for operator registration and doing task in the subsequent steps.
- Register on EigenLayer as an operator.
Basic Configurations
For the Ethernet Testnet(Holesky), copy ./config-files/.env.holesky
into ./.env
. Edit the ./.env
and update the values for your own setups.
NOTE: If you plan to operate on Mainnet, then copy .env.mainnet
instead of .env.holesky
.
Node Info
Set a name to identify yourself, these will be used on the node itself and will be shown on performance metrics in the future.
NODE_NAME="Your Node Name"
NODE_DESCRIPTION="Your Node Name's Description"
ECDSA and BLS Key
Fill in the file path and password of the ECDSA and BLS key you have generated according to Register as Operator on EigenLayer.
ECDSA_KEY_FILE=/path/to/keyname.ecdsa.key.json
ECDSA_KEY_PASSWORD=''
BLS_KEY_FILE=/path/to/keyname.bls.key.json
BLS_KEY_PASSWORD=''
LHE Key
The LHE key is used for data sharing, use the following command to generate it.
bash ./run.sh generate-lhe-key [--key-name <NAME>]
The default output is ./keys/default.lhe.key.json
, you can specify the key name via --key-name <NAME>
.
IMPORTANT! Don't lose this file and save it to a safe place!
Next, fill in the file path of the LHE key you have generated.
LHE_KEY_PATH='/path/to/your/lhe.key.json'
Storage
Storing data on a contract is expensive, so we are currently using Arweave as the storage blockchain which is cheaper to store data.
By default, we can use Arweave directly. However, the Arweave ecosystem itself has some issues. In order not to suffer from these issues, we using Arseeding instead.
In order to use Arseeding, we need to first transfer/deposit some mainnet ETH to everPay, which wallet corresponds to the ecdsa key previously mentioned above.
Alternatively, you can also deposit on EverPay with the following command:
# here set your ethereum wallet path
export WALLET_PATH=/path/to/your/ethereum/wallet.json
# bash ./utils.sh everpay:deposit --chain <CHAIN_TYPE> --symbol <SYMBOL> --amount <AMOUNT>
# e.g.:
# bash ./utils.sh everpay:deposit --chain ethereum --symbol ETH --amount 0.0003
Meanwhile, you can check the balance on EverPay by:
bash ./utils.sh everpay:balance --account <ACCOUNT_ADDRESS> [--symbol <SYMBOL>]
Register to Primus AVS
If you have registered as an operator on the EigenLayer, you can register to the AVS of Primus.
NOTE: Please contact Primus Labs to add your wallet address to the WHITELIST before being able to successfully register!
The following parameters are relevant. All have default values, you may set them according to your actual needs.
# Time after which the operator's signature becomes invalid. Default: 3600
OPERATOR_SIGNATURE_EXPIRY_SECONDS=
# The operator socket. Default: ""
OPERATOR_SOCKET_IP_PORT=
Next, register the operator to AVS by:
# special a quorum id or quorum id list split by comma. e.g.:
# bash ./run.sh el:register 0
# bash ./run.sh el:register 0,1
bash ./run.sh el:register [--quorum-id-list <ID>]
NOTE: The Primus AVS now only supports quorum ids of 0
. The default value of quorum-id-list
is 0
.
In general, you only need to perform the registry step once.
Once you have successfully registered to avs, you can get the operator id by:
bash ./run.sh el:get-operator-id
Metrics (Optional)
NOTE: If you want to monitor some metrics, you should set NODE_ENABLE_METRICS
to true
to enable it.
Metrics can be enabled/disabled by setting NODE_ENABLE_METRICS
to true/false
. The default value is false
. You can also set a port by NODE_METRICS_PORT
for the metrics service, which defaults to 9094
.
Run Task
Once successfully registered, you can start the task program.
bash ./run.sh task [<name>]
It will start a container named pado-network[-name]
in the background. Some logs will output to ./logs/*.log
.
You can Stop/Start/Restart/Remove the container by running docker stop/start/restart/rm pado-network[-name]
.
Monitoring (Optional)
If you have enabled Metrics, you can start monitoring by following the steps below.
Switch folder
Switch to the pado-worker-setup/monitoring
folder.
Configurations
Config ./prometheus.yml
:
- job_name: "pado-node"
scrape_interval: 5s
static_configs:
# FORMAT container:port
# container: pado-node container name
# port: NODE_METRICS_PORT
- targets: ["pado-network:9094"]
Note:
- contrainer: If the node started with a name, such as
bash ./run.sh task somename
, you should update the container topado-network-somename
. The default value ispado-network
. - port: set by
NODE_METRICS_PORT
. The default value is9094
.
Usage
- Start
docker compose up -d
Ensure Prometheus is run in the same Docker network as Primus Network Node. Run the following command for this purpose:
docker network connect pado-network prometheus
You should be able to navigate to http://host:3000
and login with admin/admin
(default).
- Stop
docker compose stop
Add New Workers (Optional)
NOTE: Add New Workers is optional. If you want to execute Ethereum and AO tasks at the same time, you can execute the following command. Otherwise, you do not need to execute the following command.
Add AO Worker
Step 1: Switch to the pado-worker-setup/pado-node
folder. Reference ./config-files/.env.ao
, mainly copy and append the following options and their value to .env
:
ENABLE_AO
AO_DATAREGISTRY_PROCESS_ID
AO_NODEREGISTRY_PROCESS_ID
AO_TASKS_PROCESS_ID
AR_WALLET_PATH
Step 2: Set your own AR_WALLET_PATH
. Reference Arweave Wallet.
Step 3: Register to Primus AO Process. Reference Register to Primus AO Process.
Step 4: Remove the old container and re-run the task. Reference Run Task.
You can see the full configuration options from ./config-files/.env.holesky-and-ao
.
Utilities
Utilities are tool scripts that does not need to be executed during startup.
Worker Withdraw
As a worker, you'll get some tokens for each task you complete. Before executing the following script, switch to the pado-worker-setup/pado-node
folder.
You can get the balance(free, locked) by:
bash ./run.sh worker:balance
and withdraw by (If no amount is specified, the entire free balance is withdrawn):
bash ./run.sh worker:withdraw [--amount <AMOUNT>]