Build Linux binary from source and become a Sentry Node Operator
Instructions to install the oraid binary and run as a service by systemd
Preresquites
Operating System
This tutorial assumes that your node is running Ubuntu LTS version (i.e: 18.04, 20.04 or 22.04). It does not work with Ubuntu 16.04 or older versions.
Go version (required)
The Golang version should be from 1.18 and above If you have not installed it yet, you can refer to this document.
Make sure that $GOPATH
is in your $PATH
. It's the crucial part of this tutorial.
Make (required)
If your node does not have Make, install using: sudo apt update && sudo apt install make
Gcc (required)
You need to install Gcc to build the binary. Type: sudo apt update && sudo apt install gcc
Build the binary from source
Please define the $ORAI_HOME
environment variable which will be used as the working directory, in this tutorial we will assume that your $ORAI_HOME
is root
. If you don't define it, all of the following installations will be using your $HOME
folder as $ORAI_HOME
, please replace $ORAI_HOME
with $HOME
in the corresponding commands (except export ORAI_HOME command).
Make sure your user has enough permissions to write data to the $ORAI_HOME
folder.
The <version-tag>
will need to be set to either a testnet or the latest mainnet version tag.
The current mainnet version tag will be v0.42.4
- i.e:
Next, you should be able to build the binary file using the below command:
After running the above commands, your oraid
binary can be found in $GOPATH/bin
. To confirm that the installation is succeeded, you can run (please make sure that $GOPATH/bin
is in your $PATH
):
The current binary version for Linux users is v0.42.4
Libwasmvm version: oraid query wasm libwasmvm-version
, which should give: 1.5.2
Initialize Orai Node
Use oraid to initialize your node (replace the NODE_NAME with a name of your choosing):
Download and place the genesis file in the orai config folder:
Finally, your working directory should be like below:
2 directories, 7 files
Set Up Cosmovisor
(You may also refer to the Cosmovisor installation instructions.) Set up cosmovisor to ensure any future upgrades happen flawlessly. To install Cosmovisor:
Create the required directories, and Copy the current oraid binary into the cosmovisor/genesis folder:
Set the environment variables
To check your work, ensure the version of cosmovisor and oraid are the same:
Finally, your working directory should be like below:
7 directories, 8 files
Download Chain Data
Download liblz4-tool to handle the compressed file, then Download & Decompress the snapshot:
We provide a snapshot file every hour, available at https://snapshot.orai.io/. Please change [SNAPSHOT_URL] to the link provided.
Edit config
Update seed address
Some seeds address from Oraichain validators group:
Set Up Orai Service
Set up a service to allow cosmovisor to run in the background as well as restart automatically if it runs into any problems:
Move this new file to the systemd directory:
Reload and start the service:
Check the status of the service:
To see live logs of the service:
Check your node status
If the catching_up status is false, your node finishes syncing process. Finally, you can delete the snapshot file and backup your config folder. The snapshot file may be outdated; you can reach out to our community for it.
Please join the Oraichain validators group on Telegram to discuss ideas and problems!
Last updated