Testnet
Manual Installation

Manual Instalation

Install dependencies

1sudo apt update && sudo apt upgrade -y
2sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

Setup GO

1cd $HOME
2VER="1.22.3"
3wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
4sudo rm -rf /usr/local/go
5sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
6rm "go$VER.linux-amd64.tar.gz"
7[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
8echo "export PATH=\"\$PATH:/usr/local/go/bin:~/go/bin\"" >> ~/.bash_profile
9source $HOME/.bash_profile
10[ ! -d ~/go/bin ] && mkdir -p ~/go/bin

Setup variables

1MONIKER=mynode
2CHAIN_ID=odyssey-0
3BASE_PORT=22

Download latest binary

  • Download GETH binaries
1cd $HOME
2wget -O geth https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-linux-amd64
3chmod +x $HOME/geth
4mv $HOME/geth ~/go/bin/
5[ ! -d "$HOME/.story/story" ] && mkdir -p "$HOME/.story/story"
6[ ! -d "$HOME/.story/geth" ] && mkdir -p "$HOME/.story/geth"
  • Build Story binaries
1cd $HOME
2git clone https://github.com/piplabs/story story
3cd story
4git checkout v0.12.0
5go build -o story ./client
6mv $HOME/story/story $HOME/go/bin/

Init Chain

1story init $MONIKER --chain-id $CHAIN_ID
2STORY_HOME=$HOME/.story/story
3cd $STORY_HOME/config
4rm addrbook.json genesis.json
5
6# download addrbook & genesis
7wget https://blockhunters.dev/snapshots/testnet/story/addrbook.json
8wget https://blockhunters.dev/snapshots/testnet/story/genesis.json

Config Chain

Set seed

1SEEDS="[email protected]:21156"
2sed -i -e "s#seeds = .*#seeds = \"$SEEDS\"#" $STORY_HOME/config/config.toml

Set custom ports in config.toml file

1sed -i.bak -e "s%:26658%:${BASE_PORT}658%g;
2s%:26657%:${BASE_PORT}657%g;
3s%:6060%:${BASE_PORT}060%g;
4s%:26656%:${BASE_PORT}656%g;
5s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${BASE_PORT}656\"%;
6s%:26660%:${BASE_PORT}660%g" $STORY_HOME/config/config.toml

Set custom client port in client.toml file

1sed -i.bak -e "s%:26657%:${BASE_PORT}657%g" $STORY_HOME/config/client.toml

Disable indexing (Optional)

1sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $STORY_HOME/config/config.toml

Install & configure cosmovisor for Story

1go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/[email protected]
2
3# Create Cosmovisor Folders
4mkdir -p $STORY_HOME/cosmovisor/genesis/bin
5mkdir -p $STORY_HOME/cosmovisor/upgrades
6
7# Load Node Binary into Cosmovisor Folder
8cp ~/go/bin/story $STORY_HOME/cosmovisor/genesis/bin

Create Story Geth service file

1sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
2[Unit]
3Description=Story Geth Client
4After=network-online.target
5
6[Service]
7User=$USER
8ExecStart=$HOME/go/bin/geth --odyssey --syncmode full --http --http.api eth,net,web3,engine --http.vhosts '*' --http.addr 0.0.0.0 --http.port ${BASE_PORT}545 --authrpc.port ${BASE_PORT}551 --ws --ws.api eth,web3,net,txpool --ws.addr 0.0.0.0 --ws.port ${BASE_PORT}546
9
10Type=simple
11Restart=always
12RestartSec=1
13LimitNOFILE=65535
14
15[Install]
16WantedBy=multi-user.target
17EOF

Create Story service file

1sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
2[Unit]
3Description=Story Consensus Client
4After=network.target
5
6[Service]
7User=$USER
8WorkingDirectory=$HOME/.story/story
9ExecStart=$(which story) run
10
11Restart=on-failure
12RestartSec=5
13LimitNOFILE=65535
14[Install]
15WantedBy=multi-user.target
16EOF

Download snapshots

  • Download Story snapshot
1# backup priv_validator_state.json
2cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup
3
4# remove old data and unpack Story snapshot
5rm -rf $HOME/.story/story/data
6curl -o - -L https://blockhunters.dev/snapshots/testnet/story/snapshot.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.story/story
7
8# restore priv_validator_state.json
9mv $HOME/.story/story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json
  • Download Story Geth snapshot
1# remove old data and unpack Story Geth snapshot
2rm -rf $HOME/.story/geth/odyssey/geth/chaindata
3
4curl -o - -L https://blockhunters.dev/snapshots/testnet/story/geth_snapshot.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.story/geth

Enable and start service

1sudo systemctl daemon-reload
2sudo systemctl enable story story-geth --now
3sudo systemctl restart story story-geth
4
5journalctl -u story -u story-geth -f