Bitcoin Forum
May 10, 2024, 05:09:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Skipping validation for txs until the last checkpoint  (Read 1051 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
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715317770
Hero Member
*
Offline Offline

Posts: 1715317770

View Profile Personal Message (Offline)

Ignore
1715317770
Reply with quote  #2

1715317770
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12982


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: 1129


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!