Make Prerequisites

Note: Please contact the Nubit team to get access to the codebase.


The following prerequisites are essential for running a validator, a bridge node, and a full/light node.

Setup Environment

Upgrade and Install Dependencies

Ensure your system and tools are up-to-date and equipped with essential development utilities including compilers (clang), network utilities (curl, wget, aria2), archive tools (tar), and essential build tools (make, build-essential).

sudo apt update && sudo apt upgrade -y
sudo apt install -y make curl tar wget jq aria2 clang pkg-config libssl-dev jq build-essential

Install Golang

This project requires Go version 1.22.1 or higher. Install Go by following the instructions on the official Go installation guide. Begin by installing the essential tools required for compiling and building binaries:

sudo apt install build-essential

Set up Python Environment

Prepare the Python environment for managing AWS services and SSH communications. To maintain a clean and conflict-free environment, it's recommended to use a Python virtual environment. You can create one by installing virtualenv (pip install --user virtualenv), then setting it up with python3 -m virtualenv ~/myenv and activating it using source ~/myenv/bin/activate.

wget <https://bootstrap.pypa.io/get-pip.py>
sudo python3 get-pip.py
pip install pyopenssl --upgrade
pip install boto3 paramiko
# Consider using a virtual environment
pip install --user virtualenv
python3 -m virtualenv ~/myenv
source ~/myenv/bin/activate

Setup SSH for Our Private Repos

Note: This step is temporary for the Nubit DA Alpha Testnet phase and can be skipped afterward.

Tell Nubit Team Your GitHub Account

Contact the Nubit team and provide the email associated with your GitHub account. We will grant your GitHub account access to specific private repositories.

Please send your email and contact information to developers@riema.xyz to get in touch with the Nubit Team for accessing Nubit DA Alpha Testnet Chain Nodes. The email should include your contact details, a brief introduction of your team, and contact person information.

Generate New SSH Keys

Note: Replace your_email@example.com with the email you provided to Nubit in the previous step, which is your GitHub email with repository access.

RiemaLabs Key: Generate an SSH key dedicated to RiemaLabs using the following command:

ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/riema_id_ed25519

General GitHub Key: If you haven't already generated an SSH key pair for GitHub, create one using:

ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/id_ed25519

Add SSH Keys to GitHub:

Add RiemaLabs Public Key: Copy the content of ~/.ssh/riema_id_ed25519.pub and ~/.ssh/id_ed25519.pub:

cat ~/.ssh/riema_id_ed25519.pub
cat ~/.ssh/id_ed25519.pub

Add this two public keys to your GitHub account at GitHub SSH keys settings.

Configure SSH and Git:

Set up SSH Configuration: Edit or create the ~/.ssh/config file to use specific keys for RiemaLabs and other repositories:

nano ~/.ssh/config

Add the following lines to the config file:

Host riema.github.com
  HostName github.com
  AddKeysToAgent yes
  IgnoreUnknown UseKeychain
  UseKeychain yes
  IdentityFile ~/.ssh/riema_id_ed25519

Host github.com
  AddKeysToAgent yes
  IgnoreUnknown UseKeychain
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

Redirect Git HTTPS URLs to SSH for RiemaLabs:

git config --global url."git@riema.github.com:RiemaLabs".insteadOf https://github.com/RiemaLabs

Secure Your SSH Configuration:

Set appropriate permissions for your SSH keys and configuration files to secure your connection:

chmod 600 ~/.ssh/riema_id_ed25519
chmod 644 ~/.ssh/riema_id_ed25519.pub
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/config

Add SSH Keys to SSH Agent:

Start the SSH agent:

eval "$(ssh-agent -s)"

Add your keys to the SSH agent:

ssh-add ~/.ssh/riema_id_ed25519
ssh-add ~/.ssh/id_ed25519

Bypass Go's Checksum Verification:

To avoid issues with private repositories lacking records in Go's official SUMDB, set the GOPRIVATE environment variable:

export GOPRIVATE=github.com/RiemaLabs

Add this command to your shell profile file (e.g., ~/.bash_profile) to apply it to all sessions:

echo 'export GOPRIVATE=github.com/RiemaLabs' >> ~/.bash_profile

Apply the changes immediately (if in an active session):

source ~/.bash_profile

By following these steps, you will have securely set up and configured access to RiemaLabs' private repositories using SSH. Make sure each step is completed accurately to maintain a secure and efficient workflow. Should you encounter any issues or require further assistance, contact our support team for help.

Basic Configuration

Create and switch to the nubit-da directory in your home directory, setting up a designated workspace.

mkdir -p $HOME/nubit-da/ && cd $HOME/nubit-da

Last updated