<p>If the block is released by mining pool or miner, each peer running bitcoin wallet such as bitcoin-qt or bitcoind will verify the transactions in the block before relaying the block.</p>

<p>The steps are following:</p>

<ol>
<li>Verify SHA256 block hash which is structured from version, pref_block,merkle_root,timestamp, bits, nonce and standard SHA256 padding. When the block hash is invalid or minimum difficulty level it is rejected.</li>
</ol>

<p>The pools or miners are supposed to release blocks according to these <a href="https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages" rel="nofollow">protocol rules</a></p>

<p>One of them:</p>

<blockquote>
  <p>For each input, look in the main branch and the transaction pool to find the referenced output transaction. If the output transaction is missing for any input, this will be an orphan transaction. Add to the orphan transactions, if a matching transaction is not in there already.</p>
</blockquote>

<p>So there are multiple rules that must be followed for a block to get accepted and then relayed.</p>

CC BY-SA 3.0
2014-02-02T07:27:24.543Z
For the highligted part, how much time does it take to find the referenced output transaction? My question is really about the time taken to do the search for the referenced output transaction
Smagula
CC BY-SA 3.0
2014-02-02T07:38:21.623Z
@Smagula We really cannot say that it takes `x ms` it depends on the proccessing power that is verifying the transactions outputs and inputs. I cannot help in this way.
Marek
CC BY-SA 3.0
2014-02-01T07:22:36.370Z
2014-02-01T07:22:36.370Z
Marek
<p>When a miner includes a transaction in a block, according to the integrity rules the miner should search for a previous transaction which output the coins being used in the current transaction. Now, the previous transaction is a record stored somewhere deep inside the blockchain.</p>

<p>What is the time taken to search and validate the previous txn output in the blockchain data structure?</p>

<transactions><blockchain>
Searching through the blockchain
Smagula
# Searching through the blockchain

(Asked by: username_0 on 2014-02-01)

When a miner includes a transaction in a block, according to the integrity rules the miner should search for a previous transaction which output the coins being used in the current transaction. Now, the previous transaction is a record stored somewhere deep inside the blockchain.

What is the time taken to search and validate the previous txn output in the blockchain data structure?

**Tags:** transactions, blockchain


---

## 1 answers

### Answer by username_1 on 2014-02-01. Score: 2

If the block is released by mining pool or miner, each peer running bitcoin wallet such as bitcoin-qt or bitcoind will verify the transactions in the block before relaying the block.

The steps are following:

1. Verify SHA256 block hash which is structured from version, pref\_block,merkle\_root,timestamp, bits, nonce and standard SHA256 padding. When the block hash is invalid or minimum difficulty level it is rejected.

The pools or miners are supposed to release blocks according to these [protocol rules](https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages)

One of them:

> For each input, look in the main branch and the transaction pool to find the referenced output transaction. If the output transaction is missing for any input, this will be an orphan transaction. Add to the orphan transactions, if a matching transaction is not in there already.

So there are multiple rules that must be followed for a block to get accepted and then relayed.

> **Comments:**
> **username_0**: For the highligted part, how much time does it take to find the referenced output transaction? My question is really about the time taken to do the search for the referenced output transaction  
> **username_1**: @username_0 We really cannot say that it takes `x ms` it depends on the proccessing power that is verifying the transactions outputs and inputs. I cannot help in this way.  

---

