Building Orakuru node from source

Guide on how to download Orakuru node sources and build it

Requirements

Before you start building your node, you need to:

  • Prepare your configuration the same way as you would in install guide.

  • Install Go 1.16+ toolchain by following this guide.

  • Have Git, GCC, G++, Linux headers (only for Linux) installed on your server.

Step 1: Download Orakuru node sources

We use GitHub to store our code, as such, you can use this command to download latest sources:

$ git clone https://github.com/orakurudata/crystal-ball
$ cd crystal-ball

This will download sources into crystal-ball directory. You can build latest sources, but we recommend building latest stable tag. You can see the latest tag here. v0.2.6 is the latest tag at the moment of writing:

$ git checkout v0.2.6

Step 2: Build and install crystal-ball binary

Building Orakuru node itself is a matter of running two commands:

$ go get ./...
$ go install ./cmd/crystal-ball

After that, you'll have crystal-ball binary installed in $GOPATH/go/bin directory. As long as that directory was added to your $PATH, you'll be able to start it by just typing crystal-ball.

Step 3: Starting the node

Make sure to set correct environment variables according to this document and you have a configuration directory ready. We suggest using trace log level in case you encounter a bug. Afterwards, starting the node is a matter of executing

$ crystal-ball

As with Binance Smart Chain node, running crystal-ball this way will stop it when you end your session. In order to prevent this from happening you should use tmux, screen, or your initialization system of choice (systemd, openrc, etc.)

Beware that by default, node will try to search for configuration in etc/ directory. This might not be the desired behavior. If your configuration is placed in a different directory, make sure to modify CB_CONFIG_DIR accordingly.

Last updated