September 20
Story Protocol Node Guide | Гайд по ноде Стори
Требования к серверу:
я взяла на хетцнере
ВИДЕО_ГАЙД на моем ютуб ♥
Установка
sudo apt-get update -y && sudo apt upgrade -y && sudo apt-get install make build-essential unzip lz4 gcc git jq -y
#устанавливаем го sudo rm -rf /usr/local/go curl -Ls https://go.dev/dl/go1.21.1.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)
NODE_MONIKER="MONIKER" #заменить MONIKER на имя своей ноды (придумать)
git clone https://github.com/piplabs/story cd story git checkout v0.11.0 go build -o story ./client cp ./story /usr/local/bin/story cd story version wget https://github.com/piplabs/story-geth/releases/download/v0.9.4/geth-linux-amd64 mv /root/geth-linux-amd64 /usr/local/bin/geth sudo chmod +x /usr/local/bin/geth
story init --moniker $NODE_MONIKER --network iliad
Создаем сервисный файл для geth:
sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF [Unit] Description=Story Geth After=network-online.target [Service] User=$USER ExecStart=/usr/local/bin/geth --iliad --syncmode full --http --http.api eth,net,web3,engine --http.vhosts '*' --port 30333 --http.addr 0.0.0.0 --http.port 8555 --ws --ws.api eth,web3,net,txpool --ws.addr 0.0.0.0 --ws.port 8556 --authrpc.port 8561 Restart=on-failure RestartSec=3 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload sudo systemctl enable story-geth sudo systemctl start story-geth
sudo journalctl -u story-geth -f --no-hostname -o cat
Создаем сервисный файл для ноды:
sudo tee /etc/systemd/system/story.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
sudo systemctl daemon-reload sudo systemctl enable story sudo systemctl start story
sudo journalctl -u story -f --no-hostname -o cat
Снепшот сети (запускать лучше в скрине)
За него огромная благодарность ребятам из ITrocket!
sudo systemctl stop story story-geth cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup rm -rf $HOME/.story/story/data rm -rf $HOME/.story/geth/iliad/geth/chaindata curl https://server-5.itrocket.net/testnet/story/story_2024-10-01_1031769_snap.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.story mv $HOME/.story/story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json sudo systemctl start story-geth sudo systemctl start story
curl localhost:$(sed -n '/\[rpc\]/,/laddr/ { /laddr/ {s/.*://; s/".*//; p} }' $HOME/.story/story/config/config.toml)/status | jq
После синхронизации бекапим кошелек и создаем валидатора:
story validator export --export-evm-key
Запрашиваем токены в кране, затем выполняем команду:
story validator create --stake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')
Обновление geth
wget https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-linux-amd64 mv /root/geth-linux-amd64 /usr/local/bin/geth sudo chmod +x /usr/local/bin/geth sudo systemctl restart story-geth sudo systemctl restart story
Обновление story
rm -rf story git clone https://github.com/piplabs/story cd story git checkout v0.11.0 go build -o story ./client sudo mv /root/story/story /usr/local/bin/story sudo systemctl restart story sudo journalctl -u story -f --no-hostname -o cat