Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 02/10/2023, 19:51:40 UTC


- we run keyhunt in BSGS mode on 8 CPU threads with about 16GB RAM allocation and get about 80 PKey/s.

Is Kangaroo with multi-GPU usage more advantageous and more likely to get a hit, even though keyhunt with CPU usage in BSGS can process 80 PKey/s?



Try changing the random generator in both. Play what works best in your environment.
example

keyhunt.cpp

replace
Code:
#include <sys/random.h>
to
Code:
#include <random>
replace  seed random generator with minstd_rand rng
Code:
#if defined(_WIN64) && !defined(__CYGWIN__)
    // Any Windows secure random source goes here
    rseed(clock() + time(NULL) + rand());
#else
    std::random_device rd;
    std::minstd_rand rng(rd());
    
    // Seed the random number generator
    rseed(rng());
#endif

I have from 80  to ~177 Pkeys/s (177940438134284990 keys/s) Grin
These apps can't get better if we don't all work on them and test them.


An windows version ?

Code:
#if defined(_WIN64) && !defined(__CYGWIN__)
    // On Windows, use a combination of clock, time, and rand as the seed
    return std::minstd_rand(static_cast<unsigned>(clock() + time(nullptr) + rand()));
#else
    // On non-Windows platforms (including Linux), use std::random_device to seed
    std::random_device rd;
    return std::minstd_rand(rd());


This code should work on both Windows and Linux.
I also use -O3 flag during compilation.
Aggressive optimizations can greatly improve performance,
they may also increase compilation time, and in some cases, they can make debugging more challenging because the optimized code
 may differ significantly from the original source code.