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.
Hardware Requirements
Section titled “Hardware Requirements”Component | Testnet |
---|---|
Memory | 16 GB |
CPU | 4 cores |
Disk | 500 BB NVME SSD |
Bandwidth | 25 MBps for Download / Upload |
https://docs.story.foundation/docs/node-setup
Install dependencies
Section titled “Install dependencies”sudo apt updatesudo apt-get updatesudo apt install curl git make jq build-essential gcc unzip wget lz4 aria2 -y
Download Story-Geth binary
Section titled “Download Story-Geth binary”wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/geth-public/geth-linux-amd64-0.9.2-ea9f0d2.tar.gztar -xzvf geth-linux-amd64-0.9.2-ea9f0d2.tar.gz[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/binif ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profilefisudo cp geth-linux-amd64-0.9.2-ea9f0d2/geth $HOME/go/bin/story-gethsource $HOME/.bash_profilestory-geth version
Download Story binary
Section titled “Download Story binary”wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/story-public/story-linux-amd64-0.9.11-2a25df1.tar.gztar -xzvf story-linux-amd64-0.9.11-2a25df1.tar.gz[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/binif ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profilefisudo cp story-linux-amd64-0.9.11-2a25df1/story $HOME/go/bin/storysource $HOME/.bash_profilestory version
Init Iliad node
Section titled “Init Iliad node”story init --network iliad --moniker "Your_moniker_name"
Create story-geth service file
Section titled “Create story-geth service file”sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF[Unit]Description=Story Geth ClientAfter=network.target
[Service]User=rootExecStart=/root/go/bin/story-geth --iliad --syncmode fullRestart=on-failureRestartSec=3LimitNOFILE=4096
[Install]WantedBy=multi-user.targetEOF
Create story service file
Section titled “Create story service file”sudo tee /etc/systemd/system/story.service > /dev/null <<EOF[Unit]Description=Story Consensus ClientAfter=network.target
[Service]User=rootExecStart=/root/go/bin/story runRestart=on-failureRestartSec=3LimitNOFILE=4096
[Install]WantedBy=multi-user.targetEOF
Reload and start story-geth
Section titled “Reload and start story-geth”sudo systemctl daemon-reload && \sudo systemctl start story-geth && \sudo systemctl enable story-geth && \sudo systemctl status story-geth
Reload and start story
Section titled “Reload and start story”sudo systemctl daemon-reload && \sudo systemctl start story && \sudo systemctl enable story && \sudo systemctl status story
Check logs
Section titled “Check logs”sudo journalctl -u story-geth -f -o cat
Wait a minute for connect peers
sudo journalctl -u story -f -o cat
###Check sync status
curl localhost:26657/status | jq
Waiting for your nodecatching_up
is false
you can create validator.
Create validator
Section titled “Create validator”Export validator Public Key & Private key
Section titled “Export validator Public Key & Private key”By default, when you run story init
a validator key is created for you. To view your validator key, run the following command:
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:
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/
Create validator
Section titled “Create validator”story validator create --stake 1000000000000000000 --private-key "your_private_key"
Backup the validator key:
Section titled “Backup the validator 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.
Validator Staking
Section titled “Validator Staking”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:
curl -s localhost:26657/status | jq -r '.result.validator_info'
Result:
{ "address": "D6F92FD7D0460AA9E4CF4D299FE479E93395DCF3", "pub_key": { "type": "tendermint/PubKeySecp256k1", "value": "A+46wEmBx5QQscNOKhmJgaAQjdr85s1OzvNimMiaysp3" }, "voting_power": "15000" }
- Paste HEX Validator Address:
D6F92FD7D0460AA9E4CF4D299FE479E93395DCF3
to search https://testnet.story.explorers.guru/
Delete node
Section titled “Delete node”Backup your data, private key, validator key before remove node.
sudo systemctl stop story-gethsudo systemctl stop storysudo systemctl disable story-gethsudo systemctl disable storysudo rm /etc/systemd/system/story-geth.servicesudo rm /etc/systemd/system/story.servicesudo systemctl daemon-reloadsudo rm -rf $HOME/.storysudo rm $HOME/go/bin/story-gethsudo rm $HOME/go/bin/story