<oembed><type>rich</type><version>1.0</version><title>matejcik [ARCHIVE] wrote</title><author_name>matejcik [ARCHIVE] (npub18g…sgac3)</author_name><author_url>https://yabu.me/npub18g04tf4qudcsna6qfcrm55s39axx3ymrunr65gxen4rctm0zv24sasgac3</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2018-06-19&#xA;📝 Original message:Hello,&#xA;&#xA;First of all, we&#39;d like to apologize for such a late feedback, since&#xA;there is a PR for this already. We&#39;ve come up with a few more notes on&#xA;this, so we are introducing those in this message and replying on&#xA;Pieter&#39;s points in another one.&#xA;&#xA;&#xA;1) Why isn&#39;t the global type 0x03 (BIP-32 path) per-input? How do we&#xA;know, which BIP-32 path goes to which input? The only idea that comes to&#xA;my mind is that we should match the input&#39;s scriptPubKey&#39;s pubkey to&#xA;this 0x03&#39;s key (the public key).&#xA;&#xA;If our understanding is correct, the BIP-32 path is global to save space&#xA;in case two inputs share the same BIP-32 path? How often does that&#xA;happen? And in case it does, doesn&#39;t it mean an address reuse which is&#xA;discouraged?&#xA;&#xA;Also, we believe that if the public key is to be used as &#34;spent to by an&#xA;output&#34; it should be in an output section. If the public key is to be&#xA;used to sign an input, it should be in the input section. Again, how&#xA;often are those the same? We understand creating another section might&#xA;be cumbersome, but it&#39;d significantly increase clarity to have global,&#xA;input and output section.&#xA;&#xA;Alternately, we could keep “spend to” public keys in the global section,&#xA;and put the input public keys to the per-input sections. This is less&#xA;clear, but doesn’t introduce another section. A question to consider is,&#xA;will there be more per-output data? If yes, it might make sense to have&#xA;an output section.&#xA;&#xA;&#xA;2) The global items 0x01 (redeem script) and 0x02 (witness script) are&#xA;somewhat confusing. Let&#39;s consider only the redeem script (0x01) to make&#xA;it simple. The value description says: &#34;A redeem script that will be&#xA;needed to sign a Pay-To-Script-Hash input or is spent to by an output.&#34;.&#xA;Does this mean that the record includes both input&#39;s redeem script&#xA;(because we need to sign it), but also a redeem script for the output&#xA;(to verify we are sending to a correct P2SH)? To mix those two seems&#xA;really confusing.&#xA;&#xA;Yet again, adding a new output section would make this more readable. We&#xA;would include the input’s redeem script in the input section and the&#xA;output’s redeem script again in the output section, because they’ll most&#xA;likely differ anyway.&#xA;&#xA;The rationale says that the scripts are global to avoid duplication.&#xA;However, how often is this the case? The scripts include a hash of some&#xA;OP codes and the recipient&#39;s public key for example. So a) how often are&#xA;two scripts equal to justify this? b) if they&#39;re the same, doesn&#39;t it&#xA;yet again signalize address reuse?&#xA;&#xA;&#xA;3) The sighash type 0x03 says the sighash is only a recommendation. That&#xA;seems rather ambiguous. If the field is specified shouldn&#39;t it be binding?&#xA;&#xA;&#xA;4) Is it a good idea to skip records which types we are unaware of? We&#xA;can&#39;t come up with a reasonable example, but intuitively this seems as a&#xA;potential security issue. We think we should consider  introducing a&#xA;flag, which would define if the record is &#34;optional&#34;. In case the signer&#xA;encounters a record it doesn&#39;t recognize and such flag is not set, it&#xA;aborts the procedure. If we assume the set model we could change the&#xA;structure to &lt;type&gt;&lt;optional flag&gt;&lt;length&gt;{data}. We are not keen on&#xA;this, but we wanted to include this idea to see what you think.&#xA;&#xA;-----------&#xA;&#xA;In general, the standard is trying to be very space-conservative,&#xA;however is that really necessary? We would argue for clarity and ease of&#xA;use over space constraints. We think more straightforward approach is&#xA;desired, although more space demanding. What are the arguments to make&#xA;this as small as possible? If we understand correctly, this format is&#xA;not intended for blockchain nor for persistent storage, so size doesn’t&#xA;matter nearly as much.&#xA;&#xA;&#xA;Thank you,&#xA;&#xA;Tomas Susanka&#xA;Jan Matejek&#xA;&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 819 bytes&#xA;Desc: OpenPGP digital signature&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180619/57fc30e2/attachment.sig&gt;</html></oembed>