Metodi di pagamento Abuse

Protocollo storia: impostazione del nodo

03.09.2024, 15:51

Story Protocol è una piattaforma innovativa per la creazione e la gestione della proprietà intellettuale su blockchain. Importanti fondi come a16z, Polychain Capital e Samsung Next hanno investito nel progetto, raccogliendo oltre 134 milioni di dollari. Ora avete l'opportunità di diventare un validatore nella nuova rete di prova di Story.

Story Protocol

Requisiti minimi del server

  1. Processore: 4 core

  2. RAM: 8 GB

  3. Memoria: 200 GB

Preparazione del server

  1. Noleggiate un server da un fornitore di hosting affidabile (naturalmente da THE.Hosting, e utilizzate il codice promozionale TAXI per attivare uno sconto del 15% sul vostro primo ordine).

  2. Collegatevi al server tramite MobaXterm con accesso root.

Aggiornate e installate i pacchetti necessari:

sudo apt update && sudo apt upgrade -y
sudo apt install curl git make jq build-essential gcc unzip wget lz4 aria2 -y

Installare Story-Geth

Scaricare e installare 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 -xzvf geth-linux-amd64-0.9.2-ea9f0d2.tar.gz
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profile
fi
sudo cp geth-linux-amd64-0.9.2-ea9f0d2/geth $HOME/go/bin/story-geth
source $HOME/.bash_profile
story-geth version

Installare Story

Scaricare e installare Story:

wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/story-public/story-linux-amd64-0.9.11-2a25df1.tar.gz
tar -xzvf story-linux-amd64-0.9.11-2a25df1.tar.gz
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profile
fi
sudo cp story-linux-amd64-0.9.11-2a25df1/story $HOME/go/bin/story
source $HOME/.bash_profile
story version

Inizializzare la rete e impostare il moniker:

story init --network iliad --moniker MONIKER

Creare e configurare i file di servizio

Creare un file di servizio per Story-Geth:

sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF

[Unit]
Description=Story Geth Client
After=network.target
[Service]
User=root
ExecStart=/root/go/bin/story-geth --iliad --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF


Creare un file di servizio per Story:

sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story Consensus Client
After=network.target
[Service]
User=root
ExecStart=/root/go/bin/story run
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF

Riavviare i servizi:

sudo systemctl daemon-reload && 
sudo systemctl start story-geth && 
sudo systemctl enable story-geth && 
sudo systemctl start story && 
sudo systemctl enable story && 
sudo systemctl status story-geth && 
sudo systemctl status story

Controllare lo stato dei nodi

Controllare lo stato di sincronizzazione dei nodi:

curl localhost:26657/status | jq

Per i primi 5-10 minuti lo stato è vero e 0 block_height è normale. Successivamente, i blocchi inizieranno a crescere e lo stato passerà a false.

Installazione dell'istantanea (opzionale)

Arrestare il nodo:

sudo systemctl stop story

sudo systemctl stop story-geth

Scaricare e installare lo snapshot per accelerare la sincronizzazione:

cd $HOME
aria2c -x 16 -s 16 https://vps5.josephtran.xyz/Story/Geth_snapshot.lz4 -o Geth_snapshot.lz4
aria2c -x 16 -s 16 https://vps5.josephtran.xyz/Story/Story_snapshot.lz4 -o Story_snapshot.lz4

Cancellare i vecchi dati ed estrarre i nuovi:

rm -rf ~/.story/story/data
rm -rf ~/.story/geth/iliad/geth/chaindata
sudo mkdir -p /root/.story/story/data
lz4 -d Story_snapshot.lz4 | pv | sudo tar xv -C /root/.story/story/
sudo mkdir -p /root/.story/geth/iliad/geth/chaindata
lz4 -d Geth_snapshot.lz4 | pv | sudo tar xv -C /root/.story/geth/iliad/geth/

Riavviare il nodo e controllare lo stato:

sudo systemctl start story
sudo systemctl start story-geth
curl localhost:26657/status | jq

Creare un validatore

Esportare i dati del validatore:

story validator export

Ottenere una chiave privata:

sudo cat /root/.story/story/config/private_key.txt
story validator export --export-evm-ke

Richiedere i token $IP di prova dal rubinetto e creare il validatore:

story validator create --stake 1000000000000000000 --private-key "your_private_key"

Comandi utili per lavorare con il nodo

Arrestare il nodo:

sudo systemctl stop story
sudo systemctl stop story-geth

Riavviare un nodo:

sudo systemctl start story
sudo systemctl start story-get

Controllare lo stato:

curl localhost:26657/status | jq

Visualizzazione dei log:

sudo journalctl -u story-geth -f -o cat
sudo journalctl -u story -f -o cat

Conclusione

Il nodo Story Protocol è stato installato e configurato con successo. È possibile monitorare le sue prestazioni e creare validatori che partecipino alla rete di test.