Pruned node missing some coinbase UTXOs (version: 28.1) #33071

issue OreoCookieRustDev openend this issue on July 27, 2025
  1. OreoCookieRustDev commented at 7:26 am on July 27, 2025: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    Bitcoin Core version: 28.1 Node state: Fully synced, pruned Observed issue: Using a fully synced pruned node (prune=550), I scanned the UTXO set using bitcoin-cli scantxoutset for the address 1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj (known to contain the original 50 BTC coinbase from satoshis block 8).

    The result returns only small non-coinbase dust UTXOs totaling 0.00012281 BTC - every transaction except the coinbase.

    The expected 50 BTC coinbase UTXO is missing.

    This is a huge issue as if some early wallets decided to spend their coins pruned nodes would reject them as invalid.

    Expected behaviour

    Coinbase transactions should appear no matter how old, even on a pruned node.

    The balance should report

    50.00012281 not 0.00012281

    Steps to reproduce

    Config: blocksxor=0 dbcache=32768 maxmempool=1000 par=8 txindex=0 prune=550

    Start a new node.

    After synced run:

    bitcoin-cli scantxoutset start “[{"desc":"addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)"}]”

    Relevant log output

      0bitcoin-cli scantxoutset start "[{\"desc\":\"addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)\"}]"
      1{
      2  "success": true,
      3  "txouts": 167397304,
      4  "height": 907383,
      5  "bestblock": "0000000000000000000050b8446a2b0e76cd37563a2fe1718526ba6b6c445e8f",
      6  "unspents": [
      7    {
      8      "txid": "970babece9a5c64da043f3300a5c9b8cc4af572e4b6445c107aebfe8d4b2b202",
      9      "vout": 0,
     10      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     11      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     12      "amount": 0.00000546,
     13      "coinbase": false,
     14      "height": 889797,
     15      "blockhash": "000000000000000000019849a60b83488ea846790f279d4a593f31db48fe12c7",
     16      "confirmations": 17587
     17    },
     18    {
     19      "txid": "63fc8344f68031d9fd268285788da6dc1a19121bc7ba5f82e4690a8dc7f74a0a",
     20      "vout": 0,
     21      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     22      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     23      "amount": 0.00000546,
     24      "coinbase": false,
     25      "height": 889809,
     26      "blockhash": "000000000000000000016d5aa40f51f1789db679e5f40b94483dddd7ce8a44d9",
     27      "confirmations": 17575
     28    },
     29    {
     30      "txid": "3f64f5a48fd860d4fb192df1988954a062303226eb80fad6c3379f8e3ec0a20c",
     31      "vout": 0,
     32      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     33      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     34      "amount": 0.00000548,
     35      "coinbase": false,
     36      "height": 906883,
     37      "blockhash": "00000000000000000000be25a44d918d2159e5c5b4282730f614979bbe9c2985",
     38      "confirmations": 501
     39    },
     40    {
     41      "txid": "596e2a816c6b0d83f9b1b2ba1ab47aa63aa06451bcb2b95335cb21b7cc14d818",
     42      "vout": 0,
     43      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     44      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     45      "amount": 0.00000700,
     46      "coinbase": false,
     47      "height": 905786,
     48      "blockhash": "00000000000000000000c6073752801891705825ed9038637f11a2f3eca36d2d",
     49      "confirmations": 1598
     50    },
     51    {
     52      "txid": "672ee3dfef7f1b90293a3776c3995d0c84ebe82f94a5d7403f0bcc51fce5eb1f",
     53      "vout": 0,
     54      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     55      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     56      "amount": 0.00000546,
     57      "coinbase": false,
     58      "height": 834311,
     59      "blockhash": "000000000000000000037e88d14f9bcf99e8121faa2c23b1bc10f2f3a554e110",
     60      "confirmations": 73073
     61    },
     62    {
     63      "txid": "bcb466f4753426ac498bb43333fb02ff145abe4455c87a7043e1ddde76160325",
     64      "vout": 0,
     65      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     66      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     67      "amount": 0.00000700,
     68      "coinbase": false,
     69      "height": 905620,
     70      "blockhash": "00000000000000000001e1097ae918824669ec7a090ddf4568735673d0f7af8f",
     71      "confirmations": 1764
     72    },
     73    {
     74      "txid": "b92947c2803f7f46a80ff35be587beca9f70599d52026597e778c606bf942854",
     75      "vout": 0,
     76      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     77      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     78      "amount": 0.00000546,
     79      "coinbase": false,
     80      "height": 889809,
     81      "blockhash": "000000000000000000016d5aa40f51f1789db679e5f40b94483dddd7ce8a44d9",
     82      "confirmations": 17575
     83    },
     84    {
     85      "txid": "8eeacc40538b094b17f2e278dd53a2f6f68e7126ee81bff0ea3bec2fd9a42f66",
     86      "vout": 559,
     87      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     88      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
     89      "amount": 0.00000547,
     90      "coinbase": false,
     91      "height": 642635,
     92      "blockhash": "0000000000000000000362f4c59614eefbb6170fd0b1f3065b4b893cd9972b4a",
     93      "confirmations": 264749
     94    },
     95    {
     96      "txid": "eae4537e85ef54cb20408a385115f0cf88090f27609d4fa0f384b4aa633999a8",
     97      "vout": 309,
     98      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
     99      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    100      "amount": 0.00000547,
    101      "coinbase": false,
    102      "height": 646789,
    103      "blockhash": "0000000000000000000095b7bce82d0d69abb7fcd077dc9b2bce4e0cb7ced0ff",
    104      "confirmations": 260595
    105    },
    106    {
    107      "txid": "5570099b4c974df32705415329a5d1dbd75e7d8c1982db9f711d2ecc4daff1b9",
    108      "vout": 0,
    109      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    110      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    111      "amount": 0.00000600,
    112      "coinbase": false,
    113      "height": 881170,
    114      "blockhash": "000000000000000000020e0a0e9086623df520128b093a86536c880a69b00be5",
    115      "confirmations": 26214
    116    },
    117    {
    118      "txid": "560b57b385f49efd263b5528d40b54a193eff61ec58abfa589ff95b42ef835bb",
    119      "vout": 0,
    120      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    121      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    122      "amount": 0.00002000,
    123      "coinbase": false,
    124      "height": 843595,
    125      "blockhash": "00000000000000000001b74d236a985b936d7d6276ccfa730cb7757c99657293",
    126      "confirmations": 63789
    127    },
    128    {
    129      "txid": "cf57f19b9d2c3b0bd688781c5eb1885ed74cc9b51ae7d94bc580c8de385735c8",
    130      "vout": 0,
    131      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    132      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    133      "amount": 0.00001111,
    134      "coinbase": false,
    135      "height": 840860,
    136      "blockhash": "0000000000000000000034d48677190c6f44979ffcad1e8b313d062299908895",
    137      "confirmations": 66524
    138    },
    139    {
    140      "txid": "bf20b2a7820d7a950eaa236c13749382832835bd93721dec1cc2a124761d97c9",
    141      "vout": 0,
    142      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    143      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    144      "amount": 0.00000546,
    145      "coinbase": false,
    146      "height": 889809,
    147      "blockhash": "000000000000000000016d5aa40f51f1789db679e5f40b94483dddd7ce8a44d9",
    148      "confirmations": 17575
    149    },
    150    {
    151      "txid": "8f716720ef9caf72149e262748e543df1fc2996cb5ae95d6cec2678dd06601ce",
    152      "vout": 9,
    153      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    154      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    155      "amount": 0.00000588,
    156      "coinbase": false,
    157      "height": 564789,
    158      "blockhash": "0000000000000000001a7d2ca8dbec097dee5c4faac737b28758d19710caed57",
    159      "confirmations": 342595
    160    },
    161    {
    162      "txid": "4fd07bfc09e31eb2a27bf4873af6aebefdfad7a920aeb2cf04e58cc62cab8bd0",
    163      "vout": 0,
    164      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    165      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    166      "amount": 0.00000546,
    167      "coinbase": false,
    168      "height": 889809,
    169      "blockhash": "000000000000000000016d5aa40f51f1789db679e5f40b94483dddd7ce8a44d9",
    170      "confirmations": 17575
    171    },
    172    {
    173      "txid": "3f184ca05d8d7c8e0d11e550ce897cb4a9f52c6e599fd22d62603aa82ac17de8",
    174      "vout": 0,
    175      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    176      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    177      "amount": 0.00000570,
    178      "coinbase": false,
    179      "height": 906824,
    180      "blockhash": "000000000000000000012d235393ac9977f8bb89e4bce514c684ee3958995246",
    181      "confirmations": 560
    182    },
    183    {
    184      "txid": "a66b0e20ca318ff84dd5da4c099fb9bcaee60bbc2da637b912bfb73345ffc9e9",
    185      "vout": 151,
    186      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    187      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    188      "amount": 0.00000547,
    189      "coinbase": false,
    190      "height": 667553,
    191      "blockhash": "00000000000000000000e297bcc894987014870ab9b381d95ec244b731b258b9",
    192      "confirmations": 239831
    193    },
    194    {
    195      "txid": "239cfce453bd562b3cc820e4bb9178fe4816bc73ab62292f33088d1893b1a3ec",
    196      "vout": 100,
    197      "scriptPubKey": "76a914bb7f084e57f4f250cab45f73c62841f83bf1d5f688ac",
    198      "desc": "addr(1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj)#q9gkw72r",
    199      "amount": 0.00000547,
    200      "coinbase": false,
    201      "height": 661018,
    202      "blockhash": "0000000000000000000477e07701c3163c8c72730061cda1169d87fd6161d6ed",
    203      "confirmations": 246366
    204    }
    205  ],
    206  "total_amount": 0.00012281
    207}
    

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    Bitcoin Core version v28.1.0

    Operating system and version

    Ubuntu 24.04.2 LTS

    Machine specifications

    Linux Ubuntu 24.04.2 LTS, 13th Gen Intel(R) Core(TM) i7-13650HX (2.60 GHz) 64GB RAM Kingston NV2 SSD 562.2 Mbps download / 49.8 Mbps upload

  2. OreoCookieRustDev closed this on Jul 27, 2025

  3. pinheadmz commented at 10:33 am on July 27, 2025: member

    Using a fully synced pruned node (prune=550), I scanned the UTXO set using bitcoin-cli scantxoutset for the address 1J6PYEzr4CUoGbnXrELyHszoTSz3wCsCaj (known to contain the original 50 BTC coinbase from satoshis block 8).

    First of all I think you mean block 9 ;-) And second of all, this is not known and is in fact incorrect! Satoshi did not use a pay-to-pubkey-hash address. If you check that coinbase transaction on an explorer you’ll see the output script is a raw, uncompressed pay-to-public-key:

    410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac

    Converting this to a descriptor means trimming off the length byte at the beginning and the CHECKSIG opcode at the end. Try this scan:

    bitcoin-cli scantxoutset start '[{"desc":"pk(0411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3)"}]'

    And finally, since we know this output was SPENT, we should expect it to NOT appear in the UTXO set.

    I am currently scanning for the block 1 coinbase P2PK on my pruned node, I’ll let you know how it goes…

  4. pinheadmz commented at 11:34 am on July 27, 2025: member

    finally…

     0$ bitcoin-cli -rpcclienttimeout=999999999999999 scantxoutset start  '[{"desc":"pk(0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee)"}]'
     1{
     2  "success": true,
     3  "txouts": 167415131,
     4  "height": 907405,
     5  "bestblock": "000000000000000000017573b428d3f13ad8944f368b53ad195ad03b3bdbb1a1",
     6  "unspents": [
     7    {
     8      "txid": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
     9      "vout": 0,
    10      "scriptPubKey": "410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac",
    11      "desc": "pk([119b098e]0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee)#886589wh",
    12      "amount": 50.00000000,
    13      "coinbase": true,
    14      "height": 1,
    15      "blockhash": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048",
    16      "confirmations": 907405
    17    }
    18  ],
    19  "total_amount": 50.00000000
    20}
    
  5. OreoCookieRustDev commented at 1:50 am on July 31, 2025: none
    I marked it closed cause I was stupid. I did mean block 8 but looking up by address doesn’t work for early coinbase one has to look up by pk

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-08-13 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me