PSBT_GLOBAL_XPUB: Version bytes in xpub [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2019-11-16T04:54:49+00:00


Summary:

In a recent discussion on the bitcoin-dev mailing list, there was a debate regarding the inclusion of version bytes in the xpubs in the GLOBAL_XPUB field. The question raised was whether these version bytes were necessary or if they should be ignored. Andrew, a member of the list, argued that since xpubs are already a predefined standard with existing serialization code in many software, it would be simpler to reuse these standards. However, he believed that the version bytes themselves did not matter and could be disregarded. Ian countered this argument by suggesting that the version bytes seemed to be superfluous data considering that the transaction format and the rest of the PSBT key-values are network agnostic. He proposed that if network data needed to be attached to the PSBT, it would be better to use a new key instead of including it in the xpubs. Ian also pointed out a potential issue of conflicting versions on different xpubs in the PSBT, which could be eliminated by removing the version bytes. The discussion further explored the idea of keeping only the chain code and public key in the xpubs, without including the version bytes. Some participants argued for including additional data such as prefixes that define if the key is used for testnet or mainnet. However, others remained undecided about whether or not to include any data outside of the public key and chain code. They emphasized the importance of discussing the rationale behind including or omitting such data. Overall, the debate centered around the usefulness and necessity of version bytes in xpubs within the GLOBAL_XPUB field. While some advocated for their removal, others suggested keeping additional data like prefixes. The potential issue of conflicting versions on different xpubs in the PSBT was recognized, and the possibility of attaching network data to the PSBT using a new key was also mentioned.


Updated on: 2023-08-02T01:32:38.587644+00:00