Ethereum: Why does the median-past time average the last 11 block timestamps and not the last 12?

Understanding Ethereum’s Median-Past Time Average: Why 11 Blocks Instead of 12?

Ethereum, a decentralized blockchain platform, has been in existence since April 2014. One of the key features that sets it apart from other cryptocurrencies is its ability to calculate and display the median past time average (MPTA) for Block Timestamps. While this might seem like a straightforward concept, there are reasons behind the choice of using the last 11 Blocks instead of the last 12.

background on bip-113

In 2016, Ethereum Developers introduced a proposal that would allow the platform to calculate and display the MPTA. This was done by introducing the Median-Past time average (MPTA) Function in the Ethereum Smart Contract, which uses the timestamps from the last 11 blocks as input for its calculation.

why not use the last 12 blocks?

So, why do ethereum choose to use the last 11 Blocks instead of the last 12? The answer lies in the specifics of BIP-113. According to the proposal, the MPTA function using the timestamps from the last 11 blocks as input for its calculation. This is because the goal of calculating the MPTA is to determine the “Median” past time, which referers to the midpoint between two consecutive timestamp ranges.

To achieve this, Ethereum’s implementation ensures that the MPTA function takes into account the difference in Timestamp Lengths between the last 11 and last 12 Blocks. By using the last 11 blocks, the calculation effectively averages out the timestamps from both ranges, resulting in a single value representing the median past time.

The result: A One-Hour Offset

By doing so, ethereum is able to calculate the Impta for block timestamps that would otherwise be too short to display accurately. The use of the last 11 blocks allows the platform to provide a more accurate representation of the average past time without having to wait for an additional block.

Conclusion

In conclusion, the choice to use the last 11 blocks instead of the last 12 blocks is due to the specifics of bip-113 and the requirements of calculating the MPTA. By using the last 11 blocks, ethereum is able to provide a more accurate representation of the average past time without having to wait for an additional block. This feature has been a cornerstone of Ethereum’s Functionality Since its Inception in April 2014.

Further Reading:

  • For more information on bip-113 and ethereum’s implementation of MPTA, please refer to the Ethereum Whitepaper.

  • Additionally, you can find detailed explanations of the MPTA calculation on various online forums and communities dedicated to Ethereum Development.

TESTNET BEST WALLET

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *