Setup

Below you will find the instructions on how to manually setup your Realio Network full node.

1. Build the software

In your terminal, run the following:

# Make sure we are inside the home directory
cd $HOME

# Clone the Realio Network software
git clone https://github.com/realiotech/realio-network.git && cd realio-network

# Checkout the correct tag
git checkout tags/v1.4.0

# Build the software
# If you want to use the default database backend run
make install

If the software is built successfully, the realio-networkd executable will be located inside your $GOBIN path. If you setup your environment variables correctly in the previous step, you should also be able to run it properly. To check this, try running:

realio-networkd version --long

# example output:
...
name: realionetwork
server_name: realio-networkd
version: 1.4.0
commit: adfc8d1bf465a1f2c6f4c248b169cb2ac26571af
go: go version go1.23.6

2. Initialize the Realio Network working directory

Configuration files and chain data will be stored inside the $HOME/.realio-network directory by default. In order to create this folder and all the necessary data we need to initialize a new full node using the realio-network init command.

Starting from v0.15.0, you are now able to provide a custom seed when initializing your node. This will be particularly useful because, in the case that you want to reset your node, you will be able to re-generate the same private node key instead of having to create a new node.

In order to provide a custom seed to your private key, you can do as follows:

  1. Get a new random seed by running:

This will create a new key without adding it to your keystore, and output the underlying seed.

  1. Run the init command using the --recover flag:

You can choose any moniker value you like. It is a public name for the node such as 'world-node-1', and will be saved in the config.toml under the .realio-network/ working directory.

  1. Insert the previously outputted secret recovery phrase (mnemonic phrase):

This will generate the working files in ~/.realio-network

3. Get the genesis file

To connect to an existing network, or start a new one, a genesis file is required. The file contains all the settings telling how the genesis block of the network should look like.

  • If you are setting up a testnet node refer to this procedure

  • If you are setting up a mainnet node refer to this procedure

4. Setup seeds

Next, you'll need to tell your node how to connect with other nodes that are already present on the network. In order to do so, you will use the seeds and persistent_peers values of the ~/.realio-network/config/config.toml file.

A seed node is a node who relays the addresses of other peers which they know of. These nodes constantly crawl the network to try to get more peers. The addresses which the seed node relays get saved into a local address book. Once these are in the address book, you will connect to those addresses directly.

  • If you are looking for testnet seeds please check here: Testnet seeds

  • If you are looking for mainnet seeds please check here: Mainnet seeds

5. State sync

The Realio Network has support for CometBFT's state sync. This feature allows new nodes to sync with the chain extremely fast, by downloading snapshots created by other full nodes. Here below, you can find the links to check for the correct procedure depending on which network you're setting up your node:

  • If you are setting up state-sync for the testnet follow the State sync testnet procedure.

Changing state sync height

If you change the state sync height, you will need to perform these actions before trying to sync again:

  • If you're running a validator node:

    1. Backup the ~/.realio-network/data/priv_validator_state.json;

    2. Run realio-networkd unsafe-reset-all;

    3. Restore the priv_validator_state.json file.

    4. Restart the node.

  • If you're running a full node:

    1. Run realio-networkd unsafe-reset-all;

    2. Restart the node.

6. (Optional) Edit snapshot config

Currently, the snapshot feature is disabled by the default. If it is enabled, your node will periodically create snapshots of the chain state and make them public, allowing other nodes to quickly join the network by syncing the application state at a given height.

If you want to provide other nodes with snapshots, you can do this by editing a couple of things inside your ~/.realio-network/config/app.toml file, under the state-sync section:

Note: Make sure that snapshot-interval is a multiple of pruning-keep-every in the base section

You can find out more about pruning here.

7. Open the proper ports

Now that everything is in place to start the node, the last thing to do is to open up the proper ports.

Your node uses various different ports to interact with the rest of the chain. Particularly, it relies on:

  • port 26656 to listen for incoming connections from other nodes;

  • port 26657 to expose the Tendermint RPC service to clients.

A part from those, it also uses:

  • port 9090 to expose the gRPC service that allows clients to query the chain state;

  • port 1317 to expose the REST APIs service.

  • port 8545 Ethereum JSON-RPC to query Ethereum-formatted transactions and blocks or send Ethereum txs using JSON-RPC

  • port 8546 Ethereum Websocket to subscribe to Ethereum logs and events emitted in smart contracts.

While opening any ports are optional, it is beneficial to the whole network if you open port 26656. This would allow new nodes to connect to you as a peer, making them sync faster and the connections more reliable.

For this reason, we will be opening port 26656 using ufw. By default, ufw is not enabled. In order to enable it please run the following:

A note on the optionality of some of the ports: You do not need to open 8545 for example if you are not exposing the ETH JSON RPC. Our discord channel is a good place to ask about this.

8. Start the Realio Network node

After setting up the binary and opening up ports, you are now finally ready to start your node:

The full node will connect to the peers and start syncing. You can check the status of the node by executing:

You should see an output like the following one:

If you see that the catching_up value is false under the sync_info, it means that you are fully synced. If it is true, it means your node is still syncing. You can get the catching_up value by simply running:

After your node is fully synced, you can consider running your full node as a validator node.

9. (Optional) Configure the background service

To allow your realio network node instance to run in the background as a service you need to execute the following command:

Once you have successfully created the service, you need to enable it. You can do so by running:

After this, you can run it by executing:

Service operations

Check the service status

If you want to see if the service is running properly, you can execute

If everything is running smoothly you should see something like

Check the node logs

If you want to see the current logs of the node, you can do so by running the command:

If you do not see any log output, and the status command above returns no errors, try restarting the journalctl daemon:

Stopping the service

If you wish to stop the service from running, you can do so by running

To check the successful stop, execute systemctl status realio-network. This should return

10. Cosmovisor

In order to do automatic on-chain upgrades we will be using cosmovisor. Please check out Using Cosmovisor for information on how to set this up.

Last updated