[Node] Run your BERACHAIN node

ZQWR...GH6r
25 Mar 2024
30

Berachain is a high-performance EVM-compatible blockchain built on Proof-of-Liquidity consensus. Proof-of-Liquidity is a novel consensus mechanism that aims to align network incentives, creating a strong synergy between Berachain validators and the ecosystem of projects. Berachain’s technology is built on Polaris, a high-performance blockchain framework for building EVM-compatible chains on top of the CometBFT consensus engine. You can find additional info here.
Berachain is currently in the testnet phase. Bera Node is a fork of Polaris with added upgrades. This guide allows you to set up a node locally until the proper genesis file becomes publicly available. Feel free to join our Discord for future updates.
Welcome to Node Science! Here, you will learn and understand how to easily set up your node, without any prior technical knowledge.
Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

I) VPS configuration

To run a node you’ll need a VPS (Virtual Private Server) and one of the most reliable and cheapest solutions is Contabo. It’s a cost-effective German VPS solution built in 2003, known for its robust performance and reliability, catering to a wide range of computing needs and budgets.
A Berachain node requires the following minimum prerequisites :

OS: linux
CPU Architecture: amd64 or arm64
CPU: 4 cores
RAM: 16GB
Storage: 500GB

You can thus choose the CLOUD VPS 2 by clicking here. Note that you can opt for a more powerful server (VPS 3 or 4) to run multiple different nodes on it more economically.
Don’t forget to choose a password.
Once payment is complete, you’ll receive an e-mail with your IP address entitled “Your login data!”. To connect to your VPS and securely run your node, you must download and install the Putty software, which enables a secure connection.
Type your IP address and Open.

II) Node deployment

Ensure you copy each command line using (Ctrl+C), and then paste it into your terminal by right-clicking your mouse. Execute them sequentially, pressing Enter after each, if required.
Start by refreshing the local package index with the latest changes made in the repositories.

apt-get update && sudo apt-get upgrade -y

Install the Git, Make, Screen, and JQ packages.

apt-get install git make screen jq -y

Download the Go programming language version 1.21.4 binary for Linux on AMD64 architectures.

wget https://golang.org/dl/go1.21.4.linux-amd64.tar.gz

Unpacks the Go 1.21.4 binary archive into the /usr/local directory.

tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz

Adds the Go binary directory to your system’s PATH environment variable, making Go commands globally accessible.

export PATH=$PATH:/usr/local/go/bin

Displays the current version of Go installed on your system, to make sure it’s properly installed.

go version

Download and execute a script from Foundry Paradigm.

curl -L https://foundry.paradigm.xyz | bash

Reloads the .bashrc configuration file for the root user's shell session, applying any changes made to the file.

source /root/.bashrc

Install Foundry to the latest version.

foundryup

Change the current directory to your home directory.

cd $HOME

Creates a local copy of the Polaris repository from BeraChain’s GitHub.

git clone https://github.com/berachain/polaris

Changes the current directory to the ‘polaris’ directory.

cd polaris

Switch the current directory to the ‘main’ branch in Git repository.

git checkout main

Executes the start target defined in Makefile of the current directory, to launch the node.

make start

After starting, your terminal will display newly generated wallets associated with your node, and your node ID. Don’t forget to save them !!! You can then stop your node by typing CTRL+C and launching a screen session with:

screen -S bera

Then relaunch your node and do not forget to answer nwhen they ask if you want to generate a new wallet.

make start

Congrats !
Congratulations, you’ve just deployed your first node on the Berachain! Simply press CTRL+A+D to detach from the screen session; your node will keep running.
You can now monitor your node by typing:

screen -r bera


Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to afrar7150

0 Comments