RandomX for CPU mining on DigiByte

Josiah Spackman
5 min readOct 18, 2020

--

So I’ve got some *fantastic* news to share today about the future of DigiByte:

I’ve been contacted by somebody with an offer for them to complete the RandomX implementation on DigiByte 🥰

They’ve already begun work and are part-way through, however in order to speed up the process they’ve basically offered to take some time away from their day-job and to work full-time on RandomX for DigiByte to get it “over the line”.

RandomX mining (Screenshot for Monero, direct compatibility with DGB RPC being worked on)

This will be a perfect compliment to ProgPoW which I’ve spoken with Kristy-Leigh about (And she’s been working on just this weekend past), and will really help further distribute and contribute greatly to the decentralization of the actual “DigiByte” asset itself!

So here’s what we’ve got on the table at the moment:

  • RandomX implementation, based on DigiByte 8.19.0 branch (which is currently in development)
  • A reset of the Testnet and clean upgrade to test and confirm RandomX compatibility
  • Confirmation of Regtest compatibility (Important for Exchanges / Pools for rapid implementation)
  • Compatibility with existing RandomX miners (Such as XMRig) such that they won’t need any modifications to “play nice” with DigiByte RandomX
    - This is especially important given RandomX was written for Monero, with Monero RPC calls etc and is not immediately compatible with DigiByte and Bitcoin-forked codebases
  • Optimization of RandomX for current generation CPU’s (Ryzen 3XXX series etc)
  • An attempt at confirmation of compatibility with ARM-based mobile-mining

All of this is brilliant and absolutely needed for taking DigiByte to the next level, both in terms of security as well as distribution of the asset, and mining decentralization.

Where to next?

We’re already part-way there with the codebase for RandomX. I want to take up a “collection” to help get this over the line.

If we were to raise ~200,000 DigiByte for this (Currently approx USD$4,500), we could probably get this committed and into the codebase by the end of November.

From there, we’re still going to naturally have to get consensus from the network, but there is a very strong “business case” as it were for RandomX implementation, as there are a great deal of benefits to RandomX for DigiByte.

This will only be provided to the developer once the code is committed and testing has completed through Testnet.

RandomX dev wallet

Or if you prefer to copy / paste: D9YMkGbBEvJHatjrHQXdpGjJsMCby19X1c

To get things started, I’ll be putting in the first 5,000 DigiByte, so we’re 2.5% of the way there already.

What about ProgPoW though?

It’s still underway!

Having just spoken with Kristy-Leigh about it, she’s been working more on it again just this last weekend past. It’s definitely taking some time to bring ProgPoW in to compatibility with DigiByte, rather than the Ethereum codebase it was originally designed for, as she’s been doing it in her spare time in between other unfortunate health complications. It’s still underway though, and the funds raised there will be provided to her when completed.

ProgPoW will hopefully be completed soon enough to include in the 8.19 upgrade alongside RandomX, and potentially even Schnorr signatures! As with all open-source development though, we make no concrete ETAs and it’ll be ready when it’s ready 😊

So, this will be compatible with existing software?

That’s the goal!

We’re very much aware that Monero is not at all like DigiByte and the RPC calls / compatibility is almost nonexistent, so there will be a “middleware” layer for pool owners to be able to run that will allow the interface between the likes of existing software and their pool software, so that they don’t need to fluff about too much to get it going.

This should encourage faster adoption from pools and allow quicker / broader access than we had with the likes of Odocrypt. It means that people don’t have to download a specific “DigiByte-only” version of any mining software for their home rig, so if they want to jump over from Monero, they can do-so without any issues, further lowering the barrier-to-entry to DigiByte mining

Is DigiByte mobile-mining with RandomX possible?

It should be! However that isn’t specifically covered under this immediately.

As we’ve seen CryptoNight mining on Android and other ARM-based devices. Interestingly enough the hashes per-watt can be “comparable enough” that it’s worthwhile still doing which is pretty cool.

This means that in a lot of places you could leave your mobile phone charging and mining for you at night, bringing in a small amount of DigiByte. It won’t bring in the big-bucks, but it should more than offset the power consumption (based on current mining estimations) and allow people an easy and KYC-free way to obtain newly minted DigiByte.

Is this code available anywhere else to help speed up the implementation process?

Unfortunately not, this would be a first to my knowledge!

It would also mean that other projects that are based on the Bitcoin Core protocols could also implement RandomX a lot easier too with this “middleware” that’s then available, so in the true spirit of open-source it would open the doors elsewhere for projects to borrow from DigiByte as they have with DigiShield, MultiShield, Odocrypt and more.

If this funding goes ahead, when will this RandomX upgrade be released?

Provided we can quickly get the funds together (Yes, I’m aware, COVID-19 sucks…) we’ll be taking offers of public assistance on testnet this side of Christmas hopefully.

The plan is for this development to be full-time, rather than “spare time”, as a key focus for getting it implemented.

This also means we should be able to get things going on testnet sooner rather than later.

What about blockchain consensus?

Still same as always: You want this, then the miners etc have to signal by upgrading.

There’s naturally ways around it which involve a user-activated hardfork, however going down our previous “non contentious” upgrade path is definitely the best way.

This will mean we need 70% of a 40320 block period.

We’ll do the testnet upgrade, and then once it’s ready, publish the new DigiByte Core wallet, and then it becomes time for miners to upgrade if they believe in RandomX!

However, once we’ve got the code confirmed working on testnet, we’ll send through the payment then, as the blockchain consensus is a totally separate kettle of fish.

Let’s get to it then!

At the end of the day, DigiByte as an open-source protocol can only grow as the community grows.

It’s going to take your support and assistance to make that happen, to upgrade your own node, and to reach out to exchanges / pools (when the time is right and the upgrade is ready). For that support, I am most grateful, and together we can do this!

--

--

Josiah Spackman
Josiah Spackman

Written by Josiah Spackman

I write interesting things about cryptocurrency, especially DigiByte

No responses yet