Bitcoin Forum
May 03, 2026, 05:12:45 AM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 [567] 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 ... 658 »
  Print  
Author Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it  (Read 382911 times)
brainless
Member
**
Offline Offline

Activity: 485
Merit: 35


View Profile
August 04, 2025, 10:42:38 PM
 #11321

Ever gpu have their own structure, every need to set their b t p
It's like load design as per country state cities
Wrong set b t p, u will waste resources and missing keys

13sXkWqtivcMtNGQpskD78iqsgVy9hcHLF
Tony8989
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
August 04, 2025, 10:51:21 PM
 #11322

ok!! best set up for 4090 and 5090?Huh?
brainless
Member
**
Offline Offline

Activity: 485
Merit: 35


View Profile
August 04, 2025, 10:57:15 PM
 #11323

ok!! best set up for 4090 and 5090?Huh?
-b 170 -t 256 -p 4096
For 5090, if no fault, then add 32 in 4096 and test with every time by adding 32 till it crash
You will reach maxmium speed of you 5090

13sXkWqtivcMtNGQpskD78iqsgVy9hcHLF
benjaniah
Jr. Member
*
Offline Offline

Activity: 54
Merit: 3


View Profile
August 04, 2025, 10:57:32 PM
 #11324

This is my hardware
2 x AMD EPYC  64 cores each
1.5 T RAM
-n 0x1000000000000 -k 16384

I think you might be able to squeeze a little bit more speed using -n 0x4000000000000 -k 8192. If you saved your 1TB bloom filter using -S, you can re-use it with the different -n and -k values. You have another 0.5 TB ram available, have you tried -n 0x4000000000000 -k 12000 so you can max out your RAM? Even then, you'll run out of money or die before 135 is found.
oddstake
Jr. Member
*
Offline Offline

Activity: 75
Merit: 1


View Profile
August 05, 2025, 02:58:39 AM
Last edit: August 05, 2025, 03:31:42 AM by oddstake
 #11325

This is my hardware
2 x AMD EPYC  64 cores each
1.5 T RAM
-n 0x1000000000000 -k 16384

I think you might be able to squeeze a little bit more speed using -n 0x4000000000000 -k 8192. If you saved your 1TB bloom filter using -S, you can re-use it with the different -n and -k values. You have another 0.5 TB ram available, have you tried -n 0x4000000000000 -k 12000 so you can max out your RAM? Even then, you'll run out of money or die before 135 is found.

I will try with -n 0x4000000000000 -k 8192, but for every different command I need to wait a couple of hours for the bloom filter to fill the RAM.
I tried also with all the 1.5T RAM but the speed is considerably slower because on a dual socket system, each CPU typically has its own memory controller and dedicated memory channels. This architecture is known as NUMA. Latency increases and bandwidth decreases when a CPU accesses the memory attached to the other CPU.
So I'm running 2 separate keyhunt apps with these commands : numactl --cpunodebind=0 --membind=0 ./keyhunt0 -m bsgs -f 135.txt etc etc (1T RAM)
and numactl --cpunodebind=1 --membind=1 ./keyhunt1 -m bsgs -f 135 etc... (512GB RAM).
You are right, 135  is very hard but better to try my luck on random than going sequentially specially on these high ranges puzzles.

Just ordered from Ebay China an EPYC 9965 with 192 cores / 384 threads and 1T of DDR5 at 6400Mts/s , the speed will be about 5-6x higher on this new setup. More than 15k euros put into these puzzles without even knowing I will get 1 penny back.
Virtuose
Jr. Member
*
Offline Offline

Activity: 60
Merit: 1


View Profile
August 05, 2025, 04:07:58 AM
 #11326

This is my hardware
2 x AMD EPYC  64 cores each
1.5 T RAM
-n 0x1000000000000 -k 16384

I think you might be able to squeeze a little bit more speed using -n 0x4000000000000 -k 8192. If you saved your 1TB bloom filter using -S, you can re-use it with the different -n and -k values. You have another 0.5 TB ram available, have you tried -n 0x4000000000000 -k 12000 so you can max out your RAM? Even then, you'll run out of money or die before 135 is found.

I will try with -n 0x4000000000000 -k 8192, but for every different command I need to wait a couple of hours for the bloom filter to fill the RAM.
I tried also with all the 1.5T RAM but the speed is considerably slower because on a dual socket system, each CPU typically has its own memory controller and dedicated memory channels. This architecture is known as NUMA. Latency increases and bandwidth decreases when a CPU accesses the memory attached to the other CPU.
So I'm running 2 separate keyhunt apps with these commands : numactl --cpunodebind=0 --membind=0 ./keyhunt0 -m bsgs -f 135.txt etc etc (1T RAM)
and numactl --cpunodebind=1 --membind=1 ./keyhunt1 -m bsgs -f 135 etc... (512GB RAM).
You are right, 135  is very hard but better to try my luck on random than going sequentially specially on these high ranges puzzles.

Just ordered from Ebay China an EPYC 9965 with 192 cores / 384 threads and 1T of DDR5 at 6400Mts/s , the speed will be about 5-6x higher on this new setup. More than 15k euros put into these puzzles without even knowing I will get 1 penny back.

If you can spend that much, throwing it all on CPU is honestly a waste.
Even the fastest EPYC setups are way behind GPUs in raw keyrate for secp256k1.
A single RTX 5090 will crush any 192-core CPU in keys/sec, and for less power and less cash.
Unless you’re doing something highly specialized on CPU, brute-forcing with GPU is just smarter. 😄
oddstake
Jr. Member
*
Offline Offline

Activity: 75
Merit: 1


View Profile
August 05, 2025, 04:23:51 AM
 #11327

Quote

If you can spend that much, throwing it all on CPU is honestly a waste.
Even the fastest EPYC setups are way behind GPUs in raw keyrate for secp256k1.
A single RTX 5090 will crush any 192-core CPU in keys/sec, and for less power and less cash.
Unless you’re doing something highly specialized on CPU, brute-forcing with GPU is just smarter. 😄

I tried on some low keys puzzles with /Etayson/BSGS-cuda and my RTX 4080 is slower at sequential search than a single EPYC with 64 cores and bloom filter of about 1T in size.
Indeed, RCKangaroo or any other Kangaroos out there are faster but on puzzles beyond 135 things get complicated.
nomachine
Full Member
***
Offline Offline

Activity: 826
Merit: 135



View Profile
August 05, 2025, 04:59:19 AM
Last edit: August 05, 2025, 07:31:40 AM by nomachine
 #11328

This Python script generates a fully signed raw Bitcoin transaction that can be used with the MARA Slipstream service (or any other broadcast method).

Automatically:
Fetches UTXOs (unspent outputs) from mempool.space

Code:
import base58
import requests
import ecdsa
from bitcoin import *
import hashlib

def decode_wif(wif):
    b = base58.b58decode(wif)
    if len(b) == 38 and b[-5] == 0x01:
        return b[1:-5], True  # compressed
    elif len(b) == 37:
        return b[1:-1], False  # uncompressed
    raise ValueError("Invalid WIF format")

def get_pubkey(priv_bytes, compressed=True):
    sk = ecdsa.SigningKey.from_string(priv_bytes, curve=ecdsa.SECP256k1)
    vk = sk.get_verifying_key()
    x = vk.pubkey.point.x()
    y = vk.pubkey.point.y()
    return ('02' if y % 2 == 0 else '03') + f"{x:064x}"  # Always compressed

def get_address(pubkey):
    pubkey_bytes = bytes.fromhex(pubkey)
    pubkey_hash = hash160(pubkey_bytes)
    return pubkey_to_address(pubkey)  # Always compressed P2PKH

def is_legacy_address(address):
    return address.startswith('1')

def fetch_utxos(address):
    if not is_legacy_address(address):
        raise ValueError("Only legacy addresses (starting with '1') are supported")
    
    try:
        url = f"https://mempool.space/api/address/{address}/utxo"
        r = requests.get(url)
        r.raise_for_status()
        return r.json()
    except Exception as e:
        print("Failed to fetch UTXOs:", e)
        return []

def estimate_fee(num_inputs, num_outputs, fee_rate):
    # Legacy transaction size estimation with compressed pubkeys
    input_size = 148  # Standard for P2PKH with compressed pubkey
    output_size = 34   # P2PKH output size
    total_size = 10 + num_inputs * input_size + num_outputs * output_size
    return total_size * fee_rate

def create_transaction(wif, to_address, amount_btc, fee_rate):
    # Validate addresses are legacy
    if not is_legacy_address(to_address):
        raise ValueError("Only legacy addresses (starting with '1') are supported for recipient")
    
    priv_bytes, _ = decode_wif(wif)  
    pubkey = get_pubkey(priv_bytes)
    from_address = get_address(pubkey)
    
    if not is_legacy_address(from_address):
        raise ValueError("Only legacy addresses (starting with '1') are supported for sender")

    utxos = fetch_utxos(from_address)
    if not utxos:
        raise RuntimeError("No UTXOs available")

    # Sort UTXOs by value (descending) to minimize number of inputs
    utxos.sort(key=lambda x: x['value'], reverse=True)

    inputs = []
    total = 0
    for utxo in utxos:
        inputs.append({'output': f"{utxo['txid']}:{utxo['vout']}", 'value': utxo['value']})
        total += utxo['value']
        if total >= int(amount_btc * 1e8) + estimate_fee(len(inputs), 2, fee_rate):
            break  # We have enough including fees

    if total == 0:
        raise RuntimeError("No UTXOs available")

    send_amount = int(amount_btc * 1e8)
    fee = estimate_fee(len(inputs), 2, fee_rate)

    if total < send_amount + fee:
        raise RuntimeError(f"Insufficient funds. Need {send_amount + fee} satoshis, have {total}")

    change = total - send_amount - fee
    outputs = [{'address': to_address, 'value': send_amount}]
    if change > 546:  # Minimum dust amount
        outputs.append({'address': from_address, 'value': change})
    elif change > 0:
        fee += change  # Add remaining change to fee if it's too small

    tx = mktx(inputs, outputs)
    for i in range(len(inputs)):
        tx = sign(tx, i, wif)
    return tx

# === Example Usage ===
if __name__ == "__main__":
    WIF = "<wif_private_key>"
    TO_ADDRESS = "1YourLegacyAddressHere"  # must start with '1'
    AMOUNT_BTC = 6.70013241
    FEE_RATE = 20  # sats/vB

    try:
        raw_tx = create_transaction(WIF, TO_ADDRESS, AMOUNT_BTC, FEE_RATE)
        print("Raw Transaction:", raw_tx)
        
        # To broadcast the transaction (uncomment to use)
        # broadcast_url = "https://mempool.space/api/tx"
        # response = requests.post(broadcast_url, data=raw_tx)
        # print("Broadcast response:", response.text)
    except Exception as e:
        print("Error:", e)

Example script output

Quote
Raw Transaction: 0100000002b3138da741af259146ca2c4895bac7e0c08147679f88ce3302fb4db0584bf31205000 0006b4830450221009131a350b98aab71d77f5a9a94dd5bac9a5602e2b761a2dc605ba03cb996df ff0220480b53128af0cf7c9b74fa8d625e2a9d143d15fdaa2fd24e421d4d0d29c1532201210279b e667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ffffffff6441384445 a0f426ee689e2532e41fc6947dda41558026b80f5b1dfd7c58455d130000006a473044022032ccf 651486b1055ea188d95645dc61329e9fa89a18b33417d33dc0aa61484d602206bbb8e8cf1b2a6e8 ea64f78f7d7625d05014f593c76438c7127d5e2b147d971601210279be667ef9dcbbac55a06295c e870b07029bfcdb2dce28d959f2815b16f81798ffffffff023997ef27000000001976a914751e76 e8199196d454941c45d1b3a323f1433bd688acafb2f501000000001976a914f6f5431d25bbf7b12 e8add9af5e3475c44a0a5b888ac00000000


Cheers Grin

BTC: bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
Akito S. M. Hosana
Jr. Member
*
Offline Offline

Activity: 434
Merit: 8


View Profile
August 05, 2025, 05:16:15 AM
Last edit: August 05, 2025, 06:47:38 AM by Akito S. M. Hosana
 #11329

Cheers Grin


There's just one thing left. How do I get the WIF from puzzle 71?   Undecided
fecell
Jr. Member
*
Offline Offline

Activity: 180
Merit: 2


View Profile
August 05, 2025, 06:49:42 AM
 #11330

Cheers Grin


There's just one thing left. How do I get the WIF from puzzle 71?   Undecided
it's easy.  Grin
fecell
Jr. Member
*
Offline Offline

Activity: 180
Merit: 2


View Profile
August 05, 2025, 06:54:15 AM
 #11331

i'v got

Quote
Speed: 3078.09 points*/ms

*) "point" is a three values: kG, +sG, -sG, at same one ms.

with 1650ti/4gb.
its a normal or slow result?
(cuda12.9/c++20/win64)
_AFK_
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 05, 2025, 08:41:30 AM
 #11332

true i few GeForce RTX 5090  will do the job for much less, the h200 is for Ai task using 4 RTX 5090  i can achieve  1_382_400_000_000_000  x day

for now i try few gpu

NVIDIA RTX A4000   818.15 MKey/s

GeForce RTX 5060 Ti  973.68 MKey/s

GeForce RTX 3080  1574.46

GeForce RTX 3060  656.09 MKey/s

GeForce RTX 3090 1324.28 MKey/s

GeForce RTX 4090   3061.96 MKey/s

GeForce RTX 4070 1286.45 MKey/s

GeForce RTX 5080  1988.08 MKey/s

GeForce RTX 3070  1014.12 MKey/s

NVIDIA RTX A5000  1338.56 MKey/s

GeForce RTX 5090  3956.87 MKey/s  top

GeForce RTX 4080 SUPER 1725.58 MKey/s

GeForce GTX 1070 119.88 MKey/s

NVIDIA H200 NVL  2871.53 MKey/s


any way to cut the key or skip consecutive number and letter smart way?

Well, those values are not correct.

I'm using a 5080 and i guarantee i have 2.5x faster speed and the GPU is limited to only use 70%. If i use it 100% power it will achieve 3.5x faster speed but as long as we go, it will decrease speed because of temperature.

I'm getting around 4.7/4.8 Gk/s (4700 Mk/s) on my rtx 5080 as you can see below.

PUZZLE: #71 - BALANCE:  7.10015251 BTC

OPTIMIZED RANDOM POINT: 6e30e2630000000000 [UNBIASED]
HEX: 6e30e2630000000000 >>> 6e30e263ffffffffff
DEC: 2032664334818258976768 >>> 2032664335917770604543
SEARCHING FOR PREFIX: "1PWo3JeB9jrGwf" - [COMPRESSED]

START TIME: 05/08/2025 - 09:34:53

DIFFICULTY: [2^40.00] - SEARCHING A TOTAL OF "1,099,511,627,775" KEYS
BLOOM FILTER: INITIALIZED WITH 1 PREFIX
DEVICE INFO: GPU 0 - NVIDIA GeForce RTX 5080 (15.92 GB), CUs: 84, CAP: 12.0, PCI: 1, L2 SIZE: 65536 KB
CUDA DEVICES: 1 - CUDA DRIVER/RUNTIME: 12.9/12.9

SPEED: [4.7 GK/s] - SEARCH: [2^34.58 - 2.34%] - RUN: [00:00:05] - END: [00:03:57] - TOTAL:

Let's continue this funny game, good luck all!
Tony8989
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
August 05, 2025, 08:57:54 AM
 #11333

true as told before bro im using  bitcrack, but  i try different GitHub project and i could achieve more fast,but the issue is some project skip the key and to stay safe i stick with bitcrack  what GitHub are you using thank you
_AFK_
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 05, 2025, 09:44:20 AM
 #11334

true as told before bro im using  bitcrack, but  i try different GitHub project and i could achieve more fast,but the issue is some project skip the key and to stay safe i stick with bitcrack  what GitHub are you using thank you

None. Grin

Custom coded.


onepuzzle
Newbie
*
Offline Offline

Activity: 26
Merit: 6


View Profile
August 05, 2025, 01:00:54 PM
 #11335

This Python script generates a fully signed raw Bitcoin transaction that can be used with the MARA Slipstream service (or any other broadcast method).

Automatically:
Fetches UTXOs (unspent outputs) from mempool.space

Code:
import base58
import requests
import ecdsa
from bitcoin import *
import hashlib

def decode_wif(wif):
    b = base58.b58decode(wif)
    if len(b) == 38 and b[-5] == 0x01:
        return b[1:-5], True  # compressed
    elif len(b) == 37:
        return b[1:-1], False  # uncompressed
    raise ValueError("Invalid WIF format")

def get_pubkey(priv_bytes, compressed=True):
    sk = ecdsa.SigningKey.from_string(priv_bytes, curve=ecdsa.SECP256k1)
    vk = sk.get_verifying_key()
    x = vk.pubkey.point.x()
    y = vk.pubkey.point.y()
    return ('02' if y % 2 == 0 else '03') + f"{x:064x}"  # Always compressed

def get_address(pubkey):
    pubkey_bytes = bytes.fromhex(pubkey)
    pubkey_hash = hash160(pubkey_bytes)
    return pubkey_to_address(pubkey)  # Always compressed P2PKH

def is_legacy_address(address):
    return address.startswith('1')

def fetch_utxos(address):
    if not is_legacy_address(address):
        raise ValueError("Only legacy addresses (starting with '1') are supported")
    
    try:
        url = f"https://mempool.space/api/address/{address}/utxo"
        r = requests.get(url)
        r.raise_for_status()
        return r.json()
    except Exception as e:
        print("Failed to fetch UTXOs:", e)
        return []

def estimate_fee(num_inputs, num_outputs, fee_rate):
    # Legacy transaction size estimation with compressed pubkeys
    input_size = 148  # Standard for P2PKH with compressed pubkey
    output_size = 34   # P2PKH output size
    total_size = 10 + num_inputs * input_size + num_outputs * output_size
    return total_size * fee_rate

def create_transaction(wif, to_address, amount_btc, fee_rate):
    # Validate addresses are legacy
    if not is_legacy_address(to_address):
        raise ValueError("Only legacy addresses (starting with '1') are supported for recipient")
    
    priv_bytes, _ = decode_wif(wif)  
    pubkey = get_pubkey(priv_bytes)
    from_address = get_address(pubkey)
    
    if not is_legacy_address(from_address):
        raise ValueError("Only legacy addresses (starting with '1') are supported for sender")

    utxos = fetch_utxos(from_address)
    if not utxos:
        raise RuntimeError("No UTXOs available")

    # Sort UTXOs by value (descending) to minimize number of inputs
    utxos.sort(key=lambda x: x['value'], reverse=True)

    inputs = []
    total = 0
    for utxo in utxos:
        inputs.append({'output': f"{utxo['txid']}:{utxo['vout']}", 'value': utxo['value']})
        total += utxo['value']
        if total >= int(amount_btc * 1e8) + estimate_fee(len(inputs), 2, fee_rate):
            break  # We have enough including fees

    if total == 0:
        raise RuntimeError("No UTXOs available")

    send_amount = int(amount_btc * 1e8)
    fee = estimate_fee(len(inputs), 2, fee_rate)

    if total < send_amount + fee:
        raise RuntimeError(f"Insufficient funds. Need {send_amount + fee} satoshis, have {total}")

    change = total - send_amount - fee
    outputs = [{'address': to_address, 'value': send_amount}]
    if change > 546:  # Minimum dust amount
        outputs.append({'address': from_address, 'value': change})
    elif change > 0:
        fee += change  # Add remaining change to fee if it's too small

    tx = mktx(inputs, outputs)
    for i in range(len(inputs)):
        tx = sign(tx, i, wif)
    return tx

# === Example Usage ===
if __name__ == "__main__":
    WIF = "<wif_private_key>"
    TO_ADDRESS = "1YourLegacyAddressHere"  # must start with '1'
    AMOUNT_BTC = 6.70013241
    FEE_RATE = 20  # sats/vB

    try:
        raw_tx = create_transaction(WIF, TO_ADDRESS, AMOUNT_BTC, FEE_RATE)
        print("Raw Transaction:", raw_tx)
        
        # To broadcast the transaction (uncomment to use)
        # broadcast_url = "https://mempool.space/api/tx"
        # response = requests.post(broadcast_url, data=raw_tx)
        # print("Broadcast response:", response.text)
    except Exception as e:
        print("Error:", e)

Example script output

Quote
Raw Transaction: 0100000002b3138da741af259146ca2c4895bac7e0c08147679f88ce3302fb4db0584bf31205000 0006b4830450221009131a350b98aab71d77f5a9a94dd5bac9a5602e2b761a2dc605ba03cb996df ff0220480b53128af0cf7c9b74fa8d625e2a9d143d15fdaa2fd24e421d4d0d29c1532201210279b e667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ffffffff6441384445 a0f426ee689e2532e41fc6947dda41558026b80f5b1dfd7c58455d130000006a473044022032ccf 651486b1055ea188d95645dc61329e9fa89a18b33417d33dc0aa61484d602206bbb8e8cf1b2a6e8 ea64f78f7d7625d05014f593c76438c7127d5e2b147d971601210279be667ef9dcbbac55a06295c e870b07029bfcdb2dce28d959f2815b16f81798ffffffff023997ef27000000001976a914751e76 e8199196d454941c45d1b3a323f1433bd688acafb2f501000000001976a914f6f5431d25bbf7b12 e8add9af5e3475c44a0a5b888ac00000000


Cheers Grin


You don't have to reinvent the wheel.

https://github.com/onepuzzle/btc-transaction
Menowa*
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
August 05, 2025, 01:34:42 PM
Last edit: August 07, 2025, 08:27:06 PM by Mr. Big
 #11336

This Python script generates a fully signed raw Bitcoin transaction that can be used with the MARA Slipstream service (or any other broadcast method).

Automatically:
Fetches UTXOs (unspent outputs) from mempool.space

Code:
import base58
import requests
import ecdsa
from bitcoin import *
import hashlib

def decode_wif(wif):
    b = base58.b58decode(wif)
    if len(b) == 38 and b[-5] == 0x01:
        return b[1:-5], True  # compressed
    elif len(b) == 37:
        return b[1:-1], False  # uncompressed
    raise ValueError("Invalid WIF format")

def get_pubkey(priv_bytes, compressed=True):
    sk = ecdsa.SigningKey.from_string(priv_bytes, curve=ecdsa.SECP256k1)
    vk = sk.get_verifying_key()
    x = vk.pubkey.point.x()
    y = vk.pubkey.point.y()
    return ('02' if y % 2 == 0 else '03') + f"{x:064x}"  # Always compressed

def get_address(pubkey):
    pubkey_bytes = bytes.fromhex(pubkey)
    pubkey_hash = hash160(pubkey_bytes)
    return pubkey_to_address(pubkey)  # Always compressed P2PKH

def is_legacy_address(address):
    return address.startswith('1')

def fetch_utxos(address):
    if not is_legacy_address(address):
        raise ValueError("Only legacy addresses (starting with '1') are supported")
    
    try:
        url = f"https://mempool.space/api/address/{address}/utxo"
        r = requests.get(url)
        r.raise_for_status()
        return r.json()
    except Exception as e:
        print("Failed to fetch UTXOs:", e)
        return []

def estimate_fee(num_inputs, num_outputs, fee_rate):
    # Legacy transaction size estimation with compressed pubkeys
    input_size = 148  # Standard for P2PKH with compressed pubkey
    output_size = 34   # P2PKH output size
    total_size = 10 + num_inputs * input_size + num_outputs * output_size
    return total_size * fee_rate

def create_transaction(wif, to_address, amount_btc, fee_rate):
    # Validate addresses are legacy
    if not is_legacy_address(to_address):
        raise ValueError("Only legacy addresses (starting with '1') are supported for recipient")
    
    priv_bytes, _ = decode_wif(wif)  
    pubkey = get_pubkey(priv_bytes)
    from_address = get_address(pubkey)
    
    if not is_legacy_address(from_address):
        raise ValueError("Only legacy addresses (starting with '1') are supported for sender")

    utxos = fetch_utxos(from_address)
    if not utxos:
        raise RuntimeError("No UTXOs available")

    # Sort UTXOs by value (descending) to minimize number of inputs
    utxos.sort(key=lambda x: x['value'], reverse=True)

    inputs = []
    total = 0
    for utxo in utxos:
        inputs.append({'output': f"{utxo['txid']}:{utxo['vout']}", 'value': utxo['value']})
        total += utxo['value']
        if total >= int(amount_btc * 1e8) + estimate_fee(len(inputs), 2, fee_rate):
            break  # We have enough including fees

    if total == 0:
        raise RuntimeError("No UTXOs available")

    send_amount = int(amount_btc * 1e8)
    fee = estimate_fee(len(inputs), 2, fee_rate)

    if total < send_amount + fee:
        raise RuntimeError(f"Insufficient funds. Need {send_amount + fee} satoshis, have {total}")

    change = total - send_amount - fee
    outputs = [{'address': to_address, 'value': send_amount}]
    if change > 546:  # Minimum dust amount
        outputs.append({'address': from_address, 'value': change})
    elif change > 0:
        fee += change  # Add remaining change to fee if it's too small

    tx = mktx(inputs, outputs)
    for i in range(len(inputs)):
        tx = sign(tx, i, wif)
    return tx

# === Example Usage ===
if __name__ == "__main__":
    WIF = "<wif_private_key>"
    TO_ADDRESS = "1YourLegacyAddressHere"  # must start with '1'
    AMOUNT_BTC = 6.70013241
    FEE_RATE = 20  # sats/vB

    try:
        raw_tx = create_transaction(WIF, TO_ADDRESS, AMOUNT_BTC, FEE_RATE)
        print("Raw Transaction:", raw_tx)
        
        # To broadcast the transaction (uncomment to use)
        # broadcast_url = "https://mempool.space/api/tx"
        # response = requests.post(broadcast_url, data=raw_tx)
        # print("Broadcast response:", response.text)
    except Exception as e:
        print("Error:", e)

Example script output

Quote
Raw Transaction: 0100000002b3138da741af259146ca2c4895bac7e0c08147679f88ce3302fb4db0584bf31205000 0006b4830450221009131a350b98aab71d77f5a9a94dd5bac9a5602e2b761a2dc605ba03cb996df ff0220480b53128af0cf7c9b74fa8d625e2a9d143d15fdaa2fd24e421d4d0d29c1532201210279b e667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ffffffff6441384445 a0f426ee689e2532e41fc6947dda41558026b80f5b1dfd7c58455d130000006a473044022032ccf 651486b1055ea188d95645dc61329e9fa89a18b33417d33dc0aa61484d602206bbb8e8cf1b2a6e8 ea64f78f7d7625d05014f593c76438c7127d5e2b147d971601210279be667ef9dcbbac55a06295c e870b07029bfcdb2dce28d959f2815b16f81798ffffffff023997ef27000000001976a914751e76 e8199196d454941c45d1b3a323f1433bd688acafb2f501000000001976a914f6f5431d25bbf7b12 e8add9af5e3475c44a0a5b888ac00000000


Cheers Grin


Did u test it? Do you have a example that it worked out?



Cheers Grin


There's just one thing left. How do I get the WIF from puzzle 71?   Undecided

I accidentally found it when i was typing  18 random numbers, i will send you so you can be happy Grin
onepuzzle
Newbie
*
Offline Offline

Activity: 26
Merit: 6


View Profile
August 05, 2025, 01:45:52 PM
 #11337

Cheers Grin


There's just one thing left. How do I get the WIF from puzzle 71?   Undecided

I accidentally found it when i was typing  18 random numbers, i will send you so you can be happy Grin

What are you talking about?
Akito S. M. Hosana
Jr. Member
*
Offline Offline

Activity: 434
Merit: 8


View Profile
August 05, 2025, 03:53:55 PM
 #11338

Cheers Grin


There's just one thing left. How do I get the WIF from puzzle 71?   Undecided

I accidentally found it when i was typing  18 random numbers, i will send you so you can be happy Grin

That’s like sneezing and solving a Rubik’s Cube mid-sneeze!  Grin
Tony8989
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
August 05, 2025, 04:02:55 PM
 #11339

Guys any GitHub project able to use rig or multiple GPU please thank you
neoman602
Newbie
*
Offline Offline

Activity: 24
Merit: 1


View Profile
August 05, 2025, 04:23:24 PM
 #11340

https://github.com/puzzleman22/bitcoin_puzzle_transformation - a project that uses transformations to find bitcoin puzzles
Pages: « 1 ... 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 [567] 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 ... 658 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!