<oembed><type>rich</type><version>1.0</version><title>Peter D. Gray [ARCHIVE] wrote</title><author_name>Peter D. Gray [ARCHIVE] (npub10v…t058y)</author_name><author_url>https://yabu.me/npub10vqyu8x3f0lfttk98xc28ppuyufaz4df8x4aspa9w9xz5z05snzq7t058y</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2018-06-23&#xA;📝 Original message:On Fri, Jun 22, 2018 at 06:28:33PM -0400, Achow101 wrote:&#xA;&gt; After reading the comments here about BIP 174, I would like to propose the following changes:&#xA;&gt; &#xA;&gt; - Moving redeemScripts, witnessScripts, and BIP 32 derivation paths to per-input and per-output data&#xA;...&#xA;&#xA;I like this. I agree it&#39;s making things easier and it&#39;s more flexible.&#xA;&#xA;&gt; - Finalized scriptSig and scriptWitness fields&#xA;&gt; &#xA;&gt; To determine whether two PSBTs are the same, we can compare the unsigned transaction. To ensure that the&#xA;&gt; unsigned transactions are the same for two PSBTs with data for the same tx, we cannot put scriptSigs or&#xA;&gt; scriptWitnesses into it. Thus for each input, two new fields have been added to store the finalized scriptSig&#xA;&gt; and finalized scriptWitness.&#xA;...&#xA;&#xA;To be honest, I don&#39;t understand the reasons/implications of this change, but it seems harmless.&#xA;&#xA;&gt; - Mandatory sighash&#xA;...&#xA;&#xA;Good improvement.&#xA;&#xA;&gt; - Encoding&#xA;&gt; &#xA;&gt; I have decided that PSBTs should either be in binary or encoded as a Base64 string. For the latter, several&#xA;&gt; Bitcoin clients already support Base64 encoding of data (for signed messages) so this will not add any extra&#xA;&gt; dependencies like Z85 would.&#xA;...&#xA;&#xA;Personally, I don&#39;t think you should spec an encoding. It should be binary only and hex for developers and JSON interfaces. My thinking is that PSBT&#39;s are not user-visible things. They have a short lifetime and are nothing something that is &#34;stored&#34; or referenced much later. Hex is good enough and has no downsides as an excoding except for density.&#xA;&#xA;On the other hand, suggesting a filename extension (probably .PSBT?) and a mime-type to match, are helpful since wallets and such will want to register with their operating systems to become handlers of those mimetypes. Really that&#39;s a lot more important for interoperability at this point, than an encoding.&#xA;&#xA;&gt; A draft of the revised BIP can be found here: https://github.com/achow101/bips/blob/bip174-rev/bip-0174.mediawiki&#xA;&gt; If these changes are satisfactory, I will open a PR to the BIPs repo to update the BIP tomorrow. I will also&#xA;&gt; create test vectors and update the implementation PR&#39;ed to Core.&#xA;...&#xA;&#xA;Looking forward to test vectors, and I might have more to say once my code can handle them (again).&#xA;&#xA;Feedback on the BIP as it stands now: &#xA;&#xA;- Appendix A needs an update, and I suggest defining symbols (PK_PARTIAL_SIG == 0x02) for the numeric key values. This helps implementers as we don&#39;t all define our own symbols and/or use numeric constants in our code.&#xA;&#xA;- Those tables are just not working. Might want to reformat as descriptive lists, point form, or generally anything else... sorry.&#xA;&#xA;&gt; Andrew&#xA;&gt; _______________________________________________&#xA;&#xA;---&#xA;Peter D. Gray  ||  Founder, Coinkite  ||  Twitter: @dochex  ||  GPG: A3A31BAD 5A2A5B10&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 496 bytes&#xA;Desc: not available&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180623/9c0b1846/attachment.sig&gt;</html></oembed>