Run a node using docker
We provide an Operator Setup Repository which contains various templates that make it easy to run an EigenDA node using docker and docker compose. Operators wishing to make use of other setups can use the docker-compose-based setup as a template for constructing their own custom setups.
To proceed with these instructions, be sure to ensure that you have installed docker on your system.
EigenDA Node Configuration
Clone the Oprator Setup Repo and populate the environment variables
Run the following commands to clone the Oprator Setup Repo and create a new environment file from the provided template.
The srs_setup.sh
script will also download the (~8GB) structured reference string (SRS) used by the EigenDA node as part of its KZG verification to the eigenda-operator-setup/resources
directory.
- Mainnet
- Holesky
git clone https://github.com/Layr-Labs/eigenda-operator-setup.git
cd eigenda-operator-setup && ./srs_setup.sh
cd mainnet && cp .env.example .env
git clone https://github.com/Layr-Labs/eigenda-operator-setup.git
cd eigenda-operator-setup && ./srs_setup.sh
cd holesky && cp .env.example .env
The provided .env
contains many default configuration settings for the node. All sections marked with TODO
must be updated to match your environment. We recommend that operators follow the steps in the next section to configure their node to run without access to their ECDSA private key.
As described here, the ECDSA and BLS keys needed to populate your .env
can be obtained via the process of registering as an operator for EigenLayer.
Do not modify the docker-compose.yml file. If you choose to modify this file, unexpected behaviors can result.
Configure local storage locations
Check that the $USER_HOME
, $EIGENLAYER_HOME
, $EIGENDA_HOME
are properly set within your environment file and that all the folders exist as expected.
source .env
ls $USER_HOME $EIGENLAYER_HOME $EIGENDA_HOME
By default, the EigenDA node will use the following locations for log storage and blob shard storage, respectively.
NODE_LOG_PATH_HOST=${EIGENDA_HOME}/logs
NODE_DB_PATH_HOST=${EIGENDA_HOME}/db
Ensure that these locations correspond to high performance SSD storage with sufficient capaicity, as indicated in the System Requirements. Also ensure that the specific folders exist that the docker user has the correct write permissions:
mkdir -p ${NODE_LOG_PATH_HOST}
mkdir -p ${NODE_DB_PATH_HOST}
Note: The default environment setup assumes that you have cloned the eigend-operator-setup
repo to the $USER_HOME
directory, and the node will look in this location for several files necessary for operation:
NODE_G1_PATH_HOST=${USER_HOME}/eigenda-operator-setup/resources/g1.point
NODE_G2_PATH_HOST=${USER_HOME}/eigenda-operator-setup/resources/g2.point.powerOf2
NODE_CACHE_PATH_HOST=${USER_HOME}/eigenda-operator-setup/resources/cache
(Recommended) Set up your your node to run without access to operator ECDSA keys
In EigenDA v0.6.1, we added a feature where you can configure your node so that it doesn't need operator's ECDSA keys to run. Your node still need access to BLS keys for attestation purposes.
NOTE: You still need ECDSA and BLS keys to opt-in to EigenDA.
To enable this feature by using our setup, follow the below commands:
- Remove the
"${NODE_ECDSA_KEY_FILE_HOST}:/app/operator_keys/ecdsa_key.json:readonly"
mount fromdocker-compose.yml
file. - Update the
NODE_ECDSA_KEY_FILE
in your.env
file to be empty. - Update the
NODE_ECDSA_KEY_PASSWORD
in your.env
file to be empty. - Update the
NODE_PUBLIC_IP_CHECK_INTERVAL
in your.env
file to be0
(This flag was used to check and update your IP onchain if your IP changes, so if your IP changes it's your responsibility to update).
Network Configuration
The EigenDA node must be properly reachable by various parties in order to fulfill its responsibilities to store and serve data.
Retrieval Setup
In order for users to retrieve data from your node, you will need to open access to retrieval ports.
Ensure the port specified as NODE_RETRIEVAL_PORT
in the .env
has open access to the public internet.
Note that in the default setup this port is served by an NGINX reverse proxy that implements basic rate limitting to provide a level of protection against DoS attacks. If you decide to run a custom setup, you should replicate these protections using your own infrastructure.
Dispersal Setup
It is important to follow the instructions in this setup to keep your node from being vulnerable to DOS attacks.
The port specified as NODE_DISPERSAL_PORT
in the .env
should only be reachable by the EigenLabs hosted disperser.
Please configure the firewall, security groups, or other network settings so that this port can only be reached from the following IP addresses:
- Mainnet
- Holesky
3.216.127.6/32
3.225.189.232/32
52.202.222.39/32
54.144.24.178/32
34.232.117.230/32
18.214.113.214/32
Run the Node
Start and Stop the EigenDA using Docker Compose
Execute the following command to start the docker containers:
docker compose up -d
The command will start the node and nginx containers and if you do docker ps
you should see an output indicating all containers have status of “Up” with ports assigned.
To stop the node, run the following command.
docker compose down
Once you have registered for a quorum, you must keep your node running until you have deregistered and satisfied all requirements of the protocol SLA
View the EigenDA Logs
You may view the container logs using and of the following commands
docker compose logs -f
docker compose logs -f <container_name>
docker logs -f <container_id>
Upon successfully starting up, the DA node should produce logs similar to the following:
2024/03/22 19:33:28 maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined
2024/03/22 19:33:30 Initializing Node
time=2024-03-22T19:33:34.503Z level=DEBUG source=/app/core/eth/tx.go:791 msg=Addresses blsOperatorStateRetrieverAddr=0xB4baAfee917fb4449f5ec64804217bccE9f46C67 eigenDAServiceManagerAddr=0xD4A7E1Bd8015057293f0D0A557088c286942e84b registryCoordinatorAddr=0x53012C69A189cfA2D9d29eb6F19B32e0A2EA3490 blsPubkeyRegistryAddr=0x066cF95c1bf0927124DFB8B02B401bc23A79730D
2024/03/22 19:33:34 Reading G1 points (4194304 bytes) takes 5.981866ms
2024/03/22 19:33:37 Parsing takes 3.144064399s
numthread 8
time=2024-03-22T19:33:38.141Z level=INFO source=/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.3-0.20240318050546-8d038f135826/metrics/eigenmetrics.go:81 msg="Starting metrics server at port :9092"
time=2024-03-22T19:33:38.141Z level=INFO source=/app/node/node.go:174 msg="Enabled metrics" socket=:9092
time=2024-03-22T19:33:38.141Z level=INFO source=/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.3-0.20240318050546-8d038f135826/nodeapi/nodeapi.go:104 msg="Starting node api server at address :9091"
time=2024-03-22T19:33:38.141Z level=INFO source=/app/node/node.go:178 msg="Enabled node api" port=9091
time=2024-03-22T19:33:38.141Z level=INFO source=/app/node/node.go:211 msg="The node has successfully started. Note: if it's not opted in on https://app.eigenlayer.xyz/avs/eigenda, then please follow the EigenDA operator guide section in docs.eigenlayer.xyz to register"
time=2024-03-22T19:33:38.141Z level=INFO source=/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.3-0.20240318050546-8d038f135826/nodeapi/nodeapi.go:238 msg="node api server running" addr=:9091
time=2024-03-22T19:33:38.141Z level=INFO source=/app/node/node.go:385 msg="Start checkRegisteredNodeIpOnChain goroutine in background to subscribe the operator socket change events onchain"
time=2024-03-22T19:33:38.142Z level=INFO source=/app/node/node.go:231 msg="Start expireLoop goroutine in background to periodically remove expired batches on the node"
time=2024-03-22T19:33:38.142Z level=INFO source=/app/node/node.go:408 msg="Start checkCurrentNodeIp goroutine in background to detect the current public IP of the operator node"
time=2024-03-22T19:33:38.142Z level=INFO source=/app/node/grpc/server.go:123 msg=port 32004=address [::]:32004="GRPC Listening"
time=2024-03-22T19:33:38.142Z level=INFO source=/app/node/grpc/server.go:99 msg=port 32005=address [::]:32005="GRPC Listening"