Skip to content

Installation

Story banner

System Specs

HardwareRequirement
CPU4 Cores
RAM16 GB
Disk500 GB
Bandwidth25 MBit/s

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

Install dependencies

Terminal window
sudo apt update
sudo apt-get update
sudo apt install curl git make jq build-essential gcc unzip wget lz4 aria2 -y

Download Story-Geth binary v0.10.1

Terminal window
cd $HOME
wget https://github.com/piplabs/story-geth/releases/download/v0.10.1/geth-linux-amd64
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
fi
chmod +x geth-linux-amd64
mv $HOME/geth-linux-amd64 $HOME/go/bin/story-geth
source $HOME/.bash_profile
story-geth version
banner

Download Story binary v0.13.0

Terminal window
cd $HOME
rm -rf story-linux-amd64
wget https://github.com/piplabs/story/releases/download/v0.13.0/story-linux-amd64
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
fi
chmod +x story-linux-amd64
sudo cp $HOME/story-linux-amd64 $HOME/go/bin/story
source $HOME/.bash_profile
story version
banner

Clear state:

If you ever run into issues and would like to try joining the network from a COMPLETELY fresh state

Terminal window
rm -rf $HOME/.story

Init Odyssey node

Terminal window
story init --network odyssey --moniker "Your_moniker_name"
banner

Create story-geth service file

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 --odyssey --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF

Create story service file

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

Download snapshot

Terminal window
# download Story snapshot
cd $HOME
rm -f Story_snapshot.lz4
aria2c -x 16 -s 16 -k 1M https://story.josephtran.co/Story_snapshot.lz4
Terminal window
# download Geth snapshot
cd $HOME
rm -f Geth_snapshot.lz4
aria2c -x 16 -s 16 -k 1M https://story.josephtran.co/Geth_snapshot.lz4
Terminal window
# backup priv_validator_state.json
cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/priv_validator_state.json.backup
Terminal window
# remove old data
rm -rf $HOME/.story/story/data
rm -rf $HOME/.story/geth/odyssey/geth/chaindata
Terminal window
# decompress Story snapshot
sudo mkdir -p $HOME/.story/story/data
lz4 -d -c Story_snapshot.lz4 | pv | sudo tar xv -C $HOME/.story/story/ > /dev/null
Terminal window
# decompress Geth snapshot
sudo mkdir -p $HOME/.story/geth/odyssey/geth/chaindata
lz4 -d -c Geth_snapshot.lz4 | pv | sudo tar xv -C $HOME/.story/geth/odyssey/geth/ > /dev/null
Terminal window
# restore priv_validator_state.json
cp $HOME/.story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json

Reload and start story-geth

Terminal window
sudo systemctl daemon-reload && \
sudo systemctl start story-geth && \
sudo systemctl enable story-geth && \
sudo systemctl status story-geth
banner

Reload and start story

Terminal window
sudo systemctl daemon-reload && \
sudo systemctl start story && \
sudo systemctl enable story && \
sudo systemctl status story
banner

Check logs

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

Wait a minute for connect peers

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

Check sync status

Terminal window
curl localhost:26657/status | jq

Check block sync left:

Terminal window
while true; do
local_height=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height');
network_height=$(curl -s https://odyssey.storyrpc.io/status | jq -r '.result.sync_info.latest_block_height');
blocks_left=$((network_height - local_height));
echo -e "\033[1;38mYour node height:\033[0m \033[1;34m$local_height\033[0m | \033[1;35mNetwork height:\033[0m \033[1;36m$network_height\033[0m | \033[1;29mBlocks left:\033[0m \033[1;31m$blocks_left\033[0m";
sleep 5;
done
banner

Faucet token

  • Faucet link:

STORY Odyssey faucet

  • Explorer:

STORY Scan

Create validator

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:

Terminal window
story validator export

This will print out your validator public key file in compressed and uncompressed formats. By default, we use the hex-encoded compressed key for public identification.

Terminal window
Compressed Public Key (hex): 03bdc7b8940babe9226d52d7fa299a1faf3d64a82f809889256c8f146958a63984
Compressed Public Key (base64): A73HuJQLq+kibVLX+imaH689ZKgvgJiJJWyPFGlYpjmE
Uncompressed Public Key (hex): 04bdc7b8940babe9226d52d7fa299a1faf3d64a82f809889256c8f146958a6398496b9e2af0a3a1d199c3cc1d09ee899336a530c185df6b46a9735b25e79a493af
EVM Address: 0x9EacBe2C3B1eb0a9FC14106d97bd3A1F89efdDCc
Validator Address: storyvaloper1p470h0jtph4n5hztallp8vznq8ehylsw9vpddx
Delegator Address: story1p470h0jtph4n5hztallp8vznq8ehylswtr4vxd

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

Note that to participate in consensus, at least 1 IP must be staked (equivalent to 1000000000000000000 wei)!
Faucet link: https://faucet.story.foundation/

banner
Create validator
Terminal window
story validator create --stake 1024000000000000000000 --private-key "your_private_key" --moniker "your_moniker_name"
banner

Validator Staking

Terminal window
story validator stake \
--validator-pubkey "VALIDATOR_PUB_KEY_IN_HEX" \
--stake 1024000000000000000000 \
--private-key xxxxxxxxxxxxxx

Replace VALIDATOR_PUB_KEY_IN_HEX Amount: 1024000000000000000000=1024 IP Token

Check your Validator on Explorer

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

Result:

  • Paste HEX Validator Address: D6F92FD7D0460AA9E4CF4D299FE479E93395DCF3 to search
https://testnet.story.explorers.guru/
banner

# Delete 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