Copy sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
Copy ver = "1.21.6"
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
Copy cd $HOME
wget https://github.com/availproject/avail/releases/download/v2.2.4.0-rc1/x86_64-ubuntu-2204-avail-node.tar.gz
tar xvzf x86_64-ubuntu-2204-avail-node.tar.gz
rm -rf x86_64-ubuntu-2204-avail-node.tar.gz
mv avail-node /usr/bin/avail
Copy tee /etc/systemd/system/avail.service > /dev/null << EOF
[Unit]
Description=Avail Validator Node
After=network-online.target
StartLimitIntervalSec=0
[Service]
User=$USER
Restart=always
RestartSec=3
LimitNOFILE=65535
ExecStart=/usr/bin/avail \
--base-path $HOME/.node-data/ \
--chain turing \
--port 40333 \
--rpc-port 8933 \
--prometheus-port 9615 \
--validator \
--name '$yourname'
[Install]
WantedBy=multi-user.target
EOF
Copy systemctl daemon-reload
systemctl enable avail
systemctl restart avail && journalctl -u avail -f -o cat
Copy curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933
SnapShot Testnet - updated every 12 hours
Copy cd $HOME
apt install lz4
sudo systemctl stop avail
rm -rf $HOME /.node-data/chains/avail_turing_network/paritydb
curl -o - -L https://avail-t.snapshot.stavr.tech/avail-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.node-data/chains/ --strip-components 4
systemctl restart avail && journalctl -fu avail -o cat
Copy journalctl - fu avail - o cat
Copy systemctl restart avail && journalctl -fu avail -o cat
Copy systemctl stop avail
systemctl disable avail
rm /etc/systemd/system/avail.service
systemctl daemon-reload
cd && rm -rf .node-data