Chain ID Execution Client Consensus Client
odyssey story-geth v0.10.1 story v0.12.1

Story Protocol official node setup documentation can be found at https://docs.story.foundation/docs/node-setup

System Requirements

Hardware Requirement
CPU 4 Cores
RAM 8 GB
Disk 500 GB
Bandwidth 10 MBit/s

Setup node name

Replace YOUR_MONIKER_GOES_HERE with your node name

MONIKER="YOUR_MONIKER_GOES_HERE"

Update system and install build tools

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade

Install Go

sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.22.10.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Download and build Consensus Client binaries

# Clone project repository
cd $HOME
rm -rf story
git clone https://github.com/piplabs/story.git
cd story
git checkout v0.12.1

# Build binaries
go build -o story ./client

# Prepare binaries for Cosmovisor
mkdir -p $HOME/.story/story/cosmovisor/genesis/bin
mv story $HOME/.story/story/cosmovisor/genesis/bin/

# Create application symlinks
ln -s $HOME/.story/story/cosmovisor/genesis $HOME/.story/story/cosmovisor/current -f
sudo ln -s $HOME/.story/story/cosmovisor/current/bin/story /usr/local/bin/story -f

Download and build Execution Client binaries

# Clone project repository
cd $HOME
rm -rf story-geth
git clone https://github.com/piplabs/story-geth.git
cd story-geth
git checkout v0.10.1

# Build binaries
make geth
sudo mv build/bin/geth /usr/local/bin/

Install Cosmovisor and create a service

# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.7.0

# Create service
sudo tee /etc/systemd/system/story-testnet.service > /dev/null << EOF
[Unit]
Description=story node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run run
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.story/story"
Environment="DAEMON_NAME=story"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.story/story/cosmovisor/current/bin"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable story-testnet.service

Create Execution Client service

sudo tee /etc/systemd/system/story-testnet-geth.service > /dev/null << EOF
[Unit]
Description=Story Execution Client service
After=network-online.target

[Service]
User=$USER
WorkingDirectory=~
ExecStart=/usr/local/bin/geth --odyssey --syncmode full --http --ws
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable story-testnet-geth.service

Initialize the node

# Initialize the node
story init --moniker $MONIKER --network odyssey

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@story-testnet.rpc.kjnodes.com:26659\"|" $HOME/.story/story/config/config.toml

# Make geth directory
mkdir -p $HOME/.story/geth

Download latest snapshot

curl -L https://snapshots.kjnodes.com/story-testnet/snapshot_latest_geth.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.story/geth
curl -L https://snapshots.kjnodes.com/story-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.story/story

Start services

sudo systemctl start story-testnet-geth.service
sudo systemctl start story-testnet.service

Check Execution Client logs

journalctl -fu story-testnet-geth.service -o cat

Check Consensus Client logs

journalctl -fu story-testnet.service -o cat

Check Consensus client synchronization status

curl -s http://localhost:26657/status | jq .result.sync_info

Wait until the node catches up with the latest block. The node will be fully synchronized when catching_up = false

Output example

{
  "latest_block_hash": "C3E596737C1469A6B7B0E2573CBF5930EC63742A0ED40F047EDFA7E7A9580F90",
  "latest_app_hash": "F20456AFD85B1AC857C89D7894B9600640165A78C7B453C178BB41521AC1DBC2",
  "latest_block_height": "91749",
  "latest_block_time": "2024-08-28T16:31:16.315366938Z",
  "earliest_block_hash": "1793D1ACB1133BA150AC182F744632FABB618D926DACB9D893BBA9B80D8C8CCA",
  "earliest_app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
  "earliest_block_height": "1",
  "earliest_block_time": "2024-04-16T11:04:40.60280319Z",
  "catching_up": false
}