Bitcoin Forum
September 25, 2024, 05:48:11 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Skipping validation for txs until the last checkpoint  (Read 1066 times)
Stefan Thomas (OP)
Full Member
***
Offline Offline

Activity: 234
Merit: 100


AKA: Justmoon


View Profile WWW
May 06, 2011, 04:41:53 AM
 #1

I'm dealing with a lot of block chain downloads and as such I've been thinking about how to speed it up. It seems that the official client validates all transactions, even ones that are deep in the block chain.

The hash of any given block guarantees the integrity of every previous block and the merkle tree guarantees the integrity of all transactions in those blocks. So couldn't we skip validation (other than the hashes/merkle) for everything up to the last checkpoint?


Twitter: @justmoon
PGP: D16E 7B04 42B9 F02E 0660  C094 C947 3700 A4B0 8BF3
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5334
Merit: 13303


View Profile
May 06, 2011, 04:45:42 AM
 #2

I wouldn't mind that as an option, but it seems bad to rely so much on checkpoints by default. Bitcoin.org would be telling you which blocks are right instead of which blocks are wrong, which I feel is an important distinction.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1134


View Profile
May 06, 2011, 08:52:45 AM
 #3

I'm dealing with a lot of block chain downloads and as such I've been thinking about how to speed it up. It seems that the official client validates all transactions, even ones that are deep in the block chain.

The hash of any given block guarantees the integrity of every previous block and the merkle tree guarantees the integrity of all transactions in those blocks. So couldn't we skip validation (other than the hashes/merkle) for everything up to the last checkpoint?

In the C++ the slow part is the indexing and data structure maintenance rather than the block integrity checks. If you want to run a full node you can't avoid it.

For a lightweight/client-mode/SPV implementation yes you can skip earlier blocks if you have an empty wallet and I plan to implement that optimization at some point in BitCoinJ.
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!