00000000 000003da 5849ade5 e2112447 73478c46 5fcdc744 9e247df4 11e97b28 (#1 of leaderboard)
00000000 00000000 0002a2fa b0d010ce 270927e8 c9a698a3 4f5e3d6c 4dbcffd3 (latest mined block)
Doesn't seem that impressive but keep in mind that it gets exponentially harder to find additional leading 0s and that the Bitcoin network currently finds such hashes every ~10 minutes.
I couldn't get wgsl to work properly, as it would need to have a sha256 implementation, and that's a bit heavy for a buzzed coding session. So, I used the simd commands, and that got me up to around 7mh/s on the m1, and a whole lot more on my desktop.
I will share the code once I get all the other optimizations I want in!
From what I recall it was a bunch of YC founders writing janky cuda code vs djb who proceeded to smoke us all.
[1] https://news.ycombinator.com/item?id=704182
[2] archive link to the dead link in [1] https://web.archive.org/web/20090717104634/http://www.engine...
[3] https://news.ycombinator.com/item?id=716851
[4] https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
Design/colour scheme is nice too.
It uses Peer-2-Peer in the browser and I haven't touched it in a while, but it looks like it still works. :)
Whih is really odd, since my string has only 51 chars and all chars are valid within the Base64 group.
If I remove the padding ("=") then it's good to go, however, there is a string in the scoreboard with "=" in it (garethgeorge/AHQAAAHPe0Q=)
Did the user bypassed the javascript check using curl or something?
Also, this could use some adjustments:
const nonceRegex = /^[A-Za-z0-9+/]{1,64}$/;
if (!nonceRegex.test(nonce)) {
alert('Nonce must be 1-64 characters long and consist only of Base64 characters');
return false;
}
Personally, I would use const nonceRegex = /^[A-Za-z0-9+/]{1,64}(={0,2})$/;
Initial C implementation got me to ~70 for a short time, then very sloppy racy pthreads one kept me at the tail end for a bit longer, but my again very sloppy cuda program running on my GTX1070 has me at 35 at the time of writing.
Rough calculation shows it to be doing 28.6MHashes/sec, and I suspect I could do a lot better than that if I knew anything about cuda programming.
I didn't read enough to know how to pick good values for blocks/threads per block, so I just benchmarked all the combinations of powers of two to arrive at the best result.
Really fun challenge!
Would be fun to see the total amount of valid submissions, and maybe the number of leading zeroes of a hash for those of us that need a moment to figure it out from hex in their head :]
Bug: The site says "nonce: 1-64 characters from Base64 (a-zA-Z0-9+/)" but it accepts "=" as well.
Reading the other answers about hand optimised CUDA and parallel Go and Rust, that's probably as high as I'll get.
Is it even possible to have cheaper first character SHA256 algorithm?
edit: up to #28 ;)
https://gist.github.com/Chaz6/81523edaed6f31aa609daa919ff6b8...
https://gist.github.com/zdimension/63d3aa5f04573267f423520e4...
The nonce alphabet being limited makes the whole thing quite a bit more expensive.