Considerations regarding RandomX

⚓ Neptune    📅 2024-01-23    👤 aszepieniec    👁️ 629      



This post was published 122 days ago. The infomation described in this article may have changed.

In another thread, danda suggested using RandomX, the proof-of-work hash function used by Monero:

strong ASIC resistance, in the form of randomX POW algo. again, from Monero. Or possibly equivalent dynamic programs running in triton-vm would be even cooler (tritonX?). This should also help prevent 51% attacks by existing ASIC or GPU capacity, something common to lower market-cap coins.

One of the main selling points for RandomX is its ASIC-resistance. Bitmain offers RandomX mining devices. Some speculate that these devices are ASICs, but others speculate that they are really just clusters of CPUs. Either way: an interesting development. 1

Up until now the design for proof-of-work in Neptune is as follows:

  • Mining consists of two steps.
  • In the first step you produce a TritonVM STARK proof of the correctness of the previous block.
  • In the second step you guess a nonce, which is a field in the header, such that the block’s Tip5 hash digest is less than a target threshold.
  • Mining pools should be feasible in which the operator produces the proof of the first step and in which the subscribers contribute hashing power of the second step. By subscribing to a mining pool, users of low-end devices can make every last joule of energy count.

We are not necessarily revising that architecture. I just want to have all the arguments articulated and laid out. Or even arguments and idle thoughts that are neither pro nor con but supply useful context. Feel free to contribute.

ASIC-resistance democratizes mining. By “democratize” I mean make accessible to a wide range of people. This benefits the project because it puts coins into the hands of individuals who don’t necessarily (a) have a mining rig or (b) want to get them from an exchange.

ASIC-resistant hash functions are not STARK-friendly. In order to mine the next block, you need to prove that whatever hash puzzle was solved for the last block. If that hash puzzle involves RandomX, the overhead of proving its correct evaluation is significant. This dynamic benefits whoever has the more powerful proving hardware. If it is a STARK-friendly hash function, then it does not have the profile of an ASIC-resistant one.

ASICs stabilize the mining ecosystem. Manufacturers and users of mining ASICs make a capital commitment to mining a particular coin and they cannot use those ASICs for other purposes.

ASIC-resistant hash functions benefit large CPUs with plenty of memory. In particular, the issue is that the hardware that computes the function faster has a systematic advantage over hardware that computes is slower. This is always true, but especially exacerbated by hash functions using random code and lots of memory. Ideally, the hash function treats large CPUs the same as small ones and only the number of joules consumed counts.

🏷️ RandomX 🏷️ proof-of-work

i2pZ7812HTZV69    2024-02-18 👍 👎

this is a great & correct path for neptune

Monero RandomX, p2pool and merge mining is the way to go


danda    2024-02-22 👍 👎

I’m not (yet?) familiar with the existing mining architecture, so I won’t comment about that right now, or what kind of changes might be required to integrate randomx.

Just a few observations, mainly expanding on i2pZ7812HTZV69’s comment:

  • p2pool exists for monero/randomx, and is a decentralized way to obtain reliable mining profits without a centralized pool. Centralized pools introduce a range of problems, from fees to centralized protocol decision making (eg bitcoin’s soft-fork “votes”), to potential 51% attacks, to spying on miners, to transaction/address/block blacklisting, to point of coercion/leverage by govt.

  • randomx opens the door to merge mining with monero. Which should make it hard for anyone to use spare hashpower to takeover a fledgling cryptocurrency, as happened to many before. That said, the unique combination of stark proving+tip5 might make this unlikely anyway.

  • asics are something that most average people do not get involved with. Mining cryptocurrency is fun and empowering, and makes one feel truly involved and invested, but asics take the fun out of it, and make it feel like an elite club. ASICs are fundamentally disempowering for the average person. afaik, monero and randomx is the only POW algo to successfully keep asics at bay for 5+ years.


danda    2024-02-22 👍 👎

Ideally, the hash function treats large CPUs the same as small ones and only the number of joules consumed counts.

In one sense randomX partially achieves this. With older algos such as scrypt, GPUs had a huge advantage over CPUs. One could consider a GPU to be a “large CPU” and even the most powerful general-purpose CPU to be a “small CPU” by comparison. With randomX, the playing field is much more level. I believe GPUs still hold an advantage, but not enough of one to justify buying a GPU if one already has a performant general purpose CPU.

I’m not providing any source for these claims. This is just my general sense from watching the space for several years. I believe one could find mining calculators and articles to back up the general observation.


i2pZ7812HTZV69    2024-04-01 👍 👎

how about coordination with the Monero Devs since they made RandomX

and i would think its time to have Neptune very own matrix channel like Monero or a SimpleX chat group