Bitcoin Forum
May 12, 2024, 03:17:18 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Power Failure During IBD - Verifying Data Integrity  (Read 81 times)
keystroke (OP)
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1014


advocate of a cryptographic attack on the globe


View Profile
May 12, 2023, 06:54:01 PM
Last edit: May 12, 2023, 07:06:54 PM by keystroke
Merited by LoyceV (4), ABCbits (3)
 #1

I recently experienced a power failure while performing the Initial Block Download onto a Samsung T7 solid state drive, which was partitioned for ext4 and mounted with the default data=ordered journaling option. My node was running with the following parameters: -txindex=1 -blockfilterindex=1 peerblockfilters=1.

The node started back up without any issues. However, I am concerned about the possibility of data corruption (blocks, indexes, etc.) due to the power failure. To be on the safe side, I've decided to restart the node with -checkblocks=0 -checklevel=3 options to verify the integrity of the stored data.

Is this enough to ensure that no data has been corrupted due to the power failure? Or should I consider taking additional steps to verify the integrity of my node data?

Thank you in advance for your help!

"The difference between a castle and a prison is only a question of who holds the keys."
1715527038
Hero Member
*
Offline Offline

Posts: 1715527038

View Profile Personal Message (Offline)

Ignore
1715527038
Reply with quote  #2

1715527038
Report to moderator
1715527038
Hero Member
*
Offline Offline

Posts: 1715527038

View Profile Personal Message (Offline)

Ignore
1715527038
Reply with quote  #2

1715527038
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715527038
Hero Member
*
Offline Offline

Posts: 1715527038

View Profile Personal Message (Offline)

Ignore
1715527038
Reply with quote  #2

1715527038
Report to moderator
1715527038
Hero Member
*
Offline Offline

Posts: 1715527038

View Profile Personal Message (Offline)

Ignore
1715527038
Reply with quote  #2

1715527038
Report to moderator
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5599


Self-proclaimed Genius


View Profile
May 13, 2023, 03:54:10 AM
Merited by ABCbits (2)
 #2

Is this enough to ensure that no data has been corrupted due to the power failure? Or should I consider taking additional steps to verify the integrity of my node data?
-checklevel can be set up to level 4, see if you need the highest level of verification: https://github.com/bitcoin/bitcoin/blob/9d85c03620bf660cfa7d13080f5c0b191579cbc3/src/validation.cpp#L92-L99

In case there's a corrupted data due to power-failure, it's usually those latest block, block index, chainstate that are being written before the power failure.
So ideally, Bitcoin Core should be able to detect those with the default parameters.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mendace
Sr. Member
****
Offline Offline

Activity: 462
Merit: 616


Pizza Maker 2023 | Bitcoinbeer.events


View Profile WWW
May 15, 2023, 07:52:58 PM
 #3

If the node restarts successfully without reporting errors or data corruption, that's a good sign that data integrity has been preserved.  However, for added security, you might consider performing additional verifications or checks, for example by using specific verification tools such as "bitcoin-cli verifychain" or "bitcoin-cli -checklevel=4".
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5599


Self-proclaimed Genius


View Profile
May 16, 2023, 05:43:16 AM
Merited by ABCbits (1)
 #4

-snip-  for example by using specific verification tools such as "bitcoin-cli verifychain" or "bitcoin-cli -checklevel=4".
-checklevel is a command line option that should be added to your node, not an rpc command.
It has to be used with either bitcoind or bitcoin-qt.

It's also worth mentioning that both will use the default which will only check the last 6 blocks,
So to mimic OP's procedure, you'll need to add "0" value 'nBlocks' arg to verifychain command to verify everything.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  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!