RareSkills Solidity Interview Question #37 Answered: What changed with block.timestamp before and after proof of stake?

Faybian Byrd
Coinmonks
Published in
2 min readMay 26, 2024

--

This series will provide answers to the list of Solidity interview questions that were published by RareSkills..

Question #37 (Medium): What changed with block.timestamp before and after proof of stake?

Answer: Before proof of stake, blocks came in on average about every 13 seconds with a fair amount of variance in actual block times. After proof of stake, blocks come in exactly every 12 seconds (except when a slot is missed). Thus, the intervals between block.timestamp values decreased by approximately 1 second after transitioning from proof of work to to proof of stake.

Demonstration:

Examine this screenshot from Etherscan which shows the latest blocks (at the time it was taken). Note that the block times are exactly 12 seconds apart:

Further Discussion:

In a proof of stake system, slots can be missed because a validator is offline or because they do not submit a block in time. In practice, this occurs in less than 1% of slots.

Connect with me:

Latest articles:

--

--

Faybian Byrd
Coinmonks

Senior Software Engineer, Full Stack/Frontend @Opentensor Foundation | Graduate - Advanced Solidity Bootcamp @ RareSkills. | Certified Solidity Developer (CSD)