why verification of transaction after proof of work? I have question about bitcoin protocol. In Satoshi's paper it is mentioned that:


New transactions are broadcast to all nodes.
Each node collects new transactions into a block.
Each node works on finding a difficult proof-of-work for its block.
When a node finds a proof-of-work, it broadcasts the block to all nodes.
Nodes accept the block only if all transactions in it are valid and not already spent.
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
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? ;)