<blockquote>
<p>So my question is, what is the link between these 2 things? If nodes in the network are enough to verify transactions, why do we need miners?</p>
</blockquote>
<p>Suppose Alice forms two valid transactions, one sending a bitcoin to Bob and another sending the same bitcoin to Charlie. Without the miners, how can Bob or Charlie ever know which of them gets to keep the bitcoin?</p>
<p>And you might think that if Alice does that, well, neither Bob nor Charlie will assume they get to keep the bitcoin and Alice just played herself. But that won't work. Say Alice is buying a phone from Bob and Bob only sees the transaction giving him the bitcoin. Without the miners, how can Bob be assured that nobody will <em>ever</em> see a transaction from Alice giving that same bitcoin to someone else and decide that Bob didn't get a bitcoin from Alice. How can Bob ever send Alice her phone if he can never be sure the transaction to Charlie will never be accepted by anyone?</p>
<blockquote>
<p>When do miners enter in the game of validating transactions?</p>
</blockquote>
<p>Miners produce a blockchain that eventually contains only one of those two transactions, allowing Bob to know for sure that he will get the bitcoin from Alice and nobody else will.</p>
<blockquote>
<p>And how come that to verify transaction is relied with to find a nonce?</p>
</blockquote>
<p>It has to take some significant amount of work to build valid blocks, otherwise a massive number of valid blocks could be created and Bob would never be finished trying to figure out which of them would be accepted. By making it extremely expensive to create a valid block, Bob only has a small amount of work to do and an attacker can't create large numbers of valid blocks to stymie him.</p>

CC BY-SA 4.0
2022-02-17T10:55:25.830Z
So you say the point of miners is to avoid double-spending. Why can't we just put a timestamp to each transaction and the one that is created first is valid and the other one is rejected?
HiImEins
CC BY-SA 4.0
2022-02-17T11:38:09.080Z
And if I understand correctly, the purpose of mining - or solving the hashing problem - is to ensure that blocks are enchained in the blockchain one by one, each after 10 minutes in the case of Bitcoin?
HiImEins
CC BY-SA 4.0
2022-02-17T13:33:46.940Z
@HiImEins Yes, we can - arguably that is exactly what miners do: provide a decentralized timestamp on transactions (= the time of the block they end up in). You can imagine alternative sources of timestamps, but they inevitably rely on some trusted party's clock (because just because you see transaction A before transaction B does not mean that everyone sees them in the same order; communication takes time, and distance to the source is subjective).
Pieter Wuille
CC BY-SA 4.0
2022-02-17T09:50:47.810Z
2022-02-17T09:50:47.810Z
David Schwartz
<p>I'm going to explain a bit more about my question, by talking first about what I understand about blockchain and transaction in a decentralized network. Correct me if I'm wrong somewhere.</p>
<ul>
<li>In a decentralized network, every node has a copy of the ledger. If node A sends to node B an amount of bitcoins, he does it by broadcasting a message containing [sender - receiver - amount] together with a digital signature. Every other node in the network verifies the message with the signature, and if they (or the majority of them) consent that it is correct, the transaction is written into the ledger. Note that a node is not necessarily a miner, and here, to verify a message is no other than to compare 2 hashes.</li>
<li>Miners validate transactions/blocks by solving a math problem which is to find nonces.</li>
</ul>
<p>So my question is, what is the link between these 2 things? If nodes in the network are enough to verify transactions, why do we need miners? When do miners enter in the game of validating transactions? And how come that to verify transaction is relied with to find a nonce?</p>

CC BY-SA 4.0
2022-02-17T09:41:17.143Z
Does this answer your question? [1-CPU-1 Vote Bitcoin confusion](https://bitcoin.stackexchange.com/questions/106727/1-cpu-1-vote-bitcoin-confusion)
RedGrittyBrick
<mining-theory><validation>
How resolving nonce validates transactions?
HiImEins
# How resolving nonce validates transactions?

(Asked by: username_0 on 2022-02-17)

I'm going to explain a bit more about my question, by talking first about what I understand about blockchain and transaction in a decentralized network. Correct me if I'm wrong somewhere.

* In a decentralized network, every node has a copy of the ledger. If node A sends to node B an amount of bitcoins, he does it by broadcasting a message containing [sender - receiver - amount] together with a digital signature. Every other node in the network verifies the message with the signature, and if they (or the majority of them) consent that it is correct, the transaction is written into the ledger. Note that a node is not necessarily a miner, and here, to verify a message is no other than to compare 2 hashes.
* Miners validate transactions/blocks by solving a math problem which is to find nonces.

So my question is, what is the link between these 2 things? If nodes in the network are enough to verify transactions, why do we need miners? When do miners enter in the game of validating transactions? And how come that to verify transaction is relied with to find a nonce?

**Tags:** mining-theory, validation

> **Comments:**
> **username_1**: Does this answer your question? [1-CPU-1 Vote Bitcoin confusion](https://bitcoin.stackexchange.com/questions/106727/1-cpu-1-vote-bitcoin-confusion)  

---

## 1 answers

### Answer by username_2 on 2022-02-17. Score: 1

> So my question is, what is the link between these 2 things? If nodes in the network are enough to verify transactions, why do we need miners?

Suppose Alice forms two valid transactions, one sending a bitcoin to Bob and another sending the same bitcoin to Charlie. Without the miners, how can Bob or Charlie ever know which of them gets to keep the bitcoin?

And you might think that if Alice does that, well, neither Bob nor Charlie will assume they get to keep the bitcoin and Alice just played herself. But that won't work. Say Alice is buying a phone from Bob and Bob only sees the transaction giving him the bitcoin. Without the miners, how can Bob be assured that nobody will *ever* see a transaction from Alice giving that same bitcoin to someone else and decide that Bob didn't get a bitcoin from Alice. How can Bob ever send Alice her phone if he can never be sure the transaction to Charlie will never be accepted by anyone?

> When do miners enter in the game of validating transactions?

Miners produce a blockchain that eventually contains only one of those two transactions, allowing Bob to know for sure that he will get the bitcoin from Alice and nobody else will.

> And how come that to verify transaction is relied with to find a nonce?

It has to take some significant amount of work to build valid blocks, otherwise a massive number of valid blocks could be created and Bob would never be finished trying to figure out which of them would be accepted. By making it extremely expensive to create a valid block, Bob only has a small amount of work to do and an attacker can't create large numbers of valid blocks to stymie him.

> **Comments:**
> **username_0**: So you say the point of miners is to avoid double-spending. Why can't we just put a timestamp to each transaction and the one that is created first is valid and the other one is rejected?  
> **username_0**: And if I understand correctly, the purpose of mining - or solving the hashing problem - is to ensure that blocks are enchained in the blockchain one by one, each after 10 minutes in the case of Bitcoin?  
> **username_3**: @username_0 Yes, we can - arguably that is exactly what miners do: provide a decentralized timestamp on transactions (= the time of the block they end up in). You can imagine alternative sources of timestamps, but they inevitably rely on some trusted party's clock (because just because you see transaction A before transaction B does not mean that everyone sees them in the same order; communication takes time, and distance to the source is subjective).  

---

