Binance Smart Chain Full-Node Deployment with Erigon – From Source | |
---|---|
Description | A tutorial demonstrating the process of connecting to a remote server running Linux Ubuntu, setting up and running a full node on Binance Smart Chain using the Erigon client. |
Content Type | Guided Demo |
Assigned To / By | |
Key Resource | |
Document Status |
|
|
init 6 :'This command closes the connection and termporarily locks user out of the server.' |
Specification | Minimum Requirement | Used for Demo |
---|---|---|
Hardware | Linux / Mac / Windows system running the latest OS version | MacBook Pro running MacOS Monterey 12.2 |
SSD / NVMe Storage | ≥ 2 TB | 7.68 TB |
RAM | ≥ 16 GB | 256 GB |
Server OS | Linux OS (64-bit) | Ubuntu Server 20.04.3 |
Network Settings |
|
Linux, Mac, or Windows computer running the latest operating system (OS) version.
(For Demo: MacBook Pro + MacOS Monterey 12.2)
Terminal Emulator / SSH Client
Mac: Terminal || Windows: PuTTy || Linux: Ubuntu Server
Login credentials for the server being accessed.
To access the server remotely, the user must enable Secure Shell (SSH) on their home system.
Enter the following command/s in Terminal to enable / disable SSH on the system:
sudo systemsetup -setremotelogin on #Enable SSH sudo systemsetup -setremotelogin off #Disable SSH Password: [?] #System password |
To access the server with SSH, run the following Terminal command/s (replacing the details inside the {brackets} with your provided credentials):
ssh {user}@{server.ip} #Server access login Password: [?] #Access password #Use [CTRL+D] at anytime to suspend the connection. |
Once you’re connected to the server with SSH, follow the steps below to setup and install the dependencies required for your node.
Update the Ubuntu System and upgrade the OS components.
sudo apt update && apt upgrade && autoremove -y |
Install the latest version of GoLang.
Check and remove the existing GoLang version.
go version #displays the existing version sudo apt purge golang* #removes the existing Go version |
Use purge to remove the existing version; then, use wget to install the latest version.
sudo apt purge golang* #Removes the existing Go version. wget https://go.dev/dl/go1.17.7.linux-amd64.tar.gz #Installs the current version (go1.17.7 as of 2022-02-14). sudo tar -C /usr/local -xzf go1.11.4.linux-amd64.tar.gz #Extracts Go in the /usr/local folder mkdir ~/.go |
Set the environmental variables and $PATH location.
GOROOT=/usr/local/go GOPATH=~/.go PATH=$PATH:$GOROOT/bin:$GOPATH/bin |
Update the Go command.
sudo update-alternatives --install "/usr/bin/go" "go" "/usr/local/go/bin/go" 0 sudo update-alternatives --set go /usr/local/go/bin/go |
Confirm Go was updated to the latest version.
go version |
go version |
2.1 Viewing and Verifying the Server’s Components
Run the List Block command to view drives and partitions installed on the server.
lsblk |
$ sudo apt-get update
$ sudo apt dist-upgrade -y
$ sudo apt autoremove -y
$ sudo apt install git
$ sudo apt install npm
What is Erigon? [Gnosis :: Medium]
How to Run a Fullnode on Binance Smart Chain [Binance Chain Docs]
How to Run a BSC Node on Erigon [Ankr Docs]
The following demonstration will exhibit the step-by-step processes of:
Logging into the system
Username & password login by default
Secure user credentials with a Public SSH Key.
Option A → Run ssh-keygen command:
ssh-keygen -t rsa |
Option B → ls -al .ssh
fdafdasd
ssh-keygen -t rsa |
Get Erigon
Run Erigon + Setup as a service so it will run again after rebooting
Change the hostname of the server
Make an exception for SSH, then turn on the firewall.
Open Erigon port 30303 through the firewall to allow incoming connections to the node (allows for a trustless, distributed system).
Setup DNS so it can be accessed with a domain name.