Mining NXS with NexusMiner: Difference between revisions

From Nexus Wiki
Jump to navigation Jump to search
Nhelman64 (talk | contribs)
New page with instructions for how to mine Nexus
 
Nhelman64 (talk | contribs)
m Corrected Note
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Mining NXS with NexusMiner: Step-by-Step Guide =
= Mining NXS with NexusMiner: Step-by-Step Guide =
version 9


Welcome to the NexusMiner documentation! This guide will help you get started mining Nexus (NXS) using NexusMiner on supported hardware (FPGA, GPU, CPU).   
Welcome to the NexusMiner documentation! This guide will help you get started mining Nexus (NXS) using NexusMiner on supported hardware (FPGA, GPU, CPU).   
Line 15: Line 16:
'''Linux/Other Users:'''
'''Linux/Other Users:'''
* Clone the repository:
* Clone the repository:
<syntaxhighlight lang="bash">
<pre>
git clone https://github.com/Nexusoft/NexusMiner.git
git clone https://github.com/Nexusoft/NexusMiner.git
cd NexusMiner
cd NexusMiner
</syntaxhighlight>
</pre>
* Build using CMake (see section 6).
* Build using CMake (see section 6).


Line 28: Line 29:


; Pool Mining on the Hash Channel (Mainnet Only)
; Pool Mining on the Hash Channel (Mainnet Only)
<syntaxhighlight lang="json">
<pre>
{
{
     "version" : 1,
     "version" : 1,
Line 48: Line 49:
     ]
     ]
}
}
</syntaxhighlight>
</pre>


; Solo Mining on the Prime or Hash Channel (Mainnet)
; Solo Mining on the Prime or Hash Channel (Mainnet)
<syntaxhighlight lang="json">
<pre">
{
{
     "version" : 1,
     "version" : 1,
Line 66: Line 67:
     ]
     ]
}
}
</syntaxhighlight>
</pre>


; Solo Mining on the Prime or Hash Channel (Testnet)
; Solo Mining on the Prime or Hash Channel (Testnet)
<syntaxhighlight lang="json">
<pre>
{
{
     "version" : 1,
     "version" : 1,
Line 84: Line 85:
     ]
     ]
}
}
</syntaxhighlight>
</pre>
{{Note|'''Do NOT use the <code>pool</code> section on testnet. Testnet mining is solo-only; pool mining is not supported or useful.'''<br/>'''CPU mining is no longer competitive on the main Nexus blockchain and is only recommended for private blockchains or testnets. For mainnet, use GPUs (or FPGAs) for best results.'''}}
'''Note: Do NOT use the <code>pool</code> section on testnet. Testnet mining is solo-only; pool mining is not supported or useful.'''<br/>'''CPU mining is no longer competitive on the main Nexus blockchain and is only recommended for private blockchains or testnets. For mainnet, use GPUs (or FPGAs) for best results.'''


* '''wallet_ip''': For solo mining, use <code>127.0.0.1</code> (or your core’s IP); for pool mining (mainnet), set to the pool address.
* '''wallet_ip''': For solo mining, use <code>127.0.0.1</code> (or your core’s IP); for pool mining (mainnet), set to the pool address.
Line 98: Line 99:
To enable detailed logging and statistics, add the following to your <code>miner.conf</code>:
To enable detailed logging and statistics, add the following to your <code>miner.conf</code>:


<syntaxhighlight lang="json">
<pre>
"logfile" : "miner.log",
"logfile" : "miner.log",
"log_level" : 2,
"log_level" : 2,
Line 114: Line 115:
     }
     }
],
],
</syntaxhighlight>
<pre>


----
----
Line 124: Line 125:
* Unlock your wallet for mining.
* Unlock your wallet for mining.
* Edit <code>nexus.conf</code> to enable mining:
* Edit <code>nexus.conf</code> to enable mining:
<syntaxhighlight lang="ini">
<pre>
mining=1
mining=1
</syntaxhighlight>
</pre>
* If mining '''locally (same machine)''': nothing else is required.
* If mining '''locally (same machine)''': nothing else is required.
* If mining '''over LAN''': add to <code>nexus.conf</code>:
* If mining '''over LAN''': add to <code>nexus.conf</code>:
<syntaxhighlight lang="ini">
<pre>
llpallowip=&lt;miner_ip&gt;:&lt;port&gt;
llpallowip=&lt;miner_ip&gt;:&lt;port&gt;
</syntaxhighlight>
</pre>
** On '''mainnet''', the default port is <code>9325</code>.
** On '''mainnet''', the default port is <code>9325</code>.
** On '''testnet''', the default port is <code>8325</code>.
** On '''testnet''', the default port is <code>8325</code>.
Line 148: Line 149:
'''Windows:'''
'''Windows:'''
* Double-click <code>NexusMiner.exe</code> or run from the command line:
* Double-click <code>NexusMiner.exe</code> or run from the command line:
<syntaxhighlight lang="bash">
<pre>
NexusMiner.exe
NexusMiner.exe
</syntaxhighlight>
</pre>


'''Linux:'''
'''Linux:'''
* After building, run:
* After building, run:
<syntaxhighlight lang="bash">
<pre>
./NexusMiner
./NexusMiner
</syntaxhighlight>
</syntaxhighlight>
Line 174: Line 175:


Example configuration for logging:
Example configuration for logging:
<syntaxhighlight lang="json">
<pre>
"logfile" : "miner.log",
"logfile" : "miner.log",
"log_level" : 2,
"log_level" : 2,
Line 190: Line 191:
     }
     }
]
]
</syntaxhighlight>
</pre>


----
----
Line 199: Line 200:
* Requires CMake, C++ compiler, and optionally CUDA Toolkit (for Nvidia GPUs).
* Requires CMake, C++ compiler, and optionally CUDA Toolkit (for Nvidia GPUs).
* From the repo directory:
* From the repo directory:
<syntaxhighlight lang="bash">
<pre>
mkdir build
mkdir build
cd build
cd build
cmake .. -DWITH_GPU_CUDA=ON  # Enable Nvidia GPU mining
cmake .. -DWITH_GPU_CUDA=ON  # Enable Nvidia GPU mining
make
make
</syntaxhighlight>
</pre>
* See repository README for more advanced build options and FPGA instructions.
* See repository README for more advanced build options and FPGA instructions.



Latest revision as of 11:02, 2 September 2025

Mining NXS with NexusMiner: Step-by-Step Guide

version 9

Welcome to the NexusMiner documentation! This guide will help you get started mining Nexus (NXS) using NexusMiner on supported hardware (FPGA, GPU, CPU). Note: The Prime pool is no longer maintained. You can still mine solo on the PRIME channel, or use the pool for HASH channel mining (mainnet only).


1. Downloading NexusMiner

Windows Users:

  • Visit the NexusMiner Releases page.
  • Download the latest NexusMiner.exe and the default miner.conf.
  • No build is required; you can run the executable directly.

Linux/Other Users:

  • Clone the repository:
git clone https://github.com/Nexusoft/NexusMiner.git
cd NexusMiner
  • Build using CMake (see section 6).

2. Setting Up miner.conf

Edit miner.conf (provided in releases or repo root) for your setup. Below are minimal examples:

Pool Mining on the Hash Channel (Mainnet Only)
{
    "version" : 1,
    "wallet_ip" : "hashpool.nexus.io",
    "port" : 50000,
    "mining_mode" : "HASH",
    "pool" : {
        "username" : "YOUR_NXS_ADDRESS",
        "display_name" : "YOUR_DISPLAY_NAME",
        "use_deprecated" : false
    },
    "workers" : [
        {
            "worker" : {
                "id" : "myWorker0",
                "mode" : { "hardware" : "gpu", "device": 0 }
            }
        }
    ]
}
Solo Mining on the Prime or Hash Channel (Mainnet)

<pre"> {

   "version" : 1,
   "wallet_ip" : "127.0.0.1",
   "port" : 9325,
   "mining_mode" : "PRIME", // or "HASH"
   "workers" : [
       {
           "worker" : {
               "id" : "myWorker0",
               "mode" : { "hardware" : "gpu", "device": 0 }
           }
       }
   ]

}

Solo Mining on the Prime or Hash Channel (Testnet)
{
    "version" : 1,
    "wallet_ip" : "127.0.0.1",
    "port" : 8325,
    "mining_mode" : "PRIME", // or "HASH"
    "workers" : [
        {
            "worker" : {
                "id" : "myWorker0",
                "mode" : { "hardware" : "gpu", "device": 0 }
            }
        }
    ]
}

Note: Do NOT use the pool section on testnet. Testnet mining is solo-only; pool mining is not supported or useful.
CPU mining is no longer competitive on the main Nexus blockchain and is only recommended for private blockchains or testnets. For mainnet, use GPUs (or FPGAs) for best results.

  • wallet_ip: For solo mining, use 127.0.0.1 (or your core’s IP); for pool mining (mainnet), set to the pool address.
  • port:
    • Use 9325 for solo mining on mainnet.
    • Use 8325 for solo mining on testnet.
    • Use 50000 for hashpool (mainnet only).
  • username: Enter your Nexus wallet address to receive mining rewards (pool/mainnet only).
  • workers: Configure for your hardware.

Example: Enabling Logging To enable detailed logging and statistics, add the following to your miner.conf:

"logfile" : "miner.log",
"log_level" : 2,
"stats_printers" : [
    {
        "stats_printer" : {
            "mode" : "console"
        }
    },
    {
        "stats_printer" : {
            "mode" : "file",
            "filename" : "stats.log"
        }
    }
],
<pre>

----

== 3. Setting Up Your Nexus Wallet or Headless Core ==

=== For '''Solo Mining (Prime or Hash Channel):''' ===
* Use Nexus Core version 5.1.5 or later.
* Unlock your wallet for mining.
* Edit <code>nexus.conf</code> to enable mining:
<pre>
mining=1
  • If mining locally (same machine): nothing else is required.
  • If mining over LAN: add to nexus.conf:
llpallowip=<miner_ip>:<port>
    • On mainnet, the default port is 9325.
    • On testnet, the default port is 8325.

Example: llpallowip=192.168.0.100:9325

  • Ensure the port in miner.conf matches the port your wallet/core is listening on.

For Pool Mining (Hash Channel, Mainnet Only):

  • No special changes are required to your wallet or nexus.conf.
  • Just ensure the username field in miner.conf is set to your Nexus wallet address.

4. Running NexusMiner

Windows:

  • Double-click NexusMiner.exe or run from the command line:
NexusMiner.exe

Linux:

  • After building, run:
./NexusMiner
</syntaxhighlight>

'''Command-line Options:'''
* Specify a config: <code>./NexusMiner my_miner.conf</code>
* Check config only: <code>./NexusMiner my_miner.conf -c</code>
* Show version: <code>./NexusMiner -v</code>

----

== 5. Monitoring and Logging ==

* Logs are written to <code>miner.log</code> (path and level set in <code>miner.conf</code> via <code>"logfile"</code> and <code>"log_level"</code>).
* Additional statistics can be printed to console or files as configured under <code>stats_printers</code>.
* '''Important:'''  
  '''Every time you run NexusMiner, it will overwrite the contents of both <code>miner.log</code> and any file specified for statistics logging (such as <code>stats.log</code>).'''  
  If you want to preserve logs from previous runs, be sure to copy or rename them before starting the miner again.

Example configuration for logging:
<pre>
"logfile" : "miner.log",
"log_level" : 2,
"stats_printers" : [
    {
        "stats_printer" : {
            "mode" : "console"
        }
    },
    {
        "stats_printer" : {
            "mode" : "file",
            "filename" : "stats.log"
        }
    }
]

6. Building NexusMiner (Linux/Advanced Users)

Build options are available if you want to compile from source:

  • Requires CMake, C++ compiler, and optionally CUDA Toolkit (for Nvidia GPUs).
  • From the repo directory:
mkdir build
cd build
cmake .. -DWITH_GPU_CUDA=ON   # Enable Nvidia GPU mining
make
  • See repository README for more advanced build options and FPGA instructions.

7. Additional Resources


Troubleshooting

  • Ensure your wallet address is correct in miner.conf.
  • For solo mining, make sure your wallet/core is running, unlocked, and accessible with the correct port and IP.
  • Refer to logs (miner.log) for error messages.

Happy Mining!