📚Useful commands📚
⚙️Service
Info
curl -s http://localhost:26657/status | jq
curl -s http://localhost:26657/status | jq .result.sync_info
Check node logs
sudo journalctl -fu story-geth -o cat
sudo journalctl -fu story -o cat
Restart service
sudo systemctl restart story-geth
sudo systemctl restart story
Stop service
sudo systemctl stop story-geth
sudo systemctl stop story
Start service
sudo systemctl start story-geth
sudo systemctl start story
reload/disable/enable
sudo systemctl daemon-reload
sudo systemctl disable story-geth
sudo systemctl disable story
sudo systemctl enable story-geth
sudo systemctl enable story
Your enode
geth --exec "admin.nodeInfo.enode" attach ~/.story/geth/odyssey/geth.ipc
💲Staking
Delegate to yourself
story validator stake --validator-pubkey $(story validator export | grep "Compressed Public Key (base64)" | awk '{print $NF}') --stake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Delegate
story validator stake --validator-pubkey <VALIDATOR_PUB_KEY_IN_BASE64> --stake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Delegate on behalf of other delegator
story validator stake-on-behalf --validator-pubkey <VALIDATOR_PUB_KEY_IN_BASE64> --delegator-pubkey <DELEGATOR_PUB_KEY_IN_BASE64> --stake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Add operator
story validator add-operator --operator <OPERATOR_EVM_ADDRESS> --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Unstake from yourself
story validator unstake --validator-pubkey $(story validator export | grep "Compressed Public Key (base64)" | awk '{print $NF}') --unstake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Unstake
story validator unstake --validator-pubkey <VALIDATOR_PUB_KEY_IN_BASE64> --unstake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Unstake on behalf of other delegator. To do so, you must be a registered authorized operator for this delegator.
story validator unstake-on-behalf --validator-pubkey <VALIDATOR_PUB_KEY_IN_BASE64> --delegator-pubkey <DELEGATOR_PUB_KEY_IN_BASE64> --unstake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Remove operator
story validator remove-operator --operator <OPERATOR_EVM_ADDRESS> --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Set or change withdrawal address
story validator set-withdrawal-address --withdrawal-address <YOUR_EVM_ADDRESS> --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
⚙️Validator operations
Validator info
curl localhost:$(sed -n '/\[rpc\]/,/laddr/ { /laddr/ {s/.*://; s/".*//; p} }' $HOME/.story/story/config/config.toml)/status | jq
Check Validator public key
story validator export
Check Validator private key
cat $HOME/.story/story/config/private_key.txt
⚡Geth commands
Check the latest block
geth --exec "eth.blockNumber" attach ~/.story/geth/odyssey/geth.ipc
Peers your client is connected to
geth --exec "admin.peers" attach ~/.story/geth/odyssey/geth.ipc
Check if syncing is still in progress: will output "true" if geth is syncing
geth --exec "eth.syncing" attach ~/.story/geth/odyssey/geth.ipc
Check gas price
geth --exec "eth.gasPrice" attach ~/.story/geth/odyssey/geth.ipc
Check account balance
geth --exec "eth.getBalance('<YOUR_EVM_ADDRESS>')" attach ~/.story/geth/odyssey/geth.ipc