R5 Relayer
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 JS Console .
The built-in R5 Console.
The provided SSL proxy service.
The provided CLI Wallet.
Supported Flags
It supports the following flags (A-Z):
--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=1Configuration 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--networkflag.rpc:true,false, ordefaultto enable/disable the RPC service.miner:true,false, ordefaultto enable/disable mining.miner.coinbase: Your miner wallet address. Will be ignored ifmineris disabled.miner.threads: Number of CPU threads to use for mining. Will be ignored ifmineris 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 = defaultIf you do not have a node.ini when you start your node for the first time, the relayer will automatically create one for you.
Last updated