Update BIP 141 to include definition of Virtual transaction size and Transaction weight #444

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:master changing 1 files +14 −0
  1. jnewbery commented at 7:12 PM on September 16, 2016: member

    Virtual transaction size and Transaction weight are not consensus-critical, but are used in bitcoin-core IsStandard() policy, and v0.13.0+, RPCs calls return virtual transaction size instead of serialized transaction size. Although non-normative, BIP 141 should include definitions for these concepts.

    https://github.com/bitcoin/bitcoin/pull/8747 is a PR to fix the RPC help text to refer to virtual transaction size instead of transaction size.

  2. Update BIP 141 to include definition of Virtual transaction size and Transaction weight c2213ed1fd
  3. jl2012 approved
  4. jl2012 commented at 6:35 PM on September 19, 2016: contributor

    ACK

  5. in bip-0141.mediawiki:None in c2213ed1fd
     131 | +
     132 | +==== Transaction size calculations ====
     133 | +
     134 | +''Transaction weight'' is defined as ''Base transaction size'' * 3 + ''Total transaction size'' (ie. the same method as calculating ''Block weight'' from ''Base size'' and ''Total size'').
     135 | +
     136 | +''Virtual transaction size'' is defined as ''Transaction weight'' / 4 (rounded up to nearest integer).
    


    luke-jr commented at 12:03 AM on September 20, 2016:

    "Rounded up" and "nearest integer" seem to contradict?


    jl2012 commented at 10:19 AM on September 20, 2016:

    "rounded up to the next integer"?


    luke-jr commented at 10:26 AM on September 20, 2016:

    That makes sense, at least.

  6. in bip-0141.mediawiki:None in c2213ed1fd
     133 | +
     134 | +''Transaction weight'' is defined as ''Base transaction size'' * 3 + ''Total transaction size'' (ie. the same method as calculating ''Block weight'' from ''Base size'' and ''Total size'').
     135 | +
     136 | +''Virtual transaction size'' is defined as ''Transaction weight'' / 4 (rounded up to nearest integer).
     137 | +
     138 | +''Base transaction size'' is the transaction size in bytes with the original transaction serialization without any witness-related data.
    


    luke-jr commented at 12:04 AM on September 20, 2016:

    Prefer to phrase this in terms that will make sense post-activation. In other words, the size of the transaction serialised with the witness data stripped.

  7. luke-jr merged this on Sep 20, 2016
  8. luke-jr closed this on Sep 20, 2016


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 15:10 UTC

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