News for hackers. Stuff that matters.
Re:Show HN: SHAllenge – Compete to get the lowest Hash by wdfx on Saturday June 15, 2024 @11:36AM (#40690411)
I've also been spending today building a miner. Started in JS, then JS with worker threads (~2.2MH/s), then c++ with openssl (~3.7MH/s) and now attempting CUDA.

Also have been using ChatGPT to do the code translations.

I'm currently stuck in yak shaving, I cannot compile CUDA programs here yet as on fedora 40 I need an earlier gcc (13.2) which I am now also having to compile from source.

Re:Show HN: SHAllenge – Compete to get the lowest Hash by jonas-w on Saturday June 15, 2024 @12:02PM (#40690579)
I'm also yak shaving currently, as I'm using NixOS... which means spending more time looking for the correct packages and creating environments.
Re:Show HN: SHAllenge – Compete to get the lowest Hash by jonas-w on Sunday June 16, 2024 @01:01PM (#40698492)
FWIW I got it working with rust and opencl, most of it is written by chatgpt as I have no clue about opencl. GPU usage is only 50-60% and I get 100MH/s.

With hashcat and opencl I could get 12GH/s but I couldn't find a way to use hashcat for this use case.

Re:Show HN: SHAllenge – Compete to get the lowest Hash by wdfx on Sunday June 16, 2024 @05:15PM (#40700173)
I've parked CUDA for now, I don't understand it enough to care to fix the tooling.

Got an optimised C++ version with no deps averaging about ~24 MH/s on an i7-11800H.

I've got 9 zeros; if I get a result that ranks top 10 I think I'll submit and call it a day.

Re:Show HN: SHAllenge – Compete to get the lowest Hash by jonas-w on Sunday June 16, 2024 @10:38PM (#40701886)
Wow 24MH/s on an i7 with 8 cores sounds really good!

I don't know how I got it working, but I'm now at 3GH/s with my OpenCL implementation. I basically converted 90% of my rust logic to opencl and now my GPU is at 100% usage and I also needed to switch to a tty, as my window manager became unresponsive haha

I'm kind of glad about this HN post, as I had absolutely no clue about how sha256 and opencl worked before this challenge.

Thanks @quirino

Re:Show HN: SHAllenge – Compete to get the lowest Hash by quirino on Sunday June 16, 2024 @11:30PM (#40702086)
I'm glad you had some fun! This experiment went about as well as I could hope!

If anyone's curious, I'm getting 4.5MH/s single-threaded and 12.2MH/s multi-threaded on a slightly old i7 with 4 cores.

It's my own C++ implementation, which I've made about 20% faster than the fastest one I found online (Zig/stdlib, also tried Go/stdlib, C++/cgminer, rust/ring, C++/VanitySearch and Python/stdlib).

I think it might be faster just because I was able to skip some steps, since all inputs are short and of the same length.

I've just finished testing 10^12 inputs. I think I'll stop with 10 zeroes, which is very likely to happen in the next couple of days, according to my calculations. I might revisit it later to learn some GPU programming.

Re:Show HN: SHAllenge – Compete to get the lowest Hash by jonas-w on Monday June 17, 2024 @12:24AM (#40702282)
Very cool!

But same, I also was able to skip some steps as I can make some assumptions about the input as its fixed in length and doesn't need padding.

I got lucky and found a hash with 12 zeroes in 60s with my OpenCL implementation, and now I got my second spot back.

GPUs are so crazy