Install and Run the Avalanche Cascade Testnet

Stephen Buttolph
Apr 17, 2020 · 4 min read

Introduction

The Avalanche platform supports TPS in the thousands, approximately 1 second finality on a permissionless network, proof of stake Sybil protection, and an extensible architecture that enables assets to be created and exchanged quickly and with ease. The Borealis release let the crypto community get a first taste of what Avalanche developers have been building this year. The Cascade release comes with, in addition to new features, a public testnet.

This tutorial is a guide for joining the network, so anyone can immediately begin testing the upcoming Avalanche Platform. To assist in this, we’re going to step through the process of installing Gecko (the Avalanche Go client), joining the testnet, and interacting with the network.

Prerequisites

To run the software, it is required that users be comfortable with navigating command line environments. The heaviest testing on this release has been done on Ubuntu 18.04, but there are several options available for other operating systems on http://docs.ava.network. Please check out those docs for frequent updates as well. As node software is upgraded, changes will be reflected in the docs.

Requirements for a single node are:

  • Hardware: 2 GHz or faster CPU, 3 GB RAM, 250 MB hard disk.

Support for higher versions of Go is not present in this release, though this is something that is planned to be patched in a later build.

The machine also needs the following tools and libraries installed:

libssl-dev
libuv1-dev
cmake
make
curl
g++/clang++ that supports c++14 (to build salticidae C++ library)

The command to install these dependencies on Ubuntu 18.04 is:

sudo apt-get install curl build-essential libssl-dev libuv1-dev cmake make g++

Install Gecko — The Avalanche Go Client

The Go implementation of the Avalanche client, Gecko, is the node we’ll be using for launching a node. It’s very feature-rich with a wide list of APIs available, documented here: https://docs.ava.network/v1.0/en/api/intro-apis/.

Go get Gecko

To install Gecko we’re going to grab the software directly using the “go get” command:

go get -d -v github.com/ava-labs/gecko/...

This should pull down the entire Gecko client into our $GOPATH.

Build from source code

Now that we have Gecko pulled down, we need to build the client. To do that, just hop into our “gecko” folder and build the source:

cd $GOPATH/src/github.com/ava-labs/gecko
./scripts/build.sh

If all goes well we should see something like this when checking the “build” directory:

$GOPATH/src/github.com/ava-labs/gecko$ cd build/
$GOPATH/src/github.com/ava-labs/gecko/build$ ls -l
total 60816
-rwxr-xr-x 1 user user 35646104 Apr 6 15:34 ava
drwxrwxr-x 2 user user 4096 Apr 6 15:34 plugins
-rwxr-xr-x 1 user user 26625008 Apr 6 15:34 xputtest
$GOPATH/src/github.com/ava-labs/gecko/build$ cd ..

But if we want to verify that all went well, we can also run the following:

./scripts/build_test.sh

If all tests pass, we’ve installed the client! If not, pop into the Discord and say hello to let us help with the process.

Test the Setup

Congratulations! Now let’s join the public network!

./build/ava

Send a test command

Now that we have our node running, let’s test out the node’s API. All the APIs support JSON-RPC to send requests. More information about JSON-RPC 2.0 can be learned at: https://www.jsonrpc.org/

The node has an argument, “http-port”, that determines which port will be opened by Gecko for the API endpoints. By default, the node will open port 9650. So, this will be the Port we’ll use. To test this, we’ll fire off a “peers()” request, which should return the nodes which we’ve connected to. To do this, we can open another terminal window separate from Gecko, and using “curl”, we’ll send the following request to our API node:

curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"admin.peers"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/admin

Which should return a list of peers, such as:

{
"jsonrpc":"2.0",
"result":{
"peers":[
"3.227.207.132:21001",
"34.207.133.167:21001",
"107.23.241.199:21001",
"54.197.215.186:21001",
"18.234.153.22:21001"
]
},
"id":1
}

Congratulations! We’ve joined the network. There’s much more that can be done with the Avalanche Platform listed in the documentation: https://docs.ava.network

Get some test AVA

Now that we can join the network, we need to get some test AVA. But first, we need to set up a wallet. We can use a live web-based Avalanche Wallet to quickly set up a wallet. Alternatively, we can set up a local Avalanche Wallet.

Once we have an X-Address, we can use the Avalanche Faucet to send ourselves some test AVA!

A graceful exit

To exit Gecko, you can just CTRL+C the node. The logs of our session will remain in our log directory, as well as the current state of the database.

We hope this tutorial gives you a solid foundation for running and building on AVA. Please reach out via Discord if you need help getting Avalanche running and seeing what’s possible.

About Avalanche:

Avalanche is an open-source platform for launching decentralized finance applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem. Developers who build on Avalanche can easily create powerful, reliable, and secure applications and custom blockchain networks with complex rulesets or build on existing private or public subnets.

Website | Whitepapers | Twitter | Discord | GitHub | Documentation | Explorer | Avalanche-X | Telegram | Facebook | LinkedIn | Reddit | YouTube

Avalanche

Build the Internet of Finance

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store