Be ready to CPU mine on Digibyte with RandomX and your Rock64 ARM with XMRig
Digibyte wants to bring back CPU mining implementing RandomX lowering more the barrier to mine Digibyte and get started without any kind of “commitment”. Be ready and prepare your ARM device to grab few more $DGB!
In one of the last stories we learned how to install your Rock64 and how to create a DigiByte Full node with a Rock64. Now you’re standing with this brand new node and wondering if you could make it mine some $DGB? Or simply, you just own a Rock64 and are wondering why it wouldn’t mine a bit, yes every coin count! Here is a small step by step guide.
CPU mining are you serious?
Why not? The Rock64 is powered by a Quad-Core ARM Cortex A53 64-Bit Processor, you have this amazing bit of technology just sleeping in this small box next to you. All this asset of silicon you paid good money for without using it… what a shame…
Make it mine !
And it is just so easy to make it mine, you are few commands away, so why not doing it? First just download the right dependencies:
sudo apt install -y build-essential cmake libuv1-dev libmicrohttpd-dev libssl-dev libhwloc-dev automake libtool autoconf
Download the sources
Choose the best place to host your sources. In my opinion your home folder could be the right place. In the next commands, you’ll move into your home folder and simply download the XMRig sources. That will create for you an xmrig folder.
cd ~git clone https://github.com/xmrig/xmrig.git
Remove donation settings before building XMRig
By default a donation to the XMRig’s devel team is set in the donate.h file. As we are CPU mining and won’t receive a lot of coin, you should disable this functionality. Edit the donate.h file located in the src folder to remove donation by simply using nano this way:
To remove automatic donations built into XMRig simply put a 0 at the end of those lines:
constexpr const int kDefaultDonateLevel = 0;constexpr const int kMinimumDonateLevel = 0;
Make a CTRL+X and Y to exit and save the file and you are good to go.
Create the build destination folder and compile 
So we are ready to compile, just follow those commands and wait for each one to complete:
cd ~mkdir xmrig/build && cd./build_deps.sh && cd ../buildsudo cmake .. -DXMRIG_DEPS=scripts/depssudo make -j$(nproc)
Change ownership on the folder you created
chown -R <name_of_your_user> ~/xmrig
Enable HugePage support
is very important thing for almost all supported CPU mineable algorithms. With RandomX, you can earn until 50% increase in CPU mining hash rate by enabling Huge Pages on your device .
Please note 1280 pages means 2560 MB of memory will be reserved for huge pages and become not available for other usage.
You can use this command to make it temporary:
sudo sysctl -w vm.nr_hugepages=1280
If you want to make it permanent:
sudo bash -c "echo vm.nr_hugepages=1280 >> /etc/sysctl.conf"sudo bash -c "echo kernel.shmmax = 2684354560 >> /etc/sysctl.conf"sudo bash -c "echovm.hugetlb_shm_group = 0 >> /etc/sysctl.conf"
If you want to test it to be sure that you’ll be ready when RandomX will be available, you can create a Monero Wallet and test it against a miningpool of your choice or you can also test it with my address to test it if you want :
sudo ./xmrig -a randomx -o stratum+tcp://pool.minexmr.com:4444 -u 42SNM6kfbbD697cBmv67jddCymSyVpq6bK5iVooghJzY1xEfH5eyj9vHeeu5acpQDGLmnjGgJeNewWfTKAd19A1b61PZDnW+25000
Benchmark the perf of your Rock64
This simple command will let you benchmark the CPU mining performance of your Rock64
sudo ./xmrig --bench=1M --submit
It will take few hours to complete and return you a link to xmrig.com wit all your results. If you want to compare yours with mine, here is my link.
Create the config.json file
The config.json file will set your CPU miner for you whenever you launch it. Just create a file called config.json in the same folder of the app xmrig and insert the following lines.
To finish, just save with CMD+X and CMD+Y.
Overclocking the Rock64
Beware this part is for information and testing only, keep in mind that you can break your board depending on what you’re asking it for or if it overheats. Use it with caution and buy a heatsink.
By default your Rock64 has a max CPU frequency set to 1.3GHz max. Check your current CPU frequency with:
cpufreq-info -c 0
No need to reboot, we can slightly bump this settings while mining to 1.51GHz using these commands:
sudo sed -i "s/MAX_SPEED=.*/MAX_SPEED=1512000/" /etc/default/cpufrequtilssudo systemctl restart cpufrequtils
Now the Rock64 can increase itself its CPU frequency up to 1.51GHz if it needs it.
You can directly notice the bump in KH/s (about 15% more hashes)
If you want to try different settings, you can get the list of the accepted frequencies by using this command:
If you like to go back to the previous settings, just use these commands (beware to replace the “ with the right quotation mark
sudo sed -i "s/MAX_SPEED=.*/MAX_SPEED=1296000/" /etc/default/cpufrequtilssudo systemctl restart cpufrequtils
Check the temperature of your Rock64
You can check the CPU temperature with this command:
sudo armbianmonitor -m
I don’t have a big enough heatsink on my CPU and the 1512000 max-speed setting was a bit too much, so I did choose 1392000 setting which my Rock64 seems to appreciate much more.
Graphically monitor your Rock64 with SSH and s-tui
s-tui is a terminal, graphical User Interface for monitoring your computer.It allows monitoring CPU temperature, frequency and utilization. It is developed in Python and also requires minimal resources and it is possible to run it through a SSH connection.
It is pretty straightforward to install, just enter these commands to install and detect the sensors:
sudo apt-get install lm-sensors
Say yes to all questions and carry on with these commands that will install s-tui:
sudo apt-get install python3-pip stress
sudo apt-get install python3-devsudo -H pip3 install — upgrade setuptools
sudo -H pip3 install ez_setup
sudo -H pip3 install s-tui
Now it has been installed, to launch it:
If you want to have all the information, you have to run s-tui with sudo.
XMRig on Ubuntu 18.04
I wanted to show how I build XMRrig mining software from source code on Ubuntu 18.0.4 operating system. I assume that…
30% increase in CPU mining hash rate by enabling Huge Pages
Updated Write-up. I see an increase more than 55% by enabling Huge Pages.
You can use official binary downloads for this OS, with linux-x64 or linux-static-x64 or bionic-x64 (18.04+) or…
RandomX for CPU mining on DigiByte
So I’ve got some *fantastic* news to share today about the future of DigiByte:
Running a Digibyte Full Node on a Pine64 Rock64
Fancy to create the most low-cost 64bit Digibyte Node, Full Node? Here is a small step by step guide.
- The Best Crypto Trading Bot
- Crypto Copy Trading Platforms
- The Best Crypto Tax Software
- Best Crypto Trading Platforms
- Best Crypto Lending Platforms
- Best Blockchain Analysis Tools
- Crypto arbitrage guide: How to make money as a beginner
- Best Crypto Charting Tool
- Ledger vs Trezor
- What are the best books to learn about Bitcoin?
- 3Commas Review
- AAX Exchange Review | Referral Code, Trading Fee, Pros and Cons
- Deribit Review | Options, Fees, APIs and Testnet
- FTX Crypto Exchange Review
- NGRAVE ZERO review
- Bybit Exchange Review
- 3Commas vs Cryptohopper
- The Best Bitcoin Hardware wallet
- Best monero wallet
- ledger nano s vs x
- Bitsgap vs 3Commas vs Quadency
- Ledger Nano S vs Trezor one vs Trezor T vs Ledger Nano X
- BlockFi vs Celsius vs Hodlnaut
- Bitsgap review — A Crypto Trading Bot That Makes Easy Money
- Quadency Review- A Crypto Trading Bot Made For Professionals
- PrimeXBT Review | Leverage Trading, Fee and Covesting
- Ellipal Titan Review
- SecuX Stone Review
- BlockFi Review | Earn up to 8.6% interests on your Crypto