Step By Step: How To Install Massa Node Incentivized Testnet Episode 21

Seengo
12 min readApr 8, 2023

--

Learn how to run a node on the Massa network and join to incentivized test net, earn rewards and benefits.

Testnet version TEST.21.0 is live
Genesis has started on March 01, 03:00 PM UTC. The episode will end on March 31, 10:00 PM UTC.

The faucet is already available, registration is open and scoring will start at cycle 202, on March 06, 09:54 AM UTC. The scoring will end at cycle 1190, on March 29, 07:58 PM UTC.

Mass Network

The decentralized and scaled blockchain. Massa is a truly decentralized blockchain controlled by thousands of people. With the breakthrough multithreaded technology, we’re set for mass adoption.

Massa Discord

Massa Website

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Hetzner Datacenter (Sign up And Earn 20$)

Order Your Ledger Wallet (Support me)

Introduction to Massa

In a decentralized crypto-currency network, any node can join the network, fetch from peers and verify the history of executed transactions, create and broadcast new candidate transactions, and execute sets of candidate transactions. In order to achieve a global consensus on the history of transactions, the protocol must regulate the execution of transactions. Decentralized protocols perform a Sybil-resistant selection of nodes that are allowed to execute transactions in a timely manner. Proof-of-Work, used in Bitcoin and other protocols, selects random nodes to create blocks of transactions depending on the nodes’ use of computational power. Proof-of-Stake (e.g. in Tezos) randomly selects block producers based on the amount of coins they hold. Even with a regulated selection of block producers, the latency in peer-to-peer networks can cause different nodes to produce or observe incompatible blocks, requiring protocol defined consensus rules to specify which blocks of transactions should be preferred. In Bitcoin, the Nakamoto rule states that the chain with the most work should be preferred and built upon. However, if too many blocks are produced and the network can’t broadcast them fast enough, the rate of incompatible (stale) blocks can become too high and the consensus can fail.

Part 01: Order And Configure A Cloud Server

You need to rent a cloud server at first , cloud servers have some advantages:

  1. High Availability
  2. High Scalability
  3. Multi Locations
  4. Easy to Config
  5. Cheap

Note: Hetzner datacenter presents hourly payment option.

Minimum Hardware Requirements

CPU: 4vCore, RAM: 8GB, SDD: 80GB, OS: Ubuntu 20.04

1.If you don’t have a account in a server provider, use this link to sign up and earn €⁠20 for new signing up

Hetzner Datacenter

2.Click on continue button

3. In the hetzner website click on sign up button

4. Click on REGISTER NOW button

5. Fill the form and continue

6. Do KYC and enjoy it.

7. Click on <+ New project> and add a name project then in new page, click on Add Server

8. Choose your location, OS and hardware based on minimum requirements then write your server name and click on <create and buy> button

Note: An email will be sent about your server like: IP and Password, check your mail box and use the information to connect to server.

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My YouTube

Part 02: Connect To Your Server

MacOs: To connect via SSH from this operating system, first open the Terminal window. You can find this tool by going to “Application->Utilities->Terminal”.

Windows: you can use many tools like putty and MobaXterm

1.Download one and lunch the application

2.Use information which has been sent to your email address

3.Copy IP and enter in app and click on Open button

4.Click on “Accept” button , Enter your username and password which sent by Hetzner

Note: To paste any command that you have already copied just right-click where you want to paste the command

5.Enter or paste your password again and type new password and retype it again.

Finally you are on server, now you have permission to write or paste commands.

You should paste or type step by step the following commands that I have written.

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Hetzner Datacenter (Sign up And Earn 20$)

Order Your Ledger Wallet (Support me)

Recommendation: I strongly recommend to install the Gaga node next to Massa because it consumes a few hardware and you are able to get the most out of your server.

Part 03: Preparation

1.Update & Upgrade Server

Before you get start, need to update and upgrade server

sudo apt update && apt upgrade -y

2. Install Prerequisties

Copy and paste the command below when terminal asks you, enter Y and press ENTER on your keyboard.

sudo apt install pkg-config curl git build-essential libssl-dev libclang-dev ufw screen

3.Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

When command prompt asks type 1 and press ENTER on your keyboard.

Configure path:

source $HOME/.cargo/env

Check Rust version

rustc --version

4.Install Nightly

rustup toolchain install nightly-2023-01-30

Set it as default:

rustup default nightly-2023-01-30

Check rust version:

rustc --version

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Part04: Install and Run The Node

1.Download The Node

git clone --branch testnet https://github.com/massalabs/massa.git

2.Start The Node

Open a new screen session to run the massa node.

screen -S massa

Move to related directory:

cd massa/massa-node/

Launch the node, on Ubuntu:

RUST_BACKTRACE=full cargo run --release -- -p <PASSWORD> |& tee logs.txt

Replace <PASSWORD> with a password that you will need to keep to restart your node.

#Example
RUST_BACKTRACE=full cargo run --release -- -p Seengo |& tee logs.txt

Wait to end, when command prompt show you like image below then press Ctrl + A and D to detach screen session. The massa node is in compiling process. It may take about 15 mins.

3.Start the client

Open a second screen session to run the Massa node client.

screen -S massa-client

Move to related directory:

cd massa/massa-client/

Lunch the client:

cargo run --release -- -p <PASSWORD>

Replace <PASSWORD> with a password that you will need to keep to restart your client Please wait until the directories are built before moving to the next step.

#Example
cargo run --release -- -p SeengoClient

Wait to end and go to next step.

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Part05: Wallet

If your client is running: Now you can either generate a new keypair (and associated address). Save your wallet information in a notepad file and keep them safe.

1.Create Wallet

wallet_generate_secret_key

2.Keys

Access public key(s) of addresse(s):

wallet_get_public_key <Address1>
#Example
wallet_get_public_key A12uRDBsRb2vDqm1XxjuhR1VGxxxxxxxxxxxxxxxx

Access secret key(s) of addresse(s):

wallet_get_secret_key <Address1>
#Example
wallet_get_secret_key A12uRDBsRb2vDqm1XxjuhR1VGxxxxxxxxxxxxxxxx

The list of addresses of your wallet can be accessed with:

wallet_info

3.Wallet Commands(Optional)

if you already have one from a previous wallet, you can add manually an existing keypair:

wallet_add_secret_keys <SecretKey>

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Hetzner Datacenter (Sign up And Earn 20$)

Order Your Ledger Wallet (Support me)

Part06: Stacking

1.Request Faucet

Go to the discord link then in testnet-faucet channel, enter your wallet address, the bot will send faucet automatically to your address.

Check wallet:

wallet_info

2.Buy Rolls

Buy rolls with it: put your address, the number of rolls you want to buy, and the operation fee (you can put 0). When your rolls become active, that’s it! You’re staking! Please note, having one roll is enough. On the testnet, they don’t value how many rolls you have, but how reliable is your node.

buy_rolls <address> <roll count> <fee>
#Example
buy_rolls A12dr48yZaL2NpQkwsrpsNLGDpndFUCVSdYdSiQh4UfkYRMo17km 1 0

2.Stack

Register your address so that your node start to stake with it:

node_start_staking <your_address>
#Example
node_start_staking A12uRDBsRb2vDqm1XxjuhR1VGxxxxxxxxxxxxxxxx

Now you should wait some time so that your rolls become active: 3 cycles of 128 periods (one period is 32 blocks — 16 sec), so about 1h40 minutes. To check when your address is selected to stake, run this command:

get_addresses <your_address>
#Example
get_addresses A12dr48yZaL2NpQkwsrpsNLGDpndFUCVSdYdSiQh4UfkYRMo17km
wallet_info

Now you have 4 active rolls. Press Ctrl + A and D to detach massa-client session.

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Part07: Routability

1.Config Firewall

Setup the firewall on your computer to allow incoming TCP connections on ports 31244 and 31245.

ufw allow ssh 
ufw allow https
ufw allow http
ufw allow 31244
ufw allow 31245
ufw enable

When command prompt asks, type y and press ENTER on you keyboard.

2. Edit Config File

edit file massa-node/config/config.tomlwith the following contents:

where AAA.BBB.CCC.DDD should be replaced with your public IP address

nano $HOME/massa/massa-node/config/config.toml
# Copy and paste texts below to config.toml file and save it.
[network]
routable_ip = "AAA.BBB.CCC.DDD"
#Example:
[network]
routable_ip = "10.20.30.40"

To save changes, press Ctrl + X then type Y and hit ENTER on your keyboard.

3.Check Connection

Use the link below to check your server ports:

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Hetzner Datacenter (Sign up And Earn 20$)

Order Your Ledger Wallet (Support me)

Part08: Last Step

1.Validate The Node: To validate your participation in the testnet staking reward program, you have to register with your Discord account. Write something in the testnet-rewards-registration channel of massa Discord and their bot will DM you instructions. Copy the information specified in the image. Replace the <your_staking_address> with your wallet address.

Example: node_testnet_rewards_program_ownership_proof A12uRDBsRb2vDqm1XxjuhR1VGXRaK5MipDRUmT9yBC9xxxxxx 1049040158407807026

Open screen session related to the Massa client and copy/paste information into terminal.

screen -r massa-client
node_testnet_rewards_program_ownership_proof A12uRDBsRb2vDqm1XxjuhR1VGXRaK5MipDRUmT9yBC9xxxxxx 1049040158407807026

Copy output in discord bot DM.

Congratulations. Your node connected to your discord account successfully.

2.One More Step: The second step is optional, but is worth half of your score. To help project decentralize the network, you should setup your node to be routable(Part07). Once your node is routable, send to Massa BOT the public IP address of your node .With your IP address (and node ID that Massa BOT already have), they will be able to track when your node is accessible from other nodes!

Thanks for your time. If you need some supports, can join our community also can study other active projects.

My Telegram Group ( Ask Your Questions)

My Telegram Channel (New Articles)

My Youtube

Hetzner Datacenter (Sign up And Earn 20$)

Order Your Ledger Wallet (Support me)

--

--