Skip to main content
Version: Mainnet

Full Node

Full nodes play a crucial role in the RollApp ecosystem by verifying the Sequencer state transitions. They provide an additional layer of security, accessability, and trust for users and eIBC fulfillers.

Full nodes are also used as a first line of defense for sequencers against attacks, such as denial of service attack, using sentry architecture.

In this section we will go over the steps to setup and run a full node and how to configure it to connect to other nodes using p2p.

Requirements​

note

This guide assumes you've already setup your environment as outlined in the setup environment section.

Hardware Requirements​

  • A Linux or macOS operating system
  • At least 16GB of RAM
  • At least 100GB of free disk space
  • At least Dual CPU cores
  • At least 10 Mbps bandwidth

Initialize RollApp Directory​

In case you haven't already, use the following command to install the necessary binaries, initializes the RollApp configuration files and download the genesis file. You'll be prompted to provide a RollApp ID and select an environment:

note

This assumes the Rollapp you want to operate already exists. If not, you can create one by using the portal.

roller rollapp init

After successful initialization, you’ll see output similar to:

💈 RollApp 'rollapp_12345-1' configuration files have been successfully generated on your local machine. Congratulations!
danger

Make sure to save the generated addresses and mnemonic phrases securely. You'll need to fund these addresses to run the RollApp.

Setup RollApp Full Node​

The following command sets up the RollApp node. In our example, we'll be choosing to the full-node mode once prompted.

roller rollapp setup

Start The Full Node​

To start the RollApp full-node and data availability light node in the foreground, use the following command:

roller da-light-client start
roller rollapp start

After running this command, you will see an output similar to:

INFO  retrieving sequencer instance
💈 The data availability light node is running on your local machine!
💈 Light node endpoint: http://localhost:26658
💈 Log file path: ~/.roller/da-light-node/light_client.log
INFO retrieving sequencer instance
💈 The RollApp full-node is running on your local machine!
💈 RollApp ID: rollapp_12345-1
💈 Endpoints:
💈 EVM RPC: http://0.0.0.0:8545
💈 Node RPC: http://0.0.0.0:26657
💈 Rest API: http://0.0.0.0:1317
💈 Log file path: ~/.roller/rollapp/rollapp.log
💈 RollApp root dir: ~/.roller/rollapp
💈 PID: <Process ID>

P2P​

Get Node ID​

once you have started a full node, whether it be for sentry or rpc purposes, you need to configure it to connect to other nodes using p2p in order to get get real-time updates on the RollApp state.

First, lets get the node id of the node. Will later use this to add the node as a p2p peer:

roller rollapp status

You should see an output similar to:

💈 Node ID: <node-id>

Sentry Nodes​

Once you've obtained the node id of the sentry nodes, you should update your sequencer metadata to include the sentry nodes as p2p peers.

note

By default the p2p port is configured to 26656 so you should only expose this port on the relevant nodes. In case of sentry nodes, it's recommended to filter incoming traffic to the sequencer based on the sentry node's ip.

  1. Export the sequencer metadata:
roller rollapp sequencer metadata export
  1. Open the exported file and update the p2p_seeds field in the metadata to include the sentry nodes in the following way:
{
//...
"p2p_seeds": [
"/ip4/<public-ip-of-sentry-node-1>/tcp/26656/p2p/<node-id-of-sentry-node-1>",
"/ip4/<public-ip-of-sentry-node-2>/tcp/26656/p2p/<node-id-of-sentry-node-2>"
]
//...
}
  1. Update the sequencer metadata onchain:
roller rollapp sequencer metadata update

RPC Nodes​

Once you've setup the sentry nodes, every full node which will join the network will automatically connect to the sentry nodes.