<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2023-06-07T01:53:34Z</updated>
  <generator>https://yabu.me</generator>

  <title>Nostr notes by matejcik [ARCHIVE]</title>
  <author>
    <name>matejcik [ARCHIVE]</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://yabu.me/npub18g04tf4qudcsna6qfcrm55s39axx3ymrunr65gxen4rctm0zv24sasgac3.rss" />
  <link href="https://yabu.me/npub18g04tf4qudcsna6qfcrm55s39axx3ymrunr65gxen4rctm0zv24sasgac3" />
  <id>https://yabu.me/npub18g04tf4qudcsna6qfcrm55s39axx3ymrunr65gxen4rctm0zv24sasgac3</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://yabu.me/nevent1qqsffwwcmtzylmzgtvqww9lujqx0s5rxw5fd88ae09z4l8x0lwj633gzyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32k4guzj7</id>
    
      <title type="html">📅 Original date posted:2018-06-27 📝 Original message:hello, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsffwwcmtzylmzgtvqww9lujqx0s5rxw5fd88ae09z4l8x0lwj633gzyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32k4guzj7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxnfnl5qhegeuhfkvytd4xwsu0wn3ccqs5u4jamrpfyxnmr5j9shq2qhx60&#39;&gt;nevent1q…hx60&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-27&lt;br/&gt;📝 Original message:hello,&lt;br/&gt;&lt;br/&gt;On 26.6.2018 18:58, William Casarin wrote:&lt;br/&gt;&amp;gt; as a data point, I was able to build a simple serializer[1] in about an&lt;br/&gt;&amp;gt; afternoon. I would much prefer to use this lib in say, clightning (my&lt;br/&gt;&amp;gt; original goal), without having to have the larger protobuf dependency.&lt;br/&gt;&lt;br/&gt;To drive my point home, here&amp;#39;s a PR converting the `writer` part of your&lt;br/&gt;code to a protobuf-compatible version. It took me less than an hour to&lt;br/&gt;write, the bigger part of which was spent orienting myself in unfamiliar&lt;br/&gt;code. I assume I could do `reader` in less than that, if your&lt;br/&gt;deserialization code was complete.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://github.com/jb55/libpsbt/pull/3/files&#34;&gt;https://github.com/jb55/libpsbt/pull/3/files&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This code produces PSBTs that my &amp;#34;bip174 playground&amp;#34; can correctly parse.&lt;br/&gt;&lt;br/&gt;regards&lt;br/&gt;m.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/jb55/libpsbt&#34;&gt;https://github.com/jb55/libpsbt&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://jb55.com&#34;&gt;https://jb55.com&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 819 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180627/4d38374e/attachment.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180627/4d38374e/attachment.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:13:13Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsy4dr6e8qaxjran0c3kwf9zqzn06naqqflkyep8pnnnhm990uy5aqzyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32kmhwcws</id>
    
      <title type="html">📅 Original date posted:2018-06-27 📝 Original message:hello, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsy4dr6e8qaxjran0c3kwf9zqzn06naqqflkyep8pnnnhm990uy5aqzyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32kmhwcws" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfcg9t4m6pdm8duldtj909yzuhz6waqeksfjc8865lw5xthqt7yqsm3aqd5&#39;&gt;nevent1q…aqd5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-27&lt;br/&gt;📝 Original message:hello,&lt;br/&gt;&lt;br/&gt;On 26.6.2018 22:30, Pieter Wuille wrote:&lt;br/&gt;&amp;gt;&amp;gt; (Moreover, as I wrote previously, the Combiner seems like a weirdly&lt;br/&gt;&amp;gt;&amp;gt; placed role. I still don&amp;#39;t see its significance and why is it important&lt;br/&gt;&amp;gt;&amp;gt; to correctly combine PSBTs by agents that don&amp;#39;t understand them. If you&lt;br/&gt;&amp;gt;&amp;gt; have a usecase in mind, please explain.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Forward compatibility with new script types. A transaction may spend&lt;br/&gt;&amp;gt; inputs from different outputs, with different script types. Perhaps&lt;br/&gt;&amp;gt; some of these are highly specialized things only implemented by some&lt;br/&gt;&amp;gt; software (say HTLCs of a particular structure), in non-overlapping&lt;br/&gt;&amp;gt; ways where no piece of software can handle all scripts involved in a&lt;br/&gt;&amp;gt; single transaction. If Combiners cannot deal with unknown fields, they&lt;br/&gt;&amp;gt; won&amp;#39;t be able to deal with unknown scripts.&lt;br/&gt;&lt;br/&gt;Record-based Combiners *can* deal with unknown fields. Either by&lt;br/&gt;including both versions, or by including one selected at random. This is&lt;br/&gt;the same in k-v model.&lt;br/&gt;&lt;br/&gt;&amp;gt; combining must be done independently by Combiner implementations for&lt;br/&gt;&amp;gt; each script type involved. As this is easily avoided by adding a&lt;br/&gt;&amp;gt; slight bit of structure (parts of the fields that need to be unique -&lt;br/&gt;&amp;gt; &amp;#34;keys&amp;#34;), this seems the preferable option.&lt;br/&gt;&lt;br/&gt;IIUC, you&amp;#39;re proposing a &amp;#34;semi-smart Combiner&amp;#34; that understands and&lt;br/&gt;processes some fields but not others? That doesn&amp;#39;t seem to change&lt;br/&gt;things. Either the &amp;#34;dumb&amp;#34; combiner throws data away before the &amp;#34;smart&amp;#34;&lt;br/&gt;one sees it, or it needs to include all of it anyway.&lt;br/&gt;&lt;br/&gt;&amp;gt; No, a Combiner can pick any of the values in case different PSBTs have&lt;br/&gt;&amp;gt; different values for the same key. That&amp;#39;s the point: by having a&lt;br/&gt;&amp;gt; key-value structure the choice of fields can be made such that&lt;br/&gt;&amp;gt; Combiners don&amp;#39;t need to care about the contents. Finalizers do need to&lt;br/&gt;&amp;gt; understand the contents, but they only operate once at the end.&lt;br/&gt;&amp;gt; Combiners may be involved in any PSBT passing from one entity to&lt;br/&gt;&amp;gt; another.&lt;br/&gt;&lt;br/&gt;Yes. Combiners don&amp;#39;t need to care about the contents.&lt;br/&gt;So why is it important that a Combiner properly de-duplicates the case&lt;br/&gt;where keys are the same but values are different? This is a job that,&lt;br/&gt;AFAICT so far, can be safely left to someone along the chain who&lt;br/&gt;understands that particular record.&lt;br/&gt;&lt;br/&gt;Say we have field F(key,value), and several Signers produce F(1,1),&lt;br/&gt;F(1,2), F(1,3).&lt;br/&gt;&lt;br/&gt;A key-based Combiner will pick exactly one to pass along. A record-based&lt;br/&gt;Combiner will pass all three.&lt;br/&gt;&lt;br/&gt;It seems that you consider the latter PSBT &amp;#34;invalid&amp;#34;. But it is well&lt;br/&gt;formed and doesn&amp;#39;t contain duplicate records. A Finalizer, or a&lt;br/&gt;different Combiner that understands field F, can as well have the rule&lt;br/&gt;&amp;#34;throw away all but one&amp;#34; for this case.&lt;br/&gt;&lt;br/&gt;To repeat and restate my central question:&lt;br/&gt;Why is it important, that an agent which doesn&amp;#39;t understand a particular&lt;br/&gt;field structure, can nevertheless make decisions about its inclusion or&lt;br/&gt;omission from the result (based on a repeated prefix)?&lt;br/&gt;&lt;br/&gt;Actually, I can imagine the opposite: having fields with same &amp;#34;key&amp;#34;&lt;br/&gt;(identifying data), and wanting to combine their &amp;#34;values&amp;#34; intelligently&lt;br/&gt;without losing any of the data. Say, two Signers producing separate&lt;br/&gt;parts of a combined-signature under the same common public key?&lt;br/&gt;&lt;br/&gt;&amp;gt; In case of BIP32 derivation, computing the pubkeys is possibly&lt;br/&gt;&amp;gt; expensive. A simple signer can choose to just sign with whatever keys&lt;br/&gt;&amp;gt; are present, but they&amp;#39;re not the only way to implement a signer, and&lt;br/&gt;&amp;gt; even less the only software interacting with this format. Others may&lt;br/&gt;&amp;gt; want to use a matching approach to find keys that are relevant;&lt;br/&gt;&amp;gt; without pubkeys in the format, they&amp;#39;re forced to perform derivations&lt;br/&gt;&amp;gt; for all keys present.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m going to search for relevant keys by comparing master fingerprint; I&lt;br/&gt;would expect HWWs generally don&amp;#39;t have index based on leaf pubkeys.&lt;br/&gt;OTOH, Signers with lots of keys probably aren&amp;#39;t resource-constrained and&lt;br/&gt;can do the derivations in case of collisions.&lt;br/&gt;&lt;br/&gt;Also, you need to do the derivation and checking anyway, because what if&lt;br/&gt;there is a mismatch between the key and the value?&lt;br/&gt;&lt;br/&gt;I liked @achow101&amp;#39;s idea about supporting non-derived keys, but I&lt;br/&gt;assumed that you would match them based on the master fingerprint too?&lt;br/&gt;&lt;br/&gt;I wouldn&amp;#39;t be against including the full master public key (probably&lt;br/&gt;without chaincode) instead of the fingerprint, as you proposed earlier.&lt;br/&gt;But including both the leaf pubkey and the fingerprint seems weird.&lt;br/&gt;&lt;br/&gt;&amp;gt; If you take the records model, and then additionally drop the&lt;br/&gt;&amp;gt; whole-record uniqueness constraint, yes, though that seems pushing it&lt;br/&gt;&amp;gt; a bit by moving even more guarantees from the file format to&lt;br/&gt;&amp;gt; application level code.&lt;br/&gt;&lt;br/&gt;The &amp;#34;file format&amp;#34; makes no guarantees, because the parsing code and&lt;br/&gt;application code is the same anyway. You could say I&amp;#39;m proposing to&lt;br/&gt;separate these concerns ;)&lt;br/&gt;&lt;br/&gt;regards&lt;br/&gt;m.&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 819 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180627/386870f6/attachment.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180627/386870f6/attachment.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:13:13Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsgt7jx3c854m940ag00z5gnmjmtwkxfervwjw5zgwptchzztxrnqqzyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32kmttn6x</id>
    
      <title type="html">📅 Original date posted:2018-06-26 📝 Original message:hello, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsgt7jx3c854m940ag00z5gnmjmtwkxfervwjw5zgwptchzztxrnqqzyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32kmttn6x" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvjkym83fpvhlk23922asesfn8ts0cz6qhp4vc4w2m4ks54vqwzlq2geklz&#39;&gt;nevent1q…eklz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-26&lt;br/&gt;📝 Original message:hello,&lt;br/&gt;&lt;br/&gt;in general, I agree with my colleague Tomas, the proposed changes are&lt;br/&gt;good and achieve the most important things that we wanted. We&amp;#39;ll review&lt;br/&gt;the proposal in more detail later.&lt;br/&gt;&lt;br/&gt;For now a couple minor things I have run into:&lt;br/&gt;&lt;br/&gt;- valid test vector 2 (&amp;#34;one P2PKH input and one P2SH-P2WPKH input&amp;#34;)&lt;br/&gt;seems broken, at least its hex version; a delimiter seems to be missing,&lt;br/&gt;misplaced or corrupted&lt;br/&gt;- at least the first signing vector is not updated, but you probably&lt;br/&gt;know that&lt;br/&gt;- BIP32 derivation fields don&amp;#39;t specify size of the &amp;#34;master public key&amp;#34;,&lt;br/&gt;which would make it un-parsable :)&lt;br/&gt;- &amp;#34;Transaction format is specified as follows&amp;#34; and its table need to be&lt;br/&gt;updated.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;m still going to argue against the key-value model though.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s true that this is not significant in terms of space. But I&amp;#39;m more&lt;br/&gt;concerned about human readability, i.e., confusing future implementers.&lt;br/&gt;At this point, the key-value model is there &amp;#34;for historical reasons&amp;#34;,&lt;br/&gt;except these aren&amp;#39;t valid even before finalizing the format. The&lt;br/&gt;original rationale for using key-values seems to be gone (no key-based&lt;br/&gt;lookups are necessary). As for combining and deduplication, whether key&lt;br/&gt;data is present or not is now purely a stand-in for a &amp;#34;repeatable&amp;#34; flag.&lt;br/&gt;We could just as easily say, e.g., that the high bit of &amp;#34;type&amp;#34; specifies&lt;br/&gt;whether this record can be repeated.&lt;br/&gt;&lt;br/&gt;(Moreover, as I wrote previously, the Combiner seems like a weirdly&lt;br/&gt;placed role. I still don&amp;#39;t see its significance and why is it important&lt;br/&gt;to correctly combine PSBTs by agents that don&amp;#39;t understand them. If you&lt;br/&gt;have a usecase in mind, please explain.&lt;br/&gt;ISTM a Combiner could just as well combine based on whole-record&lt;br/&gt;uniqueness, and leave the duplicate detection to the Finalizer. In case&lt;br/&gt;the incoming PSBTs have incompatible unique fields, the Combiner would&lt;br/&gt;have to fail anyway, so the Finalizer might as well do it. Perhaps it&lt;br/&gt;would be good to leave out the Combiner role entirely?)&lt;br/&gt;&lt;br/&gt;There&amp;#39;s two remaining types where key data is used: BIP32 derivations&lt;br/&gt;and partial signatures. In case of BIP32 derivation, the key data is&lt;br/&gt;redundant ( pubkey = derive(value) ), so I&amp;#39;d argue we should leave that&lt;br/&gt;out and save space. In case of partial signatures, it&amp;#39;s simple enough to&lt;br/&gt;make the pubkey part of the value.&lt;br/&gt;&lt;br/&gt;Re breaking change, we are proposing breaking changes anyway, existing&lt;br/&gt;code *will* need to be touched, and given that this is a hand-parsed&lt;br/&gt;format, changing `parse_keyvalue` to `parse_record` seems like a small&lt;br/&gt;matter?&lt;br/&gt;&lt;br/&gt;---&lt;br/&gt;&lt;br/&gt;At this point I&amp;#39;m obliged to again argue for using protobuf.&lt;br/&gt;&lt;br/&gt;Thing is: BIP174 *is basically protobuf* (v2) as it stands. If I&amp;#39;m&lt;br/&gt;succesful in convincing you to switch to a record set model, it&amp;#39;s going&lt;br/&gt;to be &amp;#34;protobuf with different varint&amp;#34;.&lt;br/&gt;&lt;br/&gt;I mean this very seriously: (the relevant subset of) protobuf is a set&lt;br/&gt;of records in the following format:&lt;br/&gt;&amp;lt;record type&amp;gt;&amp;lt;varint field length&amp;gt;&amp;lt;field data&amp;gt;&lt;br/&gt;Record types can repeat, the schema specifies whether a field is&lt;br/&gt;repeatable or not - if it&amp;#39;s not, the last parsed value is used.&lt;br/&gt;&lt;br/&gt;BIP174 is a ad-hoc format, simple to parse by hand; but that results in&lt;br/&gt;_having to_ parse it by hand. In contrast, protobuf has a huge&lt;br/&gt;collection of implementations that will do the job of sorting record&lt;br/&gt;types into relevant struct fields, proper delimiting of records, etc.&lt;br/&gt;...while at the same time, implementing &amp;#34;protobuf-based-BIP174&amp;#34; by hand&lt;br/&gt;is roughly equally difficult as implementing the current BIP174.&lt;br/&gt;&lt;br/&gt;N.B., it&amp;#39;s possible to write a parser for protobuf-BIP174 without&lt;br/&gt;needing a general protobuf library. Protobuf formats are designed with&lt;br/&gt;forwards- and backwards- compatibility in mind, so having a hand-written&lt;br/&gt;implementation should not lead to incompatibilities.&lt;br/&gt;&lt;br/&gt;I did an experiment with this and other variants of the BIP174 format.&lt;br/&gt;You can see them here:&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/matejcik/bip174-playground&#34;&gt;https://github.com/matejcik/bip174-playground&lt;/a&gt;&lt;br/&gt;see in particular:&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/matejcik/bip174-playground/blob/master/bip174.proto&#34;&gt;https://github.com/matejcik/bip174-playground/blob/master/bip174.proto&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The tool at [1] does size comparisons. On the test vectors, protobuf is&lt;br/&gt;slightly smaller than key-value, and roughly equal to record-set, losing&lt;br/&gt;out a little when BIP32 fields are used.&lt;br/&gt;(I&amp;#39;m also leaving out key-data for BIP32 fields.)&lt;br/&gt;&lt;br/&gt;There&amp;#39;s some technical points to consider about protobuf, too:&lt;br/&gt;&lt;br/&gt;- I decided to structure the message as a single &amp;#34;PSBT&amp;#34; type, where&lt;br/&gt;&amp;#34;InputType&amp;#34; and &amp;#34;OutputType&amp;#34; are repeatable embedded fields. This seemed&lt;br/&gt;better in terms of extensibility - we could add more sections in the&lt;br/&gt;future. But the drawback is that you need to know the size of&lt;br/&gt;Input/OutputType record in advance.&lt;br/&gt;The other option is sending the messages separated by NUL bytes, same as&lt;br/&gt;now, in which case you don&amp;#39;t need to specify size.&lt;br/&gt;&lt;br/&gt;- in InputType, i&amp;#39;m using &amp;#34;uint32&amp;#34; for sighash. This type is not&lt;br/&gt;length-delimited, so non-protobuf consumers would have to understand it&lt;br/&gt;specially. We could also declare that all fields must be&lt;br/&gt;length-delimited[1] and implement sighash as a separate message type&lt;br/&gt;with one field.&lt;br/&gt;&lt;br/&gt;- non-protobuf consumers will also need to understand both protobuf&lt;br/&gt;varint and bitcoin compact uint, which is a little ugly&lt;br/&gt;&lt;br/&gt;best regards&lt;br/&gt;matejcik&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://developers.google.com/protocol-buffers/docs/encoding#structure&#34;&gt;https://developers.google.com/protocol-buffers/docs/encoding#structure&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 819 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180626/a1c4e6e5/attachment.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180626/a1c4e6e5/attachment.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:13:12Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs0te2v6t7mxmc6fkgu40rmycu87r7pppdtyckq7nf4qcatz864rvczyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32ks53cy5</id>
    
      <title type="html">📅 Original date posted:2018-06-19 📝 Original message:hello, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs0te2v6t7mxmc6fkgu40rmycu87r7pppdtyckq7nf4qcatz864rvczyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32ks53cy5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstq4adv7cqlwpmezzjr34yass08c0sx80a63acfqwrvcafsy3zrfgx47rch&#39;&gt;nevent1q…7rch&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-19&lt;br/&gt;📝 Original message:hello,&lt;br/&gt;this is our second e-mail with replies to Pieter&amp;#39;s suggestions.&lt;br/&gt;&lt;br/&gt;On 16.6.2018 01:34, pieter.wuille at gmail.com (Pieter Wuille) wrote:&lt;br/&gt;&amp;gt; * Key-value map model or set model.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; This was suggested in this thread:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://twitter.com/matejcik/status/1002618633472892929&#34;&gt;https://twitter.com/matejcik/status/1002618633472892929&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The motivation behind using a key-value model rather than a simple&lt;br/&gt;&amp;gt; list of records was that PSBTs can be duplicated (given to multiple&lt;br/&gt;&amp;gt; people for signing, for example), and merged back together after&lt;br/&gt;&amp;gt; signing. With a generic key-value model, any implementation can remove&lt;br/&gt;&amp;gt; the duplication even if they don&amp;#39;t understand fields that may have&lt;br/&gt;&amp;gt; been added in future extensions.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; However, almost the same can be accomplished by using the simpler set&lt;br/&gt;&amp;gt; model (the file consists of a set of records, with no duplication&lt;br/&gt;&amp;gt; allowed). This would mean that it would technically be legal to have&lt;br/&gt;&amp;gt; two partial signatures with the same key for the same input, if a&lt;br/&gt;&amp;gt; non-deterministic signer is used.&lt;br/&gt;&lt;br/&gt;Strongly agree with this.&lt;br/&gt;&lt;br/&gt;Just to note, we should probably use varint for the &amp;lt;type&amp;gt; field - this&lt;br/&gt;allows us, e.g., to create “namespaces” for future extensions by using&lt;br/&gt;one byte as namespace identifier and one as field identifier.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On the other hand, this means that certain data currently encoded&lt;br/&gt;&amp;gt; inside keys can be dropped, reducing the PSBT size. This is&lt;br/&gt;&amp;gt; particularly true for redeemscripts and witnessscripts, as they can&lt;br/&gt;&amp;gt; just be computed by the client when deserializing. The two types could&lt;br/&gt;&amp;gt; even be merged into just &amp;#34;scripts&amp;#34; records - as they don&amp;#39;t need to be&lt;br/&gt;&amp;gt; separated based on the way they&amp;#39;re looked up (Hash160 for P2SH, SHA256&lt;br/&gt;&amp;gt; for P2WSH). The same could be done for the BIP32 derivation paths,&lt;br/&gt;&amp;gt; though this may be expensive, as the client would need to derive all&lt;br/&gt;&amp;gt; keys before being able to figure out which one(s) it needs.&lt;br/&gt;&lt;br/&gt;It could be nice if the output scripts records would be ordered the same&lt;br/&gt;as their corresponding outputs. But what if the Creator doesn’t want to&lt;br/&gt;include a script for an output? Perhaps the Script record should have a&lt;br/&gt;&amp;lt;vout&amp;gt; field to match it to the appropriate output.&lt;br/&gt;&lt;br/&gt;As for input scripts, we suggest that they are per-input and not&lt;br/&gt;included in the global record, see the other thread.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; One exception is the &amp;#34;transaction&amp;#34; record, which needs to be unique.&lt;br/&gt;&amp;gt; That can either be done by adding an exception (&amp;#34;there can only be one&lt;br/&gt;&amp;gt; transaction record&amp;#34;), or by encoding it separately outside the normal&lt;br/&gt;&amp;gt; records (that may also be useful to make it clear that it is always&lt;br/&gt;&amp;gt; required).&lt;br/&gt;&lt;br/&gt;This seems to be the case for some fields already - i.e., an input field&lt;br/&gt;must have exactly one of Non-witness UTXO or Witness Output. So “adding&lt;br/&gt;an exception” is probably just a matter of language?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;We’d also like to note that the “number of inputs” field should be&lt;br/&gt;mandatory - and as such, possibly also a candidate for outside-record field.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; * Ability for Combiners to verify two PSBT are for the same transaction&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Clearly two PSBTs for incompatible transactions cannot be combined,&lt;br/&gt;&amp;gt; and this should not be allowed.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It may be easier to enforce this if the &amp;#34;transaction&amp;#34; record inside a&lt;br/&gt;&amp;gt; PSBT was required to be in a canonical form, meaning with empty&lt;br/&gt;&amp;gt; scriptSigs and witnesses. In order to do so, there could be per-input&lt;br/&gt;&amp;gt; records for &amp;#34;finalized scriptSig&amp;#34; and &amp;#34;finalized witness&amp;#34;. Actually&lt;br/&gt;&amp;gt; placing those inside the transaction itself would only be allowed when&lt;br/&gt;&amp;gt; all inputs are finalized.&lt;br/&gt;&lt;br/&gt;Agreed! Also increases clarity, which is desired.&lt;br/&gt;&lt;br/&gt;&amp;gt; * Derivation from xpub or fingerprint&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; For BIP32 derivation paths, the spec currently only encodes the 32-bit&lt;br/&gt;&amp;gt; fingerprint of the parent or master xpub. When the Signer only has a&lt;br/&gt;&amp;gt; single xprv from which everything is derived, this is obviously&lt;br/&gt;&amp;gt; sufficient. When there are many xprv, or when they&amp;#39;re not available&lt;br/&gt;&amp;gt; indexed by fingerprint, this may be less convenient for the signer.&lt;br/&gt;&amp;gt; Furthermore, it violates the &amp;#34;PSBT contains all information necessary&lt;br/&gt;&amp;gt; for signing, excluding private keys&amp;#34; idea - at least if we don&amp;#39;t treat&lt;br/&gt;&amp;gt; the chaincode as part of the private key.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; For that reason I would suggest that the derivation paths include the&lt;br/&gt;&amp;gt; full public key and chaincode of the parent or master things are&lt;br/&gt;&amp;gt; derived from. This does mean that the Creator needs to know the full&lt;br/&gt;&amp;gt; xpub which things are derived from, rather than just its fingerprint.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;We don’t understand the rationale for this idea. Do you see a scenario&lt;br/&gt;where an index on master fingerprint is not available but index by xpubs&lt;br/&gt;is? In our envisioned use cases at least, indexing private keys by xpubs&lt;br/&gt;(as opposed to deriving from a BIP32 path) makes no sense.&lt;br/&gt;&lt;br/&gt;Maybe this folds into the proposal for generic derivation below, or&lt;br/&gt;something like implementation-specific derivation methods?&lt;br/&gt;&lt;br/&gt;best regards&lt;br/&gt;&lt;br/&gt;Jan Matejek&lt;br/&gt;Tomas Susanka&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 819 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180619/70447694/attachment-0001.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180619/70447694/attachment-0001.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:13:07Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs9adkpszxjy7v4a9as6j936naq7z9y0qnf959lsuwcupj3ymx2tlszyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32kyqflrp</id>
    
      <title type="html">📅 Original date posted:2018-06-21 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs9adkpszxjy7v4a9as6j936naq7z9y0qnf959lsuwcupj3ymx2tlszyqap74dx5r3hzz0hgp8q0wjjzyh5c6ynv0jv023qmxw50p0duf32kyqflrp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs89ttrvcr2jy092uqa8q6wdhwad8ax3fg3g9fxjnu2gsxn0uhqrwg8eqgm9&#39;&gt;nevent1q…qgm9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-21&lt;br/&gt;📝 Original message:On 19.6.2018 19:16, Pieter Wuille wrote:&lt;br/&gt;&amp;gt;&amp;gt; 1) Why isn&amp;#39;t the global type 0x03 (BIP-32 path) per-input? How do we&lt;br/&gt;&amp;gt;&amp;gt; know, which BIP-32 path goes to which input? The only idea that comes to&lt;br/&gt;&amp;gt;&amp;gt; my mind is that we should match the input&amp;#39;s scriptPubKey&amp;#39;s pubkey to&lt;br/&gt;&amp;gt;&amp;gt; this 0x03&amp;#39;s key (the public key).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; If our understanding is correct, the BIP-32 path is global to save space&lt;br/&gt;&amp;gt;&amp;gt; in case two inputs share the same BIP-32 path? How often does that&lt;br/&gt;&amp;gt;&amp;gt; happen? And in case it does, doesn&amp;#39;t it mean an address reuse which is&lt;br/&gt;&amp;gt;&amp;gt; discouraged?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Yes, the reason is address reuse. It may be discouraged, but it still&lt;br/&gt;&amp;gt; happens in practice (and unfortunately it&amp;#39;s very hard to prevent&lt;br/&gt;&amp;gt; people from sending to the same address twice).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It&amp;#39;s certainly possible to make them per-input (and even per-output as&lt;br/&gt;&amp;gt; suggested below), but I don&amp;#39;t think it gains you much. At least when a&lt;br/&gt;&amp;gt; signer supports any kind of multisig, it needs to match up public keys&lt;br/&gt;&amp;gt; with derivation paths. If several can be provided, looking them up&lt;br/&gt;&amp;gt; from a global table or a per-input table shouldn&amp;#39;t fundamentally&lt;br/&gt;&amp;gt; change anything.&lt;br/&gt;&lt;br/&gt;So here’s a thing I’m still confused about.&lt;br/&gt;&lt;br/&gt;Imagine two cases, for a naive Signer:&lt;br/&gt;- either all data is global&lt;br/&gt;- or most data is per input.&lt;br/&gt;&lt;br/&gt;Now, the general signing flow is this:&lt;br/&gt;1. Pre-serialize the transaction&lt;br/&gt;2. Prepare the current input - fill out scriptPubKey (or equivalent for&lt;br/&gt;segwit)&lt;br/&gt;3. find a secret key&lt;br/&gt;4. output public key &#43; signature&lt;br/&gt;&lt;br/&gt;Step (3) is the main issue here.&lt;br/&gt;&lt;br/&gt;In the case of everything per-input, the naive Signer can do this:&lt;br/&gt;1. (in the global section) pre-serialize the transaction&lt;br/&gt;2. (in each input) find and fill out scriptPubKey from the provided UTXO&lt;br/&gt;3. (for a given BIP32 path) check if the master fingerprint matches&lt;br/&gt;mine, if yes, derive secret key, output pubkey, signature&lt;br/&gt;4. goto 3 (more keys per input), goto 2 (next input)&lt;br/&gt;&lt;br/&gt;Note that this flow works perfectly for multisig; it’s going to be the&lt;br/&gt;job of a Finalizer to build the final scriptSig, but each input can have&lt;br/&gt;multiple partial signatures -- and, interestingly, the naive Signer&lt;br/&gt;doesn’t even need to know about multisig.&lt;br/&gt;&lt;br/&gt;A less naive Signer will want to check things, maybe derive a scriptSig&lt;br/&gt;itself and check if it matches the given hash, etc., but it can do this&lt;br/&gt;all in place. You go linearly through the signing flow and place a&lt;br/&gt;couple strategic assertions along the way.&lt;br/&gt;&lt;br/&gt;However, if the data is global, as is now, it gets more complicated:&lt;br/&gt;1. (in the global section) pre-serialize the transaction, prefill lookup&lt;br/&gt;tables&lt;br/&gt;2. (for a given BIP32 path) check if mine, then derive public key and&lt;br/&gt;store in a dictionary&lt;br/&gt;3. (for each input) find _and parse_ scriptPubKey, extract (PK or)&lt;br/&gt;script hash&lt;br/&gt;4. lookup redeem script based on script-hash; if not found, goto 2; if&lt;br/&gt;found, parse out public key&lt;br/&gt;5. lookup public key in the BIP32 dictionary; if not found, goto 2&lt;br/&gt;6. output pubkey, signature&lt;br/&gt;&lt;br/&gt;In addition to being more steps and lookups, it requires the Signer to&lt;br/&gt;understand the redeem script. A strict Signer will want that anyway, but&lt;br/&gt;in the first case, the Signer can regenerate the scripts and compare&lt;br/&gt;specificaly the ones it&amp;#39;s working with; here, you need to parse them&lt;br/&gt;even before you know what you&amp;#39;re comparing to.&lt;br/&gt;&lt;br/&gt;Is there something I’m missing? Because as I see it, there is literally&lt;br/&gt;no advantage to the more complicated flow; that’s why we assumed that&lt;br/&gt;the format is space-saving, because saving space was the only reason we&lt;br/&gt;could imagine.&lt;br/&gt;&lt;br/&gt;&amp;gt; If we go down this route, if a field is marked as mandatory, can you&lt;br/&gt;&amp;gt; still act as a combiner for it? Future extensions should always&lt;br/&gt;&amp;gt; maintain the invariant that a simple combiner which just merges all&lt;br/&gt;&amp;gt; the fields and deduplicates should always be correct, I think. So such&lt;br/&gt;&amp;gt; a mandatory field should only apply to signers?&lt;br/&gt;&lt;br/&gt;(...)&lt;br/&gt;&lt;br/&gt;&amp;gt; However, perhaps we do want to enforce at-most one UTXO per input. If&lt;br/&gt;&amp;gt; there are more potential extensions like this, perhaps a key-value&lt;br/&gt;&amp;gt; model is better, as it&amp;#39;s much easier to enforce no duplicate keys than&lt;br/&gt;&amp;gt; it is to add field-specific logic to combiners (especially for&lt;br/&gt;&amp;gt; extensions they don&amp;#39;t know about yet).&lt;br/&gt;&lt;br/&gt;In general, you seem to focus a lot on the role of Combiners, esp.&lt;br/&gt;simple Combiners. To me, that doesn’t look like a significant role. As I&lt;br/&gt;envision it, a Combiner really doesn’t need to do anything more&lt;br/&gt;complicated than merge and deduplicate records, simply based on the&lt;br/&gt;uniqueness of the whole record.&lt;br/&gt;It’s the Finalizer’s job to reconstruct and validate the result. Also&lt;br/&gt;ISTM if something messes up the PSBT (such as including multiple&lt;br/&gt;conflicting fields anywhere), it’s OK to leave it to Finalizer to fail.&lt;br/&gt;&lt;br/&gt;Are the Combiners supposed to be separate from Finalizers? (Is there a&lt;br/&gt;risk of a Combiner passing along a bad PSBT, Finalizer rejecting it, and&lt;br/&gt;the other parties not finding out?)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; If we go with the &amp;#34;not put signatures/witnesses inside the transaction&lt;br/&gt;&amp;gt; until all of them are finalized&amp;#34; suggestion, perhaps the number of&lt;br/&gt;&amp;gt; inputs field can be dropped. There would be always one exactly for&lt;br/&gt;&amp;gt; each input (but some may have the &amp;#34;final script/witness&amp;#34; field and&lt;br/&gt;&amp;gt; others won&amp;#39;t).&lt;br/&gt;&lt;br/&gt;Strongly agree with this. A guarantee that number of inputs in the&lt;br/&gt;transaction corresponds to number of input fields for PBST looks cleaner&lt;br/&gt;than specifying it separately. This way we can also drop the &amp;#34;input index&amp;#34;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Right now, the BIP32 fields are of the form &amp;lt;master&lt;br/&gt;&amp;gt; fingerprint&amp;gt;&amp;lt;childidx&amp;gt;&amp;lt;childidx&amp;gt;&amp;lt;childidx&amp;gt;...&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Instead, I suggest fields of the form &amp;lt;master pubkey&amp;gt;&amp;lt;master&lt;br/&gt;&amp;gt; chaincode&amp;gt;&amp;lt;childidx&amp;gt;&amp;lt;childidx&amp;gt;&amp;lt;childidx&amp;gt;...&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The fingerprint in this case is identical to the first 32 bit of the&lt;br/&gt;&amp;gt; Hash160 of &amp;lt;master pubkey&amp;gt;, so certainly no information is lost by&lt;br/&gt;&amp;gt; making this change.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; This may be advantageous for three reasons:&lt;br/&gt;&amp;gt; * It permits signers to have ~thousands of master keys (at which point&lt;br/&gt;&amp;gt; 32-bit fingerprints would start having reasonable chance for&lt;br/&gt;&amp;gt; collisions, meaning multiple derivation attempts would be needed to&lt;br/&gt;&amp;gt; figure out which one to use).&lt;br/&gt;&amp;gt; * It permits signers to index their master keys by whatever they like&lt;br/&gt;&amp;gt; (for example, SHA256 rather than Hash160 or prefix thereof)&amp;gt; * It permits signers who don&amp;#39;t store a chaincode at all, and just&lt;br/&gt;&amp;gt; protect a single private key.&lt;br/&gt;&lt;br/&gt;I like this last usecase a lot, but perhaps that&amp;#39;s a role for a&lt;br/&gt;&amp;#34;sub-Creator&amp;#34;? see below.&lt;br/&gt;&lt;br/&gt;Also, is there a reason to publish the chain code, wouldn&amp;#39;t just the&lt;br/&gt;public key be sufficient to accomplish all three usecases you list?&lt;br/&gt;I sort of dislike the notion that you need to give all this information&lt;br/&gt;to a possibly untrusted Creator.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;An aside to this in particular, I’ve been thinking about the requirement&lt;br/&gt;to share derivation paths and public keys with the Creator. The spec&lt;br/&gt;assumes that this will happen; you’re talking about providing full&lt;br/&gt;xpub&#43;chaincode too. At least, the Creator must prefill BIP32 paths and&lt;br/&gt;master key fingerprints. Possibly also prefill public keys in the redeem&lt;br/&gt;scripts?&lt;br/&gt;&lt;br/&gt;This might not be an improvement proposal, but a point worth being&lt;br/&gt;raised and maybe explained in the spec. Perhaps the original Creator&lt;br/&gt;doesn’t have access to this data, and delegates this to some&lt;br/&gt;“sub-Creators”  - I imagine a coordinator sending a PSBT to signing&lt;br/&gt;parties, each of which acts as a sub-Creator (fills out derivation paths&lt;br/&gt;and public keys) and a Signer (forwarding to a HWW). Some of the&lt;br/&gt;discussion even suggests some sort of generic “key derivation field”&lt;br/&gt;with arbitrary contents - fingerprint &#43; bip32 path? xpub &#43; chain code?&lt;br/&gt;derivation points? encrypted xprv?&lt;br/&gt;&lt;br/&gt;thank you for your comments&lt;br/&gt;&lt;br/&gt;regards&lt;br/&gt;m.&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 819 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180621/92c941f5/attachment-0001.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180621/92c941f5/attachment-0001.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:13:05Z</updated>
  </entry>

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

</feed>