Prerequisites
Create a user to run Story
A validator node requires both Geth and Cosmos to run.
Setup Story - Geth
Ports for geth
Make sure your firewall (not part of this guide) is configured correctly
30303 (TCP + API) - Used for p2p communication (MANDATORY)
8545 - Required if you want your node to interface via JSON-RPC API over HTTP (Default closed, optional)
8546 - Required for WebSocket interaction (Default closed, optional)
8547 - Required for RPC with authentication (Default closed, optional)
Step 1: Give direct commands to copy for setting these variables; below example for temporary (until restart)
Copy export STORY_DATA_ROOT="$HOME/.story/story"
export GETH_DATA_ROOT="$HOME/.story/geth"
Step 2: Create folders
Copy mkdir -p "$STORY_DATA_ROOT"
mkdir -p "$GETH_DATA_ROOT"
Execution Client Setup
Step 3: Download the latest geth client release for your operating system
Step 4: Move your geth client to your local go library
Copy mv <downloaded geth binary> <go binary location>/geth
Example with Go binary location at $HOME/go/bin and AMD64 architecture:
Copy mv geth-linux-amd64 $HOME/go/bin/geth
Step 5: Set the geth binary to be allowed to execute
Copy chmod +x <go binary location>/geth
Example:
Copy chmod +x $HOME/go/bin/geth
Step 6: (run to test)
Copy <go binary location>/geth --odyssey --syncmode full
Example:
Copy $HOME/go/bin/geth --odyssey --syncmode full
You can continue with the next step if you see output like below.
Step 7: Create a systemd service for Geth
Copy sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth Client
After=network.target
[Service]
User=$USER
ExecStart=<go binary location>/geth --odyssey --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Example:
Copy sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth Client
After=network.target
[Service]
User=$USER
ExecStart=$HOME/go/bin/geth --odyssey --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Step 8: Start Story Geth with your systemd service
Copy systemctl daemon-reload
systemctl enable story-geth
systemctl start story-geth
Setup Story - Cosmos
Ports for Cosmos
Make sure your firewall (not part of this guide) is configured correctly
26656 - Used for peer-to-peer communication between nodes in the network (MANDATORY).
26657 - Used for RPC. It allows querying the state, broadcasting transactions, and interacting with the node programmatically (Default closed, optional).
26660 - Used for exposing Prometheus metrics for monitoring the Tendermint process (Default closed, optional).
Step 1: Download the newest story Cosmos binary for your architecture
Step 2: move the story cosmos binary to your binary location and make it executable
Copy mv story-<your architecture> <go binary location>/story
chmod +x <go binary location>/story
Example:
Copy mv story-linux-amd64 $HOME/go/bin/story
chmod +x $HOME/go/bin/story
Step 3: Initialise Story
moniker
- The name of your validator
Copy <go binary location>/story init --moniker <moniker name> --network odyssey
Example:
Copy $HOME/go/bin/story init --moniker <moniker name> --network odyssey
Cosmovisor setup
Step 4: Install Cosmovisor
Follow the guide from the official documentation here:
Step 5: Set environment variables to initialise the chain using Cosmovisor
This sets the variables temporarily for one-time use
Default settings for Story with Cosmovisor are as follows:
Copy export DAEMON_HOME=$HOME/.story/story
export DAEMON_NAME=story
export DAEMON_DATA_BACKUP_DIR=$HOME/.story/story_backup
Step 6: Create the backup folder location:
Copy mkdir -p $DAEMON_DATA_BACKUP_DIR
Step 7: Initialise Cosmovisor
moniker
- The name of your validator
network
- The network you want to initialise the node on (in this case, odyssey)
Copy cosmovisor init <go binary location>/story
$HOME/.story/story/cosmovisor/current/bin/story init --moniker "<moniker>" --network odyssey
Example:
Copy cosmovisor init $HOME/go/bin/story
$HOME/.story/story/cosmovisor/current/bin/story init --moniker "<moniker>" --network odyssey
Step 8: Add story binary to the path to use story commands
Copy export PATH="$PATH:~/.story/story/cosmovisor/current/bin" >> ~/.bashrc
source ~/.bashrc
Step 9: Download the Genesis file and Addressbook
Copy wget -O $HOME/.story/story/config/addrbook.json https://server-3.itrocket.net/testnet/story/addrbook.json
wget -O $HOME/.story/story/config/genesis.json https://server-3.itrocket.net/testnet/story/genesis.json
Step 10: (Optional)
Configure Story by editing the following file with your required changes:
Copy ~/.story/story/config/config.toml
Step 11: Download the chain data
Follow the steps under Snapshot (pruned) OR find an alternative provider .
Step 12: Set version upgrade manually
Copy cosmovisor add-upgrade v0.13.0 https://github.com/piplabs/story/releases/download/v0.13.0/story-linux-amd64 --force --upgrade-height 858000
Step 13: Create a systemd service
Copy sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story node
After=network-online.target
[Service]
User=$USER
ExecStart=<go binary location>/cosmovisor run run
Restart=on-failure
RestartSec=3
LimitNOFILE=10000
Environment="DAEMON_NAME=story"
Environment="DAEMON_HOME=$HOME/.story/story"
Environment="DAEMON_DATA_BACKUP_DIR=$HOME/.story/story_backup"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
Example:
Copy sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story node
After=network-online.target
[Service]
User=$USER
ExecStart=$HOME/go/bin/cosmovisor run run
Restart=on-failure
RestartSec=3
LimitNOFILE=10000
Environment="DAEMON_NAME=story"
Environment="DAEMON_HOME=$HOME/.story/story"
Environment="DAEMON_DATA_BACKUP_DIR=$HOME/.story/story_backup"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
Step 14: Start Story with your systemd service
Copy systemctl daemon-reload
systemctl start story
Step 15: Create your validator
Complete this step only when your node is fully synced; compare node height with chain height on an explorer.
stake
- The amount of $IP you want to self-delegate (1000000000000000000 for 1 IP)
private-key
- The private key of your validator, get it using:
Copy story validator export --export-evm-key
moniker
- The name of your validator
max-commission-change-rate
- The maximum commission amount (in %) you can at a time
max-commission-rate
- The maximum commission amount (in %) you can EVER set
commission-rate
- The actual commission rate you will start with
Copy story validator create --stake <amount> --private-key "<private-key>" --moniker "<Moniker>" --max-commission-change-rate <rate> --max-commission-rate <rate> --commission-rate <rate>