Bitcoin Forum
November 27, 2026, 03:22:21 PM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Testnet4 node constantly having its index corrupted  (Read 771 times)
LoyceV
Legendary
*
Offline

Activity: 4242
Merit: 23251


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
March 29, 2026, 08:32:41 PM
 #21

Forks restarted: https://fork.observer/
I checked the last few forked blocks on mempool.space, and both blocks (the active one and the replaced one) send the block reward to the same address. So it looks like someone's running multiple miners to make sure his block beats anything else.

I'll schedule restarting my Bitcoin Core tomorrow.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
[MUSIC] The Ballad of LoyceV
LoyceV
Legendary
*
Offline

Activity: 4242
Merit: 23251


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
March 30, 2026, 07:51:22 AM
Last edit: April 04, 2026, 08:03:00 AM by LoyceV
Merited by BlackHatCoiner (4)
 #22

Hey Loyce, since your server is still running without any error messages, could you add blockfilterindex=1 in your bitcoin.conf and restart it?
~
Edit: you might need to restart with bitcoind --reindex
Done! It's currently running this:
Code:
~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf -reindex



That took less than 40 minutes.

I've entered this:
Code:
sleep 1h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 3h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 5h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 7h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 9h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 11h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 13h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 15h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 17h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 19h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 21h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 23h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 25h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 27h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 29h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 31h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 33h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 35h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 37h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 39h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 41h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 43h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 45h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 47h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 49h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 51h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 53h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 55h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 57h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 59h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 61h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 63h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 65h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 67h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 69h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
sleep 71h && ~/bitcoin-28.0/bin/bitcoin-cli -testnet4 stop && sleep 1h && ~/bitcoin-28.0/bin/bitcoind -testnet4 -conf=/home/loyce/.bitcoin/testnet4/bitcoin.conf &
This should toggle bitcoind to stop and restart every hour for the coming 3 days.

Feel free to keep an eye on my debug.log Smiley

Update: my node survived all my restarts.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
[MUSIC] The Ballad of LoyceV
BlackHatCoiner (OP)
Legendary
*
Offline

Activity: 2198
Merit: 10290


View Profile
April 27, 2026, 01:08:39 PM
 #23

Just had the same problem now that I ran bitcoind --testnet4 after a long time:
Code:
2026-04-27T13:04:44.613795Z Using obfuscation key for /home/batman/.bitcoin/testnet4/indexes/blockfilter/basic/db: 0000000000000000
2026-04-27T13:04:44.613872Z [error] ReadFilterHeader: previous block header belongs to unexpected block 0000000000d13eb3b35a78d17c272b7540301dc0825f398a950399a61eaffb5d; expected 000000000090d333e0e4946a9e255ddecfd988d2d31a7507484290984adc8811
2026-04-27T13:04:44.613878Z [error] Cannot read last block filter header; index may be corrupted
2026-04-27T13:04:44.613919Z Shutdown: In progress...
2026-04-27T13:04:44.614397Z scheduler thread exit
2026-04-27T13:04:44.618021Z Flushed fee estimates to fee_estimates.dat.
2026-04-27T13:04:44.646897Z Shutdown: done

It's pretty clearly a block filter index issue. I'm very curious to know why LoyceV cannot reproduce this on his VPS. It's most likely a reorging thing. My node receives a chain that is reorged later, and the block filter index becomes corrupted for some reason. (Which is a semi-serious bug; reindexing testnet4 takes a few minutes, but mainnet can take a lot more time, if the user is unfortunate enough to shut down his node on a reorged mainnet block.)

Maybe the reason why I can reproduce it is because I rarely shut down the node with bitcoin-cli stop. I may just turn off my computer with Bitcoin running.
LoyceV
Legendary
*
Offline

Activity: 4242
Merit: 23251


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
April 27, 2026, 01:27:19 PM
 #24

Maybe the reason why I can reproduce it is because I rarely shut down the node with bitcoin-cli stop. I may just turn off my computer with Bitcoin running.
Lol. You should have started with that! In that case, stop doing that and see if it happens again after a graceful shutdown.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
[MUSIC] The Ballad of LoyceV
nc50lc
Legendary
*
Offline

Activity: 3346
Merit: 9390


Self-proclaimed Genius


View Profile
April 28, 2026, 04:17:19 AM
 #25

Maybe the reason why I can reproduce it is because I rarely shut down the node with bitcoin-cli stop. I may just turn off my computer with Bitcoin running.
Even so, if you close your terminal or used CTRL+C, bitcoind will try its best to cleanly shutdown.
In the former, shutdown procedure will not display but it should be gracefully shutting-down in the background, but it may get interrupted if you immediately power-off the machine.
You can always check each session in your debug.log if it's abruptly cut or it contains those usual shutdown procedures (thread exits, wallet release, etc).

Or do you mean you're shutting-down the machine while it's running?

Anyways, this PR already have a a few reviews and will likely fix the issue: github.com/bitcoin/bitcoin/pull/34897

Pages: « 1 [2]  All
  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!