Status: Works for Delani build.
AVA node setup For Newbies
For this tutorial i will be using Cloudjiffy, it is a service that lets you deploy your application instantly.
Requirements
AVA is an incredibly lightweight protocol, so the minimum computer requirements are quite modest.
- Hardware: CPU > 2 GHz, RAM > 3 GB, Storage > 5 GB free space.
- OS: Ubuntu == 18.04 or Mac OS X >= Catalina. (Ubuntu versions other than 18.04 may work but have not been tested.)
- Software: Go >= 1.13
After you register on Cloudjiffy you would click New Environment, disable any other selection and only pick the vps section then select Ubuntu 18.04.
My Setting for the purpose of this tutorial is setting my scaling limit to 8cloudlets(1gb and 3.2GHz) and switching the Public IPV4 to on, one advantage of Cloudjiffy is we won't be paying for unit not used which means i might only end up spending as low as $2.4 a month.
Locate your Web SSH.
You should get a screen that looks like this.
Now let's get to the fun part.
We will need to update our version of ubuntu to the latest.
sudo apt-get update
Now we will install Go .
Downloading the Go tarball
wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
Extracting the Go tarball
Use tar to extract the tarball to the /usr/local
directory:
sudo tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
Adjusting the Path Variable
In order for the system to know where to find the Go executable binaries, we need to adjust the $PATH
environment variable. We can do this by appending the following line to the /etc/profile
file (for a system-wide installation) or the $HOME/.profile
file (for a current user installation):
export PATH=$PATH:/usr/local/go/bin
Save the file, and load the new PATH environment variable into the current shell session:
source ~/.profile
Verifying the Go Installation
Verify the installation by printing the Go version:
go version
We should get a screen like the below if we installed it properly
Before installing my Gecko i have decided to install Tmux which will keep my session in place even if i close my terminal, This will come in handy when we want to launch our node and keep it online.
Type the following in your terminal to install tmux.
apt install tmux
Now lets create a new session we can call anytime as long as our instance is not restarted or shutdown.
tmux new -s session_name
You can name yours anything, i will be naming mine avanode so it would be tmux new -s avanode .
If i want to access my tmux session again after closing terminal all i need to do is : tmux attach -t avanode
Other Command can be found here.
Whenever you create a new tmux session, always call your gopath.
export PATH=$PATH:/usr/local/go/bin
Now we can install our Gecko.
Since our Ubuntu is a new install, we need to Install the following libraries by:
sudo apt-get install libssl-dev libuv1-dev cmake make curl g++
Downloading Gecko Source Code
If you do not have Git installed, You can do that by
apt install git
Clone the Gecko repository:
go get -v -d github.com/ava-labs/gecko/...
You should see a screen looking like this, give it a few minute or less to download all the required files from the Gecko repo.
If you tried
cd $GOPATH/src/github.com/ava-labs/gecko
And it didn’t work , Use the following line.
cd go/src/github.com/ava-labs/gecko
Build Gecko:
The command below will load some files, give it a few minutes to download and build the required file.
./scripts/build.sh
If your build was successful you should see something like this.
To start a node and connect it to the AVA test net:
./build/ava
You should see a screen that looks like the one below
Now let us check if our Node is connected to the AVA network.
We will hit the Duplicate option
For other users just open a new terminal window.
We will be using tmux here also so we can always continue from whatever we are doing anytime.
If you close the avanode terminal now it will keep running in the background, this is why we use tmux.
tmux new -s station
Then we set GoPath.
export PATH=$PATH:/usr/local/go/bin
We have to wait for our node to bootstrap and you can check with
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :2,
"method" :"avm.getBalance",
"params" :{
"address":"X-6cesTteH62Y5mLoDBUASaBvCXuL2AthL",
"assetID":"AVA"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/X
Once your node is and synced, you should see an AVA balance looking like the one below.
NODE UPGRADE
If you want to upgrade your node to the latest version of the Testnet use the codes below.
cd go/src/github.com/ava-labs/gecko git pull && bash ./scripts/build.sh
For how to stake and others please visit : AVA Doc
I hope this tutorial helps.
Updated and compatible with the latest version of the AVA testnet.
Please use my referral link to Cloudjiffy.