<p>I'm not sure how exactly it was described in the whitepaper, but obviously every node checks new transactions for validity <em>before</em> adding them into their block template. i.e. between step 1 and step 2. As you stated, it would not make sense to waste energy on finding a proof-of-work without checking validity in beforehand.</p>

<p>However, each node needs to still check the validity of a block after it's been found. Otherwise they would be trusting the block author to have adhered to the rules. Why trust, when it's cheap to verify? ;)</p>

CC BY-SA 3.0
2017-05-29T18:12:06.250Z
Hi Murch, Thank you for your answer and explanation. So, it means that during proof-of -work and after this process the validity of the block is checking to prevent any attacks?
Mary_Si
CC BY-SA 3.0
2017-05-29T18:15:48.527Z
@Mary_Si: Yes, it means that every single full node on the network fully enforces all rules of Bitcoin by checking the validity of every piece of information relayed from the network.
Murch
CC BY-SA 3.0
2017-05-28T23:38:08.380Z
2017-06-28T03:41:26.690Z
2017-06-28T03:41:26.690Z
Murch
<p>I have question about bitcoin protocol. In Satoshi's paper it is mentioned that:</p>

<ol>
<li>New transactions are broadcast to all nodes.</li>
<li>Each node collects new transactions into a block.</li>
<li>Each node works on finding a difficult proof-of-work for its block.</li>
<li>When a node finds a proof-of-work, it broadcasts the block to all nodes.</li>
<li>Nodes accept the block only if all transactions in it are valid and not already spent.</li>
<li>Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.</li>
</ol>

<p>My question is, in step 5 nodes accepts the transactions if they are valid, so if a transaction is detected as "not valid" by a node after proof of work (i.e. step 4) it will not be accepted. I think if it is true, the power that is used for proof of work is wasted and it is not acceptable. I wanted to know am I understand this process well and is my assumption correct?</p>

<p>I will appreciate any guide and help.</p>

<p>Thank you</p>

<transactions><proof-of-work><transaction-verification><verification><whitepaper>
why verification of transaction after proof of work?
Mary_Si
# why verification of transaction after proof of work?

(Asked by: username_0 on 2017-05-28)

I have question about bitcoin protocol. In Satoshi's paper it is mentioned that:

1. New transactions are broadcast to all nodes.
2. Each node collects new transactions into a block.
3. Each node works on finding a difficult proof-of-work for its block.
4. When a node finds a proof-of-work, it broadcasts the block to all nodes.
5. Nodes accept the block only if all transactions in it are valid and not already spent.
6. Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

My question is, in step 5 nodes accepts the transactions if they are valid, so if a transaction is detected as "not valid" by a node after proof of work (i.e. step 4) it will not be accepted. I think if it is true, the power that is used for proof of work is wasted and it is not acceptable. I wanted to know am I understand this process well and is my assumption correct?

I will appreciate any guide and help.

Thank you

**Tags:** transactions, proof-of-work, transaction-verification, verification, whitepaper


---

## 1 answers

### Answer by username_1 on 2017-05-28. Score: 1

I'm not sure how exactly it was described in the whitepaper, but obviously every node checks new transactions for validity *before* adding them into their block template. i.e. between step 1 and step 2. As you stated, it would not make sense to waste energy on finding a proof-of-work without checking validity in beforehand.

However, each node needs to still check the validity of a block after it's been found. Otherwise they would be trusting the block author to have adhered to the rules. Why trust, when it's cheap to verify? ;)

> **Comments:**
> **username_0**: Hi username_1, Thank you for your answer and explanation. So, it means that during proof-of -work and after this process the validity of the block is checking to prevent any attacks?  
> **username_1**: @username_0: Yes, it means that every single full node on the network fully enforces all rules of Bitcoin by checking the validity of every piece of information relayed from the network.  

---

