Dynamically Controlled Bitcoin Block Size Max Cap #188

pull UpalChakraborty wants to merge 8 commits into bitcoin:master from UpalChakraborty:master changing 3 files +203 −89
  1. UpalChakraborty commented at 11:41 PM on September 3, 2015: contributor

    <pre> BIP: 1xx Title: Dynamically Controlled Bitcoin Block Size Max Cap Author: Upal Chakraborty <bitcoin@upalc.com> Status: Draft Type: Standards Track Created: 2015-08-24 </pre>

    ==Abstract==

    This BIP proposes replacing the fixed one megabyte maximum block size with a dynamically controlled maximum block size that may increase or decrease with difficulty change depending on various network factors. I have two proposals regarding this...

    i. Depending only on previous block size calculation.

    ii. Depending on previous block size calculation and previous Tx fee collected by miners.

    ==Motivation==

    With increased adoption, transaction volume on bitcoin network is bound to grow. If the one megabyte max cap is not changed to a flexible one which changes itself with changing network demand, then adoption will hamper and bitcoin's growth may choke up. Following graph shows the change in average block size since inception...

    https://blockchain.info/charts/avg-block-size?timespan=all&showDataPoints=false&daysAverageString=1&show_header=true&scale=0&address=

    ==Specification==

    ===Proposal 1 : Depending only on previous block size calculation===

    If more than 50% of block's size, found in the first 2000 of the last difficulty period, is more than 90% MaxBlockSize Double MaxBlockSize Else if more than 90% of block's size, found in the first 2000 of the last difficulty period, is less than 50% MaxBlockSize Half MaxBlockSize Else Keep the same MaxBlockSize

    ===Proposal 2 : Depending on previous block size calculation and previous Tx fee collected by miners===

    TotalBlockSizeInLastButOneDifficulty = Sum of all Block size of first 2008 blocks in last 2 difficulty period TotalBlockSizeInLastDifficulty = Sum of all Block size of second 2008 blocks in last 2 difficulty period (This actually includes 8 blocks from last but one difficulty)

    TotalTxFeeInLastButOneDifficulty = Sum of all Tx fees of first 2008 blocks in last 2 difficulty period TotalTxFeeInLastDifficulty = Sum of all Tx fees of second 2008 blocks in last 2 difficulty period (This actually includes 8 blocks from last but one difficulty)

    If ( ( (Sum of first 4016 block size in last 2 difficulty period)/4016 > 50% MaxBlockSize) AND (TotalTxFeeInLastDifficulty > TotalTxFeeInLastButOneDifficulty) AND (TotalBlockSizeInLastDifficulty > TotalBlockSizeInLastButOneDifficulty) ) MaxBlockSize = TotalBlockSizeInLastDifficulty * MaxBlockSize / TotalBlockSizeInLastButOneDifficulty Else If ( ( (Sum of first 4016 block size in last 2 difficulty period)/4016 < 50% MaxBlockSize) AND (TotalTxFeeInLastDifficulty < TotalTxFeeInLastButOneDifficulty) AND (TotalBlockSizeInLastDifficulty < TotalBlockSizeInLastButOneDifficulty) ) MaxBlockSize = TotalBlockSizeInLastDifficulty * MaxBlockSize / TotalBlockSizeInLastButOneDifficulty Else Keep the same MaxBlockSize

    ==Rationale==

    These two proposals have been derived after discussion on [https://bitcointalk.org/index.php?topic=1154536.0 BitcoinTalk] and [http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-August/010285.html bitcoin-dev mailing list]. The original idea and its evolution in the light of various arguements can be found [http://upalc.com/maxblocksize.php here].

    ===Proposal 1 : Depending only on previous block size calculation===

    This solution is derived directly from the indication of the problem. If transaction volume increases, then we will naturally see bigger blocks. On the contrary, if there are not enough transaction volume, but maximum block size is high, then only few blocks may sweep the mempool. Hence, if block size is itself taken into consideration, then maximum block size can most rationally be derived. Moreover, this solution not only increases, but also decreases the maximum block size, just like difficulty.

    ===Proposal 2 : Depending on previous block size calculation and previous Tx fee collected by miners===

    This solution takes care of stable mining subsidy. It will not increase maximum block size, if Tx fee collection is not increasing and thereby creating a Tx fee pressure on the market. On the other hand, though the block size max cap is dynamically controlled, it is very difficult to game by any party because the increase or decrease of block size max cap will take place in the same ratio of average block size increase or decrease.

    ==Compatibility==

    This is a hard-forking change to the Bitcoin protocol; anybody running code that fully validates blocks must upgrade before the activation time or they will risk rejecting a chain containing larger-than-one-megabyte blocks.

    ==Other solutions considered==

    [http://gtf.org/garzik/bitcoin/BIP100-blocksizechangeproposal.pdf Making Decentralized Economic Policy] - by Jeff Garzik

    [https://bitcointalk.org/index.php?topic=1078521.0 Elastic block cap with rollover penalties] - by Meni Rosenfeld

    [https://github.com/bitcoin/bips/blob/master/bip-0101.mediawiki Increase maximum block size] - by Gavin Andresen

    [https://gist.github.com/sipa/c65665fc360ca7a176a6 Block size following technological growth] - by Pieter Wuille

    [https://lightning.network/lightning-network-paper.pdf The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments] - by Joseph Poon & Thaddeus Dryja

    ==Deployment==

    If consensus is achieved, deployment can be made at a future block number at which difficulty will change.

  2. Create maxblocksize 24236a0631
  3. Create BIP DynamicMaxBlockSize 32d306b8e8
  4. Create BIP-DynamicMaxBlockSize.mediawiki 8ee52dad3f
  5. Update BIP-DynamicMaxBlockSize.mediawiki b5c2a99b1e
  6. Update BIP-DynamicMaxBlockSize.mediawiki e062954fe7
  7. Update BIP-DynamicMaxBlockSize.mediawiki 9f63400e10
  8. Update BIP-DynamicMaxBlockSize.mediawiki 23e66a6643
  9. Update BIP-DynamicMaxBlockSize.mediawiki 86cfdb254a
  10. luke-jr commented at 12:01 AM on September 4, 2015: member

    Can you squash this? Have you requested a BIP number from @gmaxwell yet?

  11. btcdrak commented at 12:01 AM on September 4, 2015: contributor

    This PR needs to be closed and reopened using a topic branch.

  12. btcdrak commented at 12:02 AM on September 4, 2015: contributor

    @luke-jr BIP number will be assigned on new PR

  13. UpalChakraborty commented at 12:15 AM on September 4, 2015: contributor

    @luke-jr Seems I'm messing up something, while copying raw text from https://github.com/UpalChakraborty/bips/blob/master/BIP-DynamicMaxBlockSize.mediawiki.

  14. btcdrak commented at 12:21 AM on September 4, 2015: contributor

    @UpalChakraborty You dont need to paste the BIP text into comments. Comments to not parse mediawiki. We read the PR from the files tab, using the [view] button. screenshot-github com 2015-09-04 01-20-37

    In any case PR needs to be closed and a new one opened. You need to use a GIT topic branch for your changes.

  15. UpalChakraborty commented at 12:16 PM on September 4, 2015: contributor

    Fresh pull request #191 has been created. Closing this one.

  16. UpalChakraborty closed this on Sep 4, 2015

  17. luke-jr referenced this in commit f2d03e707b on Jan 20, 2018

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me