# Is the nonce in Bitcoin the answer to the puzzle from the previous block?

If, in Bitcoin, the nonce is included in the header of the proposed block, is it the answer to the puzzle from the previous block?

• If this is a question about a specific cryptocurrency, you should say which one. It's also a detail that must be covered in the relevant spec - have you checked it?
– bmm6o
Aug 31, 2018 at 1:07
• I have edited the question for bitcoin.
– MG2
Sep 1, 2018 at 2:46
• I don't know what you consider an 'answer', but a bitcoin block header has several fields including the hash of the previous block header (which also serves as its permanent id), and (separately) a nonce. See en.bitcoin.it/wiki/Block_hashing_algorithm and note that the nonce is 4 bytes while the prevblock-hash is 32 bytes. Sep 1, 2018 at 5:42

Recall the mining process:

• Create a template block header
• Choose a nonce
• If the hash is lower than network difficulty, broadcast it. Else, choose a different nonce.

To sum up, nonces are for individual blocks, and a different nonce is chosen until the template becomes a valid block.

The header of block consists of:

• Previous Hash
• Time stamp
• Tx_Root
• Nonce
• Current Hash

The Current Hash always points to Previous Hash in set of mined blocks. Miners collect all transactions in pool and add it to block. The task of miner is to find Nonce in equation.And hash the final answer which is obtained.

Mathematically

A = Hash(B || z) where A and B are known. Task is to find "z".

If it's correct then it will be considered as valid block and added to blockchain. And reward for that block is generated and miner will send the message across the nodes regarding the valid block.

• What's Tx_Root? Jul 20, 2021 at 20:39