# How were the “dynamically adjusted target” in mining expressed in the Yellow Paper?

The one validity condition present in the above list that is not found in other systems is the requirement for "proof-of-work". The precise condition is that the double-SHA-256 hash of every block, treated as a 256-bit number, must be less than a dynamically adjusted target, which as of the time of this writing is approximately 2187.

Ethereum White Paper - §Introduction to Bitcoin and Existing Concepts - Mining

How is the dynamically adjusted target expressed in the Yellow Paper? I mean, what is the mathematical term for it in the Yellow Paper? Is it related to Hd, the `difficulty`?

Yes, In the Ethereum blockchain, difficulty and the dynamically adjusted target are related(the difficulty is used to calculate a target.). Basically to keep the Ethereum network functioning as expected its needed to maintain the average block-time(approximately 14s).

Since the number of nodes is kept changing and the strategy to find a valid hash is enumerating the possibilities in which the time to find it is totally a random, the average block- time is controlled by the Ethash algorithm by making it hard to generate a block if the last blocks have been found in shorter time than usual and making it easy if it was found in lesser time.

The process of making the block generation hard or easy is done by dynamically adjusting a target where the hash of the next block should less than that target. That target is also expressed in terms of the difficulty at that block generation time.

As per the Ethash algorithm explained in the Github Ethereum wiki here,

Mining

The mining algorithm is defined as follows:

``````def mine(full_size, dataset, header, difficulty):
target = zpad(encode_int(2**256 // difficulty), 64)[::-1]
from random import randint
nonce = randint(0, 2**64)
while hashimoto_full(full_size, dataset, header, nonce) > target:
nonce = (nonce + 1) % 2**64
return nonce
``````

Dynamically adjusted Target is calculated according to the difficulty at the moment and in mining it keeps finding a nonce while a hash less than the target is generated.

• The Bitcoin whitepaper states the condition for the proof-of-work hash as: `To have at least N zero bits as the leftmost bits (= its value is under 2^N where N is a natual number)`. However, it seems Ethereum is different. I found a mathematical term about it: `n ≤ 2^256 / H_d`, but I couldn't find any restriction for the possible value of the `H_d` than `H_d∈ℙ` (according to the Yellow Paper). Also the Ethereum White Paper states that it uses double-SHA256 hashes. – Константин Ван Sep 14 '17 at 2:11
• I'm confusing. Is what you said really how Ethash works? – Константин Ван Sep 14 '17 at 2:15
• What I said is a very abstract idea on how ethereum controls the average block generation time. You need to know exact values? – Achala Dissanayake Sep 14 '17 at 5:56
• yes it varies, depending on the difficulty – Achala Dissanayake Sep 15 '17 at 5:36
• you may refer this answer here as well – Achala Dissanayake Sep 15 '17 at 11:00