# Do bitcoin miners calculate the hash value of current block or next block?

Bitcoin Asked by btc_beginner on November 11, 2021

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.

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.

Answered by David Schwartz on November 11, 2021

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

Miners do double round of SHA256

What they hash?

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

Answered by Hamita on November 11, 2021

## Related Questions

### What makes cross input signature aggregation complicated to implement?

1  Asked on January 2, 2021

### In a Proof of Stake (PoS) mining scheme what prevents miners from producing many more blocks or inflating the currency?

1  Asked on December 25, 2020 by kristopher-ives

### What kinds of wallets are there?

3  Asked on December 23, 2020 by karlito

### From Edge to Poloniex

1  Asked on December 22, 2020 by don-myers

### In theory could we skip the proposed Taproot soft fork, activate Simplicity instead and use Simplicity to write the equivalent of Taproot scripts?

1  Asked on December 20, 2020 by michael-folkson

### i have 0.10096 mbtc (0.00010096 BTC) in my btc wallet but when ever i try to send bitcoins it always says your balance is low to pay the fee

2  Asked on December 20, 2020 by noor-siddiq

### Create Raw Transaction in BitcoinJ offline starting from UTXO info

1  Asked on December 19, 2020 by andrean

### How do I calculate transaction fee for call to createpsbt()?

1  Asked on December 18, 2020

### What is the longest firstbits?

1  Asked on December 17, 2020 by lurf-jurv

1  Asked on December 15, 2020 by theruss

### Bip39 tool – BIP32 Extended Private Key vs BIP32 Root Key

1  Asked on December 14, 2020 by guillaume07

### How to configure bitcoind to wait for X confirmations to make the payment submitted

1  Asked on December 13, 2020 by valometrics-com

### Stale block verification at node level

2  Asked on December 10, 2020 by user87441

### How to import address with private key using importmulti

1  Asked on December 8, 2020 by kimon

### What is the program in Python that print information about the current block?

1  Asked on December 6, 2020 by roofnos

### What exactly is the relation between Bisq and Bitcoin Core?

1  Asked on December 5, 2020 by j-lotz

### How to automatically get transaction while sending BTC?

0  Asked on December 2, 2020 by abhishek-pandey