6

Since version 0.10.x, block headers are acquired separately, and therefore download is not delayed until previous blocks have been verified.

Previous questions about synchronization mention that the verification takes the most time: How does Bitcoin Core verify each block? I assume it checks each transaction's script, the merkle tree, and finally the blockhash, but how does that go in detail?

  • I've looked here and in the developer guide, but this doesn't seem to have been answered before. – Murch Sep 10 '15 at 7:47
1

Paraphrasing from the Protocol description on the Bitcoin-Wiki:

The following checks are performed on the block:

  1. syntax for correctness
  2. is not a duplicate
  3. has at least one transaction
  4. hash satisfies difficulty statement (nBits)
  5. timestamp is not more than two hours in the future
  6. first transaction is a Coinbase transaction, no other transactions are.
  7. Transactions adhere rules
    1. has inputs and outputs
    2. tx is smaller than MAX_BLOCK_SIZE
    3. each output and the total are between 0 and 21,000,000 bitcoin.
  8. Coinbase's scriptSig length must be 2-100
  9. Reject if sum of transaction sig opcounts > MAX_BLOCK_SIGOPS
  10. Verify Merkle hash of the transactions
  11. Check if previous block is in main chain
  12. difficulty statement (nBits) matches difficulty rules
  13. timestamp is not older than median of 11 previous blocks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.