Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 28/03/2025, 21:44:50 UTC
Random number generation fails later

Random mode doesn't need saving  to file. I'll remove this option very soon because it's an anomaly.


Look at the numbers, they stay the same later at the same values. That's the problem.

The current code uses a combination of thread ID and time for seeding, but if multiple threads start at nearly the same time, they might get identical seeds.

The random seed is being reinitialized with the current time in nanoseconds (std::chrono::high_resolution_clock::now())

When saving/loading progress in random mode, multiple saves can occur within the same nanosecond.

I will replace the current ThreadRNG initialization.