Bitcoin Forum
October 03, 2024, 05:11:47 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Checking the block chain on load  (Read 9807 times)
satoshi (OP)
Founder
Sr. Member
*
qt
Offline Offline

Activity: 364
Merit: 7065


View Profile
August 16, 2010, 08:07:46 PM
 #1

SVN rev 139 does a basic check of the block chain after loading.

With this we wouldn't have needed to delete blk*.dat, it would have automatically done a reorg back to the fork.  There wasn't time to do a careful implementation of this at the time.

It might take longer than we want, since it has to load all the blocks.  If it's too slow, we could have it only go back to a certain block number.
Insti
Sr. Member
****
Offline Offline

Activity: 294
Merit: 252


Firstbits: 1duzy


View Profile
August 16, 2010, 08:43:19 PM
 #2

I assume it will take more than 1 second to do.
Do we have to do this every time it starts up Sad

Can we make a menu option for it, to fire it off manually?
And make a counter so that it reminds you to check every n loads/days.
or whenever you update the software.

It just seems that needing to recheck the entire block chain will be a very rare event, so rechecking the block chain all the time is overkill.

satoshi (OP)
Founder
Sr. Member
*
qt
Offline Offline

Activity: 364
Merit: 7065


View Profile
August 18, 2010, 06:28:28 PM
 #3

In the next SVN rev, I'll make it only go back to the last checkpoint at block 74000.  If we need to correct a problem in the future, we can always make sure it goes back at least as far back as the problem.  Also, I'm adding code to verify the block index, which means the proof-of-work chain is checked.

Still, the system won't be entirely secure against your blk*.dat files.  You are trusting someone if you use a copy of their blk files.
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!