[Ethereum] Difficulty and total difficulty

blocksdifficulty

This is the info of one of the blocks in my private blockchain:

{
  difficulty: 759585,
  extraData: "0xd783010409844765746887676f312e362e32856c696e7578",
  gasLimit: 4712388,
  gasUsed: 0,
  hash: "0xcf3366fbf4b6c9adf63386b1cc1ed03957df28c57f576a5a4ceef4041011d0c0",
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  miner: "0x37e5a459dbd48d4d9874e13cc334dab30373cece",
  nonce: "0x40f805725d02472c",
  number: 17000,
  parentHash: "0xaeb4da768e9e9cb4838e37128ffe895a2f8a684bf2a66339659bbb25a6e44a69",
  receiptRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  size: 537,
  stateRoot: "0x8e61e87fbe4df30634472018ffb7c3f7a8315901ace91f9244958e067bf84a6b",
  timestamp: 1467943085,
  totalDifficulty: 10000790891,
  transactions: [],
  transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  uncles: []
}

In this, what does the difficulty and the totalDifficulty parameters mean?

Best Answer

These are explained on the wiki in the JSON RPC README, under the entry for eth_getBlockByHash().

difficulty: QUANTITY - integer of the difficulty for this block.

totalDifficulty: QUANTITY - integer of the total difficulty of the chain until this block.

[ Where the difficulty itself is a measure of how difficult it is for a miner to mine a new block by finding a hash below a given target. An explanation of the calculations used to set Ethereum's difficulty can be found in this previous thread. ]

Related Topic