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

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




  <entry>
    <id>https://yabu.me/nevent1qqsw225kn39l66kyp7yfz79dtzsg9r53lvm545q2wp3zkyemmyl3wfczyqy2uzlaja34zy3qv7mysyy05mfppurwqdvs80ytte896hs2pjur5kgjuzr</id>
    
      <title type="html">📅 Original date posted:2018-06-25 📝 Original message:Hi, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsw225kn39l66kyp7yfz79dtzsg9r53lvm545q2wp3zkyemmyl3wfczyqy2uzlaja34zy3qv7mysyy05mfppurwqdvs80ytte896hs2pjur5kgjuzr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsy0t5qrg295wavrtdpuvfghex7877vv3k9xy9t4tawu2lmsv43jls78udyt&#39;&gt;nevent1q…udyt&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;this is great.&lt;br/&gt;&lt;br/&gt;On 23.6.2018 00:28, Achow101 via bitcoin-dev wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; After reading the comments here about BIP 174, I would like to propose the following changes:&lt;br/&gt;&lt;br/&gt;From my perspective those are exactly the points I have felt strongly&lt;br/&gt;about. I still think &amp;#34;typed records&amp;#34; would be a better choice, but it&amp;#39;s&lt;br/&gt;something I&amp;#39;m willing to compromise on. As I&amp;#39;m looking at the draft, we&lt;br/&gt;currently have 13 records and only 3 of them have keys... Matejcik was a&lt;br/&gt;bit keener on this, so we&amp;#39;ll try to discuss this more during the week&lt;br/&gt;and we also look at the draft more carefully to see if we can come up&lt;br/&gt;with some nit-picks.&lt;br/&gt;&lt;br/&gt;&amp;gt; - Encoding&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have decided that PSBTs should either be in binary or encoded as a Base64 string. For the latter, several&lt;br/&gt;&amp;gt; Bitcoin clients already support Base64 encoding of data (for signed messages) so this will not add any extra&lt;br/&gt;&amp;gt; dependencies like Z85 would.&lt;br/&gt;&lt;br/&gt;I agree. If we&amp;#39;re arguing for not using protobuf, because it is a&lt;br/&gt;dependency, we shouldn&amp;#39;t add dependency for some lesser-known encoding&lt;br/&gt;format.&lt;br/&gt;&lt;br/&gt;As was partially brought up by William, shouldn&amp;#39;t we consider using&lt;br/&gt;bech32? It doesn&amp;#39;t break on double-click and it is a dependency for&lt;br/&gt;native Segwit addresses anyway, so wallets might already support it or&lt;br/&gt;they will at some point. But we should probably run some numbers on this&lt;br/&gt;first, since bech32 will obviously be larger than base64.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On 24.6.2018 10:28, Andrew Chow via bitcoin-dev wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; I disagree with the idea that global types can be removed. Firstly, it&lt;br/&gt;&amp;gt; is less of a breaking change to leave it there than to remove it&lt;br/&gt;&amp;gt; entirely. Secondly, there may be a point in the future where global&lt;br/&gt;&amp;gt; types would be useful/necessary. By having it still be there, we allow&lt;br/&gt;&amp;gt; for future extensibility.&lt;br/&gt;&lt;br/&gt;I agree. It doesn&amp;#39;t hurt if the global section stays and it is more&lt;br/&gt;forward-looking.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Tomas&lt;br/&gt;&lt;br/&gt;PS: This email didn&amp;#39;t get through at first, so I hope this isn&amp;#39;t a repost.&lt;br/&gt;&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/b930777e/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180625/b930777e/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:13:11Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsvylhm0t38jqfh8dz7dtfpzfsq0q0umqtymkyg5m273qhvwprtcjqzyqy2uzlaja34zy3qv7mysyy05mfppurwqdvs80ytte896hs2pjur5t3wdx6</id>
    
      <title type="html">📅 Original date posted:2018-06-21 📝 Original message:Hello, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsvylhm0t38jqfh8dz7dtfpzfsq0q0umqtymkyg5m273qhvwprtcjqzyqy2uzlaja34zy3qv7mysyy05mfppurwqdvs80ytte896hs2pjur5t3wdx6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrqfvynqmfc6gcthjqpq2xpq3lnz9tn5z0tdf7jdqpgaaduffxcvsp36439&#39;&gt;nevent1q…6439&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-21&lt;br/&gt;📝 Original message:Hello,&lt;br/&gt;&lt;br/&gt;First of all, let me thank you for all the hard work you and others have&lt;br/&gt;put into this.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On 21.6.2018 02:39, Achow101 via bitcoin-dev wrote:&lt;br/&gt;&amp;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;We do realize that this discussion should have happened earlier, however&lt;br/&gt;agreeing on a good standard should be the number one priority for all&lt;br/&gt;the parties involved.&lt;br/&gt;&lt;br/&gt;The fact that someone already implemented this is indeed unfortunate,&lt;br/&gt;but I don&amp;#39;t think we should lower our demands on the standard just&lt;br/&gt;because of a bad timing.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; A question to consider is,&lt;br/&gt;&amp;gt;&amp;gt; will there be more per-output data? If yes, it might make sense to have&lt;br/&gt;&amp;gt;&amp;gt; an output section.&lt;br/&gt;&amp;gt; I think it is unlikely that there would be anymore per-output data.&lt;br/&gt;&lt;br/&gt;Hmm, upon further reflection, maybe it&amp;#39;s not even worth including *any*&lt;br/&gt;per-output data, aside from what the original transaction contains.&lt;br/&gt;&lt;br/&gt;The output redeem script is either:&lt;br/&gt;- unknown, because we have received only an address from the receiver&lt;br/&gt;- or it is known, because it is ours and in that case it doesn’t make&lt;br/&gt;sense to include it in PSBT&lt;br/&gt;&lt;br/&gt;We got stuck on the idea of the Creator providing future (output)&lt;br/&gt;redeem/witness scripts. But that seems to be a minority use case and can&lt;br/&gt;be solved efficiently via the same channels that coordinate the PSBT&lt;br/&gt;creation. Sorry to change opinions so quickly on this one.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 3) The sighash type 0x03 says the sighash is only a recommendation. That&lt;br/&gt;&amp;gt;&amp;gt; seems rather ambiguous. If the field is specified shouldn&amp;#39;t it be binding?&lt;br/&gt;&amp;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;This seems very ambiguous. The Signer always has the option of not&lt;br/&gt;signing. *What* to sign is a matter of coordination between the parties;&lt;br/&gt;otherwise, you could make all the fields advisory and let anyone sign&lt;br/&gt;anything they like?&lt;br/&gt;&lt;br/&gt;We don&amp;#39;t understand the usecase for a field that is advisory but not&lt;br/&gt;binding. On what basis would you choose to respect or disregard the&lt;br/&gt;advisory field? Either one party has a preference, in which case they&lt;br/&gt;have to coordinate with the other anyway - or they don&amp;#39;t, in which case&lt;br/&gt;they simply leave the field out.&lt;br/&gt;&lt;br/&gt;&amp;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;I agree. Just to put some numbers on this: if we expect a 5-part&lt;br/&gt;derivation path, and add the master key fingerprint, that is 4 &#43; 5*4 =&lt;br/&gt;24 bytes (~32 base64 letters) per input and signer. I&amp;#39;d argue this is&lt;br/&gt;not significant.&lt;br/&gt;If we used full xpub, per Pieter&amp;#39;s suggestion, that would grow to 32 &#43;&lt;br/&gt;32 &#43; 5*4 = 84 bytes (~112 letters) per input/signer, which is quite a lot.&lt;br/&gt;&lt;br/&gt;On the other hand, keeping the BIP32 paths per-input means that we don&amp;#39;t&lt;br/&gt;need to include the public key (as in the lookup key), so that&amp;#39;s 32&lt;br/&gt;bytes down per path. In general, all the keys can be fully reconstructed&lt;br/&gt;from their values:&lt;br/&gt;&lt;br/&gt;redeem script key = hash160(value)&lt;br/&gt;witness script key = sha256(value)&lt;br/&gt;bip32 key = derive(value)&lt;br/&gt;&lt;br/&gt;The one exception is a partial signature. But even in that case we&lt;br/&gt;expect that a given public key will always correspond to the same&lt;br/&gt;signature, so we can act as if the public key is not part of the &amp;#34;key&amp;#34;.&lt;br/&gt;In other words, we can move the public key to the value part of the record.&lt;br/&gt;&lt;br/&gt;This holds true unless there&amp;#39;s some non-deterministic signing scheme,&lt;br/&gt;*and* multiple Signers sign with the same public key, which is what&lt;br/&gt;Pieter was alluding to on Twitter&lt;br/&gt;(&lt;a href=&#34;https://twitter.com/pwuille/status/1002627925110185984&#34;&gt;https://twitter.com/pwuille/status/1002627925110185984&lt;/a&gt;). Still, I would&lt;br/&gt;argue (as he also suggested) that keeping the format more complex to&lt;br/&gt;support this particular use case is probably not worth it.&lt;br/&gt;&lt;br/&gt;Also, we can mostly ignore deduplication of witness/redeem scripts.&lt;br/&gt;These still need to be included in the resulting transaction, duplicated&lt;br/&gt;if necessary, so I think counting their repetition against the size of&lt;br/&gt;PSBT isn&amp;#39;t worth it.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Tomas
    </content>
    <updated>2023-06-07T18:13:08Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqstq4adv7cqlwpmezzjr34yass08c0sx80a63acfqwrvcafsy3zrfgzyqy2uzlaja34zy3qv7mysyy05mfppurwqdvs80ytte896hs2pjur5zf0mfx</id>
    
      <title type="html">📅 Original date posted:2018-06-21 📝 Original message:Hi, On ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqstq4adv7cqlwpmezzjr34yass08c0sx80a63acfqwrvcafsy3zrfgzyqy2uzlaja34zy3qv7mysyy05mfppurwqdvs80ytte896hs2pjur5zf0mfx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswa4tzy2htf25sayeh9auya6d5xev4wrdwtpujp3g8jl5whl9557cuccmut&#39;&gt;nevent1q…cmut&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-21&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;On 19.6.2018 19:16, Pieter Wuille via bitcoin-dev wrote:&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;&amp;gt;&lt;br/&gt;&amp;gt; However, perhaps it makes sense to get rid of the global section&lt;br/&gt;&amp;gt; entirely, and make the whole format a transaction plus per-input and&lt;br/&gt;&amp;gt; per-output extra fields. This would result in duplication in case of&lt;br/&gt;&amp;gt; key reuse, but perhaps that&amp;#39;s worth the complexity reduction.&lt;br/&gt;I think having a global section with just one record (the transaction)&lt;br/&gt;is just fine, in case we come up with some other fields later on which&lt;br/&gt;would fit the global section. Otherwise I totally agree.&lt;br/&gt;&amp;gt;&amp;gt; 2) The global items 0x01 (redeem script) and 0x02 (witness script) are&lt;br/&gt;&amp;gt;&amp;gt; somewhat confusing. Let&amp;#39;s consider only the redeem script (0x01) to make&lt;br/&gt;&amp;gt;&amp;gt; it simple. The value description says: &amp;#34;A redeem script that will be&lt;br/&gt;&amp;gt;&amp;gt; needed to sign a Pay-To-Script-Hash input or is spent to by an output.&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt; Does this mean that the record includes both input&amp;#39;s redeem script&lt;br/&gt;&amp;gt;&amp;gt; (because we need to sign it), but also a redeem script for the output&lt;br/&gt;&amp;gt;&amp;gt; (to verify we are sending to a correct P2SH)? To mix those two seems&lt;br/&gt;&amp;gt;&amp;gt; really confusing.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yet again, adding a new output section would make this more readable. We&lt;br/&gt;&amp;gt;&amp;gt; would include the input’s redeem script in the input section and the&lt;br/&gt;&amp;gt;&amp;gt; output’s redeem script again in the output section, because they’ll most&lt;br/&gt;&amp;gt;&amp;gt; likely differ anyway.&lt;br/&gt;&amp;gt; I think here it makes sense because there can actually only be (up to)&lt;br/&gt;&amp;gt; one redeemscript and (up to) one witnessscript. So if we made those&lt;br/&gt;&amp;gt; per-input and per-output, it may simplify signers as they don&amp;#39;t need a&lt;br/&gt;&amp;gt; table lookup to find the correct one. That would also mean we can drop&lt;br/&gt;&amp;gt; their hashes, even if we keep a key-value model.&lt;br/&gt;Yes, indeed. Just to clarify: in the first sentence you mean &amp;#34;per&lt;br/&gt;output&amp;#34;, right? There can actually only be (up to) one redeemscript and&lt;br/&gt;(up to) one witnessscript *per output*.&lt;br/&gt;&amp;gt;&amp;gt; 4) Is it a good idea to skip records which types we are unaware of? We&lt;br/&gt;&amp;gt;&amp;gt; can&amp;#39;t come up with a reasonable example, but intuitively this seems as a&lt;br/&gt;&amp;gt;&amp;gt; potential security issue. We think we should consider  introducing a&lt;br/&gt;&amp;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;&amp;gt; encounters a record it doesn&amp;#39;t recognize and such flag is not set, it&lt;br/&gt;&amp;gt;&amp;gt; aborts the procedure. If we assume the set model we could change the&lt;br/&gt;&amp;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;&amp;gt; this, but we wanted to include this idea to see what you think.&lt;br/&gt;&amp;gt; Originally there was at least this intuition for why it shouldn&amp;#39;t be&lt;br/&gt;&amp;gt; necessary: the resulting signature for an input is either valid or&lt;br/&gt;&amp;gt; invalid. Adding information to a PSBT (which is what signers do)&lt;br/&gt;&amp;gt; either helps with that or not. The worst case is that they simply&lt;br/&gt;&amp;gt; don&amp;#39;t have enough information to produce a signature together. But an&lt;br/&gt;&amp;gt; ignored unknown field being present should never result in signing the&lt;br/&gt;&amp;gt; wrong thing (they can always see the transaction being signed), or&lt;br/&gt;&amp;gt; failing to sign if signing was possible in the first place. Another&lt;br/&gt;&amp;gt; way of looking at it, the operation of a signer is driven by queries:&lt;br/&gt;&amp;gt; it looks at the scriptPubKey of the output being spent, sees it is&lt;br/&gt;&amp;gt; P2SH, looks for the redeemscript, sees it is P2WSH, looks for the&lt;br/&gt;&amp;gt; witnessscript, sees it is multisig, looks for other signers&amp;#39;&lt;br/&gt;&amp;gt; signatures, finds enough for the threshold, and proceeds to sign and&lt;br/&gt;&amp;gt; create a full transaction. If at any point one of those things is&lt;br/&gt;&amp;gt; missing or not comprehensible to the signer, he simply fails and&lt;br/&gt;&amp;gt; doesn&amp;#39;t modify the PSBT.&lt;br/&gt;The rationale behind this was, what if at some point we come up with a&lt;br/&gt;PSBT record, which forbids some kind of operation or alters some&lt;br/&gt;behaviour. In another words, by omitting such record the signer would&lt;br/&gt;create a signature, which is valid, but actually signed something&lt;br/&gt;different than the Creator intended.&lt;br/&gt;&lt;br/&gt;&amp;gt; However, if the sighash request type becomes mandatory, perhaps this&lt;br/&gt;&amp;gt; is not the case anymore, as misinterpreting something like this could&lt;br/&gt;&amp;gt; indeed result in an incorrect signature.&lt;br/&gt;I believe this use case illustrates it quite well. Let’s suppose the&lt;br/&gt;sighash record is binding and the Signer does not know it. The Creator&lt;br/&gt;creates a PSBT with sighash set SIGHASH_SINGLE. The Signer sings the&lt;br/&gt;transaction with SIGHASH_ALL, because they are not aware of such field.&lt;br/&gt;This results in a valid signature, however not what the Creator intended&lt;br/&gt;it to be.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; We’d also like to note that the “number of inputs” field should be&lt;br/&gt;&amp;gt;&amp;gt; mandatory - and as such, possibly also a candidate for outside-record field.&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;Agree. I&amp;#39;m be fine with dropping the field completely in that case.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Tomas
    </content>
    <updated>2023-06-07T18:13:06Z</updated>
  </entry>

</feed>