6

I have read the official announcement about the current PoW change and also seen the discussion on GitHub but this is very long and very technical. Could someone summarise what exactly has been changed in comparison to the original CryptoNight algorithm and how it makes currently available ASICs obsolete?

8

In versions 1 to 6 of the protocol, the CryptoNight algorithm was very roughly:

state = keccak(block_data)
scratchpad = fill_scratchpad(state)
loop 524,288 times
  address = compute_address(scratchpad, state)
  modification1(scratchpad, address)
  address = compute_address(scratchpad, state)
  modification2(scratchpad, address)
text = reduce(scratchpad, state)
result = extra_hash(keccak(mix(text, state)))

In version 7 of the protocol, it is:

state = keccak(block_data)
tweak = compute_tweak(block_data, state)
scratchpad = fill_scratchpad(state)
loop 524,288 times
  address = compute_address(scratchpad, state)
  modification1(scratchpad, address)
  extra_modification1(scratchpad, address)
  address = compute_address(scratchpad, state)
  modification2(scratchpad, address)
  extra_modification2(scratchpad, address, tweak)
text = reduce(scratchpad, state)
result = extra_hash(keccak(mix(text, state)))

So in version 7, two extra modifications are added to the computationally intensive loop. The extra_modification1 does some bit shuffling. The extra_modification2 mixes bits of the tweak into the scratchpad.

The idea of these changes to the CryptoNight algorithm is that to make an ASIC for it (when you already have an ASIC design for the previous version) you would have to rework the main loop because it now requires some extra gates (for bit shuffling) and access to some data that was not necessary before (block data in the tweak).

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.