notgiven688 / webminerpool

Complete sources for a monero webminer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reverse Waltz support (Reversed shuffle operations)

ForgedTactics opened this issue · comments

HI! I am trying to add reverse waltz support (reverse shuffle operations) for CNv2/3/8/w.e

I have shifted the operators for VARIANT2_PORTABLE_SHUFFLE_ADD1 like:


    uint64_t *chunk1 = U64((base_ptr) + ((offset) ^ 0x30)); \
    uint64_t *chunk2 = U64((base_ptr) + ((offset) ^ 0x20)); \
    uint64_t *chunk3 = U64((base_ptr) + ((offset) ^ 0x10)); \

But VARIANT2_PORTABLE_SHUFFLE_ADD1 looks like it should be done differently according to:
https://github.com/MoneroOcean/node-cryptonight-hashing/blob/master/xmrig/crypto/CryptoNight_monero.h

Any suggestions how to go about this? :)

Should be doable.. Check their strange code here:
https://github.com/graft-project/GraftNetwork/blob/dfd9b6d18a6694b537aa71e43294ad2c19e82be3/src/crypto/slow-hash.c#L138

and compare it to VARIANT2_PORTABLE_SHUFFLE_ADD1 and VARIANT2_PORTABLE_SHUFFLE_ADD2 in webminerpool. Also check for the number of iterations https://github.com/graft-project/GraftNetwork/blob/dfd9b6d18a6694b537aa71e43294ad2c19e82be3/src/crypto/slow-hash.c#L768

@ForgedTactics No wonder you had trouble implementing this. Their reference implementation seems to have a bug (I opened a issue here: graft-project/GraftNetwork#342 ). I will update the master branch shortly (matter of hours) to include cn/rwz.

Cool! I gave up on this a while back. I appreciate you pointing that out! Excited to play with this

@ForgedTactics I think it is done. Checkout the branch: https://github.com/notgiven688/webminerpool/tree/cnrwz . If I don't find any errors I will update the master branch.