⛓️Installation

1. Update and install packages

sudo apt update & sudo apt upgrade -y
sudo apt install ca-certificates zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev curl git wget make jq build-essential pkg-config lsb-release libssl-dev libreadline-dev libffi-dev gcc screen unzip lz4 -y

2. Install Docker & Docker compose

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker version
VER=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep tag_name | cut -d '"' -f 4)
curl -L "https://github.com/docker/compose/releases/download/"$VER"/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose
docker-compose --version

3. Install Go

cd $HOME && \
ver="1.22.0" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version

4. Install EigenLayer CLI

curl -sSfL https://raw.githubusercontent.com/layr-labs/eigenlayer-cli/master/scripts/install.sh | sh -s
export PATH=$PATH:~/bin
eigenlayer --version

5. Clone Chainbase AVS repo

git clone https://github.com/chainbase-labs/chainbase-avs-setup
cd chainbase-avs-setup/holesky

6. Create/Import Eigenlayer wallet

eigenlayer operator keys create --key-type ecdsa "wallet_name"

Set password & save your private key:

# Import an old key (optional)

eigenlayer operator keys import --key-type ecdsa "wallet_name" PRIVATEKEY

7. Fund your Eigen wallet

You’ll need at least 1 Holesky ETH to cover the gas cost of the operator registration. Make sure to send at least 1 ETH to your Eigenlayer operator’s address

8. Config & register operator

eigenlayer operator config create
  • Enter your operator address: your Eigenlayer address

  • Enter your earnings address (default to your operator address): `your Eigenlayer address`

  • Enter your ETH rpc url: https://ethereum-holesky-rpc.publicnode.com

  • Select your network: `holesky`

  • Select your signer type: `local_keystore`

  • Enter your ecdsa key path: /root/.eigenlayer/operator_keys/joseph-test.ecdsa.key.json

9. Edit metadata.json

nano /root/chainbase-avs-setup/holesky/metadata.json

Sample:

{
  "name": "Chicharito",
  "website": "https://www.node9x.com",
  "description": "Blockchain enthusiast and validator",
  "logo": "https://raw.githubusercontent.com/0xChicharito/chainbase/main/Jlogo.png",
  "twitter": "https://x.com/0xchicharito"
}

Logo support .png only and less than 1Mb

  • Create a Public repositry in github

  • Upload logo.png and metadata.jsonthere.

10. Edit operator.yaml

nano /root/chainbase-avs-setup/holesky/operator.yaml

Set URL metadatar with raw file link:

  • metadata_url: https://raw.githubusercontent.com/0xChicharito/chainbase/main/metadata.json

11. Run Eigenlayer holesky Node

eigenlayer operator register operator.yaml

Check status:

eigenlayer operator status operator.yaml

12. Config Chainbase AVS

a. Create .env file

nano .env

Input content and edit your info:

# Chainbase AVS Image
MAIN_SERVICE_IMAGE=repository.chainbase.com/network/chainbase-node:testnet-v0.1.7
FLINK_TASKMANAGER_IMAGE=flink:latest
FLINK_JOBMANAGER_IMAGE=flink:latest
PROMETHEUS_IMAGE=prom/prometheus:latest

MAIN_SERVICE_NAME=chainbase-node
FLINK_TASKMANAGER_NAME=flink-taskmanager
FLINK_JOBMANAGER_NAME=flink-jobmanager
PROMETHEUS_NAME=prometheus

# FLINK CONFIG
FLINK_CONNECT_ADDRESS=flink-jobmanager
FLINK_JOBMANAGER_PORT=8081
NODE_PROMETHEUS_PORT=9091
PROMETHEUS_CONFIG_PATH=./prometheus.yml

# Chainbase AVS mounted locations
NODE_APP_PORT=8080
NODE_ECDSA_KEY_FILE=/app/operator_keys/ecdsa_key.json
NODE_LOG_DIR=/app/logs

# Node logs configs
NODE_LOG_LEVEL=debug
NODE_LOG_FORMAT=text

# Metrics specific configs
NODE_ENABLE_METRICS=true
NODE_METRICS_PORT=9092

# holesky smart contracts
AVS_CONTRACT_ADDRESS=0x5E78eFF26480A75E06cCdABe88Eb522D4D8e1C9d
AVS_DIR_CONTRACT_ADDRESS=0x055733000064333CaDDbC92763c58BF0192fFeBf

###############################################################################
####### TODO: Operators please update below values for your node ##############
###############################################################################
# TODO: Operators need to point this to a working chain rpc
NODE_CHAIN_RPC=https://rpc.ankr.com/eth_holesky
NODE_CHAIN_ID=17000

# TODO: Operators need to update this to their own paths
USER_HOME=$HOME
EIGENLAYER_HOME=${USER_HOME}/.eigenlayer
CHAINBASE_AVS_HOME=${EIGENLAYER_HOME}/chainbase/holesky

NODE_LOG_PATH_HOST=${CHAINBASE_AVS_HOME}/logs

# TODO: Operators need to update this to their own keys
NODE_ECDSA_KEY_FILE_HOST=${EIGENLAYER_HOME}/operator_keys/joseph-test.ecdsa.key.json

# TODO: Operators need to add password to decrypt the above keys
# If you have some special characters in password, make sure to use single quotes
NODE_ECDSA_KEY_PASSWORD=***123ABCabc123***

Update:

NODE_ECDSA_KEY_FILE_HOST=${EIGENLAYER_HOME}/operator_keys/joseph-test.ecdsa.key.json NODE_ECDSA_KEY_PASSWORD="your password" NODE_CHAIN_RPC=https://rpc.ankr.com/eth_holesky

b. Create docker-compose.yml file

Copy

# Remove old file
rm -rf docker-compose.yml
# Open edit menu
nano docker-compose.yml

Input this content. Change port 8081, 9091, 8080, 9092 if you want.

services:
  prometheus:
    image: ${PROMETHEUS_IMAGE}
    container_name: ${PROMETHEUS_NAME}
    env_file:
      - .env
    volumes:
      - "${PROMETHEUS_CONFIG_PATH}:/etc/prometheus/prometheus.yml"
    command: 
      - "--enable-feature=expand-external-labels"
      - "--config.file=/etc/prometheus/prometheus.yml"
    ports:
      - "9091:9090"
    networks:
      - chainbase
    restart: unless-stopped

  flink-jobmanager:
    image: ${FLINK_JOBMANAGER_IMAGE}
    container_name: ${FLINK_JOBMANAGER_NAME}
    env_file:
      - .env
    ports:
      - "8081:8081"
    command: jobmanager
    networks:
      - chainbase
    restart: unless-stopped

  flink-taskmanager:
    image: ${FLINK_JOBMANAGER_IMAGE}
    container_name: ${FLINK_TASKMANAGER_NAME}
    env_file:
      - .env
    depends_on:
      - flink-jobmanager
    command: taskmanager
    networks:
      - chainbase
    restart: unless-stopped

  chainbase-node:
    image: ${MAIN_SERVICE_IMAGE}
    container_name: ${MAIN_SERVICE_NAME}
    command: ["run"]
    env_file:
      - .env
    ports:
      - "8080:8080"
      - "9092:9092"
    volumes:
      - "${NODE_ECDSA_KEY_FILE_HOST:-./opr.ecdsa.key.json}:${NODE_ECDSA_KEY_FILE}"
      - "${NODE_LOG_PATH_HOST}:${NODE_LOG_DIR}:rw"
    depends_on:
      - prometheus
      - flink-jobmanager
      - flink-taskmanager
    networks:
      - chainbase
    restart: unless-stopped

networks:
  chainbase:
    driver: bridge

c. Create folders for docker

source .env && mkdir -pv ${EIGENLAYER_HOME} ${CHAINBASE_AVS_HOME} ${NODE_LOG_PATH_HOST}

Set permissions to bash script chainbase-avs.sh

chmod +x ./chainbase-avs.sh

d. Edit prometheus.yml

nano prometheus.yml

Input your operator address

13. Register & Run Chainbase AVS

./chainbase-avs.sh register
./chainbase-avs.sh run

14. Check AVS health

docker compose logs chainbase-node -f

Get AVS link

export PATH=$PATH:~/bin

eigenlayer operator status operator.yaml

Check Operator Health

# If your port is 8080
curl -i localhost:8080/eigen/node/health

Check Docker containers

docker ps

Last updated