LearnBitcoin

Bitcoin Dev Archive 2011

Pull request: faster initial blockchain download

1 message, 5 Sep 2011. Started by Gavin Andresen.

Gavin Andresen

Permalink Original thread on gnusha.org

Gavin Andresen permalink original

I'd appreciate review/feedback on this:

https://github.com/bitcoin/bitcoin/pull/492

This change skips ECDSA signature verification for transactions during the initial block-chain download, which makes downloading the block chain much faster.

"Initial block chain download" is all blocks up to 120 blocks before the last blockchain lock-in point.

Reasoning for why this is safe:

If an attacker tries to feed a client bad transactions during the initial block-chain download (transactions with invalid signatures), then they change the merkle tree, and at the first blockchain lock-in the bad chain will be rejected.

Transactions are still checked for orphan blocks that come in during initial block-chain-download (ConnectInputs will be called with fBlock=FALSE) and for mined blocks (ConnectInputs called with fMiner=TRUE).