βοΈ Service Commands
Check Logs
Copy sudo journalctl -u story -f -o cat
Start service
Copy sudo systemctl start story
Stop service
Copy sudo systemctl stop story
Restart service
Copy sudo systmctl restart story
Check status
Copy sudo systemctl status story
Enable Service
Copy sudo systemctl enable story
Reload service
Copy sudo systemctl daemon-reload
Disable service
Copy sudo systemctl disable story
Check synchronization status
Copy while true ; do
local_height = $( story status | jq -r .sync_info.latest_block_height )
network_height = $( curl -s https://rpc.story-testnet.unitynodes.com/status | jq -r '.result.sync_info.latest_block_height' )
blocks_left = $(( network_height - local_height ))
echo -e "\033[1;33m[Sync Status]\033[0m \033[1;32mNode Height:\033[0m \033[1;37m$local_height\033[0m | \033[1;32mNetwork Height:\033[0m \033[1;37m$network_height\033[0m | \033[1;32mBlocks Left:\033[0m \033[1;31m$blocks_left\033[0m"
sleep 5
done
If "Block left - 0" - synchronized
Check the latest block of your validator
Copy story status | jq '.SyncInfo.latest_block_height // .sync_info.latest_block_height'
View the ports used node
Copy ss -tulpn | grep story
βοΈ Key Command
Export EVM private key
Copy story validator export --export-evm-key
βοΈ Validator Commands
Create validator
Copy story validator create --stake 1000000000000000000 --private-key $( cat $HOME /.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F '=' '{print $2}' )
After entering the command, you will receive hash transactions, check the status in the explorer if the status is successful - you have created a validator.
You can find your validator here: explorer In the Active / Inactive lists.
Validator details
Copy curl localhost: $( sed -n '/\[rpc\]/,/laddr/ { /laddr/ {s/.*://; s/".*//; p} }' $HOME /.story/story/config/config.toml ) /status | jq
Validator private key
Copy cat $HOME /.story/story/config/private_key.txt
Validator pubkey
Copy story validator export
Node peer
Copy 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/".*//')"
Enode info
Copy geth --exec "admin.nodeInfo.enode" attach ~/.story/geth/iliad/geth.ipc
βοΈ Tokens Commands
Delegate to yourself
Copy 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 to another validator
Copy story validator stake --validator-pubkey < VALIDATOR_PUB_KEY_IN_BASE6 4> --stake 1000000000000000000 --private-key $( cat $HOME /.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F '=' '{print $2}' )
Unstake from yourself
Copy 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
Copy story validator unstake --validator-pubkey < VALIDATOR_PUB_KEY_IN_BASE6 4> --unstake 1000000000000000000 --private-key $( cat $HOME /.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F '=' '{print $2}' )
Add operator
Copy story validator stake-on-behalf --validator-pubkey < VALIDATOR_PUB_KEY_IN_BASE6 4> --delegator-pubkey < DELEGATOR_PUB_KEY_IN_BASE6 4> --stake 1000000000000000000 --private-key $( cat $HOME /.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F '=' '{print $2}' )
Remove operator
Copy story validator remove-operator --operator < OPERATOR_EVM_ADDRES S > --private-key $( cat $HOME /.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F '=' '{print $2}' )
Set or change withdraw address
Copy story validator set-withdrawal-address --withdrawal-address < YOUR_EVM_ADDRES S > --private-key $( cat $HOME /.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F '=' '{print $2}' )
βοΈ Geth commands
Check the latest block
Copy geth --exec "eth.blockNumber" attach ~/.story/geth/iliad/geth.ipc
Peers your client is connected to
Copy geth --exec "admin.peers" attach ~/.story/geth/iliad/geth.ipc
Check if syncing is still in progress:
will output "true" if geth is syncing
Copy geth --exec "eth.syncing" attach ~/.story/geth/iliad/geth.ipc
Check gas price
Copy geth --exec "eth.gasPrice" attach ~/.story/geth/iliad/geth.ipc
Check account balance
Copy geth --exec "eth.getBalance('<YOUR_EVM_ADDRESS>')" attach ~/.story/geth/iliad/geth.ipc
βοΈ Utility
Set Custom Port
Copy #CHANGE PORT
STORY_PORT = 33
sed -i.bak -e "s%:26658%:${STORY_PORT}658%g;
s%:26657%:${STORY_PORT}657%g;
s%:26656%:${STORY_PORT}656%g;
s%^external_address = \"\"%external_address = \"$( wget -qO- eth0.me ):${STORY_PORT}656\"%;
s%:26660%:${STORY_PORT}660%g" $HOME /.story/story/config/config.toml
Reset node
Copy story tendermint unsafe-reset-all --home $HOME /.story/story --keep-addr-book
Update server name
Copy sudo hostnamectl set-hostname server_name
How much SSD use node (currently)
How much RAM use node (currently)
Copy sudo systemctl status story | grep "Memory:"
How much CPU use node (currently)
Copy ps -C story -o %cpu --no-headers | awk '{print $1"% CPU"}'
Delete node
Copy 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