Bundlr Validator Node

Bundlr makes web3 data storage on Arweave accessible on multiple networks and currently accounts for over 90% of data uploaded to Arweave.

It’s a Proof-of-Stake network that sits on top of Arweave. Approximately every 30 minutes, 10 validators are randomly chosen to run the network. Nodes (known as bundlers) are used to bundle multiple layer 2 transactions into a single Arweave (layer 1) transaction.

RUN A BUNDLR VALIDATOR - TESTNET (JUL 2022)

Bundlr Testnet is now live. You must use a domain or static IP, dynamic IPs will cause your validator to become undiscoverable. This guide is assuming a fresh install of Ubuntu 20.04 LTS.

Hardware Specs:

  • Memory: 8 GB RAM

  • CPU: Quad-Core

  • Disk: 250 GB SSD Storage

  • Bandwidth: 1 Gbps for Download/100 Mbps for Upload

1. Install Pre-requisite Software

Update and install the following packages which are required to continue

sudo apt update && sudo apt upgrade -y
sudo apt install curl ncdu htop git wget build-essential libssl-dev gcc make libssl-dev pkg-config npm -y

Install Docker

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Grant Permissions for docker and confirm it is installed

sudo usermod -aG docker $USER
docker --version

Install Docker Compose

docker-compose is a way of saving the docker run command in a file, so that you can just start/stop/modify it easily. Going to be using this for this guide.

sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 
sudo chmod +x /usr/local/bin/docker-compose 
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Check version and installation success with

docker-compose --version

Install Rust

Install Rust, the following installs cargo a package manager for Rust and rustc the compiler for Rust.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
run what your terminal tells you when it completes
run what your terminal tells you when it completes

restart your terminal/ current shell and confirm its installed successfully by running the following commands

Install NVM (node version manager)

NVM or Node version manager, is an open source manager for node.js and makes it easy to switch between versions of node and NPM, both of which are required for Bundlr.

Install NVM on Ubuntu

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 
source ~/.bashrc   

Use NVM to install Node

nvm install node 

Install a specific version of node and use that version

nvm install 16.18.0
nvm use 16.18.0

2. Download Repository and Set-up

Clone the validator repository

git clone --recurse-submodules https://github.com/Bundlr-Network/validator-rust.git

Create Arweave Wallet

You can generate a new one here, ensure you save the Seed and json file, Now create a file to save your Arweave wallet in the project root at ./wallet.json.

sudo nano ./wallet.json

open your .json file you created from the arweave wallet using notepad, copy the entire contents to the terminal, save/write out with ‘ctrl+O’ then exit with ‘ctrl+X’

confirm its there, you should see your wallet.json after using this command to list files

ls -la

Copy Wallet to /validator-rust/ directory also

sudo cp ./wallet.json /home/$USER/validator-rust

make sure its the correct location (might be different from /home/ubuntu/, you can use ‘ls -la’ to find and also confirm its there once done.

Environment Variables

change directory

cd validator-rust

you should have a example.env file in your /validator-rust/ copy the example.env file

sudo cp example.env .env

open the file to edit

sudo nano .env

Replace the contents of the Example file in the terminal with the following

PORT=80
VALIDATOR_KEY=./wallet.json
GW_WALLET=./wallet.json
BUNDLER_URL="https://testnet1.bundlr.network/"
GW_CONTRACT="RkinCLBlY4L5GZFv8gCFcrygTyd5Xm91CzKlR6qxhKA"
GW_ARWEAVE="https://arweave.testnet1.bundlr.network/"

This is from the docs, Database_URL can be ignored, the 1st validator Contract for this Testnet is the following:RkinCLBlY4L5GZFv8gCFcrygTyd5Xm91CzKlR6qxhKAbe sure to check the pinned messages on Discord, for any updates on this

3. Build and Run the Validator

change to the correct directory

cd validator-rust

once in the Directory run to start docker file, -d to detach and run in the background

sudo docker compose up -d

this should start 3 docker containers, if successful we can confirm by running, which shows all running containers

docker ps -a
Check the Logs of all three, to confirm no errors
Check the Logs of all three, to confirm no errors
docker logs -f <container-name>

if you need to go back to make any changes such as checking your .env file or wallet.json file is correct (usually to culprit of errors) you need to stop and remove all three running containers

docker stop <container-name> && docker rm <container-name>

Now we should have the validator running in the background, we can move on the registering and staking the validator

4. Register Validator and Stake

Install Testnet CLI

sudo npm i -g @bundlr-network/testnet-cli@latest

Claim Tokens from the Faucet

You can claim Testnet tokens here, you will need a valid twitter account and the Arweave wallet address created earlier.

check balance

npx @bundlr-network/testnet-cli@latest balance <YOUR-WALLET-ADDRESS>
should see something like this, press y to confirm, it may take a while to output your token balance
should see something like this, press y to confirm, it may take a while to output your token balance

Register Validator and Stake

to join the Testnet run the following

npx @bundlr-network/testnet-cli@latest join <validator-contract> -w <path-to-wallet> -u <validator-url> -s <stake-tokens>

1st validator Contract (in pinned messages on discord): RkinCLBlY4L5GZFv8gCFcrygTyd5Xm91CzKlR6qxhKA

Path to wallet: ./wallet.json

Validator URL: http://<your-static-IP-address-here>:80

Stake Tokens (amount claimed from Faucet): 25000000000000. -s <stake-tokens> this can be omitted and the CLI will default to the minimum required stake in atomic units

When successful it should say ‘done’ and this can take up to 20-30mins.

4. Other Commands

Check Validator balance

npx @bundlr-network/testnet-cli@latest balance <address>

Check validator is active

npx @bundlr-network/testnet-cli@latest check <validator contract address> <your address>
press y to proceed and it should return the result like so
press y to proceed and it should return the result like so

5. Additional Info

Troubleshooting

PWD not set error

If you get the following error on starting the node

This is a path error, that some have encountered, it will result in some files not being found

Can be fixed by editing the docker-compose.yml

cd validator-rust
nano docker-compose.yml

Everywhere you see source: ${PWD}/, replace with your path, in my case /home/glc/validator-rust/. Like so

Upgrade validator (latest release)

to upgrade to latest software version run the following from the validator-rust directory

update the repository

git pull origin master

Build

sudo docker compose build

Run again, check logs using the command from part .3

sudo docker compose up -d

Validator Migration

should you wish to transfer your validator to another server use the following steps

Backup Files

the only thing you need to back up is the wallet.json for your Arweave wallet

Set up new device

follow steps 1-2 on new device, At STEP 3: shut down the Validator on old Device

Un-stake validator

npx @bundlr-network/testnet-cli@latest leave <validator contract> -w path/to/wallet.json

This can take a while to complete, to confirm you should see the balance return to your wallet

npx @bundlr-network/testnet-cli@latest balance <address>

Re-register validator with new IP

Follow Steps 3-4 to complete.

Subscribe to GLCstaked
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.