Useful Commands
Official docs: https://docs.story.foundation/docs/what-is-story Faucet: https://faucet.story.foundation/
Service operations ⚙️
Check logs
sudo journalctl -u story -f
Start service
sudo systemctl start story
Stop service
sudo systemctl stop story
Restart service
sudo systemctl restart story
Check service status
sudo systemctl status story
Reload services
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable story
Disable Service
sudo systemctl disable story
Node info
curl localhost:$(sed -n '/\[rpc\]/,/laddr/ { /laddr/ {s/.*://; s/".*//; p} }' $HOME/.story/story/config/config.toml)/status | jq
Your node peer
echo "$(curl localhost:$(sed -n '/\[rpc\]/,/laddr/ { /laddr/ {s/.*://; s/".*//; p} }' $HOME/.story/story/config/config.toml)/status | jq -r '.result.node_info.id')@$(wget -qO- eth0.me):$(sed -n '/Address to listen for incoming connection/{n;p;}' $HOME/.story/story/config/config.toml | sed 's/.*://; s/".*//')"
Your enode
geth --exec "admin.nodeInfo.enode" attach ~/.story/geth/iliad/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/iliad/geth.ipc
Peers your client is connected to
geth --exec "admin.peers" attach ~/.story/geth/iliad/geth.ipc
Check if syncing is still in progress: will output "true" if geth is syncing
geth --exec "eth.syncing" attach ~/.story/geth/iliad/geth.ipc
Check gas price
geth --exec "eth.gasPrice" attach ~/.story/geth/iliad/geth.ipc
Check account balance
geth --exec "eth.getBalance('<YOUR_EVM_ADDRESS>')" attach ~/.story/geth/iliad/geth.ipc