How to join Avalanche-Everest Release

Gabriel Cardona
Aug 21 · 7 min read

We just released the Everest release candidate for Avalanche, the final phase of testing before mainnet. We’re nearly ready to share Avalanche with the world.

Image for post
Image for post

Avalanche features high-throughput (~5,000tps), fast finality (less than 2 seconds), and high resilience. In our recent incentivized testnet, Denali, we had over 1,000 full, block-producing validators participating in consensus.

Stage 1—Installing and Running Avalanche

  • Ubuntu 18.04 and 20.04
  • OSX Catalina or higher

Minimum hardware requirements:

  • CPU: 2 GHz
  • RAM: 3 GB
  • Storage: 250 MB free space
  • The binaries are only compiled for x64, requires building from source yourself to make it work on other architectures

Recommended hardware:

  • CPU: > 2 GHz
  • RAM: > 3 GB
  • Storage: > 5 GB free space on SSD
  • The binaries are only compiled for x64, requires building from source yourself to make it work on other architectures

For the purpose of this tutorial, a utility called curl is used to make the API calls. Alternative options such as the tool Postman are also commonly used to make API calls on the Avalanche network, however. While not a Gecko requirement, it is suggested to install this utility on your operating system to go through the tutorial verbatim.

  • Download the latest Everest tar.gz (zip for osx) found here: https://github.com/ava-labs/gecko/releases
  • Unpack into a folder of our choosing:
    * Linux: tar -xvf avalanche-linux-<VERSION>.tar.gz
    * OSX: unzip avalanche-osx-<VERSION>.zip
  • cd avalanche-<VERSION>

Once we have extracted the files into a folder of our choosing, we simply need to open the directory in a command-line terminal, and type:

> ./avalanche

Stage 2 — Staking Avalanche

The Avalanche platform currently employs basic RPC primitives to get work done. These types of primitives help users build transactions, sign transactions, send transactions, and maintain the node. In the future, these primitives will be abstracted on further to assist with basic duties, but for Everest we’re making sure these building blocks are functioning as expected.

Step 1 — Create a User and Addresses

curl -X POST --data '{
"jsonrpc": "2.0",
"id": 1,
"method": "keystore.createUser",
"params": {
"username": "YOUR USERNAME",
"password": "YOUR PASSWORD"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore

Now that we have an account, we need to create an address on the X-Chain. This address will receive AVAX from the faucet

curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"avm.createAddress",
"params" :{
"username": "YOUR USERNAME",
"password": "YOUR PASSWORD"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X

This will return a response as follows, which contains the address we just created. We’ll need to jot down our X-Chain address as we’ll use it in later steps.

{
"jsonrpc": "2.0",
"result": {
"address": "YOUR X-CHAIN ADDRESS"
},
"id": 1
}

We also must create an address on the P-Chain using our user.

curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.createAddress",
"params": {
"username": "YOUR USERNAME",
"password": "YOUR PASSWORD"
},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/P

This returns the P-Chain account. We must jot this down as well, since we’ll use it in later steps.

{
"jsonrpc": "2.0",
"result": {
"address": "YOUR P-CHAIN ADDRESS"
},
"id": 1
}

Step 2 — Acquire Funds

AVAX Faucet
AVAX Faucet

These funds should arrive in under 2 seconds. To verify that the funds are in our address, call the following function, replacing “YOUR X-CHAIN ADDRESS HERE” with the X-Chain address provided to the faucet.

curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"avm.getBalance",
"params" :{
"address":"YOUR X-CHAIN ADDRESS HERE",
"assetID" :"AVAX"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X

We will see the following response, confirming that we have received our AVAX.

{
"jsonrpc": "2.0",
"result": {
"balance": "10000000",
"utxoIDs": [
{
"txID": "ZckGnBciWaRyDXiYcs9igvXjyMZH28cSrDVvpkBteHxhYEA3Z",
"outputIndex": 0
}
]
},
"id": 1
}

Step 3 — Send it to the Platform

The API call “exportAVAX” begins a procedure on the local node to sign a transaction that can, in one step, transfer funds from the X-Chain to the P-Chain across the network. This is an atomic swap and every node will conduct it. Be sure to use the P-Chain address created in Step 1, not the X-Chain address. We’re going to send the Everest minimum staking amount — 5,000,000 nAVAX — to the P-Chain so that we can validate on the network. We also want to include an additional 2,000,000 nAVAX to pay for 2 transaction fees—the first is to import the funds to the P-Chain and the second is to add our node as a validator.

curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"avm.exportAVAX",
"params" :{
"username": "YOUR USERNAME",
"password": "YOUR PASSWORD",
"to":"YOUR PLATFORM ADDRESS HERE",
"amount": 7000000
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X

This will return a TxID in the response. We do not need to retain this TxID and it can be ignored.

The next step is to accept this transfer on the P-Chain. To do this, we must pass our P-Chain address to the “importAVAX” method on the P-Chain. We also pass in a “sourceChain” which is the ID or alias of the chain the AVAX is being imported from. To import funds from the X-Chain, use "X".

curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.importAVAX",
"params": {
"username": "YOUR USERNAME",
"password": "YOUR PASSWORD",
"to":"YOUR PLATFORM ADDRESS HERE",
"sourceChain": "X"
},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P

This will return a TxID in the response. We do not need to retain this TxID and it can be ignored.

That should be it! The P-Chain should have sufficient funds to stake and participate as a validator in the Everest testnet. To verify, we call getBalance on the P-Chain and verify the balance.

curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getBalance",
"params":{
"address":"YOUR PLATFORM ADDRESS HERE"
},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P

Stage 3 — Validation

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

The next step is to build a transaction that adds our nodeID to the network. In the below example, we’re putting a start time of 15 minutes from now, and we’re ending on August 15th, 2021.

  • Note: on OSX, you should use “$(gdate” instead of “$(date”. If you do not have “gdate” installed, execute “brew install coreutils” in your terminal.
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.addValidator",
"params": {
"username":"YOUR USERNAME HERE",
"password":"YOUR PASSWORD HERE",
"nodeID":"YOUR NODEID HERE",
"rewardAddress":"YOUR PLATFORM ADDRESS HERE",
"startTime":'$(date --date="15 minutes" +%s)',
"endTime":1629032852,
"stakeAmount":5000000,
"delegationFeeRate":0
},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/P

This will return a TxID in the response. We do not need to retain this TxID and it can be ignored. And that should be that! We should see ourselves in the list of pending validators now, and in 15 minutes we’ll be in the list of current validators!

curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getPendingValidators",
"params": {},
"id": 4
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/P
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getCurrentValidators",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/P

Tools Available

Have fun! And let everyone know in our Discord channel if you need assistance.


About Avalanche

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

Ava Labs

Build the Internet of Finance

Gabriel Cardona

Written by

Church of Sudo. Cult of the SuperUser. Order of Root. Web/IoT/Blockchain

Ava Labs

Ava Labs

Avalanche is an open-source platform for launching decentralized finance applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem.

Gabriel Cardona

Written by

Church of Sudo. Cult of the SuperUser. Order of Root. Web/IoT/Blockchain

Ava Labs

Ava Labs

Avalanche is an open-source platform for launching decentralized finance applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

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