<oembed><type>rich</type><version>1.0</version><title>Greg Sanders [ARCHIVE] wrote</title><author_name>Greg Sanders [ARCHIVE] (npub1jd…3gh0m)</author_name><author_url>https://yabu.me/npub1jdl3plz00rvxwc6g2ckemzrgg0amx5wen4kfvs3laxtssxvk9cvsf3gh0m</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2018-06-21&#xA;📝 Original message:&gt;Hmm, upon further reflection, maybe it&#39;s not even worth including *any*&#xA;per-output data, aside from what the original transaction contains.&#xA;&#xA;&gt;The output redeem script is either:&#xA;- unknown, because we have received only an address from the receiver&#xA;- or it is known, because it is ours and in that case it doesn’t make&#xA;sense to include it in PSBT&#xA;&#xA;Signers are an extremely heterogeneous bunch. A signer may need to&#xA;introspect on the script, such as &#34;this is a 2-of-3,&#xA;and I&#39;m one of the keys&#34;. Even in basic p2pkh settings not adding any&#xA;output information rules out things like change&#xA;detection on any conceivable hardware wallet, or even simple software&#xA;wallets that don&#39;t carry significant state.&#xA;&#xA;On Thu, Jun 21, 2018 at 10:35 AM Tomas Susanka via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; Hello,&#xA;&gt;&#xA;&gt; First of all, let me thank you for all the hard work you and others have&#xA;&gt; put into this.&#xA;&gt;&#xA;&gt;&#xA;&gt; On 21.6.2018 02:39, Achow101 via bitcoin-dev wrote:&#xA;&gt; &gt; While I agree that the BIP itself should be revised to reflect these&#xA;&gt; suggestions, I fear that it may be too late. I know of a few other&#xA;&gt; developers who have implemented BIP 174 already but have not yet responded&#xA;&gt; to this email.&#xA;&gt;&#xA;&gt; We do realize that this discussion should have happened earlier, however&#xA;&gt; agreeing on a good standard should be the number one priority for all&#xA;&gt; the parties involved.&#xA;&gt;&#xA;&gt; The fact that someone already implemented this is indeed unfortunate,&#xA;&gt; but I don&#39;t think we should lower our demands on the standard just&#xA;&gt; because of a bad timing.&#xA;&gt;&#xA;&gt; &gt;&gt; A question to consider is,&#xA;&gt; &gt;&gt; will there be more per-output data? If yes, it might make sense to have&#xA;&gt; &gt;&gt; an output section.&#xA;&gt; &gt; I think it is unlikely that there would be anymore per-output data.&#xA;&gt;&#xA;&gt; Hmm, upon further reflection, maybe it&#39;s not even worth including *any*&#xA;&gt; per-output data, aside from what the original transaction contains.&#xA;&gt;&#xA;&gt; The output redeem script is either:&#xA;&gt; - unknown, because we have received only an address from the receiver&#xA;&gt; - or it is known, because it is ours and in that case it doesn’t make&#xA;&gt; sense to include it in PSBT&#xA;&gt;&#xA;&gt; We got stuck on the idea of the Creator providing future (output)&#xA;&gt; redeem/witness scripts. But that seems to be a minority use case and can&#xA;&gt; be solved efficiently via the same channels that coordinate the PSBT&#xA;&gt; creation. Sorry to change opinions so quickly on this one.&#xA;&gt;&#xA;&gt; &gt;&#xA;&gt; &gt;&gt; 3) The sighash type 0x03 says the sighash is only a recommendation. That&#xA;&gt; &gt;&gt; seems rather ambiguous. If the field is specified shouldn&#39;t it be&#xA;&gt; binding?&#xA;&gt; &gt; I disagree. It is up to the signer to decide what they wish to sign, not&#xA;&gt; for the creator to specify what to sign. The creator can ask the signer to&#xA;&gt; sign something in a particular way, but it is ultimately up to the signer&#xA;&gt; to decide.&#xA;&gt;&#xA;&gt; This seems very ambiguous. The Signer always has the option of not&#xA;&gt; signing. *What* to sign is a matter of coordination between the parties;&#xA;&gt; otherwise, you could make all the fields advisory and let anyone sign&#xA;&gt; anything they like?&#xA;&gt;&#xA;&gt; We don&#39;t understand the usecase for a field that is advisory but not&#xA;&gt; binding. On what basis would you choose to respect or disregard the&#xA;&gt; advisory field? Either one party has a preference, in which case they&#xA;&gt; have to coordinate with the other anyway - or they don&#39;t, in which case&#xA;&gt; they simply leave the field out.&#xA;&gt;&#xA;&gt; &gt; Size is not really a constraint, but we do not want to be unnecessarily&#xA;&gt; large. The PSBT still has to be transmitted to other people. It will likely&#xA;&gt; be used by copy and pasting the string into a text box. Copying and pasting&#xA;&gt; very long strings of text can be annoying and cumbersome. So the goal is to&#xA;&gt; keep the format still relatively clear while avoiding the duplication of&#xA;&gt; data.&#xA;&gt;&#xA;&gt; I agree. Just to put some numbers on this: if we expect a 5-part&#xA;&gt; derivation path, and add the master key fingerprint, that is 4 + 5*4 =&#xA;&gt; 24 bytes (~32 base64 letters) per input and signer. I&#39;d argue this is&#xA;&gt; not significant.&#xA;&gt; If we used full xpub, per Pieter&#39;s suggestion, that would grow to 32 +&#xA;&gt; 32 + 5*4 = 84 bytes (~112 letters) per input/signer, which is quite a lot.&#xA;&gt;&#xA;&gt; On the other hand, keeping the BIP32 paths per-input means that we don&#39;t&#xA;&gt; need to include the public key (as in the lookup key), so that&#39;s 32&#xA;&gt; bytes down per path. In general, all the keys can be fully reconstructed&#xA;&gt; from their values:&#xA;&gt;&#xA;&gt; redeem script key = hash160(value)&#xA;&gt; witness script key = sha256(value)&#xA;&gt; bip32 key = derive(value)&#xA;&gt;&#xA;&gt; The one exception is a partial signature. But even in that case we&#xA;&gt; expect that a given public key will always correspond to the same&#xA;&gt; signature, so we can act as if the public key is not part of the &#34;key&#34;.&#xA;&gt; In other words, we can move the public key to the value part of the record.&#xA;&gt;&#xA;&gt; This holds true unless there&#39;s some non-deterministic signing scheme,&#xA;&gt; *and* multiple Signers sign with the same public key, which is what&#xA;&gt; Pieter was alluding to on Twitter&#xA;&gt; (https://twitter.com/pwuille/status/1002627925110185984). Still, I would&#xA;&gt; argue (as he also suggested) that keeping the format more complex to&#xA;&gt; support this particular use case is probably not worth it.&#xA;&gt;&#xA;&gt; Also, we can mostly ignore deduplication of witness/redeem scripts.&#xA;&gt; These still need to be included in the resulting transaction, duplicated&#xA;&gt; if necessary, so I think counting their repetition against the size of&#xA;&gt; PSBT isn&#39;t worth it.&#xA;&gt;&#xA;&gt;&#xA;&gt; Best,&#xA;&gt; Tomas&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180621/b752efa0/attachment.html&gt;</html></oembed>