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

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




  <entry>
    <id>https://njump.me/nevent1qqs8z57ejrs27rkkaud4uckay7apqjemkpaqscgugv5nlnx2rr4xt8gzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsv6a9hm0</id>
    
      <title type="html">📅 Original date posted:2018-07-06 📝 Original message:Hi, ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs8z57ejrs27rkkaud4uckay7apqjemkpaqscgugv5nlnx2rr4xt8gzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsv6a9hm0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst800zyfcpk8h9czv2pjn5u32ve7njxr9auwwss26xxdq3ev965jct6xyyt&#39;&gt;nevent1q…xyyt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-07-06&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;&lt;br/&gt;On July 5, 2018 12:20 PM, William Casarin &amp;lt;jb55 at jb55.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; ​​&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I have another concern with the format. (my original bip comment for some context: [1])&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It looks like the one of the reasons I was confused is because you can&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; only parse the format properly by first deserializing the transaction.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Since there is no &amp;#34;length&amp;#34; field for the key-value map arrays, you must&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; count the number of transaction input/outputs, and use that as the&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; number of kv maps to parse.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is really a problem.&lt;br/&gt;&lt;br/&gt;Almost all roles have to deserialize the unsigned tx anyways before they can do anything.&lt;br/&gt;The only role that doesn&amp;#39;t is a simple combiner (a combiner that does sanity checks would&lt;br/&gt;still have to deserialize the unsigned tx), and even then it doesn&amp;#39;t matter. It just shoves&lt;br/&gt;key value pairs together and doesn&amp;#39;t need to know whether the map is for an input or for&lt;br/&gt;an output.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; This is pretty brittle, because now if a Combiner writes the wrong&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; number of key-value maps that don&amp;#39;t align with the number of inputs and&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; outputs in the transaction, then the psbt will not be able to be&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; deserialized properly, but is still a valid PSBT. It can&amp;#39;t even detect&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; these situations, because the input and output types share the same enum&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; values. &lt;br/&gt;&lt;br/&gt;If a combiner writes the wrong number of key-value maps, then it would simply be invalid&lt;br/&gt;to the next person that receives the PSBT. It would not deserialize properly because the&lt;br/&gt;key value pairs would have incorrect values for their types. Not deserializing properly means&lt;br/&gt;that the PSBT is simply invalid. The same numerical types might&lt;br/&gt;be shared, but their meanings are different between the input and output types.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t see anywhere that says the number of key value maps MUST&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; match the number of inputs/outputs, perhaps it&amp;#39;s implied?&lt;br/&gt;&lt;br/&gt;I have added that to the BIP.&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;&lt;br/&gt;On July 5, 2018 10:23 AM, Jason Les &amp;lt;jasonles at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Has there been any thought to standardizing file names used when creating .psbt files? Maybe something that gives some reliability of being collision resistant and descriptive. For example:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [8 char trim of hash of unsigned tx]&#43;[Role that created file (Ex: Signer)]&#43;[4 char trim of hash of data unique to that role (Ex: partial sig)]&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It may be useful to especially the combiner to have some idea of what files they have.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; -Jason Les&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t considered this, but I&amp;#39;m not sure if it is really useful. I don&amp;#39;t think it is really necessary&lt;br/&gt;for any role to know who created the PSBT. If it did, this information would generally come&lt;br/&gt;out-of-band anyways as someone has to give the PSBT to that person.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Andrew
    </content>
    <updated>2023-06-07T18:13:32Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsdd5cf7h0c5j3yjt98m6q2y9hr84j6x5yc2a82xx3rznnara6v70qzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsv4ncjty</id>
    
      <title type="html">📅 Original date posted:2018-07-04 📝 Original message:Hi,​ ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsdd5cf7h0c5j3yjt98m6q2y9hr84j6x5yc2a82xx3rznnara6v70qzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsv4ncjty" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0z55nfh0zazna4dkt39qv6z4ulmc3dv5582z7myd5ef0ruq9gdrgm2pzl5&#39;&gt;nevent1q…pzl5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-07-04&lt;br/&gt;📝 Original message:Hi,​&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On July 4, 2018 6:19 AM, matejcik &amp;lt;jan.matejek at satoshilabs.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; ​​&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; hello,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; we still have some concerns about the BIP as currently proposed - not&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; about the format or data contents, but more about strictness and&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; security properties. I have raised some in the previous e-mails, but&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; they might have been lost in the overall talk about format.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; -   Choosing from duplicate keys when combining.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     We believe that &amp;#34;choose whichever value it wishes&amp;#34; is not a good&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     resolution strategy. We propose to either change this to &amp;#34;in case of&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     conflicts, software MUST reject the conflicting PSBTs&amp;#34;, or explain in&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     more detail why picking at random is a safe choice.&lt;br/&gt;&lt;br/&gt;You cannot simply reject PSBTs for having conflicting values for the same key. Especially&lt;br/&gt;for the Partial Signatures, you can have two signatures for the same pubkey that are both&lt;br/&gt;completely valid. This situation could happen, for example, if a signer that does not use deterministic&lt;br/&gt;k values can sign multiple inputs but one input is missing a UTXO so it doesn&amp;#39;t sign it. So it receives&lt;br/&gt; one PSBT and signs the first input but not the second. It receives a PSBT for the same transaction&lt;br/&gt;which has the second input&amp;#39;s UTXO but does not have its signatures for the first input. The signer&lt;br/&gt;would sign both inputs. When the two PSBTs are combined (suppose the first PSBT has other &lt;br/&gt;signatures too), you will have two keys that have different values. The different values are both&lt;br/&gt;valid signatures, just with different k values since they were randomly generated instead of&lt;br/&gt;deterministically. If we fail to merge these, then you could potentially have a situation where&lt;br/&gt;nothing can be done with the PSBTs now, or now everyone has to resign and in some specific&lt;br/&gt;order to avoid the conflict. That complicates things and is much more annoying to deal with.&lt;br/&gt;So a simple solution is to allow the combiner to choose any value it wants as it is likely that&lt;br/&gt;both values are valid.&lt;br/&gt;&lt;br/&gt;Allowing combiners to choose any value also allows for intelligent combiners to choose the&lt;br/&gt;correct values in the case of conflicts. A smart combiner could, when combining redeem scripts&lt;br/&gt;and witness scripts, check that the redeem scripts and witness scripts match the hash provided&lt;br/&gt;in the UTXO (or in the redeem script) and choose the correct redeem script and witness script&lt;br/&gt;accordingly if there were, for some reason, a conflict there.&lt;br/&gt;&lt;br/&gt;Can you explain why it would be unsafe for combiners to arbitrarily choose a value?&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   Signing records with unknown keys.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     There&amp;#39;s been some talk about this at start, but there should be a clear&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     strategy for Signers when unknown fields are encountered. We intend to&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     implement the rule: &amp;#34;will not sign an input with any unknown fields&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     present&amp;#34;.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     Maybe it is worth codifying this behavior in the standard, or maybe&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     there should be a way to mark a field as &amp;#34;optional&amp;#34; so that strict&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     Signers know they can safely ignore the unknown field.&lt;br/&gt;&lt;br/&gt;I think that requiring there to be no unknowns is a safe change.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     And two minor points:&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   Fields with empty keys.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     This might be inferred from the definition, but is probably worth&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     spelling out explicitly: If a field definition states that the key data&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     is empty, an implementation MUST enforce this and reject PSBTs that&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     contain non-empty data.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     We suggest adding something to the effect of:&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     &amp;#34;If a key or value data in a field doesn&amp;#39;t match the specified format,&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     the PSBT is invalid. In particular, if key data is specified as &amp;#34;none&amp;#34;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     but the key contains data beyond the type specifier, implementation MUST&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     reject the PSBT.&amp;#34;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     (not sure about the languge, this should of course allow processing&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     unknown fields)&lt;br/&gt;&lt;br/&gt;Agreed.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   &amp;#34;Combiner can detect inconsistencies&amp;#34;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     Added in response to this comment [1], the current wording looks like&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     it&amp;#39;s describing what the Combiner is capable of, as opposed to&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     prescribing what the combiner is allowed to do.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     We suggest changing to something like:&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     &amp;#34;For every field type that the Combiner understands, it MAY also refuse&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     to combine PSBTs that have inconsistencies in that field, or cause a&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     conflict when combined.&amp;#34;&lt;br/&gt;&lt;br/&gt;Agreed.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Andrew
    </content>
    <updated>2023-06-07T18:13:31Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsyaah3vxfjzx9v4axuazagj0jwwv38en8gh4v224s664c43z6f3jqzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsv67nj3m</id>
    
      <title type="html">📅 Original date posted:2018-06-26 📝 Original message:Hi, On ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsyaah3vxfjzx9v4axuazagj0jwwv38en8gh4v224s664c43z6f3jqzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsv67nj3m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs035avndnww664l9a4wsfrwp4kzlfm245sextzk6y6hx6g4yc6f2cp9zwcq&#39;&gt;nevent1q…zwcq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-26&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;On June 26, 2018 8:33 AM, matejcik via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; ​​&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; hello,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; in general, I agree with my colleague Tomas, the proposed changes are&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; good and achieve the most important things that we wanted. We&amp;#39;ll review&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; the proposal in more detail later.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; For now a couple minor things I have run into:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; -   valid test vector 2 (&amp;#34;one P2PKH input and one P2SH-P2WPKH input&amp;#34;)&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     seems broken, at least its hex version; a delimiter seems to be missing,&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     misplaced or corrupted&lt;br/&gt;&lt;br/&gt;Fixed&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   at least the first signing vector is not updated, but you probably&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     know that&lt;br/&gt;&lt;br/&gt;I updated all of the tests yesterday so they should be correct now. I will be adding more tests&lt;br/&gt;this week.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   BIP32 derivation fields don&amp;#39;t specify size of the &amp;#34;master public key&amp;#34;,&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     which would make it un-parsable :)&lt;br/&gt;&lt;br/&gt;Oops, that&amp;#39;s actually supposed to be master key fingerprint, not master public key. I have updated&lt;br/&gt;the BIP to reflect this.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   &amp;#34;Transaction format is specified as follows&amp;#34; and its table need to be&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     updated.&lt;br/&gt;&lt;br/&gt;Done.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     I&amp;#39;m still going to argue against the key-value model though.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     It&amp;#39;s true that this is not significant in terms of space. But I&amp;#39;m more&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     concerned about human readability, i.e., confusing future implementers.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     At this point, the key-value model is there &amp;#34;for historical reasons&amp;#34;,&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     except these aren&amp;#39;t valid even before finalizing the format. The&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     original rationale for using key-values seems to be gone (no key-based&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     lookups are necessary). As for combining and deduplication, whether key&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     data is present or not is now purely a stand-in for a &amp;#34;repeatable&amp;#34; flag.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     We could just as easily say, e.g., that the high bit of &amp;#34;type&amp;#34; specifies&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     whether this record can be repeated.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     (Moreover, as I wrote previously, the Combiner seems like a weirdly&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     placed role. I still don&amp;#39;t see its significance and why is it important&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     to correctly combine PSBTs by agents that don&amp;#39;t understand them. If you&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     have a usecase in mind, please explain.&lt;br/&gt;&lt;br/&gt;There is a diagram in the BIP that explains this. The combiner&amp;#39;s job is to combine two PSBTs that&lt;br/&gt;are for the same transaction but contain different data such as signatures. It is easier to implement&lt;br/&gt;a combiner that does not need to understand the types at all, and such combiners are forwards compatible,&lt;br/&gt;so new types do not require new combiner implementations.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     ISTM a Combiner could just as well combine based on whole-record&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     uniqueness, and leave the duplicate detection to the Finalizer. In case&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     the incoming PSBTs have incompatible unique fields, the Combiner would&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     have to fail anyway, so the Finalizer might as well do it. Perhaps it&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     would be good to leave out the Combiner role entirely?)&lt;br/&gt;&lt;br/&gt;A transaction that contains duplicate keys would be completely invalid. Furthermore, in the set of typed&lt;br/&gt;records model, having more than one redeemScript and witnessScript should be invalid, so a combiner&lt;br/&gt;would still need to understand what types are in order to avoid this situation. Otherwise it would produce&lt;br/&gt;an invalid PSBT.&lt;br/&gt;&lt;br/&gt;I also dislike the idea of having type specific things like &amp;#34;only one redeemScript&amp;#34; where a more generic&lt;br/&gt;thing would work.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     There&amp;#39;s two remaining types where key data is used: BIP32 derivations&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     and partial signatures. In case of BIP32 derivation, the key data is&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     redundant ( pubkey = derive(value) ), so I&amp;#39;d argue we should leave that&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     out and save space. &lt;br/&gt;&lt;br/&gt;I think it is still necessary to include the pubkey as not all signers who can sign for a given pubkey may&lt;br/&gt;know the derivation path. For example, if a privkey is imported into a wallet, that wallet does not necessarily&lt;br/&gt;know the master key fingerprint for the privkey nor would it necessarily have the master key itself in&lt;br/&gt;order to derive the privkey. But it still has the privkey and can still sign for it.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     Re breaking change, we are proposing breaking changes anyway, existing&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     code will need to be touched, and given that this is a hand-parsed&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     format, changing `parse_keyvalue` to `parse_record` seems like a small&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     matter?&lt;br/&gt;&lt;br/&gt;The point is to not make it difficult for existing implementations to change. Mostly what has been done now is just&lt;br/&gt;moving things around, not an entire format change itself. Changing to a set of typed records model require more&lt;br/&gt;changes and is a complete restructuring of the format, not just moving things around.&lt;br/&gt;&lt;br/&gt;Additionally, I think that the current model is fairly easy to hand parse. I don&amp;#39;t think a record set model would make&lt;br/&gt;it easier to follow. Furthermore, moving to Protobuf would make it harder to hand parse as varints are slightly more&lt;br/&gt;confusing in protobuf than with Compact size uints. And with the key-value model, you don&amp;#39;t need to know the types&lt;br/&gt;to know whether something is valid. You don&amp;#39;t need to interpret any data.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Andrew
    </content>
    <updated>2023-06-07T18:13:16Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsqfc6eqcn8p5vclvaev28sf2jlt43rf336s3cgdamd2l873a2m9kqzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvvxwg8y</id>
    
      <title type="html">📅 Original date posted:2018-06-27 📝 Original message:Hi,​ ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsqfc6eqcn8p5vclvaev28sf2jlt43rf336s3cgdamd2l873a2m9kqzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvvxwg8y" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstj4g6jv5fv75zrc57uxgua5rsmjjxxsa6ss9ghhlcjwny5ft9n8cwry5e0&#39;&gt;nevent1q…y5e0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-27&lt;br/&gt;📝 Original message:Hi,​&lt;br/&gt;&lt;br/&gt;On June 26, 2018 11:09 PM, William Casarin &amp;lt;jb55 at jb55.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; ​​&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Hey Andrew,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; If I&amp;#39;m reading the spec right: the way it is designed right now, you&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; could create hundreds of thousands of zero bytes in the input or output&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; key-value arrays. As far as I can tell this would be considered valid,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; as it is simply a large array of empty dictionaries. Is this right? I&amp;#39;m&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; worried about buffer overflows in cases where someone sends a large blob&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; of zeros to an unsuspecting implementation.&lt;br/&gt;&lt;br/&gt;No, that is incorrect. That whole paragraph is actually outdated, it was intended&lt;br/&gt;for the possibility of adding output maps, which we have already done. I have &lt;br/&gt;removed it from the BIP.&lt;br/&gt;&lt;br/&gt;However, it is possible for a PSBT to contain very large unknown key-value pairs &lt;br/&gt;which could potentially cause a problem. But I do not think that large PSBTs should &lt;br/&gt;really be a problem as they are really something that the user has to enter rather &lt;br/&gt;than something received remotely without user interaction.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On June 27, 2018 6:39 AM, Andrea via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; ​​&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Hi William, Andrew, list,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; As noted by William there are some types missing in the global-types definition, because the number of each map for I/O must be known to the parser in order to use the correct definitions for the types. At the moment a parser reading a key-value record does not know whether it should read it as per-input type or per-output, a way to address this is to declare in advance the number of maps and ensure they are ordered (inputs first). If you haven&amp;#39;t already worked out some types for that i propose using:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;Parsers actually do know because that information is present in the unsigned transaction &lt;br/&gt;at the beginning of each PSBT. Since each input and output must be accounted for,&lt;br/&gt;a parser can just parse the unsigned transaction and from there it can know how&lt;br/&gt;many inputs and outputs to expect. If it sees more or less, it should throw an error&lt;br/&gt;as the transaction is invalid.&lt;br/&gt;&lt;br/&gt;Of course this implies that implementations will need to parse the unsigned transaction,&lt;br/&gt;but not all actually need to. Combiners do not need to, they just need to merge the&lt;br/&gt;maps together and follow the key uniqueness rule. They don&amp;#39;t really need to know&lt;br/&gt;or care about the number of inputs and outputs, just that the PSBTs being merged&lt;br/&gt;share the same unsigned transaction and have the same number of maps.&lt;br/&gt;&lt;br/&gt;Other roles need to understand the unsigned transaction anyways, so they still need&lt;br/&gt;to parse it thus this isn&amp;#39;t really a problem for those roles.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     On another note I think we can set a hard limit on the size of the PSBT, currently is &amp;#39;legal&amp;#39; to produce a very large PSBT with an excessive number of Inputs and Outputs. By excessive I mean that even in the best case scenario (using the smallest possible scriptPubKey as in P2WPKH) it is possible to create a PSBT that would certainly create an invalid transaction (because of its size) when finalized. I haven&amp;#39;t found anything related to this in the previous discussions, please ignore this if it was already proposed/discussed.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think such a limitation is practical or useful. A transaction can currently have, at most,&lt;br/&gt;~24000 inputs and ~111000 outputs (&#43;/- a few hundred) which is well beyond any useful limit.&lt;br/&gt;Additionally, such limits may not be as extensible for future work. It is hard to determine what&lt;br/&gt;is a reasonable limit on transaction size, and I don&amp;#39;t think it is useful to have a limit. At worst&lt;br/&gt;we would simply create an invalid transaction if it were too large.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Andrew
    </content>
    <updated>2023-06-07T18:13:16Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsvjkym83fpvhlk23922asesfn8ts0cz6qhp4vc4w2m4ks54vqwzlqzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvwqelsa</id>
    
      <title type="html">📅 Original date posted:2018-06-25 📝 Original message:Hi, On ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsvjkym83fpvhlk23922asesfn8ts0cz6qhp4vc4w2m4ks54vqwzlqzyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvwqelsa" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsthwdvpfs2un40xtd44qvucn6pjaua0e2wywahfrfnrusuz0j4vwqdr7rxw&#39;&gt;nevent1q…7rxw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-25&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;On June 25, 2018 12:47 PM, Tomas Susanka via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; From my perspective those are exactly the points I have felt strongly&lt;br/&gt;&amp;gt; about. I still think &amp;#34;typed records&amp;#34; would be a better choice, but it&amp;#39;s&lt;br/&gt;&amp;gt; something I&amp;#39;m willing to compromise on. As I&amp;#39;m looking at the draft, we&lt;br/&gt;&amp;gt; currently have 13 records and only 3 of them have keys... Matejcik was a&lt;br/&gt;&amp;gt; bit keener on this, so we&amp;#39;ll try to discuss this more during the week&lt;br/&gt;&amp;gt; and we also look at the draft more carefully to see if we can come up&lt;br/&gt;&amp;gt; with some nit-picks.&lt;br/&gt;&lt;br/&gt;So there are a few reasons for not using typed records. Firstly, it is less of a breaking change to retain the key-value map model.&lt;br/&gt;&lt;br/&gt;Secondly, it is easier to enforce uniqueness for certain things. For example, in each input, we only want to have one redeemScript and one witnessScript. With a typed records set, we would have to say that only on record of each type is allowed, which means that combiners need to understand types and be able to partially parse the records. However with a key-value model, we can more generically say that every key-value pair must have a unique key which means that combiners do not need to know anything about types and just needs to enforce key uniqueness. Since the type is the only thing in the key for redeemScripts and witnessScripts, this uniqueness automatically applies to this, as well as for other key-value pairs.&lt;br/&gt;&lt;br/&gt;Lastly, the typed records model does not save a lot of space in a transaction. Each record has at most one extra byte in the key-value model, with records that must also have keys having no space savings. The data inside each key-value pair far exceeds one byte, so on additional byte per key-value pair isn&amp;#39;t all that big of a deal, IMO.&lt;br/&gt;&lt;br/&gt;Andrew&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180625/a2dc6274/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180625/a2dc6274/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:13:11Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs0m84dy66dufr9es526nh75njcqj60ntg6kn78h2ltqr20n3ps93czyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvk3cum9</id>
    
      <title type="html">📅 Original date posted:2018-06-22 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs0m84dy66dufr9es526nh75njcqj60ntg6kn78h2ltqr20n3ps93czyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvk3cum9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9k8lyy8lfl0enz3tphfr3u3j5xeqkh3ykmpvqhma8rd4vfwruphc2hnxf6&#39;&gt;nevent1q…nxf6&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-22&lt;br/&gt;📝 Original message:Hi all,&lt;br/&gt;&lt;br/&gt;After reading the comments here about BIP 174, I would like to propose the following changes:&lt;br/&gt;&lt;br/&gt;- Moving redeemScripts, witnessScripts, and BIP 32 derivation paths to per-input and per-output data&lt;br/&gt;&lt;br/&gt;I think that by moving these three fields into input and output specific maps, the format will be&lt;br/&gt;easier to read and simpler for signers to parse. Instead of having to be able to parse entire&lt;br/&gt;scripts and extract pubkeys, the signer can simply look at which pubkeys are provided in the inputs&lt;br/&gt;and sign the input based upon the presence of a pubkey for which the signer has a privkey.&lt;br/&gt;&lt;br/&gt;A neat trick that fits well with this model is that a plain pubkey (one that is not part of a BIP 32&lt;br/&gt;derivation) can still be put in a BIP 32 derivation path field where the value is just the fingerprint&lt;br/&gt;of the pubkey itself. This would indicate that no derivation needs to be done from the master key, and&lt;br/&gt;the master key is just the specified key itself.&lt;br/&gt;&lt;br/&gt;Additionally, by having the redeemScript and witnessScript readily available in the input, signers&lt;br/&gt;do not need to construct a map to find a redeemScript or witnessScript and can instead just look&lt;br/&gt;directly in the input data. There is also no need to include the hashes of these scripts, so the key&lt;br/&gt;is just the type. This also allows us to enforce the requirement for only one redeemScript and one&lt;br/&gt;witnessScript per input easily by continuing to follow the generic rule of unique keys.&lt;br/&gt;&lt;br/&gt;By using input specific and output specific fields, there is no need for the input index and the input&lt;br/&gt;count types as all inputs will be accounted for.&lt;br/&gt;&lt;br/&gt;- Finalized scriptSig and scriptWitness fields&lt;br/&gt;&lt;br/&gt;To determine whether two PSBTs are the same, we can compare the unsigned transaction. To ensure that the&lt;br/&gt;unsigned transactions are the same for two PSBTs with data for the same tx, we cannot put scriptSigs or&lt;br/&gt;scriptWitnesses into it. Thus for each input, two new fields have been added to store the finalized scriptSig&lt;br/&gt;and finalized scriptWitness.&lt;br/&gt;&lt;br/&gt;- Mandatory sighash&lt;br/&gt;&lt;br/&gt;The sighash type field will be changed from a recommendation to a requirement. Signatures will need to &lt;br/&gt;use the specified sighash type for that input. If a Signer cannot sign for a particular sighash type, it&lt;br/&gt;must not add a partial signature.&lt;br/&gt;&lt;br/&gt;- Encoding&lt;br/&gt;&lt;br/&gt;I have decided that PSBTs should either be in binary or encoded as a Base64 string. For the latter, several&lt;br/&gt;Bitcoin clients already support Base64 encoding of data (for signed messages) so this will not add any extra&lt;br/&gt;dependencies like Z85 would.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;A draft of the revised BIP can be found here: &lt;a href=&#34;https://github.com/achow101/bips/blob/bip174-rev/bip-0174.mediawiki&#34;&gt;https://github.com/achow101/bips/blob/bip174-rev/bip-0174.mediawiki&lt;/a&gt;&lt;br/&gt;If these changes are satisfactory, I will open a PR to the BIPs repo to update the BIP tomorrow. I will also&lt;br/&gt;create test vectors and update the implementation PR&amp;#39;ed to Core.&lt;br/&gt;&lt;br/&gt;Andrew
    </content>
    <updated>2023-06-07T18:13:09Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsrqfvynqmfc6gcthjqpq2xpq3lnz9tn5z0tdf7jdqpgaaduffxcvszyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvyf4hsq</id>
    
      <title type="html">📅 Original date posted:2018-06-20 📝 Original message:Hi, On ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsrqfvynqmfc6gcthjqpq2xpq3lnz9tn5z0tdf7jdqpgaaduffxcvszyp6lmldkzagdu3zvxy5xm66nhm0l7s636k5960txe34nd62l5gwsvyf4hsq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0te2v6t7mxmc6fkgu40rmycu87r7pppdtyckq7nf4qcatz864rvcxumkmk&#39;&gt;nevent1q…mkmk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-20&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;On June 15, 2018 4:34 PM, Pieter Wuille via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Hello all,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; given some recent work and discussions around BIP 174 (Partially&lt;br/&gt;&amp;gt; Signed Bitcoin Transaction Format) I&amp;#39;d like to bring up a few ideas.&lt;br/&gt;&amp;gt; First of all, it&amp;#39;s unclear to me to what extent projects have already&lt;br/&gt;&amp;gt; worked on implementations, and thus to what extent the specification&lt;br/&gt;&amp;gt; is still subject to change. A response of &amp;#34;this is way too late&amp;#34; is&lt;br/&gt;&amp;gt; perfectly fine.&lt;br/&gt;&lt;br/&gt;While I agree that the BIP itself should be revised to reflect these suggestions, I fear that it may be too late. I know of a few other developers who have implemented BIP 174 already but have not yet responded to this email.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   Generic key offset derivation&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     Whenever a BIP32 derivation path does not include any hardened steps,&lt;br/&gt;&amp;gt;     the entirety of the derivation can be conveyed as &amp;#34;The private key for&lt;br/&gt;&amp;gt;     P is equal to the private key for Q plus x&amp;#34;, with P and Q points and x&lt;br/&gt;&amp;gt;     a scalar. This representation is more flexible (it also supports&lt;br/&gt;&amp;gt;     pay-to-contract derivations), more efficient, and more compact. The&lt;br/&gt;&amp;gt;     downside is that it requires the Signer to support such derivation,&lt;br/&gt;&amp;gt;     which I don&amp;#39;t believe any current hardware devices do.&lt;br/&gt;&amp;gt;     Would it make sense to add this as an additional derivation method?&lt;br/&gt;&lt;br/&gt;While this is a good idea, I&amp;#39;m not sure that implementers would understand this as it requires knowing the cryptography which makes this possible. As an optional feature, not all wallets would understand it, and those that do could create PSBTs which other wallets do not understand and thus cannot sign even if they have the private keys and actually can sign.&lt;br/&gt;&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt; -   Hex encoding?&lt;br/&gt;&amp;gt;     &lt;br/&gt;&amp;gt;     This is a very minor thing. But presumably there will be some standard&lt;br/&gt;&amp;gt;     way to store PSBTs as text for copy-pasting - either prescribed by the&lt;br/&gt;&amp;gt;     spec, or de facto. These structures may become pretty large, so&lt;br/&gt;&amp;gt;     perhaps it&amp;#39;s worth choosing something more compact than hexadecimal -&lt;br/&gt;&amp;gt;     for example Base64 or even Z85 (&lt;a href=&#34;https://rfc.zeromq.org/spec:32/Z85/&#34;&gt;https://rfc.zeromq.org/spec:32/Z85/&lt;/a&gt;).&lt;br/&gt;&lt;br/&gt;Agreed. Are there any encodings that do not have double click breaking characters?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On June 19, 2018 2:38 AM, Jonas Schnelli via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; I think it could be more flexible (generic) in BIP174.&lt;br/&gt;&amp;gt; It could be just a single child key {32-bit int}, or just a keypath ({32-bit int}]{32-bit int}…) which is very likely sufficient for a HWW to derive the relevant key without the creation of a lookup-window or other „maps&amp;#34;.&lt;br/&gt;&lt;br/&gt;This ignores all of the other times that a BIP32 keypath needs to be provided. It is not only used for multisig, there may be other times that there are multiple derivation paths and master keys due to multiple inputs and such. Adding a field specific to multisig and HWW only seems pointless and redundant to me.&lt;br/&gt;&lt;br/&gt;On June 19, 2018 2:38 AM, Jonas Schnelli via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A question to consider is,&lt;br/&gt;&amp;gt; will there be more per-output data? If yes, it might make sense to have&lt;br/&gt;&amp;gt; an output section.&lt;br/&gt;&lt;br/&gt;I think it is unlikely that there would be anymore per-output data.&lt;br/&gt;&lt;br/&gt;&amp;gt; 3) The sighash type 0x03 says the sighash is only a recommendation. That&lt;br/&gt;&amp;gt;seems rather ambiguous. If the field is specified shouldn&amp;#39;t it be binding?&lt;br/&gt;&lt;br/&gt;I disagree. It is up to the signer to decide what they wish to sign, not for the creator to specify what to sign. The creator can ask the signer to sign something in a particular way, but it is ultimately up to the signer to decide.&lt;br/&gt;&lt;br/&gt;&amp;gt; 4) Is it a good idea to skip records which types we are unaware of? We&lt;br/&gt;&amp;gt; can&amp;#39;t come up with a reasonable example, but intuitively this seems as a&lt;br/&gt;&amp;gt; potential security issue. We think we should consider  introducing a&lt;br/&gt;&amp;gt; flag, which would define if the record is &amp;#34;optional&amp;#34;. In case the signer&lt;br/&gt;&amp;gt; encounters a record it doesn&amp;#39;t recognize and such flag is not set, it&lt;br/&gt;&amp;gt; aborts the procedure. If we assume the set model we could change the&lt;br/&gt;&amp;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;&amp;gt; this, but we wanted to include this idea to see what you think.&lt;br/&gt;&lt;br/&gt;The idea behind skipping unknown types is to allow forward compatibility. A combiner written now should be able to combine transactions created in the future with new types as combining is really only just merging the maps together.&lt;br/&gt;&lt;br/&gt;&amp;gt; In general, the standard is trying to be very space-conservative,&lt;br/&gt;&amp;gt; however is that really necessary? We would argue for clarity and ease of&lt;br/&gt;&amp;gt; use over space constraints. We think more straightforward approach is&lt;br/&gt;&amp;gt; desired, although more space demanding. What are the arguments to make&lt;br/&gt;&amp;gt; this as small as possible? If we understand correctly, this format is&lt;br/&gt;&amp;gt; not intended for blockchain nor for persistent storage, so size doesn’t&lt;br/&gt;&amp;gt; matter nearly as much.&lt;br/&gt;&lt;br/&gt;Size is not really a constraint, but we do not want to be unnecessarily large. The PSBT still has to be transmitted to other people. It will likely be used by copy and pasting the string into a text box. Copying and pasting very long strings of text can be annoying and cumbersome. So the goal is to keep the format still relatively clear while avoiding the duplication of data.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Andrew
    </content>
    <updated>2023-06-07T18:13:07Z</updated>
  </entry>

</feed>