Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 nodeonBinance Smart Chain using the Erigon client.

Content Type

Guided Demo

Assigned To / By

C. J. (Unlicensed)

Key Resource

Node Provider Demo - 10 Feb 2022 (Meeting Recording)

Document Status

Status
colourRed
titleDRAFT

Expand
titleScript Syntax
Code Block
languagebash
:'BINANCE SMART CHAIN
    FULL NODE WITH ERIGON CLIENT
      SETUP INSTRUCTIONS'
      
# February 2022
# C. Wooten

# Enable admin privileges for the user.
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
sudo dpkg --configure -a

# Generate a new SSH key pair for enhanced security.
ssh-keygen -b 4096

# Update existing Linux packages. 
sudo apt update && apt upgrade && apt automremove -y

# Use the 'apt' command to install or remove software.
sudo apt purge golang*    #Removes existing GoLang version.

sudo apt install git && sudo apt install npm && sudo apt install axel


# Uninstall & reinstall GoLang.
go version
sudo apt purge golang*
sudo apt install snapd
sudo snap install go --classic 
sudo tar -C /usr/local -xzf go0.00.00linux-amd64.tar.gz
  # Replace [go0.00.00] with the updated version
  
# Create a new Go directory & set the $PATH location.
mkdir ~/.go
GOROOT=/usr/local/go
GOPATH=~/.go
PATH=$PATH:$GOROOT/bin:$GOPATH/bin

# Update GoLang command & set the location of /bin/go.
sudo update-alternatives --install "/usr/bin/go" "go" "/usr/local/go/bin/go" 0
sudo update-alternatives --set go /usr/local/go/bin/go

# Additional Installations
sudo apt install git && sudo apt install npm && sudo apt install axel 
sudo apt-get install ntp -y && service ntp start && date

# Configure the node specifications. 
sudo apt install mdadm

...

Code Block
languagebash
init 6
:'This command closes the connection and 
    termporarily locks user out of the server.'

...

00 PREREQUISITES

0.1 – System Requirements

...

  1. Enter the following command/s in Terminal to enable / disable SSH on the system:

    Code Block
    languagebash
    sudo systemsetup -setremotelogin on   
      #Enable SSH
      
    sudo systemsetup -setremotelogin off    
      #Disable SSH
      
    Password: [?]   
      #System password

...

01 SETTING UP THE REMOTE SERVER

1.1 – Connecting to the Remote Server

  1. To access the server with SSH, run the following Terminal command/s (replacing the details inside the {brackets} with your provided credentials):

    Code Block
    languagebash
    ssh {user}@{server.ip}username@server-ip-address
      #Server access login
      
    Password: [?]
      #Access password
      
    #Use [CTRL+D] at anytime to suspend the connection. 

...

  1. Install the latest version of GoLang.

    1. Check and remove the existing GoLang version.

      Code Block
      languagebash
      go version  
        #displays the existing version
      sudo apt purge golang*  
        #removes the existing Go version

    2. Use purge to remove the existing version; then, use wget to install the latest version.

      Code Block
      languagebash
      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

    3. Set the environmental variables and $PATH location.

      Code Block
      languagebash
      GOROOT=/usr/local/go
      GOPATH=~/.go
      PATH=$PATH:$GOROOT/bin:$GOPATH/bin

    4. Update the Go command.

      Code Block
      languagebash
      sudo update-alternatives --install "/usr/bin/go" "go" "/usr/local/go/bin/go" 0
      sudo update-alternatives --set go /usr/local/go/bin/go
    5. Confirm Go was updated to the latest version.

      Code Block
      languagebash
      go version

  2. Code Block
    go version

...

02 Install Dependencies

2.1 Viewing and Verifying the Server’s Components

...