From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jgarzik@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id C1B6DEA7
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 18 Dec 2015 20:02:25 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-io0-f180.google.com (mail-io0-f180.google.com
	[209.85.223.180])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 27AC7FC
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 18 Dec 2015 20:02:25 +0000 (UTC)
Received: by mail-io0-f180.google.com with SMTP id 186so102301120iow.0
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 18 Dec 2015 12:02:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=swJ/zW7pk3dgaaoJH+v3iNu8uNxDuOVcCojJ6FzWugk=;
	b=CnktdavzISzjmAPrrW8JFWGjzWpuAPd8bFhMrevnOBcSPIX8Qj7VH6fsjDVs2uA5hT
	eIuYYCqjEjkVIBv0yowfhaPZT/cOyB7jYBCH/Rn5sBnGsmBD0MXgd9szRgAQPxKxay9g
	weXBeVy36CtNlteZxUSxLyFgdsVG+iiaI+w47zY3nLcMY763nRp161HAeSPXifiMv/LQ
	4RhmY5xrXmTks+MYMSSCXWccR8JlIOAm7HZEtkY0Rdnm1HFGnSKBUTo/6gL1Ndn2Lvew
	j+tkjhk6TqQb7VfvrsXQ07bPJ7b/GaYIpuPrd0qkU2Q8H2Sx2BrIIg3Ytu/2w8I+JU/A
	a//w==
MIME-Version: 1.0
X-Received: by 10.107.185.133 with SMTP id j127mr7229668iof.91.1450468944635; 
	Fri, 18 Dec 2015 12:02:24 -0800 (PST)
Received: by 10.79.8.198 with HTTP; Fri, 18 Dec 2015 12:02:24 -0800 (PST)
In-Reply-To: <CABm2gDqJgPM1KRRSR3wSEhQ77Oq6P_VVvHwc3Yt4qnkAr7d2nA@mail.gmail.com>
References: <CAFzgq-xNZmWrdwCDv3twdsqSWk-FyMuLYJjZ_bA42_5Po0mgEg@mail.gmail.com>
	<CABm2gDqJgPM1KRRSR3wSEhQ77Oq6P_VVvHwc3Yt4qnkAr7d2nA@mail.gmail.com>
Date: Fri, 18 Dec 2015 15:02:24 -0500
Message-ID: <CADm_WcYFmvu+_OXjm53DHV_q2m8z7Q9zd7QaTrs-uqfiK62CAQ@mail.gmail.com>
From: Jeff Garzik <jgarzik@gmail.com>
To: =?UTF-8?B?Sm9yZ2UgVGltw7Nu?= <jtimon@jtimon.cc>
Content-Type: multipart/alternative; boundary=94eb2c070a1c33ed530527319e47
X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW
	autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Cc: Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] The increase of max block size should be
 determined by block height instead of block time
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Dec 2015 20:02:25 -0000

--94eb2c070a1c33ed530527319e47
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

>From a code standpoint, based off height is easy.

My first internal version triggered on block 406,800 (~May 5), and each
block increased by 20 bytes thereafter.

It was changed to time, because time was the standard used in years past
for other changes; MTP flag day is more stable than block height.

It is preferred to have a single flag trigger (height or time), rather than
the more complex trigger-on-time, increment-on-height, but any combination
of those will work.

Easy to change code back to height-based...



On Fri, Dec 18, 2015 at 2:52 PM, Jorge Tim=C3=B3n <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> I agree that nHeight is the simplest option and is my preference.
> Another option is to use the median time from the previous block (thus yo=
u
> know whether or not the next block should start the miner confirmation or
> not). In fact, if we're going to use bip9  for 95% miner upgrade
> confirmation, it would be nice to always pick a difficulty retarget block
> (ie block.nHeight % DifficultyAdjustmentInterval =3D=3D 0).
> Actually I would always have an initial height in bip9, for softforks too=
.
> I would also use the sign bit as the "hardfork bit" that gets activated
> for the next diff interval after 95% is reached and a hardfork becomes
> active (that way even SPV nodes will notice when a softfork  or hardfork
> happens and also be able to tell which one is it).
> I should update bip99 with all this. And if the 2 mb bump is
> uncontroversial, maybe I can add that to the timewarp fix and th recovery
> of the other 2 bits in block.nVersion (given that bip102 doesn't seem to
> follow bip99's recommendations and doesn't want to give 6 full months as
> the pre activation grace period).
> On Dec 18, 2015 8:17 PM, "Chun Wang via bitcoin-dev" <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
>
>> In many BIPs we have seen, include the latest BIP202, it is the block
>> time that determine the max block size. From from pool's point of
>> view, it cannot issue a job with a fixed ntime due to the existence of
>> ntime roll. It is hard to issue a job with the max block size unknown.
>> For developers, it is also easier to implement if max block size is a
>> function of block height instead of time. Block height is also much
>> more simple and elegant than time.
>> _______________________________________________
>> bitcoin-dev mailing list
>> bitcoin-dev@lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
>

--94eb2c070a1c33ed530527319e47
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">From a code standpoint, based off height is easy.<div><br>=
</div><div>My first internal version triggered on block 406,800 (~May 5), a=
nd each block increased by 20 bytes thereafter.</div><div><br></div><div>It=
 was changed to time, because time was the standard used in years past for =
other changes; MTP flag day is more stable than block height.</div><div><br=
></div><div>It is preferred to have a single flag trigger (height or time),=
 rather than the more complex trigger-on-time, increment-on-height, but any=
 combination of those will work.</div><div><br></div><div>Easy to change co=
de back to height-based...</div><div><br></div><div><br></div></div><div cl=
ass=3D"gmail_extra"><br><div class=3D"gmail_quote">On Fri, Dec 18, 2015 at =
2:52 PM, Jorge Tim=C3=B3n <span dir=3D"ltr">&lt;<a href=3D"mailto:bitcoin-d=
ev@lists.linuxfoundation.org" target=3D"_blank">bitcoin-dev@lists.linuxfoun=
dation.org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir=
=3D"ltr">I agree that nHeight is the simplest option and is my preference.<=
br>
Another option is to use the median time from the previous block (thus you =
know whether or not the next block should start the miner confirmation or n=
ot). In fact, if we&#39;re going to use bip9=C2=A0 for 95% miner upgrade co=
nfirmation, it would be nice to always pick a difficulty retarget block (ie=
 block.nHeight % DifficultyAdjustmentInterval =3D=3D 0).<br>
Actually I would always have an initial height in bip9, for softforks too.<=
br>
I would also use the sign bit as the &quot;hardfork bit&quot; that gets act=
ivated for the next diff interval after 95% is reached and a hardfork becom=
es active (that way even SPV nodes will notice when a softfork=C2=A0 or har=
dfork happens and also be able to tell which one is it).<br>
I should update bip99 with all this. And if the 2 mb bump is uncontroversia=
l, maybe I can add that to the timewarp fix and th recovery of the other 2 =
bits in block.nVersion (given that bip102 doesn&#39;t seem to follow bip99&=
#39;s recommendations and doesn&#39;t want to give 6 full months as the pre=
 activation grace period).</p><div class=3D"HOEnZb"><div class=3D"h5">
<div class=3D"gmail_quote">On Dec 18, 2015 8:17 PM, &quot;Chun Wang via bit=
coin-dev&quot; &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org"=
 target=3D"_blank">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br =
type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In many BIPs we have se=
en, include the latest BIP202, it is the block<br>
time that determine the max block size. From from pool&#39;s point of<br>
view, it cannot issue a job with a fixed ntime due to the existence of<br>
ntime roll. It is hard to issue a job with the max block size unknown.<br>
For developers, it is also easier to implement if max block size is a<br>
function of block height instead of time. Block height is also much<br>
more simple and elegant than time.<br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.=
linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
<br></blockquote></div><br></div>

--94eb2c070a1c33ed530527319e47--