Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 05/05/2024, 18:33:21 UTC
There are algorithms that are actually getting the uniform real randomness (not some deterministic PRNG bullshit like someone mentioned earlier, I mean really lol? Haven't they heard about os.urandom and how it works?)

Code:
import os, sys, random
import time

min_range = 18446744073709551615
max_range = 36893488147419103231
counter = 0  # Initialize counter
start_time = time.time()

while True:
    random_bytes = os.urandom(9)
    initial_bytes = b'\x00' * 23
    full_bytes = initial_bytes + random_bytes
    dec = int.from_bytes(full_bytes, byteorder='big')
    counter += 1  # Increment counter
    message = "\rPrivate Keys per second: {:.2f}".format(counter / (time.time() - start_time))
    messages = []
    messages.append(message)
    output = "\033[01;33m" + ''.join(messages) + "\r"
    sys.stdout.write(output)
    sys.stdout.flush()
    if min_range <= dec <= max_range:
       if dec == 30568377312064202855:
          print("\nSeed :", random_bytes)
          print("Generated number:", dec)
          break

This is Python script that will test os.urandom speed.
The example works for Puzzle 65. There is no hash or secp256k1 operations here - just numbers.
Result is (on my PC) :
Private Keys per second: 170893.39

Do you know how many numbers need to be generated per second to find Puzzle 65 in 10 minutes?

30744573456182586  Private Keys per second !

It's an mission impossible . Even in C++