wkta / ReadableCryptoMiner

crypto miner written in pure python, for learning purpose, can mine Monero XMR
Other
21 stars 11 forks source link

add cn/r support (a.k.a. CryptoNightR the new Monero PoW algorithm) #2

Open wkta opened 5 years ago

wkta commented 5 years ago

A Monero hard fork occured: the new PoW algorithm called cn/r (also known as CryptoNightR or CryptoNight variant 4) has been used by the Monero consensus mechanism since March, 9th 2019. Our ReadableCryptoMiner shall be modified accordingly

OodavidsinoO commented 5 years ago

So does this miner support cn/r now?

BunnyBoss commented 3 years ago

Hey, I'm no developer. May I know is there any update on supporting CryptoNightR ?

wkta commented 3 years ago

@OodavidsinoO No it is not.

The development of this software is on hold and I don't think I resume it anytime soon. Studying the changes brought by CryptoNightR & refactor the code to make it compliant with the new POW algorithm is not something I want to do now as this software is not appropriate for mercantile use… = you will never make a good buck with it ! As explained in the README.

Developing this is just an intellectual game. If someone else has the time to play, be my guest! PR are welcome

wkta commented 8 months ago

I'm back! Just so you know I cleaned up the repo a little bit, and pinpointed what needs to be changed in order to upgrade the mining software. If someone wants to "play" with me it's the right time to do so.

Accordingly to the hard fork (A reminder: right there from 2019, November 30th and beyond, Monero doesn't operate with CryptoNight anymore)…

What needs to be implemented is precisely and simply the so-called RandomX PoW algorithm

Therefore, one needs to implement many missing functions and the VM behavior +CISC logic. Quite some work but nothing is blocking, in theory.

For example, right now blake is available but variants such as hash256 and hash512 (refer to the Blake2b hashing function with a 256-bit and 512-bit output size, respectively) are missing in file: https://github.com/wkta/ReadableCryptoMiner/blob/master/crypto_primitives/slow_hash_lgplv3.py A first easy step could be to add and test all missing hash functions, then continue with what the VM is supposed to process and how it is supposed to fill up its own memory (aka the scratchpad)

wkta commented 8 months ago

A good source of knowledge: https://github.com/jtgrassie/pyrx for getting the upgrade done