Subject: Re: [bitcoin-dev] PSBT global key for network

From: 木ノ下じょな <[email-masked]>
Date: Fri, 4 Oct 2019 14:54:52 +0900

Hi Jimmy,

The only time I could see this being a problem is in the case of a
fork-coin.
Otherwise the likelihood that two unrelated networks could have a tx with
an id that is identical are low.

Everything included in PSBT thus far is info for verifying something
helpful, and providing the information needed for signing and verifying
what will be signed.

Adding a network section will be the inverse of that. The info doesn't help
you verify anything, since I could lie about the network, and you will need
to go out and check the network is as the PSBT says it is anyways.
Network is also not needed for signing.

In fact, come to think of it, even if there was a fork-coin incident, even
if you were able to separate PSBTs via network info, it won't matter if
there's no replay protection anyways, so giving a false sense of security
in thinking "I have explicitly stated my network so I should be ok"
(developers will think this, I guarantee) is actually a security minus IMO.

Currently BitcoinJS only uses network parameters to allow for the use of
addresses in addOutput... but I'm starting to think we should remove it...
not sure...

Cheers,
Jon

2019年10月4日(金) 11:04 Jimmy Song via bitcoin-dev <
[email-masked]>:

> Hey all,
>
> I wanted to propose a new key in the global context for BIP174,
> Partially-Signed Bitcoin Transactions.
>
> = Rationale
>
> Each signer should make sure that the inputs being referenced in the PSBT
> exist (with the exception of a Proof-of-Reserves input). In order to do
> this, it's critical to know which network the coins are on (mainnet or
> testnet). This could potentially be extended to other networks should they
> want to use something like PSBT, much in the same way that HD keys from
> BIP0044 reserved 0' and 1' as coins for mainnet Bitcoin and testnet Bitcoin
> respectively.
>
> = Proposal
>
> Add the key 0x03 for network in the global key-value store. Value is 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.
>
> ---------------------------
>
> Best,
>
> Jimmy
>
> _______________________________________________
> bitcoin-dev mailing list
> [email-masked]
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--