Manual install
Recommended Hardware
4 Cores8GB RAM200GB of storage (NVME)
RPC: https://story-rpc.tarabukin.work
API: https://story-api.tarabukin.work
install dependencies, if needed
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
install go, if needed
cd $HOME
VER="1.23.1"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
echo $(go version)
Node Installation
0303
Set vars
MONIKER=
STORY_PORT=
STORY_PORT_GETH=
Download binaries
cd $HOME
rm -rf bin
mkdir bin
cd bin
wget -O geth https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-linux-amd64
chmod +x geth
mv $HOME/bin/geth ~/go/bin/
rm -rf ~/.story/story
rm -rf ~/.story/geth
mkdir -p ~/.story/story
mkdir -p ~/.story/geth
cd $HOME
rm -rf story
git clone https://github.com/piplabs/story
cd story
git checkout v0.12.0
go build -o story ./client
sudo mv ~/story/story ~/go/bin/
Init story app
story init --moniker $MONIKER --network odyssey
set custom ports in config.toml file (if changed)
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${STORY_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${STORY_PORT}657\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${STORY_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${STORY_PORT}660\"%" $HOME/.story/story/config/config.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:${STORY_PORT}656\"/" $HOME/.story/story/config/config.toml
set seeds
SEEDS="434af9dae402ab9f1c8a8fc15eae2d68b5be3387@story-testnet-seed.itrocket.net:29656"
set peers (Live peers)
PEERS="c2a6cc9b3fa468624b2683b54790eb339db45cbf@story-testnet-peer.itrocket.net:26656,89a07021f98914fbac07aae9fbb12a92c5b6b781@152.53.102.226:26656,20b8296d4019cdc0b72773ea7984523af40feacb@148.72.138.4:26656,0a2bc2ce69b7292deaf0b6a33af76bf9b2e25ec6@88.198.46.55:41656,32e67bd090e9d7bcc4167c793e985ae0ec959322@100.42.183.67:656,c2d05fe74c762fed39487d146e72f00c725db21c@157.173.119.101:656,30b7adbeb70a5b6c1868c340c4cab42ef4065a43@37.60.235.222:656,2086affe2a3ea6ba3a9e6ca16a3ba406906f6eea@141.98.217.151:26656,619e90e21e52861996db76b72021a53b473d13ec@37.60.234.203:656,e22f70a71859d0156778ac328b3f331689094f56@15.235.225.47:26656,11dc2be345d15741dc747d6a6e5bcdc90d812756@100.42.183.223:656,07ab4164e1d0ee17c565542856ac58981537156f@185.16.38.165:42656,04e5734295da362f09a61dd0a9999449448a0e5c@52.14.39.177:26656,4d881b88285d41d2f6c33fdf50a307666aacaca1@65.109.36.231:52656,dfcc85577f77f3c312fd6e803be84b09919ead59@157.173.204.15:26656,65c49a2c4c73ac6f12675f0051f4332b1320d384@213.239.198.181:35656,4f7931c2c795da73d7ea20f0166791f134f6e45e@2.59.117.67:26656,17334e0738463a9eac3466147283bf0637208cdb@37.60.234.243:656,7ecb96bb4778b3f979be7c8e720cc9ee739ac770@104.198.43.15:26656,0f1b1840d2f3302b60a671be500b181eb354e21f@5.9.117.149:45656,c5c214377b438742523749bb43a2176ec9ec983c@176.9.54.69:26656,5dec0b793789d85c28b1619bffab30d5668039b7@150.136.113.152:26656,443896c7ec4c695234467da5e503c78fcd75c18e@80.241.215.215:26656,201ce716a03aa45a7e037575a996a5082348eb44@148.72.138.7:26656,b5aab33974fe219a5525a4454d180216c4dd3304@[2001:41d0:203:e4db::6]:26656,cd33da43885ce09266d5019d996f2094a5521b85@81.0.246.245:656,02e9fac0fab468724db00e5e3328b2cbca258fdc@95.217.193.182:26656,959ef7ebaaacd08de053e738707d3a2940f846a4@148.72.138.5:26656,3570054e30c388aa4c3d392cc9962846302ca11c@45.149.207.111:656,e701f0d0acef2146bea9d75a85c0a70c7925a585@213.21.195.17:26656,f5746b45e50f5b8ee4dd87c216e66c6ea4ba1e05@95.217.74.22:26656"
set seeds and peers in config.toml file
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" \
$HOME/.story/story/config/config.toml
download genesis and addrbook(upd 5h)
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://snapshots.tarabukin.work/storyfile/genesis.json"
create geth service file
sudo tee /etc/systemd/system/story-testnet-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth daemon Nach
After=network-online.target
[Service]
User=$USER
ExecStart=$(which geth) --odyssey --syncmode full --port 30303 --http --http.api eth,net,web3,engine --http.vhosts '*' --http.addr 0.0.0.0 --http.port ${STORY_PORT_GETH}45 --ws --ws.api eth,web3,net,txpool --ws.addr 0.0.0.0 --ws.port ${STORY_PORT_GETH}46
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
create story service file
sudo tee /etc/systemd/system/story-testnet.service > /dev/null <<EOF
[Unit]
Description=Story Service
After=network.target
[Service]
User=$USER
WorkingDirectory=$HOME/.story/story
ExecStart=$(which story) run
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Download Geth snapshot
rm -rf $HOME/.story/geth/*
sudo mkdir -p $HOME/.story/geth/odyssey/geth
curl https://snapshots.tarabukin.work/storygeth/storygeth_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.story/geth/odyssey/geth
Enable and start geth
sudo systemctl daemon-reload
sudo systemctl enable story-testnet-geth.service
sudo systemctl restart story-testnet-geth.service && sudo journalctl -fu story-testnet-geth.service -o cat
Download Story snapshot or Statesync
Archive snapshot
cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup
rm -rf $HOME/.story/story/data
curl https://snapshots.tarabukin.work/story/odyssey_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.story/story
mv $HOME/.story/story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json
Pruned snapshot
cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup
rm -rf $HOME/.story/story/data
curl https://snapshots.tarabukin.work/story/pruned_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.story/story
mv $HOME/.story/story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json
Statesync
Statesync has become very poorly synchronized. Use snap
cd $HOME
cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup
rm -rf $HOME/.story/story/data
mkdir -p $HOME/.story/story/data
SNAP_RPC="https://story-rpc.tarabukin.work:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" ~/.story/story/config/config.toml
mv $HOME/.story/story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json
disable indexing (optional)
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.story/story/config/config.toml
Enable and start Story
sudo systemctl daemon-reload
sudo systemctl enable story-testnet.service
sudo systemctl start story-testnet.service && sudo journalctl -fu story-testnet.service -o cat
Create validator
Before creating a validator, make sure the node is synchronized. Make sure catching_up = false
curl localhost:26657/status | jq .result.sync_info
Check if syncing is still in progress: will output "true" if geth is syncing
geth --exec "eth.syncing" attach ~/.story/geth/odyssey/geth.ipc
Init
story init --network odyssey --moniker "your-moniker"
We export the wallet you created and add the private key to the Matemask Wallet. Then we request Token via Faucet and apply the following codes to create Validator.
1. Export wallet:
story validator export --export-evm-key
2. Get wallet key and import to Metamask wallet
sudo nano ~/.story/story/config/private_key.txt
3. Import the wallet to Metamask and get tokens in the faucet or ask your friends
4. You need at least have 1 IP on wallet before go to last step
5. Register validator
story validator create --stake 2000000000000000000000 --private-key "your_private_key" --moniker "your-moniker"
Remember to backup your validator priv_key from here:
cat $HOME/.story/story/config/priv_validator_key.json
Delete node
sudo systemctl stop story-testnet-geth.service
sudo systemctl disable story-testnet-geth.service
sudo systemctl stop story-testnet.service
sudo systemctl disable story-testnet.service
rm /etc/systemd/system/story-testnet-geth.service
rm /etc/systemd/system/story-testnet.service
sudo systemctl daemon-reload
cd $HOME
rm -rf .story
rm -rf story
rm -rf $(which story)
rm -rf $(which geth)