Skip to content

Validator Node Installation

Running a validator node for the 0G-Galileo-Testnet in the 0G ecosystem means actively participating in the network’s security and consensus through the Proof-of-Stake (PoS) mechanism. As a validator, you’ll validate transactions, propose new blocks, and earn rewards for your contribution to the network’s integrity and decentralization.

ComponentTestnet
Memory16 GB
CPU4 cores
Disk500 BB NVME SSD
Bandwidth25 MBps for Download / Upload

https://docs.story.foundation/docs/node-setup

Terminal window
sudo apt update
sudo apt-get update
sudo apt install curl git make jq build-essential gcc unzip wget lz4 aria2 -y
Terminal window
wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/geth-public/geth-linux-amd64-0.9.2-ea9f0d2.tar.gz
tar -xzvf geth-linux-amd64-0.9.2-ea9f0d2.tar.gz
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profile
fi
sudo cp geth-linux-amd64-0.9.2-ea9f0d2/geth $HOME/go/bin/story-geth
source $HOME/.bash_profile
story-geth version
Terminal window
wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/story-public/story-linux-amd64-0.9.11-2a25df1.tar.gz
tar -xzvf story-linux-amd64-0.9.11-2a25df1.tar.gz
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profile
fi
sudo cp story-linux-amd64-0.9.11-2a25df1/story $HOME/go/bin/story
source $HOME/.bash_profile
story version
Terminal window
story init --network iliad --moniker "Your_moniker_name"
Terminal window
sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth Client
After=network.target
[Service]
User=root
ExecStart=/root/go/bin/story-geth --iliad --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Terminal window
sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story Consensus Client
After=network.target
[Service]
User=root
ExecStart=/root/go/bin/story run
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Terminal window
sudo systemctl daemon-reload && \
sudo systemctl start story-geth && \
sudo systemctl enable story-geth && \
sudo systemctl status story-geth
Terminal window
sudo systemctl daemon-reload && \
sudo systemctl start story && \
sudo systemctl enable story && \
sudo systemctl status story
Terminal window
sudo journalctl -u story-geth -f -o cat

Wait a minute for connect peers

Terminal window
sudo journalctl -u story -f -o cat

###Check sync status

Terminal window
curl localhost:26657/status | jq

Waiting for your nodecatching_up is false you can create validator.

By default, when you run story init a validator key is created for you. To view your validator key, run the following command:

Terminal window
story validator export

In addition, if you want to export the derived EVM private key of your validator into the default data config directory, please run the following:

Terminal window
story validator export --export-evm-key

*Important: Please keep your private key in a safe place Your EVM Private Key saved to: /root/.story/story/config/private_key.txt Note that to participate in consensus, at least 1 IP must be staked (equivalent to 1000000000000000000 wei)! Faucet link: https://faucet.story.foundation/

Terminal window
story validator create --stake 1000000000000000000 --private-key "your_private_key"
  • File location: /root/.story/story/config/priv_validator_key.json
  • Copy this file to your local machine.
  • Store it carefully; this is the most crucial key for your validator.
Terminal window
story validator stake \
--validator-pubkey "VALIDATOR_PUB_KEY_IN_BASE64" \
--stake 1000000000000000000 \
--private-key xxxxxxxxxxxxxx

Replace VALIDATOR_PUB_KEY_IN_BASE64 Amount: 1000000000000000000=1 IP Token

###Check your Validator on Explorer

  • Get your validator info:
Terminal window
curl -s localhost:26657/status | jq -r '.result.validator_info'

Result: { "address": "D6F92FD7D0460AA9E4CF4D299FE479E93395DCF3", "pub_key": { "type": "tendermint/PubKeySecp256k1", "value": "A+46wEmBx5QQscNOKhmJgaAQjdr85s1OzvNimMiaysp3" }, "voting_power": "15000" }

Backup your data, private key, validator key before remove node.

Terminal window
sudo systemctl stop story-geth
sudo systemctl stop story
sudo systemctl disable story-geth
sudo systemctl disable story
sudo rm /etc/systemd/system/story-geth.service
sudo rm /etc/systemd/system/story.service
sudo systemctl daemon-reload
sudo rm -rf $HOME/.story
sudo rm $HOME/go/bin/story-geth
sudo rm $HOME/go/bin/story