Live data from Hacker News

Show HN: SHAllenge – Compete to get the lowest hash

shallenge.quirino.net

1–10 of 136 posts

Re: Show HN: SHAllenge – Compete to get the lowest hash

#4

I like that you linked to a javascript miner. Makes it really easy to try instead of needing to write up some code. Design/colour scheme is nice too.

Thank you!

Curiously most of the code for that JS miner was written on my phone, with the help of ChatGPT.

I didn't have my laptop with me and was curious how fast a phone browser would be able to mine.

Re: Show HN: SHAllenge – Compete to get the lowest hash

#5

I like that you linked to a javascript miner. Makes it really easy to try instead of needing to write up some code. Design/colour scheme is nice too.

I ran the javascript miner for like an hour, then I asked ChatGPT to write some go code that worked perfect (minus an unused variable error).

The go program beat the javascript miner within seconds. Right now it's that easy to get into the top 10.

Re: Show HN: SHAllenge – Compete to get the lowest hash

#6

I like that you linked to a javascript miner. Makes it really easy to try instead of needing to write up some code. Design/colour scheme is nice too.

I ran the javascript miner for like an hour, then I asked ChatGPT to write some go code that worked perfect (minus an unused variable error). The go program beat the javascript miner within seconds. Right now it's that easy to get into the top 10.

Maybe I should include a warning that it is pretty slow.

I'm using my own SHA256 implementation in C++, and it is at least 100 times faster than the JS one. I've measured it to be about as fast as the one on the Go standard library.

Re: Show HN: SHAllenge – Compete to get the lowest hash

#7
post #6

Earlier quoted context omitted.

I ran the javascript miner for like an hour, then I asked ChatGPT to write some go code that worked perfect (minus an unused variable error). The go program beat the javascript miner within seconds. Right now it's that easy to get into the top 10.

Maybe I should include a warning that it is pretty slow. I'm using my own SHA256 implementation in C++, and it is at least 100 times faster than the JS one. I've measured it to be about as fast as the one on the Go standard library.

Anyone who stumbles into your SHAllenge ought to know that JS isn't going to be really competitive, so I think you're good. A warning might encourage them to delve a little deeper. I like that it makes it very accessible.

I assume anyone with knowledge about GPU hashing and the will would be able to steal the top spot very quickly. Assuming seletskiy isn't already that guy. I don't have a good grasp on the compute difference between 8-9 0s and 10 0s in a reasonable amount of time.

Re: Show HN: SHAllenge – Compete to get the lowest hash

#8
post #6

Earlier quoted context omitted.

Maybe I should include a warning that it is pretty slow. I'm using my own SHA256 implementation in C++, and it is at least 100 times faster than the JS one. I've measured it to be about as fast as the one on the Go standard library.

Anyone who stumbles into your SHAllenge ought to know that JS isn't going to be really competitive, so I think you're good. A warning might encourage them to delve a little deeper. I like that it makes it very accessible. I assume anyone with knowledge about GPU hashing and the will would be able to steal the top spot very quickly. Assuming seletskiy isn't already that guy. I don't have a good grasp on the compute di…

Assuming hashes are random (which is a reasonable assumption, considering it's sha256), every extra leading zero cuts the probability of success in half, meaning double the candidates searched to find a matching value. So each additional leading hex 0 would take on average 16x longer than the last.

Re: Show HN: SHAllenge – Compete to get the lowest hash

#9
post #6

Earlier quoted context omitted.

Maybe I should include a warning that it is pretty slow. I'm using my own SHA256 implementation in C++, and it is at least 100 times faster than the JS one. I've measured it to be about as fast as the one on the Go standard library.

Anyone who stumbles into your SHAllenge ought to know that JS isn't going to be really competitive, so I think you're good. A warning might encourage them to delve a little deeper. I like that it makes it very accessible. I assume anyone with knowledge about GPU hashing and the will would be able to steal the top spot very quickly. Assuming seletskiy isn't already that guy. I don't have a good grasp on the compute di…

I kept at it mostly as an exercise to test different compiler options. I found that a miner implemented in C runs in 1/5 the time of a Perl script (but at ~10 times more lines of code). Also, compiling with "-march=native" reduces the run time by ~10%, and concatenating all C files together to compile and link in a single step saves another ~0.5%.

I felt like I got enough out of this exercise and don't need to burn more CPU cycles on it :)

Post reply on HN