Skip to content

Commit

Permalink
bip141: Change 'block cost' to 'block weight'
Browse files Browse the repository at this point in the history
The term 'block cost' led to confusion about the unit that it is
expressed in, in that it expressed monetary cost. Change it to a more
general term 'block weight'.

This was discussed in the [2016-07-14 Bitcoin Core developer meeting](http://www.erisian.com.au/meetbot/bitcoin-core-dev/2016/bitcoin-core-dev.2016-07-14-19.00.html).
  • Loading branch information
laanwj committed Jul 18, 2016
1 parent ab32c2a commit 83596de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bip-0141.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ If the version byte is 1 to 16, no further interpretation of the witness program

Blocks are currently limited to 1,000,000 bytes (1MB) total size. We change this restriction as follows:

''Block cost'' is defined as ''Base size'' * 3 + ''Total size''. (rationale<ref>Rationale of using a single composite constraint, instead of two separate limits such as 1MB base data and 3MB witness data: Using two separate limits would make mining and fee estimation nearly impossible. Miners would need to solve a complex non-linear optimization problem to find the set of transactions that maximize fees given both constraints, and wallets would not be able to know what to pay as it depends on which of the two conditions is most constrained by the time miners try to produce blocks with their transactions in. Another problem with such an approach is freeloading. Once a set of transactions hit the base data 1MB constraint, up to 3MB extra data could be added to the witness by just minimally increasing the fee. The marginal cost for extra witness space effectively becomes zero in that case.</ref>)
''Block weight'' is defined as ''Base size'' * 3 + ''Total size''. (rationale<ref>Rationale of using a single composite constraint, instead of two separate limits such as 1MB base data and 3MB witness data: Using two separate limits would make mining and fee estimation nearly impossible. Miners would need to solve a complex non-linear optimization problem to find the set of transactions that maximize fees given both constraints, and wallets would not be able to know what to pay as it depends on which of the two conditions is most constrained by the time miners try to produce blocks with their transactions in. Another problem with such an approach is freeloading. Once a set of transactions hit the base data 1MB constraint, up to 3MB extra data could be added to the witness by just minimally increasing the fee. The marginal cost for extra witness space effectively becomes zero in that case.</ref>)

''Base size'' is the block size in bytes with the original transaction serialization without any witness-related data, as seen by a non-upgraded node.

''Total size'' is the block size in bytes with transactions serialized as described in [[bip-0144.mediawiki|BIP144]], including base data and witness data.

The new rule is ''block cost'' ≤ 4,000,000.
The new rule is ''block weight'' ≤ 4,000,000.

==== Sigops ====

Expand Down

0 comments on commit 83596de

Please sign in to comment.