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
  • Before You Start
  • 1. Enter The JS Console
  • 2. Start Mining
  1. Tutorials & Guides

How To: Mine R5

PreviousHow To: Deploy a NodeNextHow To: GPU Mine R5

Last updated 1 month ago

Difficulty Level: Advanced


In this tutorial we will be mining R5 using the built-in miner and a local node. This tutorial does not cover remote mining and mining pools.

Before You Start

You will need to be running a local node with active mining before starting this tutorial. To learn how to deploy a node, you can read the following How To:

And to activate mining in your node, you can alter the node.ini file to enable mining, add your wallet/account, and define the number of CPU threads to use, for example:

[R5 Node Relayer]
network = mainnet
rpc = default
mode = default
# ---------------------------
# Enable Mining:
miner = true
# Define Wallet/Account
miner_coinbase = 0xABC...
# Define Threads
miner_threads = 0
# ---------------------------
genesis = default
config = default

We recommend setting miner_threads to 0 to avoid potential sync issues immediately after you start your node.

If no wallet is defined on your node.ini file or specified later on the JS Console, all your block rewards will be burned instead of being credited to you.

1. Enter The JS Console

With your node running, you will need to enter the JS Console to start mining. To do that, open a terminal and navigate to your node root folder, and use the following command:

If on Linux/macOS:

sudo ./r5 --jsconsole

if on Windows:

.\r5 --jsconsole

If you have configured a custom IPC path, you will need to use the --bypass command to specify your custom path. For example:

sudo ./r5 --bypass attach custom/path.ipc

If the JS Console is initialised successfully, you should see something similar to the following printed on your terminal:

Welcome to the CLI console for your R5 Node.

Instance: R5 Core
Coinbase: 0xABC...
Block Height: 1340 (Thu Mar 13 2025 17:25:08 GMT+1300 (NZDT))
Datadir: C:\path\to\chaindata
Modules: admin:1.0 debug:1.0 engine:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 r5:1.0 rpc:1.0 txpool:1.0 web3:1.0

To exit, press CTRL+D or type exit.
>

2. Start Mining

On the JS Console, you can use the following command to start mining:

miner.start(1)

Where the number 1 represents the total number of CPU cores you want to dedicate to the mining activity. It is NOT recommended to max-out your CPU core count with mining, as it can cause instability and lead to issues. Always leave at least one free core if your machine is being used solely for mining, or more cores if you also use your machine for other activities.

You can track the mining logs on your main node console, and block rewards should be credited to the wallet you have specified in your node.ini file.

How To: Deploy a Node