While reviewing #27596 (ran loadtxoutset
in mainnet
before m_assumeutxo_data
is empty as currently in master - back to 1b1d711), got a core dumped
, so it seems there’s a potential issue if new releases ever remove snapshot details or a semi-experienced user performs a loadtxoutset
on a different “customised” binary version (not sure if this is a real use case).
02023-10-18T17:42:52Z [init] Using obfuscation key for /tmp/.test_utxo_2/blocks/index: 0000000000000000
1node/blockstorage.cpp:390 LoadBlockIndex: Assertion `GetParams().AssumeutxoForBlockhash(*snapshot_blockhash)' failed.
2Aborted (core dumped)
0/src/bitcoin-cli -datadir=${AU_DATADIR} getchainstates
1{
2 "headers": 813097,
3 "chainstates": [
4 {
5 "blocks": 368249,
6 "bestblockhash": "00000000000000000b7a08224a1cb00d337100ba7a46c03d04b2c2d8964efc37",
7 "difficulty": 52278304845.59168,
8 "verificationprogress": 0.086288278873286,
9 "coins_db_cache_bytes": 7969177,
10 "coins_tip_cache_bytes": 14908338995,
11 "validated": true
12 },
13 {
14 "blocks": 813097,
15 "bestblockhash": "0000000000000000000270c9fdce7b17db64cca91f90106964b58e33a4d91089",
16 "difficulty": 61030681983175.59,
17 "verificationprogress": 0.999997140098457,
18 "coins_db_cache_bytes": 419430,
19 "coins_tip_cache_bytes": 784649420,
20 "snapshot_blockhash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
21 "validated": false
22 }
23 ]
24}
- Perform a
loadtxoutset
inmainnet
on compiledbitcoind
adding the block hash from Sjors’s commit. - Once step 1 finishes, remove the added code from step 1 and compile again or just compile
master
without any changes on top. - Run
bitcoind
, soon it’ll crash with:
02023-10-18T17:42:52Z [init] init message: Loading block index…
12023-10-18T17:42:52Z [init] Assuming ancestors of block 00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815 have valid signatures.
22023-10-18T17:42:52Z [init] Setting nMinimumChainWork=000000000000000000000000000000000000000052b2559353df4117b7348b64
32023-10-18T17:42:52Z [init] Prune configured to target 3000 MiB on disk for block and undo files.
42023-10-18T17:42:52Z [init] [snapshot] detected active snapshot chainstate (/tmp/.test_utxo_2/chainstate_snapshot) - loading
52023-10-18T17:42:52Z [init] [snapshot] switching active chainstate to Chainstate [snapshot] @ height -1 (null)
62023-10-18T17:42:52Z [init] Opening LevelDB in /tmp/.test_utxo_2/blocks/index
72023-10-18T17:42:52Z [init] Opened LevelDB successfully
82023-10-18T17:42:52Z [init] Using obfuscation key for /tmp/.test_utxo_2/blocks/index: 0000000000000000
9node/blockstorage.cpp:390 LoadBlockIndex: Assertion `GetParams().AssumeutxoForBlockhash(*snapshot_blockhash)' failed.
10Aborted (core dumped)
02023-10-20T15:49:12Z [init] init message: Loading block index…
12023-10-20T15:49:12Z [init] Assuming ancestors of block 00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815 have valid signatures.
22023-10-20T15:49:12Z [init] Setting nMinimumChainWork=000000000000000000000000000000000000000052b2559353df4117b7348b64
32023-10-20T15:49:12Z [init] Prune configured to target 3000 MiB on disk for block and undo files.
42023-10-20T15:49:12Z [init] [snapshot] detected active snapshot chainstate (/tmp/.test_utxo_2/chainstate_snapshot) - loading
52023-10-20T15:49:12Z [init] [snapshot] switching active chainstate to Chainstate [snapshot] @ height -1 (null)
62023-10-20T15:49:12Z [init] Opening LevelDB in /tmp/.test_utxo_2/blocks/index
72023-10-20T15:49:12Z [init] Opened LevelDB successfully
82023-10-20T15:49:12Z [init] Using obfuscation key for /tmp/.test_utxo_2/blocks/index: 0000000000000000
92023-10-20T15:49:13Z [init] *** Assumeutxo data not found for the given blockhash '00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054'.
102023-10-20T15:49:13Z [init] Error: Assumeutxo data not found for the given blockhash '00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054'.
11Error: Assumeutxo data not found for the given blockhash '00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054'.
122023-10-20T15:49:13Z [init] Shutdown requested. Exiting.
132023-10-20T15:49:13Z [init] Shutdown: In progress...
142023-10-20T15:49:13Z [scheduler] scheduler thread exit
152023-10-20T15:49:13Z [shutoff] Flushed fee estimates to fee_estimates.dat.
162023-10-20T15:49:13Z [shutoff] Shutdown: done
02023-10-20T21:45:58Z [init] Using obfuscation key for /tmp/.test_utxo_2/blocks/index: 0000000000000000
12023-10-20T21:45:59Z [init] ERROR: Assumeutxo data not found for the given blockhash '00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054'.
22023-10-20T21:45:59Z [init] : Error loading block database.
3Please restart with -reindex or -reindex-chainstate to recover.
4: Error loading block database.
5Please restart with -reindex or -reindex-chainstate to recover.
62023-10-20T21:45:59Z [init] Aborted block database rebuild. Exiting.
72023-10-20T21:45:59Z [init] Shutdown: In progress...
82023-10-20T21:45:59Z [scheduler] scheduler thread exit
92023-10-20T21:45:59Z [shutoff] Flushed fee estimates to fee_estimates.dat.
102023-10-20T21:45:59Z [shutoff] Shutdown: done
02023-10-25T02:29:57Z [init] Using obfuscation key for /home/pablo/.test_utxo_2/regtest/blocks/index: 0000000000000000
12023-10-25T02:29:57Z [init] *** Assumeutxo data not found for the given blockhash 'f09b5835f3f8b39481f2af3257bbc2e82845552d4d2d6d31cf520fc24263ed5b'.
22023-10-25T02:29:57Z [init] Error: A fatal internal error occurred, see debug.log for details
3Error: A fatal internal error occurred, see debug.log for details
42023-10-25T02:29:57Z [init] Shutdown requested. Exiting.
52023-10-25T02:29:57Z [init] Shutdown: In progress...
62023-10-25T02:29:57Z [scheduler] scheduler thread exit
72023-10-25T02:29:57Z [shutoff] Flushed fee estimates to fee_estimates.dat.
82023-10-25T02:29:57Z [shutoff] Shutdown: done