<p>If I'm a miner, I only want to mine a block that awards me. So I'll create a block that awards me the reward and see if I can find a nonce that makes the block valid. If so, then I am successful.</p>

CC BY-SA 4.0
2020-07-16T20:37:00.237Z
2020-07-16T20:37:00.237Z
David Schwartz
<p>After reading your question, you are a little confused, so i will try to explain:</p>
<p>Miners do double round of SHA256</p>
<p>What they hash?</p>
<p>They hash the blockheader...</p>
<p>What's the blockheader?</p>
<p>The blockheader is build from data</p>
<p>What data?</p>
<p>It's Build from:</p>
<p><code>Version:</code> The version of the block.</p>
<p><code>Previous block hash:</code> The Block Hash of the block that this block is being built on top of. This is what “chains” the blocks together.</p>
<p><code>Merkle root:</code> All of the transactions in this block, hashed together. Basically provides a single-line summary of all the transactions in this block.</p>
<p><code>Time:</code> When a miner is trying to mine this block, the Unix time at which this block header is being hashed is noted within the block header itself.</p>
<p><code>Bits:</code> A shortened version of the Target.</p>
<p><code>Nonce:</code> The field that miners change in order to try and get a hash of the block header (a Block Hash) that is below the Target.</p>
<p>All this is in <code>little endian</code></p>

CC BY-SA 4.0
2020-07-16T17:28:02.147Z
2020-07-16T17:28:02.147Z
Hamita
<p>I'm new in bitcoin and my question seems be stupid. I appreciate your help.
Miners calculates blockhash as picking a proper nonce.
And he is awarded.
To calculate block hash, he will need 6 values. 2 of them are merklehash and nonce.
I'm gonna say about merklehash and blockhash. Suppose that miner A is trying to calculate.
To calculate blockhash, merklehash is needed. But merklehash is a hash of all transactions of the block. The first transaction data is that a miner is awarded(?). That means merklehash is calculated after awarded miner is determined. What's the difference between awarded miner of this block transactions and A? I really don't understand.</p>

CC BY-SA 4.0
2020-07-16T10:12:10.530Z
@Murch that's not what I asked.
btc_beginner
CC BY-SA 4.0
2020-07-16T12:23:41.503Z
It seemed to me that you were asking about the order in which the coinbase transaction and the nonce are found. The coinbase tx is picked first, then the miner tries nonces to make their block template a valid block. This is described in the linked question. If you are asking something else,  please edit your question to clarify. I'll reopen the question.
Murch
<proof-of-work>
Do bitcoin miners calculate the hash value of current block or next block?
btc_beginner
# Do bitcoin miners calculate the hash value of current block or next block?

(Asked by: username_0 on 2020-07-15)

I'm new in bitcoin and my question seems be stupid. I appreciate your help.
Miners calculates blockhash as picking a proper nonce.
And he is awarded.
To calculate block hash, he will need 6 values. 2 of them are merklehash and nonce.
I'm gonna say about merklehash and blockhash. Suppose that miner A is trying to calculate.
To calculate blockhash, merklehash is needed. But merklehash is a hash of all transactions of the block. The first transaction data is that a miner is awarded(?). That means merklehash is calculated after awarded miner is determined. What's the difference between awarded miner of this block transactions and A? I really don't understand.

**Tags:** proof-of-work

> **Comments:**
> **username_0**: @username_1 that's not what I asked.  
> **username_1**: It seemed to me that you were asking about the order in which the coinbase transaction and the nonce are found. The coinbase tx is picked first, then the miner tries nonces to make their block template a valid block. This is described in the linked question. If you are asking something else,  please edit your question to clarify. I'll reopen the question.  

---

## 2 answers

### Answer by username_2 on 2020-07-16. Score: 1

If I'm a miner, I only want to mine a block that awards me. So I'll create a block that awards me the reward and see if I can find a nonce that makes the block valid. If so, then I am successful.


---

### Answer by username_3 on 2020-07-16. Score: 1

After reading your question, you are a little confused, so i will try to explain:

Miners do double round of SHA256

What they hash?

They hash the blockheader...

What's the blockheader?

The blockheader is build from data

What data?

It's Build from:

`Version:` The version of the block.

`Previous block hash:` The Block Hash of the block that this block is being built on top of. This is what “chains” the blocks together.

`Merkle root:` All of the transactions in this block, hashed together. Basically provides a single-line summary of all the transactions in this block.

`Time:` When a miner is trying to mine this block, the Unix time at which this block header is being hashed is noted within the block header itself.

`Bits:` A shortened version of the Target.

`Nonce:` The field that miners change in order to try and get a hash of the block header (a Block Hash) that is below the Target.

All this is in `little endian`


---

