πŸ’»Installation

Server preparation

apt update && apt upgrade -y
apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y

Install GO

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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

Open the following ports to communicate with other nodes

ufw allow 30303 comment story_geth_p2p_port
ufw allow 26656 comment story_p2p_port

Node installation

Currently, to run a node, you need to run two separate clients:

  • story-geth, which is a forked version of geth

  • story, which is a consensus client

# if necessary, create the go/bin/ directory
mkdir -p $HOME/go/bin/
cd $HOME
mkdir -p $HOME/story && cd story

Install story-geth

wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/geth-public/geth-linux-amd64-0.9.2-ea9f0d2.tar.gz
tar -xvf geth-linux-amd64-0.9.2-ea9f0d2.tar.gz
mv $HOME/story/geth-linux-amd64-0.9.2-ea9f0d2/geth $HOME/go/bin/story-geth
story-geth version
# Version: 0.9.2-stable
# Git Commit: ea9f0d293f5800e9e0300dfaafc02256de6160ef
# Git Commit Date: 20240826

Delete old archive

rm -r geth-linux-amd64*

Install story

wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/story-public/story-linux-amd64-0.10.0-9603826.tar.gz
tar -xvf story-linux-amd64-0.10.0-9603826.tar.gz
mv $HOME/story/story-linux-amd64-0.10.0-9603826/story $HOME/go/bin/story
story version
# Version       v0.10.0-stable
# Git Commit    9603826

Delete old archive

rm -r story-linux-amd64*

We initialize the node to create the necessary configuration files

story init --moniker "UTSA_guide" --network iliad

Genesis

# check the genesis
sha256sum ~/.story/story/config/genesis.json
# 18ab598bbaefaa5af5e998abe14e8660ff6fa3c63a9453f5f40f472b213ed091

At this stage, we can download the address book

wget -O $HOME/.story/story/config/addrbook.json "https://share102.utsa.tech/story/addrbook.json"

Set up node configuration

external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.story/story/config/config.toml

peers="90161a7f82ce5dbfbed1a2a9d40d4103730cff0f@5.9.87.231:26656"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$peers\"|" $HOME/.story/story/config/config.toml
seeds="6a07e2f396519b55ea05f195bac7800b451983c0@story-seed.mandragora.io:26656"
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.story/story/config/config.toml

# настраиваСм Ρ„ΠΈΠ»ΡŒΡ‚Ρ€Π°Ρ†ΠΈΡŽ "ΠΏΠ»ΠΎΡ…ΠΈΡ…" peers
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.story/story/config/config.toml

(OPTIONAL) Set up indexer

indexer="kv" && \
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.story/story/config/config.toml

Create a service file story-geth

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/story-geth --iliad --syncmode full --http --http.api eth,net,web3,engine --http.vhosts '*' --http.addr 127.0.0.1 --http.port 8545 --ws --ws.api eth,web3,net,txpool --ws.addr 127.0.0.1 --ws.port 8546
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Create a service file story

tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story Consensus Client
After=network.target

[Service]
User=$USER
WorkingDirectory=$HOME/.story/story
ExecStart=$HOME/go/bin/story run
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

launch service files

systemctl daemon-reload
systemctl enable story
systemctl enable story-geth

# story-geth
systemctl restart story-geth && journalctl -u story-geth -f -o cat

# story
systemctl restart story && journalctl -u story -f -o cat

If peers do not cling for a long time or you see errors error: wrong Block.Header.AppHash, you need to use State sync or boot from a Snapshot

To view useful commands, go to Useful commands

To create a validator, go to Creating / Editing a Validator

Last updated