Skip to content

Commit

Permalink
Merge pull request #420 from laanwj/2016_07_bip141_blockmaxweight
Browse files Browse the repository at this point in the history
bip141: Change 'block cost' to 'block weight'
  • Loading branch information
luke-jr committed Jul 21, 2016
2 parents c98859f + 83596de commit 76e29be
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 76e29be

Please sign in to comment.