<ol>
<li><p>Yes, but that doesn't mean that the network has accepted it.</p></li>
<li><p><a href="https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages" rel="noreferrer">There are rules for accepting a transaction.</a>  Miners only include blocks that don't break the rules.  The rules include checking that the inputs are valid, that a coin isn't double-spent, that the output isn't more than the input, etc.</p></li>
</ol>

<p>A miner can choose to include a transaction or not.  A miner could even choose to include a transaction that breaks the rules!  But if he does that, other miners that are following the rules won't accept his block and he won't get his mining reward.  So he has incentive to follow the rules.</p>

CC BY-SA 3.0
2016-02-23T20:24:30.927Z
thank you for the answer here -- how much does it cost computationally for the miner to do so? would that incentivize them to include less transactions as it takes longer to validate each one?
streetlight
CC BY-SA 3.0
2016-12-17T13:54:43.060Z
@streetlight The computanional cost of verification is almost negligible compared to that of creating a block. Also, transactions normally have fees attached to them which will outweigh the verification cost.
kirelagin
CC BY-SA 3.0
2013-04-06T16:23:29.170Z
2013-04-06T16:23:29.170Z
Eyal
<p>I am trying to understand the role played by various nodes in the Bitcoin Network in verifying the transactions that are taking place in real time. I think that I understand the process of Transaction (using Input and Output Scripts) and how the Transaction is formed. However I am trying to correlate it with how a Transaction is Broadcasted to other nodes and then verified?</p>

<p>Consider an example:</p>

<p>if A wants to send some BTC to B, then 2 things will occur:</p>

<p>(a) A will form the input script of the new transaction. It will reference the output script of a previous transaction where A received some BTC (in the past). It will prove the ownership of those BTC by using its Public Key and verifying the Signature.</p>

<p>(b) The output script for the new transaction will be formed by A's client. It will store the hash of the BTC Address of B and enable it to spend these BTC in future.</p>

<p>Now, my questions are:</p>

<ol>
<li><p>All these actions are performed by the Bitcoin Client of A and it does not require any interaction with the Peer to Peer Network. It has its own local copy of the Block Chain which it can use to perform the step a. So, isn't the transaction verified by the bitcoin client of A?</p></li>
<li><p>I am guessing that this new transaction that was created (input and output scripts formed as described above) will be broadcasted to the entire Bitcoin Network. Now, what type of verification is being performed by other nodes on this transaction?</p></li>
</ol>

<p>On what basis is a Transaction accepted by the Bitcoin Network and integrated into the Block which is a part of the Block Chain?</p>

<p>Thanks.</p>

<transactions><transaction-verification>
How do nodes verify Bitcoin Transactions?
Neon Flash
# How do nodes verify Bitcoin Transactions?

(Asked by: username_0 on 2013-04-06)

I am trying to understand the role played by various nodes in the Bitcoin Network in verifying the transactions that are taking place in real time. I think that I understand the process of Transaction (using Input and Output Scripts) and how the Transaction is formed. However I am trying to correlate it with how a Transaction is Broadcasted to other nodes and then verified?

Consider an example:

if A wants to send some BTC to B, then 2 things will occur:

(a) A will form the input script of the new transaction. It will reference the output script of a previous transaction where A received some BTC (in the past). It will prove the ownership of those BTC by using its Public Key and verifying the Signature.

(b) The output script for the new transaction will be formed by A's client. It will store the hash of the BTC Address of B and enable it to spend these BTC in future.

Now, my questions are:

1. All these actions are performed by the Bitcoin Client of A and it does not require any interaction with the Peer to Peer Network. It has its own local copy of the Block Chain which it can use to perform the step a. So, isn't the transaction verified by the bitcoin client of A?
2. I am guessing that this new transaction that was created (input and output scripts formed as described above) will be broadcasted to the entire Bitcoin Network. Now, what type of verification is being performed by other nodes on this transaction?

On what basis is a Transaction accepted by the Bitcoin Network and integrated into the Block which is a part of the Block Chain?

Thanks.

**Tags:** transactions, transaction-verification


---

## 1 answers

### Answer by username_1 on 2013-04-06. Score: 7

1. Yes, but that doesn't mean that the network has accepted it.
2. [There are rules for accepting a transaction.](https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages) Miners only include blocks that don't break the rules. The rules include checking that the inputs are valid, that a coin isn't double-spent, that the output isn't more than the input, etc.

A miner can choose to include a transaction or not. A miner could even choose to include a transaction that breaks the rules! But if he does that, other miners that are following the rules won't accept his block and he won't get his mining reward. So he has incentive to follow the rules.

> **Comments:**
> **username_2**: thank you for the answer here -- how much does it cost computationally for the miner to do so? would that incentivize them to include less transactions as it takes longer to validate each one?  
> **username_3**: @username_2 The computanional cost of verification is almost negligible compared to that of creating a block. Also, transactions normally have fees attached to them which will outweigh the verification cost.  

---

