Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 18/03/2025, 15:33:42 UTC
How ?  Tongue

I think I have about 20 scripts in my archive that attempt this.

For example, Puzzle 67:

Code:
import random
from datetime import datetime, timedelta

# Specify the start and end date and times
start_datetime_pre = datetime(2015, 1, 1, 0, 0, 0)
end_datetime_pre = datetime(2015, 1, 15, 19, 7, 14)

# Define the range of numbers
min_number = 73786976294838206463
max_number = 147573952589676412927

# Specify the target number
target_number = 132656943602386256302

# Specify the target pattern
target_pattern = '13265694'

current_datetime = start_datetime_pre
time_step = timedelta(microseconds=100)  # Use microseconds

while current_datetime <= end_datetime_pre:
    # Calculate the time range in seconds with higher precision
    time_range_seconds = 1.0

    # Initialize binary search boundaries with floating-point precision
    low_timestamp = current_datetime.timestamp()
    high_timestamp = (current_datetime + timedelta(seconds=time_range_seconds)).timestamp()
    found_datetime = None  # Initialize found_datetime

    while low_timestamp <= high_timestamp:
        # Calculate the middle timestamp with floating-point precision
        mid_timestamp = (low_timestamp + high_timestamp) / 2.0

        # Use the middle timestamp as the seed to generate a number
        random.seed(mid_timestamp)
        generated_number = random.randint(min_number, max_number)

        # Check if the generated number starts with the specified pattern
        if str(generated_number).startswith(target_pattern):
            found_datetime = datetime.fromtimestamp(mid_timestamp)
            break  # Break out of the inner loop when a match is found

        if generated_number < target_number:
            low_timestamp = mid_timestamp + 0.000001  # Increment by microseconds
        else:
            high_timestamp = mid_timestamp - 0.000001  # Decrement by microseconds

    if found_datetime is not None:
        print("Pattern Found:", generated_number, "Found Timestamp:", found_datetime.strftime('%Y-%m-%d %H:%M:%S.%f'))

    # Increment the current datetime by a smaller time step for the next timestamp
    current_datetime += time_step


Pattern Found: 132656949029301668323 Found Timestamp: 2015-01-01 00:00:45.558075
Pattern Found: 132656944992576280475 Found Timestamp: 2015-01-01 00:01:07.982988
Pattern Found: 132656940747988305926 Found Timestamp: 2015-01-01 00:01:21.862088
Pattern Found: 132656940747988305926 Found Timestamp: 2015-01-01 00:01:21.862088
Pattern Found: 132656940747988305926 Found Timestamp: 2015-01-01 00:01:21.862088
Pattern Found: 132656944899490185438 Found Timestamp: 2015-01-01 00:01:27.960048
Pattern Found: 132656944899490185438 Found Timestamp: 2015-01-01 00:01:27.960048
Pattern Found: 132656944864645138147 Found Timestamp: 2015-01-01 00:02:03.090600
(This search will continue indefinitely at the microsecond level.)