Manual Instalation
Install dependencies
1sudo apt update && sudo apt upgrade -y2sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Setup GO
1cd $HOME2VER="1.22.3"3wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"4sudo rm -rf /usr/local/go5sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"6rm "go$VER.linux-amd64.tar.gz"7[ ! -f ~/.bash_profile ] && touch ~/.bash_profile8echo "export PATH=\"\$PATH:/usr/local/go/bin:~/go/bin\"" >> ~/.bash_profile9source $HOME/.bash_profile10[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
Setup variables
1MONIKER=mynode2CHAIN_ID=odyssey-03BASE_PORT=22
Download latest binary
- Download GETH binaries
1cd $HOME2wget -O geth https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-linux-amd643chmod +x $HOME/geth4mv $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 $HOME2git clone https://github.com/piplabs/story story3cd story4git checkout v0.12.05go build -o story ./client6mv $HOME/story/story $HOME/go/bin/
Init Chain
1story init $MONIKER --chain-id $CHAIN_ID2STORY_HOME=$HOME/.story/story3cd $STORY_HOME/config4rm addrbook.json genesis.json56# download addrbook & genesis7wget https://blockhunters.dev/snapshots/testnet/story/addrbook.json8wget 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]23# Create Cosmovisor Folders4mkdir -p $STORY_HOME/cosmovisor/genesis/bin5mkdir -p $STORY_HOME/cosmovisor/upgrades67# Load Node Binary into Cosmovisor Folder8cp ~/go/bin/story $STORY_HOME/cosmovisor/genesis/bin
Create Story Geth service file
1sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF2[Unit]3Description=Story Geth Client4After=network-online.target56[Service]7User=$USER8ExecStart=$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}546910Type=simple11Restart=always12RestartSec=113LimitNOFILE=655351415[Install]16WantedBy=multi-user.target17EOF
Create Story service file
1sudo tee /etc/systemd/system/story.service > /dev/null <<EOF2[Unit]3Description=Story Consensus Client4After=network.target56[Service]7User=$USER8WorkingDirectory=$HOME/.story/story9ExecStart=$(which story) run1011Restart=on-failure12RestartSec=513LimitNOFILE=6553514[Install]15WantedBy=multi-user.target16EOF
Download snapshots
- Download Story snapshot
1# backup priv_validator_state.json2cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup34# remove old data and unpack Story snapshot5rm -rf $HOME/.story/story/data6curl -o - -L https://blockhunters.dev/snapshots/testnet/story/snapshot.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.story/story78# restore priv_validator_state.json9mv $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 snapshot2rm -rf $HOME/.story/geth/odyssey/geth/chaindata34curl -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-reload2sudo systemctl enable story story-geth --now3sudo systemctl restart story story-geth45journalctl -u story -u story-geth -f