how do nodes verify that a block has been solved and can be added to the blockchain

by hash tables   Last Updated July 10, 2019 19:27 PM - source

when a miner solves a block it gets sent out to the network, when other nodes receive it, how do they verify that the block received was indeed solved and can be added to the blockchain.

So you don't know what the answer is but if you got the answer you know what the question was.

Answers 3

StephenM wrote a good answer to that:

  1. The difficulty (or nBits as it is called in the code) is shorthand for how difficult it is to solve the block. Essentially, it encodes a target value, and the hash of the block (when treated as a 256 bit integer) must be below that target value to be considered solved.
Nick ODell
Nick ODell
December 18, 2015 01:32 AM

The other nodes can verify it by hashing the block using the supposed solution nonce, and if it returns the same hash as the solution, and it meets the difficulty restrictions (correct number of zeroes at the beginning), the that block is confirmed as solved.

February 04, 2016 20:01 PM

Let's say block #396716 has been just mined. The participants verify:

  1. Is the block really next? Simply look if the previous block is already accepted. Each block contains the ID of previous block.

  2. Has miner performed enough work? Because difficulty is now 120 this means there should be 120รท8 = 15 zeroes in the block ID.


000000000000000 <- 15 zeroes. Therefore miner spent enough work.

  1. Is the timestamp correct? Just test if it's near current time.
  2. Verify all transactions inside the block. This includes checking if miner sent himself the correct reward (currently 25 BTC). Next, all transactions are checked, if amounts match, signatures correct, etc..
Anlhord Smithson
Anlhord Smithson
February 04, 2016 20:38 PM

Related Questions

How does a new block get distributed

Updated December 08, 2017 23:27 PM

Private Blockchains: Validation

Updated February 11, 2019 03:27 AM

Bitcoin checks and balances

Updated March 25, 2019 08:27 AM