Modifying XMRig to support DigiByte development

Josiah Spackman
6 min readNov 4, 2020

Today I want to talk a bit about the upcoming RandomX / ProgPoW implementations and gauge a bit of interest from people.

So first a little bit of background here:

DigiByte originally started off as Scrypt-only mining. In 2014, this was able to be mined on a GPU, and although there were a few FPGA bitstreams, they were mostly kept to themselves. This means that for most people they would mine DigiByte on their home graphics card.

DigiByte then upgraded the network and became MultiAlgo. This is different from the likes of Ravencoins older X16R etc in that all 5x algorithms consistently attempted to find each block, competing with each other. While a small but subtle difference, it is incredibly powerful and what provides a ton of security for the DigiByte network.

When DigiByte first changed to MultiAlgo, we used the following algorithms:

  • SHA256 : Bitcoins algo, mined on ASICs
  • Scrypt : Litecoins algo, mined on ASICs
  • Myriad-Groestl: One of Myriadcoins algos, mined on GPUs (Mostly AMD)
  • Skein: Mined on GPUs (Mostly nVidia)
  • Qubit: Mined on CPUs

Over time they all ended up being able to be mined on high-end ASIC hardware, pushing out GPUs / CPUs.

For example, in 2017 you could mine on a GTX1060 graphics card, and bring in around $3 of DigiByte per-DAY. That same hashrate would now net approx 18c a MONTH, while costing you around $12 in power (Meanwhile the value of DigiByte is up significantly allowing for more hashrate to be paid). This is due to the higher efficiency of ASICs.

Now, in 2019 we swapped out Myriad-Groestl for an FPGA-focused algorithm: Odocrypt, which is has worked out quite well, but I genuinely believe that having a GPU-focused algorithm, and a CPU-focused algorithm, is one of the best ways that we can increase the decentralization and distribution of DigiByte and the DigiByte asset itself. The community response have been overwhelmingly supportive of this too, basically unanimous in all my discussions I’ve seen around replacing another two of the algorithms.

As such, ProgPoW is looking to be brought in for graphics card mining, and RandomX to focus on CPU mining on your PC / Laptop.

There’s a few important parts that I wanted to discuss though now we have a little history:

There should never be any consensus-level enforced donation requirement

There had been discussions floating around about what that might look like similar to what Bitcoin Cash were proposing with a mandatory “X must receive Y amount from each block”.

I am vehemently opposed to this for a number of reasons, namely:

a) It creates horrible centralization / gatekeeper scenarios

b) It becomes a honeypot

c) You run into issues around “How do you decide who / what gets paid” (See: ZCash and their Windows app issues)

d) You inadvertently get people being paid, for nothing

Plus a few other smaller reasons not really worth going into, but I think most people will agree that it’s not in the ethos of DigiByte and shouldn’t be something we really pursue. However, it’s always good to have discussions around it.

Staking is still not on the table

Despite it being a possibility one day, there’s still a bunch of “unknowns” around it.

It’s something that’s not been ruled out forever, but is more of a “not now” scenario.

As we’re pursuing greater decentralization, GPU / CPU mining is definitely a better way of doing this, more-so than staking, as staking rewards those who “already have”, or have gone out and bought it already, rather than those who are starting with nothing. There’s also little incentive to sell whatever you have, which admittedly is good for preventing that short-term downward price pressure that miners bring out of the need to pay their power bill, but that’s not really a sufficiently “good” reason for implementation of it.

However, a lot of people believe that one day closer to 2035 when the last DigiByte are being mined that staking will be a good option, so who knows what we will see in half a decade or a decades time.

Mobile mining is still something a LOT of people want to see in the near future

It’s something that RandomX should allow for as well, mining DigiByte on your cellphone. The idea being that you go to sleep at night, and as it’s charging it’ll bring in a small amount of DigiByte. It’ll never be millions of dollars, but even if it’s a few DigiByte here and there, over time it’ll all add up!

It’s a great way for developing nations to also get involved and participate in the ecosystem, without requiring large purchases, traditional banking, or KYC process.

However at this point in time I don’t believe there are any RandomX-specific mobile miners available. It needs to be developed.

Which is what I wanted to gauge interest on today: How much interest is there in this, and how do we want to raise funds for it?

You see we’ve raised funds for ProgPoW + RandomX implementation amongst other things in the past, and they’re under way at present, but I’d like to try something a little different this time: Mining funding it.

Now I know this sounds a little contrary to what I discussed just previously, but stay with me on this.

RandomX is being implemented in such a way that it’s directly compatible with all the existing mining software out there, namely XMRig as the most popular, however it’s not limited to just that, as there are alternatives such as NanoMiner, SRBMiner-Multi, RagerX to name a few.

RagerX is a full blown RandomX minining operating system with a companion app you can use to keep track of your miner

However looking at XMRig as an example, it defaults to a 1% “miner fee” that goes to the developer of the software, where 1 minute out of 100, it will switch to their Monero pool, mine, and switch back.

Other software out there has up to a 3.5% fee, doing a similar sort of thing. This all goes to the creator of the software, although on the open-source ones you can modify it and remove that fee, most people leave it there simply to:

1/ Support the developer

2/ Thank them for the precompiled binaries and the ease-of-use that results from having it ready-to-go

What I’m looking to gauge is the interest instead of having that 1% on XMRig fee going to a DigiByte-specific address that we can use to support the development of the likes of a 1-click miner for PC, or a mobile-miner, instead of going to the XMRig / Monero pool.

Naturally too we’d make a donation to the XMRig developers to support them as well though.

Compiling XMRig, just coz I like watching the pretty lines scroll past…

This of course is completely 100% optional, and people can still use the default XMRig which sends hashrate to Monero, or they can custom compile it themselves even to completely remove that fee altogether.

However, the more people that mine with that naturally the faster we’d amass some funds that could be used for DigiByte development of a mobile-miner etc

Again though I want to reiterate: This is not enforced anywhere on the consensus level, and would be completely voluntary.

In fact, miners don’t even have to use XMRig at all. In fact, they could use other software, due to the way that we’re implementing RandomX: So that it’s compatible and users have choice over the software they run and they aren’t locked in to anything.

But, it’s an idea, and something I wanted to float out there and gauge interest.

So, would you do it?

Would you mine with a version of XMRig that had the additional options stripped out of it (For mining non-RandomX algorithms), that had DigiByte settings prepopulated, and that would have that 1% go towards supporting DigiByte instead of Monero? Supporting something that would make your life easier while also improving DigiByte?

Or do you think that’s a a misguided idea?

Keen for feedback, keen to gauge peoples thoughts around it, or any other such ways we could tackle this. Hit me up on Twitter, YouTube, or in the responses here on Medium.



Josiah Spackman

I write interesting things about cryptocurrency, especially DigiByte