A guide on mining the RandomX coin DragonX, a HUSH Smart Chain.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
5.8 KiB

2 years ago
# How To Mine DragonX
2 years ago
2 years ago
A guide to mining the RandomX coin DragonX, a HUSH Smart Chain.
![DragonX](img/graphic_hero_dragonx.png)
- [Windows Bins](https://git.hush.is/dragonx/dragonx/releases)
2 years ago
## Video Tutorials
- [Youtube](https://www.youtube.com/playlist?list=PLDCG8PEy-OEXBDPW_mtdDwdhBouxa_cff)
- [Peertube](https://videos.hush.is/w/p/gWt7V3xZZXFG5Dhjo1VkeF)
- [Odysee](https://odysee.com/@hush:17?view=content)
<br>
<br>
<br>
2 years ago
# Install HUSH
2 years ago
Look at [this guide](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md) if you <u>have not</u> already installed HUSH on the machine you intend to mine on.
2 years ago
###### *`Note:` If running <u>Windows</u> head over to the [releases page](https://git.hush.is/hush/hush3/releases) and download the latest Windows version. I would recommend installing [Windows Terminal](https://github.com/microsoft/terminal) to make it easier to access and execute commands with windows powershell*
###### *`Note:` If running on a Virtual Machine make sure the VM network settings are set to `Bridged Connection`.*
2 years ago
2 years ago
# Linux - HUSH Smart Chain (HSC) Setup
2 years ago
After installing HUSH open a terminal in `~/hush3/src`
###### *`Note:` installation path may be different depending on if installed as `root` or `normal` user, look for the `hush3` directory in either the `root` or `home` directory.*
2 years ago
### Start the HSC
2 years ago
Input the following command in your terminal:
```
./hush-smart-chain -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=176.126.87.241 &
2 years ago
```
###### *`Note:` Make sure to input any parts with "-ac" in this command <u>exactly</u>, otherwise your node may not be able to connect!*
2 years ago
2 years ago
### Enable Mining
2 years ago
once the HSC is running all that is left to do is enable mining with this command:
```
./hush-cli -ac_name=DRAGONX setgenerate true $(nproc) &
```
###### *`Note:` you can specify number of threads to mine with by changing `nproc` to the number of threads you want*
###### EX: `./hush-cli -ac_name=DRAGONX setgenerate true 2 &`
2 years ago
### Verify Mining
2 years ago
To make sure you are actually connected to the network and mining input the following command:
```
./hush-cli -ac_name=DRAGONX getinfo | grep connections
```
2 years ago
- If it returns `"connection": 1` you are connected and mining.
<br>
<br>
<br>
# Install HUSH
Look at [this guide](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md) if you <u>have not</u> already installed HUSH on the machine you intend to mine on.
###### *`Note:` If running <u>Windows</u> head over to the [releases page](https://git.hush.is/hush/hush3/releases) and download the latest Windows version. I would recommend installing [Windows Terminal](https://github.com/microsoft/terminal) to make it easier to access and execute commands with windows powershell*
###### *`Note:` If running on a Virtual Machine make sure the VM network settings are set to `Bridged Connection`.*
2 years ago
# Windows - HUSH Smart Chain (HSC) Setup
After downloading the latest build of HUSH, unzip then navigate to the hush folder (ex: hush-3.9.2-win). Right click, `Open in Terminal` or type `powershell` in the address bar of windows explorer if windows terminal is not installed.
### Start the HSC
Input the following command in your terminal:
```
./hush-smart-chain -ac_name="DRAGONX" -ac_algo="randomx" -ac_halving="3500000" -ac_reward="300000000" -ac_blocktime="36" -ac_private="1" -addnode="176.126.87.241"
2 years ago
```
###### *`Note:` Make sure to input any parts with "-ac" in this command <u>exactly</u>, otherwise your node may not be able to connect!*
2 years ago
### Enable Mining
once the HSC is running all that is left to do is enable mining with this command, open another instance of terminal or powershell:
```
./hush-cli -ac_name="DRAGONX" setgenerate true $(1)
2 years ago
```
###### *`Note:` you can specify number of threads to mine with by changing `$(1)` to the number of threads you want*
2 years ago
### Verify Mining
To make sure you are actually connected to the network and mining input the following command:
```
./hush-cli -ac_name="DRAGONX" getinfo
2 years ago
```
- If it returns `"connection": 1` you are connected and mining.
<br>
<br>
<br>
# Shield and send newly mined DRGX
Check if you have balance to spend:
```
./hush-cli -ac_name=DRAGONX getbalance
```
Create a new zaddr:
```
./hush-cli -ac_name=DRAGONX z_getnewaddress
```
<b>SAVE YOUR PRIVATE KEY!!!</b>
```
/hush-cli -ac_name=DRAGONX z_exportkey "zs1..."
```
Transfer all mined coins to a private zaddr address we just created:
- With a second command it is possible to increase the number of utxos to shield to 180 (50 is default).
- The third call will attempt to shield the maximum number of coins for a given zaddr per transaction.
```
./hush-cli -ac_name=DRAGONX z_shieldcoinbase "*" "zs1..."
```
```
./hush-cli -ac_name=DRAGONX z_shieldcoinbase "*" "zs1..." 0.0001 180
./hush-cli -ac_name=DRAGONX z_shieldcoinbase "*" "zs1..." 0.0001 0
```
To send coins use the following call: (FROM address TO address)
```
./hush-cli -ac_name=DRAGONX z_sendmany "zs1..." '[{"address": "zs1...", "amount": 69.69}]'
```
On Windows use:
```
./hush-cli -ac_name="DRAGONX" z_sendmany "zs1..." '[{\"address\": \"zs1...\", \"amount\": 69.69}]'
```
# Useful RPC commands
All RPC commands for Hush can be used the same way for any HSC. The total list:
* [RPC commands](https://faq.hush.is/rpc/coinsupply.html)
# How to build SDX on GNU/Linux (Full node GUI wallet)
Install Qt5:
```
sudo apt-get -y install qt5-default qt5-qmake libqt5websockets5-dev qtcreator
```
Git clone and choose the dragonx branch:
```
git clone https://git.hush.is/hush/SilentDragon && cd SilentDragon
git checkout dragonx
```
Make a symlink to your dragonxd binary (scary stuff 👻).<br>
Your `dragonx-branch` path will differ, change it where you have your dragonxd!
```
ln -s ../dragonx-branch/src/dragonxd
```
Run build scripts:
```
./build-sdx.sh linguist
./build-sdx.sh
```
Start SDX:
```
./silentdragonx
```