<blockquote>
  <p>So when Alice sends Bob 10 BTC, how does this information get put onto the newest block? I guess I am wondering who collects all the transactions and then constructs the new block? Does the client facilitate this and how do we know it contains trustworthy data?</p>
</blockquote>

<p>That's what the Bitcoin software does. It relays transactions from anyone who generates them to the miners so they can include them in blocks. You know the data is trustworthy because you always check it completely. Bitcoin operates based entirely on mathematical rules and the data either follows the rules or it does not.</p>

<blockquote>
  <p>And when the block is discovered by a mining node, I understand that it tries to find a nonce which hashes to leading zeros as part of proof of work. I read that miners help 'verify' transactions. How does finding a nonce verify what is in the block? Or does the verifying refer to other nodes checking that "block + nonce" hashes to correct number of leading zeros?</p>
</blockquote>

<p>All the computational effort that a miner does on a block cannot be separated from that block or the nonce would no longer produce the leading zeroes. One of Bitcoin's rules is that among valid blocks, the one with the most computational effort wins. By heaping absurd amounts of computation on top of blocks, the mining process ensures that someone else cannot create their own valid block that "wins" over a block that contains a transaction you have considered accepted.</p>

CC BY-SA 3.0
2013-12-25T16:21:49.287Z
2013-12-25T16:21:49.287Z
David Schwartz
<p>Your question is:  How does finding a nonce verify what is in the block?</p>

<p>Since you have invested so many hash power, electricity, hardware and time to solve a block, it makes the block more legitimate.
It is like if I say that I will give 100$ to the one that win a 1km run that takes 10 minutes. Because the reward is high (here 100$) many will join the race.
A robber would have to also run 1km to be able to have its fraud block accepted. The problem is that he would have to win the next 5 races to have his chain accepted. 
So a robber that would like to fraud the chain would have to have more hash power than anybody else. At least 51% of the total hash power.
So the more the reward is high, the more we will have people joining the race and the more secure the bitcoin network will be.
Each block has a reward of 12.5 BTC. This rewards drops 50% about every 4 years. To this reward, you add the tx fees of all the transactions in the block.</p>

CC BY-SA 3.0
2018-03-08T19:20:55.047Z
2018-03-08T19:20:55.047Z
cbilodeau
<p>From what I understand, a new block contains all the transactions within the last 10 minutes.  So when Alice sends Bob 10 BTC, how does this information get put onto the newest block?  I guess I am wondering who collects all the transactions and then constructs the new block?  Does the client facilitate this and how do we know it contains trustworthy data?</p>

<p>And when the block is discovered by a mining node, I understand that it tries to find a nonce which hashes to leading zeros as part of proof of work.  I read that miners help 'verify' transactions.  How does finding a nonce verify what is in the block?  Or does the verifying refer to other nodes checking that "block + nonce" hashes to correct number of leading zeros?</p>

<block><mining-theory><verification><transaction-selection>
How exactly does a block get constructed and verified?
user11381
# How exactly does a block get constructed and verified?

(Asked by: username_0 on 2013-12-25)

From what I understand, a new block contains all the transactions within the last 10 minutes. So when Alice sends Bob 10 BTC, how does this information get put onto the newest block? I guess I am wondering who collects all the transactions and then constructs the new block? Does the client facilitate this and how do we know it contains trustworthy data?

And when the block is discovered by a mining node, I understand that it tries to find a nonce which hashes to leading zeros as part of proof of work. I read that miners help 'verify' transactions. How does finding a nonce verify what is in the block? Or does the verifying refer to other nodes checking that "block + nonce" hashes to correct number of leading zeros?

**Tags:** block, mining-theory, verification, transaction-selection


---

## 2 answers

### Answer by username_1 on 2013-12-25. Score: 1

> So when Alice sends Bob 10 BTC, how does this information get put onto the newest block? I guess I am wondering who collects all the transactions and then constructs the new block? Does the client facilitate this and how do we know it contains trustworthy data?

That's what the Bitcoin software does. It relays transactions from anyone who generates them to the miners so they can include them in blocks. You know the data is trustworthy because you always check it completely. Bitcoin operates based entirely on mathematical rules and the data either follows the rules or it does not.

> And when the block is discovered by a mining node, I understand that it tries to find a nonce which hashes to leading zeros as part of proof of work. I read that miners help 'verify' transactions. How does finding a nonce verify what is in the block? Or does the verifying refer to other nodes checking that "block + nonce" hashes to correct number of leading zeros?

All the computational effort that a miner does on a block cannot be separated from that block or the nonce would no longer produce the leading zeroes. One of Bitcoin's rules is that among valid blocks, the one with the most computational effort wins. By heaping absurd amounts of computation on top of blocks, the mining process ensures that someone else cannot create their own valid block that "wins" over a block that contains a transaction you have considered accepted.


---

### Answer by username_2 on 2018-03-08. Score: 0

Your question is: How does finding a nonce verify what is in the block?

Since you have invested so many hash power, electricity, hardware and time to solve a block, it makes the block more legitimate.
It is like if I say that I will give 100$ to the one that win a 1km run that takes 10 minutes. Because the reward is high (here 100$) many will join the race.
A robber would have to also run 1km to be able to have its fraud block accepted. The problem is that he would have to win the next 5 races to have his chain accepted.
So a robber that would like to fraud the chain would have to have more hash power than anybody else. At least 51% of the total hash power.
So the more the reward is high, the more we will have people joining the race and the more secure the bitcoin network will be.
Each block has a reward of 12.5 BTC. This rewards drops 50% about every 4 years. To this reward, you add the tx fees of all the transactions in the block.


---

