Author

Topic: Is the current difficulty included in blockchain? (Read 657 times)

sr. member
Activity: 682
Merit: 269
Thank you both

Yes difficulty is part of block header.

This way node can just from seeing the header know if it satisfies the difficulty.

But the node also checks if the difficulty itself is not fake (lower) by calculating the current difficulty from whole blockchain.
legendary
Activity: 1027
Merit: 1005
Awesome, thanks! I knew some block explorers would show this but I didnt know if they collected the info manually (checking the difficulty in realtime with each block) or if it was actually recorded with the blockchain.

Thank you both
legendary
Activity: 1344
Merit: 1023
Mine at Jonny's Pool
Using the bitcoin client...

Code:
>bitcoin-cli getblockhash 1492
000000002590c6bd1c26c7afffb1dfb621950be4a6d9b89d019455c982997368

>bitcoin-cli getblock "000000002590c6bd1c26c7afffb1dfb621950be4a6d9b89d019455c982997368" true
{
  "hash": "000000002590c6bd1c26c7afffb1dfb621950be4a6d9b89d019455c982997368",
  "confirmations": 399504,
  "size": 216,
  "height": 1492,
  "version": 1,
  "merkleroot": "5c24d1f94f5315b8d9808f83e18a1dfce2dcfd1c4f3cae1241f38647908b1a76",
  "tx": [
    "5c24d1f94f5315b8d9808f83e18a1dfce2dcfd1c4f3cae1241f38647908b1a76"
  ],
  "time": 1232763992,
  "mediantime": 1232762084,
  "nonce": 3780540712,
  "bits": "1d00ffff",
  "difficulty": 1,
  "chainwork": "000000000000000000000000000000000000000000000000000005d505d505d5",
  "previousblockhash": "00000000b7f525ddd961b69117ec21f5fc253af5a60be885a72cab6cc65b4adc",
  "nextblockhash": "00000000c3a7bc56d1eaace7a174de16999db9e747aeec41ab62318f812b2678"
}

Hope this helps Smiley
copper member
Activity: 924
Merit: 1007
hee-ho.
For example, if I lookup block 1492 is there any information included with the block in the blockchain that would give the difficulty at the time the block was mined?

https://blockchain.info/block/000000002590c6bd1c26c7afffb1dfb621950be4a6d9b89d019455c982997368

yes. it's not so hard to check.
legendary
Activity: 1027
Merit: 1005
For example, if I lookup block 1492 is there any information included with the block in the blockchain that would give the difficulty at the time the block was mined?
Jump to: