Difference between revisions of "BIP 0100"

From Bitcoin Wiki
Jump to: navigation, search
(Update BIP text with latest version from https://github.com/bitcoin/bips/blob/b1b248fc6ade930c/bip-0100.mediawiki)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{infobox BIP
+
{{bip}}
|name=BIP 0100
+
{{BipMoved|bip-0100.mediawiki}}
|longtitle=Block v4, floating block size hard limit
 
|type=Standards Track
 
|number=100
 
|author=[[Jeff Garzik]]
 
|status=Draft
 
|proposition=June 11, 2015
 
}}'''BIP 0100''' is a [[Bitcoin Improvement Proposal]] for increasing the maximum block size.
 
  
{{BIP begin}}
 
 
<pre>
 
<pre>
 
   BIP: 100
 
   BIP: 100
   Title: Block v4, floating block size hard limit
+
  Layer: Consensus (hard fork)
 +
   Title: Dynamic maximum block size by miner vote
 
   Author: Jeff Garzik <jgarzik@gmail.com>
 
   Author: Jeff Garzik <jgarzik@gmail.com>
   Status: Draft
+
          Tom Harding <tomh@thinlink.com>
 +
          Dagur Valberg Johannsson <dagurval@pvv.ntnu.no>
 +
  Comments-Summary: No comments yet.
 +
  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0100
 +
   Status: Rejected
 
   Type: Standards Track
 
   Type: Standards Track
 
   Created: 2015-06-11
 
   Created: 2015-06-11
 +
  License: BSD-2-Clause
 
</pre>
 
</pre>
 +
 
==Abstract==
 
==Abstract==
  
Replace static 1M block size hard limit with a hard limit that floats between 1M and 32M.
+
Replace the static 1M block size hard limit with a hard limit set by coinbase vote, conducted on the same schedule as difficulty retargeting.
  
 
==Motivation==
 
==Motivation==
  
# Long term, wean the bitcoin protocol away from any block size limit; let the free market establish a natural size limit equilibrium.
+
Miners directly feel the effects, both positive and negative, of any maximum block size change imposed by their peers.  Larger blocks allow more growth in the on-chain ecosystem, while smaller blocks reduce resource requirements network-wide.  Miners also act as an efficient proxy for the rest of the ecosystem, since they are paid in the tokens collected for the blocks they create.
# Eliminate 1M limit as impediment to adoption.
+
 
# Execute a hard fork network upgrade within safety rails, gathering data and experience for future upgrades.
+
A simple deterministic system is specified, whereby a 75% mining supermajority may activate a change to the maximum block size each 2016 blocks. Each change is limited to a 5% increase from the previous block size hard limit, or a decrease of similar magnitude.  Among adopting nodes, there will be no disagreement on the evolution of the maximum block size.
# Contain checks-and-balances that users must opt into, to enable system activation and growth.
+
 
# Validated growth: a large majority (80%) is required to change the value.
+
The system is compatible with emergent consensus, but whereas under that system a miner may choose to accept any size block, a miner following BIP100 observes the 75% supermajority rule, and the 5% change limit rule.  Excessive-block values signaled by emergent consensus blocks are considered in the calculation of the BIP100 block size hard limit, and the BIP100 calculated maximum block size is signaled as an excessive-block value for the benefit of all observers.
  
 
==Specification==
 
==Specification==
  
# Replace static 1M block size hard limit with a floating limit ("hardLimit").
+
===Dynamic Maximum Block Size===
# hardLimit floats within the range 1-32M, inclusive.
+
# Initial value of <code>hardLimit</code> is 1000000 bytes, preserving current system.
# Initial value of hardLimit is 1M, preserving current system.
+
# Changing <code>hardLimit</code> is accomplished by encoding a proposed value, a vote, within a block's coinbase scriptSig, and by processing the votes contained in the previous retargeting period.<br /><br />
# Changing hardLimit is accomplished by encoding a proposed value within a block's coinbase scriptSig.
+
## Vote encoding
## Votes refer to a byte value, encoded within the pattern "/B\d+[M]{0,1}/"  Uppercase suffix 'M' applies a 1,000,000x multiplier.  Example: /B8000000/ or /B8M/ votes for a 8,000,000-byte hardLimit.
+
### A vote is represented as a megabyte value using the BIP100 pattern<br /><br /><code>/BIP100/B[0-9]+/</code><br /><br />Example: <code>/BIP100/B8/</code> is a vote for a 8000000-byte <code>hardLimit</code>.<br /><br />
## A new hardLimit is calculated at each difficult adjustment period (2016 blocks), and applies to the next 2016 blocks.
+
### If the block height is encoded at the start of the coinbase scriptSig, as per BIP34, it is ignored.
## Calculation:
+
### Only the first BIP100 pattern match is processed in "Maximum block size recalculation" below.
### Absent/invalid votes are counted as votes for the current hardLimit. Out of range votes are counted as the nearest in-range value.
+
### A megabyte value is represented by consecutive base-ten digits.
### Votes are limited to +/- 20% of the current hardLimit.
+
### If no BIP100 pattern is matched, the first matching emergent consensus pattern <code>/EB[0-9]+/</code>, if any, is accepted as the megabyte vote.<br /><br />
### Sort the votes from the previous 12,000 blocks from lowest to highest.
+
## Maximum block size recalculation
### The raise value is defined as a vote for 2400th highest block (20th percentile).
+
### A <code>new hardLimit</code> is calculated after each difficulty adjustment period of 2016 blocks, and applies to the next 2016 blocks.
### The lower value is defined as a vote for 9600th highest block (80th percentile).
+
### Absent/zero-valued votes are counted as votes for the <code>current hardLimit</code>.
### If the raise value is higher than current hardLimit, the new limit becomes the raise value.
+
### The votes of the previous 2016 blocks are sorted by megabyte vote.
### If the lower value is lower than current hardLimit, the new limit becomes the lower value.
+
### Raising <code>hardLimit</code><br /><br />
### Otherwise, hardLimit is unchanged.
+
#### The <code>raise value</code> is defined as the vote of the 1512th highest block, converted to bytes.
# 75% rule: If 9,000 of the last 12,000 blocks are version 4 or greater, reject invalid version 4 blocks. (testnet4: 501 of last 1000)
+
#### If the resultant <code>raise value</code> is greater than (<code>current hardLimit</code> * 1.05) rounded down, it is set to that value.
# 95% rule ("Point of no return"): If 11,400 of the last 12,000 blocks are version 4 or greater, reject all version <= 3 blocks. (testnet4: 750 of last 1000)
+
#### If the resultant <code>raise value</code> is greater than <code>current hardLimit</code>, the <code>raise value</code> becomes the <code>new hardLimit</code> and the recalculation is complete.<br /><br />
# Block version number is calculated after masking out high 16 bits (final bit count TBD by versionBits outcome).
+
### Lowering <code>hardLimit</code><br /><br />
 +
#### The <code>lower value</code> is defined as the vote of the 1512th lowest block, converted to bytes.
 +
#### If the resultant <code>lower value</code> is less than (<code>current hardLimit</code> / 1.05) rounded down, it is set to that value.
 +
#### If the resultant <code>lower value</code> is less than <code>current hardLimit</code>, the <code>lower value</code> becomes the <code>new hardLimit</code> and the recalculation is complete.<br /><br />
 +
### Otherwise, <code>new hardLimit</code> remains the same as <code>current hardLimit</code>.
 +
 
 +
===Signature Hashing Operations Limits===
 +
# The per-block signature hashing operations limit is scaled to (actual block size, fractional megabyte rounded to next higher megabyte) / 50.
 +
# A maximum serialized transaction size of 1000000 bytes is imposed.
 +
 
 +
==Recommendations==
 +
 
 +
===Publication of <code>hardLimit</code>===
 +
# For the benefit of all observers, it is recommended that <code>hardLimit</code> be published.  Example: a complete coinbase string might read <br /><br /><code>/BIP100/B8/EB2.123456/</code><br /><br /> which indicates a vote for 8M maximum block size, and an enforced <code>hardLimit</code> of 2.123456 megabytes for the block containing the coinbase string.
 +
 
 +
==Deployment==
 +
 
 +
This BIP is presumed deployed and activated as of block height 449568 by implementing nodes on the bitcoin mainnet. It has no effect until a raise value different from 1M is observed, which requires at least 1512 of 2016 blocks to vote differently from 1M.
  
 
==Backward compatibility==
 
==Backward compatibility==
  
All older clients are not compatible with this change. The first block larger than 1M will create a network partition excluding not-upgraded network nodes and miners.
+
The first block larger than 1M will create a network partition, as nodes with a fixed 1M hard limit reject that block.
{{end}}
+
 
{{BIPs}}
+
==Implementations==
 +
https://github.com/bitcoinxt/bitcoinxt/pull/188</br>
 +
https://github.com/bitcoinxt/bitcoin/pull/1</br>
 +
https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/398</br>
 +
 
 +
==Copyright==
 +
This document is licensed under the BSD 2-clause license.

Latest revision as of 19:59, 24 September 2019

This page describes a BIP (Bitcoin Improvement Proposal).
Please see BIP 2 for more information about BIPs and creating them. Please do not just create a wiki page.

Please do not modify this page. This is a mirror of the BIP from the source Git repository here.

  BIP: 100
  Layer: Consensus (hard fork)
  Title: Dynamic maximum block size by miner vote
  Author: Jeff Garzik <jgarzik@gmail.com>
          Tom Harding <tomh@thinlink.com>
          Dagur Valberg Johannsson <dagurval@pvv.ntnu.no>
  Comments-Summary: No comments yet.
  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0100
  Status: Rejected
  Type: Standards Track
  Created: 2015-06-11
  License: BSD-2-Clause

Abstract

Replace the static 1M block size hard limit with a hard limit set by coinbase vote, conducted on the same schedule as difficulty retargeting.

Motivation

Miners directly feel the effects, both positive and negative, of any maximum block size change imposed by their peers. Larger blocks allow more growth in the on-chain ecosystem, while smaller blocks reduce resource requirements network-wide. Miners also act as an efficient proxy for the rest of the ecosystem, since they are paid in the tokens collected for the blocks they create.

A simple deterministic system is specified, whereby a 75% mining supermajority may activate a change to the maximum block size each 2016 blocks. Each change is limited to a 5% increase from the previous block size hard limit, or a decrease of similar magnitude. Among adopting nodes, there will be no disagreement on the evolution of the maximum block size.

The system is compatible with emergent consensus, but whereas under that system a miner may choose to accept any size block, a miner following BIP100 observes the 75% supermajority rule, and the 5% change limit rule. Excessive-block values signaled by emergent consensus blocks are considered in the calculation of the BIP100 block size hard limit, and the BIP100 calculated maximum block size is signaled as an excessive-block value for the benefit of all observers.

Specification

Dynamic Maximum Block Size

  1. Initial value of hardLimit is 1000000 bytes, preserving current system.
  2. Changing hardLimit is accomplished by encoding a proposed value, a vote, within a block's coinbase scriptSig, and by processing the votes contained in the previous retargeting period.

    1. Vote encoding
      1. A vote is represented as a megabyte value using the BIP100 pattern

        /BIP100/B[0-9]+/

        Example: /BIP100/B8/ is a vote for a 8000000-byte hardLimit.

      2. If the block height is encoded at the start of the coinbase scriptSig, as per BIP34, it is ignored.
      3. Only the first BIP100 pattern match is processed in "Maximum block size recalculation" below.
      4. A megabyte value is represented by consecutive base-ten digits.
      5. If no BIP100 pattern is matched, the first matching emergent consensus pattern /EB[0-9]+/, if any, is accepted as the megabyte vote.

    2. Maximum block size recalculation
      1. A new hardLimit is calculated after each difficulty adjustment period of 2016 blocks, and applies to the next 2016 blocks.
      2. Absent/zero-valued votes are counted as votes for the current hardLimit.
      3. The votes of the previous 2016 blocks are sorted by megabyte vote.
      4. Raising hardLimit

        1. The raise value is defined as the vote of the 1512th highest block, converted to bytes.
        2. If the resultant raise value is greater than (current hardLimit * 1.05) rounded down, it is set to that value.
        3. If the resultant raise value is greater than current hardLimit, the raise value becomes the new hardLimit and the recalculation is complete.

      5. Lowering hardLimit

        1. The lower value is defined as the vote of the 1512th lowest block, converted to bytes.
        2. If the resultant lower value is less than (current hardLimit / 1.05) rounded down, it is set to that value.
        3. If the resultant lower value is less than current hardLimit, the lower value becomes the new hardLimit and the recalculation is complete.

      6. Otherwise, new hardLimit remains the same as current hardLimit.

Signature Hashing Operations Limits

  1. The per-block signature hashing operations limit is scaled to (actual block size, fractional megabyte rounded to next higher megabyte) / 50.
  2. A maximum serialized transaction size of 1000000 bytes is imposed.

Recommendations

Publication of hardLimit

  1. For the benefit of all observers, it is recommended that hardLimit be published. Example: a complete coinbase string might read

    /BIP100/B8/EB2.123456/

    which indicates a vote for 8M maximum block size, and an enforced hardLimit of 2.123456 megabytes for the block containing the coinbase string.

Deployment

This BIP is presumed deployed and activated as of block height 449568 by implementing nodes on the bitcoin mainnet. It has no effect until a raise value different from 1M is observed, which requires at least 1512 of 2016 blocks to vote differently from 1M.

Backward compatibility

The first block larger than 1M will create a network partition, as nodes with a fixed 1M hard limit reject that block.

Implementations

https://github.com/bitcoinxt/bitcoinxt/pull/188</br> https://github.com/bitcoinxt/bitcoin/pull/1</br> https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/398</br>

Copyright

This document is licensed under the BSD 2-clause license.