What’s in Atlantis? EIP100 (More efficient difficulty computations)

Stevan Lohja
2 min readAug 9, 2019

--

We are still on schedule to go to Atlantis! The Atlantis hard-fork schedule is as follows:

716_617 ~ Jun 19 on Kotti Classic PoA-testnet4_729_274 ~ Jul 29 on Morden Classic PoW-testnet8_772_000 ~ Sept. 17 ETC PoW-mainnet

It’s a pleasure to bring to you this series about the Atlantis hard-fork. We’ve covered much of the subset of upgrades from the state-trie clearing, contract code size limits, zkSNARKs, and opcodes.

Finally, EIP100 will change the difficulty adjustment to target mean block time including uncles.

EIP100:

Currently, the formula to compute the difficulty of a block includes the following logic:

adj_factor = max(1 - ((timestamp - parent.timestamp) // 10), -99)
child_diff = int(max(parent.difficulty + (parent.difficulty // BLOCK_DIFF_FACTOR) * adj_factor, min(parent.difficulty, MIN_DIFF)))
...

If block.number >= BYZANTIUM_FORK_BLKNUM, we change the first line to the following:

adj_factor = max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99)

The new formula allows higher predictability

This new formula ensures that the difficulty adjustment algorithm targets a constant average rate of blocks produced including uncles, and so ensures a highly predictable issuance rate that cannot be manipulated upward by manipulating the uncle rate.

By including uncles in the difficulty computation, we slightly decrease the avg block rate and decrease the uncle rate. Overall, EIP100 makes the difficulty computations more efficient

Atlantis in the Media

Resources:

Our ETC Labs Core Team Links: About | Github | Medium|Twitter|Discord | Telegram

Follow ETC Labs Social: Twitter | Facebook | LinkedIn

--

--