PSBT global key for network



Summary:

In an email to the bitcoin-dev mailing list, Jimmy Song proposed adding a network key to BIP174, Partially-Signed Bitcoin Transactions. He argued that each signer should ensure the inputs being referenced in the PSBT exist and suggested it is critical to know which network the coins are on. The proposal suggests adding the key 0x03 for network in the global key-value store. The value would be a variable integer with 0x00 indicating Bitcoin mainnet and 0x01 indicating Bitcoin testnet. Other coins that want to use the PSBT should use the coin network number from SLIP-0044 with the high bit removed. Jon replied to the email suggesting that the only time network could be a problem is in the case of a fork-coin. Adding a network section would not help verify anything and giving a false sense of security is actually a security minus. Currently, BitcoinJS only uses network parameters to allow for the use of addresses in addOutput, but Jon is considering removing this feature.


Updated on: 2023-06-13T21:45:37.071368+00:00