Running Initia Node

Overview

Operating an Initia node demands significant server resources and is primarily necessary for specific tasks, such as developing dApps or functioning as validators.

Prerequisites

Hardware/OS Requirements

The minimum hardware requirements for running an Initia node are:

It is recommended to use Linux OS to run Initia nodes. Running Initia node has not been tested on other OS environments, and same environment settings and running conditions cannot be guaranteed.

Running Initia Node

Install Initia

Installing Initia can be done in 2 different ways.

  1. Downloading the source and directly building Initia. (Go to Building Initia)

  2. Using prebuilt binaries (Go to Using Prebuilt Initia)

Building Initia

Step 1: Build essential package

To build Initia, essential utilities must be installed. These utilities are provided on Linux distribution, and package components for Ubuntu can be found in the following link:

sudo apt install -y build-essential

Step 2: Install Golang

golang v1.22 or above is required. Refer to the link to find out how to install Golang and use the command below to check the version.

make --version # 3.8 or later
go version # 1.22 or later

Step 3: Clone and Build Initia

Clone and build the Initia source code repo.

# please execute following commands to access private repos
# $ gh auth login
# or
# $ git config --global url."https://x-access-token:{personal-access-token}@github.com/".insteadOf "https://github.com/"
# $ export GOPRIVATE="github.com/initia-labs/movevm,github.com/initia-labs/OPinit"

git clone git@github.com:initia-labs/initia.git
cd initia
git checkout $TAG # Tag the desired version
make install

Use the command below to check if the installation is successful.

If initiad is not found, run go env and check if $GOBIN or $GOPATH/bin directories are included in $PATH.

initiad version

Using Prebuilt Initia

You can download pre-built binaries for each of Testnet or Mainnet(TBA) from the network repository. Download the compression file for your OS.

Below is an example of bash command line.

export CHAINID="initiation-1"
export VERSION="v0.2.12"
export OS="ubuntu"
export ARCH="x86_64"

wget https://initia.s3.ap-southeast-1.amazonaws.com/${CHAINID}/initia_${VERSION}_${OS}_${ARCH}.tar.gz
tar -xzf ${CHAINID}/initia_${VERSION}_${OS}_${ARCH}.tar.gz && rm ${CHAINID}/initia_${VERSION}_${OS}_${ARCH}.tar.gz
mv initiad /usr/bin
mv libmovmvm.${ARCH}.so /usr/lib
mv libcompiler.${ARCH}.so /usr/lib

initiad version # Confirm that the correct version is installed
ldd `which initiad`  # Confirm that libinitia.x86_64.so is correctly linked

Oracle Requirements

Running an Initia node requires you to run an oracle sidecar as well. Please refer to this section for further instructions.

Set Up Environment

On Linux, the number of files that can be opened in a single process can be set on configuration. Many Linux distributions limit the number to 1024, which is smaller than the number of files opened by Initia. To use Initia, this configuration has to be modified.

The current value can be checked with ulimit -n command, and root /etc/security/limits.conf file can be modified to change this parameter. By adding the below to limits.conf the maximum for all accounts can be increased to 65535. To only modify the number for the account running Initia, enter the account name instead of *.

*                soft    nofile          65535
*                hard    nofile          65535

Last updated

Logo

© 2024 Initia Foundation, All rights reserved.