Node9X Service
  • 🍄MAINNET
    • 🟢Kopi Protocol
      • 💾Service & Snapshot
      • ⚙️Installation
      • ⛓️Upgrade (V11)
      • 🪢Cosmovisor
      • 🛰️Command
  • 🚀Testnet
    • 🧬Explorer
    • 🟢Native
      • ⚙️Installation
    • 🟢XRPL EVM
      • 💾Service & Snapshot
      • ⚙️Installation
      • 🕹️Command
    • 🟢Pipe Network
      • Installation
      • Upgrade
    • 🟢Pell
      • 💾Service & Snapshot
      • ⚙️Installation
      • ⛓️Upgrade (v1.1.1)
      • 🕹️Command
    • 🟢Structs
      • 💾Service & Snapshot
      • ⚙️Installation
      • 🕹️Command
    • 🟢Prysm
      • 🛰️Service & Snapshot
      • ⚙️Installation
      • 💾Command
    • 🟢Zenrock
      • 💾Service & Snapshot
      • ⚙️Installation
      • ⛓️Upgrade ( v6.3.3)
      • 🕹️Cosmovisor
      • 🛰️Command
      • ⚙️Sidecar (✔️Oracle)
        • 🔗Upgrade
    • 🟢Story Protocol
      • 💾Service & Snapshot
      • ⚙️Installation (Odyssey)
      • ⛓️Upgrade (v0.13.1)
        • 🪢Upgrade (v0.13.0)
      • ⛓️Cosmovisor
      • 🛰️Command
    • 🟢0G Chain
      • Service & Snapshot
      • Installation
        • Cosmovisor
      • Commands
      • ☑️0G Storage Node
        • Upgrade (v0.7.3)
      • ☑️0G Storage KV
      • ☑️0G DA Node
        • Update
      • ☑️0G DA Client
    • 🟢Airchains
      • 💾Service & Snapshot
      • ⚙️Installation
        • 🪢Cosmovisor
        • 🔺EVM ZK Rollup
      • 🕹️Commands
      • ⛓️Upgrade
    • 🟢Allora
      • 🔺Workers
        • Create tool and worker wallet
        • Install Worker 1
        • Install Worker 2
        • Troubleshooting
        • Script for checking worker
      • Another method
      • Service
      • Installation By Dock (Recommend)
      • Installation
      • Snapshot & State sync
      • Useful commands
    • 🟢Hedge Block
      • Service
      • Installation
      • Commands
    • 🟢Dill Chain
      • Usage Commands
    • 🟢Fiamma Chain
      • 🥦Services & Snapshot
      • ⚙️Installation
      • 🛰️Usage Command
    • 🟢Elixir Testnet
      • ⚙️Installation
    • 🟢Chainbase
      • ⛓️Installation
    • 🔘AXONE Protocol
      • 💾Service & Snapshot
      • ⚙️Installation
    • 🔘Symphony
      • 🔌Installation
      • 🥦Fresh Peer
    • 🔘Empeiria
      • Installation
      • Usage Command
Powered by GitBook
On this page
  • Install the sidecar
  • Install the binary file
  • Copy zenrock-validators
  • Set a password for sidecar wallets
  • Build BLS binary
  • Create a BLS key
  • Build ecdsa binary
  • Create a ecdsa key

Was this helpful?

  1. Testnet
  2. Zenrock

Sidecar (✔️Oracle)

The validator sidecar service allows validators to vote on oracle data during the CometBFT consensus process

Install the sidecar

# create the necessary directories
mkdir -p $HOME/.zrchain/sidecar/bin
mkdir -p $HOME/.zrchain/sidecar/keys

Install the binary file

wget -O $HOME/.zrchain/sidecar/bin/validator_sidecar https://github.com/Zenrock-Foundation/zrchain/releases/download/v6.3.3/validator_sidecar
chmod +x $HOME/.zrchain/sidecar/bin/validator_sidecar

Copy zenrock-validators

cd $HOME
git clone https://github.com/zenrocklabs/zenrock-validators

Set a password for sidecar wallets

read -p "Enter password for the keys: " key_pass

Sử dụng lệnh read trong zsh

echo -n "Enter password for the keys: "
read key_pass

Build BLS binary

cd $HOME/zenrock-validators/utils/keygen/bls/
go mod tidy
go build

Create a BLS key

bls_output_file=$HOME/.zrchain/sidecar/keys/bls.key.json
$HOME/zenrock-validators/utils/keygen/bls/bls --password $key_pass -output-file $bls_output_file

Build ecdsa binary

cd $HOME/zenrock-validators/utils/keygen/ecdsa/
go mod tidy
go build

Create a ecdsa key

ecdsa_output_file=$HOME/.zrchain/sidecar/keys/ecdsa.key.json
ecdsa_creation=$($HOME/zenrock-validators/utils/keygen/ecdsa/ecdsa --password $key_pass -output-file $ecdsa_output_file)
ecdsa_address=$(echo "$ecdsa_creation" | grep "Public address" | cut -d: -f2)
echo "ecdsa address: $ecdsa_address"
#Public address:  0xf36F077582B1c34D52f6e6964417fa52406827C1

IMPORTANT - to continue you need to register on https://app.infura.io and get the following endpoints:

  • mainnet eth: https://xxx

  • holesky eth: https://xxx

  • holesky eth: wss://xxx

Set variables

EIGEN_OPERATOR_CONFIG="$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
TESTNET_HOLESKY_ENDPOINT="YOUR_TESTNET_HOLESKY_ENDPOINT"
MAINNET_ENDPOINT="YOUR_ETH_MAINNET_ENDPOINT"
OPERATOR_VALIDATOR_ADDRESS=$(zenrockd keys show wallet --bech val -a)
OPERATOR_ADDRESS=$ecdsa_address
ETH_RPC_URL="YOUR_TESTNET_HOLESKY_RPC"
ETH_WS_URL="YOUR_TESTNET_HOLESKY_WS"
SOLANA_MAINNET_ENDPOINT="YOUR_SOLANA_MAINNET_ENDPOINT"
ECDSA_KEY_PATH=$ecdsa_output_file
BLS_KEY_PATH=$bls_output_file
PROXY_URL="url" 
PROXY_USER="user"
PROXY_PASSWORD="password"

Create initial configuration files

sudo tee $HOME/.zrchain/sidecar/config.yaml > /dev/null <<EOF
enabled: true
grpc_port: 9191
zrchain_rpc: "localhost:${ZENROCK_PORT}090"
state_file: "$HOME/.zrchain/sidecar/cache.json"
operator_config: "${EIGEN_OPERATOR_CONFIG}"
network: "testnet"

eth_rpc:
    local: "http://127.0.0.1:8545"
    testnet: "${TESTNET_HOLESKY_ENDPOINT}"
    mainnet: "${MAINNET_ENDPOINT}"
solana_rpc:
  testnet: "https://api.testnet.solana.com"
  mainnet: "${SOLANA_MAINNET_ENDPOINT}"

proxy_rpc:
  url: "${PROXY_URL}"
  user: "${PROXY_USER}"
  password: "${PROXY_PASSWORD}"
  
neutrino:
  path: "$HOME/.zrchain/neutrino"
EOF
Copy
sudo tee $HOME/.zrchain/sidecar/eigen_operator_config.yaml > /dev/null <<EOF
register_operator_on_startup: true
register_on_startup: true
production: true
kind: Secret
#To be manually updated
operator_address: ${OPERATOR_ADDRESS}
operator_validator_address: ${OPERATOR_VALIDATOR_ADDRESS}

# EigenLayer Slasher contract address
# This is the address of the contracts which are deployed in the anvil saved state
# The saved eigenlayer state is located in tests/anvil/credible_squaring_avs_deployment_output.json
avs_registry_coordinator_address: 0xdc3A1b2a44D18c6B98a1d6c8C042247d2F5AC722
operator_state_retriever_address: 0xdB55356826a16DfFBD86ba334b84fC4E37113d97

# ETH RPC URL
eth_rpc_url: "${ETH_RPC_URL}" # holesky rpc
eth_ws_url: "${ETH_WS_URL}" # holesky ws rpc

# ECDSA key
ecdsa_private_key_store_path: ${ECDSA_KEY_PATH}

# We are using bn254 curve for bls keys
bls_private_key_store_path: ${BLS_KEY_PATH}

# address which the aggregator listens on for operator signed messages
aggregator_server_ip_port_address: avs-aggregator.gardia.zenrocklabs.io:8090

# avs node spec compliance https://eigen.nethermind.io/docs/spec/intro
eigen_metrics_ip_port_address: 0.0.0.0:9292
enable_metrics: true
metrics_address: 0.0.0.0:9292
node_api_ip_port_address: 0.0.0.0:9191
enable_node_api: true

# address of token to deposit tokens into when registering on startup
token_strategy_addr: 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9
service_manager_address: 0xa559CDb9e029fc4078170122eBf7A3e622a764E4
zr_chain_rpc_address: localhost:${ZENROCK_PORT}790
EOF

Create a service file

sudo tee /etc/systemd/system/zenrock-testnet-sidecar.service > /dev/null <<EOF
[Unit]
Description=Validator Sidecar
After=network-online.target

[Service]
User=$USER
ExecStart=$HOME/.zrchain/sidecar/bin/validator_sidecar
Restart=on-failure
RestartSec=30
LimitNOFILE=65535
Environment="OPERATOR_BLS_KEY_PASSWORD=$key_pass"
Environment="OPERATOR_ECDSA_KEY_PASSWORD=$key_pass"
Environment="SIDECAR_CONFIG_FILE=$HOME/.zrchain/sidecar/config.yaml"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable zenrock-testnet-sidecar.service
sudo systemctl start zenrock-testnet-sidecar.service
journalctl -fu zenrock-testnet-sidecar.service -o cat

Don't forget to save the directory $HOME/.zrchain/sidecar/

PreviousCommandNextUpgrade

Last updated 3 days ago

Was this helpful?

IMPORTANT - to continue, you need to top up the generated ecdsa key with Ethereum Holesky test tokens You can use the faucet -

🚀
🟢
⚙️
https://stakely.io/faucet/ethereum-holesky-testnet-eth