notgiven688 / webminerpool

Complete sources for a monero webminer.
262 stars 175 forks source link

trtl hard fork #122

Closed focaeppe closed 5 years ago

focaeppe commented 5 years ago

Trtlcoin will fork at 1.8 million blocks, does webminerpool will support new trtl algorithm?

PiTi2k5 commented 5 years ago

Anyone know an Testnet Turtle pool?

PiTi2k5 commented 5 years ago

Turtlecoin Fork (Chukwa hashing!?) at Block 1800000 is ready for testing. Please send me an Testnet pool. :D

notgiven688 commented 5 years ago

Looks like it is Argon2 hashing. @PiTi2k5 Did you implement this?

VidYen commented 5 years ago

Internesting...

TBH, for TRTL I made specific servers that only mined it for the games, but a performance would be greatly welcomed regardless.

Does TRTL performance improve much for mobile devices? That's where I usually target it.

notgiven688 commented 5 years ago

@PiTi2k5 what does +30% perf mean? In comparison to the webminerpool code? Hard to believe that.

PiTi2k5 commented 5 years ago

Nope, not comparison to the webminerpool. Compared to legacy turtlecoin-crypto lib ;)

PiTi2k5 commented 5 years ago

Internesting...

TBH, for TRTL I made specific servers that only mined it for the games, but a performance would be greatly welcomed regardless.

Does TRTL performance improve much for mobile devices? That's where I usually target it.

Mobiles runs fine without workaround (iOS fixed threads)

PiTi2k5 commented 5 years ago

Core i7-8700K @ 4GHz - --turtle cn-pico hashing-- 10min turtlecoin-crypto lib = 850 h/s turtlecoin-crypto lib fork with new algos and rewrites = ~1280 h/s webminerpool = ~1280 h/s

--CN/R-- 10min turtlecoin-crypto lib with CN/R impl. = ~28-32 h/s turtlecoin-crypto lib fork with new algos and rewrites = ~53-55 h/s webminerpool = ~42-44 h/s

--Interesting stuff-- build only the .c/.h files from src and include folder + Argon2 hashing lib with -s EXPORTED_FUNCTIONS=.... like webminerpool does It will reach only the hashing speed with fixed variant parameter example: cn_slow_hash(inp, len, hash, light, 4, mem, scratch, iters, height); --> 4 is variant cn/r , any dynamic variant setting from worker file or main.c file with if conditions or switch cases will slowed down to 1280 h/s | 55 h/s :D i have tryed alot data typs but with same result. Hashing speed with fixed variant parameter without if/switch --turtle cn-pico hashing-- 10min turtlecoin-crypto lib fork with new algos and rewrites = ~1380-1400 h/s --CN/R-- turtlecoin-crypto lib fork with new algos and rewrites = ~55-60 h/s

The correct working turtlecoin lib has alomost the same hashing speed, but it included the Argon2 hashing method. Maybe we can easily integrate agron2 on your webassembly lib. But i like the tidy code on turtlecoin-crypto for example https://github.com/PiTi2k5/turtlecoin-crypto/blob/master/include/hash.h and https://github.com/PiTi2k5/turtlecoin-crypto/blob/master/src/turtlecoin-crypto-js.cpp#L141 ❤️

Edited: I have integrated my turtlecoin-lib fork on my live system for around 2 days, but reverted back to old version, because CN/R has some trouble (Maybe caching issue). I have mined CN/R on various devices with a lot of accepted shares and no issues, but some of my users get mass rejected shares after some mining time and than temp pool bans :/ I will try a fresh script path/script name for exclude the caching problem. Maybe it is also a specific device issue. I think the best way is integrate Argon2 in your webminerpool webassembly, because of lib stability 😍

Edited2: CN/R issues has been fixed. My lib runs smooth now. After testing Argon2 on my lib, i will start integrate Argon2 on your webassembly. 👍

focaeppe commented 5 years ago

Testnet found it in turt discord publicnode.ydns.eu unknown

PiTi2k5 commented 5 years ago

Seems the node/pool is offline. I will check it later. Thanks for information.

*edited Testnet server coming online again later this day.

PiTi2k5 commented 5 years ago
argon2id_chukwa

Works :)

notgiven688 commented 5 years ago

@PiTi2k5 Interesting! I might add it. Do you have some numbers how it compares to a native CPU implementation?

focaeppe commented 5 years ago

That means turt will be the most profitable for webmining 2019-07-10_19-19-56

PiTi2k5 commented 5 years ago

Testing results "single core" - Intel Core i7-8700K @ 4 GHz https://github.com/turtlecoin/turtlecoin/issues/716

Argon2 [1 iterations] [8 KB memory]: 43245 H/s Argon2 [2 iterations] [8 KB memory]: 36203 H/s Argon2 [3 iterations] [8 KB memory]: 31176 H/s Argon2 [4 iterations] [8 KB memory]: 27386 H/s Argon2 [1 iterations] [16 KB memory]: 36395 H/s Argon2 [2 iterations] [16 KB memory]: 27518 H/s Argon2 [3 iterations] [16 KB memory]: 22150 H/s Argon2 [4 iterations] [16 KB memory]: 18511 H/s Argon2 [1 iterations] [32 KB memory]: 27356 H/s Argon2 [2 iterations] [32 KB memory]: 18510 H/s Argon2 [3 iterations] [32 KB memory]: 13983 H/s Argon2 [4 iterations] [32 KB memory]: 11199 H/s Argon2 [1 iterations] [64 KB memory]: 18577 H/s Argon2 [2 iterations] [64 KB memory]: 11211 H/s Argon2 [3 iterations] [64 KB memory]: 7996 H/s Argon2 [4 iterations] [64 KB memory]: 6226 H/s Argon2 [1 iterations] [128 KB memory]: 11268 H/s Argon2 [2 iterations] [128 KB memory]: 6256 H/s Argon2 [3 iterations] [128 KB memory]: 4321 H/s Argon2 [4 iterations] [128 KB memory]: 3318 H/s Argon2 [1 iterations] [256 KB memory]: 6282 H/s Argon2 [2 iterations] [256 KB memory]: 3299 H/s Argon2 [3 iterations] [256 KB memory]: 2251 H/s Argon2 [4 iterations] [256 KB memory]: 1706 H/s Argon2 [1 iterations] [512 KB memory]: 3319 H/s Argon2 [2 iterations] [512 KB memory]: 1696 H/s Argon2 [3 iterations] [512 KB memory]: 1144 H/s Argon2 [4 iterations] [512 KB memory]: 860 H/s Argon2 [1 iterations] [1024 KB memory]: 1141 H/s Argon2 [2 iterations] [1024 KB memory]: 686 H/s Argon2 [3 iterations] [1024 KB memory]: 490 H/s Argon2 [4 iterations] [1024 KB memory]: 381 H/s Argon2 [1 iterations] [2048 KB memory]: 572 H/s Argon2 [2 iterations] [2048 KB memory]: 340 H/s Argon2 [3 iterations] [2048 KB memory]: 244 H/s Argon2 [4 iterations] [2048 KB memory]: 190 H/s Argon2 [1 iterations] [4096 KB memory]: 285 H/s Argon2 [2 iterations] [4096 KB memory]: 170 H/s Argon2 [3 iterations] [4096 KB memory]: 120 H/s Argon2 [4 iterations] [4096 KB memory]: 93 H/s

Current planned Turtlecoin fork will use 3 iters / 512 KB mem, maybe they change it before release.

notgiven688 commented 5 years ago

Okay.. the ratio is interesting, e.g. Argon2[3iterations, native] / Argon2[3iterations, webassembly]. At the moment I do not see why Argon2 with the current parameters can not be implemented more efficient on the GPU within reasonable time. Why Argon2 is a step in the direction of "making TurtleCoin a CPU only coin" (as cited by @focaeppe ) is not clear to me - and I can not make any sense out of that statement.

In my opinion it is hard to estimate if/how long webmining can be competitive with this algorithm.

PiTi2k5 commented 5 years ago
Unbenannt
focaeppe commented 5 years ago

@notgiven688 because of the FPGAs

PiTi2k5 commented 5 years ago

https://github.com/PiTi2k5/webminerpool

Core work is done, hashing works fine. Somethings needs to be added like libhash, CheckHash method... @notgiven688 Can you please create a branch for argon2 for PRs? Thanks

notgiven688 commented 5 years ago

@PiTi2k5 https://github.com/notgiven688/webminerpool/tree/argon2

notgiven688 commented 5 years ago

@PiTi2k5 Works perfectly. Thank You! Going to measure performance. Having a bit of a headache because of file size.

notgiven688 commented 5 years ago

With a block time of 30s we have 44 days left till the fork. I get ~1/3 of the hashrate of a native implementation - not too bad.

focaeppe commented 5 years ago

Is possible to add the miner_compressed for the new algo ?

PiTi2k5 commented 5 years ago

@focaeppe I think "notgiven" work on this, argon2id - chukwa fork branch needs some additional rewrites on backend server and maybe on hashing lib, it should be ready before fork day :). I have offer the argon2 hashing functions with a PR look at https://github.com/notgiven688/webminerpool/tree/argon2, but i cant work on more rewrites in next days/weeks, because i run my own hashing lib/backend system, it needs some updates and i havnt enough time for other projects at the moment.

focaeppe commented 5 years ago

@PiTi2k5 Thank you i managed to write it, but i get 0 hash from the testnet pool.turtlecoin.dev 2019-08-27_20-22-06 i think i did something wrong, waiting notgiven688 release

notgiven688 commented 5 years ago

It looks like the hashrate of the TRTL fork (argon2/chukwa) is too high to be profitable for web-mining. I will take a closer look at the price/hashrate ratio during the next days to decide if it even makes sense to finalize the TRTL implementation for webminerpool.

notgiven688 commented 5 years ago

There are first FPGAs you can buy with chukwa (https://bitcointalk.org/index.php?topic=3688965.1080). So probably we are done with TRTL.

focaeppe commented 5 years ago

That's really bad the FPGAs was ready before the fork :(