← Back to Bitcoin Improvement Proposals
BIPinformationaltransactionssigning

Fix BIP-119 Typo + Clarify the reasons for 32 bit lengths

when drafting the BIP I attempted to triangulate what the width of the fields for number of inputs/outputs should be from various sources in the codebase, and made an error in looking at the signing and encoding logic, and not the _decoding_ logic which restricts vectors (vin, vout) to MAX_SIZE which is 33554432. This fully justifies not using a wider type (uint64_t). Also clarified arguments for not using a narrower type (uint16_t) which would be possible just for the vIn based on block size,

No reviews
JeremyRubin·Updated Jan 15, 2022·0 reviews·0 attestations·View source
Collections:BIPs — Merged

Specification

when drafting the BIP I attempted to triangulate what the width of the fields for number of inputs/outputs should be from various sources in the codebase, and made an error in looking at the signing and encoding logic, and not the decoding logic which restricts vectors (vin, vout) to MAX_SIZE which is 33554432. This fully justifies not using a wider type (uint64_t).

Also clarified arguments for not using a narrower type (uint16_t) which would be possible just for the vIn based on block size, because it's a leaky abstraction (you can still encode and decode such a transaction, just not mine it).

thanks to @roconnor-blockstream for pointing this out

Discussion (0 threads)

Loading discussions...