Subject: Re: [bitcoin-dev] Draft BIP : fixed-schedule block size increase

From: Gavin Andresen <[email-masked]>
Date: Mon, 22 Jun 2015 17:21:40 -0400

On Mon, Jun 22, 2015 at 4:54 PM, Peter Todd <[email-masked]> wrote:

> > Since it's possible that block timestamps aren't chronological in order,
> what would happen if a block following a size increase trigger is back in
> the past before the size increase? Would that block have a lower size
> restriction again? Would using block height not be a more stable number to
> work with?
>
> In the nVersion bits proposal that I co-authored we solved that issue by
> comparing the timestamp against the median time, which is guaranteed by
> the protocol rules to monotonically advance.
>

That complicates the implementation quite a bit.

I mostly implemented a variant that replaced the MAX_BLOCK_SIZE constant
with a function that took both a timestamp and a block height, and there
are several places in the current reference implementation where digging
out the block height (or, worse, calculating the median timestamp for the
block) would involve changing quite a few functions in the call-chain or
acquiring the cs_main lock to consult the current best chain.

-- 
--
Gavin Andresen