<p>The connected peers do the first one. If it is invalid, they don't relay to other peers and the transaction gets forgotten. If it's valid, then peers relay it to their peers and then miners include the transaction in their block.</p>

CC BY-SA 3.0
2017-08-02T14:44:55.120Z
So based on your answer, verification occurs over a two stage process, right?
user123
CC BY-SA 3.0
2017-08-02T14:50:33.907Z
@user123 Three actually. Nodes check whether blocks are valid too.
MCCCS
CC BY-SA 3.0
2017-08-02T15:04:10.287Z
Sorry I am confused about the difference between peers, nodes and miners. Can you please explain that. Thank you.
user123
CC BY-SA 3.0
2017-08-02T15:19:01.000Z
@user123 A miner is a computer that generates new blocks, and collects the block reward + transaction fees of transactions in the blocks it finds. A node ≈ A peer, (But there's a small difference: https://ethereum.stackexchange.com/questions/11070/whats-the-difference-between-node-and-peer) A node is a computer that relays new transactions / new blocks to other nodes.
MCCCS
CC BY-SA 3.0
2017-08-02T14:19:48.293Z
2017-08-02T14:19:48.293Z
MCCCS
<p>You can mine a block with whatever rules you like. The key part is that the network will enforce the network rules, so when a node is determining if a broadcast block is valid, it will, at that point, check the validity of every transaction in the block. Technically, it's not up to the miner to validate the block, its up to the node</p>

CC BY-SA 3.0
2017-08-02T14:46:29.237Z
So based on your answer, both steps occur at the mining stage. Can you also clarify the difference between the miner and a node
user123
CC BY-SA 3.0
2017-08-02T15:18:45.230Z
A miner uses transactions and the current blockchain state to generate blocks, then broadcasts them to nodes.
Nodes validate and relay blocks
hedgedandlevered
CC BY-SA 3.0
2017-08-02T14:21:21.923Z
2017-08-02T14:21:21.923Z
hedgedandlevered
<p>I cannot clearly understand if the transaction verification is done over a single or double phase. This is my understanding. </p>

<ol>
<li><p>Once a transaction is completely assembled, its inputs and outputs defined with all the conditions, the inputs can be checked to make sure the sender has enough balance to process the transaction.</p></li>
<li><p>Block mining is performed to time stamp the transaction and prove that it existed at a certain timing. Therefore block mining is more of a confirmation that the transaction has occured at a specific time rather than checking the validation of inputs.</p></li>
</ol>

<p>If what I said is correct, who performs step one. Is it done by the receiver to make sure that the sender actually owns a real balance to make the payment?</p>

<p>If what I said is wrong, are step one and step two done together by the miner. And can someone please provide more detailed description of this verification process of inputs and time stamping because the none of the previous questions and answers address this clearly.</p>

<proof-of-work><transaction-verification><verification>
Transaction verification vs block mining
user123
# Transaction verification vs block mining

(Asked by: username_0 on 2017-08-02)

I cannot clearly understand if the transaction verification is done over a single or double phase. This is my understanding.

1. Once a transaction is completely assembled, its inputs and outputs defined with all the conditions, the inputs can be checked to make sure the sender has enough balance to process the transaction.
2. Block mining is performed to time stamp the transaction and prove that it existed at a certain timing. Therefore block mining is more of a confirmation that the transaction has occured at a specific time rather than checking the validation of inputs.

If what I said is correct, who performs step one. Is it done by the receiver to make sure that the sender actually owns a real balance to make the payment?

If what I said is wrong, are step one and step two done together by the miner. And can someone please provide more detailed description of this verification process of inputs and time stamping because the none of the previous questions and answers address this clearly.

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


---

## 2 answers

### Answer by username_1 on 2017-08-02. Score: 0 | Accepted answer

The connected peers do the first one. If it is invalid, they don't relay to other peers and the transaction gets forgotten. If it's valid, then peers relay it to their peers and then miners include the transaction in their block.

> **Comments:**
> **username_0**: So based on your answer, verification occurs over a two stage process, right?  
> **username_1**: @username_0 Three actually. Nodes check whether blocks are valid too.  
> **username_0**: Sorry I am confused about the difference between peers, nodes and miners. Can you please explain that. Thank you.  
> **username_1**: @username_0 A miner is a computer that generates new blocks, and collects the block reward + transaction fees of transactions in the blocks it finds. A node ≈ A peer, (But there's a small difference: https://ethereum.stackexchange.com/questions/11070/whats-the-difference-between-node-and-peer) A node is a computer that relays new transactions / new blocks to other nodes.  

---

### Answer by username_2 on 2017-08-02. Score: 0

You can mine a block with whatever rules you like. The key part is that the network will enforce the network rules, so when a node is determining if a broadcast block is valid, it will, at that point, check the validity of every transaction in the block. Technically, it's not up to the miner to validate the block, its up to the node

> **Comments:**
> **username_0**: So based on your answer, both steps occur at the mining stage. Can you also clarify the difference between the miner and a node  
> **username_2**: A miner uses transactions and the current blockchain state to generate blocks, then broadcasts them to nodes. Nodes validate and relay blocks  

---

