Zenrock
Website: https://www.zenrocklabs.io
Twitter: https://x.com/OfficialZenRock
Discord: https://discord.gg/zenrockfoundation
Explorer: https://explorer.gardia.zenrocklabs.io
Explorer CoinSeyir : https://testnet.coinseyir.com/zenrock
1. Minimum hardware requirement
Bileşenler
Minimum Gereksinimler
CPU
4
RAM
8+ GB
Storage
400 GB SSD
2. Auto install
curl -O https://raw.githubusercontent.com/coinseyir/Zenrock/refs/heads/main/zenrock.sh && chmod +x zenrock.sh && ./zenrock.sh
2.1 Wallet
Add New Wallet Key - Save seed
zenrockd keys add wallet
Recover existing key
zenrockd keys add wallet --recover
List All Keys - Don't forget the faucet
zenrockd keys list
2.2 Query Wallet Balance
zenrockd q bank balances $(zenrockd keys show wallet -a)
2.3 Check sync status
#!/bin/bash
rpc_port=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.zrchain/config/config.toml" | cut -d ':' -f 3)
while true; do
local_height=$(curl -s localhost:$rpc_port/status | jq -r '.result.sync_info.latest_block_height')
network_height=$(curl -s https://zenrock-testnet-rpc.itrocket.net/status | jq -r '.result.sync_info.latest_block_height')
if ! [[ "$local_height" =~ ^[0-9]+$ ]] || ! [[ "$network_height" =~ ^[0-9]+$ ]]; then
echo -e "\033[1;31mError: Invalid block height data. Retrying...\033[0m"
sleep 5
continue
fi
blocks_left=$((network_height - local_height))
if [ "$blocks_left" -lt 0 ]; then
blocks_left=0
fi
echo -e "\033[1;33mYour Node Height:\033[1;34m $local_height\033[0m \033[1;33m| Network Height:\033[1;36m $network_height\033[0m \033[1;33m| Blocks Left:\033[1;31m $blocks_left\033[0m"
sleep 5
done
2.4 Create validator
zenrockd tx validation create-validator <(cat <<EOF
{
"pubkey": $(zenrockd comet show-validator),
"amount": "1000000urock",
"moniker": "YOUR_MONIKER_NAME",
"identity": "YOUR_KEYBASE_ID",
"website": "YOUR_WEBSITE_URL",
"security": "YOUR_SECURITY_EMAIL",
"details": "YOUR_DETAILS",
"commission-rate": "0.05",
"commission-max-rate": "0.20",
"commission-max-change-rate": "0.05",
"min-self-delegation": "1"
}
EOF
) \
--chain-id gardia-2 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 30urock \
-y
3. Sidecar setup
3.1 Download respository
cd $HOME
rm -rf zenrock-validators
git clone https://github.com/zenrocklabs/zenrock-validators
Create a password
read -p "Enter password for the keys: " key_pass
3.2 Generate keys
# 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
fund your wallet addresses with Holesky $ETH
echo "ecdsa address: $ecdsa_address"
3.3 Operator configuration
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.
# 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_TBD=$(zenrockd keys show wallet --bech val -a)
OPERATOR_ADDRESS_TBU=$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/configs/eigen_operator_config.yaml $HOME/.zrchain/sidecar/
cp $HOME/zenrock-validators/configs/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"
# Replace variables in eigen_operator_config.yaml
sed -i "s|OPERATOR_VALIDATOR_ADDRESS_TBD|$OPERATOR_VALIDATOR_ADDRESS_TBD|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|OPERATOR_ADDRESS_TBU|$OPERATOR_ADDRESS_TBU|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"
wget -O $HOME/.zrchain/sidecar/bin/validator_sidecar https://releases.gardia.zenrocklabs.io/validator_sidecar-1.2.3
chmod +x $HOME/.zrchain/sidecar/bin/validator_sidecar
3.4 Service creation
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
3.5 Run
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
Successfull Log examples:
{"level":"info","ts":1727294139.4385705,"caller":"operator/operator.go:250","msg":"Operator info","operatorId":[144,89,34,19,95,158,123,120,47,228,59,114,85,73,150,39,84,119,143,77,154,173,85,210,132,206,213,195,7,190,250,142],"operatorAddr":"0x68e305548619Ce71D562b851ff1adfb7e5369DB3","operatorG1Pubkey":"E([20150260775620749168755223143919346367674724303860875751315024817211815113340,5713528518001336848987890055463332760351549074437348780451495739349376234320])","operatorG2Pubkey":"E([9400781597017099172228313635710883835447541071342639102400258381712924127278+17588199816725806065286885136698384247231626887315665039610705603333445204237*u,21507870890336379219932542686750816691453493327464905543429790078496913285917+3341052853010856303076683482759015503204225193006075252832111461015148222443*u])"}
2024/09/25 19:55:39 initialized operator
2024/09/25 19:55:39 starting operator
{"level":"info","ts":1727294139.4387212,"caller":"operator/operator.go:262","msg":"Starting operator."}
{"level":"info","ts":1727294139.438742,"caller":"nodeapi/nodeapi.go:104","msg":"Starting node api server at address 0.0.0.0:9191"}
{"level":"info","ts":1727294139.4388723,"caller":"metrics/eigenmetrics.go:81","msg":"Starting metrics server at port 0.0.0.0:9292"}
{"level":"info","ts":1727294139.4389389,"caller":"nodeapi/nodeapi.go:238","msg":"node api server running","addr":"0.0.0.0:9191"}
{"level":"info","ts":1727294139.5475569,"caller":"chainio/avs_subscriber.go:63","msg":"Subscribed to new TaskManager tasks"}
2024/09/25 19:55:45 Received AVS contract state for block 2407883
2024/09/25 19:55:45 Received prices: ETH/USD 2583.166191, ROCK/USD 0.000000
2024/09/25 19:56:00 Received prices: ETH/USD 2583.166191, ROCK/USD 0.000000
2024/09/25 19:56:00 Received AVS contract state for block 2407884
2024/09/25 19:56:15 Received prices: ETH/USD 2583.166191, ROCK/USD 0.000000
2024/09/25 19:56:15 Received AVS contract state for block 2407885
Last updated