1

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?

3
  • 2
    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

2 Answers 2

2

Nonce of a header is the answer to that block.

Recall the mining process:

  • Create a template block header
  • Choose a nonce
  • Hash the block header
  • 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.

0

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.