Blockchain Mining – What is the Mining Puzzle Used in Ethereum?

blockchaindifficultyminingnonce

In case of Bitcoin we know that puzzle used is generating a nonce such that there is a fix number of Zeros in the hash. While in case of Ethereum blocks we couldn't find any similarity can someone put what is difficulty and how the Nonce is calculated in Ethereum

Best Answer

PoW is calculated as follows according to the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf):

The proof-of-work function takes the form (Page 16):

m = Hm and n <= 2256/Hd with (m, n) = PoW(Hk, Hn, d)

Where Hk is the new block’s header but without the block nonce and mix-hash components; Hn is the nonce of the header; d is a large data set needed to compute the mixHash and Hd is the new block’s difficulty value. PoW is the proof-of-work function that evaluates an array with the first item being the mixHash and the second item being a pseudorandom number cryptographically dependent on H and d. The pseudorandom number derived would therefore be equivalent to the "nonce" you derive in Bitcoin.

The block difficulty Hd is calculated from the previous block’s difficulty level and the timestamp. The formal definition of the difficulty D(H) is as follows: enter image description here

I hope this helps. Feel free to ask further questions if you have any.

Related Topic