4 ms·
Anyone got a guestimate as to the energy used to make that leaderboard?
by londons_explore 2y ago
Anyone got a guestimate as to the energy used to make that leaderboard?
- emigrantdd 2y agoit's just for fun? :)
- playingalong 2y agoFun or not, but I think the parent means electricity, i.e. how much kWh were wasted/spent on this
- NAHWheatCracker 2y agoChatGPT says a desktop CPU uses 105Wh for every hour of maxed computations. I think a hash with 8 leading zeros takes around an hour and every additional 0 takes 16x that. I'll ignore anything less than 8 0s and disregard how close the hashes are to gaining or losing a 0. There's 13 8s, so that's 1365Wh. 5 9s is 8400Wh, 2 10s is 53760Wh, 3 11s is 1290240Wh. Total that's ~1.35MWh, which might cost $100 to $180. Very weak estimate, though.
- quirino 2y agoThe top competitors are very likely using GPUs, I guess that would make this cost much much lower...
- jonas-w 2y agoAt least I'm not (second place currently), I'm using a single threaded rust program that chatgpt wrote for me. I'm getting 10-15 million hashes per second. But seletskiy is, as you can see in his nonce which tells us that he uses an RTX4090 and has 18 Giga Hashes per second. I'm really curious how he wrote that program, as I have a Rx 7900 XTX and would love to use it for this competition haha
- wdfx 2y agoI'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.
- jonas-w 2y agoI'm also yak shaving currently, as I'm using NixOS... which means spending more time looking for the correct packages and creating environments.
- jonas-w 2y agoFWIW 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.
- wdfx 2y agoI'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.
- jonas-w 2y agoWow 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
- nzentzis 2y agoI'm using a janky CUDA miner that's getting around 6GH/s on a 3090. My code is kind of bad though since I hacked it together in a couple of hours last night, so I wouldn't be surprised if a proper/competent implementation got 2-3x the hashrate mine does.
- jonas-w 2y agoMind sharing it? I have an AMD card, so its not that much of use for me, but still would be interested
- SushiHippie 2y agoFWIW getting 8 0s took me 30 seconds, 9 0s definitely less than an hour, but after that I only got lower 9 0s, and 10 0s do not seem to be in sight
- NAHWheatCracker 2y agoI guess either my computer or my code is really bad! I only got a mid-8 0s with multiple hours.
- SushiHippie 2y agoHow many hashes does your code go through per second? I just tried your HN username, and it took me these times: 19 seconds for 7 0s - nonce: 293576344 28 seconds for 8 0s - nonce: 436316829
- NAHWheatCracker 2y agoI added some instrumentation and it was doing around 3.3 million hashes per second. Mine isn't sequential, it's generating random strings. Changing from a 64 byte string to a 26 byte string with (14 character nonce) brought it up to around 6 MH/s. Given the nonces you provided, I guess you're going sequential and you're hashing 2-3 times faster than me. I just got a 7 0 hash in 70 seconds and an 8 0 hash in 164 seconds. You're right and I was overestimating how long I waited around last night.
- SushiHippie 2y agoAfter experimenting more with this, it seems like with random generation the bottle neck is the "input generation" and not the hashing itself, that's why I went with sequential. I replaced my nonce generation with a static string and my hashrate went to the moon, so I invested more time in optimizing my input generation.
- NAHWheatCracker 2y ago
- deleted 2y ago[deleted]
- jffry 2y agoI'm using a single 4090 which nvidia-smi says is consuming 450W while hashing at 21GHps. Let's round that up to 667W for incidentals and to account for power supply inefficiency. Running this for 1.5 hours would consume 1KWh of energy, and compute 1.134e14 hashes (or 2^46.7 if you prefer). Assuming SHA-256 hashes are essentially normally distributed, that means that finding a hash with 13 leading hex zeroes should be a 1-in-(16^13) aka 1-in-(2^52) odds. This gives 2^(52-46.7) or 39.7KWh on average to generate a single 13-zero hash, and ~16x that (635KWh) for a 14-zero hash. I got very lucky finding a 14-zero hash quickly, vastly earlier than average expectation, so my energy usage is quite a bit lower than that.