How To Setup A Massa Blockchain Node Testnet VPS

Requirements

You need a home server with the ability to NAT ports to the internet to earn full rewards or a VPS.
Specs: 4 CPU Cores, 8 GB Memory

I found a VPS at ServaRICA for $10/mo or $110/year that matches this

I choose Ubuntu 20.04 as the Operating System

Update Server and Download Needed Packages

ssh root@hostname or use sudo in front of commands

apt update
apt -y upgrade
apt install pkg-config curl git build-essential libssl-dev libclang-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustc --version
rustup toolchain install nightly
rustup default nightly
rustc --version
git clone --branch testnet https://github.com/massalabs/massa.git

Run Massa Server

In a one window start the massa-node

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

Note: <PASSWORD> can be anything, you just need to use the same password in the next step to connect the client.

Run Massa Client

In another window start the client

cd massa/massa-client/
cargo run --release -- -p <PASSWORD>
wallet_generate_secret_key
wallet_info
Join Massa Discord

https://discord.com/invite/massa

You need your Discord ID (Right click on your username in any channel and click “Copy ID”)
In channel #testnet-rewards-registration
Do an action and MassaBot will message you.

Run this in the Massa Client

node_testnet_rewards_program_ownership_proof <wallet address> <discord id>

Example> node_testnet_rewards_program_ownership_proof A13o48Ckk1bgFB3PC1qRd4hNQp41QDdVnfLnM2zwjYgDGCV58VtB 1040815747750258107

Reply to MassaBot with the output

Now go to #testnet-faucet and enter your staking wallet address, same address as above
The bot will reply with a Rocket emoji and send you 110 MASSA
Note: You can get MASSA from the faucet once per day but staking more rolls on the testnet doesn’t earn you more rewards.

See your 110 MASSA in the wallet

wallet_info

Stake Massa Roll

https://docs.massa.net/en/latest/testnet/staking.html

Now we want to stake 100 MASSA into a roll (1 Roll = 100 MASSA)

buy_rolls <wallet address> <roll count> <fee>

Example> buy_rolls VkUQ5MA4niNBhAEP7uVf89tvPfUHcbgy6BrdLM9SAuFSyy9DE 1 0

Make Node Routable

https://docs.massa.net/en/latest/testnet/routability.html

In the server window stop the server

kill `ps ax | grep massa-node | grep -v grep | awk -F" " '{print $1}'`

Create new file massa-node/config/config.toml

[network]
routable_ip = "AAA.BBB.CCC.DDD"

Restart the Massa Server Node

RUST_BACKTRACE=full cargo run --release -- -p <PASSWORD> &

Message MassaBot the Public IP in Discord

Other Links

Previous Post: Decentralized VPN – How To Setup Mysterium VPN

September 8, 2022 - In Tools

Next Post: Consensys Is Tracking You With MetaMask – Change Your RPC URL

November 25, 2022 - In HowTo