* [bitcoin-dev] Witness serialization in PSBT non-witness UTXOs
@ 2018-08-13 18:56 Pieter Wuille
2018-08-13 20:32 ` Achow101
0 siblings, 1 reply; 3+ messages in thread
From: Pieter Wuille @ 2018-08-13 18:56 UTC (permalink / raw)
To: Bitcoin Dev
Hello all,
BIP174 currently specifies that non-witness UTXOs (the transactions
being spent by non-witness inputs) should be serialized in network
format.
I believe there are two issues with this.
1. Even in case the transaction whose output being spent itself has a
witness, this witness is immaterial to PSBT. It's only there to be
able to verify the txid commits to the output/amount being spent,
which can be done without witness.
2. "Network format" is a bit ambiguous. We can imagine a future
softfork that introduces a new type of witness. Network format could
be interpreted as including that new witness type, which is clearly
unnecessary (by the above argument), and would gratuitously break
compatibility with existing signers if implemented pedantically.
So my suggestion is to update the specification to state that
non-witness UTXOs must be serialized without witness. If it's too late
for that, it should instead be updated to explicitly specify with or
witnout witness, but it's safe to drop the witness.
Opinions?
Cheers,
--
Pieter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bitcoin-dev] Witness serialization in PSBT non-witness UTXOs
2018-08-13 18:56 [bitcoin-dev] Witness serialization in PSBT non-witness UTXOs Pieter Wuille
@ 2018-08-13 20:32 ` Achow101
2018-08-13 20:39 ` Gregory Maxwell
0 siblings, 1 reply; 3+ messages in thread
From: Achow101 @ 2018-08-13 20:32 UTC (permalink / raw)
To: Pieter Wuille, Bitcoin Protocol Discussion
Hi,
Since the BIP is already in proposed status, I think that we should specify the non-witness utxo to just be "witness or non-witness" serialization. This maintains compatibility with things that have already implemented but also maintains the forwards compatibility that is needed.
Andrew
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On August 13, 2018 11:56 AM, Pieter Wuille via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
> Hello all,
>
> BIP174 currently specifies that non-witness UTXOs (the transactions
> being spent by non-witness inputs) should be serialized in network
> format.
>
> I believe there are two issues with this.
>
> 1. Even in case the transaction whose output being spent itself has a
> witness, this witness is immaterial to PSBT. It's only there to be
> able to verify the txid commits to the output/amount being spent,
> which can be done without witness.
>
> 2. "Network format" is a bit ambiguous. We can imagine a future
> softfork that introduces a new type of witness. Network format could
> be interpreted as including that new witness type, which is clearly
> unnecessary (by the above argument), and would gratuitously break
> compatibility with existing signers if implemented pedantically.
>
> So my suggestion is to update the specification to state that
> non-witness UTXOs must be serialized without witness. If it's too late
> for that, it should instead be updated to explicitly specify with or
> witnout witness, but it's safe to drop the witness.
>
> Opinions?
>
> Cheers,
>
> --
> Pieter
>
>
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bitcoin-dev] Witness serialization in PSBT non-witness UTXOs
2018-08-13 20:32 ` Achow101
@ 2018-08-13 20:39 ` Gregory Maxwell
0 siblings, 0 replies; 3+ messages in thread
From: Gregory Maxwell @ 2018-08-13 20:39 UTC (permalink / raw)
To: achow101-lists, Bitcoin Dev
An alternative is to require reading either or but also require
writing without the witness. It's likely that two years from now,
nothing will write the witnesses, and the requirement to support
reading them could be dropped.
On Mon, Aug 13, 2018 at 8:32 PM Achow101 via bitcoin-dev
<bitcoin-dev@lists.linuxfoundation.org> wrote:
>
> Hi,
>
> Since the BIP is already in proposed status, I think that we should specify the non-witness utxo to just be "witness or non-witness" serialization. This maintains compatibility with things that have already implemented but also maintains the forwards compatibility that is needed.
>
> Andrew
>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On August 13, 2018 11:56 AM, Pieter Wuille via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
>
> > Hello all,
> >
> > BIP174 currently specifies that non-witness UTXOs (the transactions
> > being spent by non-witness inputs) should be serialized in network
> > format.
> >
> > I believe there are two issues with this.
> >
> > 1. Even in case the transaction whose output being spent itself has a
> > witness, this witness is immaterial to PSBT. It's only there to be
> > able to verify the txid commits to the output/amount being spent,
> > which can be done without witness.
> >
> > 2. "Network format" is a bit ambiguous. We can imagine a future
> > softfork that introduces a new type of witness. Network format could
> > be interpreted as including that new witness type, which is clearly
> > unnecessary (by the above argument), and would gratuitously break
> > compatibility with existing signers if implemented pedantically.
> >
> > So my suggestion is to update the specification to state that
> > non-witness UTXOs must be serialized without witness. If it's too late
> > for that, it should instead be updated to explicitly specify with or
> > witnout witness, but it's safe to drop the witness.
> >
> > Opinions?
> >
> > Cheers,
> >
> > --
> > Pieter
> >
> >
> > bitcoin-dev mailing list
> > bitcoin-dev@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-13 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 18:56 [bitcoin-dev] Witness serialization in PSBT non-witness UTXOs Pieter Wuille
2018-08-13 20:32 ` Achow101
2018-08-13 20:39 ` Gregory Maxwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox