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?

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.

  • So difficulty hasn't a real unit and the 'G' is for billion, correct? – cialu Jan 17 '18 at 12:45
  • 1
    No not really, yes G is for Giga, i.e. billion. – assylias Jan 17 '18 at 12:54
  • Ok, thank you so much for the explanation. – cialu Jan 17 '18 at 16:34
4

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).

  • 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 Jan 17 '18 at 11:13
  • You're right, updated. – Florian Schneider Jan 17 '18 at 13:07
  • 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 Jun 26 '18 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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