R5 Network
WebsiteR5 LabsGitHub
  • Getting Started
    • Hello & Welcome!
  • About R5
    • Overview
    • R5 Components
    • Consensus Mechanism
    • zkNet (Privacy)
  • R5 Coin
  • R5 Tokenomics
  • Tutorials & Guides
    • Connect & Use R5
      • R5 Desktop Wallet
      • MetaMask
      • Rabby Wallet
      • Coinbase Wallet
    • zkNet Web Wallet
    • R5 Desktop Wallet
      • Interface Overview
      • Send a Transaction
      • Receive a Transaction
      • Backup Your Wallet
      • Retrieve Your Private Key
    • How To: Deploy a Node
    • How To: Mine R5
    • How To: GPU Mine R5
    • How To: Build R5 From Source
    • How To: Connect Local Nodes
  • For Developers
    • R5 SDK
      • R5 Relayer
      • R5 Console
      • JS Console
      • CLI Wallet
      • SCdev
      • SSL Proxy
    • Hardware Requirements
    • R5 Testnet
    • R5 Devnet
    • Local Networks
    • JSON-RPC API
      • admin
      • debug
      • ethash
      • miner
      • net
      • r5 (eth)
      • rpc
      • txpool
      • web3
    • Indexer API
    • zkNet API
    • Node Configuration
    • Ethash-R5
    • Smart Contracts
    • Wrapped R5 (Native)
    • Tokens & NFTs
  • Bug Bounty Program
  • Resources
    • Website
    • R5 Labs
    • R5 Labs GitHub
Powered by GitBook
On this page
  • Overview
  • Supported Flags
  • Configuration File "node.ini"
  1. For Developers
  2. R5 SDK

R5 Relayer

PreviousR5 SDKNextR5 Console

Last updated 1 month ago

Overview

The R5 Relayer is the main entry-point to R5 nodes. It works as a hub that connects the main node binary with the SDK tools we have developed around it.

You will find the R5 Relayer binary inside your root folder, named r5 if you're on macOS or Linux, or r5.exe if you are using Windows.

The relayer repackages and consolidates the old Geth flagging structure to allow for easier, quicker, and more consistent node deployments across multiple devices. It is very configurable, and can be used for setting up and interacting with:

  • New node instances for the mainnet, testnet, devnet, or local networks, including miner and RPC nodes.

  • The built-in .

  • The built-in .

  • The provided service.

  • The provided .

Supported Flags

It supports the following flags (A-Z):

Flag
Parameters
Information

--bypass

Used to bypass commands directly to your node binary for advanced configuration. Use with caution! This flag must be used alone.

--cliwallet

Starts the CLI Wallet. This flag must be used alone.

-h or --help

Prints the list of supported flags and parameters. This flag must be used alone.

--jsconsole

Starts the JS Console. This flag must be used alone.

--miner

coinbase threads

Starts the node with mining enabled. If you don't set a custom coinbase it will burn the mining rewards by default, and if you want active mining directly on the node's CPU, you need to set threads > 0. Disabled by default.

--network

mainnet testnet devnet local

Defines the network you want to connect your node to. Local networks use ChainId 33712 by default. Defaults to mainnet .

--mode

archive full light

Defines the type of node to start. Defaults to full.

--proxy

gencert

Starts the SSL Proxy server. Note that it requires a running node to work. By default, it forwards incoming requests on port 443 to port 8545. You can use the gencert flag to generate self-signed certificates. This flag must be used alone.

--r5console

Starts the built-in R5 Console. This flag must be used alone.

--rpc

Enables the node's RPC service. It enables the http, ws, and graphql services, and opens the web3, eth, r5, and net API endpoints by default. http requests are served on port 8545. For production environments, it is recommended to be used alongside the SSL Proxy provided. Disabled by default.

Usage example for starting a mainnet RPC archive node with active mining enabled:

./r5 --network mainnet --rpc --node archive --miner coinbase=0xABC... threads=1

Configuration File "node.ini"

For faster and more consistent deployment, you can pre-configure a node.ini file and place it in the same folder where you have your R5 Relayer binary to use it as a preset for starting new nodes. The settings are limited to node deployment settings, and can't be used to trigger the auxiliary tools, such as the cliwallet or proxy. Note that any flags provided on initialisation will override the node.inifile configuration.

You can use default as a value in any of the fields to use the default parameters of the R5 binaries you're running.

In the node.ini you can set the following parameters:

  • network: You can use the parameters available for the --network flag.

  • rpc: true, false, or default to enable/disable the RPC service.

  • miner: true, false, or default to enable/disable mining.

  • miner.coinbase: Your miner wallet address. Will be ignored if miner is disabled.

  • miner.threads: Number of CPU threads to use for mining. Will be ignored if miner is disabled.

  • genesis: Sets a path for a custom genesis file.

  • config: Sets a path for a custom node configuration file.

An example of how you can structure your node.ini file:

[R5 Node Relayer]
network = mainnet
rpc = true
mode = default
miner = true
miner.coinbase = 0xABC...
miner.threads = 1
genesis = default
config = default

If you do not have a node.ini when you start your node for the first time, the relayer will automatically create one for you.

JS Console
R5 Console
SSL proxy
CLI Wallet