4

I saw the global difficulty of Monero usually is showed as something like 80926050199 without unit, 80926050199.126 with no unit or 80G.

Could someone explain to me which is the unit of the global difficulty and what it exactly is?

3 Answers 3

2

With a difficulty of 80G, the network will need to try 80 billion hashes on average to find a new block. The difficulty is adjusted to target a block every 2 minutes or 120 seconds.

So a difficulty of 80G is based on the assumption that the current network hashrate is 80 billion / 120 = 666 MH/s.

If blocks are found faster than expected, it means that the network hashrate is higher than estimated and the network will automatically adjust the difficulty up to target a 2-minute block frequency again.

2
  • So difficulty hasn't a real unit and the 'G' is for billion, correct?
    – cialu
    Commented Jan 17, 2018 at 12:45
  • 1
    No not really, yes G is for Giga, i.e. billion.
    – assylias
    Commented Jan 17, 2018 at 12:54
5

The Monero network targets blocks to be mined at 120 seconds, using the difficulty so that hash_rate = difficulty / block_time, ie difficulty = hash_rate * block_time.

Unit analysis gives the difficulty unit to be hashes (H/s times s).

It is the expected number of hashes spent looking for a block.

3

The difficulty is simply a number specifying the maximum size for a block's PoW hash. With a difficulty of 80926050199, a block's PoW hash (represented as a big endian integer) must be below a certain number which you get by plugin in 80926050199 to a formula (essentially meaning the hash needs to start with a certain amount of zeros).

Note that a block's PoW hash is not the hash of the block, those are two different hashes. That's why you don't see the block hashes starting with zeros (as is the case in Bitcoin).

Compare two recent blocks of Monero and Bitcoin:

  • Monero, block hash is:

    f230ea967161f681be104fe780c5b77031a278d13b00e3745c5d4fbda70fef1d
    

and

  • Bitcoin, block hash is:

    00000000000000000031d742d75b751956fced7b6271ec0dcbaa579d324fa289
    

I think the PoW hash is not included inside a block (only implicitly).

3
  • To be valid, a hash must be below a certain threshold value that depends on the difficulty but is different from the difficulty: the higher the difficulty, the lower the threshold.
    – assylias
    Commented Jan 17, 2018 at 11:13
  • You're right, updated. Commented Jan 17, 2018 at 13:07
  • 1
    The statement: "Note that a block's PoW hash is not the hash of the block, those are two different hashes" is incorrect. An accepted blocks hash is the the PoW that the miner worked to find the hash and thus can be paid the block reward.
    – jtgrassie
    Commented Jun 26, 2018 at 12:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.