Suppose a BIP9 feature is set to expire on day T. Suppose further that the retargeting period before T actually ends on day T+5, but the retargeting period (2016 blocks) actually signals for the BIP9 feature 95%+. Does the feature get activated or not?

I ask as this is a realistic scenario should BIP148 gain traction.


As per BIP 9, the transition to FAILED takes precendence. Which means that the feature will not be activated via BIP09. The relevant part of the code.

case STARTED: if (GetMedianTimePast(block.parent) >= timeout) { return FAILED; } int count = 0; walk = block; for (i = 0; i < 2016; i++) { ...

  • Well, here's the weird thing, can you just mine with timestamps that are on time T-1? GetMedianTimePast is the average of the last 10. Does it check that it's actually near the time the blocks got relayed?
    – Jimmy Song
    May 30 '17 at 4:04
  • 1
    From bitcoin Wiki: A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you. As a result, block timestamps are not exactly accurate, and they do not even need to be in order. Block times are accurate only to within an hour or two. The difference is about 2 hours.
    – sanket1729
    May 30 '17 at 4:16

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.