[bitcoin-dev] Flag day activation of segwit

Luke Dashjr luke at dashjr.org
Mon Mar 13 03:01:40 UTC 2017


On Sunday, March 12, 2017 3:50:27 PM shaolinfry via bitcoin-dev wrote:
> // mandatory segwit activation between Oct 1st 2017 and Nov 15th 2017
> inclusive if (pindex->GetMedianTimePast() >= 1538352000 &&
> pindex->GetMedianTimePast() <= 1510704000 &&
> !IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus())) {
>     if (!((pindex->nVersion & VERSIONBITS_TOP_MASK) ==
>     VERSIONBITS_TOP_BITS) && (pindex->nVersion & VersionBitsMask(params,
>     Consensus::DEPLOYMENT_SEGWIT)) != 0) {
>         return state.DoS(2, error("ConnectBlock(): relayed block must
>         signal for segwit, please upgrade"), REJECT_INVALID,
>         "bad-no-segwit");
>     }
> }

I don't think this is actually BIP 9 compatible. Once activated, the bit loses 
its meaning and should not be set. So you need to check that it hasn't locked-
in already...

Also, IMO this should tolerate as many as 5% minus one non-signalling blocks.

Disclaimer: This are technical suggestions, and do not imply endorsement of 
the idea.

Luke


More information about the bitcoin-dev mailing list