⛓️ Oracle
Info
This installation is exclusive to those who installed it from me. Those who install it elsewhere may get errors.
Info
credit:kjnodes
➡️ Clone zenrock-validators repository
cd $HOME
rm -rf zenrock-validators
git clone https://github.com/zenrocklabs/zenrock-validators
➡️ Generate keys
➡️ Set key password
read -p "Enter password for the keys: " key_pass
➡️ Create sidecar directories
mkdir -p $HOME/.zrchain/sidecar/bin
mkdir -p $HOME/.zrchain/sidecar/keys
➡️ Build ecdsa binary
cd $HOME/zenrock-validators/utils/keygen/ecdsa && go build
➡️ Build bls binary
cd $HOME/zenrock-validators/utils/keygen/bls && go build
➡️ Generate 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)
➡️ Generate 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
➡️ Output
echo "ecdsa address: $ecdsa_address"
➡️ Top up your wallet address
Info
Please fund your wallet addresses with Holesky $ETH before proceeding further.
https://cloud.google.com/application/web3/faucet/ethereum/holesky
➡️ Set operator configuration
Don't forget
Ensure that you have configured TESTNET_HOLESKY_ENDPOINT, MAINNET_ENDPOINT, ETH_RPC_URL, ETH_WS_URL with your specific values. You can use Quicknode.com to get api keys. I used infura.io (but ffter Metamask acquired Infura they significantly reduced their limits)
➡️ Declare 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"
ECDSA_KEY_PATH=$ecdsa_output_file
BLS_KEY_PATH=$bls_output_file
➡️ Copy initial configuration files
cp $HOME/zenrock-validators/scaffold_setup/configs_testnet/eigen_operator_config.yaml $HOME/.zrchain/sidecar/
cp $HOME/zenrock-validators/scaffold_setup/configs_testnet/config.yaml $HOME/.zrchain/sidecar/
➡️ Replace variables in config.yaml
sed -i "s|EIGEN_OPERATOR_CONFIG|$EIGEN_OPERATOR_CONFIG|g" "$HOME/.zrchain/sidecar/config.yaml"
sed -i "s|TESTNET_HOLESKY_ENDPOINT|$TESTNET_HOLESKY_ENDPOINT|g" "$HOME/.zrchain/sidecar/config.yaml"
sed -i "s|MAINNET_ENDPOINT|$MAINNET_ENDPOINT|g" "$HOME/.zrchain/sidecar/config.yaml"
sed -i 's|local: .*|local: "http://127.0.0.1:${ZENROCK_PORT}545"|' "$HOME/.zrchain/sidecar/config.yaml"
➡️ Replace variables in eigen_operator_config.yaml
sed -i "s|OPERATOR_VALIDATOR_ADDRESS|$OPERATOR_VALIDATOR_ADDRESS|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|OPERATOR_ADDRESS|$OPERATOR_ADDRESS|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|ETH_RPC_URL|$ETH_RPC_URL|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|ETH_WS_URL|$ETH_WS_URL|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|ECDSA_KEY_PATH|$ECDSA_KEY_PATH|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|BLS_KEY_PATH|$BLS_KEY_PATH|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|localhost:9790|localhost:${ZENROCK_PORT}790|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
➡️ Edit config.yaml
nano $HOME/.zrchain/sidecar/config.yaml
Please fill in the required fields. You need to get this information from Discord. It’s available in the announcements. Like this;
proxy_rpc:
url: "https://..."
user: "username"
password: "password"
then CTRL+X Y Enter.
➡️ Download sidecar binary
wget -O $HOME/.zrchain/sidecar/bin/validator_sidecar https://github.com/Zenrock-Foundation/zrchain/releases/download/v5.8.7/validator_sidecar
chmod +x $HOME/.zrchain/sidecar/bin/validator_sidecar
➡️ Create and run sidecar service
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
➡️ Check the service logs
journalctl -fu zenrock-testnet-sidecar.service -o cat
Successfull Log examples:
2025/01/24 18:45:07 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211932
2025/01/24 18:45:07 INFO Received prices ROCK/USD=0.03957 BTC/USD=106916.23249158 ETH/USD=3399.74872883
2025/01/24 18:45:37 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211935
2025/01/24 18:45:37 INFO Received prices ROCK/USD=0.03957 BTC/USD=106916.23249158 ETH/USD=3399.74872883
2025/01/24 18:46:07 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211937
2025/01/24 18:46:07 INFO Received prices ROCK/USD=0.03957 BTC/USD=106916.23249158 ETH/USD=3399.74872883
2025/01/24 18:46:37 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211940
2025/01/24 18:46:37 INFO Received prices ROCK/USD=0.03957 BTC/USD=106916.23249158 ETH/USD=3399.74872883
2025/01/24 18:47:07 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211942
2025/01/24 18:47:07 INFO Received prices ROCK/USD=0.03957 BTC/USD=106916.23249158 ETH/USD=3382.6158
2025/01/24 18:47:37 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211945
2025/01/24 18:47:37 INFO Received prices ROCK/USD=0.03957 BTC/USD=106916.23249158 ETH/USD=3382.6158
2025/01/24 18:48:07 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211947
2025/01/24 18:48:07 INFO Received prices ROCK/USD=0.03957 BTC/USD=106916.23249158 ETH/USD=3382.6158
2025/01/24 18:48:37 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211950
2025/01/24 18:48:37 INFO Received prices ROCK/USD=0.03956 BTC/USD=106916.23249158 ETH/USD=3382.6158
2025/01/24 18:49:07 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211952
2025/01/24 18:49:07 INFO Received prices ROCK/USD=0.03956 BTC/USD=106916.23249158 ETH/USD=3382.6158
2025/01/24 18:49:37 INFO Received AVS contract state for network="Holešky Ethereum Testnet" block=3211955
2025/01/24 18:49:37 INFO Received prices ROCK/USD=0.03956 BTC/USD=106916.23249158 ETH/USD=3382.6158
Info
To back up your sidecar configuration and keys, ensure you have a copy of the $HOME/.zrchain/sidecar directory.