Skip to content

0xmoei/Avail-Full-Node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 alt text

Avail Full Node Guide

System Requirements

Component Minimum Recommended
RAM 4GB 8GB
CPU (amd64/x86 architecture) 2 core 4 core
Storage (SSD) 20-40 GB 200-300 GB
OS Recommended Ubuntu 22.04

Install Full Node

  1. Install Dependecies:
   sudo apt-get -y update &&
   sudo apt-get install screen -y &&
   sudo apt-get -y install build-essential &&
   sudo apt-get -y install --assume-yes git clang curl libssl-dev protobuf-compiler && 
   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh &&
   source ~/.cargo/env &&
   rustup default stable &&
   rustup update &&
   rustup update nightly && 
   rustup target add wasm32-unknown-unknown --toolchain nightly
  1. Remove old files of Avail Node (if you participated in Kate testnet):
sudo systemctl stop availd && \
sudo systemctl disable availd && \
rm /etc/systemd/system/availd.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf .avail && \
rm -rf avail && \
rm -rf $(which availd)
  1. Create Screen:
  • Step 4 takes a little longer to finish. The "screen" command can help you recover your terminal screen if it gets interrupted
  screen -S avail
  1. Build the lastest version of Avail Node (v1.8.0.0):
   mkdir -p $HOME/avail-node &&
   cd $HOME/avail-node &&
   git clone https://github.com/availproject/avail.git &&
   cd avail &&
   mkdir -p output &&
   mkdir -p $HOME/avail-node/data &&
   git checkout v1.8.0.0 &&
   cargo run --locked --release -- --chain goldberg -d ./output

 alt text Wait for the process to complete.

 alt text Now if your terminal is like the above pic, press Ctrl + C

  1. Create systemD (Before creating the service, please read all this step notes, then proceed with the command)
  • Find your [$HOME] directory (you need this later)
  $home

My [$HOME] is /root in the following example

 alt text

  • Create a .service file
   sudo touch /etc/systemd/system/availd.service && sudo nano /etc/systemd/system/availd.service

Now you are editing .service file

  • Paste the following command in it (Change [$HOME] in the command below before pasting it into the service. Please read more below):
   [Unit] 
   Description=Avail Validator
   After=network.target
   StartLimitIntervalSec=0

   [Service] 
   User=root 
   ExecStart=[$HOME]/avail-node/avail/target/release/data-avail --base-path [$HOME]/avail-node/data --chain goldberg --port 30333  --rpc-cors=all --rpc-external --rpc-methods=unsafe --rpc-port 9933 --prometheus-port 9615  --validator --name "my-node"
   Restart=always 
   RestartSec=120

   [Install] 
   WantedBy=multi-user.target

In the above command, please note the following information:

  • [$HOME] if you typed the command $HOME, then copy the path to replace in [$HOME] as shown in the example above. Replace [$HOME] with /root

[$HOME]/avail-node/avail/target/release/data-avail will be /root/avail-node/avail/target/release/data-avail [$HOME]/avail-node/data will be /root/avail-node/data.

  • --name replace my-node with your favorite node name.
  • Ports 30333, 9933, 9615 must be opened in the firewall. If you are using a VPS, configure it to allow TCP/UDP connections through these ports. If you're using a VPS, please make sure the port is open from the provider's side.

After editing, press Ctrl + O and then Enter, then press Ctrl + X to exit.

  1. Open ports
sudo apt-get install ufw && sudo ufw enable && sudo ufw allow 30333/tcp && sudo ufw allow 9933/tcp && sudo ufw allow 9615/tcp
  1. Enable and start the Node:
   systemctl enable availd.service && systemctl start availd.service
  1. Check Node status:
   systemctl status availd.service

 alt text

Press Ctrl + C to quit

  1. Check Node logs:
   journalctl -f -u availd

 alt text If the finalized number equals the target number, your node is synced (#Finalized = #Target)

To check your node, visit https://telemetry.avail.tools/. Your node will be displayed after the synchronization process is complete and the node starts running.  alt text

Contact me

X: https://twitter.com/0xMoei

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published