<p>Paraphrasing from the <a href="https://en.bitcoin.it/wiki/Protocol_rules#.22block.22_messages" rel="nofollow noreferrer">Protocol description on the Bitcoin-Wiki</a>:</p>

<p>The following checks are performed on the <strong>block</strong>:</p>

<ol>
<li>syntax for correctness</li>
<li>is not a duplicate</li>
<li>has at least one transaction</li>
<li>hash satisfies difficulty statement (nBits)</li>
<li>timestamp is not more than two hours in the future</li>
<li>first transaction is a <a href="https://bitcoin.stackexchange.com/q/4571/5406">Coinbase</a> transaction, no other transactions are.</li>
<li>Transactions adhere rules

<ol>
<li>has inputs and outputs</li>
<li>tx is smaller than MAX_BLOCK_SIZE</li>
<li>each output and the total are between <a href="https://bitcoin.stackexchange.com/q/4770/5406">0 and 21,000,000 bitcoin</a>.</li>
</ol></li>
<li>Coinbase's scriptSig length must be 2-100</li>
<li>Reject if sum of transaction sig opcounts > MAX_BLOCK_SIGOPS</li>
<li>Verify <a href="https://bitcoin.stackexchange.com/a/37225/5406">Merkle hash</a> of the transactions</li>
<li>Check if previous block is in main chain</li>
<li>difficulty statement (nBits) matches difficulty rules</li>
<li>timestamp is not older than median of 11 previous blocks</li>
</ol>

CC BY-SA 3.0
2015-11-07T14:43:35.583Z
2015-11-07T14:43:35.583Z
2017-04-13T12:47:33.583Z
Murch
<p>Since version 0.10.x, block headers are acquired separately, and therefore download is not delayed until previous blocks have been verified.</p>

<p>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?</p>

CC BY-SA 3.0
2015-09-10T07:47:28.850Z
I've looked here and in the developer guide, but this doesn't seem to have been answered before.
Murch
<block><synchronization><transaction-verification>
What happens in detail, when Bitcoin Core verifies a block during synchronization?
Murch
# What happens in detail, when Bitcoin Core verifies a block during synchronization?

(Asked by: username_0 on 2015-09-10)

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?

**Tags:** block, synchronization, transaction-verification

> **Comments:**
> **username_0**: I've looked here and in the developer guide, but this doesn't seem to have been answered before.  

---

## 1 answers

### Answer by username_0 on 2015-11-07. Score: 1 | Accepted answer

Paraphrasing from the [Protocol description on the Bitcoin-Wiki](https://en.bitcoin.it/wiki/Protocol_rules#.22block.22_messages):

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](https://bitcoin.stackexchange.com/q/4571/5406) 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](https://bitcoin.stackexchange.com/q/4770/5406).
8. Coinbase's scriptSig length must be 2-100
9. Reject if sum of transaction sig opcounts > MAX\_BLOCK\_SIGOPS
10. Verify [Merkle hash](https://bitcoin.stackexchange.com/a/37225/5406) 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


---

