<blockquote>
<p>I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed.</p>
</blockquote>
<p>The nonce is a value that a miner can change. It is one part of a block. The other parts are block headers and transaction details. The hash is of most of this, not just the nonce. The hash must be less than the current target &quot;difficulty&quot;.</p>
<blockquote>
<p>Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself and the transactions chosen, the previous hash, and other relevant items are hashed all together?</p>
</blockquote>
<p>The latter.</p>
<p>As I mentioned, the comparison is not the number of leading zero bits but a normal numeric comparison. The hash must be numerically less than the target.</p>
<blockquote>
<p>If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred?</p>
</blockquote>
<p>A block can contain no real transactions other than the so-called &quot;coinbase&quot; transaction which pays the miner a mining reward.</p>
<p>Including other people's transactions allows the miner to collect and claim the transaction fees. SO there is a financial incentive for the miner to include transactions.</p>
<blockquote>
<p>If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions?</p>
</blockquote>
<p>Yes.</p>
<blockquote>
<p>If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes.</p>
</blockquote>
<p>No.</p>

CC BY-SA 4.0
2021-05-11T19:09:16.800Z
All miners (who want to) can add the transaction to the "block candidate" they're working on. The first who manages to produce an actual block (which meets PoW) that includes the transaction gets it and the fee. Miners have complete authority over the decision what to include in their blocks, as long as the block is valid (no invalid transactions, no money printing, resource limits, ...). Blocks have a "weight" limit, which miners need to stay below.
Pieter Wuille
CC BY-SA 4.0
2021-04-12T00:36:30.797Z
Awesome. Thank you very much for your comments. This helps me a lot! Got more questions. Hope you don't mind. If a new transaction is broadcasted, which miner gets to record in a block? Whoever records it in a block and issues it first gets rewarded? Like a competition? Does a miner get to decide how many transactions to be recorded in a block? If you know, can you please share some current applications or cases with me where bitcoin networks and blockchain technologies are actually used in transaction processing? Sorry again for asking so many dumb questions at once. Thanks!
Michael M.
CC BY-SA 4.0
2021-04-11T18:59:01.953Z
2021-04-11T18:59:01.953Z
RedGrittyBrick
<p>I am trying to understand about what bitcoin is. I conceptualize bitcoin as a proof of work required when a new block (or new coin) is created. I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed. (please correct me if my understanding is wrong).
Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself <em>and</em> the transactions chosen, the previous hash, and other relevant items are hashed all together? If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred? If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions? If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes. I am sorry for the dumb questions, but please help me to understand these fundamentals right. Thank you very much!</p>

CC BY-SA 4.0
2021-04-11T18:25:09.617Z
Here's a resource about Nano which is a cryptocurrency that requires PoW for every transaction : https://www.reddit.com/r/nanocurrency/comments/gxwbxu/how_exactly_does_the_proof_of_work_work_on_nano/
MCCCS
CC BY-SA 4.0
2021-04-12T00:04:46.193Z
@MCCCS thank you for the link and your help!
Michael M.
<bitcoin-core-development><proof-of-work><nonce>
When should proof-of-work be done? Does it involve in mining a coin? Can it be done without real transactions to be recorded?
Michael M.
# When should proof-of-work be done? Does it involve in mining a coin? Can it be done without real transactions to be recorded?

(Asked by: username_0 on 2021-04-11)

I am trying to understand about what bitcoin is. I conceptualize bitcoin as a proof of work required when a new block (or new coin) is created. I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed. (please correct me if my understanding is wrong).
Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself *and* the transactions chosen, the previous hash, and other relevant items are hashed all together? If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred? If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions? If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes. I am sorry for the dumb questions, but please help me to understand these fundamentals right. Thank you very much!

**Tags:** bitcoin-core-development, proof-of-work, nonce

> **Comments:**
> **username_1**: Here's a resource about Nano which is a cryptocurrency that requires PoW for every transaction : https://www.reddit.com/r/nanocurrency/comments/gxwbxu/how_exactly_does_the_proof_of_work_work_on_nano/  
> **username_0**: @username_1 thank you for the link and your help!  

---

## 1 answers

### Answer by username_2 on 2021-04-11. Score: 1

> I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed.

The nonce is a value that a miner can change. It is one part of a block. The other parts are block headers and transaction details. The hash is of most of this, not just the nonce. The hash must be less than the current target "difficulty".

> Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself and the transactions chosen, the previous hash, and other relevant items are hashed all together?

The latter.

As I mentioned, the comparison is not the number of leading zero bits but a normal numeric comparison. The hash must be numerically less than the target.

> If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred?

A block can contain no real transactions other than the so-called "coinbase" transaction which pays the miner a mining reward.

Including other people's transactions allows the miner to collect and claim the transaction fees. SO there is a financial incentive for the miner to include transactions.

> If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions?

Yes.

> If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes.

No.

> **Comments:**
> **username_0**: Awesome. Thank you very much for your comments. This helps me a lot! Got more questions. Hope you don't mind. If a new transaction is broadcasted, which miner gets to record in a block? Whoever records it in a block and issues it first gets rewarded? Like a competition? Does a miner get to decide how many transactions to be recorded in a block? If you know, can you please share some current applications or cases with me where bitcoin networks and blockchain technologies are actually used in transaction processing? Sorry again for asking so many dumb questions at once. Thanks!  
> **username_3**: All miners (who want to) can add the transaction to the "block candidate" they're working on. The first who manages to produce an actual block (which meets PoW) that includes the transaction gets it and the fee. Miners have complete authority over the decision what to include in their blocks, as long as the block is valid (no invalid transactions, no money printing, resource limits, ...). Blocks have a "weight" limit, which miners need to stay below.  

---

