From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8CE93B77 for ; Mon, 13 Mar 2017 22:18:19 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 044C8156 for ; Mon, 13 Mar 2017 22:18:15 +0000 (UTC) Received: by mail-pg0-f53.google.com with SMTP id g2so54054695pge.3 for ; Mon, 13 Mar 2017 15:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=SWbFS7k1ketV9wArvaI6AB4THx/TQapQm11c5c+i0hs=; b=L9K+R/1erXFwb0zvMSV4NjglwhYsWGCKV8K8M8wp6zqf5U6YhCTmiOWM9Ei+riKlBD KFAI/TNyNTCn7FaQ+2MuGo2qZAakrHDJzzn7I8so60J3y4EITTcwnZ6B7BXibc+oBcNq euKrcwmS8PaNsaFWIQHYz/yU6u57J1koD971YqI2EItuHUiIAObhQF1v3Ov7lGWYTNju LncXQVAqa8Hcyn3eY10Hv7Cacrtq+G7Y5U+SFBsubK3EbniGQj5lDQgFsl7AjOfV+6zi MEQrD5Z/kxJaYr5yYhPqiidkaSV1rtyxDCHvrth/cd2o1oImAtRhDHvo0BTx/2Ojv7x3 +5HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=SWbFS7k1ketV9wArvaI6AB4THx/TQapQm11c5c+i0hs=; b=NBd3m5GrIYGnVWIjCHvqkOPBSOD9T86s2ofSz09NoNMUfUAGyaSsL63bVhC05m4G6/ YrTl+XlyD9uYlIAMDIhcmC7hBsualv1fO/AY5puRjW6JS+lu3PvdIy2CzBGd5FW9FKU9 5LzH+3HsvqCq85oicG9s1vyERzv0vIty4dEpUHz4lmO4jDWkqSK71N0scA78B8xEr3b6 kh3Q2MC3iapFORaDkpz1AuXhNPPdtsfrcqSFnG8Y1cGc5bTN65qOFblvCIb2y5cv0kXh H9/qY7ABwUA42UIWtiGOx8pEZ8EldTcwERynTjCX3pq85NKaC1Utk1+TnuuRObHr/dfK i0EQ== X-Gm-Message-State: AMke39moAHtc4Wqzv9ldxMZVj5fgtygdEGPxh9hhpx5zotylFS2PegllGVp54BJvFoVpzr+A3i9LyPykJhN03Q== X-Received: by 10.84.197.131 with SMTP id n3mr50509820pld.43.1489443495664; Mon, 13 Mar 2017 15:18:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.166.75 with HTTP; Mon, 13 Mar 2017 15:18:15 -0700 (PDT) In-Reply-To: References: <201703130301.41315.luke@dashjr.org> From: Nick ODell Date: Mon, 13 Mar 2017 16:18:15 -0600 Message-ID: To: shaolinfry , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary=94eb2c18975a78e151054aa4163c X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Mon, 13 Mar 2017 22:32:33 +0000 Subject: Re: [bitcoin-dev] Flag day activation of segwit X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 22:18:19 -0000 --94eb2c18975a78e151054aa4163c Content-Type: text/plain; charset=UTF-8 >time >= 1506816000 && time <= 1510704000 && !IsWitnessEnabled() This has a different start time from the first post. >if (pindex->GetMedianTimePast() >= 1538352000 && pindex->GetMedianTimePast() <= 1510704000 ... Thanks, --Nick On Mon, Mar 13, 2017 at 4:36 AM, shaolinfry via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > From: luke@dashjr.org > 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... > > > I believe that is handled. > > time >= 1506816000 && time <= 1510704000 && !IsWitnessEnabled() > > Signalling is only required from October 1st until the BIP9 timeout, or, > until segwit is activated. The bit becomes free after activation/timeout as > per BIP9. Also, the default behaviour of BIP9 in Bitcoin Core is to signal > through the LOCKED_IN period - it would be trivial to add a condition to > not require mandatory signalling during LOCKED_IN but since miners signal > by default during this period, I figured I would leave it. > > I thought about 5% tolerance. but I don't think it makes sense since > miners will already have plenty of warning this is coming up and the intent > of the mandatory signalling period is quite clear. It also seems a bit > weird to say "it's mandatory but not for 5%". If miners are required to > signal, they need to signal. It also adds unnecessary complexity to an > otherwise simple patch. > > That said, I have no strong feelings either way on both counts, but I > chose to present the simplest option first. > > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > > --94eb2c18975a78e151054aa4163c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
>time >=3D 1506816000 && time <=3D 1= 510704000 && !IsWitnessEnabled()
This has a different sta= rt time from the first post.
>if (pindex->GetMedianTime= Past() >=3D 1538352000 && pindex->GetMedianTimePast() <=3D= 1510704000 ...

Thanks,
--Nick

On Mon, Mar 13,= 2017 at 4:36 AM, shaolinfry via bitcoin-dev <bitcoin= -dev@lists.linuxfoundation.org> wrote:
On Sunday, March 12, = 2017 3:50:27 PM shaolinfry via bitcoin-dev wrote:
> // man= datory segwit activation between Oct 1st 2017 and Nov 15th 2017
> inclusive if (pindex->GetMedianTimePast() >=3D 1538352000 &am= p;&
> pindex->GetMedianTimePast() <=3D 151070400= 0 &&
> !IsWitnessEnabled(pindex->pprev, ch= ainparams.GetConsensus())) {
> if (!((pindex->nVers= ion & VERSIONBITS_TOP_MASK) =3D=3D
> VERSIONBITS_T= OP_BITS) && (pindex->nVersion & VersionBitsMask(params,
<= /div>
> Consensus::DEPLOYMENT_SEGWIT)) !=3D 0) {
&= gt; return state.DoS(2, error("ConnectBlock(): relayed block m= ust
> signal for segwit, please upgrade"), RE= JECT_INVALID,
> "bad-no-segwit");
> }
> }

I don&= #39;t think this is actually BIP 9 compatible. Once activated, the bit lose= s
its meaning and should not be set. So you need to check th= at it hasn't locked-
in already...

I believe that is handled.

time >=3D 1506816000 && time <=3D 1510704000 &&a= mp; !IsWitnessEnabled()

Signalling is only req= uired from October 1st until the BIP9 timeout, or, until segwit is activate= d. The bit becomes free after activation/timeout as per BIP9. Also, the de= fault behaviour of BIP9 in Bitcoin Core is to signal through the LOCKED_IN = period - it would be trivial to add a condition to not require mandatory si= gnalling during LOCKED_IN but since miners signal by default during this p= eriod, I figured I would leave it.

I thought a= bout 5% tolerance. but I don't think it makes sense since miners will a= lready have plenty of warning this is coming up and the intent of the manda= tory signalling period is quite clear. It also seems a bit weird to say &qu= ot;it's mandatory but not for 5%". If miners are required to signa= l, they need to signal.=C2=A0It also adds unnecessary complexity to an othe= rwise simple patch.

That said, I have no stron= g feelings either way on both counts, but I chose to present the simplest o= ption first.

____________________________________________= ___
bitcoin-dev mailing list
bitcoin-dev@lists.= linuxfoundation.org
https://lists.linuxfoundation.org= /mailman/listinfo/bitcoin-dev


--94eb2c18975a78e151054aa4163c--