bitcoinops / bitcoinops.github.io

Bitcoin Optech website
MIT License
247 stars 117 forks source link

tx size calculator #1656

Open ajtowns opened 2 months ago

ajtowns commented 2 months ago

https://github.com/bitcoinops/bitcoinops.github.io/blob/a38d0dc17aa47a498f121be191987b477bbba2e6/en/tools/calc-size.md?plain=1#L19-L23

Unless I'm misunderstanding, I think this assumes signatures are 72 bytes, but they're usually 71 bytes due to https://github.com/bitcoin/bitcoin/pull/13666 and similar PRs in other software these days? At block 00000000000000000003478c6874f3901d7e1651e8e0a7b9291c49c1f571af6a I see 469 legacy sigs that are 71 bytes, and 148 thaat are 72 bytes (and 2 that are 70 bytes), fwiw.

See also https://github.com/bitcoinops/bitcoinops.github.io/pull/322#issuecomment-583685976

murchandamus commented 1 month ago

I have in the past always calculated with the maximum, as people building a transaction at minFeerate will get a non-standard transaction if they are short one sat.