<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated></updated>
  <generator>https://nostr.ae</generator>

  <title>Nostr notes by </title>
  <author>
    <name></name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx.rss" />
  <link href="https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx" />
  <id>https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqsfzuykzl9zcek4f84xm4xqjk7pc9t8nffjllrauhhwzr6ape8jfmszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz26vjc8h</id>
    
      <title type="html">📅 Original date posted:2023-07-06 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfzuykzl9zcek4f84xm4xqjk7pc9t8nffjllrauhhwzr6ape8jfmszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz26vjc8h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrtg2t66ssd98adtdpg77l8a9hn0lymw7cppnt7qcypmjrq9faw0qjhj622&#39;&gt;nevent1q…j622&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-07-06&lt;br/&gt;🗒️ Summary of this message: LNbits discovered an exploit that allowed attackers to create fake balances by manipulating invoices, urging users to update their software.&lt;br/&gt;📝 Original message:&lt;br/&gt;Um, this is a super-weird setup AFAICT.&lt;br/&gt;&lt;br/&gt;You generate an invoice, but you don&amp;#39;t remember anything about it?  Um,&lt;br/&gt;OK, stateless invoices are a thing, but there&amp;#39;s a metadata field for&lt;br/&gt;that?&lt;br/&gt;&lt;br/&gt;Someone pays an invoice, you don&amp;#39;t check the place it&amp;#39;s going (which,&lt;br/&gt;y&amp;#39;know, signed it), you check some other field?&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve never used lnbits and I&amp;#39;m clearly missing something...&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;callebtc via Lightning-dev &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;writes:&lt;br/&gt;&lt;br/&gt;&amp;gt; Dear list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; earlier last month, our team at LNbits discovered a rather interesting exploit which wich would enable an attacker to create balances out of thin air by abusing a quirk in how invoices are handled internally. We&amp;#39;ve patched this in LNbits version 0.10.5 and urge anyone to update ASAP if you haven&amp;#39;t done so already. I want to describe the attack here, since my gut feeling is that carrying out the same exploit is possible in other Lightning applications. If you&amp;#39;re working on custodial wallets, payment processors, account management software, etc. you probably want to read this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In short, the attacker was able to insert a bolt-11 payment hash of payment A into a different payment, creating a malicious invoice B that can trick the backend into believing that B == A.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here is how it goes:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Attacker creates invoice A of amount 1000 sat in LNbits&lt;br/&gt;&amp;gt; - Attacker creates invoice B&amp;#39; of amount 1 sat on her own node&lt;br/&gt;&amp;gt; - Attacker deserializes B&amp;#39;, inserts payment_hash(A) into payment_hash(B), re-signs the invoice, and serializes it again, producing malicious invoice B&lt;br/&gt;&amp;gt; - Attacker creates a new account in LNbits and pays B&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - LNbits backend uses payment_hash(B) to check whether this is an internal payment or a payment via LN&lt;br/&gt;&amp;gt; - Backend finds A in its database since we implicitly assume that payment_hash(A) commits to A&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ** This is the critical part! Payment hashes do *NOT* commit to any payment details (like amount) but only to the preimage! ** &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Backend settles payment internally by crediting A debiting B&lt;br/&gt;&amp;gt; - Attacker has &amp;#34;created&amp;#34; 999 sats&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mitigation:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The mitigation is quite simple. Backends should either use self-generated unique &amp;#34;checking id&amp;#39;s&amp;#34; for looking up internal payments or use additional checks to make sure that the invoice details have not been messed around with (e.g., asserting amount(A) == amount(B)).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Lessons:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think there are two lessons here. First, it&amp;#39;s good to realize the level of sophistication of LN-savvy attackers. This attack clearly involves a fundamental understanding of bolt-11 and requires custom tooling to produce the malicious invoice. &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The second lesson is more valuable: The &amp;#34;payment hash&amp;#34; of an invoice is not a &amp;#34;payment&amp;#34; hash but merely a &amp;#34;preimage&amp;#34; hash – and nothing else. Naming this field as such increases the chance of developers implicitly assuming that the hash commits to payment details like amount, pubkey, etc. I will from now on call this simply the &amp;#34;preimage hash&amp;#34; and invite you to do so too.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Calle&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;
    </content>
    <updated>2023-07-10T21:01:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2k24hxwyh56xh0wmz3jz0ajym5rm303vk44zcg6xz5wkljpevm5szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2r8q48v</id>
    
      <title type="html">📅 Original date posted:2022-04-27 📝 Original message: Matt ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2k24hxwyh56xh0wmz3jz0ajym5rm303vk44zcg6xz5wkljpevm5szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2r8q48v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvda0u2u80ru97rf7qphwx7tvhjzas994y6u4scme8nqjqkr6lnlqmy469z&#39;&gt;nevent1q…469z&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; This same problem will occur if *anyone* does ratelimiting, unless&lt;br/&gt;&amp;gt;&amp;gt; *everyone* does.  And with minisketch, there&amp;#39;s a good reason to do so.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; None of this seems like a good argument for *not* taking the &amp;#34;send updates since the last sync in &lt;br/&gt;&amp;gt; the minisketch&amp;#34; approach to reduce the damage inconsistent policies&lt;br/&gt;&amp;gt; cause, though?&lt;br/&gt;&lt;br/&gt;You can&amp;#39;t do this, with minisketch.  You end up having to keep all the&lt;br/&gt;ratelimited differences you&amp;#39;re ignoring *per peer*, and then cancelling&lt;br/&gt;them out of the minisketch on every receive or send.&lt;br/&gt;&lt;br/&gt;So you end up doing that LND and core-lightning do, which is &amp;#34;pick 3&lt;br/&gt;peers to gossip with&amp;#34; and tell everyone else to shut up.&lt;br/&gt;&lt;br/&gt;Yet the point of minisketch is robustness; you can (at cost of 1 message&lt;br/&gt;per minute) keep in sync with an arbitrary number of peers.&lt;br/&gt;&lt;br/&gt;So, we might as well define a preferred ratelimit, so nodes know that&lt;br/&gt;spamming past a certain point is not going to propagate.  At the moment,&lt;br/&gt;LND has no effective ratelimit at all, so it&amp;#39;s a race to the bottom.&lt;br/&gt;&lt;br/&gt;We need that limit eventually, this just makes it more of a priority.&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not really &lt;br/&gt;&amp;gt; sure in a world where you do &amp;#34;update-based-sketch&amp;#34; gossip sync you&amp;#39;re any worse off than today even &lt;br/&gt;&amp;gt; with different rate-limit policies, though I obviously agree there are substantial issues with the &lt;br/&gt;&amp;gt; massively inconsistent rate-limit policies we see today.&lt;br/&gt;&lt;br/&gt;You can&amp;#39;t really do it, since rate-limited junk overwhelms the sketch&lt;br/&gt;really fast :(&lt;br/&gt;&lt;br/&gt;Note, we *can* actually change the ratelimit in future, either by&lt;br/&gt;running two sketches (feature bit!), or by changing the rate slowly&lt;br/&gt;enough that they can handle the small differences.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:05:55&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszg6xup2nq6x9se3thnupuxuzgh6ha0gc88lp5gq5gxrdndmwagtczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2n85nhm</id>
    
      <title type="html">📅 Original date posted:2022-02-16 📝 Original message: Joost ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszg6xup2nq6x9se3thnupuxuzgh6ha0gc88lp5gq5gxrdndmwagtczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2n85nhm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdpzs3s7y9cgsk6sag48t3rxy8qkephhcu5shnjw0z8cdflf4qnfgrgmgx4&#39;&gt;nevent1q…mgx4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Joost Jager &amp;lt;joost.jager at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Nice to see the proposal in more concrete terms. Few questions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - The total proved utxo value (not counting any utxos which are spent)&lt;br/&gt;&amp;gt;&amp;gt;   is multiplied by 10 to give the &amp;#34;announcable_channel_capacity&amp;#34; for that&lt;br/&gt;&amp;gt;&amp;gt; node.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Could this work as a dynamic value too, similar to the minimum relay fee on&lt;br/&gt;&amp;gt; L1?&lt;br/&gt;&lt;br/&gt;I made the number up, so I&amp;#39;m not very attached to it.  How would we&lt;br/&gt;choose to scale it though?  If nodes don&amp;#39;t use the same value it makes&lt;br/&gt;for wasted gossip (and minisketch-based gossip much harder).&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; 1. `tlv_stream`: `channel_update_v2_tlvs`&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; 2. types:&lt;br/&gt;&amp;gt;&amp;gt;     1. type: 4 (`capacity`)&lt;br/&gt;&amp;gt;&amp;gt;     2. data:&lt;br/&gt;&amp;gt;&amp;gt;         * [`tu64`:`satoshis`]&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What does capacity mean exactly outside the context of a real channel? Will&lt;br/&gt;&amp;gt; this be reduced to that maximum htlc amount that the nodes want to route,&lt;br/&gt;&amp;gt; to save as much of the announceable budget as possible?&lt;br/&gt;&lt;br/&gt;Yes, it&amp;#39;s the old htlc_maximum_msat, but expressed in satoshis because&lt;br/&gt;msat seems to finegrained?&lt;br/&gt;&lt;br/&gt;&amp;gt; It is also the question of whether 10 x 10k channels should weigh as much&lt;br/&gt;&amp;gt; on the budget as a 1 x 100k channel. A spammer may be able to do more harm&lt;br/&gt;&amp;gt; with multiple smaller channels because there is more for the sender&amp;#39;s&lt;br/&gt;&amp;gt; pathfinding algorithms to explore. Maybe it doesn&amp;#39;t matter as long as there&lt;br/&gt;&amp;gt; is some mechanism to discourage spam.&lt;br/&gt;&lt;br/&gt;Yes, I suggested a minimum cost to avoid 100k 1sat channels, I don&amp;#39;t&lt;br/&gt;know if we should be more sophisticated.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;     1. type: 5 (`cost`)&lt;br/&gt;&amp;gt;&amp;gt;     2. data:&lt;br/&gt;&amp;gt;&amp;gt;        * [`u16`:`cltv_expiry_delta`]&lt;br/&gt;&amp;gt;&amp;gt;        * [`u32`:`fee_proportional_millionths`]&lt;br/&gt;&amp;gt;&amp;gt;        * [`tu32`:`fee_base_msat`]&lt;br/&gt;&amp;gt;&amp;gt;     1. type: 6 (`min_msat`)&lt;br/&gt;&amp;gt;&amp;gt;     2. data:&lt;br/&gt;&amp;gt;&amp;gt;         * [`tu64`:`min_htlc_sats`]&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; - `channel_id_and_claimant` is a 31-bit per-node channel_id which can be&lt;br/&gt;&amp;gt;&amp;gt;   used in onion_messages, and a one bit stolen for the `claim` flag.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you&amp;#39;d increase the budget multiplier from 10 to 20, couldn&amp;#39;t this be&lt;br/&gt;&amp;gt; simplified to always applying the cost to both nodes?&lt;br/&gt;&lt;br/&gt;Yes!  I forgot that capacity doesn&amp;#39;t have to be symmetrical; if I open a&lt;br/&gt;giant channel with you, and you don&amp;#39;t want to expose more UTXOs, you&lt;br/&gt;just set your capacity to some lower value.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; - A channel is not considered to exist until both peers have sent a&lt;br/&gt;&amp;gt;&amp;gt;   channel_update_v2, at least one of which must set the `claim` flag.&lt;br/&gt;&amp;gt;&amp;gt; - If a node sets `claim`, the capacity of the channel is subtracted from&lt;br/&gt;&amp;gt;&amp;gt;   the remaining announcable_channel_capacity for that node (minimum&lt;br/&gt;&amp;gt;&amp;gt;   10,000 sats).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Same question about magic value and whether it can be dynamic.&lt;br/&gt;&lt;br/&gt;Yes, 10ksat might be giant one day?  We can change it naively with a&lt;br/&gt;feature bit (&amp;#34;I use v2 capacity calcs&amp;#34;), or in some more finegrained&lt;br/&gt;way, but what do we base it on?&lt;br/&gt;&lt;br/&gt;Cheers!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:05:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstk26pr64h6z5560ckfgdm07c24vfsmtpkxd59xha24sx8mq53f6gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2e5qsku</id>
    
      <title type="html">📅 Original date posted:2022-02-13 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstk26pr64h6z5560ckfgdm07c24vfsmtpkxd59xha24sx8mq53f6gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2e5qsku" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs07v0hw3au4648cvdzuq59n7tx9uazn6sclr4jfr3f0rrmafafslcqyr08s&#39;&gt;nevent1q…r08s&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-13&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;        I&amp;#39;ve floated this idea before, but this is a more concrete&lt;br/&gt;proposal for a &amp;#34;v2&amp;#34; gossip protocol.&lt;br/&gt;&lt;br/&gt;It assumes x-only pubkeys (aka point32) and BIP-340 signatures, and uses&lt;br/&gt;modern TLVs for all optional or extensible fields.  Timestamps are&lt;br/&gt;replaced with block heights.&lt;br/&gt;&lt;br/&gt;1. Nodes send out weekly node_announcement_v2, proving they own some&lt;br/&gt;   UTXOs.&lt;br/&gt;2. This entitles them to broadcast channels, using channel_update_v2; a&lt;br/&gt;   channel_update_v2 from both peers means the channel exists.&lt;br/&gt;3. This uses UTXOs for anti-spam, but doesn&amp;#39;t tie them to channels&lt;br/&gt;   directly.&lt;br/&gt;4. Future ZKP proofs are could be added.&lt;br/&gt;&lt;br/&gt;1. type: 271 (`node_announcement_v2`)&lt;br/&gt;2. data:&lt;br/&gt;    * [`bip340sig`:`signature`]&lt;br/&gt;    * [`point32`:`node_id`]&lt;br/&gt;    * [`u32`:`blockheight`]&lt;br/&gt;    * [`node_announcement_v2_tlvs`:`tlvs`]&lt;br/&gt;&lt;br/&gt;1. `tlv_stream`: `node_announcement_v2_tlvs`&lt;br/&gt;2. types:&lt;br/&gt;    1. type: 2 (`features`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*byte`:`featurebits`]&lt;br/&gt;    1. type: 3 (`chain_hash`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`chain_hash`:`chain`]&lt;br/&gt;    1. type: 4 (`taproot_utxo_proofs`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*taproot_utxo_proof`:`proofs`]&lt;br/&gt;    1. type: 6 (`legacy_utxo_proofs`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*legacy_utxo_proof`:`proofs`]&lt;br/&gt;    1. type: 127 (`ipv4_addresses`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*ipv4`:`addresses`]&lt;br/&gt;    1. type: 129 (`ipv6_addresses`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*ipv6`:`addresses`]&lt;br/&gt;    1. type: 131 (`torv3_addresses`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*torv3`:`addr`]&lt;br/&gt;# Maybe alias, color, etc?&lt;br/&gt;&lt;br/&gt;Taproot proofs are a signature of the v1 output over the `node_id`,&lt;br/&gt;`utxo` and `blockheight` with prefix &amp;#34;lightingtaproot_utxo_proofsig&amp;#34;&lt;br/&gt;(using the tagged signatures as per BOLT12). (FIXME: what about&lt;br/&gt;tapscripts?).&lt;br/&gt;&lt;br/&gt;Legacy proofs are two signatures, similar to the existing&lt;br/&gt;channel_announcement.&lt;br/&gt;&lt;br/&gt;1. subtype: `taproot_utxo_proof`&lt;br/&gt;2. data:&lt;br/&gt;    * [`short_channel_id`:`utxo`]&lt;br/&gt;    * [`signature`:`sig`]&lt;br/&gt;&lt;br/&gt;1. subtype: `legacy_utxo_proof`&lt;br/&gt;2. data:&lt;br/&gt;    * [`short_channel_id`:`utxo`]&lt;br/&gt;    * [`point`:`bitcoin_key_1`]&lt;br/&gt;    * [`point`:`bitcoin_key_2`]&lt;br/&gt;    * [`signature`:`sig_1`]&lt;br/&gt;    * [`signature`:`sig_2`]&lt;br/&gt;&lt;br/&gt;- node_announcement_v2 are discarded after a week (1000 blocks).&lt;br/&gt;- If two node_announcement_v2 claim the same UTXO, use the first seen,&lt;br/&gt;  discard any others.&lt;br/&gt;- Nodes do not need to monitor existence of UTXOs after initial check (since&lt;br/&gt;  they will automatically prune them after a week).&lt;br/&gt;- The total proved utxo value (not counting any utxos which are spent)&lt;br/&gt;  is multiplied by 10 to give the &amp;#34;announcable_channel_capacity&amp;#34; for that node.&lt;br/&gt;&lt;br/&gt;1. type: 273 (`channel_update_v2`)&lt;br/&gt;2. data:&lt;br/&gt;    * [`bip340sig`:`signature`]&lt;br/&gt;    * [`point32`:`local_node_id`]&lt;br/&gt;    * [`point32`:`remote_node_id`]&lt;br/&gt;    * [`u32`:`blockheight`]&lt;br/&gt;    * [`u32`:`channel_id_and_claimant`]&lt;br/&gt;    * [`channel_update_v2_tlvs`:`tlvs`]&lt;br/&gt;&lt;br/&gt;1. `tlv_stream`: `channel_update_v2_tlvs`&lt;br/&gt;2. types:&lt;br/&gt;    1. type: 2 (`features`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*byte`:`featurebits`]&lt;br/&gt;    1. type: 3 (`chain_hash`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`chain_hash`:`chain`]&lt;br/&gt;    1. type: 4 (`capacity`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`tu64`:`satoshis`]&lt;br/&gt;    1. type: 5 (`cost`)&lt;br/&gt;    2. data:&lt;br/&gt;       * [`u16`:`cltv_expiry_delta`]&lt;br/&gt;       * [`u32`:`fee_proportional_millionths`]&lt;br/&gt;       * [`tu32`:`fee_base_msat`]&lt;br/&gt;    1. type: 6 (`min_msat`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`tu64`:`min_htlc_sats`]&lt;br/&gt;&lt;br/&gt;- `channel_id_and_claimant` is a 31-bit per-node channel_id which can be&lt;br/&gt;  used in onion_messages, and a one bit stolen for the `claim` flag.&lt;br/&gt;- A channel is not considered to exist until both peers have sent a&lt;br/&gt;  channel_update_v2, at least one of which must set the `claim` flag.&lt;br/&gt;- If a node sets `claim`, the capacity of the channel is subtracted from&lt;br/&gt;  the remaining announcable_channel_capacity for that node (minimum&lt;br/&gt;  10,000 sats).&lt;br/&gt;- If there is insufficient total `announcable_channel_capacity` for a&lt;br/&gt;  node, it is used by the lower `channel_id`s first.&lt;br/&gt;&lt;br/&gt;Implications&lt;br/&gt;------------&lt;br/&gt;&lt;br/&gt;This simplifies gossip, requiring only two messages instead of three,&lt;br/&gt;and reducing the UTXO validation requirements to per-node instead of&lt;br/&gt;per-channel.  We can use a convention that a channel_update_v2 with no&lt;br/&gt;`capacity` is a permanent close.&lt;br/&gt;&lt;br/&gt;We might want to add a taproot_utxo_delegated_proof where UTXOs can&lt;br/&gt;sign over to another key, so cold storage only needs to sign once, and&lt;br/&gt;the other key can sign weekly.&lt;br/&gt;&lt;br/&gt;It also allows &amp;#34;leasing&amp;#34; of UTXOs: you could pay someone to sign their&lt;br/&gt;UTXO for your node_announcement, with some level of trust.  They could&lt;br/&gt;spend the UTXO, which gives you a slow degredation as new nodes don&amp;#39;t&lt;br/&gt;accept your channels but existing nodes don&amp;#39;t check until it&amp;#39;s due for a&lt;br/&gt;refresh).  Or they could sign one UTXO for multiple node_announcements,&lt;br/&gt;which is why preference is given to the first-seen.  But it&amp;#39;s a weekly&lt;br/&gt;business so there&amp;#39;s incentive for them not to.&lt;br/&gt;&lt;br/&gt;Between nodes there&amp;#39;s the question of &amp;#34;who claims this new channel?&amp;#34;,&lt;br/&gt;which I didn&amp;#39;t address here.  Opener claims is logical, but leaks&lt;br/&gt;information (though you could definitely pay for the peer to claim it).&lt;br/&gt;With dual-funding, it&amp;#39;s more complex (some kind of proportional coinflip&lt;br/&gt;protocol is possible), but basically you can always wait for your peer,&lt;br/&gt;and if they don&amp;#39;t set the claim bit you can.&lt;br/&gt;&lt;br/&gt;Cheers!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:05:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszzsjzkdsehk0cf76v40qhv04hysa70hv57ke5epltmlyjz4anm5szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2f3py7k</id>
    
      <title type="html">📅 Original date posted:2022-01-24 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszzsjzkdsehk0cf76v40qhv04hysa70hv57ke5epltmlyjz4anm5szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2f3py7k" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszwu290kjvdqd0xmw0zqfx5awf8xl8zk4mp6lec66jenpgp7g59rgpwlc8e&#39;&gt;nevent1q…lc8e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-01-24&lt;br/&gt;📝 Original message:&lt;br/&gt;Christian Decker &amp;lt;decker.christian at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; I noticed the commando c-lightning plugin just uses the JSON-RPC&lt;br/&gt;&amp;gt;&amp;gt; payload, but perhaps something more compact and rpc-friendly like grpc&lt;br/&gt;&amp;gt;&amp;gt; would be better... which is why this cln-grpc PR peaked my curiosity.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yep, JSON-RPC is rather bad with binary data, and doesn&amp;#39;t have any&lt;br/&gt;&amp;gt; concept of streaming. I personally like grpc because it ticks a lot of&lt;br/&gt;&amp;gt; boxes: secure transport over TLS, mutual authentication via mTLS,&lt;br/&gt;&amp;gt; possibility to add metadata to calls (technically prohibited by the&lt;br/&gt;&amp;gt; JSON-RPC spec) which can help us use macaroons/runes in future,&lt;br/&gt;&amp;gt; streaming support and compact binary format.&lt;br/&gt;&lt;br/&gt;The rest is true, but spec doesn&amp;#39;t disallow extra fields that I can&lt;br/&gt;find?&lt;br/&gt;&lt;br/&gt;&amp;gt; Having an IDL to describe the interface is also rather nice, even though&lt;br/&gt;&amp;gt; for cln-grpc we actually generate that from the JSON-RPC schemas, so&lt;br/&gt;&amp;gt; it&amp;#39;s a bit less expressive than .proto files.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think the end goal of an RPC bolt would be super powerful, so that&lt;br/&gt;&amp;gt;&amp;gt; lnsocket could talk to any lightning node, but that could be further&lt;br/&gt;&amp;gt;&amp;gt; down the line. Choosing the right data format seemed like an important&lt;br/&gt;&amp;gt;&amp;gt; step in that direction. Would love to hear your thoughts on this!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I agree. Exchanging the transport layer underneath grpc doesn&amp;#39;t change&lt;br/&gt;&amp;gt; semantics, but does unlock a number of potential use-cases. I think&lt;br/&gt;&amp;gt; either the JSON-RPC or grpc can serve as a basis for a common RPC&lt;br/&gt;&amp;gt; definition that can have any number of bindings, since we generate&lt;br/&gt;&amp;gt; conversion code to/from JSON-RPC and grpc we can transparently map them&lt;br/&gt;&amp;gt; back and forth.&lt;br/&gt;&lt;br/&gt;Yeah, I don&amp;#39;t think we&amp;#39;ll end up with a control standard.  But I&amp;#39;ve been&lt;br/&gt;pleasantly surprised before: certainly a common subset would be nice!&lt;br/&gt;&lt;br/&gt;Cheers!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:05:03&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf5kjt9cvy2x964ammz92u892ahxr5a2y7344th0ru8cj029j0slgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz23uxn5d</id>
    
      <title type="html">📅 Original date posted:2021-08-12 📝 Original message: Sorry ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf5kjt9cvy2x964ammz92u892ahxr5a2y7344th0ru8cj029j0slgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz23uxn5d" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs07q7eqnj88aegx0dmgz80j9mgvdysygunqksf6e7yzlcvkhc6rpgs4dskt&#39;&gt;nevent1q…dskt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Sorry this took so long.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/895&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/895&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This changed quite a bit, based on discussion here and more coherent&lt;br/&gt;thinking.&lt;br/&gt;&lt;br/&gt;1. You can simply send funding_locked early, no feature needed.&lt;br/&gt;2. It&amp;#39;s a bit useless unless you are the (sole) funder or you trust the&lt;br/&gt;   other side.  Without that, you can neither accept payments nor route&lt;br/&gt;   them; in theory if they used push_msat you could send payments out,&lt;br/&gt;   but that seems a niche case.&lt;br/&gt;3. We do want to know the short_channel_id they&amp;#39;re going to use for the&lt;br/&gt;   channel, so we can add it to routehints for incoming payments.&lt;br/&gt;&lt;br/&gt;Adding the scid is nice anyway, for chainsplit scenarios.&lt;br/&gt;&lt;br/&gt;Here is the new text, a little formatted:&lt;br/&gt;&lt;br/&gt;	1. `tlv_stream`: `funding_locked_tlvs`&lt;br/&gt;	2. types:&lt;br/&gt;	    1. type: 1 (`short_channel_id`)&lt;br/&gt;	    2. data:&lt;br/&gt;	        * [`short_channel_id`:`short_channel_id`]&lt;br/&gt; &lt;br/&gt;        #### Requirements&lt;br/&gt;&lt;br/&gt;        The sender:&lt;br/&gt;...&lt;br/&gt;         - SHOULD set `short_channel_id`&lt;br/&gt;&lt;br/&gt;         - if it is the sole contributor to the funding transaction, or&lt;br/&gt;           has reason to trust the peer:&lt;br/&gt;&lt;br/&gt;            - MAY send `funding_locked` before the funding transaction&lt;br/&gt;              has reached `minimum_depth`&lt;br/&gt;        	- MAY set `short_channel_id` to a fake value, if it will&lt;br/&gt;                  route payments to that `short_channel_id`.&lt;br/&gt;          - otherwise:&lt;br/&gt;            - MUST wait until the funding transaction has reached&lt;br/&gt;              `minimum_depth` before sending this message.&lt;br/&gt;&lt;br/&gt;          - SHOULD re-transmit `funding_locked` if the&lt;br/&gt;            `short_channel_id` for this chanel has changed.&lt;br/&gt;...&lt;br/&gt;        The receiver:&lt;br/&gt;          - SHOULD ignore the `funding_locked` if it knows the&lt;br/&gt;            `short_channel_id` of the channel and it differs from the&lt;br/&gt;            value in `funding_locked`.&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&lt;br/&gt;        Nodes which have funded the channel or trust their peers to have done,&lt;br/&gt;        can simply start using the channel instantly by sending&lt;br/&gt;        `funding_locked`.  This raises the problem of how to use this new&lt;br/&gt;        channel in route hints, since it does not yet have a block number.&lt;br/&gt;        For this reason, a convincing fake number can be use; when the real&lt;br/&gt;        funding transaction is finally mined, it can re-send `funding_locked`&lt;br/&gt;        with the real value.
    </content>
    <updated>2023-06-09T15:03:22&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdz4q6nf979p4g6qty3py52hvsjwpjsk9l752j6ph0889phva6kvszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2vnes8y</id>
    
      <title type="html">📅 Original date posted:2021-06-29 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdz4q6nf979p4g6qty3py52hvsjwpjsk9l752j6ph0889phva6kvszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2vnes8y" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9sqpgr37gydqlzwca0tfl49a92309v8sumkgr8ldy8zyqdn37qas0687f5&#39;&gt;nevent1q…87f5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-29&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the eclair side, we instead send `funding_locked` as soon as we&lt;br/&gt;&amp;gt; see the funding tx in the mempool.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But I think your proposal would work as well.&lt;br/&gt;&lt;br/&gt;This would be backward compatible, I think.  Eclair would send&lt;br/&gt;`funding_locked`, which is perfectly legal, but a normal peer would&lt;br/&gt;still wait for confirms before also sending `funding_locked`; it&amp;#39;s&lt;br/&gt;just that option_zeroconf_channels would mean it doesn&amp;#39;t have to&lt;br/&gt;wait for that before sending HTLCs?&lt;br/&gt;&lt;br/&gt;&amp;gt; We may want to defer sending `announcement_signatures` until&lt;br/&gt;&amp;gt; after the funding tx has been confirmed? What `min_depth` should&lt;br/&gt;&amp;gt; we use here? Should we keep a non-zero value in `accept_channel`&lt;br/&gt;&amp;gt; or should it be zero?&lt;br/&gt;&lt;br/&gt;You can&amp;#39;t send it before you know the channel_id, so it has to be at&lt;br/&gt;least 1.  Spec says:&lt;br/&gt;&lt;br/&gt;      - MUST NOT send `announcement_signatures` messages until `funding_locked`&lt;br/&gt;      has been sent and received AND the funding transaction has at least six confirmations.&lt;br/&gt;&lt;br/&gt;So still compliant there?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:02:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9cvrskengsrqffgx52q2u8c0s3w7uky2e8edegmt3026djz98tqczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2l9u58a</id>
    
      <title type="html">📅 Original date posted:2021-06-29 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9cvrskengsrqffgx52q2u8c0s3w7uky2e8edegmt3026djz98tqczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2l9u58a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr0xdx0lfssk80m475fmngyr8fmcjdmzt0qrrqnelg54uzlx4fu6cf3dg5r&#39;&gt;nevent1q…dg5r&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-29&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all!&lt;br/&gt;&lt;br/&gt;        John Carvalo recently pointed out that not every implementation&lt;br/&gt;accepts zero-conf channels, but they are useful.  Roasbeef also recently&lt;br/&gt;noted that they&amp;#39;re not spec&amp;#39;d.&lt;br/&gt;&lt;br/&gt;How do you all do it?  Here&amp;#39;s a strawman proposal:&lt;br/&gt;&lt;br/&gt;1. Assign a new feature bit &amp;#34;I accept zeroconf channels&amp;#34;.&lt;br/&gt;2. If both negotiate this, you can send update_add_htlc (etc) *before*&lt;br/&gt;   funding_locked without the peer getting upset.&lt;br/&gt;3. Nodes are advised *not* to forward HTLCs from an unconfirmed channel&lt;br/&gt;   unless they have explicit reason to trust that node (they can still&lt;br/&gt;   send *out* that channel, because that&amp;#39;s not their problem!).&lt;br/&gt;&lt;br/&gt;It&amp;#39;s a pretty simple change, TBH (this zeroconf feature would also&lt;br/&gt;create a new set of channel_types, altering that PR).&lt;br/&gt;&lt;br/&gt;I can draft something this week?&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:02:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2rnm5yznqs03w4y6jncx5jlxj8xyv6ca8smh09scg02x6c892m5czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2p5yq2e</id>
    
      <title type="html">📅 Original date posted:2021-04-24 📝 Original message: Matt ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2rnm5yznqs03w4y6jncx5jlxj8xyv6ca8smh09scg02x6c892m5czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2p5yq2e" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsy67gplzp4hnf9zlhnc6l2cggyvs2729zj0242qsf7puwhvh233vg7ken9f&#39;&gt;nevent1q…en9f&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-24&lt;br/&gt;📝 Original message:&lt;br/&gt;Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Somehow I missed this thread, but I did note in a previous meeting - these issues are great fodder for fuzzing. We’ve had a fuzzer which aggressively tests for precisely these types of message-non-delivery-and-resending production desync bugs for several years. When it initially landed it forced several rewrites of parts of the state machine, but quickly exhausted the bug fruit (though catches other classes of bugs occasionally as well). The state machine here is really not that big - while I agree simplifying it where possible is nice, ripping things out to replace them with fresh code (which would need similar testing) is probably not the most obvious decrease in complexity.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s historically had more bugs than anything else in the protocol.  We&lt;br/&gt;literally found another one in feerate negotiation since the last&lt;br/&gt;c-lightning release :(&lt;br/&gt;&lt;br/&gt;I&amp;#39;d rather not have bugs than try to catch them all.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;ve been revisiting this because it makes things like splicing easier:&lt;br/&gt;&amp;gt;&amp;gt; the current draft requires stopping changes while splicing is being&lt;br/&gt;&amp;gt;&amp;gt; negotiated, which is not entirely trivial.  With the simplified method,&lt;br/&gt;&amp;gt;&amp;gt; you don&amp;#39;t have to wait at all.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hmm, what’s nontrivial about this? How much more complicated is this than having an alternation to updates and pausing HTLC updates for a cycle or two while splicing is negotiated (I assume it would still need a similar requirement, as otherwise you have the same complexity)? We already have a similar update-stopping process for shutdown, though of course it doesn’t include restarting.&lt;br/&gt;&lt;br/&gt;You could propose a splice (or update to anchors, or whatever) any time&lt;br/&gt;when it&amp;#39;s your turn, as long as you haven&amp;#39;t proposed any other updates.&lt;br/&gt;That&amp;#39;s simple!&lt;br/&gt;&lt;br/&gt;Instead, *both* sides have to send a splice message to synchronize, and&lt;br/&gt;they can only do so once all in-flight changes have cleared.  You have&lt;br/&gt;to resolve simultaneous splice attempts (we use &amp;#34;highest feerate&amp;#34;&lt;br/&gt;tiebreak by node_id), and keep track of this stage while you clear&lt;br/&gt;in-flight changes.&lt;br/&gt;&lt;br/&gt;Here&amp;#39;s the subset of requirements from the draft which relate to this:&lt;br/&gt;&lt;br/&gt;The sender:&lt;br/&gt;- MUST NOT send another splice message while a splice is being negotiated.&lt;br/&gt;- MUST NOT send a splice message after sending uncommitted changes.&lt;br/&gt;- MUST NOT send other channel updates until splice negotiation has completed.&lt;br/&gt;&lt;br/&gt;The receiver:&lt;br/&gt;- MUST respond with a `splice` message of its own if it has not already.&lt;br/&gt;- MUST NOT reply with `splice` until all commitment updates are resolved by both peers.&lt;br/&gt;- MUST use the higher of the two `funding_feerate_perkw` as the feerate for&lt;br/&gt;  the splice.&lt;br/&gt;- MUST NOT send other channel updates until splice negotiation has completed.&lt;br/&gt;&lt;br/&gt;Similar requirements exist for other major channel changes.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:02:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsta96t7n5u5zutn70tp8hrlj99shsknxjt2vwhy0tp4j8ca948feszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ykj4ex</id>
    
      <title type="html">📅 Original date posted:2021-01-12 📝 Original message: Lloyd ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsta96t7n5u5zutn70tp8hrlj99shsknxjt2vwhy0tp4j8ca948feszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ykj4ex" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfldxup9698z9ptada6sm6a5f46tn0g69zxkzprz2tyr4r89nnp8s63d308&#39;&gt;nevent1q…d308&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-01-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Rusty, Zman,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A concern I have with only doing one signaling transaction out of the whole&lt;br/&gt;&amp;gt; group of inputs is that it means you don&amp;#39;t prove ownership of the other&lt;br/&gt;&amp;gt; inputs.&lt;br/&gt;&lt;br/&gt;But that&amp;#39;s by design.  You can contact two peers and middleman between&lt;br/&gt;them to produce a single tx.&lt;br/&gt;&lt;br/&gt;The practical problem with a signalling tx is that it&amp;#39;s hard to tell if&lt;br/&gt;it&amp;#39;s conflicting.  Mallory uses a single UTXO to probe for everyone&amp;#39;s&lt;br/&gt;UTXO at once.  Poor Bob wants to both wait 60 seconds to see if a&lt;br/&gt;conflicting tx ends up in his mempool, *and* broadcast it ASAP to signal&lt;br/&gt;to others.  He wants to do both of these *before* revealing his own&lt;br/&gt;UTXOs.&lt;br/&gt;&lt;br/&gt;Not sure how to square this, but I do prefer this approach over PoDLE.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:01:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqvwnakr9wrlt6f0xyxlrm47jtqa6xkzqvv3djfyfjvv2fwm4z4yszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz22zwhht</id>
    
      <title type="html">📅 Original date posted:2021-01-07 📝 Original message: Lloyd ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqvwnakr9wrlt6f0xyxlrm47jtqa6xkzqvv3djfyfjvv2fwm4z4yszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz22zwhht" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw8yp73w0npyrcmatvuxd44srvj0wzd7k7x270xqjw3872nzwp3zs63h5wp&#39;&gt;nevent1q…h5wp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-01-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; This achieves all properties except for (4 - distinguishable on-chain)&lt;br/&gt;&amp;gt; which is why it was dismissed.&lt;br/&gt;&lt;br/&gt;It also seems to require 2 txs per channel open?  (Interestingly I&lt;br/&gt;missed that post previously, thanks for the pointer!)&lt;br/&gt;&lt;br/&gt;&amp;gt; I think it is possible to extend the idea to achieve (4) and therefore&lt;br/&gt;&amp;gt; obtain all desired properties.&lt;br/&gt;&amp;gt; Simply put peers can just use the SINGLE|ANYONECANPAY signature as back ups&lt;br/&gt;&amp;gt; in case of abort. Here&amp;#39;s how it could work in my mind:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Initiator requests dual-funding and provides a TX_temp spending their&lt;br/&gt;&amp;gt; input set to a main output and a change output (does not sign it yet). They&lt;br/&gt;&amp;gt; also provide a sighash SIGNLE|ANYONECANPAY signature on the main output&lt;br/&gt;&amp;gt; spending into TX_backup-fund and a signature on the first commitment&lt;br/&gt;&amp;gt; transaction spending from TX_backup-fund (exactly as in [6]).&lt;br/&gt;&amp;gt; 2. Peer responds with commitment TX signature for TX_backup-fund.&lt;br/&gt;&amp;gt; 3. Initiator responds with the signatures for TX_temp.&lt;br/&gt;&amp;gt; *Peer now has a fully functional transaction chain with which to open the&lt;br/&gt;&amp;gt; channel -- now they can attempt to upgrade to a SIGHASH_ALL opening*.&lt;br/&gt;&amp;gt; 4. Peer (if possible) checks there are no existing transactions in the&lt;br/&gt;&amp;gt; chain or mempool spending from the taker&amp;#39;s inputs. If not it responds with&lt;br/&gt;&amp;gt; its inputs, change and commitment tx signature for a SIGHASH_ALL TX_fund.&lt;br/&gt;&amp;gt; 5. Initiator responds with commitment TX signature and TX_fund input&lt;br/&gt;&amp;gt; signatures.&lt;br/&gt;&amp;gt; 6. Peer broadcasts TX_fund.&lt;br/&gt;&amp;gt; *If at any point after step 3 Initiator does not respond for ~2 seconds&lt;br/&gt;&amp;gt; they broadcast TX_temp and TX_backup-funding*&lt;br/&gt;&lt;br/&gt;2 seconds is not sufficient; as an Australian (or Tor user) you should&lt;br/&gt;know this :)&lt;br/&gt;&lt;br/&gt;But otherwise, it&amp;#39;s kinda nice (bar breaking the interactive construction).&lt;br/&gt;&lt;br/&gt;&amp;gt; We have (4) because the SINGLE|ANYONECANPAY signature only appears on-chain&lt;br/&gt;&amp;gt; in case of abort (i.e. TX_backup-funding makes it on-chain).&lt;br/&gt;&amp;gt; It appears to be pretty close to the ideal solution in terms of privacy and&lt;br/&gt;&amp;gt; security.&lt;br/&gt;&amp;gt; If the malicious initiator learns an output they will always have to spend&lt;br/&gt;&amp;gt; one of their inputs otherwise they will quickly get hit by the TX_temp &#43;&lt;br/&gt;&amp;gt; TX_backup-funding.&lt;br/&gt;&amp;gt; Note that it is possible the node is just slow in which case even if step&lt;br/&gt;&amp;gt; TX_backup-funding makes it in both parties should just carry on with the&lt;br/&gt;&amp;gt; channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The downsides are that it involves six rounds of communication and cannot&lt;br/&gt;&amp;gt; use the &amp;#34;interactive tx building&amp;#34; protocol developed for the original&lt;br/&gt;&amp;gt; proposal&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Signaling Transactions&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Finally I present a simple but unintuitive protocol that achieves roughly&lt;br/&gt;&amp;gt; the same properties as the PoDLE protocol but without lightning gossip&lt;br/&gt;&amp;gt; messages.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Whenever the initiator adds an input in the interactive tx building they&lt;br/&gt;&amp;gt; provide signatures on a &amp;#34;signaling&amp;#34; transaction spending that input (and&lt;br/&gt;&amp;gt; any inputs they have added so far).&lt;br/&gt;&amp;gt; The signaling transactions will typically spend the funds back to the&lt;br/&gt;&amp;gt; initiator&amp;#39;s wallet.&lt;br/&gt;&amp;gt; Before revealing any of their inputs, the peer checks that none of the&lt;br/&gt;&amp;gt; inputs added by the initiator are in their mempool/chain.&lt;br/&gt;&amp;gt; If the initiator aborts the protocol after learning one of the peer&amp;#39;s&lt;br/&gt;&amp;gt; inputs the peer broadcasts one of the signaling transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Like the PoDLE proposal this doesn&amp;#39;t achieve (3) since a malicious peer&lt;br/&gt;&amp;gt; could broadcast the signaling transaction making the honest initiator pay a&lt;br/&gt;&amp;gt; transaction fee before using the input in another session.&lt;br/&gt;&amp;gt; To mitigate this a bit, the transactions could be RBF and have a 1&lt;br/&gt;&amp;gt; sat-per-byte feerate to give the initiator a decent amount of time to use&lt;br/&gt;&amp;gt; their input productively before the tx confirms (and paying a low fee if it&lt;br/&gt;&amp;gt; ever does confirm).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The advantages of signaling transactions over PoDLE is that it doesn&amp;#39;t&lt;br/&gt;&amp;gt; involve any wonky crypto or new gossip messages.&lt;br/&gt;&amp;gt; The advantage of the PoDLE proposal over this is that a malicious peer can&lt;br/&gt;&amp;gt; only blacklist the UTXO (not necessarily force you to spend it).&lt;br/&gt;&lt;br/&gt;We only need a single UTXO for this, which is even better.&lt;br/&gt;&lt;br/&gt;So the initiator sends a &amp;#34;good faith&amp;#34; signed tx, which spends one of its&lt;br/&gt;UTXOs, to the accepter.  1sat-per-byte is probably a too low, but the&lt;br/&gt;accepter can provide a feerate for it[1].  Opener aborts if that&lt;br/&gt;&amp;#34;good-faith&amp;#34; feerate is too high.  It&amp;#39;s implied that this is the first&lt;br/&gt;added input, too.&lt;br/&gt;&lt;br/&gt;If the accepter screws the opener by broadcasting it, the opener can&lt;br/&gt;still open a channel with someone else before it&amp;#39;s confirmed: they just&lt;br/&gt;can&amp;#39;t use *that* utxo if they want another node to DF.  Or simply take&lt;br/&gt;the loss, since the feerate is presumably minimal, and use CPFP.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] The latest c-lightning implementation of the spec[2] already has the&lt;br/&gt;    accepter indicating min, max and preferred feerates (and then the&lt;br/&gt;    opener selects within that range).  This would simply add another&lt;br/&gt;    feerate field, suggest implementing as ceiling(min / 2, 1).&lt;br/&gt;[2] Which Lisa promises she&amp;#39;ll publish RSN, so we can add your derived&lt;br/&gt;    points proposal to it.
    </content>
    <updated>2023-06-09T15:01:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqfddntaqyz4uuv9tauq84k5rhtk8xs5tg2vsd0ew8lx8gh5ug3mgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2wxeue5</id>
    
      <title type="html">📅 Original date posted:2020-11-18 📝 Original message: See: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqfddntaqyz4uuv9tauq84k5rhtk8xs5tg2vsd0ew8lx8gh5ug3mgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2wxeue5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvzdqvr3rdfkq8h2laaukq2ct9xh0ea99eymfd234ld69w7v3y4tssfkfe0&#39;&gt;nevent1q…kfe0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-11-18&lt;br/&gt;📝 Original message:&lt;br/&gt;See:&lt;br/&gt;        &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/route-blinding/proposals/route-blinding.md&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/route-blinding/proposals/route-blinding.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;1. Can we use additive tweaks instead of multiplicative?&lt;br/&gt;   They&amp;#39;re slightly faster, and supported by the x-only secp API.&lt;br/&gt;2. Can we use x-only pubkeys?  It&amp;#39;s generally trivial, and a byte&lt;br/&gt;   shorter.  I&amp;#39;m using them in offers to great effect.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:01:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsre6nmduypvx9h9g4h692yjx6wmmlzg65yghktycunletxult6x6qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2dsfjlm</id>
    
      <title type="html">📅 Original date posted:2020-10-14 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsre6nmduypvx9h9g4h692yjx6wmmlzg65yghktycunletxult6x6qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2dsfjlm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswzetjz2dymlmg3l04uem5pfrsw4736ee8gjemrtm07c8carfnwhg6uqqxd&#39;&gt;nevent1q…qqxd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-14&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; It&amp;#39;s a bit tricky to get it right at first, but once you get it right you&lt;br/&gt;&amp;gt; don&amp;#39;t need to touch that&lt;br/&gt;&amp;gt; code again and everything runs smoothly. We&amp;#39;re pretty close to that state,&lt;br/&gt;&amp;gt; so why would we want to&lt;br/&gt;&amp;gt; start from scratch? Or am I missing something?&lt;br/&gt;&lt;br/&gt;Well, if you&amp;#39;ve implemented a state-based approach then this is simply a&lt;br/&gt;subset of that so it&amp;#39;s simple to implement (I believe, I haven&amp;#39;t done it&lt;br/&gt;yet!).&lt;br/&gt;&lt;br/&gt;But with a synchronous approach like this, we can do dynamic protocol&lt;br/&gt;updates at any time without having a special &amp;#34;stop and drain&amp;#34; step.&lt;br/&gt;&lt;br/&gt;For example, you can decrease the amount of HTLCs you accept, without&lt;br/&gt;worrying about the case where there HTLCs being added right now.  This&lt;br/&gt;solves a similar outstanding problem with update_fee.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T15:01:20&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd0nrrx6v0uv2mretq2mjeky48lxtsmetyzdwdgd9kxthmtzz2wmczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2h7h4ej</id>
    
      <title type="html">📅 Original date posted:2020-10-12 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd0nrrx6v0uv2mretq2mjeky48lxtsmetyzdwdgd9kxthmtzz2wmczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2h7h4ej" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf0xapwv49hlmwe0k6m4flkeg5xzxfj6rpnxrjnueundc7y0u9ayqdlfq07&#39;&gt;nevent1q…fq07&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;        Our HTLC state machine is optimal, but complex[1]; the Lightning&lt;br/&gt;Labs team recently did some excellent work finding another place the spec&lt;br/&gt;is insufficient[2].  Also, the suggestion for more dynamic changes makes it&lt;br/&gt;more difficult, usually requiring forced quiescence.&lt;br/&gt;&lt;br/&gt;The following protocol returns to my earlier thoughts, with cost of&lt;br/&gt;latency in some cases.&lt;br/&gt;&lt;br/&gt;1. The protocol is half-duplex, with each side taking turns; opener first.&lt;br/&gt;2. It&amp;#39;s still the same form, but it&amp;#39;s always one-direction so both sides&lt;br/&gt;   stay in sync.&lt;br/&gt;        update&#43;-&amp;gt; commitsig-&amp;gt; &amp;lt;-revocation &amp;lt;-commitsig revocation-&amp;gt;&lt;br/&gt;3. A new message pair &amp;#34;turn_request&amp;#34; and &amp;#34;turn_reply&amp;#34; let you request&lt;br/&gt;   when it&amp;#39;s not your turn.&lt;br/&gt;4. If you get an update in reply to your turn_request, you lost the race&lt;br/&gt;   and have to defer your own updates until after peer is finished.&lt;br/&gt;5. On reconnect, you send two flags: send-in-progress (if you have&lt;br/&gt;   sent the initial commitsig but not the final revocation) and&lt;br/&gt;   receive-in-progress (if you have received the initial commitsig&lt;br/&gt;   not not received the final revocation).  If either is set,&lt;br/&gt;   the sender (as indicated by the flags) retransmits the entire&lt;br/&gt;   sequence.&lt;br/&gt;   Otherwise, (arbitrarily) opener goes first again.&lt;br/&gt;&lt;br/&gt;Pros:&lt;br/&gt;1. Way simpler.  There is only ever one pair of commitment txs for any&lt;br/&gt;   given commitment index.&lt;br/&gt;2. Fee changes are now deterministic.  No worrying about the case where&lt;br/&gt;   the peer&amp;#39;s changes are also in flight.&lt;br/&gt;3. Dynamic changes can probably happen more simply, since we always&lt;br/&gt;   negotiate both sides at once.&lt;br/&gt;&lt;br/&gt;Cons:&lt;br/&gt;1. If it&amp;#39;s not your turn, it adds 1 RTT latency.&lt;br/&gt;&lt;br/&gt;Unchanged:&lt;br/&gt;1. Database accesses are unchanged; you need to commit when you send or&lt;br/&gt;   receive a commitsig.&lt;br/&gt;2. You can use the same state machine as before, but one day (when&lt;br/&gt;   this would be compulsory) you&amp;#39;ll be able signficantly simplify;&lt;br/&gt;   you&amp;#39;ll need to record the index at which HTLCs were changed&lt;br/&gt;   (added/removed) in case peer wants you to rexmit though.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] This is my fault; I was persuaded early on that optimality was more&lt;br/&gt;    important than simplicity in a classic nerd-snipe.&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/issues/794&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/issues/794&lt;/a&gt;
    </content>
    <updated>2023-06-09T15:01:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrd9umsv66hh7llftf8jp8ddamwk8pq3fdkxwxvrvyl6r3fhacrsszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ew0wa9</id>
    
      <title type="html">📅 Original date posted:2020-04-27 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrd9umsv66hh7llftf8jp8ddamwk8pq3fdkxwxvrvyl6r3fhacrsszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ew0wa9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfnkrcs5pf0mxgs0qz034ka8c2kj5ktmmvwl6ufgprrk062au7qtgc06e52&#39;&gt;nevent1q…6e52&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-27&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;#34;David A. Harding via bitcoin-dev&amp;#34; &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; To avoid the excessive wasting of bandwidth.  Bitcoin Core&amp;#39;s defaults&lt;br/&gt;&amp;gt; require each replacement pay a feerate of 10 nBTC/vbyte over an existing&lt;br/&gt;&amp;gt; transaction or package, and the defaults also allow transactions or&lt;br/&gt;&amp;gt; packages up to 100,000 vbytes in size (~400,000 bytes).  So, without&lt;br/&gt;&amp;gt; enforcement of BIP125 rule 3, an attacker starting at the minimum&lt;br/&gt;&amp;gt; default relay fee also of 10 nBTC/vbyte could do the following:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Create a ~400,000 bytes tx with feerate of 10 nBTC/vbyte (1 mBTC total&lt;br/&gt;&amp;gt;   fee)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Replace that transaction with 400,000 new bytes at a feerate of 20&lt;br/&gt;&amp;gt;   nBTC/vbyte (2 mBTC total fee)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Perform 998 additional replacements, each increasing the feerate by 10&lt;br/&gt;&amp;gt;   nBTC/vbyte and the total fee by 1 mBTC, using a total of 400 megabytes&lt;br/&gt;&amp;gt;   (including the original transaction and first replacement) to&lt;br/&gt;&amp;gt;   ultimately produce a transaction with a feerate of 10,000 nBTC/vbyte&lt;br/&gt;&amp;gt;   (1 BTC total fee)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Perform one final replacement of the latest 400,000 byte transaction&lt;br/&gt;&amp;gt;   with a ~200-byte (~150 vbyte) 1-in, 1-out P2WPKH transaction that pays&lt;br/&gt;&amp;gt;   a feerate of 10,010 nBTC/vbyte (1.5 mBTC total fee)&lt;br/&gt;&lt;br/&gt;To be fair, if the feerate you want is 100x the minimum permitted, you&lt;br/&gt;can always use 100x as much bandwidth as necessary without extra cost.&lt;br/&gt;If everyone (or some major tx producers) were to do that, it would suck.&lt;br/&gt;&lt;br/&gt;To fix this properly, you really need to agressively delay processing&lt;br/&gt;(thus propagation) of transactions which aren&amp;#39;t likely to be in the next&lt;br/&gt;(few?) blocks.  This is a more miner incentive compatible scheme.&lt;br/&gt;&lt;br/&gt;However, I realize this is a complete rewrite of bitcoind&amp;#39;s logic, and&lt;br/&gt;I&amp;#39;m not volunteering to do it!&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty,
    </content>
    <updated>2023-06-09T14:59:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdhhtlczspf0e2tywjhmdclx5c48pczkf4uf048j9y62gsgrn3zcczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ftn6d2</id>
    
      <title type="html">📅 Original date posted:2020-04-05 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdhhtlczspf0e2tywjhmdclx5c48pczkf4uf048j9y62gsgrn3zcczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ftn6d2" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvksvdy3vxgrlacudj7xqy353vl857ne8xuvjypj0x7hnymamgj2q9clr2u&#39;&gt;nevent1q…lr2u&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;        This is a rework of the old unwrap-the-onion proposal, with&lt;br/&gt;some important bits missing.&lt;br/&gt;&lt;br/&gt;&amp;gt; Secondly, C needs to prove that the channel it is willing to close involves the payment attempt, and is not some other channel closure that it is attempting to use to fulfill its own soft timeout.&lt;br/&gt;&amp;gt; Since the unilateral close transaction *is* the proof-of-closure, B (and A) can inspect the transaction outputs and see (with some additional data from C) that one of the outputs is to an HTLC that matches the payment hash.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, B (and A) can believe that the proof-of-closure proves that whoever is presenting it is free of wrongdoing, as whoever is actually causing the delay has been punished (by someone being willing to close a channel with the culprit), and that the proof-of-closure commits to this particular payment attempt and no other (because it commits to a particular payment hash).&lt;br/&gt;&lt;br/&gt;As you note below, the payment might be considered dust, or an&lt;br/&gt;unresponsive peer has not yet acked the HTLC.&lt;br/&gt;&lt;br/&gt;My previous proposal was to limit the damage somewhat by requiring that&lt;br/&gt;C offer a signed list of some limited number of HTLCs it is claiming&lt;br/&gt;were caught, alongside the closure proof (you can merkle this, but&lt;br/&gt;that&amp;#39;s a detail).  That closure claim gets socialized, and if there are&lt;br/&gt;multiple different claim lists for the tx then C is a bad actor and we&lt;br/&gt;no longer respect its closure proof.&lt;br/&gt;&lt;br/&gt;You also missed how the timeout would work, which is important.  How&lt;br/&gt;long does node N wait for a proof?  In my construction, it&amp;#39;s 30 seconds,&lt;br/&gt;plus get another 30 seconds for each decryption of the onion it&lt;br/&gt;receives.&lt;br/&gt;&lt;br/&gt;Otherwise, you can&amp;#39;t know how long you&amp;#39;ve got to provide this closure&lt;br/&gt;proof, or how long to wait for it.&lt;br/&gt;&lt;br/&gt;In addition, for closure proofs to work, nodes need to agree on what is&lt;br/&gt;a valid, standard, high-enough-fee commitment transaction.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:59:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq6mlpgcqhja2y0s2afjx7yeeh82hfw63ee3wehuucmhenwxrk0egzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2gljwqf</id>
    
      <title type="html">📅 Original date posted:2020-03-10 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq6mlpgcqhja2y0s2afjx7yeeh82hfw63ee3wehuucmhenwxrk0egzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2gljwqf" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0n75dz2fkrm6y8w8k0ru559zcdr4mr0m6vp5ewxk84j9qupr3rtcskqg80&#39;&gt;nevent1q…qg80&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-10&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Good morning Rusty, et al.,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Note that this means no payment secret is necessary, since the incoming&lt;br/&gt;&amp;gt;&amp;gt; `blinding` serves the same purpose. If we wanted to, we could (ab)use&lt;br/&gt;&amp;gt;&amp;gt; payment_secret as the first 32-bytes to put in Carol&amp;#39;s enc1 (i.e. it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; the ECDH for Carol to decrypt enc1).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I confess to not reading everything in detail, but it seems to me that, with payment point &#43; scalar and path decorrelation, we need to establish a secret with each hop anyway (the blinding scalar for path decorrelation), so if you need a secret per hop, possibly this could be reused as well?&lt;br/&gt;&lt;br/&gt;Indeed, this could be used the same way, though for that secret it can&lt;br/&gt;simply be placed inside the onion rather than passed alongside.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:59:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst70z0y4y7lf8779jpex76knpcmxqrj56f94fwg66qrae2ghtsu4czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz228nmc5</id>
    
      <title type="html">📅 Original date posted:2020-03-09 📝 Original message: I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst70z0y4y7lf8779jpex76knpcmxqrj56f94fwg66qrae2ghtsu4czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz228nmc5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstmap7f0qgdper9mvpw9x85gm5ak2e5q60auh7yu4zhdfmtgycfxc9mt8j5&#39;&gt;nevent1q…t8j5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-09&lt;br/&gt;📝 Original message:&lt;br/&gt;I recently hit a dead-end on rendezvous routing; the single-use&lt;br/&gt;requirement is a showstopper for offers (which are supposed to be static&lt;br/&gt;and reusable).&lt;br/&gt;&lt;br/&gt;Fortunately, t-bast has a scheme for blinded paths (see&lt;br/&gt;&lt;a href=&#34;https://gist.github.com/t-bast/9972bfe9523bb18395bdedb8dc691faf&#34;&gt;https://gist.github.com/t-bast/9972bfe9523bb18395bdedb8dc691faf&lt;/a&gt; ) so&lt;br/&gt;I&amp;#39;ve been examining that more closely.  I think it can be simplified&lt;br/&gt;to use more standard primitives.&lt;br/&gt;&lt;br/&gt;The problem: Alice wants to present Mallory with a path (Carol, Bob,&lt;br/&gt;Alice) for which he can create an onion, which is obscured in some way,&lt;br/&gt;but can be unobscured by the various nodes.  Mallory should be forced to&lt;br/&gt;use the entire path.&lt;br/&gt;&lt;br/&gt;Alice can give Mallory two ECDH blobs to place inside the per-hop&lt;br/&gt;payload to establish shared secrets with Bob and Carol.  But crucially,&lt;br/&gt;Bob needs the secret *before* he can unwrap the onion, so the ECDH&lt;br/&gt;blob for the next peer needs to be sent alongside the onion itself.&lt;br/&gt;&lt;br/&gt;t-bast proposed using the secret to XOR the scid, but Christian&lt;br/&gt;suggested it&amp;#39;s more powerful to encrypt a general payload.&lt;br/&gt;&lt;br/&gt;What does this leave us with?&lt;br/&gt;&lt;br/&gt;1. A new invoice letter `b`.  Encodes&lt;br/&gt;   1 or more pubkey/feebase/feeprop/cltvdelta/features/encblob.&lt;br/&gt;&lt;br/&gt;2. An additional (tlv of course) field to update_add_htlc, `blinding`.&lt;br/&gt;&lt;br/&gt;3. New `tlv_payload` field `encblob` (varlen).&lt;br/&gt;&lt;br/&gt;4. ECDH on incoming `blinding` to get a shared secret which tells&lt;br/&gt;   this node how to tweak its nodeid to decrypt onion, and also how to&lt;br/&gt;   decrypt `encblob`.  This gives a tlv, which presumably contains&lt;br/&gt;   `short_channel_id` as well as `blinding`.&lt;br/&gt;&lt;br/&gt;5. Use `blinding` for the next update_add_htlc.&lt;br/&gt;&lt;br/&gt;6. If you get an error from downstream and you sent `blinding`, turn it&lt;br/&gt;   into your own error for maximum obfuscation.  Perhaps a new&lt;br/&gt;   &amp;#34;blinded_path_error&amp;#34;?  Obviously does not include a channel_update :)&lt;br/&gt;&lt;br/&gt;So, if you get an invoice `b`, with path starting at (known) Carol:&lt;br/&gt;&lt;br/&gt;        Carol/1/1/9/&amp;#34;&amp;#34;/enc1&lt;br/&gt;          Bob&amp;#39;/1/1/9/&amp;#34;&amp;#34;/enc2&lt;br/&gt;            [Optional: decoy hops...]&lt;br/&gt;&lt;br/&gt;Payer constructs the onion to get to Carol as normal, then:&lt;br/&gt;&lt;br/&gt;        Carol: No `blinding` in incoming HTLC, but once it decrypts the&lt;br/&gt;               onion, she sees `encblob` (value enc1).  Uses first 32&lt;br/&gt;               bytes of `enc1` as `blinding`: do ECDH to get SS1, uses&lt;br/&gt;               SS1 to decrypt rest to get next scid and `blinding`, send&lt;br/&gt;               `blinding` with update_add_htlc to Bob.&lt;br/&gt;&lt;br/&gt;        Bob: Gets `blinding` from update_add_htlc. ECDH -&amp;gt; SS2.  Tweak&lt;br/&gt;               own key with SS2 to decode onion.  Use SS2 to decrypt&lt;br/&gt;               `enc2` to get next scid and blinding.  Send `blinding`&lt;br/&gt;               with update_add_htlc to Alice.&lt;br/&gt;&lt;br/&gt;        Alice: Gets `blinding` from update_add_htlc. ECDH -&amp;gt; SS3.  Tweak&lt;br/&gt;               own key with SS3 to decode onion.  If it put in decoy&lt;br/&gt;               hops, this onion won&amp;#39;t be terminal, but otherwise it can&lt;br/&gt;               be treated as terminal iff `blinding` is the expected value&lt;br/&gt;               for this invoice.&lt;br/&gt;&lt;br/&gt;Note that this means no payment secret is necessary, since the incoming&lt;br/&gt;`blinding` serves the same purpose.  If we wanted to, we could (ab)use&lt;br/&gt;payment_secret as the first 32-bytes to put in Carol&amp;#39;s enc1 (i.e. it&amp;#39;s&lt;br/&gt;the ECDH for Carol to decrypt enc1).&lt;br/&gt;&lt;br/&gt;Thoughts?&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:59:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp4sh3lcpm3hrrytlmepuh9tg605xva523wgkgu9tf0hgnfjmgc9gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2twzcyr</id>
    
      <title type="html">📅 Original date posted:2020-02-13 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp4sh3lcpm3hrrytlmepuh9tg605xva523wgkgu9tf0hgnfjmgc9gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2twzcyr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd5x5ze0pu9n78esw73jg35zwsz9qdqryxlxwcfql7ya3cjm6d53gfwhs0v&#39;&gt;nevent1q…hs0v&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-13&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj via Lightning-dev &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; Good morning niftynei,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Rusty had some suggestions about how to improve the protocol messages for this, namely adding a serial_id to the inputs and outputs, which can then be reused for deletions. &lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The serial id can then also be used as the ordering heuristic for transaction inputs during construction (replacing current usage of BIP69). Inputs can be shared amongst peers by flipping the bottom bit of the serial_id before relaying them to another peer (as your own).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What happens if the initiator deliberately provides serial IDs 0x1, 0x3, .... while the acceptor naively provides serial IDs from `/dev/urandom`?&lt;br/&gt;&lt;br/&gt;This is a feature, and one you might need to use if you have some&lt;br/&gt;SIGHASH_SINGLE or other weirdness for one input.&lt;br/&gt;&lt;br/&gt;&amp;gt; Then the balance of probability is that the initiator inputs and outputs are sorted before the acceptor.&lt;br/&gt;&amp;gt; Now, this is probably not an issue, since the initiator and acceptor both know which inputs and outputs are theirs and not theirs, so they could just reveal this information to anyone, so an actor providing such lousy serial IDs is just hurting its own privacy relative to blockchain analysts, so probably will not happen in practice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My initial reaction was to propose adding a secret-sharing round where the resulting key is XORed to each serial ID before sorting by the XORed serial ID, but this might be too overweight, and again the initiator is only hurting its own privacy, and the two participants already know whose money is whose anyway....&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; - nLocktime is always set to 0x00000000&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; - If a blockheight to be used as nLocktime is communicated in the initiation step, is set to blockheight-6; otherwise set to zero-&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I am unsure what is the purpose of this minus 6.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you fear blockheight disagreements, this is probably a good time to introduce block headers.&lt;br/&gt;&amp;gt; So for example if the acceptor thinks the initiator blockheight is too high, it could challenge the initiator to give block headers from its known blockheight to the initiator blockheight.&lt;br/&gt;&amp;gt; If the acceptor thinks the initiator blockheight is too low, it could provide block headers itself as proof.&lt;br/&gt;&amp;gt; This could be limited so that gross differences in blockheight are outright rejected by the acceptor (it could `error` the temporary channel ID rather than accept it).&lt;br/&gt;&lt;br/&gt;Yes, I would just have the initiator specify nLocktime directly, just&lt;br/&gt;like feerate.  If you don&amp;#39;t like it, don&amp;#39;t contribute to the tx&lt;br/&gt;construction.&lt;br/&gt;&lt;br/&gt;&amp;gt; This is SPV, but neither side is actually making or accepting a payment *yet*, just synchronizing clocks, so maybe not as bad as normal SPV.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Massive chain reorgs cannot reduce blockheight, only increase it (else&lt;br/&gt;&amp;gt; the reorg attempt fails in the first place)&lt;br/&gt;&lt;br/&gt;This is not quite true, due to difficulty adjustments.  It&amp;#39;s true in&lt;br/&gt;practice, however, and not relevant since you&amp;#39;d just have to wait one&lt;br/&gt;more block.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; - Serial ids should be chosen at random&lt;br/&gt;&amp;gt;&amp;gt; - For multiparty constructions, the initiator MUST flip the bottom bit of any received inputs before relaying them to a peer.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; - Collisions of serial ids between peers is a protocol error&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I suppose we should define collision to mean &amp;#34;equal in all bits except the lowest bit&amp;#34;.&lt;br/&gt;&lt;br/&gt;No, literally equal.  i.e. you can only make this error by clashing with&lt;br/&gt;yourself.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:58:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq4prqcjnuvq3gfrfkay2uq9rqz4gtqffrx299x8p83z35swql3gczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2f9500n</id>
    
      <title type="html">📅 Original date posted:2020-02-13 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq4prqcjnuvq3gfrfkay2uq9rqz4gtqffrx299x8p83z35swql3gczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2f9500n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsx4eax03m07mhekvcknjgzq40da7esc2hmtm7gd52gj4gg3kvaa3smddl0h&#39;&gt;nevent1q…dl0h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-13&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for the answer, and good luck with c-lightning 0.8.1-rc1 ;)&lt;br/&gt;&lt;br/&gt;... Now -rc2.  I actually had a RL use for lightning (OMG!), and sure&lt;br/&gt;enough found a bug.&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;ve been thinking more about improving my scheme to not require any sender&lt;br/&gt;&amp;gt; change, but I don&amp;#39;t think that&amp;#39;s possible at the moment. As with all&lt;br/&gt;&amp;gt; Lightning&lt;br/&gt;&amp;gt; tricks though, once we have Schnorr then it&amp;#39;s really easy to do.&lt;br/&gt;&amp;gt; Alice simply needs to use `s * d_a` as her &amp;#34;preimage&amp;#34; (and the payment point&lt;br/&gt;&amp;gt; becomes the P_I Bob needs). That may depend on the exact multi-hop locks&lt;br/&gt;&amp;gt; construction we end up using though, so I&amp;#39;m not 100% sure about that yet.&lt;br/&gt;&lt;br/&gt;I was starting to think this whole thing was of marginal benefit: note&lt;br/&gt;that solving &amp;#34;private channels need a temp scid&amp;#34; is far simpler[1].&lt;br/&gt;&lt;br/&gt;But since your scheme extends to rendevous, it&amp;#39;s much more tempting!&lt;br/&gt;&lt;br/&gt;We would use this for normal private channels as well as private routes&lt;br/&gt;aka new rendezvous.  Even better, this would be a replacement for&lt;br/&gt;current route hints (which lack ability to specify feature bits, which&lt;br/&gt;we would add here, and is also grossly inefficient if you just want to&lt;br/&gt;use it for Routeboost[2]).&lt;br/&gt;&lt;br/&gt;Propose we take the `z` to use as bolt11 letter, because even the French&lt;br/&gt;don&amp;#39;t pronounce it in &amp;#34;rendez-vous&amp;#34;!)&lt;br/&gt;&lt;br/&gt;Then use TLV inside:[3]&lt;br/&gt;&lt;br/&gt;* `z` (2): `data_length` variable. One or more entries containing extra&lt;br/&gt;  routing information; there may be more than one `z` field.  Each entry&lt;br/&gt;  looks like:&lt;br/&gt;   * `tlv_len` (8 bits)&lt;br/&gt;   * `rendezvous_tlv` (tlv_len bytes)&lt;br/&gt;&lt;br/&gt;1. tlvs: `rendezvous_tlv`&lt;br/&gt;2. types:&lt;br/&gt;   1. type: 1 (`pubkey`)&lt;br/&gt;   2. data:&lt;br/&gt;      * [`point`:`nodeid`]&lt;br/&gt;   1. type: 2 (`short_channel_id`)&lt;br/&gt;   2. data:&lt;br/&gt;      * [`short_channel_id`:`short_channel_id`]&lt;br/&gt;   1. type: 3 (`fee_base_msat`)&lt;br/&gt;   2. data:&lt;br/&gt;      * [`tu32`:`fee_base_msat`]&lt;br/&gt;   1. type: 4 (`fee_proportional_millionths`)&lt;br/&gt;   2. data:&lt;br/&gt;      * [`tu32`:`fee_proportional_millionths`]&lt;br/&gt;   1. type: 5 (`cltv_expiry_delta`)&lt;br/&gt;   2. data:&lt;br/&gt;      * [`tu16`:`cltv_expiry_delta`]&lt;br/&gt;   1. type: 6 (`features`)&lt;br/&gt;   2. data:&lt;br/&gt;      * [`...*byte`:`features`]&lt;br/&gt;&lt;br/&gt;That probably adds 6 bytes entry, but worth it I think.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] Add a new field to &amp;#39;funding_locked&amp;#39;: &amp;#34;private_scid&amp;#34;.  If both sides&lt;br/&gt;    support &amp;#39;option_private_scid&amp;#39; (?) then the &amp;#34;real&amp;#34; scid is no longer&lt;br/&gt;    valid for routing, and we use the private scid.&lt;br/&gt;&lt;br/&gt;[2] It&amp;#39;s enough to give the scid(s) in this case indicating where you&lt;br/&gt;    have incoming capacity.&lt;br/&gt;&lt;br/&gt;[3] I&amp;#39;m really starting to dislike my bolt11 format.  We should probably&lt;br/&gt;    start afresh with a TLV-based one, where signature covers the hash&lt;br/&gt;    of each entry (so they can be easily externalized!), but that&amp;#39;s a&lt;br/&gt;    big, unrelated task.
    </content>
    <updated>2023-06-09T14:58:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr06hafrh3u3dytqh9qnk738yd3mflgwepvk5ls4fujcnmr40cqaszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2256hq8</id>
    
      <title type="html">📅 Original date posted:2020-02-10 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr06hafrh3u3dytqh9qnk738yd3mflgwepvk5ls4fujcnmr40cqaszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2256hq8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyuekmkh09snue5xra074l90pkpy8qq496tu9qqawe30s0wkte2lc22f7uc&#39;&gt;nevent1q…f7uc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; But Mallory can do the same attack, I think.  Just include the P_I from&lt;br/&gt;&amp;gt;&amp;gt; the wrong invoice for Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good catch, that&amp;#39;s true, thanks for keeping me honest there! In that case&lt;br/&gt;&amp;gt; my proposal&lt;br/&gt;&amp;gt; would need the same mitigation as yours, Bob will need to include the&lt;br/&gt;&amp;gt; `scid` he received&lt;br/&gt;&amp;gt; in `update_add_htlc` (this is in fact not that hard once we allow TLV&lt;br/&gt;&amp;gt; extensions on every&lt;br/&gt;&amp;gt; message).&lt;br/&gt;&lt;br/&gt;Yes, I&amp;#39;ve added this to the PR.  Which gives a new validation path, I&lt;br/&gt;think:&lt;br/&gt;&lt;br/&gt;## Figuring out what nodeid to use to decode onion&lt;br/&gt;&lt;br/&gt;1. Look up scid from HTLC; if it didn&amp;#39;t include one, use default.&lt;br/&gt;2. Look up payment_hash; if no invoice is found, use default.&lt;br/&gt;3. If invoice specified this scid, get nodeid and use that.&lt;br/&gt;4. ... and refuse to forward the HTLC (it must terminate here).&lt;br/&gt;&lt;br/&gt;My plan is to add an argument to `invoice` which is an array of one or&lt;br/&gt;more scids: we get a temporary scids for each peer and use them in the&lt;br/&gt;routehints.  We also assign a random temporary nodeid to that invoice.&lt;br/&gt;&lt;br/&gt;The above algo is designed to ensure we behave like any other node which&lt;br/&gt;has no idea about this nodeid if Mallory:&lt;br/&gt;&lt;br/&gt;1. tries to use a temporary node id on a normal channel to us.&lt;br/&gt;2. tries to pay another invoice using this temporary node id.&lt;br/&gt;3. tries to probe our outgoing channels using this routing hint&lt;br/&gt;   (I think we should probably ban forwarding to private channels,&lt;br/&gt;   too, for similar reasons).&lt;br/&gt;&lt;br/&gt;---&lt;br/&gt;&lt;br/&gt;Note that with any self-assigned SCID schemes, Alice has to respond to&lt;br/&gt;unknown scids in update_add_htlc with some BADONION code (which makes&lt;br/&gt;*Bob* give Carol an error response, since Alice can&amp;#39;t without revealing&lt;br/&gt;her identity).&lt;br/&gt;&lt;br/&gt;With Bob-assigned SCIDs, Alice simply needs to make him unallocate&lt;br/&gt;it before forgetting the invoice, so she will simply never see old&lt;br/&gt;invoices.&lt;br/&gt;&lt;br/&gt;(All these schemes give limited privacy, of course: Bob knows who Alice&lt;br/&gt;is, and fingerprinting and liveness attacks are always possible).&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m extremely nervous about custodial lightning services restricting&lt;br/&gt;&amp;gt;&amp;gt; what they will pay to.  This is not theoretical: they will come under&lt;br/&gt;&amp;gt;&amp;gt; immense KYC pressure in the near future, which means they cannot pay&lt;br/&gt;&amp;gt;&amp;gt; arbitrary invoices.&lt;br/&gt;1&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That&amp;#39;s a very good point, thanks for raising this. However I believe that&lt;br/&gt;&amp;gt; there are (and will be) enough&lt;br/&gt;&amp;gt; non-custodial wallets to let motivated users pay whatever they want. Users&lt;br/&gt;&amp;gt; can even run their own&lt;br/&gt;&amp;gt; node to pay such invoices if needed.&lt;br/&gt;&lt;br/&gt;Not if ln_strike (no, the other one!) is the future.&lt;br/&gt;&lt;br/&gt;&amp;gt; If you are using a custodial wallet and KYC pressure kicks in, then&lt;br/&gt;&amp;gt; regardless of that feature law may&lt;br/&gt;&amp;gt; require users to completely reveal who they are paying, so even normal&lt;br/&gt;&amp;gt; payments wouldn&amp;#39;t protect&lt;br/&gt;&amp;gt; them, don&amp;#39;t you think? Regulation could for example disallow paying via&lt;br/&gt;&amp;gt; unannounced channels entirely&lt;br/&gt;&amp;gt; (or require you to show the funding tx associated to your unannounced&lt;br/&gt;&amp;gt; channel).&lt;br/&gt;&lt;br/&gt;Actually, as long as the same method is required for both normal private&lt;br/&gt;channels (which will all use non-tx-based short_channel_ids in the near&lt;br/&gt;future I hope!), I don&amp;#39;t really mind.  I expect such payments to become&lt;br/&gt;significant, and as long as paying to a temporary id and paying to a&lt;br/&gt;private channel looks identical, it&amp;#39;s too draconian to ban.  A business&lt;br/&gt;would probably meet any KYC requirements by simply asking the user&lt;br/&gt;(perhaps over a certain amount, etc).&lt;br/&gt;&lt;br/&gt;(I&amp;#39;ve put my implementation on hold for a moment while I&amp;#39;m supposed to&lt;br/&gt;be releasing 0.8.1-rc1 RSN!)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:58:35&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs87pqccak5g852ddpkftf4u7q463fhar5p62p4n9wj3kvj6huw5qszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2aecms9</id>
    
      <title type="html">📅 Original date posted:2020-02-04 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs87pqccak5g852ddpkftf4u7q463fhar5p62p4n9wj3kvj6huw5qszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2aecms9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2l2tlz7zq4l2fchelmjscq8zmusenj2sgp7vryttesd8rn5jkmfsy87z2c&#39;&gt;nevent1q…7z2c&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; Hey again,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Otherwise Mallory gets two invoices, and wants to know if they&amp;#39;re&lt;br/&gt;&amp;gt;&amp;gt; actually the same node.  Inv1 has nodeid N1, routehint Bob-&amp;gt;C1, Inv2 has&lt;br/&gt;&amp;gt;&amp;gt; nodeid N2, routehint Bob-&amp;gt;C2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think this attack is interesting. AFAICT my proposal defends against this&lt;br/&gt;&amp;gt; because of the way&lt;br/&gt;&amp;gt; `payment_secret` and `decoy_key` are both used to derive the `decoy_scid`&lt;br/&gt;&amp;gt; (but don&amp;#39;t trust me, do&lt;br/&gt;&amp;gt; verify that I&amp;#39;m not missing something).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If Mallory doesn&amp;#39;t use both the right `decoy_node_id` and `payment_secret`&lt;br/&gt;&amp;gt; to compute `P_I`, Bob&lt;br/&gt;&amp;gt; will not decode that to a valid real `scid` and will return an&lt;br/&gt;&amp;gt; `unknown_next_peer` which is good&lt;br/&gt;&amp;gt; for privacy.&lt;br/&gt;&lt;br/&gt;But Mallory can do the same attack, I think.  Just include the P_I from&lt;br/&gt;the wrong invoice for Bob.&lt;br/&gt;&lt;br/&gt;&amp;gt; It seems to me that&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/681&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/681&lt;/a&gt; cannot defend&lt;br/&gt;&amp;gt; against this attack. If both invoices are currently valid, Bob will forward&lt;br/&gt;&amp;gt; an HTLC that uses N1&lt;br/&gt;&amp;gt; with C2 (because Bob has no way of knowing N1 from the onion, for privacy&lt;br/&gt;&amp;gt; reasons).&lt;br/&gt;&amp;gt; The only way I&amp;#39;d see to avoid is would be that Alice needs to share her&lt;br/&gt;&amp;gt; `decoy_node_id`s with&lt;br/&gt;&amp;gt; Bob (and the mapping to a `decoy_scid`) which means more state to&lt;br/&gt;&amp;gt; manage...but maybe I&amp;#39;m just&lt;br/&gt;&amp;gt; missing a better mitigation?&lt;br/&gt;&lt;br/&gt;No, Bob can include the scid he used in the update_add_htlc message, so&lt;br/&gt;Alice can check.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m extremely nervous about custodial lightning services restricting&lt;br/&gt;what they will pay to.  This is not theoretical: they will come under&lt;br/&gt;immense KYC pressure in the near future, which means they cannot pay&lt;br/&gt;arbitrary invoices.&lt;br/&gt;&lt;br/&gt;Thus my preference for a system which doesn&amp;#39;t add any requirements on&lt;br/&gt;the payer.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:58:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswnmsqaa7y8a2aujuvafh6v9jazwgpj08mddtfpsaye0r69pfq9pgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2lqf3d9</id>
    
      <title type="html">📅 Original date posted:2020-02-04 📝 Original message: Rusty ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswnmsqaa7y8a2aujuvafh6v9jazwgpj08mddtfpsaye0r69pfq9pgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2lqf3d9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdg9ss7gl30prlkfes5d5elwahl2keedu5ql8ydz7q74w5j9zdqscj3c36v&#39;&gt;nevent1q…c36v&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; That&amp;#39;s of course a solution as well. Even with that though, if Alice opens&lt;br/&gt;&amp;gt;&amp;gt; multiple channels to each of her Bobs,&lt;br/&gt;&amp;gt;&amp;gt; she should use Tor and a different node_id each time for better privacy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are two uses for this feature (both of which I started implementing):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Simply always use a temporary id when you have a private channel, to&lt;br/&gt;&amp;gt;    obscure your onchain footprint.  This is a nobrainer.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2. For an extra layer of transience, apply a new temporary id and new&lt;br/&gt;&amp;gt;    nodeid on every invoice *which applies only for that invoice*.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But implementing the latter securely is fraught!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Firstly, need to brute-force the onion against your N keys.  Secondly,&lt;br/&gt;&amp;gt; if you use a temporary key, then you *don&amp;#39;t* end up using the HTLC to&lt;br/&gt;&amp;gt; pay an invoice matching that key, you *MUST* pretend you couldn&amp;#39;t&lt;br/&gt;&amp;gt; decrypt the onion!  This applies to all code paths between the two,&lt;br/&gt;&amp;gt; including parsing the TLV, etc: they must ALL return&lt;br/&gt;&amp;gt; WIRE_INVALID_ONION_HMAC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Otherwise, Mallory can get an invoice, then send malformed payments to&lt;br/&gt;&amp;gt; Alice using the transient key in the invoice and see if she decrypts it.&lt;br/&gt;&lt;br/&gt;Actually, that was too hasty.  You can use the payment_hash as a&lt;br/&gt;fastpath:&lt;br/&gt;&lt;br/&gt;1. Look up invoice using payment_hash.&lt;br/&gt;&lt;br/&gt;2. If there is an invoice, and it has a temporary id associated with it,&lt;br/&gt;   try using that to decrypt the onion.  If that works, and the onion is&lt;br/&gt;   on the final hop, and the TLV decodes, and the payment_secret is&lt;br/&gt;   correct, you can go back and use this temporary key to decrypt the onion.&lt;br/&gt;   Otherwise, go back and use the normal node key.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s still quite a bit of tricky code though...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:58:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdg9ss7gl30prlkfes5d5elwahl2keedu5ql8ydz7q74w5j9zdqsczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2n3wthq</id>
    
      <title type="html">📅 Original date posted:2020-02-04 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdg9ss7gl30prlkfes5d5elwahl2keedu5ql8ydz7q74w5j9zdqsczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2n3wthq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvjyfw2hcuyegeddy3ldta6mavx5kaetllhfjxycmmuj757lshs5c9wsxpq&#39;&gt;nevent1q…sxpq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; That&amp;#39;s of course a solution as well. Even with that though, if Alice opens&lt;br/&gt;&amp;gt; multiple channels to each of her Bobs,&lt;br/&gt;&amp;gt; she should use Tor and a different node_id each time for better privacy.&lt;br/&gt;&lt;br/&gt;There are two uses for this feature (both of which I started implementing):&lt;br/&gt;&lt;br/&gt;1. Simply always use a temporary id when you have a private channel, to&lt;br/&gt;   obscure your onchain footprint.  This is a nobrainer.&lt;br/&gt;&lt;br/&gt;2. For an extra layer of transience, apply a new temporary id and new&lt;br/&gt;   nodeid on every invoice *which applies only for that invoice*.&lt;br/&gt;&lt;br/&gt;But implementing the latter securely is fraught!&lt;br/&gt;&lt;br/&gt;Firstly, need to brute-force the onion against your N keys.  Secondly,&lt;br/&gt;if you use a temporary key, then you *don&amp;#39;t* end up using the HTLC to&lt;br/&gt;pay an invoice matching that key, you *MUST* pretend you couldn&amp;#39;t&lt;br/&gt;decrypt the onion!  This applies to all code paths between the two,&lt;br/&gt;including parsing the TLV, etc: they must ALL return&lt;br/&gt;WIRE_INVALID_ONION_HMAC.&lt;br/&gt;&lt;br/&gt;Otherwise, Mallory can get an invoice, then send malformed payments to&lt;br/&gt;Alice using the transient key in the invoice and see if she decrypts it.&lt;br/&gt;&lt;br/&gt;And then I realized that Alice can&amp;#39;t do this properly without Bob&lt;br/&gt;telling her what the scid he used to route was.&lt;br/&gt;&lt;br/&gt;Otherwise Mallory gets two invoices, and wants to know if they&amp;#39;re&lt;br/&gt;actually the same node.  Inv1 has nodeid N1, routehint Bob-&amp;gt;C1, Inv2 has&lt;br/&gt;nodeid N2, routehint Bob-&amp;gt;C2.&lt;br/&gt;&lt;br/&gt;Now Mallory uses Bob-&amp;gt;C2 to pay to N1 for Inv1.  If it works, he knows&lt;br/&gt;it&amp;#39;s the same node issuing both invoices.&lt;br/&gt;&lt;br/&gt;So, update_add_htlc needs a new scid field.&lt;br/&gt;&lt;br/&gt;At this point, I think we should just add a new channel_flag, which if&lt;br/&gt;you set it (and feature flag is offered) you get assigned random SCID&lt;br/&gt;from the peer in funding_locked.  This overrides your&lt;br/&gt;funding-transaction-based SCID.&lt;br/&gt;&lt;br/&gt;That gets the first case for new channels, without adding much&lt;br/&gt;complexity at all.[1]&lt;br/&gt;&lt;br/&gt;Thoughts?&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] If we want to cover existing channels, we need a new &amp;#34;give me a&lt;br/&gt;    replacement scid&amp;#34; msg and reply.  But it can be idempotent (you&lt;br/&gt;    only ever get one replacement).
    </content>
    <updated>2023-06-09T14:58:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvv99llwu2venmgcjxk6zfz8ywrlgk3dzhureptn6dlmnrul4qusgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xchevs</id>
    
      <title type="html">📅 Original date posted:2020-02-03 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvv99llwu2venmgcjxk6zfz8ywrlgk3dzhureptn6dlmnrul4qusgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xchevs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsra56hgfgj5cpcezj8jyx4j9d0flhasanqzhdk4vq7fmce6jkxllcp4vxy7&#39;&gt;nevent1q…vxy7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; We can easily get rid of (1.) by leveraging the `payment_secret`. The&lt;br/&gt;&amp;gt; improved scheme is:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Alice draws a random `decoy_key`&lt;br/&gt;&amp;gt; * Alice computes the corresponding `decoy_node_id = decoy_key * G`&lt;br/&gt;&amp;gt; * Alice draws a random `payment_secret`&lt;br/&gt;&amp;gt; * Alice computes `decoy_short_channel_id = H(payment_secret * decoy_key *&lt;br/&gt;&amp;gt; bob_node_id) xor short_channel_id`&lt;br/&gt;&amp;gt; * Alice uses the `decoy_key` to sign the invoice&lt;br/&gt;&amp;gt; * Carol recovers `decoy_node_id` from the invoice signature&lt;br/&gt;&amp;gt; * Carol includes `P_I = payment_secret * decoy_node_id` in the onion&lt;br/&gt;&amp;gt; payload for Bob&lt;br/&gt;&amp;gt; * Bob can compute `short_channel_id = H(bob_private_key * P_I) xor&lt;br/&gt;&amp;gt; decoy_short_channel_id`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But I don&amp;#39;t see how to get rid of (2.). If anyone has a clever idea on how&lt;br/&gt;&amp;gt; to do that, I&amp;#39;d love to hear it!&lt;br/&gt;&lt;br/&gt;I really don&amp;#39;t want a special marker on Carol; she needs to just pay&lt;br/&gt;like normal.  Not just because it&amp;#39;s simple, but because it means that&lt;br/&gt;Carol can use a custodial wallet without having to flag the payment as&lt;br/&gt;somehow special.&lt;br/&gt;&lt;br/&gt;AFAICT, having Bob assign scids is the only viable way to do this.  The&lt;br/&gt;current proposal limits to one scid at a time, but it could be extended&lt;br/&gt;to allow multiple scids.&lt;br/&gt;&lt;br/&gt;(I&amp;#39;m seeking a clever way that Bob can assign them and trivially tell&lt;br/&gt;which ID is assigned to which peer, but I can&amp;#39;t figure it out, so I&lt;br/&gt;guess Bob keeps a mapping and restricts each peer to 256 live scids?).&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve updated and somewhat simplified the PR now.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:58:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx43e6pgh98z6wn7jtu7eu6lklnr3lpfhr2ntdlw5prtswxn32q2czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2g3nfdp</id>
    
      <title type="html">📅 Original date posted:2019-12-03 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx43e6pgh98z6wn7jtu7eu6lklnr3lpfhr2ntdlw5prtswxn32q2czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2g3nfdp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsta5frd7xkad5fy90zr69mx7dfrm28eap9p0jrcyyp3tu729zp3ysaxnw93&#39;&gt;nevent1q…nw93&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-03&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Good morning Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Hi all,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I recently revisited the eltoo paper and noticed some things related&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; watchtowers that might affect channel construction.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Due to NOINPUT, any update transaction can spend from any other, so&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; in theory the tower only needs the most recent update txn to resolve&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; any dispute.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; In order to spend, however, the tower must also produce a witness&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; script which when hashed matches the witness program of the input. To&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; ensure settlement txns can only spend from exactly one update txn,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; each update txn uses unique keys for the settlement clause, meaning&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; that each state has a unique witness program.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I didn&amp;#39;t think this was the design. The update transaction can spend&lt;br/&gt;&amp;gt;&amp;gt; any prior, with a fixed script, due to NOINPUT.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The settlement transaction does not use NOINPUT, and thus can only&lt;br/&gt;&amp;gt;&amp;gt; spend the matching update.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My understanding is that this is not logically possible?&lt;br/&gt;&lt;br/&gt;You&amp;#39;re right, no wonder I missed this problem :(&lt;br/&gt;&lt;br/&gt;OK, so we need to change the key(s) every time.  Can we tweak it based&lt;br/&gt;on something the watchtower will know, i.e. something in the update tx&lt;br/&gt;itself?  Obviously not the output, as that would create a circular&lt;br/&gt;dependency.  Is there some taproot thing we can use to insert some&lt;br/&gt;noise in the input?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0yfe073ea84qfgw0776awhnywnez4w4j3007jr89vyupmu2a34jgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xcdwq3</id>
    
      <title type="html">📅 Original date posted:2019-11-11 📝 Original message: Ross ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0yfe073ea84qfgw0776awhnywnez4w4j3007jr89vyupmu2a34jgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xcdwq3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgqzn7v47v0xqlxszwe386038xd44nn60cjj4xwjr8l9jjmwedslc3c9t0c&#39;&gt;nevent1q…9t0c&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Ross Dyson &amp;lt;me at rossdyson.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We spoke in detail about this after your presentation at LNconf. I&amp;#39;m one of&lt;br/&gt;&amp;gt; the contributors to LNURL so I am a little familiar with what you&amp;#39;re trying&lt;br/&gt;&amp;gt; to achieve and am very grateful you&amp;#39;re considering implementing something&lt;br/&gt;&amp;gt; similar to the mainnet protocol.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I can only see delivery address being a nightmare for the network or wallet&lt;br/&gt;&amp;gt; providers. If you take a quick look at any Shopify website right now and&lt;br/&gt;&amp;gt; try to buy something to be delivered you will see validation of address&lt;br/&gt;&amp;gt; inputs before accepting payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is the &amp;#39;expected&amp;#39; UX of consumer applications in 2019. If offers were&lt;br/&gt;&amp;gt; to not validate address inputs correctly the user will not receive the&lt;br/&gt;&amp;gt; product, lose money, and have a [very] negative review of both the&lt;br/&gt;&amp;gt; wallet-providing and the offer-providing businesses.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Handling these UX expectations will require either the wallet provider or&lt;br/&gt;&amp;gt; the offer provider to validate the inputs before proceeding with the sale.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    1. If the offer provider handles validation then the network will have&lt;br/&gt;&amp;gt;    to accommodate potentially infinite validation attempts (big no no I assume)&lt;br/&gt;&amp;gt;    2. If the wallet provider were to provide the UX for input validation&lt;br/&gt;&amp;gt;    they are taking on significant workload to develop a robust address input&lt;br/&gt;&amp;gt;    UI, but more importantly the responsibility to correctly validate. There is&lt;br/&gt;&amp;gt;    plenty of room to screw up and create a catastrophic user experience.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So I think address validation input is only possible via 2. but I think it&lt;br/&gt;&amp;gt; is too much workload and responsibility to expect from wallet providers.&lt;br/&gt;&lt;br/&gt;This is not the area I worry about, TBH, since every shopping website in&lt;br/&gt;existence has implemented address input (and some form of validation).&lt;br/&gt;I&amp;#39;m sure it&amp;#39;ll be primitive to start with.&lt;br/&gt;&lt;br/&gt;Of course, UBL has a standard &amp;#39;AddressType&amp;#39; too:&lt;br/&gt;&lt;br/&gt;        &lt;a href=&#34;http://docs.oasis-open.org/ubl/os-UBL-2.2/xsd/common/UBL-CommonAggregateComponents-2.2.xsd&#34;&gt;http://docs.oasis-open.org/ubl/os-UBL-2.2/xsd/common/UBL-CommonAggregateComponents-2.2.xsd&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;From what I can see, it would not be impossible to bring delivery address&lt;br/&gt;&amp;gt; functionality into offers retroactively after offers was already in prod.&lt;br/&gt;&amp;gt; Perhaps icebox it?&lt;br/&gt;&lt;br/&gt;Quite possibly something we can delay; most current goods are virtual&lt;br/&gt;anyway.  However, delivery address standardization would greatly improve&lt;br/&gt;the UX for such things.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw9hmh99wwmcs4099xplz3gc96dlf0kwd5et6jndc7775tj6unqfqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2s7n04a</id>
    
      <title type="html">📅 Original date posted:2019-11-11 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw9hmh99wwmcs4099xplz3gc96dlf0kwd5et6jndc7775tj6unqfqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2s7n04a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0yfe073ea84qfgw0776awhnywnez4w4j3007jr89vyupmu2a34jgd3uv35&#39;&gt;nevent1q…uv35&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Yaacov Akiba Slama &amp;lt;ya at slamail.org&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Rusty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 08/11/2019 05:09, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt; Hi Yaacov,&lt;br/&gt;&amp;gt;&amp;gt;          I&amp;#39;ve been pondering this since reading your comment on the PR!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;          As a fan of standards, I am attracted to UBL (I&amp;#39;ve chaired an&lt;br/&gt;&amp;gt;&amp;gt; OASIS TC in the past and have great respect for them); as a fan of&lt;br/&gt;&amp;gt;&amp;gt; simplicity I am not.  Forcing UBL implementation on wallet providers is&lt;br/&gt;&amp;gt;&amp;gt; simply not going to happen, whatever I were to propose.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In fact, using UBL in LN specification is simpler than trying to &lt;br/&gt;&amp;gt; understand the semantic of each field needed by businesses. You are &lt;br/&gt;&amp;gt; right that using such a standard put the burden into wallet providers &lt;br/&gt;&amp;gt; instead of LN developers, but as a wallet (breez) provider, I can say that:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1) Most money transactions (currently in fiat) are between users and &lt;br/&gt;&amp;gt; companies and not between two users. If we want to replace FIAT by &lt;br/&gt;&amp;gt; bitcoin, we need to create an infrastructure which can be used by &lt;br/&gt;&amp;gt; businesses. That means that LN needs to be able to be integrated easily &lt;br/&gt;&amp;gt; into POS systems. So, as a wallet provider who want to help the &lt;br/&gt;&amp;gt; transition from fiat to bitcoin, I need to be able to support standards &lt;br/&gt;&amp;gt; even if that means that I have to implement using/parsing big and &lt;br/&gt;&amp;gt; complicated standards.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For simple user to user transaction, the wallet can decide to use only a &lt;br/&gt;&amp;gt; subset of the fields defined by the standard.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2) From a technical point of view, it seems that there are already UBL &lt;br/&gt;&amp;gt; libraries in java and c#. I don&amp;#39;t think such library is hard to write in &lt;br/&gt;&amp;gt; go, rust.., so every wallet implementation can use them.&lt;br/&gt;&lt;br/&gt;That is not the problem.  The problem is that our order flow is simple:&lt;br/&gt;&lt;br/&gt;        Seller: Offer&lt;br/&gt;        Buyer: Invoice Request&lt;br/&gt;        Seller: Invoice (or updated Offer)&lt;br/&gt;        Buyer/Seller: Payment &amp;amp; Acknowledgement (atomic)&lt;br/&gt;&lt;br/&gt;(This could, of course, fit into a larger business flow.)&lt;br/&gt;&lt;br/&gt;The closest UBL flow seems to be:&lt;br/&gt;&lt;br/&gt;        Seller: Quotation&lt;br/&gt;        Buyer: Order&lt;br/&gt;        Seller: (Prepayment)Invoice (or updated Quotation)&lt;br/&gt;&lt;br/&gt;It&amp;#39;s also worth noting that, even compressed, none of the UBL examples&lt;br/&gt;fit into the 1023 byte limit of the existing invoice format:&lt;br/&gt;&lt;br/&gt;        UBL-Quotation-2.1-Example.xml: 1864 bytes (gz)&lt;br/&gt;        UBL-Order-2.1-Example.xml: 2515 bytes (gz)&lt;br/&gt;        UBL-Invoice-2.1-Example.xml: 3163 bytes (gz)&lt;br/&gt;&lt;br/&gt;Indeed, that Quotation alone requires a 32x32 QR code.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; 	However, since invoices/offers and UBL are both structures, we&lt;br/&gt;&amp;gt;&amp;gt; should have an explicit mapping between the two.  What fields should&lt;br/&gt;&amp;gt;&amp;gt; have their own existence in the invoice/offer and what should be in a&lt;br/&gt;&amp;gt;&amp;gt; general UBL field is a question we have to think on further.&lt;br/&gt;&amp;gt; I agree that we don&amp;#39;t want duplication. This is the reason, I propose to &lt;br/&gt;&amp;gt; use only ubl structure and add in the ln standard invoice an ubl &lt;br/&gt;&amp;gt; &amp;#34;opaque&amp;#34; field which will be self-contained and only add in the &lt;br/&gt;&amp;gt; invoice/offer/.. the fields specific to ln.&lt;br/&gt;&lt;br/&gt;Except we need to go through the UBL spec and indicate exactly what&lt;br/&gt;fields are permitted, and which are required.&lt;br/&gt;&lt;br/&gt;Many UBI fields are not amenable to machine interpretation (eg. note&lt;br/&gt;fields).  These must be either explicitly exposed to the buyer (in case&lt;br/&gt;the seller uses them) such as shipping conditions, or explicitly&lt;br/&gt;forbidden/ignored.&lt;br/&gt;&lt;br/&gt;This is not a small task, and required intimiate knowledge of the UBL&lt;br/&gt;spec.  It&amp;#39;s not enough just to make something *look* like UBL.&lt;br/&gt;&lt;br/&gt;Does anyone have expertise in this area?  Shall we form a sub-group to&lt;br/&gt;investigate this properly?&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqy5j9v6mhx7szxjgwan26674a0cw3hcgstlywathhvweyy9e20hgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz247p253</id>
    
      <title type="html">📅 Original date posted:2019-11-08 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqy5j9v6mhx7szxjgwan26674a0cw3hcgstlywathhvweyy9e20hgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz247p253" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0k0j03e6f9xfslyka8tfnvrkq62lxp5z0r673ffr25en00lxxxhcepkqp3&#39;&gt;nevent1q…kqp3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-08&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; First, please confirm my understanding of the message flow.&lt;br/&gt;&amp;gt; Suppose I have a donation offer on my website and Rusty wants to donate to me.&lt;br/&gt;&amp;gt; Then:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;          ZmnSCPxj                      Rusty&lt;br/&gt;&amp;gt;             |                            |&lt;br/&gt;&amp;gt;             &#43;---------- `lno` ----------&amp;gt;&#43; (via non-Lightning communication channel e.g. https)&lt;br/&gt;&amp;gt;             |                            |&lt;br/&gt;&amp;gt;             &#43;&amp;lt;---- `invoice_request` ----&#43; (via a normal Rusty-&amp;gt;ZmnSCPxj payment)&lt;br/&gt;&amp;gt;             |                            |&lt;br/&gt;&amp;gt;             &#43;---- `invoice_or_error` ---&amp;gt;| (by failing the above payment and embedding in the failure blob)&lt;br/&gt;&amp;gt;             |                            |&lt;br/&gt;&amp;gt;             &#43;&amp;lt;------- `sendpay` ---------&#43; (via a normal Rusty-&amp;gt;ZmnSCPxj payment)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Is it approximately correct?&lt;br/&gt;&lt;br/&gt;Sorry for delayed response; yes, this is correct.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; gets an invoice request (`lni...`), and sends the invoice over the&lt;br/&gt;&amp;gt;&amp;gt; lightning network, retreiving an empty reply.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here are completely pointless counterproposals for the offer and invoice-request HRPs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Offers:&lt;br/&gt;&amp;gt;   * `lnpayme`&lt;br/&gt;&amp;gt;   * `lnbuyit`&lt;br/&gt;&amp;gt;   * `lnforsale`&lt;br/&gt;&amp;gt; * Invoice Requests:&lt;br/&gt;&amp;gt;   * `lnpaying`&lt;br/&gt;&amp;gt;   * `lnbuying`&lt;br/&gt;&amp;gt;   * `lnshutupandtakemymoney`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `lno` and `lni` feel wrong to me.&lt;br/&gt;&amp;gt; Their juxtaposition implies `lno` == output and `lni` == input to me, due to the use of `o` and `i`, though `lno` is where you get money in exchange for product and `lni` is the request-for-service.&lt;br/&gt;&lt;br/&gt;lnx and lny?  Nobody can interpret them at all, that way :)&lt;br/&gt;&amp;gt;&amp;gt;     3.  type: 2 (`description`)&lt;br/&gt;&amp;gt;&amp;gt;     4.  data:&lt;br/&gt;&amp;gt;&amp;gt;         -   [`...*byte`:`description`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; UTF-8?&lt;br/&gt;&amp;gt; Null-terminated?&lt;br/&gt;&lt;br/&gt;I was thinking UTF-8 like current field.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; -   MUST include `amount` if it includes `recurrence`.&lt;br/&gt;&amp;gt;&amp;gt; -   if it includes `amount`:&lt;br/&gt;&amp;gt;&amp;gt;     -   MUST specify `currency` as the ISO 4712 or BIP-0173, padded with zero bytes if required&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I cannot find ISO 4712, but could find ISO 4217.&lt;br/&gt;&lt;br/&gt;Oops, I fixed my typo wrong.  Thanks.&lt;br/&gt;&lt;br/&gt;&amp;gt; BIP-173 does not have a list of currencies, but refers to SLIP-0173.&lt;br/&gt;&amp;gt; Some of the listed currencies there seem to have more than 4 characters.&lt;br/&gt;&lt;br/&gt;Oh, I&amp;#39;d never seen SLIP-0173.  Cool, I increased it to 5; SLIP-0173 has&lt;br/&gt;no limit but I find it hard to care about any of them anyway.&lt;br/&gt;&lt;br/&gt;&amp;gt; Should I assume encoding is ASCII?&lt;br/&gt;&amp;gt; We will &amp;#34;never&amp;#34; see a non-ASCII currency code?&lt;br/&gt;&lt;br/&gt;Not really, but if you don&amp;#39;t understand it you can&amp;#39;t do much, ASCII or&lt;br/&gt;no.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; The &amp;#34;default offer&amp;#34; of a node is a nominal offer used to send&lt;br/&gt;&amp;gt;&amp;gt; unsolicited payments. It is generally not actually sent, but can be&lt;br/&gt;&amp;gt;&amp;gt; used by any other node as if it has been. It has the following&lt;br/&gt;&amp;gt;&amp;gt; fields:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; -   `offer_idenfitier`: zero-length&lt;br/&gt;&amp;gt;&amp;gt; -   `d`: any&lt;br/&gt;&amp;gt;&amp;gt; -   `n`: the node id of the recipient.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In essence, this is an implicitly-existing offer that never expires, and which can be used by any node at any time to construct an invoice request?&lt;br/&gt;&lt;br/&gt;Yep!&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; The `refund_proof` refers to a previous invoice paid by the sender for&lt;br/&gt;&amp;gt;&amp;gt; the specific case of a `refund_for` offer. It provides proof of&lt;br/&gt;&amp;gt;&amp;gt; payment (the `payment_preimage` and also a signature of the&lt;br/&gt;&amp;gt;&amp;gt; `payment_hash` from the `key` which requested the being-refunded&lt;br/&gt;&amp;gt;&amp;gt; invoice (which does not have to be the same as this `key`!).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; An earlier requirement mentions that writers of offers or invoice request MUST have `paths` in some condition.&lt;br/&gt;&amp;gt; The below does not have `paths`, but there is a &amp;#34;human-readable&amp;#34; alternate encoding which *does* have `paths`.&lt;br/&gt;&amp;gt; It might be better to clarify this point.&lt;br/&gt;&lt;br/&gt;The in-wire one doesn&amp;#39;t have paths, since you respond by reply; you&lt;br/&gt;don&amp;#39;t need (and should not be able to) find the sender.&lt;br/&gt;&lt;br/&gt;The non-wire one needs a path, since you need to initiate a reply.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; The `directed` and `directed_reply` Messages&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ---------------------------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1.  type: 384 (`directed`) (`option_directed_messages`)&lt;br/&gt;&amp;gt;&amp;gt; 2.  data:&lt;br/&gt;&amp;gt;&amp;gt;     -   [`chain_hash`:`chain_hash`]&lt;br/&gt;&amp;gt;&amp;gt;     -   [`u64`:`id`]&lt;br/&gt;&amp;gt;&amp;gt;     -   [`1366*byte`:`onion_routing_packet`]&lt;br/&gt;&amp;gt;&amp;gt; 3.  type: 384 (`directed_reply`) (`option_directed_messages`)&lt;br/&gt;&amp;gt;&amp;gt; 4.  data:&lt;br/&gt;&amp;gt;&amp;gt;     -   [`chain_hash`:`chain_hash`]&lt;br/&gt;&amp;gt;&amp;gt;     -   [`u64`:`id`]&lt;br/&gt;&amp;gt;&amp;gt;     -   [`u16`:`len`]&lt;br/&gt;&amp;gt;&amp;gt;     -   [`len*byte`:`reply`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This new `directed` message will be the mechanism for sending invoice requests and receiving invoice request responses?&lt;br/&gt;&lt;br/&gt;Yes.&lt;br/&gt;&lt;br/&gt;&amp;gt; What incentive is there for a forwarding node to actually forward a `directed` message?&lt;br/&gt;&lt;br/&gt;It&amp;#39;s a strong liveness indicator to the sender, so they&amp;#39;re likely to use&lt;br/&gt;the same path for the actual payment.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxlg2cjh0qgfrmvvx2cttzzvle22f29y5qms2ewjy8aauldlay67qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2udywh8</id>
    
      <title type="html">📅 Original date posted:2019-11-07 📝 Original message: Joost ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxlg2cjh0qgfrmvvx2cttzzvle22f29y5qms2ewjy8aauldlay67qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2udywh8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2647qa0pyrp85qu4yrf2zh630x8y5j9xs2gprl0h3ymwmzvjuhlq9z5zpz&#39;&gt;nevent1q…5zpz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Joost Jager &amp;lt;joost.jager at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; In my opinion, the prepayment should be a last resort. It does take away&lt;br/&gt;&amp;gt; some of the attractiveness of the Lightning Network. Especially if you need&lt;br/&gt;&amp;gt; to make many payment attempts over long routes, the tiny prepays do add up.&lt;br/&gt;&amp;gt; For a $10 payment, it&amp;#39;s probably nothing to worry about. But for&lt;br/&gt;&amp;gt; micro-payments this can become prohibitively expensive. And it is exactly&lt;br/&gt;&amp;gt; the micro-payment use case where Lightning outshines other payment systems.&lt;br/&gt;&amp;gt; A not yet imagined micro-payment based service could even be the launchpad&lt;br/&gt;&amp;gt; to world domination. So I think we should be very careful with interfering&lt;br/&gt;&amp;gt; with that potential.&lt;br/&gt;&lt;br/&gt;I completely agree, yeah.  And maybe we&amp;#39;ll never need it, but it&amp;#39;s one&lt;br/&gt;of my main concerns for the network.&lt;br/&gt;&lt;br/&gt;&amp;gt; Isn&amp;#39;t spam something that can also be addressed by using rate limits for&lt;br/&gt;&amp;gt; failures? If all relevant nodes on the network employ rate limits, they can&lt;br/&gt;&amp;gt; isolate the spammer and diminish their disruptive abilities.&lt;br/&gt;&lt;br/&gt;Sure, once the spammer has jammed up the network, he&amp;#39;ll be stopped.  So&lt;br/&gt;will everyone else.  Conner had a proposal like this which didn&amp;#39;t work,&lt;br/&gt;IIRC.&lt;br/&gt;&lt;br/&gt;&amp;gt; If a node sees that its outgoing htlc packets stack up, it can reduce&lt;br/&gt;&amp;gt; the incoming flow on the channels where the htlcs originate&lt;br/&gt;&amp;gt; from. Large routing nodes could agree with their peers on service&lt;br/&gt;&amp;gt; levels that define these rate limits.&lt;br/&gt;&lt;br/&gt;Unfortunately, if we *don&amp;#39;t* address this, then the network will defend&lt;br/&gt;itself with the simple tactic of deanonymizing payments.&lt;br/&gt;&lt;br/&gt;And every other solution I&amp;#39;ve seen ends up the same way :(&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq9z5letuapjlc7guzr2eltqltal7g0l5yptetkyh6mqd8jk8v3cqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2huac5p</id>
    
      <title type="html">📅 Original date posted:2019-11-22 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq9z5letuapjlc7guzr2eltqltal7g0l5yptetkyh6mqd8jk8v3cqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2huac5p" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsthpszrn6mr8wj8m20ermdrjnhy40rq4dg84rxh40r7u58j53wflqw222j2&#39;&gt;nevent1q…22j2&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; I think there&amp;#39;s another alternative than upfront payments to prevent spam,&lt;br/&gt;&amp;gt; which is maybe less&lt;br/&gt;&amp;gt; controversial (but potentially less effective as well - to be investigated).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Why not adapt what has been done with email spam and PoW/merkle puzzles?&lt;br/&gt;&lt;br/&gt;If we can&amp;#39;t come up with an untracable scheme, this is what we&amp;#39;ll have&lt;br/&gt;to do (i.e. remove the sats component).&lt;br/&gt;&lt;br/&gt;Unfortunately botnets are really good at generating these.  That was&lt;br/&gt;always the hashcash flaw (which is why it was never actually used).&lt;br/&gt;&lt;br/&gt;Using a dynamic level is possible, too, so it gets harder in case we&amp;#39;re&lt;br/&gt;being spam attacked.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;&amp;gt; The high-level idea would be that the sender must solve a small PoW puzzle *for&lt;br/&gt;&amp;gt; each intermediate *&lt;br/&gt;&amp;gt; *node *and communicate the solution in the onion.&lt;br/&gt;&amp;gt; There are many ways we could do that (a new field in each intermediate hop,&lt;br/&gt;&amp;gt; grinding an HMAC&lt;br/&gt;&amp;gt; prefix, etc) so before going into specifics I only wanted to submit the&lt;br/&gt;&amp;gt; high-level idea.&lt;br/&gt;&amp;gt; What&amp;#39;s neat with this is that it&amp;#39;s simple, doesn&amp;#39;t leak any privacy, and&lt;br/&gt;&amp;gt; avoids having to create a&lt;br/&gt;&amp;gt; node reputation system.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We fight spam by forcing the sender to use some resources (instead of sats).&lt;br/&gt;&amp;gt; Maybe this idea has already been proposed and broken, if that&amp;#39;s the case&lt;br/&gt;&amp;gt; I&amp;#39;d love to see the&lt;br/&gt;&amp;gt; discussion if someone can surface it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le lun. 11 nov. 2019 à 00:32, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;&amp;gt; écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; On Fri, Nov 08, 2019 at 01:08:04PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; [ Snip summary, which is correct ]&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Huzzah!&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; This correlates all the hops in a payment when the route reaches its end&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; (due to the final preimage getting propogated back for everyone to&lt;br/&gt;&amp;gt;&amp;gt; justify&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; the funds they claim). Maybe solvable by converting from hashes to ECC&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; as the trapdoor function?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I hadn&amp;#39;t thought of this, but yes, once we&amp;#39;ve eliminated the trivial&lt;br/&gt;&amp;gt;&amp;gt; preimage correlation w/scriptless scripts it&amp;#39;d be a shame to reintroduce&lt;br/&gt;&amp;gt;&amp;gt; it here.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We need an accumulator with some strange properties though:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1. Alice provides tokens and a base accumulator.&lt;br/&gt;&amp;gt;&amp;gt; 2. Bob et. al can add these tokens to the accumulator.&lt;br/&gt;&amp;gt;&amp;gt; 3. They can tell if invalid tokens have been added to the accumulator.&lt;br/&gt;&amp;gt;&amp;gt; 4. They can tell how many tokens (alt: each token has a value and they&lt;br/&gt;&amp;gt;&amp;gt;    can tell the value sum) have been added.&lt;br/&gt;&amp;gt;&amp;gt; 5. They can&amp;#39;t tell what tokens have been added (unless they know all&lt;br/&gt;&amp;gt;&amp;gt;    the tokens, which is trivial).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Any ideas?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; The refund amount propogating back also reveals the path, probably.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Could that be obfusticated by somehow paying each intermediate node&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; both as the funds go out and come back, so the refund decreases on the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; way back?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Oh, can we make the amounts work like the onion, where it stays constant?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; So:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Alice wants to pay Dave via Bob, Carol. Bob gets 700 msat, Carol gets&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   400 msat, Dave gets 300 msat, and Alice gets 100 msat refunded.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Success:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Carol forwards 1500 msat to Dave  (-1500, 0, 0, &#43;1500)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Dave refunds 1200 msat to Carol   (-1500, 0, &#43;1200, &#43;300)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Carol refunds 800 msat to Bob     (-1500, &#43;800, &#43;400, &#43;300)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Bob refunds 100 msat to Alice     (-1400, &#43;700, &#43;400, &#43;300)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Or, on success, upfront payment is fully refunded or not refunded at all&lt;br/&gt;&amp;gt;&amp;gt; (since they get paid by normal fees)?  Either way, no data leak for that&lt;br/&gt;&amp;gt;&amp;gt; case.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Clean routing failure at Carol/Dave:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Carol says Dave&amp;#39;s not talking&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Carol refunds 1100 msat to Bob    (-1500, &#43;1100, &#43;400, 0)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     Bob refunds 400 msat to Alice     (-1100, &#43;700, &#43;400, 0)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I think that breaks the correlation pretty well, so you just need a&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; decent way of obscuring path length?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I don&amp;#39;t see how this breaks correlation?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; In the uncooperative routing failure case, I wonder if using an ECC&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; trapdoor and perhaps scriptless scripts, you could make it so Carol&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; doesn&amp;#39;t even get an updated state without revealing the preimage...&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;m not sure.  We can make it so Carol has Bob&amp;#39;s preimage(s), etc, so&lt;br/&gt;&amp;gt;&amp;gt; that the node which fails doesn&amp;#39;t get paid.  I initially thought this&lt;br/&gt;&amp;gt;&amp;gt; would just make people pair up (fake) nodes, but it&amp;#39;s probably not worth&lt;br/&gt;&amp;gt;&amp;gt; it since their path would be less-selected in that case.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&amp;gt; Rusty.&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;
    </content>
    <updated>2023-06-09T14:57:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst3x8pmj4na03zm9w4v9jmgw7qzl8x5ajeytken9vj3ah8zps5zpgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2le5fx5</id>
    
      <title type="html">📅 Original date posted:2019-11-10 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst3x8pmj4na03zm9w4v9jmgw7qzl8x5ajeytken9vj3ah8zps5zpgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2le5fx5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswqqcsg5c4rp0kv252zjpkeaaclgf0vtg4xl8yg6yxchys0etwgdg33ufnu&#39;&gt;nevent1q…ufnu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; On Fri, Nov 08, 2019 at 01:08:04PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; [ Snip summary, which is correct ]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Huzzah!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This correlates all the hops in a payment when the route reaches its end&lt;br/&gt;&amp;gt; (due to the final preimage getting propogated back for everyone to justify&lt;br/&gt;&amp;gt; the funds they claim). Maybe solvable by converting from hashes to ECC&lt;br/&gt;&amp;gt; as the trapdoor function?&lt;br/&gt;&lt;br/&gt;I hadn&amp;#39;t thought of this, but yes, once we&amp;#39;ve eliminated the trivial&lt;br/&gt;preimage correlation w/scriptless scripts it&amp;#39;d be a shame to reintroduce&lt;br/&gt;it here.&lt;br/&gt;&lt;br/&gt;We need an accumulator with some strange properties though:&lt;br/&gt;&lt;br/&gt;1. Alice provides tokens and a base accumulator.&lt;br/&gt;2. Bob et. al can add these tokens to the accumulator.&lt;br/&gt;3. They can tell if invalid tokens have been added to the accumulator.&lt;br/&gt;4. They can tell how many tokens (alt: each token has a value and they&lt;br/&gt;   can tell the value sum) have been added.&lt;br/&gt;5. They can&amp;#39;t tell what tokens have been added (unless they know all&lt;br/&gt;   the tokens, which is trivial).&lt;br/&gt;&lt;br/&gt;Any ideas?&lt;br/&gt;&lt;br/&gt;&amp;gt; The refund amount propogating back also reveals the path, probably.&lt;br/&gt;&amp;gt; Could that be obfusticated by somehow paying each intermediate node&lt;br/&gt;&amp;gt; both as the funds go out and come back, so the refund decreases on the&lt;br/&gt;&amp;gt; way back?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Oh, can we make the amounts work like the onion, where it stays constant?&lt;br/&gt;&amp;gt; So:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   Alice wants to pay Dave via Bob, Carol. Bob gets 700 msat, Carol gets&lt;br/&gt;&amp;gt;   400 msat, Dave gets 300 msat, and Alice gets 100 msat refunded.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   Success:&lt;br/&gt;&amp;gt;     Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;&amp;gt;     Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;&amp;gt;     Carol forwards 1500 msat to Dave  (-1500, 0, 0, &#43;1500)&lt;br/&gt;&amp;gt;     Dave refunds 1200 msat to Carol   (-1500, 0, &#43;1200, &#43;300)&lt;br/&gt;&amp;gt;     Carol refunds 800 msat to Bob     (-1500, &#43;800, &#43;400, &#43;300)&lt;br/&gt;&amp;gt;     Bob refunds 100 msat to Alice     (-1400, &#43;700, &#43;400, &#43;300)&lt;br/&gt;&lt;br/&gt;Or, on success, upfront payment is fully refunded or not refunded at all&lt;br/&gt;(since they get paid by normal fees)?  Either way, no data leak for that&lt;br/&gt;case.&lt;br/&gt;&lt;br/&gt;&amp;gt;   Clean routing failure at Carol/Dave:&lt;br/&gt;&amp;gt;     Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;&amp;gt;     Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;&amp;gt;     Carol says Dave&amp;#39;s not talking&lt;br/&gt;&amp;gt;     Carol refunds 1100 msat to Bob    (-1500, &#43;1100, &#43;400, 0)&lt;br/&gt;&amp;gt;     Bob refunds 400 msat to Alice     (-1100, &#43;700, &#43;400, 0)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think that breaks the correlation pretty well, so you just need a&lt;br/&gt;&amp;gt; decent way of obscuring path length?&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t see how this breaks correlation?&lt;br/&gt;&lt;br/&gt;&amp;gt; In the uncooperative routing failure case, I wonder if using an ECC&lt;br/&gt;&amp;gt; trapdoor and perhaps scriptless scripts, you could make it so Carol&lt;br/&gt;&amp;gt; doesn&amp;#39;t even get an updated state without revealing the preimage...&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure.  We can make it so Carol has Bob&amp;#39;s preimage(s), etc, so&lt;br/&gt;that the node which fails doesn&amp;#39;t get paid.  I initially thought this&lt;br/&gt;would just make people pair up (fake) nodes, but it&amp;#39;s probably not worth&lt;br/&gt;it since their path would be less-selected in that case.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstqjsr5r2w86q4eydurnt4w03ehr687cp43g4769ayvyknfgknhpszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25g6dcs</id>
    
      <title type="html">📅 Original date posted:2019-11-08 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstqjsr5r2w86q4eydurnt4w03ehr687cp43g4769ayvyknfgknhpszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25g6dcs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrjm0a5ghmdvjpv4w0uug5cj5ldq0ykjj4r30yefmwh7d3g9pd5eqygdeej&#39;&gt;nevent1q…deej&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; On Thu, Nov 07, 2019 at 02:56:51PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; What you wrote to Zmn says &amp;#34;Rusty decrypts the onion, reads the prepay&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; field: it says 14, LLLL.&amp;#34; but Alice doesn&amp;#39;t know anything other than&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; ZZZZ so can&amp;#39;t put LLLL in the onion?&lt;br/&gt;&amp;gt;&amp;gt; Alice created the onion.  Alice knows all the preimages, since she&lt;br/&gt;&amp;gt;&amp;gt; created the chain AAAAA....ZZZZZ.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In your reply to Zmn, it was Rusty (Bob) preparing the nonce and creating&lt;br/&gt;&amp;gt; the chain AAAA...ZZZZ -- so I was lost as to what you were proposing...&lt;br/&gt;&lt;br/&gt;Oops.  Don&amp;#39;t trust that Rusty guy, let&amp;#39;s stick with Alice.&lt;br/&gt;&lt;br/&gt;[ Snip summary, which is correct ]&lt;br/&gt;&lt;br/&gt;&amp;gt; As far as the &amp;#34;fair price&amp;#34; goes, the spitballed formula is &amp;#34;16 - X/4&amp;#34;&lt;br/&gt;&amp;gt; where X is number of zero bits in some PoW-y thing. The proposal is&lt;br/&gt;&amp;gt; the thing is SHA256(blockhash|revealedonion) which works, and (I think)&lt;br/&gt;&amp;gt; means each step is individually grindable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think an alternative would be to use the prepayment hashes themselves,&lt;br/&gt;&amp;gt; so you generate the nonce AAAA as the value you&amp;#39;ll send to Dave then&lt;br/&gt;&amp;gt; hash it repeatedly to get BBBB..QQQQ, then check if pow(AAAA,BBBB) has&lt;br/&gt;&amp;gt; 60 leading zero bits or pow(AAAA,CCCC) has 56 leading zero bits etc.&lt;br/&gt;&amp;gt; If you made pow(a,b) be SHA256(a,b,shared-onion-key) I think it&amp;#39;d&lt;br/&gt;&amp;gt; preserve privacy, but also mean you can&amp;#39;t meaningfully grind unfairly&lt;br/&gt;&amp;gt; cheap routing except for very short paths?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you don&amp;#39;t grind and just go by luck, the average number of hashes&lt;br/&gt;&amp;gt; per hop is ~15.93 (if I got my maths right), so you should be able to&lt;br/&gt;&amp;gt; estimate path length pretty accurate by dividing claimed prepaid funds by&lt;br/&gt;&amp;gt; 15.93*25msat or whatever. If everyone grinds at each level independently,&lt;br/&gt;&amp;gt; I think you&amp;#39;d just subtract maybe 6 hops from that, but the maths would&lt;br/&gt;&amp;gt; mostly stay the same?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Though I think you could obfusticate that pretty well by moving&lt;br/&gt;&amp;gt; some of the value from the HTLC into the prepayment -- you&amp;#39;d risk losing&lt;br/&gt;&amp;gt; that extra value if the payment made it all the way to the recipient but&lt;br/&gt;&amp;gt; they declined the HTLC that way though.&lt;br/&gt;&lt;br/&gt;Yeah, and doesn&amp;#39;t help obscure in the in-the-middle failure case unf.&lt;br/&gt;Which is really bad with current payment_hash since you can spot&lt;br/&gt;multiple attempts so easily.  Hence my attempt to roll in some PoW to&lt;br/&gt;obscure the amounts.&lt;br/&gt;&lt;br/&gt;The ideal prepay range would be wider, so you can believably have&lt;br/&gt;payments between 16 and 4 per hop, say.  But if I can grind it I&amp;#39;ll&lt;br/&gt;naturally restrict the range to the lower end, and if it&amp;#39;s ungrindable&lt;br/&gt;(eg. based on nodeid and payment_hash or recent block hash) then&lt;br/&gt;everyone on the path knows what it so too.&lt;br/&gt;&lt;br/&gt;So, hashcash here is better than nothing, but still not very good.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Does Alice lose everything on any routing failure?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; That was my thought yeah; it seems weird to pay upfront but expect a&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; refund on failure -- the HTLC funds are already committed upfront and&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; refunded on failure.&lt;br/&gt;&amp;gt;&amp;gt; AFAICT you have to overpay, since anything else is very revealing of&lt;br/&gt;&amp;gt;&amp;gt; path length.  Which kind of implies a refund, I think.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I guess you&amp;#39;d want to pay for a path length of about 20 whether the&lt;br/&gt;&amp;gt; path is actually 17, 2, 10 or 5. But a path length of 20 is just paying&lt;br/&gt;&amp;gt; for bandwidth for maybe 200kB of total traffic which at $1/GB is 2% of&lt;br/&gt;&amp;gt; 1 cent, which doesn&amp;#39;t seem that worth refunding (except for really tiny&lt;br/&gt;&amp;gt; micropayments, where paying for payment bandwidth might not be feasible&lt;br/&gt;&amp;gt; at all).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you&amp;#39;re buying a $2 coffee and paying 500ppm in regular fees per hop&lt;br/&gt;&amp;gt; with 5 hops, then each routing attempt increases your fees by 4%, which&lt;br/&gt;&amp;gt; seems pretty easy to ignore to me.&lt;br/&gt;&lt;br/&gt;True, but ideally we&amp;#39;d have lots of noise even if people are trying to&lt;br/&gt;minimize fees (which, if they&amp;#39;re sending messages rather than payments,&lt;br/&gt;they might).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstprgtrrha0t3wk6g8c6demtgjx4dg8mmeq2n3mwe6fcsuvjwwjjczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2hknnd4</id>
    
      <title type="html">📅 Original date posted:2019-11-07 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstprgtrrha0t3wk6g8c6demtgjx4dg8mmeq2n3mwe6fcsuvjwwjjczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2hknnd4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswlaxer34xu34edds7tdvehdwwrxdwtw70z0q4xquufwruc6jkl7qw0e3mu&#39;&gt;nevent1q…e3mu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; On Wed, Nov 06, 2019 at 10:43:23AM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Rusty prepares a nonce, AAAAA and hashes it 25 times = ZZZZZ.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ZmnSCPxj prepares the onion, but adds extra fields (see below).  &lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; It would have made more sense to me for Alice (Zmn) to generate&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; the nonce, hash it, and prepare the onion, so that the nonce is&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; revealed to Dave (Rusty) if/when the message ever actually reaches its&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; destination. Otherwise Rusty has to send AAAAA to Zmn already so that&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Zmn can prepare the onion?&lt;br/&gt;&amp;gt;&amp;gt; The entire point is to pay *up-front*, though, to prevent spam.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hmm, I&amp;#39;m not sure I see the point of paying upfront but not&lt;br/&gt;&amp;gt; unconditionally -- you already commit the funds as part of the HTLC,&lt;br/&gt;&amp;gt; and if you&amp;#39;re refunding some of them, you kind-of have to keep them&lt;br/&gt;&amp;gt; reserved or you risk finalising the HTLC causing a failure because you&lt;br/&gt;&amp;gt; don&amp;#39;t have enough msats spare to do the refund?&lt;br/&gt;&lt;br/&gt;?  These are upfront an unconditional.  I&amp;#39;m confused.  You pay per&lt;br/&gt;HTLC added (or, in future, to send a message).&lt;br/&gt;&lt;br/&gt;What part was unclear here?&lt;br/&gt;&lt;br/&gt;Alice pays X to Bob.  Bob gives X-&amp;lt;num-preimages&amp;gt; back to Alice.  Bob&lt;br/&gt;gets preimages from the onion, and from Carol etc.&lt;br/&gt;&lt;br/&gt;This happens independent of HTLC success or failure.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Bob/ZmnSCPxj doesn&amp;#39;t prepare anything in the onion.  They get handed the&lt;br/&gt;&amp;gt;&amp;gt; last hash directly: Alice is saying &amp;#34;I&amp;#39;ll pay you 50msat for each&lt;br/&gt;&amp;gt;&amp;gt; preimage you can give me leading to this hash&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So my example was Alice paying Dave via Bob and Carol (so Alice/Bob,&lt;br/&gt;&amp;gt; Bob/Carol, Carol/Dave being the individual channels).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What you wrote to Zmn says &amp;#34;Rusty decrypts the onion, reads the prepay&lt;br/&gt;&amp;gt; field: it says 14, LLLL.&amp;#34; but Alice doesn&amp;#39;t know anything other than&lt;br/&gt;&amp;gt; ZZZZ so can&amp;#39;t put LLLL in the onion?&lt;br/&gt;&lt;br/&gt;Alice created the onion.  Alice knows all the preimages, since she&lt;br/&gt;created the chain AAAAA....ZZZZZ.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I&amp;#39;m not sure why lucky hashing should result in a discount?&lt;br/&gt;&amp;gt;&amp;gt; Because the PoW adds noise to the amounts, otherwise the path length is&lt;br/&gt;&amp;gt;&amp;gt; trivially exposed, esp in the failure case.  It&amp;#39;s weak protection&lt;br/&gt;&amp;gt;&amp;gt; though.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With a linear/exponential relationship you just get &amp;#34;half the time it&amp;#39;s&lt;br/&gt;&amp;gt; 1 unit, 25% of the time it&amp;#39;s 2 units, 12% of the time it&amp;#39;s 3 units&amp;#34;, so&lt;br/&gt;&amp;gt; I don&amp;#39;t think that&amp;#39;s adding much noise?&lt;br/&gt;&lt;br/&gt;It depends how much people are prepared to grind, doesn&amp;#39;t it?&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; You&amp;#39;ve only got two nonce choices -- the initial AAAA and the depth&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; that you tell Bob and Carol to hash to as steps in the route;&lt;br/&gt;&amp;gt;&amp;gt; No, the sphinx construction allows for grinding, that was my intent&lt;br/&gt;&amp;gt;&amp;gt; here.  The prepay hashes are independent.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Oh, because you&amp;#39;re also xoring with the onion packet, right, I see.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I think you could just make the scheme be:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Alice sends HTLC(k,v) &#43; 1250 msat to Bob&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Bob unwraps the onion and forwards HTLC(k,v) &#43; 500 msat to Carol&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Carol unwraps the onion and forwards HTLC(k,v) &#43; 250 msat to Dave&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Dave redeems the HTLC, claims an extra 300 msat and refunds 200 msat to Carol&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The math here doesn&amp;#39;t add up. Let&amp;#39;s assume I meant:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   Bob keeps 500 sat, forwards 750 sat&lt;br/&gt;&amp;gt;   Carol keeps 250 sat, forwards 500 sat&lt;br/&gt;&amp;gt;   Dave keeps 300 sat, refunds 200 sat&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Carol redeems the HTLC and refunds 200 msat to Bob&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;   Bob redeems the HTLC and refunds 200 msat to Alice&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; If there&amp;#39;s a failure, Alice loses the 1250 msat, and someone in the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; path steals the funds.&lt;br/&gt;&amp;gt;&amp;gt; This example confuses me.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Well, that makes us even at least? :)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; So, you&amp;#39;re charging 250msat per hop?  Why is Bob taking 750?  Does Carol&lt;br/&gt;&amp;gt;&amp;gt; now know Dave is the last hop?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; No, Alice is choosing to pay 500, 250 and 300 msat to Bob, Carol and&lt;br/&gt;&amp;gt; Dave respectively, as part of setting up the onion, and picks those&lt;br/&gt;&amp;gt; numbers via some magic algo trading off privacy and cost.&lt;br/&gt;&lt;br/&gt;OK.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Does Alice lose everything on any routing failure?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That was my thought yeah; it seems weird to pay upfront but expect a&lt;br/&gt;&amp;gt; refund on failure -- the HTLC funds are already committed upfront and&lt;br/&gt;&amp;gt; refunded on failure.&lt;br/&gt;&lt;br/&gt;AFAICT you have to overpay, since anything else is very revealing of&lt;br/&gt;path length.  Which kind of implies a refund, I think.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; If so, that is strong incentive for Alice to reduce path-length privacy&lt;br/&gt;&amp;gt;&amp;gt; by keeping payments minimal, which I was really trying to avoid.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Assuming v is much larger than 1250msat, and 1250 msat is much lower than&lt;br/&gt;&amp;gt; the cost to Bob of losing the channel with Alice, I don&amp;#39;t think that&amp;#39;s&lt;br/&gt;&amp;gt; a problem. 1250msat pays for 125kB of bandwdith under your assumptions&lt;br/&gt;&amp;gt; I think?&lt;br/&gt;&lt;br/&gt;That&amp;#39;s irrelevant?  Since retries are common, it&amp;#39;s natural for Alice to&lt;br/&gt;want to minimize losses.  If she&amp;#39;s going to lose everything on any&lt;br/&gt;failure, she&amp;#39;ll pay the minimum amount, which exposes her path length&lt;br/&gt;trivially.&lt;br/&gt;&lt;br/&gt;Thus my attempt to try to reduce the lossage. I think.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Does that miss anything that all the hashing achieves?&lt;br/&gt;&amp;gt;&amp;gt; It does nothing if Carol is the one who can&amp;#39;t route.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If Carol can&amp;#39;t route, then ideally she just refunds all the money and&lt;br/&gt;&amp;gt; everyone&amp;#39;s happy.&lt;br/&gt;&lt;br/&gt;That tells Bob clearly that Carol failed.  If Carol claims a variable&lt;br/&gt;amount, it&amp;#39;s less obvious (though still pretty bad).&lt;br/&gt;&lt;br/&gt;&amp;gt; If Carol tries to steal, then she can keep 750 msat instead of 250 msat.&lt;br/&gt;&amp;gt; This doesn&amp;#39;t give any way for Bob to prove Carol cheated on him though;&lt;br/&gt;&amp;gt; but Bob could just refund the 1250 msat and write the 750 msat off as a&lt;br/&gt;&amp;gt; loss of dealing with cheaters like Carol.&lt;br/&gt;&lt;br/&gt;What actually happens is that Carol sends a signature on a commitment&lt;br/&gt;which Bob does&amp;#39;t agree with (since he expected his money back).  They go&lt;br/&gt;onchain.&lt;br/&gt;&lt;br/&gt;Now Bob is out the total he fwd to Carol, but he&amp;#39;s probably more annoyed&lt;br/&gt;at losing the channel.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdp5hpse9epnvsxecwrnusdmc5nfnwsw8spcl8raeamqq8x4f7vxszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2a5ssge</id>
    
      <title type="html">📅 Original date posted:2019-11-05 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdp5hpse9epnvsxecwrnusdmc5nfnwsw8spcl8raeamqq8x4f7vxszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2a5ssge" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgvkn7slsc6jkmmjrks0vh8cu2qru9j3fat83kefxul5sg85ul4jqgssqv4&#39;&gt;nevent1q…sqv4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; On Tue, Nov 05, 2019 at 07:56:45PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt; Sure: for simplicity I&amp;#39;m sending a 0-value HTLC.&lt;br/&gt;&amp;gt;&amp;gt; ZmnSCPxj has balance 10000msat in channel with Rusty, who has 1000msat&lt;br/&gt;&amp;gt;&amp;gt; in the channel with YAIjbOJa.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice, Bob and Carol sure seem simpler than Zmn YAI and Rusty...&lt;br/&gt;&lt;br/&gt;Agreed, I should not have directly answered the q.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Rusty prepares a nonce, AAAAA and hashes it 25 times = ZZZZZ.&lt;br/&gt;&amp;gt;&amp;gt; ZmnSCPxj prepares the onion, but adds extra fields (see below).  &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It would have made more sense to me for Alice (Zmn) to generate&lt;br/&gt;&amp;gt; the nonce, hash it, and prepare the onion, so that the nonce is&lt;br/&gt;&amp;gt; revealed to Dave (Rusty) if/when the message ever actually reaches its&lt;br/&gt;&amp;gt; destination. Otherwise Rusty has to send AAAAA to Zmn already so that&lt;br/&gt;&amp;gt; Zmn can prepare the onion?&lt;br/&gt;&lt;br/&gt;The entire point is to pay *up-front*, though, to prevent spam.&lt;br/&gt;&lt;br/&gt;Bob/ZmnSCPxj doesn&amp;#39;t prepare anything in the onion.  They get handed the&lt;br/&gt;last hash directly: Alice is saying &amp;#34;I&amp;#39;ll pay you 50msat for each&lt;br/&gt;preimage you can give me leading to this hash&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; He then&lt;br/&gt;&amp;gt;&amp;gt; sends the HTLC to Rusty, but also sends ZZZZZ, and 25x50 msat (ie. those&lt;br/&gt;&amp;gt;&amp;gt; fields are in the update_add_htlc msg).  His balance with Rusty is now&lt;br/&gt;&amp;gt;&amp;gt; 8750msat (ie. 25x50 to Rusty).&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Rusty decrypts the onion, reads the prepay field: it says 14, LLLLL.&lt;br/&gt;&amp;gt;&amp;gt; Rusty checks: the hash of the onion &amp;amp; block (or something) does indeed&lt;br/&gt;&amp;gt;&amp;gt; have the top 8 bits clear, so the cost is in fact 16 - 8/2 == 14.  He&lt;br/&gt;&amp;gt;&amp;gt; then hashes LLLLL 14 times, and yes, it&amp;#39;s ZZZZZ as ZmnSCPxj said it&lt;br/&gt;&amp;gt;&amp;gt; should be.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure why lucky hashing should result in a discount?&lt;br/&gt;&lt;br/&gt;Because the PoW adds noise to the amounts, otherwise the path length is&lt;br/&gt;trivially exposed, esp in the failure case.  It&amp;#39;s weak protection&lt;br/&gt;though.&lt;br/&gt;&lt;br/&gt;&amp;gt; You&amp;#39;re giving a linear discount for exponentially more luck in hashing&lt;br/&gt;&amp;gt; which also seems odd.&lt;br/&gt;&lt;br/&gt;Because you really want some actual payment, not just PoW.  Botnets are&lt;br/&gt;really good at PoW, less good at sending msats.  And the PoW is hard to&lt;br/&gt;calibrate (I guessed: real numbers will be necessary)/&lt;br/&gt;&lt;br/&gt;&amp;gt; You&amp;#39;ve only got two nonce choices -- the initial AAAA and the depth&lt;br/&gt;&amp;gt; that you tell Bob and Carol to hash to as steps in the route;&lt;br/&gt;&lt;br/&gt;No, the sphinx construction allows for grinding, that was my intent&lt;br/&gt;here.  The prepay hashes are independent.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think you could just make the scheme be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   Alice sends HTLC(k,v) &#43; 1250 msat to Bob&lt;br/&gt;&amp;gt;   Bob unwraps the onion and forwards HTLC(k,v) &#43; 500 msat to Carol&lt;br/&gt;&amp;gt;   Carol unwraps the onion and forwards HTLC(k,v) &#43; 250 msat to Dave&lt;br/&gt;&amp;gt;   Dave redeems the HTLC, claims an extra 300 msat and refunds 200 msat to Carol&lt;br/&gt;&amp;gt;   Carol redeems the HTLC and refunds 200 msat to Bob&lt;br/&gt;&amp;gt;   Bob redeems the HTLC and refunds 200 msat to Alice&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If there&amp;#39;s a failure, Alice loses the 1250 msat, and someone in the&lt;br/&gt;&amp;gt; path steals the funds.&lt;br/&gt;&lt;br/&gt;This example confuses me.&lt;br/&gt;&lt;br/&gt;So, you&amp;#39;re charging 250msat per hop?  Why is Bob taking 750?  Does Carol&lt;br/&gt;now know Dave is the last hop?&lt;br/&gt;&lt;br/&gt;Does Alice lose everything on any routing failure?&lt;br/&gt;&lt;br/&gt;If so, that is strong incentive for Alice to reduce path-length privacy&lt;br/&gt;by keeping payments minimal, which I was really trying to avoid.&lt;br/&gt;&lt;br/&gt;&amp;gt; You could make the accountable by having Alice&lt;br/&gt;&amp;gt; also provide &amp;#34;Hash(AAAA, refund=200)&amp;#34; to everyone, encoding AAAA in the&lt;br/&gt;&amp;gt; onion to Dave, and then each hop reveals AAAA and refunds 200msat to&lt;br/&gt;&amp;gt; demonstrate their honesty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Does that miss anything that all the hashing achieves?&lt;br/&gt;&lt;br/&gt;It does nothing if Carol is the one who can&amp;#39;t route.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think the idea here is that you&amp;#39;re paying tiny amounts for the&lt;br/&gt;&amp;gt; bandwidth, which when it&amp;#39;s successful does in fact pay for the bandwidth;&lt;br/&gt;&amp;gt; and when it&amp;#39;s unsuccessful results in a channel closure, which makes it&lt;br/&gt;&amp;gt; unprofitable to cheat the system, but doesn&amp;#39;t change the economics of&lt;br/&gt;&amp;gt; lightning much overall because channel closures can happen anytime anyway.&lt;br/&gt;&lt;br/&gt;Not at all.  You can still fail to route, and still get paid.  You can&amp;#39;t&lt;br/&gt;steal *more* money without channel closure though.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think that approach makes sense.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; aj&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:57:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdh9z8wl0tajfyw2frk06qmw3zuy57rgtpmqtmar2geaqsjsf3vmgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2rnfyh9</id>
    
      <title type="html">📅 Original date posted:2019-11-05 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdh9z8wl0tajfyw2frk06qmw3zuy57rgtpmqtmar2geaqsjsf3vmgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2rnfyh9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs066yzul2ja00kz3xu7n5yh808e9gf8vgkju5tqdve0l8x45vahcq5qz8um&#39;&gt;nevent1q…z8um&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-05&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Good morning Rusty,&lt;br/&gt;&lt;br/&gt;Hi ZmnSCPxj!&lt;br/&gt;&lt;br/&gt;&amp;gt; Is this intended to be enforceable onchain if a channel is dropped onchain while a message is being routed?&lt;br/&gt;&amp;gt; By a vague sense of the description, it seems to me, it would require a complicated SCRIPT (or multiple tiny 50-msatoshi UTXOs) to enforce onchain.&lt;br/&gt;&lt;br/&gt;No, it&amp;#39;s done as a simple subtraction from direct to-local and to-remote&lt;br/&gt;payments.  Enforcement is by peer closing the channel, which you&lt;br/&gt;wouldn&amp;#39;t do over a few msat.&lt;br/&gt;&lt;br/&gt;&amp;gt; Also, it is not exactly clear to me, the mechanism you are proposing in detail.&lt;br/&gt;&amp;gt; Can you give a motivating example, for example in a route from&lt;br/&gt;&amp;gt; ZmnSCPxj, through Rusty, to my imaginary friend YAIjbOJa (who is not&lt;br/&gt;&amp;gt; in fact me)?&lt;br/&gt;&lt;br/&gt;Sure: for simplicity I&amp;#39;m sending a 0-value HTLC.&lt;br/&gt;&lt;br/&gt;ZmnSCPxj has balance 10000msat in channel with Rusty, who has 1000msat&lt;br/&gt;in the channel with YAIjbOJa.&lt;br/&gt;&lt;br/&gt;Rusty prepares a nonce, AAAAA and hashes it 25 times = ZZZZZ.&lt;br/&gt;&lt;br/&gt;ZmnSCPxj prepares the onion, but adds extra fields (see below).  He then&lt;br/&gt;sends the HTLC to Rusty, but also sends ZZZZZ, and 25x50 msat (ie. those&lt;br/&gt;fields are in the update_add_htlc msg).  His balance with Rusty is now&lt;br/&gt;8750msat (ie. 25x50 to Rusty).&lt;br/&gt;&lt;br/&gt;Rusty decrypts the onion, reads the prepay field: it says 14, LLLLL.&lt;br/&gt;Rusty checks: the hash of the onion &amp;amp; block (or something) does indeed&lt;br/&gt;have the top 8 bits clear, so the cost is in fact 16 - 8/2 == 14.  He&lt;br/&gt;then hashes LLLLL 14 times, and yes, it&amp;#39;s ZZZZZ as ZmnSCPxj said it&lt;br/&gt;should be.&lt;br/&gt;&lt;br/&gt;So Rusty takes the 14x50 as prepayment, and forwards the HTLC as&lt;br/&gt;normal to YAIjbOJa, along with LLLLL and 11x50msat.  His balance with&lt;br/&gt;YAIjbOJa is now 450msat.&lt;br/&gt;&lt;br/&gt;YAIjbOJa decrypts the onion.  And it says 10,BBBBB.  YAIjbOJa checks&lt;br/&gt;that hashing BBBBB 10 times does indeed give LLLLL.  Now it takes the&lt;br/&gt;11x50 msat, and fulfils the HTLC.  It replies to Rusty with 10,BBBBB&lt;br/&gt;in the update_fulfill_htlc message, returning the (implicit) 1x50msat;&lt;br/&gt;Rusty&amp;#39;s balance with YAIjbOJa is now 500msat.&lt;br/&gt;&lt;br/&gt;Rusty checks that BBBBB hashed 10 times gives LLLLL.  Now it returns&lt;br/&gt;24,BBBBB to ZmnSCPxj with the update_fulfill_htlc, demonstrating to&lt;br/&gt;ZmnSCPxj that he&amp;#39;s entitled to it, and (implicity) returning 1x50msat to&lt;br/&gt;ZmnSCPxj, so their balance is now 8800msat.&lt;br/&gt;&lt;br/&gt;Now let&amp;#39;s look at attacks:&lt;br/&gt;&lt;br/&gt;1. Rusty steals the funds and doesn&amp;#39;t return them.  ZmnSCPxj closes&lt;br/&gt;   channel, having lost 26x50msat.&lt;br/&gt;&lt;br/&gt;2, YAIjbOJa steals the funds and doesn&amp;#39;t return them.  Rusty closes&lt;br/&gt;   the channel, having lost 11x50msat.&lt;br/&gt;&lt;br/&gt;3. ZmnSCPxj doesn&amp;#39;t put correct preimages in, or too few, or other&lt;br/&gt;   malformation.  If it&amp;#39;s Rusty&amp;#39;s onion, he won&amp;#39;t forward it and will&lt;br/&gt;   give an error.  If it&amp;#39;s YAIjbOJa who rejects it, Rusty returns all&lt;br/&gt;   but the 14x50msat he has preimages for.&lt;br/&gt;&lt;br/&gt;Obviously Rusty needs some upper limit on how much he&amp;#39;ll pay out, to&lt;br/&gt;avoid infinite exposure (say limit the total exposure to 10,000 sats).&lt;br/&gt;&lt;br/&gt;A reasonable limit for each HTLC would be 20 hops x 16 x 50msat ==&lt;br/&gt;16sat.  Even with no other limits, with 486 HTLCs in flight each way,&lt;br/&gt;that&amp;#39;s only 15456 satoshis.  You&amp;#39;ll probably lament the channel closure&lt;br/&gt;more.&lt;br/&gt;&lt;br/&gt;Hope that helps!&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It&amp;#39;s been widely known that we&amp;#39;re going to have to have up-front&lt;br/&gt;&amp;gt;&amp;gt; payments for msgs eventually, to avoid Type 2 spam (I think of Type 1&lt;br/&gt;&amp;gt;&amp;gt; link-local, Type 2 though multiple nodes, and Type 3 liquidity-using&lt;br/&gt;&amp;gt;&amp;gt; spam).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Since both Offers and Joost&amp;#39;s WhatSat are looking at sending&lt;br/&gt;&amp;gt;&amp;gt; messages, it&amp;#39;s time to float actual proposals. I&amp;#39;ve been trying to come&lt;br/&gt;&amp;gt;&amp;gt; up with something for several years now, so thought I&amp;#39;d present the best&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;ve got in the hope that others can improve on it.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1.  New feature bit, extended messages, etc.&lt;br/&gt;&amp;gt;&amp;gt; 2.  Adding an HTLC causes a push of a number of msat on&lt;br/&gt;&amp;gt;&amp;gt;     commitment_signed (new field), and a hash.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 3.  Failing/succeeding an HTLC returns some of those msat, and a count&lt;br/&gt;&amp;gt;&amp;gt;     and preimage (new fields).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     How many msat can you take for forwarding? That depends on you&lt;br/&gt;&amp;gt;&amp;gt;     presenting a series of preimages (which chain into a final hash given in&lt;br/&gt;&amp;gt;&amp;gt;     the HTLC add), which you get by decoding the onion. You get to keep 50&lt;br/&gt;&amp;gt;&amp;gt;     msat[1] per preimage you present[2].&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     So, how many preimages does the user have to give to have you forward&lt;br/&gt;&amp;gt;&amp;gt;     the payment? That depends. The base rate is 16 preimages, but subtract&lt;br/&gt;&amp;gt;&amp;gt;     one for each leading 4 zero bits of the SHA256(blockhash | hmac) of the&lt;br/&gt;&amp;gt;&amp;gt;     onion. The blockhash is the hash of the block specified in the onion:&lt;br/&gt;&amp;gt;&amp;gt;     reject if it&amp;#39;s not in the last 3 blocks[3].&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     This simply adds some payment noise, while allowing a hashcash style&lt;br/&gt;&amp;gt;&amp;gt;     tradeoff of sats for work.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     The final node gets some variable number of preimages, which adds noise.&lt;br/&gt;&amp;gt;&amp;gt;     It should take all and subtract from the minimum required invoice amount&lt;br/&gt;&amp;gt;&amp;gt;     on success, or take some random number on failure.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     This leaks some forward information, and makes an explicit tradeoff for&lt;br/&gt;&amp;gt;&amp;gt;     the sender between amount spent and privacy, but it&amp;#39;s the best I&amp;#39;ve been&lt;br/&gt;&amp;gt;&amp;gt;     able to come up with.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     Thoughts?&lt;br/&gt;&amp;gt;&amp;gt;     Rusty.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     [1] If we assume $1 per GB, $10k per BTC and 64k messages, we get about&lt;br/&gt;&amp;gt;&amp;gt;     655msat per message. Flat pricing for simplicity; we&amp;#39;re trying to&lt;br/&gt;&amp;gt;&amp;gt;     prevent spam, not create a spam market.&lt;br/&gt;&amp;gt;&amp;gt;     [2] Actually, a number and a single preimage; you can check this is&lt;br/&gt;&amp;gt;&amp;gt;     indeed the n&amp;#39;th preimage.&lt;br/&gt;&amp;gt;&amp;gt;     [3] This reduces incentive to grind the damn things in advance, though&lt;br/&gt;&amp;gt;&amp;gt;     maybe that&amp;#39;s dumb? We can also use a shorter hash (siphash?), or&lt;br/&gt;&amp;gt;&amp;gt;     even truncated SHA256 (128 bits).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;
    </content>
    <updated>2023-06-09T14:57:04&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvztjz732uldz6spzu6mztcj9sgfcrzhc4veh8e56wms6jt9rcw5gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2dfvrk9</id>
    
      <title type="html">📅 Original date posted:2019-11-05 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvztjz732uldz6spzu6mztcj9sgfcrzhc4veh8e56wms6jt9rcw5gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2dfvrk9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqey0zrcp52vl3yt55kr7nqvt9ft5s25fwy7sjvtny46x8jga8dwqdhf4xp&#39;&gt;nevent1q…f4xp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;        It&amp;#39;s been widely known that we&amp;#39;re going to have to have up-front&lt;br/&gt;payments for msgs eventually, to avoid Type 2 spam (I think of Type 1&lt;br/&gt;link-local, Type 2 though multiple nodes, and Type 3 liquidity-using&lt;br/&gt;spam).&lt;br/&gt;&lt;br/&gt;        Since both Offers and Joost&amp;#39;s WhatSat are looking at sending&lt;br/&gt;messages, it&amp;#39;s time to float actual proposals.  I&amp;#39;ve been trying to come&lt;br/&gt;up with something for several years now, so thought I&amp;#39;d present the best&lt;br/&gt;I&amp;#39;ve got in the hope that others can improve on it.&lt;br/&gt;&lt;br/&gt;1. New feature bit, extended messages, etc.&lt;br/&gt;2. Adding an HTLC causes a *push* of a number of msat on&lt;br/&gt;   commitment_signed (new field), and a hash.&lt;br/&gt;3. Failing/succeeding an HTLC returns some of those msat, and a count&lt;br/&gt;   and preimage (new fields).&lt;br/&gt;&lt;br/&gt;How many msat can you take for forwarding?  That depends on you&lt;br/&gt;presenting a series of preimages (which chain into a final hash given in&lt;br/&gt;the HTLC add), which you get by decoding the onion.  You get to keep 50&lt;br/&gt;msat[1] per preimage you present[2].&lt;br/&gt;&lt;br/&gt;So, how many preimages does the user have to give to have you forward&lt;br/&gt;the payment?  That depends.  The base rate is 16 preimages, but subtract&lt;br/&gt;one for each leading 4 zero bits of the SHA256(blockhash | hmac) of the&lt;br/&gt;onion.  The blockhash is the hash of the block specified in the onion:&lt;br/&gt;reject if it&amp;#39;s not in the last 3 blocks[3].&lt;br/&gt;&lt;br/&gt;This simply adds some payment noise, while allowing a hashcash style&lt;br/&gt;tradeoff of sats for work.&lt;br/&gt;&lt;br/&gt;The final node gets some variable number of preimages, which adds noise.&lt;br/&gt;It should take all and subtract from the minimum required invoice amount&lt;br/&gt;on success, or take some random number on failure.&lt;br/&gt;&lt;br/&gt;This leaks some forward information, and makes an explicit tradeoff for&lt;br/&gt;the sender between amount spent and privacy, but it&amp;#39;s the best I&amp;#39;ve been&lt;br/&gt;able to come up with.&lt;br/&gt;&lt;br/&gt;Thoughts?&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] If we assume $1 per GB, $10k per BTC and 64k messages, we get about&lt;br/&gt;    655msat per message.  Flat pricing for simplicity; we&amp;#39;re trying to&lt;br/&gt;    prevent spam, not create a spam market.&lt;br/&gt;[2] Actually, a number and a single preimage; you can check this is&lt;br/&gt;    indeed the n&amp;#39;th preimage.&lt;br/&gt;[3] This reduces incentive to grind the damn things in advance, though&lt;br/&gt;    maybe that&amp;#39;s dumb?  We can also use a shorter hash (siphash?), or&lt;br/&gt;    even truncated SHA256 (128 bits).
    </content>
    <updated>2023-06-09T14:57:04&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxjuag6puvlaukk20lzfsvcjznk320lm6rn574jaznmhv9x04u7rszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2np6hld</id>
    
      <title type="html">📅 Original date posted:2019-03-20 📝 Original message: Sorry ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxjuag6puvlaukk20lzfsvcjznk320lm6rn574jaznmhv9x04u7rszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2np6hld" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd7a8srwxzc94u9dkn4lcxxf8ngpfjktk7q52kvx5mtd3cn6dh8sqcf2t4d&#39;&gt;nevent1q…2t4d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Sorry AJ, my prior email was not constructive :(&lt;br/&gt;&lt;br/&gt;I consider the &amp;#34;my software reused my keys&amp;#34; the most reasonable attack&lt;br/&gt;scenario, though still small compared to other lightning attack surfaces.&lt;br/&gt;&lt;br/&gt;But I understand the general wariness of third-parties reusing&lt;br/&gt;SIGHASH_NOINPUT signatures.&lt;br/&gt;&lt;br/&gt;Since &amp;#34;must have a non-SIGHASH_NOINPUT&amp;#34; rule addresses the first reuse&lt;br/&gt;scenario (as well as the second), I&amp;#39;d be content with that proposal.&lt;br/&gt;Future segwit versions may choose to relax it.[1]&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;[1] Must be consensus, not standardness; my prev suggestion was bogus.&lt;br/&gt;&lt;br/&gt;Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; If you publish to the blockchain:&lt;br/&gt;&amp;gt; ...&lt;br/&gt;&amp;gt;&amp;gt; 4 can be dropped, state 5 and finish can be altered). Since the CSV delay&lt;br/&gt;&amp;gt;&amp;gt; is chosen by the participants, the above is still a possible scenario&lt;br/&gt;&amp;gt;&amp;gt; in eltoo, though, and it means there&amp;#39;s some risk for someone accepting&lt;br/&gt;&amp;gt;&amp;gt; bitcoins that result from a non-cooperative close of an eltoo channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; AJ, this was a meandering random walk which shed very little light.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t find the differentiation between malicious and non-malicious&lt;br/&gt;&amp;gt; double-spends convincing.  Even if you trust A, you already have to&lt;br/&gt;&amp;gt; worry about person-who-sent-the-coins-to-A.  This expands that set to be&lt;br/&gt;&amp;gt; &amp;#34;miner who mined coins sent-to-A&amp;#34;, but it&amp;#39;s very hard to see what&lt;br/&gt;&amp;gt; difference that makes to how you&amp;#39;d handle coins from A.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Beyond that, I think NOINPUT has two fundamental ways to cause problems&lt;br/&gt;&amp;gt;&amp;gt; for the people doing NOINPUT sigs:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;  1) your signature gets applied to a unexpectedly different&lt;br/&gt;&amp;gt;&amp;gt;     script, perhaps making it look like you&amp;#39;ve being dealing&lt;br/&gt;&amp;gt;&amp;gt;     with some blacklisted entity. OP_MASK and similar solves&lt;br/&gt;&amp;gt;&amp;gt;     this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ... followed by two paragraphs describing how it&amp;#39;s not a &amp;#34;fundamental&lt;br/&gt;&amp;gt; way to cause problems&amp;#34; that you (or I) can see.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; For the second case, that seems a little more concerning. The nightmare&lt;br/&gt;&amp;gt;&amp;gt; scenario is maybe something like:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;  * naive users do silly things with NOINPUT signatures, and end up&lt;br/&gt;&amp;gt;&amp;gt;    losing funds due to replays like the above&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As we&amp;#39;ve never seen with SIGHASH_NONE?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;  * initial source of funds was some major exchange, who decide it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;    cheaper to refund the lost funds than deal with the customer complaints&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;  * the lost funds end up costing enough that major exchanges just outright&lt;br/&gt;&amp;gt;&amp;gt;    ban sending funds to any address capable of NOINPUT, which also bans&lt;br/&gt;&amp;gt;&amp;gt;    all taproot/schnorr addresses&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t find this remotely credible.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; FWIW, I don&amp;#39;t have a strong opinion here yet, but:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;  - I&amp;#39;m still inclined to err on the side of putting more safety&lt;br/&gt;&amp;gt;&amp;gt;    measures in for NOINPUT, rather than fewer&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In theory, sure.  But not feel-good and complex &amp;#34;safety measures&amp;#34; which&lt;br/&gt;&amp;gt; don&amp;#39;t actually help in practical failure scenarios.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;  - the &amp;#34;must have a sig that commits to the input tx&amp;#34; seems like it&lt;br/&gt;&amp;gt;&amp;gt;    should be pretty safe, not too expensive, and keeps taproot&amp;#39;s privacy&lt;br/&gt;&amp;gt;&amp;gt;    benefits in the cases where you end up needing to use NOINPUT&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If this is considered necessary, can it be a standardness rule rather&lt;br/&gt;&amp;gt; than consensus?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt; Rusty.
    </content>
    <updated>2023-06-09T14:54:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd7a8srwxzc94u9dkn4lcxxf8ngpfjktk7q52kvx5mtd3cn6dh8sqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2tzakch</id>
    
      <title type="html">📅 Original date posted:2019-03-19 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd7a8srwxzc94u9dkn4lcxxf8ngpfjktk7q52kvx5mtd3cn6dh8sqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2tzakch" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9xms42p66cyna5zv3vgzx5tdwvxpd53qf565lwr784hhtpmagvcscfnge5&#39;&gt;nevent1q…nge5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-19&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; If you publish to the blockchain:&lt;br/&gt;...&lt;br/&gt;&amp;gt; 4 can be dropped, state 5 and finish can be altered). Since the CSV delay&lt;br/&gt;&amp;gt; is chosen by the participants, the above is still a possible scenario&lt;br/&gt;&amp;gt; in eltoo, though, and it means there&amp;#39;s some risk for someone accepting&lt;br/&gt;&amp;gt; bitcoins that result from a non-cooperative close of an eltoo channel.&lt;br/&gt;&lt;br/&gt;AJ, this was a meandering random walk which shed very little light.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t find the differentiation between malicious and non-malicious&lt;br/&gt;double-spends convincing.  Even if you trust A, you already have to&lt;br/&gt;worry about person-who-sent-the-coins-to-A.  This expands that set to be&lt;br/&gt;&amp;#34;miner who mined coins sent-to-A&amp;#34;, but it&amp;#39;s very hard to see what&lt;br/&gt;difference that makes to how you&amp;#39;d handle coins from A.&lt;br/&gt;&lt;br/&gt;&amp;gt; Beyond that, I think NOINPUT has two fundamental ways to cause problems&lt;br/&gt;&amp;gt; for the people doing NOINPUT sigs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  1) your signature gets applied to a unexpectedly different&lt;br/&gt;&amp;gt;     script, perhaps making it look like you&amp;#39;ve being dealing&lt;br/&gt;&amp;gt;     with some blacklisted entity. OP_MASK and similar solves&lt;br/&gt;&amp;gt;     this.&lt;br/&gt;&lt;br/&gt;... followed by two paragraphs describing how it&amp;#39;s not a &amp;#34;fundamental&lt;br/&gt;way to cause problems&amp;#34; that you (or I) can see.&lt;br/&gt;&lt;br/&gt;&amp;gt; For the second case, that seems a little more concerning. The nightmare&lt;br/&gt;&amp;gt; scenario is maybe something like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * naive users do silly things with NOINPUT signatures, and end up&lt;br/&gt;&amp;gt;    losing funds due to replays like the above&lt;br/&gt;&lt;br/&gt;As we&amp;#39;ve never seen with SIGHASH_NONE?&lt;br/&gt;&lt;br/&gt;&amp;gt;  * initial source of funds was some major exchange, who decide it&amp;#39;s&lt;br/&gt;&amp;gt;    cheaper to refund the lost funds than deal with the customer complaints&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * the lost funds end up costing enough that major exchanges just outright&lt;br/&gt;&amp;gt;    ban sending funds to any address capable of NOINPUT, which also bans&lt;br/&gt;&amp;gt;    all taproot/schnorr addresses&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t find this remotely credible.&lt;br/&gt;&lt;br/&gt;&amp;gt; FWIW, I don&amp;#39;t have a strong opinion here yet, but:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - I&amp;#39;m still inclined to err on the side of putting more safety&lt;br/&gt;&amp;gt;    measures in for NOINPUT, rather than fewer&lt;br/&gt;&lt;br/&gt;In theory, sure.  But not feel-good and complex &amp;#34;safety measures&amp;#34; which&lt;br/&gt;don&amp;#39;t actually help in practical failure scenarios.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - the &amp;#34;must have a sig that commits to the input tx&amp;#34; seems like it&lt;br/&gt;&amp;gt;    should be pretty safe, not too expensive, and keeps taproot&amp;#39;s privacy&lt;br/&gt;&amp;gt;    benefits in the cases where you end up needing to use NOINPUT&lt;br/&gt;&lt;br/&gt;If this is considered necessary, can it be a standardness rule rather&lt;br/&gt;than consensus?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:54:28&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspsvyedthn5c2cp9euqpesr5zazuqynf52x9l9gn024t7r33xszcszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25tfwas</id>
    
      <title type="html">📅 Original date posted:2018-12-12 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspsvyedthn5c2cp9euqpesr5zazuqynf52x9l9gn024t7r33xszcszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25tfwas" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswmugfcfyudlxkjxat99xtfpc9s7e4dr5r22eq40w6uv5v270hj2q7v20t9&#39;&gt;nevent1q…20t9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;        In case you&amp;#39;re bored with the limited range of improvements&lt;br/&gt;going into the 1.1 spec, you might like to ruminate on:&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/sipa/minisketch/blob/master/README.md&#34;&gt;https://github.com/sipa/minisketch/blob/master/README.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;It&amp;#39;s a library for efficient summaries of data, such as bitcoin&lt;br/&gt;transaction gossip.  It has an implementation sweet-spot at 64-bits,&lt;br/&gt;which almost works well for our gossip messages.  I&amp;#39;ve a straw-man&lt;br/&gt;protocol below.&lt;br/&gt;&lt;br/&gt;===&lt;br/&gt;1. type: 260 (`gossip_sync`) (`option_gossip_sync`)&lt;br/&gt;2. data:&lt;br/&gt;    * [`32`:`chain_hash`]&lt;br/&gt;    * [`32`:`latest_block_hash`]&lt;br/&gt;    * [`minisketch_len`:`minisketch`]&lt;br/&gt;&lt;br/&gt;The `latest_block_hash` is because the whole sync is less reliable if&lt;br/&gt;this differs between nodes, so a node may choose to wait, or adapt&lt;br/&gt;accordingly if the other node is behind.&lt;br/&gt;&lt;br/&gt;Because there is some overhead in maintaining the minisketch, it&amp;#39;d be&lt;br/&gt;nice if we can have global agreement on the format so each peer need&lt;br/&gt;only maintain one (i.e. no seed, no changing encodings depending on&lt;br/&gt;block height, etc).&lt;br/&gt;&lt;br/&gt;Fitting everything we need into 64 bits is possible, with various&lt;br/&gt;degrees of ugliness; I&amp;#39;ve proposed one here:&lt;br/&gt;&lt;br/&gt;We currently use a short_channel_id which has 3-byte block height,&lt;br/&gt;3-byte txindex, 2-byte output index.  The biggest win is to combine&lt;br/&gt;block height &amp;amp; txindex into a &amp;#34;txnumber since block 500,000&amp;#34;, which only&lt;br/&gt;needs about 27 bits per year; 40 bits for this number is sufficient for&lt;br/&gt;the forseeable future.  2 bits for type, 1 for channel direction,&lt;br/&gt;leaving 21 bits for output number and timestamp.&lt;br/&gt;&lt;br/&gt;We can encode output number as N ones followed by a zero followed by&lt;br/&gt;N*2&#43;1 bits (commonly, this means 2 bits, but future mixers may make this&lt;br/&gt;much larger).  The remaining bits are used as the lower bits of the&lt;br/&gt;timestamp[1].&lt;br/&gt;&lt;br/&gt;A node announcement is encoded by using the scid of the oldest channel&lt;br/&gt;associated with the node, and the direction bit.&lt;br/&gt;&lt;br/&gt;Using this direct encoding (rather than a hash of values) allows us to&lt;br/&gt;immediately use an INV-style query, or maybe send automatically the&lt;br/&gt;stuff the peer doesn&amp;#39;t have.&lt;br/&gt;&lt;br/&gt;The required size of the minisketch we send depends on the number of&lt;br/&gt;differences with our peer.  We can use some minimum value (maybe based&lt;br/&gt;on past gossip rates?), and add the number of changes we&amp;#39;ve received&lt;br/&gt;since last time, increasing if we failed to reconstruct a previous one.&lt;br/&gt;&lt;br/&gt;There doesn&amp;#39;t need to be consensus between peers on the minisketch size&lt;br/&gt;though, since truncated minisketches regrow into whole ones when tossed&lt;br/&gt;back into the ocean[3].&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;[1]  You&amp;#39;re supposed to refresh gossip every week, 17 bits should&lt;br/&gt;    be sufficient.   And since the originator controls timestamps&lt;br/&gt;    they can mitigate collisions themselves.[2]&lt;br/&gt;[2] I wish I&amp;#39;d insisted we use block numbers for timestamps though&lt;br/&gt;[3] I may have misunderstood this part, but it&amp;#39;s basically magic.
    </content>
    <updated>2023-06-09T14:53:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswfazntm7msj07tlhs8krwppp6yha5vhqkqln7rcs6wly4y8h8nsczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25kjwdu</id>
    
      <title type="html">📅 Original date posted:2018-11-15 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswfazntm7msj07tlhs8krwppp6yha5vhqkqln7rcs6wly4y8h8nsczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25kjwdu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs02tkh2h6ytgx7rsfuc64ka3cxplszmrgk8jwtdnfucfyg2p3ddgqxrnhke&#39;&gt;nevent1q…nhke&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;    I want to propose a method of having reusable BOLT11 &amp;#34;offers&amp;#34; which&lt;br/&gt;provide almost-spontaneous payments as well as not requiring generating&lt;br/&gt;a BOLT11 invoice for each potential sale.&lt;br/&gt;&lt;br/&gt;An &amp;#34;offer&amp;#34; has a `p` field of 26 bytes (128 bits assuming top two are 0)&lt;br/&gt;(which is ignored by existing nodes).  The payer uses a new lightning&lt;br/&gt;probe message using the current onion format we use for HTLCs to&lt;br/&gt;retreive the complete invoice.&lt;br/&gt;&lt;br/&gt;The format of the final-hop lightning onion would contain:&lt;br/&gt;&lt;br/&gt;        [whatever-marker-we-need?][128-bit-`p`-field][[type,len,data]&#43;]&lt;br/&gt;&lt;br/&gt;We would probably define a few optional types to start:&lt;br/&gt;&lt;br/&gt;1. quantity: for ordering multiple of an item, default 1.&lt;br/&gt;2. delivery-address: steal from &lt;a href=&#34;https://www.w3.org/TR/vcard-rdf/#Delivery_Addressing_Properties&#34;&gt;https://www.w3.org/TR/vcard-rdf/#Delivery_Addressing_Properties&lt;/a&gt; ?&lt;br/&gt;3. signature: basically a blob so payer can prove it was them.&lt;br/&gt;&lt;br/&gt;The return lightning message would contain a new bolt11 invoice (perhaps&lt;br/&gt;we optimize some fields by copying from the bolt11 offer if they don&amp;#39;t&lt;br/&gt;appear?), and an additional field:&lt;br/&gt;&lt;br/&gt;        `m` (27) `data_length` 52.  Merkle hash of fields payer provided&lt;br/&gt;        in onion msg above, and the offer `p` value.&lt;br/&gt;&lt;br/&gt;The payer checks the signature is correct, `m` is correct, and uses the&lt;br/&gt;invoice to pay as normal.  The bolt11 offer &#43; fields-from-onion &#43; bolt11&lt;br/&gt;invoice &#43; preimage is the complete proof of payment.&lt;br/&gt;&lt;br/&gt;Refinements&lt;br/&gt;-----------&lt;br/&gt;&lt;br/&gt;We can generate alternate leaves for the merkle tree (using&lt;br/&gt;SHA256(shared-secret | leafnum)) so revealing the `m` value doesn&amp;#39;t risk&lt;br/&gt;revealing your delivery-address for example.&lt;br/&gt;&lt;br/&gt;The return needs to list the fields it *didn&amp;#39;t* include in the merkle&lt;br/&gt;because it didn&amp;#39;t accept them (the merchant doesn&amp;#39;t want to be bound to&lt;br/&gt;conditions it doesn&amp;#39;t understand!).&lt;br/&gt;&lt;br/&gt;We could add a `k` field to the bolt11 offer to allow the final invoice&lt;br/&gt;to delegated to a separate key.&lt;br/&gt;&lt;br/&gt;The default `x` (expiry) field for an offer which does not have an&lt;br/&gt;old-style 53-byte `p` field (ie. a &amp;#34;pure&amp;#34; offer) could be infinite.&lt;br/&gt;&lt;br/&gt;We could merkelize the delivery-address too :)&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve handwaved a bit over the detailed format, because there are other&lt;br/&gt;things we want to put in the onion padding, and because the return is&lt;br/&gt;similar to the &amp;#34;soft-error&amp;#34;/&amp;#34;partial payment ack&amp;#34; proposals.&lt;br/&gt;&lt;br/&gt;Results&lt;br/&gt;-------&lt;br/&gt;&lt;br/&gt;This gives us static invoicing, and a single static invoice (without an&lt;br/&gt;amount field) can thus be used to approximate &amp;#34;spontaneous&amp;#34; donations,&lt;br/&gt;while still providing proof of payment; indeed, providing&lt;br/&gt;non-transferrable proof-of-payment since the invoice now commits to the&lt;br/&gt;payer-provided signature.&lt;br/&gt;&lt;br/&gt;It also provides a platform for recurring payments: while we can do this&lt;br/&gt;with preimage-is-next-payment_hash, that requires pre-generation and&lt;br/&gt;isn&amp;#39;t compatible with static invoices.&lt;br/&gt;&lt;br/&gt;I apologize that this wasn&amp;#39;t fleshed out before the summit, but I&lt;br/&gt;overestimated the power of Scriptless Scripts so had mentally deferred&lt;br/&gt;this.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:52:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0cn6vkkxfcgwng4vjy5f63qeyag3pk7qjac360gkfg04afjarlagzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2hvu6ad</id>
    
      <title type="html">📅 Original date posted:2018-11-22 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0cn6vkkxfcgwng4vjy5f63qeyag3pk7qjac360gkfg04afjarlagzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2hvu6ad" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdlcn4m69vcchpn5rud0csmlzj04q8hrjxeeyh4ywn64pf5q60nugaqm2lr&#39;&gt;nevent1q…m2lr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Conner Fromknecht &amp;lt;conner at lightning.engineering&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; But it&amp;#39;s unnecessary for the recipient to know the total amount I meant&lt;br/&gt;&amp;gt;&amp;gt; to pay; they just need to return the receipt once it exceeds the amount&lt;br/&gt;&amp;gt;&amp;gt; they want.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think it’s true that the recipient doesn’t need to know necessarily, but&lt;br/&gt;&amp;gt; sending the intended amount is more robust IMO, since it provides an order&lt;br/&gt;&amp;gt; invariant hint for when the receiver can safely settle.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the sender does amount fuzzing (as CL does) or adds a tip, it’s possible&lt;br/&gt;&amp;gt; for the final partial payment to be less than `amount_to_pay` -&lt;br/&gt;&amp;gt; `invoice_amount`, causing the sender to settle prematurely. Otherwise, we&lt;br/&gt;&amp;gt; might want to specify that no split should be less than the amount&lt;br/&gt;&amp;gt; overpaid.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, if that amount never comes through yet the invoice is satisfied,&lt;br/&gt;&amp;gt; the receiver can always choose to settle even if the remaining amount never&lt;br/&gt;&amp;gt; arrives.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s more code, and takes 8 more bytes out of the onion.  I&amp;#39;ve started&lt;br/&gt;coding up option_simplfied_commitment and it&amp;#39;s making me terrified of&lt;br/&gt;adding any additional complexity :(&lt;br/&gt;&lt;br/&gt;The more compelling argument is that partial-payment donations might&lt;br/&gt;want this, but it&amp;#39;s marginal, IMHO.  We should be aiming for static&lt;br/&gt;invoices for the donate case.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:52:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8pnp4sdcmqsnzwwgnrtujjlj8qcl53udl0af5ny9kasu3lx9hs0qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2nvqx93</id>
    
      <title type="html">📅 Original date posted:2018-11-20 📝 Original message: René ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8pnp4sdcmqsnzwwgnrtujjlj8qcl53udl0af5ny9kasu3lx9hs0qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2nvqx93" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfue6gk2vq0tc0f4mq7txgz4unvtl5l4u78kl6rf24ufzy6q5xkpqy8nkp2&#39;&gt;nevent1q…nkp2&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-20&lt;br/&gt;📝 Original message:&lt;br/&gt;René Pickhardt via Lightning-dev &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; Hey List,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; as this base AMP proposal seems pretty small I just started to write this&lt;br/&gt;&amp;gt; up to make a PR for BOLT04 and BOLT11. While doing my write up I realize&lt;br/&gt;&amp;gt; that there are smaller things that I would want to verify / double check&lt;br/&gt;&amp;gt; and propose with you.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Verifying:&lt;br/&gt;&amp;gt; 1.) I understand the receiving node signals support for Base AMP by setting&lt;br/&gt;&amp;gt; a feature bit in the BOLT11 String&lt;br/&gt;&lt;br/&gt;Yes, this seemed a logical reason to add features to BOLT11.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2.) The sending node signals a multipath payment by setting a feature bit&lt;br/&gt;&amp;gt; and by using the same `amount to forward` value in the last hop of the&lt;br/&gt;&amp;gt; onion for all paths which will also be bigger that the incoming htlcs whose&lt;br/&gt;&amp;gt; sum has to be at least the size of `amount_to_forward`.&lt;br/&gt;&lt;br/&gt;Not a feature bit as such, but some signal for the final node (in the&lt;br/&gt;onion).  And do not play with `amount_to_forward`, as it&amp;#39;s an important&lt;br/&gt;signal to the final node that the previous node did not offer less value&lt;br/&gt;for the HTLC than it was supposed to.  (You could steal the top bit to&lt;br/&gt;signal partial payment if you really want to).&lt;br/&gt;&lt;br/&gt;&amp;gt; ## Clarifying:&lt;br/&gt;&amp;gt; 3.) Senders MUST NOT (SHOULD NOT?) create paths which would have to be&lt;br/&gt;&amp;gt; merged by intermediary nodes (as we don&amp;#39;t know - and have no means of&lt;br/&gt;&amp;gt; querying - if they support the format of the adepted onion packages for&lt;br/&gt;&amp;gt; partial paths. Also it even seems impossible since the rest of the path for&lt;br/&gt;&amp;gt; at least one partial path could not be stored in the onion / forwarded&lt;br/&gt;&amp;gt; onions can&amp;#39;t be seen)&lt;br/&gt;&lt;br/&gt;In-path merging is overreach, let&amp;#39;s not do it or mention it.&lt;br/&gt;&lt;br/&gt;There&amp;#39;s a slight preference to avoid sharing intermediary nodes to avoid&lt;br/&gt;correlation.  Intermediary nodes know they need to forward all of them&lt;br/&gt;or not get paid for any of them, and they&amp;#39;re already supposed to do so.&lt;br/&gt;&lt;br/&gt;&amp;gt; ## Proposing:&lt;br/&gt;&amp;gt; Should we specify an algorithm for executing a multipath payment for the&lt;br/&gt;&amp;gt; sending node or should this be left to the implementation. An obvious Idea&lt;br/&gt;&amp;gt; for an algorithm would be a divide and conquer scheme which should be&lt;br/&gt;&amp;gt; obvious with the following python style pseudo code:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; def pay_base_amp(amount):&lt;br/&gt;&amp;gt;    success = False&lt;br/&gt;&amp;gt;    for route in get_available_routes():&lt;br/&gt;&amp;gt;        success = send_via_route(route, amount)&lt;br/&gt;&amp;gt;     if not success:&lt;br/&gt;&amp;gt;        pay_base_amp(amount/2 &#43; 1) # the &#43;1 is to mitigate rounding errors.&lt;br/&gt;&amp;gt; there could be other ways to do so.&lt;br/&gt;&amp;gt;        pay_base_amp(amount/2 &#43; 1)&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is actually useful.  For example, I would suggest a&lt;br/&gt;more random split, and start by using some estimate of channel capacity.&lt;br/&gt;&lt;br/&gt;&amp;gt; Even if we leave the exact AMP execution to the sender we could still&lt;br/&gt;&amp;gt; suggest this divide and conquer scheme in BOLT 04&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another idea I had (which is probably a bad one as it allows for probing of&lt;br/&gt;&amp;gt; channel balances) would be to allow nodes on a partial path to send back&lt;br/&gt;&amp;gt; some hints of how much additional capacity they can forward if they see&lt;br/&gt;&amp;gt; that the partial payment feature bit is set (this would require to set this&lt;br/&gt;&amp;gt; feature bit in every onion) Also if we want to make use of this information&lt;br/&gt;&amp;gt; every node would have to support base amp. So I guess this idea is bad for&lt;br/&gt;&amp;gt; several reasons. Still we could have a MAY rule out of it?&lt;br/&gt;&lt;br/&gt;I think we should adapt a convention for a lower limit at which we&lt;br/&gt;disable the channel if we can&amp;#39;t forward (eg 1% of capacity?  100&lt;br/&gt;satoshis?).  That gives us a better starting point for AMP, too.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:52:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswdsugpzz9vezkt3kx4u2teheggf784fmpx4fn64n5plmqtwwna8czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2kcl0wk</id>
    
      <title type="html">📅 Original date posted:2018-11-05 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswdsugpzz9vezkt3kx4u2teheggf784fmpx4fn64n5plmqtwwna8czyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2kcl0wk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqv8gwpjxh58dls7amr5kc0s7ajtjhy0xm9e0d4jzhdqspcuu8rwqk5xf9j&#39;&gt;nevent1q…xf9j&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; FWIW, I don&amp;#39;t see reddit as a particularly viable &amp;#34;court&amp;#34;; there&amp;#39;s&lt;br/&gt;&amp;gt; no way for reddit to tell who&amp;#39;s actually right in a dispute, eg if I&lt;br/&gt;&amp;gt; say blockstream didn&amp;#39;t send stickers I paid for, and blockstream says&lt;br/&gt;&amp;gt; they did; ie there&amp;#39;s no need for a sock puppet in the above scenario,&lt;br/&gt;&amp;gt; blockstream can just say &amp;#34;according to our records you signed for&lt;br/&gt;&amp;gt; delivery, stop whinging&amp;#34;.&lt;br/&gt;&lt;br/&gt;Well, in that case they can show a tracking number and Canada Post link?&lt;br/&gt;&lt;br/&gt;We will eventually develop systems of arbitration better than &amp;#34;whining&lt;br/&gt;on reddit/twitter&amp;#34;, but that&amp;#39;s where bitcoin was in its early days, so I&lt;br/&gt;use it as a useful starting point to think about receipts when we lack&lt;br/&gt;an intermediary.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think there&amp;#39;s maybe four sorts of &amp;#34;proof of payment&amp;#34; people might&lt;br/&gt;&amp;gt; desire:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   0) no proof: &amp;#34;completely&amp;#34; deniable payments (donations?)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   1) shared secret: ability to prove directly to the payee that an&lt;br/&gt;&amp;gt;      invoice was paid (what we have now)&lt;br/&gt;&lt;br/&gt;We also, importantly, have the ability to tie the receipt to the&lt;br/&gt;invoice.&lt;br/&gt;&lt;br/&gt;&amp;gt;   2) signed payment: ability to prove to a different business unit of&lt;br/&gt;&amp;gt;      the payee that payment was made, so that you can keep all the &lt;br/&gt;&amp;gt;      secrets in the payment-handling part, and have the service-delivery&lt;br/&gt;&amp;gt;      part not be at risk for losing all your money&lt;br/&gt;&lt;br/&gt;Hmm, this requires auditing the current commitment transaction I think&lt;br/&gt;(&amp;#34;see, I&amp;#39;m holding the money!&amp;#34;).  I have to think about this some&lt;br/&gt;more...&lt;br/&gt;&lt;br/&gt;&amp;gt;   3) third-party verifiable: so you can associate a payment with real&lt;br/&gt;&amp;gt;      world identity information, and take them to court (or reddit) as a&lt;br/&gt;&amp;gt;      contract dispute; needs PKI infrastructure so you can be confident&lt;br/&gt;&amp;gt;      the pubkey maps to the real world people you think it does, etc&lt;br/&gt;&lt;br/&gt;Yes, we&amp;#39;re still missing that last mile between the merchant and the&lt;br/&gt;nodeid.  There&amp;#39;s a proposal to do this with DNS records, there&amp;#39;s the&lt;br/&gt;LetsEncrypt-style &amp;#34;serve this URL&amp;#34;, but we also need something like&lt;br/&gt;Certificate Transparency so I can reliably get old nodeids...&lt;br/&gt;&lt;br/&gt;But the perfect is the enemy of the good, too.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:52:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsydt2f405nmgvevaqv7lf5l7xvdtzu3p236fnfn75fj90paryqt5qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xqrc4c</id>
    
      <title type="html">📅 Original date posted:2018-11-04 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsydt2f405nmgvevaqv7lf5l7xvdtzu3p236fnfn75fj90paryqt5qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xqrc4c" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8j28r29gddgsjqjufywr74wguwn9qlwp5ls79698me65vmau59hg99d0k9&#39;&gt;nevent1q…d0k9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-04&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Good morning Rusty and aj and list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; In the payer-supplied data case, I think &amp;#39;m&amp;#39; should include a signature&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; for a key only the payer knows: this lets them prove they made the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; payment.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I don&amp;#39;t object to that, but I think it&amp;#39;s unnecessary; as long as there&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; was a payment for delivery of the widget to &amp;#34;aj&amp;#34; in &amp;#34;Australia&amp;#34; does it&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; matter if the payment was technically made by &amp;#34;aj&amp;#34; by &amp;#34;Visa on behalf&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; of aj&amp;#34; or by &amp;#34;Bank of America on behalf of Mastercard on behalf of aj&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; friend who owed him some money&amp;#34; ?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; You often don&amp;#39;t want the vendor to know anything about you, and there&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; often no reason why they should.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; And it just doesn&amp;#39;t work unless you give over uniquely identifying&lt;br/&gt;&amp;gt;&amp;gt; information. AJ posts to r/bitcoin demonstrating payment, demanding his&lt;br/&gt;&amp;gt;&amp;gt; goods. Sock puppet says &amp;#34;No, I&amp;#39;m the AJ in Australia&amp;#34; and cut &amp;amp; pastes&lt;br/&gt;&amp;gt;&amp;gt; the same proof.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Technically speaking, all that AJ in Australia needs to show is that he or she knows, the private key behind the public key that is indicated on the invoice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Before payment, only the payee knows this private key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; After payment, both AJ in Australia and the payee know this private key (since the payment is conditional on AJ in Australia learning this key).&lt;br/&gt;&lt;br/&gt;But the merchant (payee) knows it too.  So the lizard masters[1] at&lt;br/&gt;Blockstream can produce this proof as well?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;[1] &lt;a href=&#34;https://twitter.com/rusty_twit/status/1057794540122206208&#34;&gt;https://twitter.com/rusty_twit/status/1057794540122206208&lt;/a&gt;
    </content>
    <updated>2023-06-09T14:52:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsz785x947e7lukvsgrz2nk7aax0sjwgmdk9em0g5p5a57ehgjwxuszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xpj850</id>
    
      <title type="html">📅 Original date posted:2018-11-04 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsz785x947e7lukvsgrz2nk7aax0sjwgmdk9em0g5p5a57ehgjwxuszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2xpj850" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdcftxpkcv8ws4q5y4ayxhwywgcydg3nmvgugn4kaefr4clzl9wkg4jg4zz&#39;&gt;nevent1q…g4zz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; In the payer-supplied data case, I think &amp;#39;m&amp;#39; should include a signature&lt;br/&gt;&amp;gt;&amp;gt; for a key only the payer knows: this lets them prove *they* made the&lt;br/&gt;&amp;gt;&amp;gt; payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t object to that, but I think it&amp;#39;s unnecessary; as long as there&lt;br/&gt;&amp;gt; was a payment for delivery of the widget to &amp;#34;aj&amp;#34; in &amp;#34;Australia&amp;#34; does it&lt;br/&gt;&amp;gt; matter if the payment was technically made by &amp;#34;aj&amp;#34; by &amp;#34;Visa on behalf&lt;br/&gt;&amp;gt; of aj&amp;#34; or by &amp;#34;Bank of America on behalf of Mastercard on behalf of aj&amp;#39;s&lt;br/&gt;&amp;gt; friend who owed him some money&amp;#34; ?&lt;br/&gt;&lt;br/&gt;You often don&amp;#39;t want the vendor to know anything about you, and there&amp;#39;s&lt;br/&gt;often no reason why they should.&lt;br/&gt;&lt;br/&gt;And it just doesn&amp;#39;t work unless you give over uniquely identifying&lt;br/&gt;information.  AJ posts to r/bitcoin demonstrating payment, demanding his&lt;br/&gt;goods.  Sock puppet says &amp;#34;No, I&amp;#39;m the AJ in Australia&amp;#34; and cut &amp;amp; pastes&lt;br/&gt;the same proof.&lt;br/&gt;&lt;br/&gt;Even if you did, that&amp;#39;s exactly the problem we have now.  *In theory*&lt;br/&gt;the invoice should be specific enough that it identifies where they&lt;br/&gt;shipped the item, in practice it never is (even the Blockstream store&lt;br/&gt;gets this wrong!).&lt;br/&gt;&lt;br/&gt;Sure, in case of digital delivery there&amp;#39;s no proof that delivery&lt;br/&gt;(didn&amp;#39;t) happen, but you can at least show you paid.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; How does this interact with AMP, however?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The way I see it is they&amp;#39;re separate: you have a way of getting the&lt;br/&gt;&amp;gt; preimage back over lightning (which is affected by AMP), and you have a&lt;br/&gt;&amp;gt; way of turning a preimage into a third-party-verifiable PoP (with&lt;br/&gt;&amp;gt; Schnorr or whatever).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (That might not be true if there&amp;#39;s a clever way of safely feeding the&lt;br/&gt;&amp;gt; nonce R back, so that you can go straight from a generic offer to an&lt;br/&gt;&amp;gt; accepted payment with proof of payment)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; With seckp256k1 preimages, it&amp;#39;s easy to reduce that to sig=(R,s),&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; and needing to communicate an R to the payer initially, who can then&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; calculate S and send &amp;#34;m&amp;#34; along with the payment.&lt;br/&gt;&amp;gt;&amp;gt; OK, I buy that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Crap, do I need to give you proof of payment for it now? :)&lt;br/&gt;&lt;br/&gt;Please :)&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;  - just send multiple payments with the same hash:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     works with sha256&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     privacy not improved much (some intermediary nodes no longer know&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;       full invoice value)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     can claim partial payments as soon as they arrive&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     accepting any partial payment provides proof-of-payment&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Interestingly, if vendor takes part payment, rest can be stolen by&lt;br/&gt;&amp;gt;&amp;gt; intermediaries.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or you could just see a $5 bill, send $0.50 through, and wait to see&lt;br/&gt;&amp;gt; if the take the partial payment immediately before even trying the&lt;br/&gt;&amp;gt; remaining $4.50.&lt;br/&gt;&lt;br/&gt;Sure, that&amp;#39;s true today, too?&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;  - secp256k1: (&amp;#34;high AMP&amp;#34; ?)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     needs secp256k1 preimages&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     works fine with decorrelation improving privacy at every step&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     can set it up so can only claim once all partial payments arrive&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     accepting partial payment provides proof-of-payment&lt;br/&gt;&amp;gt;&amp;gt; Yes.  Though I&amp;#39;m not sure exactly how this works with your scheme&lt;br/&gt;&amp;gt;&amp;gt; above...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  Vendor -&amp;gt; *:        &amp;#34;I sell widgets for 0.01 BTC, my pubkey is P&amp;#34;&lt;br/&gt;&amp;gt;  Customer -&amp;gt; Vendor: &amp;#34;I want to buy a widget&amp;#34;&lt;br/&gt;&amp;gt;  Vendor -&amp;gt; Customer: &amp;#34;Here&amp;#39;s an R value&amp;#34;&lt;br/&gt;&amp;gt;  Customer: calculates S = R &#43; H(P,R,&amp;#34;send $me a widget at $address&amp;#34;)*P&lt;br/&gt;&amp;gt;  Customer -&amp;gt; Vendor: &amp;#34;here&amp;#39;s 0.01 BTC for s corresponding to S, my&lt;br/&gt;&amp;gt;                       details are R, $me, $address&amp;#34;&lt;br/&gt;&amp;gt;  Vendor: looks up r for R=r*G, calculates s = r &#43; H(P,R,&amp;#34;send $me a&lt;br/&gt;&amp;gt;          widget at $address&amp;#34;)*p, checks S=s*G&lt;br/&gt;&amp;gt;  Vendor -&amp;gt; Customer: &amp;lt;accepts payment, revealing s&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  Customer -&amp;gt; Court: reveals the invoice (&amp;#34;send $me a widget...&amp;#34;) and the&lt;br/&gt;&amp;gt;                     signature by Vendor&amp;#39;s pubkey P, (s,R)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think the way to do secp256k1 AMP with that is that when sending&lt;br/&gt;&amp;gt; through the payment is for the customer to send three payments to the&lt;br/&gt;&amp;gt; Vendor conditional on preimages for A,B,C calculated as:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    A = S &#43; H(1,secret)*G&lt;br/&gt;&amp;gt;    B = S &#43; H(2,secret)*G&lt;br/&gt;&amp;gt;    C = S &#43; H(3,secret)*G&lt;br/&gt;&lt;br/&gt;Note: I prefer the construction H(&amp;lt;secret&amp;gt;,&amp;lt;part-of-secret-in-that-payment&amp;gt;)&lt;br/&gt;which doesn&amp;#39;t require an explicit order.&lt;br/&gt;&lt;br/&gt;&amp;gt; where &amp;#34;secret&amp;#34; is your xor of info from each of the three message hashes.&lt;br/&gt;&lt;br/&gt;Note that this only works if the message &amp;#34;send $me a widget at $address&amp;#34;&lt;br/&gt;includes a nonce, since it may be easily grindable otherwise.&lt;br/&gt;&lt;br/&gt;Since I&amp;#39;m suggesting it include a signature in msg, we&amp;#39;re covered here.&lt;br/&gt;We could chacha20 the msg in A, and just xor the key between other&lt;br/&gt;payments for a bit of space saving.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; In theory, both &amp;#34;just send multiple payments&amp;#34; and &amp;#34;secp256k1&amp;#34; could have&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; splitting and joining at any hop, if we could encode the instructions&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; on how to do that in the onion message; joining is probably easy, but&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; splitting seems like it might be hard?&lt;br/&gt;&amp;gt;&amp;gt; I don&amp;#39;t think so.  If you can join two payments, it wasn&amp;#39;t private?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sorry, I mean &amp;#34;source-directed splits and joins&amp;#34;, so rather than&lt;br/&gt;&amp;gt; your source routing being a linear &amp;#34;me -&amp;gt; A -&amp;gt; B -&amp;gt; C -&amp;gt; D -&amp;gt; you&amp;#34;,&lt;br/&gt;&amp;gt; you specify a graph: &amp;#34;me -&amp;gt; A -&amp;gt; B,E ; B -&amp;gt; C ; E -&amp;gt; F -&amp;gt; G ; C,G -&amp;gt;&lt;br/&gt;&amp;gt; D -&amp;gt; you&amp;#34; so you tell &amp;#34;A&amp;#34; how to split the payment into two new routes,&lt;br/&gt;&amp;gt; and tell &amp;#34;D&amp;#34; to join two payments and continue it on. The ECC part works&lt;br/&gt;&amp;gt; fine for that, but the onion routed messages seem difficult and probably&lt;br/&gt;&amp;gt; not worth considering for spec v1.1.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure I see the benefit over just treating them independently,&lt;br/&gt;so I also think we should defer.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] If we&amp;#39;re not careful we&amp;#39;re going to implement HORNET so we can pass&lt;br/&gt;&amp;gt;&amp;gt; arbitrary messages around, which means we want to start charging for&lt;br/&gt;&amp;gt;&amp;gt; them to prevent spam, which means we reopen the pre-payment debate, and&lt;br/&gt;&amp;gt;&amp;gt; need reliable error messages...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Could leave the interactivity to the &amp;#34;web store&amp;#34; layer, eg have a BOLT&lt;br/&gt;&amp;gt; 11 v1.1 &amp;#34;offer&amp;#34; include a url for the website where you go an enter your&lt;br/&gt;&amp;gt; name and address and whatever other info they need, and get a personalised&lt;br/&gt;&amp;gt; BOLT 11 v1.1 &amp;#34;invoice&amp;#34; back with payment-hash/nonce/signature/whatever?&lt;br/&gt;&lt;br/&gt;I think that&amp;#39;s out-of-scope, and I generally dislike including a URL&lt;br/&gt;since it&amp;#39;s an unsigned externality and in practice has horrible privacy&lt;br/&gt;properties.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:52:04&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs97y5k67w2r2psxe6yzq52srkhmhx47td5kdnrk5c8pqx0ah3v4dqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2drqkhn</id>
    
      <title type="html">📅 Original date posted:2018-11-04 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs97y5k67w2r2psxe6yzq52srkhmhx47td5kdnrk5c8pqx0ah3v4dqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2drqkhn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspxtnpjlk64ln60mlsfahu3qqjjyf3lauarp8wkuassskza2sfxmsw637tn&#39;&gt;nevent1q…37tn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;  - channel announcements: do you support secp256k1 for hashes or just&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;    sha256?&lt;br/&gt;&amp;gt;&amp;gt; Worse, it becomes &amp;#34;I support secp256k1 with ECDSA&amp;#34; then a new &amp;#34;I support&lt;br/&gt;&amp;gt;&amp;gt; secp256k1 with Schnorr&amp;#34;.  You need a continuous path of channels with&lt;br/&gt;&amp;gt;&amp;gt; the same feature.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think that&amp;#39;s correct: whether it&amp;#39;s 2p-ecdsa, Schnorr or script&lt;br/&gt;&amp;gt; magic only matters for the two nodes directly involved in the channel&lt;br/&gt;&amp;gt; (who need to be able to understand the commitment transactions they&amp;#39;re&lt;br/&gt;&amp;gt; signing, and extract the private key from the on-chain tx if the channel&lt;br/&gt;&amp;gt; gets unilaterally closed). For everyone else, they just need to know that&lt;br/&gt;&amp;gt; they can put in a public key based HTLC, and get back the corresponding&lt;br/&gt;&amp;gt; private key when the HTLC goes through.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure.  Jonas Nick proposed a scheme, which very much assumes&lt;br/&gt;Schnorr AFAICT:&lt;br/&gt;&lt;br/&gt;Jonas Nick wrote:&lt;br/&gt;&amp;gt; How I thought it would work is that the invoice would contain a&lt;br/&gt;&amp;gt; Schnorr nonce R. Then the payer would construct s*G = R &#43;&lt;br/&gt;&amp;gt; H(payee_pubkey,R,&amp;#34;I&amp;#39;ve bought 5 shirts shipped to Germany&amp;#34;)*G. Then&lt;br/&gt;&amp;gt; the payer builds the scriptless script payment path such that when the&lt;br/&gt;&amp;gt; payee claims, the payer learns s and thus has a complete&lt;br/&gt;&amp;gt; signature. However, that doesn’t work with recurrent payments because&lt;br/&gt;&amp;gt; the payee can use the nonce only once.&lt;br/&gt;&lt;br/&gt;I would probably enhance this to include a nonce, which allows for AMP&lt;br/&gt;(you have to xor the AMP payments to get the nonce):&lt;br/&gt;&lt;br/&gt;R &#43; H(payee_pubkey,R,&amp;#34;I&amp;#39;ve bought 5 shirts shipped to Germany&amp;#34;,NONCE)*G&lt;br/&gt;&lt;br/&gt;&amp;gt; I think it makes sense to think of proof-of-payment in terms of a&lt;br/&gt;&amp;gt; verification algorithm (that a third party court could use), that takes:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   m - the invoice details, eg&lt;br/&gt;&amp;gt;       &amp;#34;aj paid $11 for stickers to be delivered to Australia&amp;#34;&lt;br/&gt;&amp;gt;   P - the pubkey of the vendor&lt;br/&gt;&amp;gt;   sig - some signature&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With the current SHA256 preimages, you can make sig=(R,s,pre)&lt;br/&gt;&amp;gt; where the sig is valid if:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   s*G = R &#43; H(P,R,m&#43;SHA256(pre))*P&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you share R,s,SHA256(pre) beforehand, the payer can tell they&amp;#39;ll have&lt;br/&gt;&amp;gt; a valid signature if they pay to SHA256(pre). That&amp;#39;s a 96B signature,&lt;br/&gt;&amp;gt; and it requires &amp;#34;pre&amp;#34; be different for each sale, and needs pre-payment&lt;br/&gt;&amp;gt; interactivity to agree on m and communicate R,s back to the payer.&lt;br/&gt;&lt;br/&gt;For current-style invoices (no payer-supplied data), the payee knows&lt;br/&gt;&amp;#39;m&amp;#39;, so no interactivity needed, which is nice.&lt;br/&gt;&lt;br/&gt;In the payer-supplied data case, I think &amp;#39;m&amp;#39; should include a signature&lt;br/&gt;for a key only the payer knows: this lets them prove *they* made the&lt;br/&gt;payment.&lt;br/&gt;&lt;br/&gt;How does this interact with AMP, however?&lt;br/&gt;&lt;br/&gt;&amp;gt; With seckp256k1 preimages, it&amp;#39;s easy to reduce that to sig=(R,s),&lt;br/&gt;&amp;gt; and needing to communicate an R to the payer initially, who can then&lt;br/&gt;&amp;gt; calculate S and send &amp;#34;m&amp;#34; along with the payment.&lt;br/&gt;&lt;br/&gt;OK, I buy that.&lt;br/&gt;&lt;br/&gt;&amp;gt; Maybe it makes sense to disambiguate the term &amp;#34;invoice&amp;#34; -- when you don&amp;#39;t&lt;br/&gt;&amp;gt; know who you might be giving the goods/service to, call it an &amp;#34;offer&amp;#34;,&lt;br/&gt;&amp;gt; which can be a write-once/accept-by-anyone deal that you just leave on&lt;br/&gt;&amp;gt; a webpage or your email signature; but an &amp;#34;invoice&amp;#34; should be specific&lt;br/&gt;&amp;gt; to each individual payment, with a &amp;#34;receipt&amp;#34; provided once an invoice&lt;br/&gt;&amp;gt; is paid.&lt;br/&gt;&lt;br/&gt;&amp;#34;offer&amp;#34; is a good name, since I landed on the same one while thinking&lt;br/&gt;about this too :)&lt;br/&gt;&lt;br/&gt;For an &amp;#34;offer&amp;#34; you would need a (lightning-network-carried) req/resp to&lt;br/&gt;get the per-payment invoice.  An offer could use a 128-bit &amp;#39;p&amp;#39;: smaller&lt;br/&gt;would do, but this is too large to brute-force iterate through (hey, I&lt;br/&gt;wonder if they sell other stuff?).&lt;br/&gt;&lt;br/&gt;&amp;gt; Rereading through the AMP threads, Christian&amp;#39;s post makes a lot of sense&lt;br/&gt;&amp;gt; to me:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-February/001023.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-February/001023.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not really seeing the benefits in complicated AMP schemes without&lt;br/&gt;&amp;gt; decorrelation...&lt;br/&gt;&lt;br/&gt;In practice it should increase reliability of payments through capacity&lt;br/&gt;bottlenecks.  But don&amp;#39;t underestimate the benefits of PoP: we&amp;#39;re so used&lt;br/&gt;to intermediates we take it for granted, but once the middleman is&lt;br/&gt;removed the ability to prove the invoice/payment cycles is vital for&lt;br/&gt;usability.&lt;br/&gt;&lt;br/&gt;&amp;gt; It seems to me like there are three levels that could be implemented:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - laolu/conner: (&amp;#34;low AMP&amp;#34; ?)&lt;br/&gt;&amp;gt;     works with sha256&lt;br/&gt;&amp;gt;     some privacy improvement&lt;br/&gt;&amp;gt;     loses proof-of-payment&lt;br/&gt;&amp;gt;     can&amp;#39;t claim unless all payments arrive&lt;br/&gt;&lt;br/&gt;Yep.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - just send multiple payments with the same hash:&lt;br/&gt;&amp;gt;     works with sha256&lt;br/&gt;&amp;gt;     privacy not improved much (some intermediary nodes no longer know&lt;br/&gt;&amp;gt;       full invoice value)&lt;br/&gt;&amp;gt;     can claim partial payments as soon as they arrive&lt;br/&gt;&amp;gt;     accepting any partial payment provides proof-of-payment&lt;br/&gt;&lt;br/&gt;Interestingly, if vendor takes part payment, rest can be stolen by&lt;br/&gt;intermediaries.  This puts pressure on vendor to treat them atomically.&lt;br/&gt;I haven&amp;#39;t thought about this before, but it has desirable attributes.&lt;br/&gt;(If the contract is &amp;#34;you will only release preimage once you&amp;#39;ve got the&lt;br/&gt;payment&amp;#34;, all this requires is a single bit to say &amp;#34;I know this is&lt;br/&gt;partial, more are coming, please wait&amp;#34;).&lt;br/&gt;&lt;br/&gt;&amp;gt;  - secp256k1: (&amp;#34;high AMP&amp;#34; ?)&lt;br/&gt;&amp;gt;     needs secp256k1 preimages&lt;br/&gt;&amp;gt;     works fine with decorrelation improving privacy at every step&lt;br/&gt;&amp;gt;     can set it up so can only claim once all partial payments arrive&lt;br/&gt;&amp;gt;     accepting partial payment provides proof-of-payment&lt;br/&gt;&lt;br/&gt;Yes.  Though I&amp;#39;m not sure exactly how this works with your scheme&lt;br/&gt;above...&lt;br/&gt;&lt;br/&gt;&amp;gt; In theory, both &amp;#34;just send multiple payments&amp;#34; and &amp;#34;secp256k1&amp;#34; could have&lt;br/&gt;&amp;gt; splitting and joining at any hop, if we could encode the instructions&lt;br/&gt;&amp;gt; on how to do that in the onion message; joining is probably easy, but&lt;br/&gt;&amp;gt; splitting seems like it might be hard?&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think so.  If you can join two payments, it wasn&amp;#39;t private?  For&lt;br/&gt;splitting, in the specific case of having two channels between the same&lt;br/&gt;nodes, you might be able to do something, but that&amp;#39;s a pretty narrow&lt;br/&gt;case.  And as TCP discovered, you&amp;#39;re better off failing back to sender&lt;br/&gt;than trying to add fragmentation to the protocol.&lt;br/&gt;&lt;br/&gt;Note: if we need an interaction message for BOLT11 features we want in&lt;br/&gt;future[1], then it has the advantage that it decouples the bolt11&lt;br/&gt;features from changing preimages to secp256k1.  That makes this question&lt;br/&gt;*critical* for the Summit next week.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] If we&amp;#39;re not careful we&amp;#39;re going to implement HORNET so we can pass&lt;br/&gt;arbitrary messages around, which means we want to start charging for&lt;br/&gt;them to prevent spam, which means we reopen the pre-payment debate, and&lt;br/&gt;need reliable error messages...
    </content>
    <updated>2023-06-09T14:52:03&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvurkfqgyzucg8xv2r4848e6yejyl4n38shgxwjs0ktdydey55xhszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25vsulk</id>
    
      <title type="html">📅 Original date posted:2018-11-02 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvurkfqgyzucg8xv2r4848e6yejyl4n38shgxwjs0ktdydey55xhszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25vsulk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq6j9cuplxpau3etvt6mjdaah6cly8cgrwn79n08e9aep8zd5zc8ca2rnca&#39;&gt;nevent1q…rnca&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; On Fri, Nov 02, 2018 at 10:20:46AM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt;         There&amp;#39;s been some discussion of what the lightning payment flow&lt;br/&gt;&amp;gt;&amp;gt; might look like in the future, and I thought I&amp;#39;d try to look forwards so&lt;br/&gt;&amp;gt;&amp;gt; we can avoid painting ourselves into a corner now.  I haven&amp;#39;t spent time&lt;br/&gt;&amp;gt;&amp;gt; on concrete design and implementation to be sure this is correct,&lt;br/&gt;&amp;gt;&amp;gt; however.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think I&amp;#39;d like to see v1.1 of the lightning spec include&lt;br/&gt;&amp;gt; experimental/optional support for using secp256k1 public/private keys&lt;br/&gt;&amp;gt; for payment hashes/preimages. That assumes using either 2-party ECDSA&lt;br/&gt;&amp;gt; magic or script magic until it&amp;#39;s viable to do it via Schnorr scriptless&lt;br/&gt;&amp;gt; scripts, but that seems like it&amp;#39;s not totally infeasible?&lt;br/&gt;&lt;br/&gt;Not totally infeasible, but since every intermediary needs to support&lt;br/&gt;it, I think we&amp;#39;d need considerable buy-in before we commit to it in 1.1.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think the&lt;br/&gt;&amp;gt; components would need to be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - invoices: will the preimage for the hash be a secp256k1 private key&lt;br/&gt;&amp;gt;    or a sha256 preimage? (or payer&amp;#39;s choice?)&lt;br/&gt;&lt;br/&gt;&amp;gt;From BOLT11:&lt;br/&gt;&lt;br/&gt;   The `p` field supports the current 256-bit payment hash, but future&lt;br/&gt;   specs could add a new variant of different length, in which case&lt;br/&gt;   writers could support both old and new, and old readers would ignore&lt;br/&gt;   the one not the correct length.&lt;br/&gt;&lt;br/&gt;So the plan would be you provide two `p` fields in transition.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - channel announcements: do you support secp256k1 for hashes or just&lt;br/&gt;&amp;gt;    sha256?&lt;br/&gt;&lt;br/&gt;Worse, it becomes &amp;#34;I support secp256k1 with ECDSA&amp;#34; then a new &amp;#34;I support&lt;br/&gt;secp256k1 with Schnorr&amp;#34;.  You need a continuous path of channels with&lt;br/&gt;the same feature.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - node features: how do you support secp256k1? not at all (default),&lt;br/&gt;&amp;gt;    via 2p-ecdsa, via script magic, (eventually) via schnorr, ...?&lt;br/&gt;&lt;br/&gt;We could make these global feature bits, if you want to preferentually&lt;br/&gt;establish channels with nodes who support a specific feature.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think this is (close to) a necessary precondition for payment&lt;br/&gt;&amp;gt; decorrelation, AMP, and third-party verifiable proof-of-payment.&lt;br/&gt;&lt;br/&gt;Yes, that&amp;#39;s the easy part :)&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&amp;gt; Even if you calculate r differently, I don&amp;#39;t think you can do this&lt;br/&gt;&amp;gt; without Bob and Alice interacting to get the nonce R prior to sending&lt;br/&gt;&amp;gt; the transaction, which seems effectively the same as having dynamic&lt;br/&gt;&amp;gt; invoice hashes, though.&lt;br/&gt;&lt;br/&gt;I know Andrew Poelstra thought it was possible, so I&amp;#39;m going to leave a&lt;br/&gt;response to him :)&lt;br/&gt;&lt;br/&gt;&amp;gt; Maybe querying for a nonce through the lightning network would make&lt;br/&gt;&amp;gt; sense though, which would allow the &amp;#34;invoice&amp;#34; to be static, and all the&lt;br/&gt;&amp;gt; dynamic things would be via lightning p2p? That step could perhaps be&lt;br/&gt;&amp;gt; combined with the 0 satoshi payment probes that Fabrice proposes in&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-October/001484.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-October/001484.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; but I think replying with a public nonce value would need a new message&lt;br/&gt;&amp;gt; type of some sort?&lt;br/&gt;&lt;br/&gt;We might eventually end up going full HORNET, for other reasons.  But it&lt;br/&gt;places demands on the network which need careful consideration, and the&lt;br/&gt;more traffic you send the more chances for analysis.  A single pass is&lt;br/&gt;enough.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think AMP is independent, other than also using secp256k1 preimages&lt;br/&gt;&amp;gt; rather than SHA256. I think AMP splits and joins are just:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - if you&amp;#39;re joining incoming payments, don&amp;#39;t forward until you&amp;#39;ve&lt;br/&gt;&amp;gt;    got all the HTLCs, and ensure you can generate the secret for each&lt;br/&gt;&amp;gt;    incoming payment from the single outgoing payment&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - if you&amp;#39;re splitting an incoming payment into many outgoing payments,&lt;br/&gt;&amp;gt;    ensure you can claim the incoming payment from *any* outgoing&lt;br/&gt;&amp;gt;    payments&amp;#39; secret&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Which I think in practice just means knowing x_i for each input, and&lt;br/&gt;&amp;gt; y_j for each output other than the first, and verifying:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     I_i = O_1 &#43; x_i*G&lt;br/&gt;&amp;gt;     O_j = O_1 &#43; y_j*G&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (this gives I_i = O_j &#43; (x_i-y_j)*G and the corresponding secret being&lt;br/&gt;&amp;gt; i_i = o_j &#43; x_i - y_j) allowing you to claim all incoming HTLCs given&lt;br/&gt;&amp;gt; the secret from any outgoing HTLC)&lt;br/&gt;&lt;br/&gt;I think a general scheme is: payer creates a random group-marker, sends&lt;br/&gt;&amp;lt;group-marker&amp;gt;&amp;lt;32-byte-randomness&amp;gt;[encrypted data...] in each payment.&lt;br/&gt;Receipient collects payments by &amp;lt;group-marker&amp;gt;, xoring the&lt;br/&gt;&amp;lt;32-byte-randomness&amp;gt;; if that xor successfully decrypts the data, you&amp;#39;ve&lt;br/&gt;got all the pieces.&lt;br/&gt;&lt;br/&gt;(For low-AMP, you use payment_hash as &amp;lt;group-marker&amp;gt;, and just use&lt;br/&gt;SHA256(&amp;lt;xor-of-all-randomness&amp;gt;&amp;lt;32-byte-randomness&amp;gt;) as the per-payment&lt;br/&gt;preimage so no [encrypted data] needed).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:52:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfdz8guq2rp6ztl4s9zlzdq4m000r0fryn5y4hs8uew2gws2483cszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz22dljm4</id>
    
      <title type="html">📅 Original date posted:2018-11-01 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfdz8guq2rp6ztl4s9zlzdq4m000r0fryn5y4hs8uew2gws2483cszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz22dljm4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw038hvn7vpdglt62rml5wl4qfw7w8cmu8jzxp78ultkgvwplaxggwxnhhj&#39;&gt;nevent1q…nhhj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;        There&amp;#39;s been some discussion of what the lightning payment flow&lt;br/&gt;might look like in the future, and I thought I&amp;#39;d try to look forwards so&lt;br/&gt;we can avoid painting ourselves into a corner now.  I haven&amp;#39;t spent time&lt;br/&gt;on concrete design and implementation to be sure this is correct,&lt;br/&gt;however.&lt;br/&gt;&lt;br/&gt;Current Status&lt;br/&gt;--------------&lt;br/&gt;Currently, one invoice can be paid 0 or 1 times.  There is no safe&lt;br/&gt;invoice reuse.  The payer can prove the node offered the invoice (it is&lt;br/&gt;signed), and that someone paid the invoice, but not that they&lt;br/&gt;specifically did: the lightning nodes along the path and the merchant&lt;br/&gt;themselves also have the preimage.  This implies that the invoice itself&lt;br/&gt;should have enough information to make that link, eg. with a description&lt;br/&gt;of &amp;#34;1 T-shirt to Rusty in Australia&amp;#34;, otherwise the payer can say &amp;#34;here,&lt;br/&gt;I paid for 1 T-shirt&amp;#34; and the merchant says &amp;#34;no, that invoice was for a&lt;br/&gt;T-shirt we shipped to Austria&amp;#34;.&lt;br/&gt;&lt;br/&gt;Desired Status&lt;br/&gt;--------------&lt;br/&gt;Ideally, you could create one invoice which could be paid arbitrary many&lt;br/&gt;times, by different individuals.  eg. &amp;#34;My donation invoice is on my web&lt;br/&gt;page&amp;#34;, or &amp;#34;I&amp;#39;ve printed out the invoice for a widget and stuck it to the&lt;br/&gt;widget&amp;#34;, or &amp;#34;Pay this invoice once a month please&amp;#34;.&lt;br/&gt;&lt;br/&gt;Also, you should be able to prove you&amp;#39;ve paid, in a way I can&amp;#39;t just&lt;br/&gt;copy the proof and claim I paid, too, even if I&amp;#39;m the merchant, and that&lt;br/&gt;you agreed to my terms, eg. &amp;#34;I&amp;#39;m paying for 500 widgets to be shipped to&lt;br/&gt;Rusty in Australia&amp;#34;.&lt;br/&gt;&lt;br/&gt;Required Magic&lt;br/&gt;--------------&lt;br/&gt;It seems that scriptless scripts will allow this: an HTLC signature&lt;br/&gt;would commit to the invoice/&amp;#34;payment_hash&amp;#34; as well as &amp;#34;something I sent&lt;br/&gt;to you in the payment onion&amp;#34;.  That &amp;#34;something&amp;#34; has to be well-defined&lt;br/&gt;in the protocol, of course, since the merchant will have to parse it and&lt;br/&gt;understand the conditions it presents before accepting the payment.  I&lt;br/&gt;have an idea that we could merkelize the information to allow you to&lt;br/&gt;partially reveal it if you wanted to.&lt;br/&gt;&lt;br/&gt;This also enables full AMP (I think), where you receive the payment&lt;br/&gt;proof despite using AMP.  I call this &amp;#34;High AMP&amp;#34; vs the current proposal&lt;br/&gt;(&amp;#34;Low AMP&amp;#34;) which trusts the merchant to deliver.&lt;br/&gt;&lt;br/&gt;This is a subtle change in semantics: currently the lightning layer only&lt;br/&gt;provides assistance metadata (eg. routing), and the entire protocol can&lt;br/&gt;be played out onchain.  This is no longer true: the onchain data is not&lt;br/&gt;sufficient for you to accept a payment.  However, this was practically&lt;br/&gt;untrue anyway.&lt;br/&gt;&lt;br/&gt;Lesser Magic&lt;br/&gt;------------&lt;br/&gt;It&amp;#39;s possible to do spontaneous donations *without* proof of payment&lt;br/&gt;today (I simply give you the preimage in the onion).  Low-AMP relies on a&lt;br/&gt;similar trick.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s even possible to do recurring payments, if each preimage you get is&lt;br/&gt;the payment_hash for the next payment.&lt;br/&gt;&lt;br/&gt;None of this is supported in the 1.0 protocol, but I&amp;#39;m sure we&amp;#39;ll have&lt;br/&gt;vigorous debate over how much of this gets into 1.1 at the Summit next&lt;br/&gt;week.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:52:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsty6juue5vayezfsyj2p25ck2xz5y5a97al58lgaw6uc07kkd2ggczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2t95xgp</id>
    
      <title type="html">📅 Original date posted:2018-10-12 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsty6juue5vayezfsyj2p25ck2xz5y5a97al58lgaw6uc07kkd2ggczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2t95xgp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv89s4q4qmj07hmjaejueaqyqu2qftw8ckhes3j90k070d3wwph2swp4965&#39;&gt;nevent1q…4965&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;        There have been a number of suggested changes to the commitment&lt;br/&gt;transaction format:&lt;br/&gt;&lt;br/&gt;1. Rather than trying to agree on what fees will be in the future, we&lt;br/&gt;   should use an OP_TRUE-style output to allow CPFP (Roasbeef)&lt;br/&gt;2. The `remotepubkey` should be a BIP-32-style, to avoid the&lt;br/&gt;   option_data_loss_protect &amp;#34;please tell me your current&lt;br/&gt;   per_commitment_point&amp;#34; problem[1]&lt;br/&gt;3. The CLTV timeout should be symmetrical to avoid trying to game the&lt;br/&gt;   peer into closing. (Connor IIRC?).&lt;br/&gt;&lt;br/&gt;It makes sense to combine these into a single `commitment_style2`&lt;br/&gt;feature, rather than having a testing matrix of all these disabled and&lt;br/&gt;enabled.&lt;br/&gt;&lt;br/&gt;BOLT #2:&lt;br/&gt;&lt;br/&gt;- If `commitment_style2` negotiated, update_fee is a protocol error.&lt;br/&gt;&lt;br/&gt;This mainly changes BOLT #3:&lt;br/&gt;&lt;br/&gt;- The feerate for commitment transactions is always 253 satoshi/Sipa.&lt;br/&gt;- Commitment tx always has a P2WSH OP_TRUE output of 1000 satoshi.&lt;br/&gt;- Fees, OP_TRUE are always paid by the initial funder, because it&amp;#39;s simple,&lt;br/&gt;  unless they don&amp;#39;t have funds (eg. push_msat can do this, unless we remove it?)&lt;br/&gt;- HTLC-timeout and HTLC-success txs sigs are &lt;br/&gt;  SIGHASH_ANYONECANPAY|SIGHASH_SINGLE, so you can Bring Your Own Fees.&lt;br/&gt;- `localpubkey`, `remotepubkey`, `local_htlcpubkey`,&lt;br/&gt;  `remote_htlcpubkey`, `local_delayedpubkey`, and `remote_delayedpubkey`&lt;br/&gt;  derivation now uses a two-stage unhardened BIP-32 derivation based on&lt;br/&gt;  the commitment number.  Two-stage because we can have 2^48 txs and&lt;br/&gt;  BIP-32 only supports 2^31: the first 17 bits are used to derive the&lt;br/&gt;  parent for the next 31 bits?&lt;br/&gt;- `to_self_delay` for both sides is the maximum of either the&lt;br/&gt;  `open_channel` or `accept_channel`.&lt;br/&gt;- `to_remote` is now a P2WSH of:&lt;br/&gt;        `to_self_delay` OP_CSV OP_DROP &amp;lt;remotepubkey&amp;gt; OP_CHECKSIG&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] I recently removed checking this field from c-lightning, as I&lt;br/&gt;    couldn&amp;#39;t get it to reliably work under stress-test.  I may just have&lt;br/&gt;    a bug, but we could just fix the spec instead, then we can get our&lt;br/&gt;    funds back even if we never talk to the peer.
    </content>
    <updated>2023-06-09T14:51:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvs259cggtnnhh8xj5k6juxqcwj02ulatt85nqwh6c09vu00efvaczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2nhyjeh</id>
    
      <title type="html">📅 Original date posted:2018-10-12 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvs259cggtnnhh8xj5k6juxqcwj02ulatt85nqwh6c09vu00efvaczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2nhyjeh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvc27j57m53x9y95gg9p6xzvy7es36xuwrwr725dh9d6fsqyt2dqqa7e2wq&#39;&gt;nevent1q…e2wq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Good morning Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In BOLT #2 we currently impose a 2^24 satoshi limit on total channel capacity.  Is splicing intended to allow violation of this limit? I do not see it mentioned in the proposal. Can I splice 21 million bitcoins on a 1-satoshi channel?&lt;br/&gt;&lt;br/&gt;Good question!  I think that&amp;#39;s the kind of thing we should consider&lt;br/&gt;carefully at the Summit.&lt;br/&gt;&lt;br/&gt;&amp;gt; It may be good to start brainstorming possible failure modes during splice, and how to recover, and also to indicate the expected behavior in the proposal, as I believe these will be the points where splicing must be designed most precisely. What happens when a splice is ongoing and the communication gets disconnected?  What happens when some channel failure occurs during splicing and we are forced to drop onchain?  And so on.&lt;br/&gt;&lt;br/&gt;Agreed, but we&amp;#39;re now debating two fairly different methods for&lt;br/&gt;splicing.  Once we&amp;#39;ve decided on that, we can try to design the&lt;br/&gt;proposals themselves.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:51:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2er5ly7euwhdsqv75v2hg8flxq6hc2f8v3n7q3p0c4udewtk69tqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz29nehv5</id>
    
      <title type="html">📅 Original date posted:2018-10-16 📝 Original message: Rusty ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2er5ly7euwhdsqv75v2hg8flxq6hc2f8v3n7q3p0c4udewtk69tqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz29nehv5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsztu4j769gk0skmymysk7kf6v7tj0sx08wx3fdnmesc0lvl8r00tckrywlr&#39;&gt;nevent1q…ywlr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; If we&amp;#39;re going to do side splice-in like this, I would use a very&lt;br/&gt;&amp;gt; different protocol: the reason for this protocol was to treat splice-in&lt;br/&gt;&amp;gt; and splice-out the same, and inline splice-in requires wait time.  Since&lt;br/&gt;&amp;gt; splice-out doesn&amp;#39;t, we don&amp;#39;t need this at all.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It would look much more like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Prepare any output with script of specific form. eg:&lt;br/&gt;&amp;gt;         OP_DEPTH 3 OP_EQUAL OP_IF&lt;br/&gt;&amp;gt;                 &amp;lt;funding_pubkey1&amp;gt; &amp;lt;funding_pubkey2&amp;gt; OP_CHECKMULTISIG&lt;br/&gt;&amp;gt;         OP_ELSE&lt;br/&gt;&amp;gt;                 &amp;lt;blockheight&amp;gt; OP_CHECKLOCKTIMEVERIFY OP_DROP&lt;br/&gt;&amp;gt;                 &amp;lt;myrescue_pubkey&amp;gt; OP_CHECKSIG&lt;br/&gt;&amp;gt;         OP_ENDIF&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 40 (`splice_in`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`8`: `satoshis`]&lt;br/&gt;&amp;gt;    * [`32`: `txid`]&lt;br/&gt;&amp;gt;    * [`4`: `txoutnum`]&lt;br/&gt;&amp;gt;    * [`4`: `blockheight`]&lt;br/&gt;&amp;gt;    * [`33`: `myrescue_pubkey`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 137 (`update_splice_in_accept`) (`option_splice`)&lt;br/&gt;&amp;gt;    data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`32`: `txid`]&lt;br/&gt;&amp;gt;    * [`4`: `txoutnum`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 138 (`update_splice_in_reject`) (`option_splice`)&lt;br/&gt;&amp;gt;    data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`32`: `txid`]&lt;br/&gt;&amp;gt;    * [`2`:`len`]&lt;br/&gt;&amp;gt;    * [`len`:`errorstr`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The recipient of `splice_in` checks that it&amp;#39;s happy with the&lt;br/&gt;&amp;gt; `blockheight` (far enough in future).  Once it sees the tx referred to&lt;br/&gt;&amp;gt; buried to its own `minimum_depth`, it checks output is what they&lt;br/&gt;&amp;gt; claimed, then sends `update_splice_in_accept`; it&amp;#39;s followed up&lt;br/&gt;&amp;gt; `commitment_signed` like normal, but from this point onwards, all&lt;br/&gt;&amp;gt; commitment txs signatures have one extra sig.&lt;br/&gt;&lt;br/&gt;Lisa started asking pointed questions, and so I noticed that parallel&lt;br/&gt;splice doesn&amp;#39;t work with Poon-Dryja channels.&lt;br/&gt;&lt;br/&gt;The counterparty can spend the old funding txout with a revoked spend.&lt;br/&gt;Sure, I can take all the money from that, but what about the spliced&lt;br/&gt;input?&lt;br/&gt;&lt;br/&gt;I came up with increasingly elaborate workarounds, but nothing stuck.&lt;br/&gt;&lt;br/&gt;Back to Plan A...&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:51:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsztu4j769gk0skmymysk7kf6v7tj0sx08wx3fdnmesc0lvl8r00tczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz24c8m93</id>
    
      <title type="html">📅 Original date posted:2018-10-12 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsztu4j769gk0skmymysk7kf6v7tj0sx08wx3fdnmesc0lvl8r00tczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz24c8m93" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstymf9ts4wd4jwvsshe2yyzynh335m5z44denlnexg03p29mnd06q96pkmq&#39;&gt;nevent1q…pkmq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Christian Decker &amp;lt;decker.christian at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; On Thu, Oct 11, 2018 at 3:40 AM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; * Once we have enough confirmations we merge the channels (either&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; automatically or with the next channel update). A new commitment tx is&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; being created which now spends each output of each of the two funding tx&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; and assigns the channel balance to the channel partners accordingly to&lt;br/&gt;&amp;gt;&amp;gt; the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; two independent channels. The old commitment txs are being invalidated.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; * The disadvantage is that while splicing is not completed and if the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; funder of the splicing tx is trying to publish an old commitment tx the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; node will only be punished by sending all the funds of the first funding&lt;br/&gt;&amp;gt;&amp;gt; tx&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; to the partner as the special commitment tx of the 2nd output has no&lt;br/&gt;&amp;gt;&amp;gt; newer&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; state yet.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yes, this is the alternative method; produce a parallel funding tx&lt;br/&gt;&amp;gt;&amp;gt; (which only needs to support a single revocation, or could even be done&lt;br/&gt;&amp;gt;&amp;gt; by a long timeout) and then join them when it reaches the agreed depth.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It has some elegance; particularly because one side doesn&amp;#39;t have to do&lt;br/&gt;&amp;gt;&amp;gt; any validation or store anything until it&amp;#39;s about to splice in.  You get&lt;br/&gt;&amp;gt;&amp;gt; asked for a key and signature, you produce a new one, and sign whatever&lt;br/&gt;&amp;gt;&amp;gt; tx they want.  They hand you back the tx and the key you used once it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; buried far enough, and you check the tx is indeed buried and the output&lt;br/&gt;&amp;gt;&amp;gt; is the script you&amp;#39;re expecting, then you flip the commitment tx.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; But I chose chose not to do this because every transaction commitment&lt;br/&gt;&amp;gt;&amp;gt; forever will require 2 signatures, and doesn&amp;#39;t allow us to forget old&lt;br/&gt;&amp;gt;&amp;gt; revocation information.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; And it has some strange side-effects: onchain this looks like two&lt;br/&gt;&amp;gt;&amp;gt; channels; do we gossip about both?  We have to figure the limit on&lt;br/&gt;&amp;gt;&amp;gt; splice-in to make sure the commitment tx stays under 400kSipa.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is a lot closer to my original proposal for splicing, and I&lt;br/&gt;&amp;gt; still like it a lot more since the transition from old to new&lt;br/&gt;&amp;gt; channel is bascially atomic (not having to update state on both&lt;br/&gt;&amp;gt; pre-splice and post-splice version). The new funds will remain&lt;br/&gt;&amp;gt; unavailable for the same time, and since we allow only one&lt;br/&gt;&amp;gt; concurrent splice in your proposal we don&amp;#39;t even lose any&lt;br/&gt;&amp;gt; additional time regarding the splice-outs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So pulling the splice_add_input and splice_add_output up to&lt;br/&gt;&amp;gt; signal the intent of adding funds to a splice. Splice_all_added&lt;br/&gt;&amp;gt; is then used to start moving the funds to a pre-allocated 2-of-2&lt;br/&gt;&amp;gt; output where the funds can mature. Once the funds are&lt;br/&gt;&amp;gt; matured (e.g., 6 confirmations) we can start the transition: both&lt;br/&gt;&amp;gt; parties claim the funding output, and the pre-allocated funds, to&lt;br/&gt;&amp;gt; create a new funding tx which is immediately broadcast, and we&lt;br/&gt;&amp;gt; flip over to the new channel state. No need to keep parallel&lt;br/&gt;&amp;gt; state and then disambiguating which one it was.&lt;br/&gt;&lt;br/&gt;If we&amp;#39;re going to do side splice-in like this, I would use a very&lt;br/&gt;different protocol: the reason for this protocol was to treat splice-in&lt;br/&gt;and splice-out the same, and inline splice-in requires wait time.  Since&lt;br/&gt;splice-out doesn&amp;#39;t, we don&amp;#39;t need this at all.&lt;br/&gt;&lt;br/&gt;It would look much more like:&lt;br/&gt;&lt;br/&gt;1. Prepare any output with script of specific form. eg:&lt;br/&gt;        OP_DEPTH 3 OP_EQUAL OP_IF&lt;br/&gt;                &amp;lt;funding_pubkey1&amp;gt; &amp;lt;funding_pubkey2&amp;gt; OP_CHECKMULTISIG&lt;br/&gt;        OP_ELSE&lt;br/&gt;                &amp;lt;blockheight&amp;gt; OP_CHECKLOCKTIMEVERIFY OP_DROP&lt;br/&gt;                &amp;lt;myrescue_pubkey&amp;gt; OP_CHECKSIG&lt;br/&gt;        OP_ENDIF&lt;br/&gt;&lt;br/&gt;1. type: 40 (`splice_in`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`8`: `satoshis`]&lt;br/&gt;   * [`32`: `txid`]&lt;br/&gt;   * [`4`: `txoutnum`]&lt;br/&gt;   * [`4`: `blockheight`]&lt;br/&gt;   * [`33`: `myrescue_pubkey`]&lt;br/&gt;&lt;br/&gt;1. type: 137 (`update_splice_in_accept`) (`option_splice`)&lt;br/&gt;   data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`32`: `txid`]&lt;br/&gt;   * [`4`: `txoutnum`]&lt;br/&gt;&lt;br/&gt;1. type: 138 (`update_splice_in_reject`) (`option_splice`)&lt;br/&gt;   data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`32`: `txid`]&lt;br/&gt;   * [`2`:`len`]&lt;br/&gt;   * [`len`:`errorstr`]&lt;br/&gt;&lt;br/&gt;The recipient of `splice_in` checks that it&amp;#39;s happy with the&lt;br/&gt;`blockheight` (far enough in future).  Once it sees the tx referred to&lt;br/&gt;buried to its own `minimum_depth`, it checks output is what they&lt;br/&gt;claimed, then sends `update_splice_in_accept`; it&amp;#39;s followed up&lt;br/&gt;`commitment_signed` like normal, but from this point onwards, all&lt;br/&gt;commitment txs signatures have one extra sig.&lt;br/&gt;&lt;br/&gt;Similarly, splice-out:&lt;br/&gt;&lt;br/&gt;1. type: 139 (`update_splice_out`) (`option_splice`)&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`8`: `satoshis`]&lt;br/&gt;   * [`2`: `scriptlen`]&lt;br/&gt;   * [`scriptlen`: `outscript`]&lt;br/&gt;&lt;br/&gt;The recipient checks that the output script is standard, and the amount&lt;br/&gt;can be afforded by the other side.  From then on, each commitment tx has&lt;br/&gt;a new output.&lt;br/&gt;&lt;br/&gt;Note this doesn&amp;#39;t put the splice out on the blockchain!&lt;br/&gt;&lt;br/&gt;1. type: 140 (`propose_reopen`) (`option_splice`)&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`4`:`feerate_per_kw`]&lt;br/&gt;   * [`33`:`funding_pubkey`]&lt;br/&gt;&lt;br/&gt;This is initiates a mutually-agreed broadcast of the current state: all&lt;br/&gt;inputs (original and spliced), all spliced outputs, and a funding-style&lt;br/&gt;2x2 which has all the remaining funds.  Call this a &amp;#39;reopen tx&amp;#39;.&lt;br/&gt;&lt;br/&gt;This must be done with no outstanding commitments, like closing tx&lt;br/&gt;negotiation, and it&amp;#39;s a back-and-forth until both sides agree on&lt;br/&gt;feerate.  Then you send:&lt;br/&gt;&lt;br/&gt;1. type: 141 (`reopen_accept`) (`option_splice`)&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`4`:`feerate_per_kw`]&lt;br/&gt;   * [`64`: `new_commitment_sig`]&lt;br/&gt;&lt;br/&gt;Once you&amp;#39;ve received and sent this, you&amp;#39;re ready to sign the reopen tx:&lt;br/&gt;&lt;br/&gt;1. type: 142 (`reopen`) (`option_splice`)&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`64`: `reopen_commitment_sig`]&lt;br/&gt;&lt;br/&gt;We need similar &amp;#39;what happens on reconnect at various points&amp;#39; logic to&lt;br/&gt;the previous one &amp;lt;handwave&amp;gt;.&lt;br/&gt;&lt;br/&gt;Once you&amp;#39;ve sent and received the `reopen`, you can broadcast the reopen&lt;br/&gt;tx at will and start updating again.  If we recommend that public&lt;br/&gt;channels reuse their old `funding_pubkey` then that means that we should&lt;br/&gt;also have gossip continuity for upgraded nodes, and don&amp;#39;t need the&lt;br/&gt;previous channel_update hack.&lt;br/&gt;&lt;br/&gt;We could add a new `reopen_locked` message which indicates that both&lt;br/&gt;sides are happy with the reopen depth, if we don&amp;#39;t want to allow reopens&lt;br/&gt;back-to-back?&lt;br/&gt;&lt;br/&gt;&amp;gt; This is one of the cases where a simpler solution (relatively&lt;br/&gt;&amp;gt; speaking ^^) is to be preferred imho, allowing for future&lt;br/&gt;&amp;gt; iterations.&lt;br/&gt;&lt;br/&gt;Unless we can have both :)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:51:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2t7tf78gqr0cu2llany3duy6umkpj2cltmrnn6rs3r6q9vrr5lhczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2feqx5w</id>
    
      <title type="html">📅 Original date posted:2018-10-10 📝 Original message: René ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2t7tf78gqr0cu2llany3duy6umkpj2cltmrnn6rs3r6q9vrr5lhczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2feqx5w" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfun6lsj20d57xn58yjamxd3vjr2pkdsrst2mgwkas6m7j3fxp3pc4c8us8&#39;&gt;nevent1q…8us8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-10&lt;br/&gt;📝 Original message:&lt;br/&gt;René Pickhardt &amp;lt;r.pickhardt at googlemail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; So let us take the example of Splicing in:&lt;br/&gt;&amp;gt; * The situation before splicing is that we have one output in our funding&lt;br/&gt;&amp;gt; tx that is being spent with each commitment tx. (actually if the channel&lt;br/&gt;&amp;gt; was spliced before we have more inputs but that should not change anything)&lt;br/&gt;&amp;gt; * Splice in would create one additional output that can be spent in future&lt;br/&gt;&amp;gt; commitment tx.&lt;br/&gt;&amp;gt; * I propose while splicing in this output should be spent by a special&lt;br/&gt;&amp;gt; commitment tx which goes to the funder of the splicing operation. This&lt;br/&gt;&amp;gt; should happen before the actual funding takes place. The other commitment&lt;br/&gt;&amp;gt; tx spending the original output continues to operate (assuring non blocking&lt;br/&gt;&amp;gt; splice in operation).&lt;br/&gt;&amp;gt; * Once we have enough confirmations we merge the channels (either&lt;br/&gt;&amp;gt; automatically or with the next channel update). A new commitment tx is&lt;br/&gt;&amp;gt; being created which now spends each output of each of the two funding tx&lt;br/&gt;&amp;gt; and assigns the channel balance to the channel partners accordingly to the&lt;br/&gt;&amp;gt; two independent channels. The old commitment txs are being invalidated.&lt;br/&gt;&amp;gt; * The disadvantage is that while splicing is not completed and if the&lt;br/&gt;&amp;gt; funder of the splicing tx is trying to publish an old commitment tx the&lt;br/&gt;&amp;gt; node will only be punished by sending all the funds of the first funding tx&lt;br/&gt;&amp;gt; to the partner as the special commitment tx of the 2nd output has no newer&lt;br/&gt;&amp;gt; state yet.&lt;br/&gt;&lt;br/&gt;Yes, this is the alternative method; produce a parallel funding tx&lt;br/&gt;(which only needs to support a single revocation, or could even be done&lt;br/&gt;by a long timeout) and then join them when it reaches the agreed depth.&lt;br/&gt;&lt;br/&gt;It has some elegance; particularly because one side doesn&amp;#39;t have to do&lt;br/&gt;any validation or store anything until it&amp;#39;s about to splice in.  You get&lt;br/&gt;asked for a key and signature, you produce a new one, and sign whatever&lt;br/&gt;tx they want.  They hand you back the tx and the key you used once it&amp;#39;s&lt;br/&gt;buried far enough, and you check the tx is indeed buried and the output&lt;br/&gt;is the script you&amp;#39;re expecting, then you flip the commitment tx.&lt;br/&gt;&lt;br/&gt;But I chose chose not to do this because every transaction commitment&lt;br/&gt;forever will require 2 signatures, and doesn&amp;#39;t allow us to forget old&lt;br/&gt;revocation information.&lt;br/&gt;&lt;br/&gt;And it has some strange side-effects: onchain this looks like two&lt;br/&gt;channels; do we gossip about both?  We have to figure the limit on&lt;br/&gt;splice-in to make sure the commitment tx stays under 400kSipa.&lt;br/&gt;&lt;br/&gt;&amp;gt; I believe splicing out is even safer:&lt;br/&gt;&amp;gt; * One just creates a spent of the funding tx which has two outputs. One&lt;br/&gt;&amp;gt; output goes to the recipient of the splice out operation and the second&lt;br/&gt;&amp;gt; output acts as a new funding transaction for the newly spliced channel.&lt;br/&gt;&amp;gt; Once signatures for the new commitment transaction are exchanged (basically&lt;br/&gt;&amp;gt; following the protocol to open a channel) the splicing operation can be&lt;br/&gt;&amp;gt; broadcasted.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * The old channel MUST NOT be used anymore but the new channel can be&lt;br/&gt;&amp;gt; operational right away without blockchain confirmation. In case someone&lt;br/&gt;&amp;gt; tries to publish an old state of the old channel it will be a double spent&lt;br/&gt;&amp;gt; of the splicing operation and in the worst case will be punished and the&lt;br/&gt;&amp;gt; splicing was not successful.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  if one publishes an old state of the new&lt;br/&gt;&amp;gt; channel everything will just work as normal even if the funding tx is not&lt;br/&gt;&amp;gt; yet mined. It could only be replaced with an old state of the previous&lt;br/&gt;&amp;gt; channel (which as we saw is not a larger risk than the usual operation of a&lt;br/&gt;&amp;gt; lightning node)&lt;br/&gt;&lt;br/&gt;Right, you&amp;#39;re relying on CPFP pushing through the splice-out tx if it&lt;br/&gt;gets stuck.  This requires that we check carefully for standardness and&lt;br/&gt;other constraints which might prevent this; for example, we can&amp;#39;t allow&lt;br/&gt;more than 20 (?) of these in a row without being sufficiently buried&lt;br/&gt;since I think that&amp;#39;s where CPFP calculations top out.&lt;br/&gt;&lt;br/&gt;&amp;gt; As mentioned maybe you had this workflow already in your mind but I don&amp;#39;t&lt;br/&gt;&amp;gt; see why we need to send around all the messages twice with my workflow. We&lt;br/&gt;&amp;gt; only need to maintain double state but only until it is fair / safe to do&lt;br/&gt;&amp;gt; so. I would also believe that with my approach it should be possible (but&lt;br/&gt;&amp;gt; not really necessary) to have multiple splicing operations in parallel.&lt;br/&gt;&lt;br/&gt;The extra sigs are only needed in transition, though; once splicing is&lt;br/&gt;over the channel looks exactly like a newly created one, which is nice.&lt;br/&gt;&lt;br/&gt;&amp;gt; One other question: What happens to the short_channel_id of a channel to&lt;br/&gt;&amp;gt; which founds have been spliced in?&lt;br/&gt;&lt;br/&gt;In the parallel splice world, they look like two channels.  In my&lt;br/&gt;proposal it looks like a new channel, with a channel_update to make sure&lt;br/&gt;modern nodes know that the transition is happening.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:51:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0cggwnr6wqqzzpd9nfvdrpc3mdmttjtghmsxxnmlsa8ey9f9nd9szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2t9akfm</id>
    
      <title type="html">📅 Original date posted:2018-10-10 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0cggwnr6wqqzzpd9nfvdrpc3mdmttjtghmsxxnmlsa8ey9f9nd9szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2t9akfm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdxwph5yysv2tvm267tleerq66z27n7hf8hkkqw2tpkg8sjjz45nglltnds&#39;&gt;nevent1q…tnds&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all!&lt;br/&gt;&lt;br/&gt;        We&amp;#39;ve had increasing numbers of c-lightning users get upset they&lt;br/&gt;can&amp;#39;t open multiple channels, so I guess we&amp;#39;re most motivated to allow&lt;br/&gt;splicing of existing channels.  Hence this rough proposal.&lt;br/&gt;&lt;br/&gt;For simplicity, I&amp;#39;ve chosen to only allow a single splice at a time.&lt;br/&gt;It&amp;#39;s still complex :(&lt;br/&gt;&lt;br/&gt;Feedback welcome!&lt;br/&gt;--&lt;br/&gt;Splice Negotiation:&lt;br/&gt;&lt;br/&gt;1. type: 40 (`splice_add_input`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`8`: `satoshis`]&lt;br/&gt;   * [`32`: `prevtxid`]&lt;br/&gt;   * [`4`: `prevtxoutnum`]&lt;br/&gt;   * [`2`: `scriptlen`]&lt;br/&gt;   * [`scriptlen`: `scriptpubkey`]&lt;br/&gt;&lt;br/&gt;1. type: 41 (`splice_add_output`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`8`: `satoshis`]&lt;br/&gt;   * [`2`: `scriptlen`]&lt;br/&gt;   * [`scriptlen`: `outscript`]&lt;br/&gt;&lt;br/&gt;1. type: 42 (`splice_all_added`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`4`:`feerate_per_kw`]&lt;br/&gt;   * [`4`:`minimum_depth`]&lt;br/&gt;&lt;br/&gt;Each side sends 0 or more `splice_add_input` and 0 or more&lt;br/&gt;`splice_add_output` followed by `spice_all_added` to complete the splice&lt;br/&gt;proposal.  This is done either to initiate a splice, or to respond to a&lt;br/&gt;`splice_*` from the other party.&lt;br/&gt;&lt;br/&gt;`splice_add_input` is checked for the following:&lt;br/&gt;- must not be during a current splice&lt;br/&gt;- scriptpubkey is empty, or of form &amp;#39;HASH160 &amp;lt;20-byte-script-hash&amp;gt; EQUAL&amp;#39;&lt;br/&gt;- `satoshis` doesn&amp;#39;t wrap on addition.&lt;br/&gt;- MAY check that it matches outpoint specified (sig will simply be&lt;br/&gt;  invalid if so), and that outpoint is segwit.&lt;br/&gt;&lt;br/&gt;`splice_add_output` is checked for the following:&lt;br/&gt;- must not be during a current splice&lt;br/&gt;- `satoshis` is less than or equal to amount owing to proposer, minus&lt;br/&gt;  current reserve, and greater than or equal to `dust_limit_satoshis` we&lt;br/&gt;  sent in our open_channel/accept_channel ,sg.&lt;br/&gt;- script is one of the approved forms as it is for `shutdown`.&lt;br/&gt;&lt;br/&gt;FIXME: Do we disallow splice-out if they specified&lt;br/&gt;       option_upfront_shutdown_script?&lt;br/&gt;&lt;br/&gt;`splice_all_added` is checked for the following:&lt;br/&gt;- average of `feerate_per_kw` by both sides (round down) is sufficient.&lt;br/&gt;- average of `feerate_per_kw` by both sides not grossly excessive, if we&amp;#39;re&lt;br/&gt;  paying some of the fees (see below!)&lt;br/&gt;- both sides can afford the fees from their post-splice funds (see&lt;br/&gt;  Verification Changes below)&lt;br/&gt;- maximum of the two `minimum_depth` is not grossly excessive.&lt;br/&gt;- There is at least one splice_add_input or splice_add_output.&lt;br/&gt;&lt;br/&gt;Splice negotiation, like closing negotiation, does not have persistent&lt;br/&gt;state.  Reconnecting forgets previous negotiation.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Splice Signing&lt;br/&gt;--------------&lt;br/&gt;&lt;br/&gt;Once `splice_all_added` is both sent and received, we need to create and&lt;br/&gt;sign both the splice tx itself, and the first commitment transaction&lt;br/&gt;which spends it (but not in that order!).&lt;br/&gt;&lt;br/&gt;1. One input spends the current funding tx output.&lt;br/&gt;2. There is one additional input for each splice_add_input.&lt;br/&gt;3. One output creates the new funding tx.&lt;br/&gt;4. There is one additional output for each splice_add_output.&lt;br/&gt;5. The entire transaction is sorted into BIP69 order.&lt;br/&gt;6. The feerate is the sum of the two `feerate_per_kw` divided by 2,&lt;br/&gt;   rounded down.&lt;br/&gt;&lt;br/&gt;1. type: 43 (`splice_commitment_signature`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`64`:`commitment_signature`]&lt;br/&gt;   * [`2`:`num_htlcs`]&lt;br/&gt;   * [`num_htlcs*64`:`htlc_signature`]&lt;br/&gt;&lt;br/&gt;1. type: 44 (`splice_signature`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`64`:`splice_signature`]&lt;br/&gt;&lt;br/&gt;1. type: 45 (`splice_witness`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`2`: `num_witness_elements`&lt;br/&gt;   * [`2`:`len`]&lt;br/&gt;   * [`len`:`witnesses`]&lt;br/&gt;&lt;br/&gt;`witnesses` itself is serialized as `num_witness_elements` of:&lt;br/&gt;* `2`:`len`&lt;br/&gt;* `len`: `witness_element`&lt;br/&gt;&lt;br/&gt;Each side sends `splice_commitment_signature` and waits to receive and&lt;br/&gt;verify the other side&amp;#39;s `splice_commitment_signature` before sending&lt;br/&gt;`splice_signature` and `splice_witness` for each `splice_add_input` it&lt;br/&gt;proposed, in BIP69 input order.&lt;br/&gt;&lt;br/&gt;Once a node has sent `splice_commitment_signature` it should remember&lt;br/&gt;the splice proposal across reconnects.  Once it has both sent&lt;br/&gt;`splice_signature`, the splice is locked in.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Splice Announcement&lt;br/&gt;-------------------&lt;br/&gt;&lt;br/&gt;We have to tell the network about the new channel, otherwise there will&lt;br/&gt;be a distruption when it sees the old funding transaction spent.  This&lt;br/&gt;is inevitable for older nodes who won&amp;#39;t understand splicing anyway.&lt;br/&gt;&lt;br/&gt;We can&amp;#39;t send out a `channel_announcement` or `channel_update` for the&lt;br/&gt;new channel until after the new funding transaction has 6 confirmations,&lt;br/&gt;so we append to the existing `channel_update` for the original channel,&lt;br/&gt;using a new `message_flags` field:&lt;br/&gt;&lt;br/&gt;| Bit Position  | Name                      | Field                            |&lt;br/&gt;| ------------- | ------------------------- | -------------------------------- |&lt;br/&gt;| 0             | `option_channel_htlc_max` | `htlc_maximum_msat`              |&lt;br/&gt;| 1             | `option_channel_moving`   | `moving_txid                     |&lt;br/&gt;&lt;br/&gt;The `channel_update` gains the following field:&lt;br/&gt;    * [`32`: moving_txid`] (option_channel_moving)&lt;br/&gt;&lt;br/&gt;If a current `channel_update` for a closing channel contains&lt;br/&gt;`option_channel_moving` a node SHOULD ignore the channel close for at&lt;br/&gt;least 100 blocks iff spent by `moving_txid`.&lt;br/&gt;&lt;br/&gt;A node SHOULD immediately forward a `channel_update` it sees containing&lt;br/&gt;`option_channel_moving` if neither previous `channel_update` for the&lt;br/&gt;channel contains `option_channel_moving`.&lt;br/&gt;&lt;br/&gt;Each side of the splice can send these unilaterally, and SHOULD allow a&lt;br/&gt;few minutes for propagation (remember, average propagation from old&lt;br/&gt;nodes is still 30 seconds) prior to broadcast of the splice transaction.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Message Changes During Splicing&lt;br/&gt;-------------------------------&lt;br/&gt;Once you&amp;#39;ve sent `splice_commitment_signature` each commitment&lt;br/&gt;transaction is duplicated: one spends the old funding transaction, one&lt;br/&gt;spends the splice transaction:&lt;br/&gt;&lt;br/&gt;1. type: 39 (`closing_signed`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`8`:`fee_satoshis`]&lt;br/&gt;   * [`64`:`signature`]&lt;br/&gt;   * [`64`:`splice_signature`] (`option_splice`)&lt;br/&gt;&lt;br/&gt;1. type: 132 (`commitment_signed`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`64`:`signature`]&lt;br/&gt;   * [`2`:`num_htlcs`]&lt;br/&gt;   * [`num_htlcs*64`:`htlc_signature`]&lt;br/&gt;   * [`num_htlcs*64`:`htlc_splice_signature`] (`option_splice`)&lt;br/&gt;&lt;br/&gt;If a reconnection occurs between between sending and receiving&lt;br/&gt;`splice_commitment_signature`) the peer&amp;#39;s status is uncertain (similarly&lt;br/&gt;for closing).  This we have a new field in `channel_reestablish` to flag&lt;br/&gt;that we consider ourselves to be splicing:&lt;br/&gt;&lt;br/&gt;1. type: 136 (`channel_reestablish`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;   * [`8`:`next_local_commitment_number`]&lt;br/&gt;   * [`8`:`next_remote_revocation_number`]&lt;br/&gt;   * [`32`:`your_last_per_commitment_secret`] (`option_data_loss_protect`)&lt;br/&gt;   * [`33`:`my_current_per_commitment_point`] (`option_data_loss_protect`)&lt;br/&gt;   * [`32`:`splice_txid`] (`option_splice`)&lt;br/&gt;&lt;br/&gt;The splice_txid field indicates that this side considers itself to be&lt;br/&gt;splicing.&lt;br/&gt;&lt;br/&gt;The sender:&lt;br/&gt;- if it has sent `splice_commitment_signature` and not sent the corresponding&lt;br/&gt;  `splice_closed`, MUST set `splice_txid` to the txid of the splice tx.&lt;br/&gt;   - Otherwise MUST NOT.&lt;br/&gt;&lt;br/&gt;The recipient:&lt;br/&gt;- if it has sent `splice_commitment_signature` and not sent the corresponding&lt;br/&gt;  `splice_closed`:&lt;br/&gt;  - if `splice_txid` does not exist or does not match the current splice:&lt;br/&gt;    - SHOULD fail the channel&lt;br/&gt;  - otherwise:&lt;br/&gt;    - MUST retransmit `splice_signature`&lt;br/&gt;- otherwise:&lt;br/&gt;  - if `splice_txid` field exists and is not all zeroes:&lt;br/&gt;    - MUST send `splice_closed`&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Validation Changes During Splicing&lt;br/&gt;----------------------------------&lt;br/&gt;We track &amp;#34;post-splice&amp;#34; values as well as current values during&lt;br/&gt;splicing.&lt;br/&gt;&lt;br/&gt;The post-splice reserve is 1% of post-splice capcacity (rounded down).&lt;br/&gt;&lt;br/&gt;The fees for the splicing transaction itself are divided into parts by&lt;br/&gt;the number of `splice_add_input` plus `splice_add_output`, rounded up.&lt;br/&gt;Each side pays as many parts as it proposed `splice_add_input` plus&lt;br/&gt;`splice_add_output`.&lt;br/&gt;&lt;br/&gt;(So if Alice proposes two and Bob proposes one, and the total fee is 1000&lt;br/&gt;satoshi, each part is 334 satoshi: Alice pays 668 and Bob pays 334.)&lt;br/&gt;&lt;br/&gt;Each side&amp;#39;s post-splice funds are debited their `splice_add_output`&lt;br/&gt;amounts, and credited their `splice_add_input` amounts, a debited the&lt;br/&gt;splice tx fees.  If any debiting occurs, the funds must be above the&lt;br/&gt;post-splice reserve (ie. you can have below reserve, but you can&amp;#39;t spend&lt;br/&gt;if you&amp;#39;re below reserve).&lt;br/&gt;&lt;br/&gt;All update_add_htlc must be valid for the *both* the current and&lt;br/&gt;post-splice balances.&lt;br/&gt;&lt;br/&gt;Completing Splicing&lt;br/&gt;-------------------&lt;br/&gt;Once you&amp;#39;ve seen both side&amp;#39;s `minimum_depth` confirmations of the splice&lt;br/&gt;transaction (ie. the maximum of the two `minimum_depth` values), you can&lt;br/&gt;complete the splice by sending:&lt;br/&gt;&lt;br/&gt;1. type: 46 (`splice_closed`) (`option_splice`)&lt;br/&gt;2. data:&lt;br/&gt;   * [`32`:`channel_id`]&lt;br/&gt;&lt;br/&gt;Once you&amp;#39;ve sent and received `splice_closed` you can send&lt;br/&gt;`announcement_signatures` for the new channel as per normal rules (ie. 6&lt;br/&gt;confirmations, `announce_channel` bit set).&lt;br/&gt;&lt;br/&gt;In addition, you can forget everything about the old channel (including&lt;br/&gt;old HTLCs and revocation requirements).
    </content>
    <updated>2023-06-09T14:51:35&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2kppz435h6l0av2v2xw4kr6emyd62nxttyag8hpe78mmvnhgjqlczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2m9aqgr</id>
    
      <title type="html">📅 Original date posted:2018-10-09 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2kppz435h6l0av2v2xw4kr6emyd62nxttyag8hpe78mmvnhgjqlczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2m9aqgr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxj7z5xk7c40nx5pa7j4y06p2579arupgx8qu7zlq2dn2m7h3aepqcr456t&#39;&gt;nevent1q…456t&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Pierre &amp;lt;pm&#43;lists at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; But there&amp;#39;s no reason to believe that the invoicer has more knowledge about all but the last hop.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I disagree: there is a good chance that the receiver is a 24/7 running&lt;br/&gt;&amp;gt; merchant/website, with a full up-to-date view of the network, whereas&lt;br/&gt;&amp;gt; the payer is most likely a mobile wallet with less&lt;br/&gt;&amp;gt; accurate/partial/out of date information.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At least this is what we are seeing on the current mainnet. Routing&lt;br/&gt;&amp;gt; table sync is hard on mobile clients, and I think that it makes sense&lt;br/&gt;&amp;gt; that receivers &amp;#34;help&amp;#34; senders, after all incentives are aligned.&lt;br/&gt;&lt;br/&gt;Good qualification; I agree.  Certainly if the payer knows its&lt;br/&gt;information is less reliable it should prefer the provided route.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:51:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9kjsymyewcvhle7n0g2xaumug9x4uy0ctz4tnruqpeaschgcm49szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2mx2ey4</id>
    
      <title type="html">📅 Original date posted:2018-10-08 📝 Original message: Matt ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9kjsymyewcvhle7n0g2xaumug9x4uy0ctz4tnruqpeaschgcm49szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2mx2ey4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2a9zcadlrp6zqgxp4np459ucz4kkc5x2m73e22qf96plvh06lqjsz8y6de&#39;&gt;nevent1q…y6de&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; writes:&lt;br/&gt;&amp;gt; On a related note, it would be nice to get some clarity on appropriate&lt;br/&gt;&amp;gt; usage of the r= field here.&lt;br/&gt;&amp;gt; The way I had implemented it initially was that if an invoice had an r=&lt;br/&gt;&amp;gt; field any publicly-discovered last-hop routes would be ignored as the r=&lt;br/&gt;&amp;gt; data is most likely more up-to-date than any public route rumor information.&lt;br/&gt;&lt;br/&gt;&amp;gt; However, if it&amp;#39;s only used as a hint and only one or two out of&lt;br/&gt;&amp;gt; potentially many channels are included in it, that may make little sense.&lt;br/&gt;&lt;br/&gt;There were originally two proposed uses of r=:&lt;br/&gt;&lt;br/&gt;1. For payments via unannounced channels.&lt;br/&gt;2. For routing hints for nodes which don&amp;#39;t have a complete topology.&lt;br/&gt;&lt;br/&gt;&amp;gt; Not really sure what the appropriate guidance should be, probably&lt;br/&gt;&amp;gt; something like SHOULD prefer to use invoice-r=-provided-hints over&lt;br/&gt;&amp;gt; publicly-discovered routes however MAY use other last-hops in case a&lt;br/&gt;&amp;gt; substantially better route is known?&lt;br/&gt;&lt;br/&gt;Note that r can provide zero-or-more full routes, not just a single hop&lt;br/&gt;as is done here.  But there&amp;#39;s no reason to believe that the invoicer has&lt;br/&gt;more knowledge about all but the last hop.&lt;br/&gt;&lt;br/&gt;So, I&amp;#39;d recommend that the payer SHOULD prefer to use the final hops&lt;br/&gt;specified in `r` fields over other equivalent routes it knows.&lt;br/&gt;&lt;br/&gt;(Note the weasel word &amp;#34;equivalent&amp;#34; here: you might bias against these&lt;br/&gt;due to fees, timeouts, or even privacy concerns.  Also note that I&lt;br/&gt;haven&amp;#39;t implemented this yet!).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:51:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxpfxqygnyr4f9zkx94smyfr0ky6nsr9lvymuvxc7q3ltczf5rkxqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz203lqd9</id>
    
      <title type="html">📅 Original date posted:2018-05-09 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxpfxqygnyr4f9zkx94smyfr0ky6nsr9lvymuvxc7q3ltczf5rkxqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz203lqd9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst2cxfan6txqzaevtdqzg4p3xpcs0l0n23fhptqwyceljjqllqrqqvfsg9u&#39;&gt;nevent1q…sg9u&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; On Mon, May 07, 2018 at 09:40:46PM &#43;0200, Christian Decker via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt; Given the general enthusiasm, and lack of major criticism, for the&lt;br/&gt;&amp;gt;&amp;gt; `SIGHASH_NOINPUT` proposal, [...]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So first, I&amp;#39;m not sure if I&amp;#39;m actually criticising or playing devil&amp;#39;s&lt;br/&gt;&amp;gt; advocate here, but either way I think criticism always helps produce&lt;br/&gt;&amp;gt; the best proposal, so....&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The big concern I have with _NOINPUT is that it has a huge failure&lt;br/&gt;&amp;gt; case: if you use the same key for multiple inputs and sign one of them&lt;br/&gt;&amp;gt; with _NOINPUT, you&amp;#39;ve spent all of them. The current proposal kind-of&lt;br/&gt;&amp;gt; limits the potential damage by still committing to the prevout amount,&lt;br/&gt;&amp;gt; but it still seems a big risk for all the people that reuse addresses,&lt;br/&gt;&amp;gt; which seems to be just about everyone.&lt;br/&gt;&lt;br/&gt;If I can convince you to sign with SIGHASH_NONE, it&amp;#39;s already a problem&lt;br/&gt;today.&lt;br/&gt;&lt;br/&gt;&amp;gt; I wonder if it wouldn&amp;#39;t be ... I&amp;#39;m not sure better is the right word,&lt;br/&gt;&amp;gt; but perhaps &amp;#34;more realistic&amp;#34; to have _NOINPUT be a flag to a signature&lt;br/&gt;&amp;gt; for a hypothetical &amp;#34;OP_CHECK_SIG_FOR_SINGLE_USE_KEY&amp;#34; opcode instead,&lt;br/&gt;&amp;gt; so that it&amp;#39;s fundamentally not possible to trick someone who regularly&lt;br/&gt;&amp;gt; reuses keys to sign something for one input that accidently authorises&lt;br/&gt;&amp;gt; spends of other inputs as well.&lt;br/&gt;&lt;br/&gt;That was also suggested by Mark Friedenbach, but I think we&amp;#39;ll end up&lt;br/&gt;with more &amp;#34;magic key&amp;#34; a-la Schnorr/taproot/graftroot and less script in&lt;br/&gt;future.&lt;br/&gt;&lt;br/&gt;That means we&amp;#39;d actually want a different Segwit version for&lt;br/&gt;&amp;#34;NOINPUT-can-be-used&amp;#34;, which seems super ugly.&lt;br/&gt;&lt;br/&gt;&amp;gt; Maybe a different opcode maybe makes sense at a &amp;#34;philosophical&amp;#34; level:&lt;br/&gt;&amp;gt; normal signatures are signing a spend of a particular &amp;#34;coin&amp;#34; (in the&lt;br/&gt;&amp;gt; UTXO sense), while _NOINPUT signatures are in some sense signing a spend&lt;br/&gt;&amp;gt; of an entire &amp;#34;wallet&amp;#34; (all the coins spendable by a particular key, or&lt;br/&gt;&amp;gt; more accurately for the current proposal, all the coins of a particular&lt;br/&gt;&amp;gt; value spendable by a particular key). Those are different intentions,&lt;br/&gt;&amp;gt; so maybe it&amp;#39;s reasonable to encode them in different addresses, which&lt;br/&gt;&amp;gt; in turn could be done by having a new opcode for _NOINPUT.&lt;br/&gt;&lt;br/&gt;In a world where SIGHASH_NONE didn&amp;#39;t exist, this might be an argument :)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:50:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs00llqswqh4vym0a9ndgu9ys6wr7cn20f5q6xstwjh66lwkwl4pjczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2y0qhkr</id>
    
      <title type="html">📅 Original date posted:2018-05-18 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs00llqswqh4vym0a9ndgu9ys6wr7cn20f5q6xstwjh66lwkwl4pjczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2y0qhkr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs83zdyj8vtpqaqsxr6hzt3zqtjf7cvpms4u9cpemwtugjjnyac5asscuhr9&#39;&gt;nevent1q…uhr9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-18&lt;br/&gt;📝 Original message:&lt;br/&gt;ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Please describe the below:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 1.  Behavior if payment succeeds after T time.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 2.  Behavior if payment fails after T time.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; It seems you only described &amp;#34;Behavior if payment succeeds after T time&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Ah, sorry if I didn&amp;#39;t make that clear. The reputation is increased in the case of successful payments by the fee collected. The reputation is decreased on the downstream peer proportional to time T regardless of whether the payment succeeds or fails. If a payment succeeds quickly, the increase should outweigh the decrease, but if the payment succeeds after a long time, the change in reputation may be net negative. If the payment fails, the upstream peer&amp;#39;s reputation does not change and the downstream peer&amp;#39;s reputation always decreases proportional to time T.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thank you.  So:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  If payment succeeds after T time, upstream reputation is increased by fee earned, downstream reputation is increased by fee earned, downstream reputation is decreased by T * reputation_loss_rate.&lt;br/&gt;&amp;gt; 2.  If payment fails after T time, downstream reputation is decreased by T * reputation_loss_rate.&lt;br/&gt;&lt;br/&gt;So, to be clear, there&amp;#39;s no *financial* fee on failure, just reputation&lt;br/&gt;fee?&lt;br/&gt;&lt;br/&gt;Also, you talked about reputation_loss_rate as being a private per-node&lt;br/&gt;thing, and being an explicit thing in the HTLC.  I&amp;#39;m ignoring the&lt;br/&gt;former, and assuming the latter.&lt;br/&gt;&lt;br/&gt;OK, let&amp;#39;s consider a 1000 satoshi HTLC, paying a 10ppm fee and with a&lt;br/&gt;1ppm-per-second reputation_loss_rate.&lt;br/&gt;&lt;br/&gt;If it succeeds in 1 second (measuring reputation in millisatoshi,&lt;br/&gt;because its cute):&lt;br/&gt;&lt;br/&gt;        reputation[source] &#43;= 10&lt;br/&gt;        reputation[destination] &#43;= 10 - 1&lt;br/&gt;&lt;br/&gt;If it succeeds in 10 seconds:&lt;br/&gt;&lt;br/&gt;        reputation[source] &#43;= 10&lt;br/&gt;        reputation[destination] &#43;= 10 - 10&lt;br/&gt;&lt;br/&gt;If it fails in 10 seconds:&lt;br/&gt;&lt;br/&gt;        reputation[destination] -= 10&lt;br/&gt;&lt;br/&gt;And if it falls onto the chain and fails after 144 blocks:&lt;br/&gt;&lt;br/&gt;        reputation[destination] -= 86400&lt;br/&gt;&lt;br/&gt;In this scheme, it seems that I can destroy N reputation points in 18&lt;br/&gt;nodes for cost N:&lt;br/&gt;&lt;br/&gt;        Mallory1 -&amp;gt; Node1 -&amp;gt; Node2 -&amp;gt; ..... -&amp;gt; Node18 -&amp;gt; Mallory2&lt;br/&gt;                                                  \&lt;br/&gt;                                               Mallory3&lt;br/&gt;&lt;br/&gt;Mallory2 pays a crapload of fees to Node18 to pay Mallory3, getting a&lt;br/&gt;great reputation.  Then Mallory1 sends a payment to Mallory2, which&lt;br/&gt;takes a day to resolve.&lt;br/&gt;&lt;br/&gt;Of course, this is why you want ramped reputation_loss_rate, say 1ppm&lt;br/&gt;for Mallory1-&amp;gt;Node1, 2ppm -&amp;gt;Node2.... 19ppm for Mallory2.  That just&lt;br/&gt;means Mallory can destroy 9*N total reputation points, not 18*N.&lt;br/&gt;&lt;br/&gt;You can fix this by making it reputation_loss_rate exponential, but I&lt;br/&gt;don&amp;#39;t think Node1 could ever get the 262144x reputation to make the&lt;br/&gt;payment in the first place.&lt;br/&gt;&lt;br/&gt;What am I missing?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:50:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyfuzcuetljsmg8et4ewmjnvzwqt9rsuuh8tywcq6sfjz5q9x9kuqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2qv8dhd</id>
    
      <title type="html">📅 Original date posted:2018-05-14 📝 Original message: Jim ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyfuzcuetljsmg8et4ewmjnvzwqt9rsuuh8tywcq6sfjz5q9x9kuqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2qv8dhd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2gvek2pujww36vq5yrrlg6mvw5czuw5sa30cv9f47qucuctltdmsgurm4c&#39;&gt;nevent1q…rm4c&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-14&lt;br/&gt;📝 Original message:&lt;br/&gt;Jim Posen &amp;lt;jim.posen at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Thanks for the thoughtful responses.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; You missed the vital detail: that you must prove channel closure if you&lt;br/&gt;&amp;gt;&amp;gt; can&amp;#39;t unpeel the onion further.  That *will* hit an unresponsive party&lt;br/&gt;&amp;gt;&amp;gt; with a penalty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ah, that is a good point. I still find the proposal overall worryingly&lt;br/&gt;&amp;gt; complex in terms of communication overhead, time it takes to prove channel&lt;br/&gt;&amp;gt; closure, all of your points in [1], [2], [3], etc. Furthermore, this&lt;br/&gt;&amp;gt; mandates that immediate channel closure is the only allowed reaction to a&lt;br/&gt;&amp;gt; party delaying an HTLC for a time period above a threshold -- the node&lt;br/&gt;&amp;gt; reputation approach gives more discretion to the preceding hop.&lt;br/&gt;&amp;gt; Deobfuscating the route may turn out to be the right option, but I think&lt;br/&gt;&amp;gt; the reputation system has certain advantages over this.&lt;br/&gt;&lt;br/&gt;Agreed, it&amp;#39;s a tradeoff.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; The models we tried in Milan all created an incentive to fail payments,&lt;br/&gt;&amp;gt;&amp;gt; which is a non-starter.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Do you mind elaborating or summarizing the reasons? The way I&amp;#39;m analyzing&lt;br/&gt;&amp;gt; it, even if there&amp;#39;s a nominal spam fee paid to routing nodes that fail&lt;br/&gt;&amp;gt; payments, as long as it&amp;#39;s low enough (say 2-5% for arguments sake), the&lt;br/&gt;&amp;gt; nodes still have more to gain by forwarding the payment and earning the&lt;br/&gt;&amp;gt; full fee on a completed payment, and possibly the reputation boost&lt;br/&gt;&amp;gt; associated with completing a payment if that system was in effect.&lt;br/&gt;&lt;br/&gt;You&amp;#39;re forgetting the failure cases, where now I can profit.&lt;br/&gt;&lt;br/&gt;If I disconnect from another node, I now have a disincentive to tell&lt;br/&gt;others.  At the moment we send an update disabling the channel (though&lt;br/&gt;we should give a few seconds for reconnect first, but whatever).&lt;br/&gt;&lt;br/&gt;Similarly, the rewards aren&amp;#39;t proportional: being cheaper than other&lt;br/&gt;routes gets you all the traffic, but now you profit even if you can&amp;#39;t&lt;br/&gt;service the payments.  In fact, once a channel becomes hard to use (low&lt;br/&gt;capacity, transient disconnect, whatever), I *should* advertize it as&lt;br/&gt;cheaper route than anyone else: free money!&lt;br/&gt;&lt;br/&gt;I&amp;#39;m sure there are other ways to game it, but the underlying reason is&lt;br/&gt;clear: it misaligns user and node incentives.&lt;br/&gt;&lt;br/&gt;&amp;gt; Moreover, a node that constantly fails payments will be blacklisted by the&lt;br/&gt;&amp;gt; sender eventually and stop receiving HTLCs from them at all. Overall, I&lt;br/&gt;&amp;gt; don&amp;#39;t think this is a profitable strategy. Furthermore, I think it works&lt;br/&gt;&amp;gt; quite well in combination with the reputation system.&lt;br/&gt;&lt;br/&gt;If the system is sufficiently decentralized, managing to cheat everyone&lt;br/&gt;once is very profitable though.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; This seems like we&amp;#39;d need some serious evaluation to show that this&lt;br/&gt;&amp;gt;&amp;gt; works, because the risks are very high.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I agree that it needs to be evaluated. I may start working on some network&lt;br/&gt;&amp;gt; simulations to test various DOS mitigation strategies.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I can destroy your node&amp;#39;s reputation by routing crap through you; even&lt;br/&gt;&amp;gt;&amp;gt; if it costs me marginaly more reputation than it does you, that just&lt;br/&gt;&amp;gt;&amp;gt; means that the largest players can force failure upon smaller players,&lt;br/&gt;&amp;gt;&amp;gt; centralizing the network.  And I think trying to ensure that it costs me&lt;br/&gt;&amp;gt;&amp;gt; more reputation than the sum of downstream reputation loss leaks too&lt;br/&gt;&amp;gt;&amp;gt; much information&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I will add to ZmnSCPxj&amp;#39;s response, which is mostly on point. The key here&lt;br/&gt;&amp;gt; is that the only way to lose significant reputation is to delay a payment&lt;br/&gt;&amp;gt; yourself or forward to a malicious downstream that delays -- neither of&lt;br/&gt;&amp;gt; these can be forced by the sender alone. This amounts to a system where you&lt;br/&gt;&amp;gt; are on the hook for any malicious behavior of your downstream peers, which&lt;br/&gt;&amp;gt; is why you must keep a reputation score for each which they earn over time.&lt;br/&gt;&amp;gt; This should keep all links in the network high quality and quickly&lt;br/&gt;&amp;gt; disconnect off delaying nodes if the incentives are right.&lt;br/&gt;&lt;br/&gt;But I can make you look like a delaying node whenever I want.  The only&lt;br/&gt;way to ensure that I lose more reputation than you do is to leak&lt;br/&gt;information about route length for *everyone*.  And even then, it&amp;#39;s just&lt;br/&gt;a matter of numbers.  I can make successful payments to myself through&lt;br/&gt;the same peers (but not you!) to stay above their threshold so my&lt;br/&gt;reputation is intact.&lt;br/&gt;&lt;br/&gt;So it&amp;#39;s basically a question of how expensive is it for me to throw you&lt;br/&gt;off the network?  You have to tune that number carefully.&lt;br/&gt;&lt;br/&gt;&amp;gt; While I agree that a lot of reputation is leaked by aggregating the losses&lt;br/&gt;&amp;gt; along the route, this serves exactly to prevent large nodes with high&lt;br/&gt;&amp;gt; reputation from ruining links elsewhere. There are two things a node&lt;br/&gt;&amp;gt; looking to cause reputation loss could do. 1) Identify a node (not itself)&lt;br/&gt;&amp;gt; it thinks will delay a payment and send to them. This locks up funds on&lt;br/&gt;&amp;gt; their behalf, but is actually good behavior because it identifies a faulty&lt;br/&gt;&amp;gt; node and rightfully forces a loss in their reputation, eventually resulting&lt;br/&gt;&amp;gt; in them being booted from the network. Everyone upstream loses some&lt;br/&gt;&amp;gt; reputation for having connectivity to them, but less because of the loss&lt;br/&gt;&amp;gt; aggregation along the route. 2) Delay a payment oneself and force upstream&lt;br/&gt;&amp;gt; reputation loss. This is why I think it&amp;#39;s important that the reputation&lt;br/&gt;&amp;gt; loss aggregate so that the malicious party loses the most.&lt;br/&gt;&lt;br/&gt;But we&amp;#39;re busy trying to remove all the methods of deanonymizing the&lt;br/&gt;network, and you seem to be adding a new one, *and* providing an&lt;br/&gt;incentive to deanonymize.&lt;br/&gt;&lt;br/&gt;&amp;gt; As for the amount of information leaked, yes, it helps determine the number&lt;br/&gt;&amp;gt; of upstream hops in a route. However, the CLTV values help determine the&lt;br/&gt;&amp;gt; number of downstream hops in a route in exactly the same way. I see these&lt;br/&gt;&amp;gt; as symmetric in a sense.&lt;br/&gt;&lt;br/&gt;Yes, which is why we have mitigations in place (which are still probably&lt;br/&gt;insufficient).  I really don&amp;#39;t want to add another vector.&lt;br/&gt;&lt;br/&gt;&amp;gt; This is exactly the question that your local view of peer reputations helps&lt;br/&gt;&amp;gt; solve: are the potential fees here worth the risk of forwarding this&lt;br/&gt;&amp;gt; payment to this downstream?&lt;br/&gt;&lt;br/&gt;So now I&amp;#39;ll try to deanonymize all payments so I can determine this.&lt;br/&gt;Those who do this best will be rewarded, and those who don&amp;#39;t try will be&lt;br/&gt;knocked off the network, probably by those who can!&lt;br/&gt;&lt;br/&gt;So I&amp;#39;d like to see a real design of the reputation system.  If it&amp;#39;s&lt;br/&gt;practical (which is a significant hurdle), we then need to carefully&lt;br/&gt;evaluate whether we&amp;#39;re creating significant disincentives to&lt;br/&gt;neighbourliness.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:50:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8254zjvg0s2algszykk8pe3h5n292609lyl7nl2zhje3aprzjkwgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2nky35n</id>
    
      <title type="html">📅 Original date posted:2018-02-07 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8254zjvg0s2algszykk8pe3h5n292609lyl7nl2zhje3aprzjkwgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2nky35n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyg4p7d73m0nfllfgsyqglj93ta05fzz75hpxczp25cysjd8j4unsz3hg3p&#39;&gt;nevent1q…hg3p&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-02-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Protocol Overview&lt;br/&gt;&amp;gt; ==================&lt;br/&gt;&amp;gt; This design can be seen as a generalization of the single, non-interactive&lt;br/&gt;&amp;gt; payment scheme, that uses decoding of extra onion blobs (EOBs?) to encode&lt;br/&gt;&amp;gt; extra data for the receiver. In that design, the extra data includes a&lt;br/&gt;&amp;gt; payment preimage that the receiver can use to settle back the payment. EOBs&lt;br/&gt;&amp;gt; and some method of parsing them are really the only requirement for this&lt;br/&gt;&amp;gt; protocol to work. Thus, only the sender and receiver need to implement this&lt;br/&gt;&amp;gt; feature in order for it to function, which can be announced using a feature&lt;br/&gt;&amp;gt; bit.&lt;br/&gt;&lt;br/&gt;OK, so this proposal conflates two things:&lt;br/&gt;&lt;br/&gt;1. split payments.&lt;br/&gt;2. expansion of onion space.&lt;br/&gt;&lt;br/&gt;We&amp;#39;ve got a wiki page for #2 which could probably use some love:&lt;br/&gt;        &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/wiki/Brainstorming#using-multiple-hops_data-cells-in-the-onion&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/wiki/Brainstorming#using-multiple-hops_data-cells-in-the-onion&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;For the final hop this may not be necessary, as we have 8 unused bytes&lt;br/&gt;in `next addr`, giving us 20 free bytes.&lt;br/&gt;&lt;br/&gt;But why not simplify the proposal: the payment preimage is the XOR of&lt;br/&gt;those 20 bytes (with 12 zero bytes prepended)?  And the receiver gives&lt;br/&gt;up to 30 seconds(?) to receive all the parts after the first one.&lt;br/&gt;&lt;br/&gt;That means the sender gets dynamic resizing (if they want to split a&lt;br/&gt;payment further, set one to randomness, and XOR that into the other),&lt;br/&gt;the receive has only to remember the combination-so-far.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:49:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs86ggrcyanhgd6zwtzmcgxt3z3uczsetj9j4qspk9dm0hvp87gxygzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz27yq3ls</id>
    
      <title type="html">📅 Original date posted:2017-12-18 📝 Original message: Andy ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs86ggrcyanhgd6zwtzmcgxt3z3uczsetj9j4qspk9dm0hvp87gxygzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz27yq3ls" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgu5npv4r9wnn3y4vh2tjvtwzy2ccvkx7euszcv855k4w582v0uccpfh0yr&#39;&gt;nevent1q…h0yr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-12-18&lt;br/&gt;📝 Original message:&lt;br/&gt;Andy Schroder &amp;lt;info at AndySchroder.com&amp;gt; writes:&lt;br/&gt;&amp;gt; What&amp;#39;s the rational for using millisatoshis as the units for lightning &lt;br/&gt;&amp;gt; channels? Aren&amp;#39;t you going to loose up to 1/2 of a satoshi when the &lt;br/&gt;&amp;gt; channel is closed?&lt;br/&gt;&lt;br/&gt;You can lose up to 0.999 satoshi per in-progress payment, yes.  BOLT #3:&lt;br/&gt;&lt;br/&gt;    The amounts for each output MUST be rounded down to whole satoshis.&lt;br/&gt;&lt;br/&gt;&amp;gt; Is this because it doesn&amp;#39;t hurt and you might as well &lt;br/&gt;&amp;gt; be open to the opportunity for these sub satoshi transactions, because &lt;br/&gt;&amp;gt; if you aren&amp;#39;t, you are giving up the opportunity to get accumulated &lt;br/&gt;&amp;gt; revenue from many of those small transactions, that could end up being &lt;br/&gt;&amp;gt; greater than 1/2 of a satoshi?&lt;br/&gt;&lt;br/&gt;In practice, payments of less than a few thousand satoshi are&lt;br/&gt;impractical, as they cost more than that to spend.  Channel closing&lt;br/&gt;costs dwarf the gains to be made from cheating, however.&lt;br/&gt;&lt;br/&gt;&amp;gt; Since millisatoshis is used, is there a maximum channel funding size?&lt;br/&gt;&lt;br/&gt;Yes, the upper 32 bits must be zero, from BOLT #2:&lt;br/&gt;&lt;br/&gt;  - for channels with `chain_hash` identifying the Bitcoin blockchain:&lt;br/&gt;    - MUST set the four most significant bytes of `amount_msat` to 0.&lt;br/&gt;&lt;br/&gt;This gives a maximum HTLC value of .04294967295 BTC, which, back when&lt;br/&gt;we started, was about $10.&lt;br/&gt;&lt;br/&gt;&amp;gt; Is the optional initial push of millisatoshis during the channel &lt;br/&gt;&amp;gt; creation there in order to motivate the other party to be willing to &lt;br/&gt;&amp;gt; waste their time with the channel creation in the first place? If not, &lt;br/&gt;&amp;gt; what&amp;#39;s it for?&lt;br/&gt;&lt;br/&gt;It&amp;#39;s for the common case where you want to connect to someone and&lt;br/&gt;make a payment immediately.  I&amp;#39;m not sure how widely it will be used,&lt;br/&gt;though.  It&amp;#39;s also the only mechanism for the payer to have *zero* funds&lt;br/&gt;in channel (ie. below reserve).&lt;br/&gt;&lt;br/&gt;&amp;gt; In all of the clients that I&amp;#39;ve looked at, I can&amp;#39;t seem to find out how &lt;br/&gt;&amp;gt; to define the timeout closing out a channel when someone does not &lt;br/&gt;&amp;gt; cooperate. Is there a fixed value for this as part of the protocol? Or &lt;br/&gt;&amp;gt; do most clients have a default that they enforce over all channels that &lt;br/&gt;&amp;gt; they create?&lt;br/&gt;&lt;br/&gt;If there&amp;#39;s no in-progress payment, there&amp;#39;s no reason to close a channel&lt;br/&gt;to an unreachable peer, unless you want to abandon the channel and get&lt;br/&gt;the funds back.&lt;br/&gt;&lt;br/&gt;If there is, BOLT #2 has you covered:&lt;br/&gt;&lt;br/&gt;        &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#requirements-8&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#requirements-8&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Hope that helps,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:48:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszcxd37l4wg06qv5q79xc0x04l70nuze3lheednahqznkuz60n6gqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2f6wrxn</id>
    
      <title type="html">📅 Original date posted:2016-08-10 📝 Original message: Tadge ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszcxd37l4wg06qv5q79xc0x04l70nuze3lheednahqznkuz60n6gqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2f6wrxn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswny4p73h6n6z9cvm2e84fgtaqw4xhgr828jav7uqglm4tz3h4ywstvldx3&#39;&gt;nevent1q…ldx3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-08-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Tadge Dryja &amp;lt;tadge at lightning.network&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 4. When the watcher receives a new block, they HMAC(txid&#43;salt1) all&lt;br/&gt;&amp;gt;&amp;gt; transactions and compare against the key-value store&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This method does not require significant computation upon receiving a&lt;br/&gt;&amp;gt;&amp;gt; new block and checking against the datastore. I forgot to note, that the&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you&amp;#39;re only watching 1 channel, this is OK as you&amp;#39;re just doing one HMAC&lt;br/&gt;&amp;gt; operation per incoming tx.  This works when the number of states per&lt;br/&gt;&amp;gt; channel is high but the number of channels watched is low.&lt;br/&gt;&amp;gt; If you&amp;#39;re watching 1M channels with 1K states each, this requires 1M HMAC&lt;br/&gt;&amp;gt; operations for every incoming tx.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; By giving the whole (or a truncated part) of the txid, the observing node&lt;br/&gt;&amp;gt; can put all txids being watched for into the same tree and have seek access&lt;br/&gt;&amp;gt; time independent of the number of separate channels being watched.  Whether&lt;br/&gt;&amp;gt; it&amp;#39;s 1 channel with 1 billion states, or 100M channels with 10 states each,&lt;br/&gt;&amp;gt; you have the same cpu and I/O cost per incoming tx.&lt;br/&gt;&lt;br/&gt;Yes, I think I agree.&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not clear on the advantages of sending encrypted state information to&lt;br/&gt;&amp;gt; the observer.  Most information the observer needs to construct a punishing&lt;br/&gt;&amp;gt; transaction is available in the observed commitment tx; the only per-state&lt;br/&gt;&amp;gt; information which needs to be stored is the signature (and in the case of&lt;br/&gt;&amp;gt; HTLCs, the preimage).&lt;br/&gt;&lt;br/&gt;Yes.  To be precise, watcher needs preimage, pubkeys, a signature,&lt;br/&gt;OP_CSV delay amounts for each side, and HTLCs.&lt;br/&gt;&lt;br/&gt;If the pubkeys and OP_CSV delay amounts are fixed, you need a signature&lt;br/&gt;and preimage (required to steal the to-them output as well as htlcs)&lt;br/&gt;every new commit tx (ie. every new watch request).  And you&amp;#39;ll add a new&lt;br/&gt;HTLC information on average every second commit tx.&lt;br/&gt;&lt;br/&gt;But I think you&amp;#39;re better attaching every relevant HTLC to every watch&lt;br/&gt;request; otherwise, you&amp;#39;re exposing all previous HTLCs.  I recalculated:&lt;br/&gt;they&amp;#39;re only 24 bytes each (ripemd hash &#43; expiry).&lt;br/&gt;&lt;br/&gt;If we really want to optimize that,maybe we can come up with a cleverer&lt;br/&gt;scheme, where you optionally include the key to the previous watch&lt;br/&gt;request with the encrypted information, allowing the sender to control&lt;br/&gt;the privacy/data tradeoff?  Then the watcher would gather HTLCs from&lt;br/&gt;those previous requests as well, and see which ones are required?&lt;br/&gt;{Insert bikeshed here}.  {No, here}.&lt;br/&gt;&lt;br/&gt;&amp;gt; Reconstructing messages from hashes and / or&lt;br/&gt;&amp;gt; signatures isn&amp;#39;t possible as long as there&amp;#39;s sufficient unknown data in the&lt;br/&gt;&amp;gt; preimage or message.  This is achievable by changing the pubkeys used in&lt;br/&gt;&amp;gt; the commit tx script and pubkey hash each state, without needing additional&lt;br/&gt;&amp;gt; data in an OP_RETURN.&lt;br/&gt;&lt;br/&gt;FWIW, I take back the idea about using the signature as a key:&lt;br/&gt;1) While the crypto people tell me it&amp;#39;s probably OK, they can&amp;#39;t prove it.&lt;br/&gt;2) If we go to Schnorr, I think it falls apart as both sigs are combined.&lt;br/&gt;&lt;br/&gt;OTOH, changing pubkeys every step isn&amp;#39;t required if we go for Laolu&amp;#39;s &lt;br/&gt;key-revocation scheme instead of shachain/elkrem.  I think? (Roasbeef,&lt;br/&gt;this is your cue to describe it in detail!)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty,
    </content>
    <updated>2023-06-09T14:46:35&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstvn8w0hlezf3c5nqcdwajeev7xl46yq8pgcrc9d9hsjgtss7995gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2vpnxwx</id>
    
      <title type="html">📅 Original date posted:2016-08-09 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstvn8w0hlezf3c5nqcdwajeev7xl46yq8pgcrc9d9hsjgtss7995gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2vpnxwx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq0k4kdr0t05ph3epy3nnn96mwz7909qg89649wdcunwycqq5amws3fwu7d&#39;&gt;nevent1q…wu7d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-08-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Joseph Poon &amp;lt;joseph at lightning.network&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, Aug 09, 2016 at 03:13:57PM &#43;0930, Rusty Russell wrote:&lt;br/&gt;&amp;gt;&amp;gt; We send the observer the &amp;#34;steal&amp;#34; tx every update (not really: we only&lt;br/&gt;&amp;gt;&amp;gt; need to send the to-us/to-them amounts, pubkeys, HTLCs info and sig).&lt;br/&gt;&amp;gt;&amp;gt; This gets encrypted&#43;HMAC with the txid of the commit tx (or, if that&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; too guessable, the SHA256() of our signature on the commit tx).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [snip]&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If we want to obscure our funding tx, we can simply use a txid qualifier&lt;br/&gt;&amp;gt;&amp;gt; the same way you did (and maybe use the sha256(txid) as the encryption&lt;br/&gt;&amp;gt;&amp;gt; key to avoid weakening that).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think it may be necessary to identify when the transaction occurs as&lt;br/&gt;&amp;gt; an index for outsourcing services, so the key can&amp;#39;t be dervied directly&lt;br/&gt;&amp;gt; from the txid with a single HMAC/sha256. It&amp;#39;s possible there are&lt;br/&gt;&amp;gt; millions of transactions to compare, and an index based on txid is&lt;br/&gt;&amp;gt; necessary. The two options I can see are:&lt;br/&gt;&lt;br/&gt;This is fun!&lt;br/&gt;&lt;br/&gt;Yes, I think we agree some &amp;#34;filter hint&amp;#34; is needed to avoid a crazy&lt;br/&gt;amount of outsourcing work (eg. first 8/16 bytes of txid).  I don&amp;#39;t&lt;br/&gt;think an HMAC check per registered commitment is quite fast enough.&lt;br/&gt;&lt;br/&gt;But there&amp;#39;s a problem with most naive filters, if you can guess&lt;br/&gt;commitment tx N-1 from commitment tx N.  If the outsourcing service sees&lt;br/&gt;an old commit they can guess at previous commitment txs using that.&lt;br/&gt;Probably unroll the whole channel history if they can guess enough&lt;br/&gt;HTLCs.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. HMAC the transaction itself (not txid) as the secret key (or anything&lt;br/&gt;&amp;gt; part of the transaction, as long as it isn&amp;#39;t SHA256(tx) for obvious&lt;br/&gt;&amp;gt; reasons). I like something along these lines better than option #1.&lt;br/&gt;&amp;gt; Whatever computational cost there is will be extremely low, as the&lt;br/&gt;&amp;gt; operations are constrained by block size.&lt;br/&gt;&lt;br/&gt;If we include the witness in that HMAC we risk reintroducing&lt;br/&gt;malleability.  If we don&amp;#39;t, we risk txs being predictable.&lt;br/&gt;&lt;br/&gt;I can think of a few fixes: insert some randomness in the tx (OP_RETURN?&lt;br/&gt;Different addresses each time?), or try to extract the input signature&lt;br/&gt;from the witness, which is unguessable, as our filter?&lt;br/&gt;&lt;br/&gt;What&amp;#39;s simplest?&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:46:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrx34se59szwpg02mx3d9ygdp3l7kf9r4g7xddj649y9262u7v3lczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2697wyn</id>
    
      <title type="html">📅 Original date posted:2016-08-09 📝 Original message: Tadge ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrx34se59szwpg02mx3d9ygdp3l7kf9r4g7xddj649y9262u7v3lczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2697wyn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszv9zrukwdqxupqvfcx7vqqe6efq7ekrq7jhq8f2rgwprd5uwrl2g5galwr&#39;&gt;nevent1q…alwr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-08-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Tadge Dryja &amp;lt;tadge at lightning.network&amp;gt; writes:&lt;br/&gt;&amp;gt; Blinded outsourcing of channel monitoring&lt;br/&gt;&lt;br/&gt;But if we don&amp;#39;t steal HTLCs, the lack of channel utilization is a pain:&lt;br/&gt;&lt;br/&gt;&amp;gt; States with in-flight HTLCs are another issue... if you want to keep the&lt;br/&gt;&amp;gt; data storage down, you can just not include them, and make a policy that&lt;br/&gt;&amp;gt; the sum of all the HTLCs should be less than either non-HTLC balance in the&lt;br/&gt;&amp;gt; channel.  That way the attacker still loses money if they try to attack.&lt;br/&gt;&amp;gt; They potentially might not lose all of it though.  You could make it&lt;br/&gt;&amp;gt; variable size and include HTLCs as well but that increases the data rate&lt;br/&gt;&amp;gt; significantly and probably hurts anonymity in various ways.&lt;br/&gt;&lt;br/&gt;But now they must *always* keep their balance greater than all the HTLCs&lt;br/&gt;they ever previously received at once, otherwise it&amp;#39;s worth them&lt;br/&gt;cheating.&lt;br/&gt;&lt;br/&gt;I think we really do want to capture those HTLCs, but I don&amp;#39;t think it&amp;#39;s&lt;br/&gt;as bad as you think: an HTLC can be described in ~40 bytes.  We need to&lt;br/&gt;do some magic to pad it out to hide the number of HTLCs, of course.&lt;br/&gt;&lt;br/&gt;So, my method was less ambitious.  I&amp;#39;ll describe it here:&lt;br/&gt;&lt;br/&gt;We send the observer the &amp;#34;steal&amp;#34; tx every update (not really: we only&lt;br/&gt;need to send the to-us/to-them amounts, pubkeys, HTLCs info and sig).&lt;br/&gt;This gets encrypted&#43;HMAC with the txid of the commit tx (or, if that&amp;#39;s&lt;br/&gt;too guessable, the SHA256() of our signature on the commit tx).&lt;br/&gt;&lt;br/&gt;I had assumed we&amp;#39;d tell the observer our channel funding txid: when it&lt;br/&gt;sees that spent, it tries to use those signatures to decrypt all the txs&lt;br/&gt;we sent.  If one succeeds, it spends it.&lt;br/&gt;&lt;br/&gt;If we want to obscure our funding tx, we can simply use a txid qualifier&lt;br/&gt;the same way you did (and maybe use the sha256(txid) as the encryption&lt;br/&gt;key to avoid weakening that).&lt;br/&gt;&lt;br/&gt;Whatever we do, we might want to offer our own peers to do that watching&lt;br/&gt;for them (for a fee?).&lt;br/&gt;&lt;br/&gt;Cheers!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:46:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw4n66s6gpdpac4ap009mzfze8576kpkqn7kza389hvfe5lcwammgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2hnpjge</id>
    
      <title type="html">📅 Original date posted:2016-03-08 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw4n66s6gpdpac4ap009mzfze8576kpkqn7kza389hvfe5lcwammgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2hnpjge" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9gvft3k055ys927nutlly6susguzjyf6dqdg5qmcnnwgj77jssmqtzgn9c&#39;&gt;nevent1q…gn9c&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-03-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Nicolas Dorier &amp;lt;nicolas.dorier at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Great, indeed we had same idea, I don&amp;#39;t see how it solve the hashes in&lt;br/&gt;&amp;gt; advance.&lt;br/&gt;&amp;gt; As Alice knows&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; H(1000000) = &amp;lt;random secret seed&amp;gt;).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If she need the hash to the first commitment she need to hash the random secret&lt;br/&gt;&amp;gt; seed 1000000 times. I think it is exactly the same problem as it is the exact&lt;br/&gt;&amp;gt; same idea said differently.&lt;br/&gt;&lt;br/&gt;See:&lt;br/&gt;&lt;br/&gt;        &lt;a href=&#34;https://github.com/rustyrussell/ccan/tree/master/ccan/crypto/shachain&#34;&gt;https://github.com/rustyrussell/ccan/tree/master/ccan/crypto/shachain&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:45:55&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs88qlznrnm0zk9r0hsh94gv9zkunamg9tqgvvw4n757g505r3tsygzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz280qe3d</id>
    
      <title type="html">📅 Original date posted:2016-03-07 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs88qlznrnm0zk9r0hsh94gv9zkunamg9tqgvvw4n757g505r3tsygzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz280qe3d" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs28j5zsk25g8t9dmx6qzyvnp087ufe6t4y0u49ha8vezmhucqymhge963m0&#39;&gt;nevent1q…63m0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-03-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Nicolas Dorier &amp;lt;nicolas.dorier at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; One way deterministic RValue Generation&lt;br/&gt;&lt;br/&gt;Hi Nicolas,&lt;br/&gt;&lt;br/&gt;        Yes, in fact shachain is a variant of this which avoids&lt;br/&gt;generating several million hashes in advance.  Interesting, I suggested&lt;br/&gt;using hashing in the Deployable Lightning paper but didn&amp;#39;t actually&lt;br/&gt;spell out the idea.  Hmm....&lt;br/&gt;&lt;br/&gt;Seems like it orignated from Adam Back:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://lists.blockstream.io/pipermail/lightning-dev/2015-May/000000.html&#34;&gt;https://lists.blockstream.io/pipermail/lightning-dev/2015-May/000000.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:45:54&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2eldfl559mttnva0su8ppzxn0wsngde4vhd57y35h8v8n6gc65lczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ezfesq</id>
    
      <title type="html">📅 Original date posted:2016-02-08 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2eldfl559mttnva0su8ppzxn0wsngde4vhd57y35h8v8n6gc65lczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ezfesq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszqxsgudug9z8hvansgwa5gsulrx7ne9zyu883z2wlsscsmttt9eszw44qq&#39;&gt;nevent1q…44qq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-02-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all!&lt;br/&gt;&lt;br/&gt;        Eliminating all acknowledgements makes for a much simpler&lt;br/&gt;protocol.&lt;br/&gt;&lt;br/&gt;        Each side sends one or more updates&lt;br/&gt;(ADD/SETTLE/TIMEOUT/FAIL/UNADD), followed by a COMMIT (with sig).  Reply&lt;br/&gt;COMPLETE with the old revocation preimage.  Each side tracks two commit&lt;br/&gt;txs: its own and the other side&amp;#39;s.  When you COMMIT you&amp;#39;re locking in&lt;br/&gt;your updates to my commit, and staging them for your commit, enforcing&lt;br/&gt;the requirement that you commit to your updates first.&lt;br/&gt;&lt;br/&gt;Details&lt;br/&gt;-------&lt;br/&gt;ADD:&lt;br/&gt;        Insert this new HTLC from proposer to recipient.&lt;br/&gt;SETTLE:&lt;br/&gt;        Recipient collects proposers&amp;#39;s committed HTLC with R value.&lt;br/&gt;TIMEOUT:&lt;br/&gt;        Proposer removes committed HTLC it added.&lt;br/&gt;FAIL:&lt;br/&gt;        Recipient removes committed HTLC it received.&lt;br/&gt;UNADD:&lt;br/&gt;        Proposer removes uncommitted HTLC it added.&lt;br/&gt;&lt;br/&gt;COMMIT:&lt;br/&gt;        Contains a signature for receiver&amp;#39;s commit tx, with all the&lt;br/&gt;        updates included.  Recipient commits updates to its own commit tx,&lt;br/&gt;        and stages those same updates to the other side&amp;#39;s commit tx, then&lt;br/&gt;        sends COMPLETE for its own old commit tx.&lt;br/&gt;&lt;br/&gt;COMPLETE:&lt;br/&gt;        Completes removal of old commit tx.  Recipient commits updates&lt;br/&gt;        to other side&amp;#39;s commit tx, stages those same updates for its own&lt;br/&gt;        commit tx.&lt;br/&gt;&lt;br/&gt;So the shortest possible complete exchange looks like:&lt;br/&gt;&lt;br/&gt;A               B&lt;br/&gt;ADD-&amp;gt;&lt;br/&gt;COMMIT-&amp;gt;&lt;br/&gt;                &amp;lt;-COMPLETE&lt;br/&gt;                &amp;lt;-COMMIT&lt;br/&gt;COMPLETE-&amp;gt;&lt;br/&gt;&lt;br/&gt;Optimizations&lt;br/&gt;-------------&lt;br/&gt;If we want to fail faster, we can add a non-binding ADD_FAIL message,&lt;br/&gt;rather than waiting for a COMMIT.  This would be a hint that we will&lt;br/&gt;FAIL an HTLC as soon as it is committed; recipient may UNADD if it&lt;br/&gt;receives it in time.&lt;br/&gt;&lt;br/&gt;Fee Negotiation&lt;br/&gt;---------------&lt;br/&gt;lnd has a fee field in their commit msg, c-lightning uses a fixed fee&lt;br/&gt;negotiation at channel establishment and a FIXME.  The logical place for&lt;br/&gt;fee negotiation is in the COMMIT message, with a requested fee rate and&lt;br/&gt;a range of acceptable values.  Instead of COMPLETE a node may REJECT,&lt;br/&gt;with a fee range; the COMPLETE may then be reattempted.&lt;br/&gt;&lt;br/&gt;Similar fee negotiation would be required for mutual close (this isn&amp;#39;t&lt;br/&gt;as urgent and so would use a normal fee).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:45:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg4pv8a6g7ahj9qmrm5ajgwmg2r8mqkhacga7lqhehjqlhzswjvvqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz23pga0u</id>
    
      <title type="html">📅 Original date posted:2015-11-27 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg4pv8a6g7ahj9qmrm5ajgwmg2r8mqkhacga7lqhehjqlhzswjvvqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz23pga0u" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszxt2x50l92arnnmdrl293asj90zzvym293p82as7qvg85twqg6zcrhu7ts&#39;&gt;nevent1q…u7ts&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-11-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; Hey,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Suppose you have a lightning channel, with balances of exactly 2 BTC&lt;br/&gt;&amp;gt; on your side, and 1 BTC on the other (and 1mBTC for fees). You send a&lt;br/&gt;&amp;gt; micropayment of 42 satoshi across the channel, resulting in an updated&lt;br/&gt;&amp;gt; commitment that looks like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   in:&lt;br/&gt;&amp;gt;     anchor (3.001 BTC): [yoursig theirsig redeemscript]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   out:&lt;br/&gt;&amp;gt;     1 BTC: [pay2pubkey(theirs)]&lt;br/&gt;&amp;gt;     1.99999958 BTC: [pay2pubkey(yours)]&lt;br/&gt;&amp;gt;     0.00000042 BTC: [pay2scripthash(htlc to them with R or you after&lt;br/&gt;&amp;gt;                      timeout)]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But the third output will hit the IsDust() test (less than 546 satoshi&lt;br/&gt;&amp;gt; for a min relay fee of 0.01 mBTC) and the entire transaction will be&lt;br/&gt;&amp;gt; rejected, so the channel can&amp;#39;t be closed at all!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is a similar problem to sub 1-satoshi payments, but it&amp;#39;s different&lt;br/&gt;&amp;gt; in that while you can&amp;#39;t represent them as an HTLC output, you can&lt;br/&gt;&amp;gt; represent them as soon as they complete -- ie:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   out:&lt;br/&gt;&amp;gt;     1.00000042 BTC: [pay2pubkey(theirs)]&lt;br/&gt;&amp;gt;     1.99999958 BTC: [pay2pubkey(yours)]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; is completely legitimate (whereas an output of 1.0 &#43; 0.042e-8 BTC&lt;br/&gt;&amp;gt; wouldn&amp;#39;t be).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I assume treating them much the same way is the only real option --&lt;br/&gt;&amp;gt; account for them exactly in the lightning state, but just approximate the&lt;br/&gt;&amp;gt; results in the actual commitments. So long as you&amp;#39;re closing channels&lt;br/&gt;&amp;gt; infrequently, losing a few hundred satoshi here and there won&amp;#39;t matter&lt;br/&gt;&amp;gt; much.&lt;br/&gt;&lt;br/&gt;Yes, unfortunately we&amp;#39;ll have to have a rule to avoid producing those&lt;br/&gt;outputs.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve opened &lt;a href=&#34;https://github.com/ElementsProject/lightning/issues/14&#34;&gt;https://github.com/ElementsProject/lightning/issues/14&lt;/a&gt;&lt;br/&gt;so we make sure we track this.&lt;br/&gt;&lt;br/&gt;&amp;gt; Another option might be to weaken the dust protection in the network --&lt;br/&gt;&amp;gt; eg if you made the dust output be&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     0.00000042 BTC: [(them &amp;amp;&amp;amp; (R || revoke))&lt;br/&gt;&amp;gt;                      || (you &amp;amp;&amp;amp; d CSV &amp;amp;&amp;amp; t CLTV)&lt;br/&gt;&amp;gt;                      || (3 months CSV)]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; then anyone could clear the dust after 3 months if it weren&amp;#39;t otherwise&lt;br/&gt;&amp;gt; claimed; maybe having some dust for a finite time is okay. But it&amp;#39;d also&lt;br/&gt;&amp;gt; mean paying to an actual (non-standard) script, rather than a scripthash,&lt;br/&gt;&amp;gt; which would be annoying in its own way... And, really, adding that output&lt;br/&gt;&amp;gt; to the txn would probably cost more in additional fees that it&amp;#39;s going&lt;br/&gt;&amp;gt; to pay you in any case.&lt;br/&gt;&lt;br/&gt;Agreed, we&amp;#39;ll just cull those outputs and let them go to fees.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:45:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr82jdj9qvqgnq5y7tnqq7ag76e7u46esttgcqajzjde4hm0l9ddqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2r2ngmn</id>
    
      <title type="html">📅 Original date posted:2015-11-19 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr82jdj9qvqgnq5y7tnqq7ag76e7u46esttgcqajzjde4hm0l9ddqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2r2ngmn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp4aevvspmp0mvyzxdjcg3j7dhfl46evngag8yv3z0k9y4cg95dtcfz4hrk&#39;&gt;nevent1q…4hrk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-11-19&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all!&lt;br/&gt;&lt;br/&gt;        As you know, I designed a lightning variant which used only&lt;br/&gt;non-experimental, in-planning BIPs[1].  One assumption was BIP62: in&lt;br/&gt;particular, that anchor malleability wouldn&amp;#39;t be an issue.  This was&lt;br/&gt;flawed; BIP62 will never be deployed.&lt;br/&gt;&lt;br/&gt;        There are several options from here:&lt;br/&gt;&lt;br/&gt;1) Ignore it.  Malleated txs are non-standard.&lt;br/&gt;2) Add a timeout to the anchor.  Limits the lifetime of the channel, and&lt;br/&gt;   still means if it does happen you have to wait for the timeout.&lt;br/&gt;3) Propose a reduced BIP62 which (say) only protects P2PKH, for a&lt;br/&gt;   specific transaction version.&lt;br/&gt;4) Take a leap of faith and assume Segregated Witness fixes all&lt;br/&gt;   malleability.&lt;br/&gt;&lt;br/&gt;I was debating between #1 and #3 for a while, but eventually settled on&lt;br/&gt;#4.  Here&amp;#39;s why:&lt;br/&gt;&lt;br/&gt;1) While still pre-BIP, Pieter Wuille is working on a prototype now&lt;br/&gt;   (Luke Jr came up with a sanish way of softforking it in).&lt;br/&gt;2) Other parts of the lightning code (in particular, watching bitcoin&lt;br/&gt;   transactions) become significantly simpler if malleability is&lt;br/&gt;   ignored.&lt;br/&gt;3) It&amp;#39;s the right thing for Bitcoin; all smart contract systems want&lt;br/&gt;   this.&lt;br/&gt;&lt;br/&gt;This result is NOP for lightning in the short term; assuming SW is the&lt;br/&gt;same as pretending malleability doesn&amp;#39;t exist.  But if we need to add&lt;br/&gt;malleability support later, it&amp;#39;s going to be painful, since handling it&lt;br/&gt;correctly in all the places it&amp;#39;s missing will be hard.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;PS.  Remember, every project has 3 major disasters.  Just wait until you&lt;br/&gt;     see the next two!&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/ElementsProject/lightning/blob/master/doc/deployable-lightning.pdf&#34;&gt;https://github.com/ElementsProject/lightning/blob/master/doc/deployable-lightning.pdf&lt;/a&gt;
    </content>
    <updated>2023-06-09T14:45:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyg6x28tchqkwg2vcwnkuxkz5h2wc0m8avgphedru7tss7k5jfkugzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2rvy5m2</id>
    
      <title type="html">📅 Original date posted:2015-10-19 📝 Original message: Mats ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyg6x28tchqkwg2vcwnkuxkz5h2wc0m8avgphedru7tss7k5jfkugzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2rvy5m2" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvzxth3uaygjzjr06xpek5wctle63t36rqf5masxxd3p2tfu8x3hc5utmzu&#39;&gt;nevent1q…tmzu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-10-19&lt;br/&gt;📝 Original message:&lt;br/&gt;Mats Jerratsch &amp;lt;matsjj at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; This makes some sense (though the anchor transactions don&amp;#39;t need to be&lt;br/&gt;&amp;gt;&amp;gt; P2SH, it&amp;#39;s nicer for bitcoin&amp;#39;s UTXO if they are).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Well, currently there is no one working on a malleability fix, so we&lt;br/&gt;&amp;gt; should probably work forwards the next available goal. ;)&lt;br/&gt;&lt;br/&gt;Oh, I&amp;#39;m pushing BIP 62, as well, in parallel with everything else :)&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; For the current form it would be enough to have&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; SecretAHash || KeyB&amp;#39; || KeyB || KeyA || TxID || SignatureB (L=231B)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; with KeyB being the node pubkey (lots of key reusage...)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; or&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; SecretAHash || KeyB&amp;#39; || KeyB || KeyA || TxID || nodePubKey ||&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; SignatureB (L=264B) with KeyB as a channel key that does not need to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; be equal with the nodePubKey.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yes, I think avoiding key reuse is good.  So, to be clear, the anchor TX&lt;br/&gt;&amp;gt;&amp;gt; output looks like:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;         P2SH (2 KEYA KEYB 2 OP_CHECKMULTISIG)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Having to deal with malleability, the only viable solution for anchor&lt;br/&gt;&amp;gt; transactions are with escape and fast-escape?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think we can do slightly better with Schnorr signatures (which you can&lt;br/&gt;&amp;gt;&amp;gt; simply do multisig by addition, if I understand correctly) where both&lt;br/&gt;&amp;gt;&amp;gt; parties cooperate to form:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;         KEYA KEYB NODE-PUBKEYA NODE-PUBKEYB TXID DUAL-SIGNATURE&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; That&amp;#39;s 33&#43;33&#43;33&#43;33&#43;32&#43;64 = 228 bytes per channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Interesting, I kinda feel uncomfortable with Schnorr though. It feels&lt;br/&gt;&amp;gt; like some experimental method, and at least for Java, there are very&lt;br/&gt;&amp;gt; few implementations around (and I don&amp;#39;t feel comfortable implementing&lt;br/&gt;&amp;gt; it on my own either..)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I like the idea of adding together one object for the channel to be&lt;br/&gt;&amp;gt; sent by both nodes. Even without Schnorr it saves some bytes and the&lt;br/&gt;&amp;gt; overhead of gossipping.. We can always switch the signature to Schnorr&lt;br/&gt;&amp;gt; too..&lt;br/&gt;&lt;br/&gt;Yes, we&amp;#39;ve not as bound to consensus, which is nice.  Schnorr is&lt;br/&gt;something we can decide on later, for sure.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:44:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszt54ecjtjhd9pdn36yuhauhp4m89pswhy0vnqczaxphde42lt9gczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2cf3gqs</id>
    
      <title type="html">📅 Original date posted:2015-10-16 📝 Original message: Mats ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszt54ecjtjhd9pdn36yuhauhp4m89pswhy0vnqczaxphde42lt9gczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2cf3gqs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswkc20n6hjlhmw8kl2xwhvl5nahn9wmzndwnqveycs82kc425zrusy7mmlf&#39;&gt;nevent1q…mmlf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-10-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Mats Jerratsch &amp;lt;matsjj at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; So being done with encryption and authentication, the next layer for&lt;br/&gt;&amp;gt; me now is to figure out how exactly nodes will broadcast their&lt;br/&gt;&amp;gt; existence and open channels and everything.&lt;br/&gt;&lt;br/&gt;Hi Mats,&lt;br/&gt;&lt;br/&gt;        Thanks for bringing this on-list!&lt;br/&gt;&lt;br/&gt;&amp;gt; (2)&lt;br/&gt;&amp;gt; As long as the malleability issue has not been fixed, the blockchain&lt;br/&gt;&amp;gt; can only used with additional techniques to obtain a map of the&lt;br/&gt;&amp;gt; channels from it. As the anchor transactions are P2SH, we need to&lt;br/&gt;&amp;gt; expose the script, such that others are able to verify we at least&lt;br/&gt;&amp;gt; have an anchor tx on the blockchain (associated with costs after all).&lt;br/&gt;&lt;br/&gt;This makes some sense (though the anchor transactions don&amp;#39;t need to be&lt;br/&gt;P2SH, it&amp;#39;s nicer for bitcoin&amp;#39;s UTXO if they are).&lt;br/&gt;&lt;br/&gt;&amp;gt; For the current form it would be enough to have&lt;br/&gt;&amp;gt; SecretAHash || KeyB&amp;#39; || KeyB || KeyA || TxID || SignatureB (L=231B)&lt;br/&gt;&amp;gt; with KeyB being the node pubkey (lots of key reusage...)&lt;br/&gt;&amp;gt; or&lt;br/&gt;&amp;gt; SecretAHash || KeyB&amp;#39; || KeyB || KeyA || TxID || nodePubKey ||&lt;br/&gt;&amp;gt; SignatureB (L=264B) with KeyB as a channel key that does not need to&lt;br/&gt;&amp;gt; be equal with the nodePubKey.&lt;br/&gt;&lt;br/&gt;Yes, I think avoiding key reuse is good.  So, to be clear, the anchor TX&lt;br/&gt;output looks like:&lt;br/&gt;&lt;br/&gt;        P2SH (2 KEYA KEYB 2 OP_CHECKMULTISIG)&lt;br/&gt;&lt;br/&gt;To prove we control KEYA, we simply need to sign something with it (our&lt;br/&gt;nodePubKey):&lt;br/&gt;&lt;br/&gt;        KEYA NODE-PUBKEY TXID SIGNATURE&lt;br/&gt;&lt;br/&gt;I think we can do slightly better with Schnorr signatures (which you can&lt;br/&gt;simply do multisig by addition, if I understand correctly) where both&lt;br/&gt;parties cooperate to form:&lt;br/&gt;&lt;br/&gt;        KEYA KEYB NODE-PUBKEYA NODE-PUBKEYB TXID DUAL-SIGNATURE&lt;br/&gt;&lt;br/&gt;That&amp;#39;s 33&#43;33&#43;33&#43;33&#43;32&#43;64 = 228 bytes per channel.&lt;br/&gt;&lt;br/&gt;Later on, we can send SPV proofs for TXID.&lt;br/&gt;&lt;br/&gt;&amp;gt; This is information everyone should store in case a new node joins a&lt;br/&gt;&amp;gt; network, similar to the blockchain. New nodes can then check against&lt;br/&gt;&amp;gt; the blockchain, whether this data is actually present there. An&lt;br/&gt;&amp;gt; attacker can fake a complete network together with lots of&lt;br/&gt;&amp;gt; transactions on the blockchain, but the incentive is low (vandalism)&lt;br/&gt;&amp;gt; and the costs are high. For 100k nodes and 10 open channels per node,&lt;br/&gt;&amp;gt; this adds up to 220MB. Not too bad, considering full nodes are highly&lt;br/&gt;&amp;gt; incentivised to run full bitcoin nodes as well, it is actually rather&lt;br/&gt;&amp;gt; negligible. This information is pretty static, however we want&lt;br/&gt;&amp;gt; everyone to have a decently consistent view of the network, so we&lt;br/&gt;&amp;gt; would probably do some rebroadcast of that every few days, just to&lt;br/&gt;&amp;gt; ensure everyone knows about it.&lt;br/&gt;&lt;br/&gt;Also, once a node is live, I&amp;#39;m not sure how much of the map it will need&lt;br/&gt;to keep.  It might be able to prune distant parts of the map randomly,&lt;br/&gt;and get it back from the rest of the network if needed?  Requires more&lt;br/&gt;thought, though.&lt;br/&gt;&lt;br/&gt;&amp;gt; As I&amp;#39;m implementing broadcast messages anyways for other purposes (see&lt;br/&gt;&amp;gt; other ML post), I tent to like (2) the most, it is the most expensive&lt;br/&gt;&amp;gt; to attack as well I think.&lt;br/&gt;&lt;br/&gt;I agree.  Least on-chain spam.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:44:47&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdxv8dh227hwq63uw8vfpwltu6vw4xqnc2klqle68dkmm356dm29szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz230fg9q</id>
    
      <title type="html">📅 Original date posted:2015-09-20 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdxv8dh227hwq63uw8vfpwltu6vw4xqnc2klqle68dkmm356dm29szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz230fg9q" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9z7ngplzrjkwv3gnr86afnwztvzw3jk0mdm94x4yvsna4vufu6dqezgq98&#39;&gt;nevent1q…gq98&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; On 19 September 2015 9:39:44 am AEST, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;        // Sum of this whole thing after decryption.&lt;br/&gt;&amp;gt;&amp;gt;        required sha256_hash sum = 1;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;        // Where to next?&lt;br/&gt;&amp;gt;&amp;gt;        oneof next {&lt;br/&gt;&amp;gt;&amp;gt;                // Actually, this is the last one&lt;br/&gt;&amp;gt;&amp;gt;                bool end = 2;&lt;br/&gt;&amp;gt;&amp;gt;                // Next lightning node.&lt;br/&gt;&amp;gt;&amp;gt;                pubkey lightning = 3;&lt;br/&gt;&amp;gt;&amp;gt;                // Other realms go here...&lt;br/&gt;&amp;gt;&amp;gt;        }&lt;br/&gt;&amp;gt;&amp;gt;        &lt;br/&gt;&amp;gt;&amp;gt;        // How much fee you can take (== all, if last node)&lt;br/&gt;&amp;gt;&amp;gt;        required int32 fee = 4;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;        // Remainder (route blob for next node).&lt;br/&gt;&amp;gt;&amp;gt;        required bytes route = 5;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;Nodes create the route backwards, to calculate the size.  Then picks a&lt;br/&gt;&amp;gt;&amp;gt;total size randomly between 1024 and 4096, and pads to that size (at&lt;br/&gt;&amp;gt;&amp;gt;least 32 bytes of random padding).  Then walks backwards to wrap and&lt;br/&gt;&amp;gt;&amp;gt;encrypt it.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;This offers some protection from guessing the route length.&lt;br/&gt;&amp;gt; Wouldn&amp;#39;t it be better to store the expected balance to be forwarded rather than the fee? That way if someone takes too much, the next node can immediately abort the transaction.&lt;br/&gt;&lt;br/&gt;Yes, excellent point.  I flip-flopped on that; so I flipped again.&lt;br/&gt;&lt;br/&gt;&amp;gt; Shouldn&amp;#39;t the onion blob be re-padded when forwarded? Otherwise it&amp;#39;d&lt;br/&gt;&amp;gt; sometimes drop below 1024 bytes and you&amp;#39;d be able to tell you&amp;#39;re near&lt;br/&gt;&amp;gt; the end of the chain.&lt;br/&gt;&lt;br/&gt;Yes and this applies for almost any length selection method.&lt;br/&gt;&lt;br/&gt;&amp;gt; Just adding random bytes on to the end should&lt;br/&gt;&amp;gt; work I think - they&amp;#39;ll just be treated as extra padding and ignored.&lt;br/&gt;&lt;br/&gt;My original plan.  But it enables a probing attack where you corrupt the&lt;br/&gt;packet and if it succeeds anyway you know those bytes weren&amp;#39;t used.&lt;br/&gt;&lt;br/&gt;&amp;gt; Alternatively, maybe you could just append the encrypted bytes that made up your post of the payload from your incoming message: it was encrypted to you so should be effectively random to anyone else and will be garbled further when the next node &amp;#34;decrypts&amp;#34; it. That would save on entropy/crypto ops, and a constant message size would leak minimal info I think.&lt;br/&gt;&lt;br/&gt;So rotate the payload?  I don&amp;#39;t think that&amp;#39;s verifiable by the&lt;br/&gt;recipient, so has the same probing attack issue as above.&lt;br/&gt;&lt;br/&gt;Hmm, what if we include a pubkey, and you use that to encrypt 0 padding?&lt;br/&gt;The last hop gets the privkey (and boundary information), and she can&lt;br/&gt;verify the padding.&lt;br/&gt;&lt;br/&gt;Off the top of my head, that solves both the length problem, and the&lt;br/&gt;&amp;#34;route replacement&amp;#34; problem.&lt;br/&gt;&lt;br/&gt;But I&amp;#39;ve not had coffee yet, plus jetlag.  Could be missing a flaw or&lt;br/&gt;simplification!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:44:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxvlrt3027zd9v9p763k7jlzkl72a23qjyn4y76zg5kvk98x6n5agzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2x43js9</id>
    
      <title type="html">📅 Original date posted:2015-09-20 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxvlrt3027zd9v9p763k7jlzkl72a23qjyn4y76zg5kvk98x6n5agzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2x43js9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvvt6e3qzca07unp32rnm6metkuvq950pxzmfmfdyzm0ufpp3lshc2l8j9a&#39;&gt;nevent1q…8j9a&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; On 19 September 2015 9:39:44 am AEST, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;Route Probing Attacks&lt;br/&gt;&amp;gt;&amp;gt;=====================&lt;br/&gt;&amp;gt;&amp;gt;Now, there&amp;#39;s a weakness here: No MAC!  A nosy node can&amp;#39;t corrupt the&lt;br/&gt;&amp;gt;&amp;gt;routing past the next hop, but it could replace it entirely (this is&lt;br/&gt;&amp;gt;&amp;gt;fundamental to the scheme of R values).  If it guesses the final&lt;br/&gt;&amp;gt;&amp;gt;destination right, the HTLC will succeed, otherwise it will fail, so it&lt;br/&gt;&amp;gt;&amp;gt;can use this to probe.&lt;br/&gt;...&lt;br/&gt;&amp;gt;&amp;gt;I can&amp;#39;t see a fix for this in general. :(&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think parallel probes work well - if any of your probes succeed, your neighbour knows R and can claim all of your probes. Parallelization is also limited by channel capacity, assuming the payee knows how much to expect.&lt;br/&gt;&lt;br/&gt;Channel capacity might not be an issue for tiny micropayments, but&lt;br/&gt;the reveal of R is a good point: such probing should have a real cost&lt;br/&gt;on success.  I&amp;#39;ll be sure to implement that properly :)&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure probing is really plausible given mass deployment, is it? You have to guess the eventual recipient but given randomised routing you have every person or business using lightning as a potential candidate with possibly equal probability?&lt;br/&gt;&lt;br/&gt;If someone wants to know whether I&amp;#39;m sending money to you, it would&lt;br/&gt;work.  Get a cheap hub near you, and one near me, and probe every&lt;br/&gt;payment which passes through both.&lt;br/&gt;&lt;br/&gt;But I guess it&amp;#39;s a fairly boutique surveillance, which doesn&amp;#39;t scale.&lt;br/&gt;&lt;br/&gt;&amp;gt; For a general solution, I think you could completely rule out probing by having two R values, one known only by the recipient, and one by the sender (call it S say). Then make the htlcs payable on presentation of both R and S and include S encrypted to the final recipient in the onion payload. Munging the payload then makes the htlc irredeemable so misrouting it gives no information.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s clever.  And I think it works.  I will need more coffee to figure&lt;br/&gt;out if we should revise the transaction structure to include this.&lt;br/&gt;&lt;br/&gt;&amp;gt; (Please let me know if the formatting of this mail is too hopeless; trying out a new setup)&lt;br/&gt;&lt;br/&gt;No work wrap, but it seemed to work fine.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:44:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxjlkhvd309a8mywuq3ppgqnsws5arxjc0kg88w7zjlm36rzet2pgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz23r5yqr</id>
    
      <title type="html">📅 Original date posted:2015-08-01 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxjlkhvd309a8mywuq3ppgqnsws5arxjc0kg88w7zjlm36rzet2pgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz23r5yqr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszmw3ma796k5eerf5fkut3tgz203t2hffx7ct89ere8jvm9292dgc7xhq46&#39;&gt;nevent1q…hq46&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-08-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Christopher Jamthagen &amp;lt;cjamthagen at gmx.com&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; Sent: Friday, July 31, 2015 at 1:48 AM&lt;br/&gt;&amp;gt;&amp;gt; From: &amp;#34;Rusty Russell&amp;#34; &amp;lt;rusty at rustcorp.com.au&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; To: &amp;#34;Christopher Jamthagen&amp;#34; &amp;lt;cjamthagen at gmx.com&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Cc: &amp;#34;lightning-dev at lists.linuxfoundation.org&amp;#34; &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Subject: Re: [Lightning-dev] Stealing money from a hub?&lt;br/&gt;&amp;gt;&amp;gt; Christopher Jamthagen &amp;lt;cjamthagen at gmx.com&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Would it be desirable/possible to implement the timestop feature for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CLTV as well? That would make the difference between the number of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; blocks until either expiration the same in case of a block-filling&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; attack. If I&amp;#39;m not mistaken Peter Todds BIP is already merged, but&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; this feature could be implemented with another soft fork.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yes, timestop would logically be a softfork add, and it should apply to&lt;br/&gt;&amp;gt;&amp;gt; both (same logic applies).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the timestop feature would activate only when the CLTV transaction&lt;br/&gt;&amp;gt; is included in a block, it would allow for a pretty serious DoS attack&lt;br/&gt;&amp;gt; vector where hubs can be forced to close channels with other hubs by&lt;br/&gt;&amp;gt; having the attacker, as the receiver, never reveal R and create a&lt;br/&gt;&amp;gt; block-filling attack.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think so.  Let&amp;#39;s say the rule is &amp;#34;time doesn&amp;#39;t pass if a block&lt;br/&gt;is full&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt; This would force the hub connected to the receiver to broadcast the&lt;br/&gt;&amp;gt; commitment transaction&lt;br/&gt;&lt;br/&gt;Why?  The HTLC wouldn&amp;#39;t expire, which would be a pain, but there&amp;#39;s no&lt;br/&gt;reason to panic and dump transactions.  By definition, during a block&lt;br/&gt;filling attack you&amp;#39;ve got all the time in the world.&lt;br/&gt;&lt;br/&gt;Now, preventing HTLCs from expiring is a DoS, but a lesser one.&lt;br/&gt;&lt;br/&gt;What am I missing?&lt;br/&gt;&lt;br/&gt;&amp;gt; CLTV transactions would need to include the current block-height&lt;br/&gt;&amp;gt; immediately when a commitment transaction is signed, so that miners&lt;br/&gt;&amp;gt; can know where to start counting full blocks from as soon as it is&lt;br/&gt;&amp;gt; broadcast. So my question is: Is such an upgrade for CLTV, as it is&lt;br/&gt;&amp;gt; now, soft-forkable as it requires additional arguments? I am not&lt;br/&gt;&amp;gt; totally clear on when upgrades are soft-forkable vs. hard-forkable.&lt;br/&gt;&lt;br/&gt;Anything which is a furthur restriction (as in &amp;#34;this used to be valid,&lt;br/&gt;and no longer is&amp;#34;) is soft-forkable.  So delaying timeouts is a soft-fork.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Speaking of being online all the time, checking the blockchain is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; outsourceable, right? So it seems that miners would be the perfect&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; third party to check for cheaters in LN. By offering them a nice chunk&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; of our counterparty&amp;#39;s funds as fees, they should be incentiviced&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; enough to keep an extra eye for us on the blockchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Outsourcability scales really well; once you&amp;#39;re full-time monitoring the&lt;br/&gt;&amp;gt;&amp;gt; blockchain, might as well get as many clients as possible. You can also&lt;br/&gt;&amp;gt;&amp;gt; automate the outsourcee&amp;#39;s fee, by including it in the &amp;#34;steal&amp;#34; tx.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Does it scale that well? I guess looking up pre-images in the shachain is fast, but what about R values in HTLCs? Would the third party have to store all those values or is there a nice optimization I have missed?&lt;br/&gt;&lt;br/&gt;Indeed, there&amp;#39;s a separate thread where Anthony Towns points out that&lt;br/&gt;remembering R values and timeouts is an issue.&lt;br/&gt;&lt;br/&gt;I was referring to the part where you watch the chain for spends on the&lt;br/&gt;anchor outputs.  You only need to do work to check what happened when&lt;br/&gt;one of them gets spent, should almost never happen (since the client&lt;br/&gt;should tell you they&amp;#39;re going to close the channel cooperatively).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:43:52&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstxrc8z6hzhsxerdc76u7327zznvh25fw3pg6tngmrraveu3ct29qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ru6f3a</id>
    
      <title type="html">📅 Original date posted:2015-07-23 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstxrc8z6hzhsxerdc76u7327zznvh25fw3pg6tngmrraveu3ct29qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ru6f3a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8v2g3gjrse9l6zf7yvluxmxhd2tuw2ufm75llczg3vlztzge0vagzgm064&#39;&gt;nevent1q…m064&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-07-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; If Alice ever tries cheating, and publishes and old commitment:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   800 Alice &#43; DELAY | #Alice_42 &#43; Bob&lt;br/&gt;&amp;gt;   200 Bob&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then Bob needs to work out which of the 100 Alice_N hashes he knows or can&lt;br/&gt;&amp;gt; work out is being abused; prior to the DELAY expiring. With millions of&lt;br/&gt;&amp;gt; transactions that could be a bunch of hash calculations or a 100MB lookup&lt;br/&gt;&amp;gt; table. Might make more sense to have a dummy output of &amp;#34;0: OP_RETURN 42&amp;#34; to&lt;br/&gt;&amp;gt; make that calculation trivial though? That could trivially be verified as&lt;br/&gt;&amp;gt; part of the &amp;#34;forms hash chain as expect&amp;#34; and &amp;#34;txn structure&amp;#34; checks.&lt;br/&gt;&lt;br/&gt;It might be millions.  What happens is Bob sees the anchor being spent,&lt;br/&gt;checks if it&amp;#39;s the latest commitment transaction.  It&amp;#39;s not, so does a&lt;br/&gt;backwards search to find the revocation key.&lt;br/&gt;&lt;br/&gt;The time taken for that search is O(N), where N is the current&lt;br/&gt;commitment transaction number.  But measurements on my laptop show that&lt;br/&gt;1M transactions takes 5.4 seconds (see benchmark below), so I don&amp;#39;t&lt;br/&gt;think it&amp;#39;s worth optimizing this &amp;#34;never happens&amp;#34; case.&lt;br/&gt;&lt;br/&gt;&amp;gt; HTLCs are harder if you assume pay2scripthash is used though. If Alice&lt;br/&gt;&amp;gt; published:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   100 Alice &#43; Delay | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt;   100 Bob&lt;br/&gt;&amp;gt;   200 R1 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT1 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt;   200 R2 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT2 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt;   200 R3 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT3 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt;   200 R4 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT4 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; well after R1..R4 were known and Alice_55 was revealed in order to try&lt;br/&gt;&amp;gt; stealing most of the channel&amp;#39;s funds, I think Bob could only claim the&lt;br/&gt;&amp;gt; final outputs if he could unhash the scripts, which would require having&lt;br/&gt;&amp;gt; remembered R1..R4 even after those contracts had long been resolved. I&lt;br/&gt;&amp;gt; guess it could be feasible in that case to have the extra output be &amp;#34;0:&lt;br/&gt;&amp;gt; OP_RETURN 42 #R1 #R2 #R3 #R4&amp;#34;?&lt;br/&gt;&lt;br/&gt;Good point!  With p2sh you need to know the R hash values and timeouts&lt;br/&gt;to spend the output (40 bytes).  Since OP_RETURN is length-limited to 80&lt;br/&gt;bytes, you can&amp;#39;t fit more than 2.&lt;br/&gt;&lt;br/&gt;And if the HTLC outputs are not P2SH, they&amp;#39;re non-standard and won&amp;#39;t be&lt;br/&gt;relayed.&lt;br/&gt;&lt;br/&gt;What else can we come up with?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;&amp;gt; [2] (Unattached footnote) This project&amp;#39;s motto is &amp;#34;The lightning network:&lt;br/&gt;&amp;gt; it&amp;#39;s off the chain!&amp;#34; right?&lt;br/&gt;&amp;gt; &lt;a href=&#34;http://www.urbandictionary.com/define.php?term=off&#43;the&#43;chain&#34;&gt;http://www.urbandictionary.com/define.php?term=off&#43;the&#43;chain&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Err.... Yeah.  It&amp;#39;s spelled &amp;#34;caching layer for bitcoin&amp;#34; but it&amp;#39;s&lt;br/&gt;pronounced just like that.
    </content>
    <updated>2023-06-09T14:43:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs22xecqefkghtq5hs6j45nacdp87xfse4p488pae98j0rjdw5n5lgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2d53wcm</id>
    
      <title type="html">📅 Original date posted:2015-07-07 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs22xecqefkghtq5hs6j45nacdp87xfse4p488pae98j0rjdw5n5lgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2d53wcm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv9wjq7432vgraxnrwv6ekrcece3t7lnnv94lxt63xt8gt7kz0urqvyy4nw&#39;&gt;nevent1q…y4nw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-07-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;        &lt;a href=&#34;http://ozlabs.org/~rusty/diagrams/dual-anchor.svg&#34;&gt;http://ozlabs.org/~rusty/diagrams/dual-anchor.svg&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;        Since I posted my first design of HTLC yesterday, and noted that&lt;br/&gt;it doesn&amp;#39;t seem to require new sighash modes, I went back and revisited&lt;br/&gt;my discarded ideas for establishing an anchor without new sighash modes.&lt;br/&gt;If we can do that (and my HTLC design stands up), then lightning network&lt;br/&gt;only needs OP_CHECKSEQUENCEVERIFY and OP_CHECKLOCKTIMEVERIFY, which are&lt;br/&gt;fairly low-albedo soft forks.&lt;br/&gt;&lt;br/&gt;        To recap: the draft paper and current code trade signatures on&lt;br/&gt;the first commitment transaction before signing the anchor transaction.&lt;br/&gt;That way you are sure to have a way to get your funds back before you&lt;br/&gt;put them into the anchor.  (The paper uses the term funding transaction;&lt;br/&gt;I prefer anchor).&lt;br/&gt;&lt;br/&gt;        This can&amp;#39;t be done in normal bitcoin, as you don&amp;#39;t know the TXID&lt;br/&gt;of the anchor until after its inputs are signed, so you can&amp;#39;t sign the&lt;br/&gt;commitment transaction without knowing the txid of the anchor.  It works&lt;br/&gt;in Elements Alpha because they have segregated witness; the txid of the&lt;br/&gt;anchor doesn&amp;#39;t hash the input scripts.  It could work in bitcoin with a&lt;br/&gt;softfork of a new CHECKSIG2 which has new signature modes, but there&amp;#39;s&lt;br/&gt;not even a BIP for that, and there are so many things that could be done&lt;br/&gt;there that it&amp;#39;s likely to be long delayed.&lt;br/&gt;&lt;br/&gt;        So, how can we solve this?  Well, we can have two anchors&lt;br/&gt;instead of one.  I put my inputs into my anchor, you put your inputs&lt;br/&gt;into yours: each one requires both our signatures to spend.  The&lt;br/&gt;commitment tx has two inputs, one for each.&lt;br/&gt;&lt;br/&gt;        We can trade anchor txids, so we can both sign the commitment&lt;br/&gt;tx.  But now one of could withhold our anchor, leaving us with an&lt;br/&gt;unusable commitment tx and stuck output from an anchor.  We need a way&lt;br/&gt;to get the funds back in that &amp;#34;abort&amp;#34; case.&lt;br/&gt;&lt;br/&gt;        Thus we add an intermediary transaction (called &amp;#34;Escape&amp;#34;&lt;br/&gt;transactions) which spends the 2 of 2 anchor output, but can be spent&lt;br/&gt;either by 2 of 2 (ie. the commitment tx), OR back to the anchor owner&lt;br/&gt;after a delay (using OP_CHECKSEQUENCEVERIFY).&lt;br/&gt;&lt;br/&gt;        The order is as follows:&lt;br/&gt;&lt;br/&gt;1) We both trade anchor txids and amounts.&lt;br/&gt;2) We both trade signatures for the escape transactions, so either one&lt;br/&gt;   can broadcast them.&lt;br/&gt;3) Now we are sure to be able to recover our funds, we each broadcast&lt;br/&gt;   our anchor txs.&lt;br/&gt;4) If the other side broadcasts their escape transaction, abort and&lt;br/&gt;   broadcast our escape transaction.  After the timeout, we can spend&lt;br/&gt;   it.&lt;br/&gt;5) If the other side doesn&amp;#39;t broadcast their anchor tx, abort and&lt;br/&gt;   broadcast our escape transaction.&lt;br/&gt;6) Otherwise, when the anchor txs reach the required depth, we exchange&lt;br/&gt;   signatures for the commitment transaction.&lt;br/&gt;7) If the other side broadcasts either escape transaction, broadcast&lt;br/&gt;   the other escape transaction and the commitment tx as normal (this is&lt;br/&gt;   a unilateral close) before they can reclaim their anchor funds.&lt;br/&gt;&lt;br/&gt;I think this works, and doesn&amp;#39;t add any new requirements; you now need&lt;br/&gt;to watch out for escape txs being broadcast instead of commitment txs.&lt;br/&gt;&lt;br/&gt;The downside is that there are 3 extra transactions involved; 1 extra&lt;br/&gt;for the channel open, and 2 for the channel close.&lt;br/&gt;&lt;br/&gt;Feedback, optimizations, horrible holes?&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:43:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq9nj5mvsy23u7frqj6u5ldv9yrdasxntrx2nzem68fuqmx5htshszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ac7xrw</id>
    
      <title type="html">📅 Original date posted:2021-07-06 📝 Original message: Carla ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq9nj5mvsy23u7frqj6u5ldv9yrdasxntrx2nzem68fuqmx5htshszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ac7xrw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9v5jdd68e02kr3qmqumpjud0el2xpefyd8aveg2gg5a6t4ze3ypc7rpxrd&#39;&gt;nevent1q…pxrd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Carla Kirk-Cohen &amp;lt;kirkcohenc at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&lt;br/&gt;Hi Carla,&lt;br/&gt;&lt;br/&gt;        I apologize for not responding to this earlier, but it was&lt;br/&gt;raised again in the recent spec meeting&lt;br/&gt;(&lt;a href=&#34;https://lightningd.github.io/meetings/ln_spec_meeting/2021/ln_spec_meeting.2021-07-05-20.06.log.html&#34;&gt;https://lightningd.github.io/meetings/ln_spec_meeting/2021/ln_spec_meeting.2021-07-05-20.06.log.html&lt;/a&gt;).&lt;br/&gt;&lt;br/&gt;I love the idea of more specific error codes, BTW!&lt;br/&gt;&lt;br/&gt;Feedback interleaved:&lt;br/&gt;&lt;br/&gt;&amp;gt; Since we shouldn’t have non-ascii values in the error string itself,&lt;br/&gt;&amp;gt; this can most easily be achieved by adding TLV fields after the&lt;br/&gt;&amp;gt; data field. In terms of supporting nodes that have not upgraded,&lt;br/&gt;&amp;gt; we could either include the error code in the data field to cover&lt;br/&gt;&amp;gt; our bases, or introduce a feature bit so that we know whether&lt;br/&gt;&amp;gt; to backfill the data field. This gives upgraded nodes an improved&lt;br/&gt;&amp;gt; quality of life, while leaving older nodes unaffected.&lt;br/&gt;&lt;br/&gt;Older nodes should definitely ignore extra fields; it&amp;#39;s in the spec and&lt;br/&gt;we&amp;#39;ve relied on this to extend messages in the past, so this part is&lt;br/&gt;easy.&lt;br/&gt;&lt;br/&gt;Technically, all defined types are now assumed to have an optional TLV&lt;br/&gt;appended, since f068dd0d (Bolt 1: Specify that extensions to existing&lt;br/&gt;messages must use TLV (#754)).&lt;br/&gt;&lt;br/&gt;&amp;gt; While we can’t enumerate every possible error, there are quite&lt;br/&gt;&amp;gt; a few cases in the spec where we can introduce explicit error&lt;br/&gt;&amp;gt; codes. For the sake of the skim-readers, I’ve left that list at&lt;br/&gt;&amp;gt; the end of the email.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Taking the example of our node receiving an invalid signature for&lt;br/&gt;&amp;gt; a htlc, a new error would look like this:&lt;br/&gt;&lt;br/&gt;I think this is both too much, and not enough.&lt;br/&gt;&lt;br/&gt;Too much:&lt;br/&gt;- Many of these errors are &amp;#34;your implementation is broken&amp;#34;, which is&lt;br/&gt;  really not something actionable by the recipient.&lt;br/&gt;- A lot of work to fill in all these error cases, which will (because&lt;br/&gt;  they&amp;#39;re usually impossible) will be untested and broken.&lt;br/&gt;&lt;br/&gt;Not enough:&lt;br/&gt;- Look at the proposal for channel_types, where you would object to the&lt;br/&gt;  channel_type if you don&amp;#39;t like it.  This would be grouped under&lt;br/&gt;  &amp;#34;Funding params unacceptable&amp;#34;, which is actually 99% of errors at this&lt;br/&gt;  point and does not say what the problem is with specificity.&lt;br/&gt;&lt;br/&gt;I took a different approach with onion messages[1], where you (optionally)&lt;br/&gt;specify the field number, even an optional suggested value:&lt;br/&gt;&lt;br/&gt;    1. type: 1 (`erroneous_field`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`tu64`:`tlv_fieldnum`]&lt;br/&gt;    1. type: 3 (`suggested_value`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*byte`:`value`]&lt;br/&gt;    1. type: 5 (`error`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*utf8`:`msg`]&lt;br/&gt;&lt;br/&gt;In our case, we need to refer to which message (if any) caused the&lt;br/&gt;error, and we have non-tlv fields, so it can&amp;#39;t simply use the tlv field&lt;br/&gt;number.&lt;br/&gt;&lt;br/&gt;Here&amp;#39;s my straw proposal:&lt;br/&gt;&lt;br/&gt;1. `tlv_stream`: `error_tlvs`&lt;br/&gt;2. types:&lt;br/&gt;    1. type: 1 (`erroneous_message`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*byte`:`message`]&lt;br/&gt;    1. type: 3 (`erroneous_fieldnum`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`tu64`:`fieldnum`]&lt;br/&gt;    1. type: 5 (`suggested_value`)&lt;br/&gt;    2. data:&lt;br/&gt;        * [`...*byte`:`value`]&lt;br/&gt;&lt;br/&gt;erroneous_message is the message we&amp;#39;re complaining about (including&lt;br/&gt;2-byte type), which may be truncated (but must be at least 2 bytes).&lt;br/&gt;&lt;br/&gt;fieldnum is either the 0-based field number (for fixed fields), or the&lt;br/&gt;number of fixed fields &#43; the tlv type (for tlv fields).&lt;br/&gt;&lt;br/&gt;suggested_value is the optional value if we have an idea if what we&lt;br/&gt;expected / prefer.&lt;br/&gt;&lt;br/&gt;&amp;gt; This new kind of error provides us with an error code that tells us&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; exactly what has gone wrong, and metadata pointing to the htlc&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; with an invalid sig. This information can be logged, or stored in a&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; more permanent error store to help diagnose issues in the future.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Right now, the spec is pretty strict on error handling [13], indicating&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; that senders/recipients of errors `MUST` fail the channel referenced&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; in the error.&lt;br/&gt;&lt;br/&gt;&amp;gt; This isn’t very practical, and I believe that the majority&lt;br/&gt;&amp;gt; of the impls don’t abide by this instruction.&lt;br/&gt;&lt;br/&gt;This was inevitable eventually, but c-lightning deliberately treated&lt;br/&gt;errors as fatal for a long time so people would *notice* and *report*&lt;br/&gt;these issues.&lt;br/&gt;&lt;br/&gt;To be fair, *LND* didn&amp;#39;t treat them as fatal.  As so naturally your&lt;br/&gt;engineers didn&amp;#39;t *think* of them as a big deal (and testing didn&amp;#39;t show&lt;br/&gt;it up), so it would send errors for cases which it clearly didn&amp;#39;t want&lt;br/&gt;to close the channel (e.g. peer too slow to respond!).&lt;br/&gt;&lt;br/&gt;Hence this PR, which makes these less fatal, and adds warning support:&lt;br/&gt;&lt;br/&gt;        &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/834&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/834&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;(We should similarly add this TLV to warnings?)&lt;br/&gt;&lt;br/&gt;&amp;gt; Candidates for error codes:&lt;br/&gt;&lt;br/&gt;The vast majority of these are &amp;#34;contact your developer, peer says we did&lt;br/&gt;something illegal&amp;#34;.  Which is always nice to have more information&lt;br/&gt;about, but not critital.&lt;br/&gt;&lt;br/&gt;The exceptions are:&lt;br/&gt;&lt;br/&gt;&amp;gt; Funding Process:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Funding process timeout [2]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Fees out of range [3]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Funding tx spent [11]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Funding params unacceptable (eg, channel too small)&lt;br/&gt;...&lt;br/&gt;&amp;gt; Channel State Machine:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; * HTLC timeout [4]&lt;br/&gt;...&lt;br/&gt;&amp;gt; Fee Updates&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Update fee to low/high [9]&lt;br/&gt;...&lt;br/&gt;&lt;br/&gt;And BTW this one is misguided:&lt;br/&gt;&lt;br/&gt;&amp;gt; * Feature bit required&lt;br/&gt;&lt;br/&gt;If Alice says a feature bit is even (compulsory), and Bob doesn&amp;#39;t offer&lt;br/&gt;it, that&amp;#39;s on Bob!  Alice&amp;#39;s behavior here is undefined: she may do a&lt;br/&gt;courtesy message to Bob, but she may also *assume* it&amp;#39;s agreed.&lt;br/&gt;&lt;br/&gt;But it&amp;#39;s worth noting that with the exception of timeouts, these are all&lt;br/&gt;expressable in form &amp;#34;problem is this message, this field&amp;#34;.  Perhaps it&amp;#39;s&lt;br/&gt;worth having a special TLV case for timeouts in the message?&lt;br/&gt;&lt;br/&gt;Thanks for starting this ball rolling!&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/759&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/759&lt;/a&gt;
    </content>
    <updated>2023-06-09T14:40:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstk8lthzunewe0he3jfvu5ttwc40r8qhurmqdlgvsh3nc4585s73szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2keagre</id>
    
      <title type="html">📅 Original date posted:2021-04-19 📝 Original message: Lloyd ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstk8lthzunewe0he3jfvu5ttwc40r8qhurmqdlgvsh3nc4585s73szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2keagre" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg6400md3rkguukp3z3009y52rryzl6l8h5ulz2hklqyxj68734sszj6kxy&#39;&gt;nevent1q…6kxy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-19&lt;br/&gt;📝 Original message:&lt;br/&gt;Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; On Wed, Dec 9, 2020 at 4:26 PM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Say r1=SHA256(ss || counter || 0), r2 = SHA256(ss || counter || 1)?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Nice work.  This would be a definite recovery win.  We should add this&lt;br/&gt;&amp;gt;&amp;gt; to the DF spec, because Lisa was almost finished implmenting it, so it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; clearly due for a change!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes that&amp;#39;s certainly a fine way to do it.&lt;br/&gt;&amp;gt; I was also thinking you could eliminate all &amp;#34;basepoints&amp;#34; (not just funding&lt;br/&gt;&amp;gt; pubkey) using something like this. i.e. just use the node pubkey as the&lt;br/&gt;&amp;gt; &amp;#34;basepoint&amp;#34; for everything and randomize it using the shared secret for&lt;br/&gt;&amp;gt; each purpose.&lt;br/&gt;&lt;br/&gt;OK, I tried to spec this out, to implement it.  One issue is that you&lt;br/&gt;now can&amp;#39;t sign the commitment_tx (or htlc_tx) without knowing the node&amp;#39;s&lt;br/&gt;secret key (or, equivalently, knowing the tweaked key and being able to&lt;br/&gt;use the derivation scheme to untweak it).&lt;br/&gt;&lt;br/&gt;c-lightning currently does a round-trip to the signing daemon for this&lt;br/&gt;already, but it&amp;#39;d be nice to avoid requiring it.&lt;br/&gt;&lt;br/&gt;So I somewhat reluctantly added `commit_basepoint` from which the others&lt;br/&gt;are derived: an implementation can use some hardened derivation from its&lt;br/&gt;privkey (e.g. SHA256(node_privkey || ss || counter)) to create&lt;br/&gt;this in a deterministic but still private manner.&lt;br/&gt;&lt;br/&gt;Or we could just leave all the other points in and just replace&lt;br/&gt;funding_pubkey.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-09T14:39:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqj4jmmtdve84u085d9a48tf2q2egkrnrun5ufcs5vtug2seqvkcczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2rsnuhp</id>
    
      <title type="html">📅 Original date posted:2021-04-20 📝 Original message: Lloyd ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqj4jmmtdve84u085d9a48tf2q2egkrnrun5ufcs5vtug2seqvkcczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2rsnuhp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2vpx0nq9xuu0jez7snygrj0jddqy08dsmm8h3ytg3p4mk33fxzkc0xu06r&#39;&gt;nevent1q…u06r&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, 20 Apr 2021 at 10:55, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; On Wed, Dec 9, 2020 at 4:26 PM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Say r1=SHA256(ss || counter || 0), r2 = SHA256(ss || counter || 1)?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Nice work.  This would be a definite recovery win.  We should add this&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; to the DF spec, because Lisa was almost finished implmenting it, so it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; clearly due for a change!&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Yes that&amp;#39;s certainly a fine way to do it.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I was also thinking you could eliminate all &amp;#34;basepoints&amp;#34; (not just&lt;br/&gt;&amp;gt;&amp;gt; funding&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; pubkey) using something like this. i.e. just use the node pubkey as the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;#34;basepoint&amp;#34; for everything and randomize it using the shared secret for&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; each purpose.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; OK, I tried to spec this out, to implement it.  One issue is that you&lt;br/&gt;&amp;gt;&amp;gt; now can&amp;#39;t sign the commitment_tx (or htlc_tx) without knowing the node&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; secret key (or, equivalently, knowing the tweaked key and being able to&lt;br/&gt;&amp;gt;&amp;gt; use the derivation scheme to untweak it).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Using node secret key to sign the commitment_tx seems like something you&lt;br/&gt;&amp;gt; will have to accept to introduce this feature. For the idea to work it has&lt;br/&gt;&amp;gt; to be some public key that is known by others and gossiped through the&lt;br/&gt;&amp;gt; network. Of course you could extend the information that is gossiped about&lt;br/&gt;&amp;gt; a node to include a &amp;#34;commit_tx_point&amp;#34; but the nodeid seems the more natural&lt;br/&gt;&amp;gt; choice.&lt;br/&gt;&lt;br/&gt;Duh, yes, of course you need the funding_key secret to sign the&lt;br/&gt;commitment tx.&lt;br/&gt;&lt;br/&gt;But you really don&amp;#39;t want to access the `remote_pubkey` (which in a&lt;br/&gt;modern option_static_remotekey world is simply the payment_basepoint).&lt;br/&gt;It&amp;#39;s generally considered good practice *not* to have this accessible to&lt;br/&gt;your lightning node at all.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; c-lightning currently does a round-trip to the signing daemon for this&lt;br/&gt;&amp;gt;&amp;gt; already, but it&amp;#39;d be nice to avoid requiring it.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; So I somewhat reluctantly added `commit_basepoint` from which the others&lt;br/&gt;&amp;gt;&amp;gt; are derived: an implementation can use some hardened derivation from its&lt;br/&gt;&amp;gt;&amp;gt; privkey (e.g. SHA256(node_privkey || ss || counter)) to create&lt;br/&gt;&amp;gt;&amp;gt; this in a deterministic but still private manner.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Or we could just leave all the other points in and just replace&lt;br/&gt;&amp;gt;&amp;gt; funding_pubkey.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another approach is to do things in &amp;#34;soft-fork&amp;#34; like manner.&lt;br/&gt;&amp;gt; Each node that wants to offer this feature sets their funding_pubkey to a&lt;br/&gt;&amp;gt; specified DH tweak of the nodeid. Nodes that want backup-free channel&lt;br/&gt;&amp;gt; recovery can just refuse to carry on the funding protocol if the&lt;br/&gt;&amp;gt; funding_pubkey is not set the way it wanted.&lt;br/&gt;&lt;br/&gt;Yeah, you can totally do this in an opt-in manner, except it doesn&amp;#39;t&lt;br/&gt;work unless your peer does it too.  Since we expect everyone to want to&lt;br/&gt;do this, it&amp;#39;s clearer to force everyone to calculate this and not have&lt;br/&gt;redundant and confusing fields in the message.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;From my pruisit crypto point of view having only one public key is nice but&lt;br/&gt;&amp;gt; I&amp;#39;m not sure how it impacts things architecturally and other protocols like&lt;br/&gt;&amp;gt; watchtowers.&lt;br/&gt;&lt;br/&gt;They can operate exactly like the existing scheme, AFAICT.&lt;br/&gt;&lt;br/&gt;Here&amp;#39;s the spec diff (based on dual-funding, since it&amp;#39;s easier to simply&lt;br/&gt;hard change).  Please check my EC math! :)&lt;br/&gt;&lt;br/&gt;diff --git a/02-peer-protocol.md b/02-peer-protocol.md&lt;br/&gt;index fbc56c8..1114068 100644&lt;br/&gt;--- a/02-peer-protocol.md&lt;br/&gt;&#43;&#43;&#43; b/02-peer-protocol.md&lt;br/&gt;@@ -867,11 &#43;867,9 @@ This message initiates the v2 channel establishment workflow.&lt;br/&gt;    * [`u16`:`to_self_delay`]&lt;br/&gt;    * [`u16`:`max_accepted_htlcs`]&lt;br/&gt;    * [`u32`:`locktime`]&lt;br/&gt;-   * [`point`:`funding_pubkey`]&lt;br/&gt;&#43;   * [`u64`:`generation`]&lt;br/&gt;    * [`point`:`revocation_basepoint`]&lt;br/&gt;    * [`point`:`payment_basepoint`]&lt;br/&gt;-   * [`point`:`delayed_payment_basepoint`]&lt;br/&gt;-   * [`point`:`htlc_basepoint`]&lt;br/&gt;    * [`point`:`first_per_commitment_point`]&lt;br/&gt;    * [`byte`:`channel_flags`]&lt;br/&gt;    * [`opening_tlvs`:`tlvs`]&lt;br/&gt;@@ -895,13 &#43;893,16 @@ If nodes have negotiated `option_dual_fund`:&lt;br/&gt; &lt;br/&gt; The sending node:&lt;br/&gt;   - MUST set `funding_feerate_perkw` to the feerate for this transaction&lt;br/&gt;-  - MUST ensure `temporary_channel_id` is unique from any&lt;br/&gt;-    other channel ID with the same peer.&lt;br/&gt;&#43;  - MUST set `generation` to a number greater than any previous&lt;br/&gt;&#43;    `generation` it has sent to this receiving node which has reached&lt;br/&gt;&#43;    `commitment_signed`.&lt;br/&gt;&#43;  - SHOULD set `generation` to the lowest number which meets this requirement.&lt;br/&gt; &lt;br/&gt; The receiving node:&lt;br/&gt;   - MAY fail the negotiation if:&lt;br/&gt;     - the `locktime` is unacceptable&lt;br/&gt;     - the `funding_feerate_per_kw` is unacceptable&lt;br/&gt;&#43;    - the `generation` exceeds expectation by more than the maximum it would scan for recovery.&lt;br/&gt; &lt;br/&gt; #### Rationale&lt;br/&gt; `channel_id` for the `open_channel2` MUST be derived using a zero-d out&lt;br/&gt;@@ -926,6 &#43;927,13 @@ Instead, the channel reserve is fixed at 1% of the total channel balance&lt;br/&gt; rounded down to the nearest whole satoshi or the `dust_limit_satoshis`,&lt;br/&gt; whichever is greater.&lt;br/&gt; &lt;br/&gt;&#43;`generation` is a number which is used to generate the points used for&lt;br/&gt;&#43;this pair of peers, with the aim of allowing automatic onchain&lt;br/&gt;&#43;scanning for channels if all other information is lost.  Since this&lt;br/&gt;&#43;scan would presumably only try a limited number of generations, it is&lt;br/&gt;&#43;best if this number is low, but it also needs to change for each&lt;br/&gt;&#43;successive channel between the peers, to avoid obvious fingerprinting.&lt;br/&gt;&#43;&lt;br/&gt; Note that `push_msat` has been omitted.&lt;br/&gt; &lt;br/&gt; ### The `accept_channel2` Message&lt;br/&gt;@@ -943,11 &#43;951,9 @@ acceptance of the new channel.&lt;br/&gt;     * [`u32`:`minimum_depth`]&lt;br/&gt;     * [`u16`:`to_self_delay`]&lt;br/&gt;     * [`u16`:`max_accepted_htlcs`]&lt;br/&gt;-    * [`point`:`funding_pubkey`]&lt;br/&gt;&#43;    * [`u64`:`generation`]&lt;br/&gt;     * [`point`:`revocation_basepoint`]&lt;br/&gt;     * [`point`:`payment_basepoint`]&lt;br/&gt;-    * [`point`:`delayed_payment_basepoint`]&lt;br/&gt;-    * [`point`:`htlc_basepoint`]&lt;br/&gt;     * [`point`:`first_per_commitment_point`]&lt;br/&gt;     * [`accept_tlvs`:`tlvs`]&lt;br/&gt; &lt;br/&gt;@@ -967,6 &#43;973,10 @@ additions.&lt;br/&gt; &lt;br/&gt; The accepting node:&lt;br/&gt;     - MAY respond with a `funding_satoshis` value of zero.&lt;br/&gt;&#43;    - MUST set `generation` to a number greater than any previous&lt;br/&gt;&#43;      `generation` it has sent to this receiving node which has reached&lt;br/&gt;&#43;      `commitment_signed`.&lt;br/&gt;&#43;    - SHOULD set `generation` to the lowest number which meets this requirement.&lt;br/&gt; &lt;br/&gt; #### Rationale&lt;br/&gt; &lt;br/&gt;@@ -985,6 &#43;995,31 @@ Funding composition for channel establishment v2 makes use of the&lt;br/&gt; [Interactive Transaction Construction](#interactive-transaction-construction)&lt;br/&gt; protocol, with the following additional caveats.&lt;br/&gt; &lt;br/&gt;&#43;#### Point Derivation&lt;br/&gt;&#43;&lt;br/&gt;&#43;The `funding_pubkey` and basepoints are derived from the two&lt;br/&gt;&#43;`node_id`s and the higher of the two `generation` values; the&lt;br/&gt;&#43;`payment_basepoint` is supplied directly.&lt;br/&gt;&#43;&lt;br/&gt;&#43;Derivation is done as follows:&lt;br/&gt;&#43;&lt;br/&gt;&#43;1. Start with two node ids, `N1` and `N2` (`N1` is the lesser of the&lt;br/&gt;&#43;   two SEC1-encoded compressed public keys, `N2` the greater).&lt;br/&gt;&#43;2. Derive a shared secret, `SS`, using ECDH on `N1` and `N2`.&lt;br/&gt;&#43;3. Define tweaks `T` for each peer, using `SHA256(SS || generation || node_id || name)`, where:&lt;br/&gt;&#43;   1. `generation` is the `u64` larger of the two `generation` fields from `open_channel2` and `accept_channel2`.&lt;br/&gt;&#43;   2. `node_id` is the SEC1-encoded compressed public key of the peer.&lt;br/&gt;&#43;   3. `name` is a non-terminated ASCII string, e.g. `htlc` is the four bytes&lt;br/&gt;&#43;   `0x68 0x74 0x6C 0x63`&lt;br/&gt;&#43;4. The `funding_pubkey` is defined as the `node_id` &#43; G*T(`funding`).&lt;br/&gt;&#43;5. The `delayed_payment_basepoint` is defined as `node_id` &#43; G*T(`delayed_payment`).&lt;br/&gt;&#43;6. The `htlc_basepoint` is defined as the `node_id` &#43; G*T(`htlc`).&lt;br/&gt;&#43;&lt;br/&gt;&#43;If the secret for `payment_basepoint` is derived in a similar manner,&lt;br/&gt;&#43;it too can be easily recovered from just the `generation`, node key&lt;br/&gt;&#43;and peer `node_id`.  However, it may also point to an address for a&lt;br/&gt;&#43;completely separate system (e.g. cold storage), so it is specified&lt;br/&gt;&#43;explicitly in the protocol.&lt;br/&gt; &lt;br/&gt; #### The `tx_add_input` Message
    </content>
    <updated>2023-06-09T14:39:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr4u57dfs0pzzjp4nrqusksh6uva6juy2na5hmrtm8x6pzd4hhwcqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2z9u5y0</id>
    
      <title type="html">📅 Original date posted:2022-05-10 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr4u57dfs0pzzjp4nrqusksh6uva6juy2na5hmrtm8x6pzd4hhwcqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2z9u5y0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswpehkyg6n68ynjgzphlzlsj0gpamydlfafncf04lsenrsw4t2hrq0kugae&#39;&gt;nevent1q…ugae&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-10&lt;br/&gt;📝 Original message:Hi all,&lt;br/&gt;&lt;br/&gt;	TL;DR: a v1 tapscript opcode for generic covenants, but&lt;br/&gt;OP_SUCCESS unless it&amp;#39;s used a-la OP_CHECKTEMPLATEVERIFY.  This gives an&lt;br/&gt;obvious use case, with clean future expansion.  OP_NOP4 can be&lt;br/&gt;repurposed in future as a shortcut, if experience shows that to be a&lt;br/&gt;useful optimization.&lt;br/&gt;&lt;br/&gt;(This proposal builds on Russell O&amp;#39;Connor&amp;#39;s TXHASH[1], with Anthony&lt;br/&gt;Towns&amp;#39; modification via extending the opcode[2]; I also notice on&lt;br/&gt;re-reading that James Lu had a similar restriction idea[3]).&lt;br/&gt;&lt;br/&gt;Details&lt;br/&gt;-------&lt;br/&gt;&lt;br/&gt;OP_TX, when inside v1 tapscript, is followed by 4 bytes of flags.&lt;br/&gt;Unknown flag patterns are OP_SUCCESS, though for thoroughness some future&lt;br/&gt;potential uses are documented here.  Note that pushing more than 1000&lt;br/&gt;elements on the stack or an element more than 512 bytes will hit the&lt;br/&gt;BIP-342 resource limits and fail.&lt;br/&gt;&lt;br/&gt;Defined bits&lt;br/&gt;------------&lt;br/&gt;&lt;br/&gt;(Only those marked with * have to be defined for this soft fork; the&lt;br/&gt; others can have semantics later).&lt;br/&gt;&lt;br/&gt;OPTX_SEPARATELY: treat fields separately (vs concatenating)&lt;br/&gt;OPTX_UNHASHED: push on the stack without hashing (vs SHA256 before push)&lt;br/&gt;&lt;br/&gt;- The first nicely sidesteps the lack of OP_CAT, and the latter allows&lt;br/&gt;  OP_TXHASH semantics (and avoid stack element limits).&lt;br/&gt;&lt;br/&gt;OPTX_SELECT_VERSION*: version&lt;br/&gt;OPTX_SELECT_LOCKTIME*: nLocktime&lt;br/&gt;OPTX_SELECT_INPUTNUM*: current input number&lt;br/&gt;OPTX_SELECT_INPUTCOUNT*: number of inputs&lt;br/&gt;OPTX_SELECT_OUTPUTCOUNT*: number of outputs&lt;br/&gt;&lt;br/&gt;OPTX_INPUT_SINGLE: if set, pop input number off stack to apply to&lt;br/&gt;		OPTX_SELECT_INPUT_*, otherwise iterate through all.&lt;br/&gt;OPTX_SELECT_INPUT_TXID: txid&lt;br/&gt;OPTX_SELECT_INPUT_OUTNUM: txout index&lt;br/&gt;OPTX_SELECT_INPUT_NSEQUENCE*: sequence number&lt;br/&gt;OPTX_SELECT_INPUT_AMOUNT32x2: sats in, as a high-low u31 pair&lt;br/&gt;OPTX_SELECT_INPUT_SCRIPT*: input scriptsig&lt;br/&gt;OPTX_SELECT_INPUT_TAPBRANCH: ?&lt;br/&gt;OPTX_SELECT_INPUT_TAPLEAF: ?&lt;br/&gt;&lt;br/&gt;OPTX_OUTPUT_SINGLE: if set, pop input number off stack to apply to&lt;br/&gt;		OPTX_SELECT_OUTPUT_*, otherwise iterate through all.&lt;br/&gt;OPTX_SELECT_OUTPUT_AMOUNT32x2*: sats out, as a high-low u31 pair&lt;br/&gt;OPTX_SELECT_OUTPUT_SCRIPTPUBKEY*: output scriptpubkey&lt;br/&gt;&lt;br/&gt;OPTX_SELECT_19...OPTX_SELECT_31: future expansion.&lt;br/&gt;&lt;br/&gt;OP_CHECKTEMPLATEVERIFY is approximated by the following flags:&lt;br/&gt;	OPTX_SELECT_VERSION&lt;br/&gt;	OPTX_SELECT_LOCKTIME&lt;br/&gt;	OPTX_SELECT_INPUTCOUNT&lt;br/&gt;	OPTX_SELECT_INPUT_SCRIPT&lt;br/&gt;	OPTX_SELECT_INPUT_NSEQUENCE&lt;br/&gt;	OPTX_SELECT_OUTPUTCOUNT&lt;br/&gt;	OPTX_SELECT_OUTPUT_AMOUNT32x2&lt;br/&gt;	OPTX_SELECT_OUTPUT_SCRIPTPUBKEY&lt;br/&gt;	OPTX_SELECT_INPUTNUM&lt;br/&gt;&lt;br/&gt;All other flag combinations result in OP_SUCCESS.&lt;br/&gt;&lt;br/&gt;Discussion&lt;br/&gt;----------&lt;br/&gt;&lt;br/&gt;By enumerating exactly what can be committed to, it&amp;#39;s absolutely clear&lt;br/&gt;what is and isn&amp;#39;t committed (and what you need to think about!).&lt;br/&gt;&lt;br/&gt;The bits which separate concatenation and hashing provide a simple&lt;br/&gt;mechanism for template-style (i.e. CTV-style) commitments, or for&lt;br/&gt;programatic treatment of individual elements (e.g. amounts, though the&lt;br/&gt;two s31 style is awkward: a 64-bit push flag could be added in future).&lt;br/&gt;&lt;br/&gt;The lack of double-hashing of scriptsigs and other fields means we&lt;br/&gt;cannot simply re-use hashing done for SIGHASH_ALL.&lt;br/&gt;&lt;br/&gt;The OP_SUCCESS semantic is only valid in tapscript v1, so this does not&lt;br/&gt;allow covenants for v0 segwit or pre-segwit inputs.  If covenants prove&lt;br/&gt;useful, dedicated opcodes can be provided for those cases (a-la&lt;br/&gt;OP_CHECKTEMPLATEVERIFY).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019813.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019813.html&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019819.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019819.html&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019816.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019816.html&lt;/a&gt;
    </content>
    <updated>2023-06-08T01:09:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9jvfr700grypa7elld3hfrvph30v06ej200hghhw5pa4r6zgyfyszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2lm80lt</id>
    
      <title type="html">📅 Original date posted:2021-04-06 📝 Original message:Jeremy ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9jvfr700grypa7elld3hfrvph30v06ej200hghhw5pa4r6zgyfyszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2lm80lt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd2g6fr9r0p5s3l5fr58cmv3tpccsps5df9aleq8fzjfnk9fzy7pqyf443h&#39;&gt;nevent1q…443h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-06&lt;br/&gt;📝 Original message:Jeremy via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; We had a very productive meeting today. Here is a summary of the meeting --&lt;br/&gt;&amp;gt; I&amp;#39;ve done my best to&lt;br/&gt;&amp;gt; summarize in an unbiased way. Thank you to everyone who attended.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. On the use of a speedy trial variant:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - There are no new objections to speedy trial generally.&lt;br/&gt;&amp;gt; - There is desire to know if Rusty retracts or reaffirms his NACK in light&lt;br/&gt;&amp;gt; of the responses.&lt;br/&gt;&lt;br/&gt;I do not withdraw my NACK (and kudos: there have been few attempts to&lt;br/&gt;pressure me to do so!).&lt;br/&gt;&lt;br/&gt;The core question always was: what do we do if miners fail to activate?&lt;br/&gt;&lt;br/&gt;Luke-Jr takes the approach that &amp;#34;we (i.e developers) ensure it activates&lt;br/&gt;anyway&amp;#34;.  I take the approach that &amp;#34;the users must make a direct&lt;br/&gt;intervention&amp;#34;.  Speedy Trial takes the approach that &amp;#34;let&amp;#39;s pretend we&lt;br/&gt;didn&amp;#39;t *actually* ask them&amp;#34;.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s totally a political approach, to avoid facing the awkward question.&lt;br/&gt;Since I believe that such prevaricating makes a future crisis less&lt;br/&gt;predictable, I am forced to conclude that it makes bitcoin less robust.&lt;br/&gt;&lt;br/&gt;Personally, I think the compromise position is using LOT=false and&lt;br/&gt;having those such as Luke and myself continue working on a LOT=true&lt;br/&gt;branch for future consideration.  It&amp;#39;s less than optimal, but I&lt;br/&gt;appreciate that people want Taproot activated more than they want&lt;br/&gt;the groundwork future upgrades.&lt;br/&gt;&lt;br/&gt;I hope that helps,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-08T00:51:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszdmyt43q50mcqjl8py55dhf2m86cjejq5n6zgfutlxczt0gn5ywqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2zwppq9</id>
    
      <title type="html">📅 Original date posted:2018-12-12 📝 Original message:Rusty ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszdmyt43q50mcqjl8py55dhf2m86cjejq5n6zgfutlxczt0gn5ywqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2zwppq9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspvuuttty0lnlpcw4g9ejhxh0c4aq0zrh63vdx3k44tyz0pwpwausaehzud&#39;&gt;nevent1q…hzud&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-12&lt;br/&gt;📝 Original message:Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; However, I’m not sure if there is any useful NOINPUT case with unmasked script.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is *not* true of Eltoo; the script itself need not change for the&lt;br/&gt;&amp;gt; rebinding (Christian, did something change?).&lt;br/&gt;&lt;br/&gt;This is wrong, sorry.  I re-checked the paper, and the constant for the&lt;br/&gt;timelock comparison changes on each new update.&lt;br/&gt;&lt;br/&gt;(The alternative was a new opcode like OP_TIMELOCKGREATERVERIFY which&lt;br/&gt;required remembering the nLocktime for the UTXO).&lt;br/&gt;&lt;br/&gt;So now my opinion is closer to yours: what&amp;#39;s the use for NOINPUT &amp;amp;&amp;amp;&lt;br/&gt;!NOMASK?&lt;br/&gt;&lt;br/&gt;And is it worthwhile doing the mask complexity, rather than just&lt;br/&gt;removing the commitment to script with NOINPUT?  It *feels* safer to&lt;br/&gt;restrict what scripts we can sign, but is it?&lt;br/&gt;&lt;br/&gt;Note that NOINPUT is only useful when you can&amp;#39;t just re-sign the tx, and&lt;br/&gt;you need to be able to create a new tx even if this input is spent once&lt;br/&gt;(an attacker can do this with SIGHASH_MASK or not!).  ie. any other&lt;br/&gt;inputs need to be signed NOINPUT or this one&lt;br/&gt;SIGHASH_SINGLE|ANYONECANPAY.&lt;br/&gt;&lt;br/&gt;You already need both key-reuse and amount-reuse to be exploited.&lt;br/&gt;SIGHASH_MASK only prevents you from reusing this input for a &amp;#34;normal&amp;#34;&lt;br/&gt;output; if you used this key for multiple scripts of the same form,&lt;br/&gt;you&amp;#39;re vulnerable[1].  Which, given the lightning software will be using&lt;br/&gt;the One True Script, is more likely that your normal wallet using the&lt;br/&gt;same keys.&lt;br/&gt;&lt;br/&gt;So I don&amp;#39;t think it&amp;#39;s worth it.  SIGHASH_NOINPUT is simply dangerous&lt;br/&gt;with key-reuse, and Don&amp;#39;t Do That.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;[1] Attacker can basically clone channel state to another channel.
    </content>
    <updated>2023-06-07T20:15:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspvuuttty0lnlpcw4g9ejhxh0c4aq0zrh63vdx3k44tyz0pwpwauszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz24uy3r6</id>
    
      <title type="html">📅 Original date posted:2018-12-12 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspvuuttty0lnlpcw4g9ejhxh0c4aq0zrh63vdx3k44tyz0pwpwauszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz24uy3r6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs98jt62ulkwru2ct02fg7wesg56afvww53lgcs7zaxnxm8lx5qqlskwg9eq&#39;&gt;nevent1q…g9eq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-12&lt;br/&gt;📝 Original message:Johnson Lau &amp;lt;jl2012 at xbt.hk&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt; On 12 Dec 2018, at 5:42 PM, Rusty Russell via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Pieter Wuille via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Here is a combined proposal:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; * Three new sighash flags are added: SIGHASH_NOINPUT, SIGHASH_NOFEE,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; and SIGHASH_SCRIPTMASK.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; * A new opcode OP_MASK is added, which acts as a NOP during execution.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; * The sighash is computed like in BIP143, but:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;  * If SIGHASH_SCRIPTMASK is present, for every OP_MASK in scriptCode&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the subsequent opcode/push is removed.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; Having the SIGHASH_SCRIPTMASK flag is redundant AFAICT: why not always&lt;br/&gt;&amp;gt;&amp;gt; perform mask-removal for signing?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Because a hardware wallet may want to know what exact script it is signing?&lt;br/&gt;&lt;br/&gt;OK, removing OP_MASKs unconditionally would introduce a hole without&lt;br/&gt;some explicit flag to say they&amp;#39;ve been removed (the &amp;#34;real script&amp;#34; could&lt;br/&gt;be something different with OP_MASKs).  We could have the signature&lt;br/&gt;commit to the outputscript, but that&amp;#39;s a bit meh.&lt;br/&gt;&lt;br/&gt;&amp;gt; Masked script has reduced security, but this is a tradeoff with&lt;br/&gt;&amp;gt; functionality (e.g. eltoo can’t work without masking part of the&lt;br/&gt;&amp;gt; script). So when you don’t need that extra functionality, you go back&lt;br/&gt;&amp;gt; to better security&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, I’m not sure if there is any useful NOINPUT case with unmasked script.&lt;br/&gt;&lt;br/&gt;This is *not* true of Eltoo; the script itself need not change for the&lt;br/&gt;rebinding (Christian, did something change?).&lt;br/&gt;&lt;br/&gt;So, can we find an example where OP_MASK is useful?&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; If you&amp;#39;re signing arbitrary scripts, you&amp;#39;re surely in trouble already?&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; And I am struggling to understand the role of scriptmask in a taproot&lt;br/&gt;&amp;gt;&amp;gt; world, where the alternate script is both hidden and general?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It makes sure that your signature is applicable to a specific script branch, not others (assuming you use the same pubkey in many branches, which is avoidable)&lt;br/&gt;&lt;br/&gt;If I&amp;#39;m using SIGHASH_NOINPUT, I&amp;#39;m already required to take care with key&lt;br/&gt;reuse.&lt;br/&gt;&lt;br/&gt;Without a concrete taproot proposal it&amp;#39;s hard to make assertions, but&lt;br/&gt;if the signature flags that it&amp;#39;s using the taproot script, it&amp;#39;s&lt;br/&gt;no less safe, and more general AFAICT.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T20:15:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswrj7u573vh6vscaedqumcqw5wtp539dn8akqmyvqrpugunlefmqgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2jc6dae</id>
    
      <title type="html">📅 Original date posted:2018-05-09 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswrj7u573vh6vscaedqumcqw5wtp539dn8akqmyvqrpugunlefmqgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2jc6dae" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq5z7v373affn72leddcw6utu2eusk588cu4aec5z7pjdy6jwj73g68yle3&#39;&gt;nevent1q…yle3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-09&lt;br/&gt;📝 Original message:Johnson Lau &amp;lt;jl2012 at xbt.hk&amp;gt; writes:&lt;br/&gt;&amp;gt; You should make a “0 fee tx with exactly one OP_TRUE output” standard, but nothing else. This makes sure CPFP will always be needed, so the OP_TRUE output won’t pollute the UTXO set&lt;br/&gt;&lt;br/&gt;That won&amp;#39;t propagate :(&lt;br/&gt;&lt;br/&gt;&amp;gt; Instead, would you consider to use ANYONECANPAY to sign the tx, so it&lt;br/&gt;&amp;gt; is possible add more inputs for fees? The total tx size is bigger than&lt;br/&gt;&amp;gt; the OP_TRUE approach, but you don’t need to ask for any protocol&lt;br/&gt;&amp;gt; change.&lt;br/&gt;&lt;br/&gt;No, that would change the TXID, which we rely on for HTLC transactions.&lt;br/&gt;&lt;br/&gt;&amp;gt; In long-term, I think the right way is to have a more flexible SIGHASH system to allow people to add more inputs and outputs easily.&lt;br/&gt;&lt;br/&gt;Agreed:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-April/015862.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-April/015862.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;But in the long term we&amp;#39;ll have Eltoo and SIGHASH_NOINPUT which both&lt;br/&gt;allow different solutions.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T20:11:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg5e33ftjxmu0w69kpgng0gtmlww94ytgc3dmp7x3p9phaw2pv3lczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2y77xr5</id>
    
      <title type="html">📅 Original date posted:2018-05-09 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg5e33ftjxmu0w69kpgng0gtmlww94ytgc3dmp7x3p9phaw2pv3lczyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2y77xr5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszmzg8ayyaj0tmt0gggeq0eyhavmqcgh5upj9tps8ckk7swedje9gq60q4h&#39;&gt;nevent1q…0q4h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-09&lt;br/&gt;📝 Original message:Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; What are the downsides of just using p2wsh? This route can be rolled out&lt;br/&gt;&amp;gt; immediately, while policy changes are pretty &amp;#34;fuzzy&amp;#34; and would require a&lt;br/&gt;&amp;gt; near uniform rollout in order to ensure wide propagation of the commitment&lt;br/&gt;&amp;gt; transactions.&lt;br/&gt;&lt;br/&gt;I expect we will, but thougth I&amp;#39;d ask :)&lt;br/&gt;&lt;br/&gt;I get annoyed when people say &amp;#34;We found this issue, but we worked around&lt;br/&gt;it and so never bothered you with it!&amp;#34; for my projects :)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T20:11:55&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0xxrupzvjfte6rc2ax9k9n8sdnjg002xnz660ytg8uxckr2vqu0szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2t9xxx5</id>
    
      <title type="html">📅 Original date posted:2018-05-08 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0xxrupzvjfte6rc2ax9k9n8sdnjg002xnz660ytg8uxckr2vqu0szyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2t9xxx5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv4mjw8q5v44c2p25mlw54d9yqh3s40ffg6jyka643rat3vyafm9c4dywds&#39;&gt;nevent1q…ywds&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-08&lt;br/&gt;📝 Original message:Hi all,&lt;br/&gt;&lt;br/&gt;        The largest problem we are having today with the lightning&lt;br/&gt;protocol is trying to predict future fees.  Eltoo solves this elegantly,&lt;br/&gt;but meanwhile we would like to include a 546 satoshi OP_TRUE output in&lt;br/&gt;commitment transactions so that we use minimal fees and then use CPFP&lt;br/&gt;(which can&amp;#39;t be done at the moment due to CSV delays on outputs).&lt;br/&gt;&lt;br/&gt;Unfortunately, we&amp;#39;d have to P2SH it at the moment as a raw &amp;#39;OP_TRUE&amp;#39; is&lt;br/&gt;non-standard.  Are there any reasons not to suggest such a policy&lt;br/&gt;change?&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T20:11:54&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8ej5pe2kgt06a72ygnzxdkcu906ukqtvg4v9a7qjm2fznmc6f85gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25pmxt7</id>
    
      <title type="html">📅 Original date posted:2018-04-02 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8ej5pe2kgt06a72ygnzxdkcu906ukqtvg4v9a7qjm2fznmc6f85gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz25pmxt7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq38c8c93wprmqmxm9zjp5mrda2qw9tpnn9wzv9cynu37yhkymdlqzgm9aw&#39;&gt;nevent1q…m9aw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-04-02&lt;br/&gt;📝 Original message:Hi all!&lt;br/&gt;&lt;br/&gt;        Since there&amp;#39;s activity on new signature types, I think it&amp;#39;s&lt;br/&gt;worth considering a more flexible alternative to&lt;br/&gt;SIGHASH_SINGLE|SIGHASH_ANYONECANPAY.  See Usefulness for why.&lt;br/&gt;&lt;br/&gt;Proposal: Two bits: SIGHASH_BUNDLESTART/SIGHASH_INBUNDLE&lt;br/&gt;--------&lt;br/&gt;&lt;br/&gt;A signature needs to indicate that signs only part of a transaction&amp;#39;s&lt;br/&gt;inputs and outputs (a.k.a. a &amp;#34;bundle&amp;#34;).  Bundles can be combined&lt;br/&gt;together into larger transactions, and non-bundled signature inputs /&lt;br/&gt;outputs appended.&lt;br/&gt;&lt;br/&gt;Two per-tx counters are kept: bundle_inputs_used and&lt;br/&gt;bundle_outputs_used, both starting at 0.&lt;br/&gt;&lt;br/&gt;SIGHASH_BUNDLESTART indicates two var_int sit between the sighash flags&lt;br/&gt;and the signature itself: the first is the number of inputs in this&lt;br/&gt;bundle starting at bundle_inputs_used, the second is the number of&lt;br/&gt;outputs starting at bundle_outputs_used.  bundle_inputs_used and&lt;br/&gt;bundle_outputs_used have these values added, for next time.&lt;br/&gt;&lt;br/&gt;SIGHASH_INBUNDLE indicates that this signature applies to the current&lt;br/&gt;bundle.  The txCopy is reduced to cover only the inputs and&lt;br/&gt;outputs in the current bundle, and the signature commits to the two&lt;br/&gt;var_ints from SIGHASH_BUNDLESTART along with the sighash flags.&lt;br/&gt;&lt;br/&gt;(A proper BIP would detail how any weird stuff makes the tx invalid:&lt;br/&gt;take that as read).&lt;br/&gt;&lt;br/&gt;Usage&lt;br/&gt;-----&lt;br/&gt;You can use this to sign a transaction just like now, with only two&lt;br/&gt;extra bytes and these SIGHASH flags.  But this transaction can now be&lt;br/&gt;aggregated by pasting on another bundle, or attaching other normal&lt;br/&gt;inputs and/or outputs.  You can aggregate as many transactions as you&lt;br/&gt;want this way.&lt;br/&gt;&lt;br/&gt;Usefulness&lt;br/&gt;----------&lt;br/&gt;&lt;br/&gt;One of the issues we&amp;#39;ve struck with lightning is trying to guess future&lt;br/&gt;fees for commitment transactions: we can&amp;#39;t rely on getting another&lt;br/&gt;signature from our counterparty to increase fees.  Nor can we use&lt;br/&gt;parent-pays-for-child since the outputs we can spend are timelocked.&lt;br/&gt;&lt;br/&gt;This &amp;#34;holding a valid tx but I want to add fees later without&lt;br/&gt;re-signing&amp;#34; seems like a general problem.  The only current method would&lt;br/&gt;be to engineer transactions as a single-input-single-output tx and use&lt;br/&gt;SIGHASH_SINGLE|SIGHASH_ANYONECANPAY; this is very limiting.&lt;br/&gt;&lt;br/&gt;The other obvious application would be to run public aggregators, which&lt;br/&gt;would provide throughput promises (&amp;#34;if you send me a tx with feerate X,&lt;br/&gt;I will make sure it goes onchain within a week&amp;#34;).  This service would&lt;br/&gt;sometimes profit, if it can do so cheaper than it quoted, and sometimes&lt;br/&gt;have to add additional fees.  The existence of such services should&lt;br/&gt;smooth the current fee cliff by allowing users and services to offer&lt;br/&gt;&amp;#34;slow mode&amp;#34; payment options without requiring interaction.&lt;br/&gt;&lt;br/&gt;Feedback welcome!&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T20:11:28&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsym450sc7tw542cgxwqfxh5up7at2amwd99mtmps7zq2cj044czdgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz27043jj</id>
    
      <title type="html">📅 Original date posted:2016-05-10 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsym450sc7tw542cgxwqfxh5up7at2amwd99mtmps7zq2cj044czdgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz27043jj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswj7647s5unqqkmqfggersuv6z94hqefmxk2w4u3k98yjdachg4qcrx9gzk&#39;&gt;nevent1q…9gzk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-05-10&lt;br/&gt;📝 Original message:Gregory Maxwell &amp;lt;greg at xiph.org&amp;gt; writes:&lt;br/&gt;&amp;gt; On Tue, May 10, 2016 at 5:28 AM, Rusty Russell via bitcoin-dev&lt;br/&gt;&amp;gt; &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; I used variable-length bit encodings, and used the shortest encoding&lt;br/&gt;&amp;gt;&amp;gt; which is unique to you (including mempool).  It&amp;#39;s a little more work,&lt;br/&gt;&amp;gt;&amp;gt; but for an average node transmitting a block with 1300 txs and another&lt;br/&gt;&amp;gt;&amp;gt; ~3000 in the mempool, you expect about 12 bits per transaction.  IOW,&lt;br/&gt;&amp;gt;&amp;gt; about 1/5 of your current size.  Critically, we might be able to fit in&lt;br/&gt;&amp;gt;&amp;gt; two or three TCP packets.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hm. 12 bits sounds very small even giving those figures. Why failure&lt;br/&gt;&amp;gt; rate were you targeting?&lt;br/&gt;&lt;br/&gt;That&amp;#39;s a good question; I was assuming a best-case in which we have&lt;br/&gt;mempool set reconciliation (handwave) thus know they are close.  But&lt;br/&gt;there&amp;#39;s also an alterior motive: any later more sophisticated approach&lt;br/&gt;will want variable-length IDs, and I&amp;#39;d like Matt to do the work :)&lt;br/&gt;&lt;br/&gt;In particular, you can significantly narrow the possibilities for a&lt;br/&gt;block by sending the min-fee-per-kb and a list of &amp;#34;txs in my mempool&lt;br/&gt;which didn&amp;#39;t get in&amp;#34; and &amp;#34;txs which did despite not making the&lt;br/&gt;fee-per-kb&amp;#34;.  Those turn out to be tiny, and often make set&lt;br/&gt;reconciliation trivial.  That&amp;#39;s best done with variable-length IDs.&lt;br/&gt;&lt;br/&gt;&amp;gt; (*Not interesting because it mostly reduces exposure to loss and the&lt;br/&gt;&amp;gt; gods of TCP, but since those are the long poles in the latency tent,&lt;br/&gt;&amp;gt; it&amp;#39;s best to escape them entirely, see Matt&amp;#39;s udp_wip branch.)&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not convinced on UDP; it always looks impressive, but then ends up&lt;br/&gt;reimplementing TCP in practice.  We should be well within a TCP window&lt;br/&gt;for these, so it&amp;#39;s hard to see where we&amp;#39;d win.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; I would also avoid the nonce to save recalculating for each node, and&lt;br/&gt;&amp;gt;&amp;gt; instead define an id as:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Doing this would greatly increase the cost of a collision though, as&lt;br/&gt;&amp;gt; it would happen in many places in the network at once over the on the&lt;br/&gt;&amp;gt; network at once, rather than just happening on a single link, thus&lt;br/&gt;&amp;gt; hardly impacting overall propagation.&lt;br/&gt;&lt;br/&gt;&amp;#34;Greatly increase&amp;#34;?  I don&amp;#39;t see that.&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s assume an attacker grinds out 10,000 txs with 128 bits of the same&lt;br/&gt;TXID, and gets them all in a block.  They then win the lottery and get a&lt;br/&gt;collision.  Now we have to transmit ~48 bytes more than expected.&lt;br/&gt;&lt;br/&gt;&amp;gt; Using the same nonce means you also would not get a recovery gain from&lt;br/&gt;&amp;gt; jointly decoding using compact blocks sent from multiple peers (which&lt;br/&gt;&amp;gt; you&amp;#39;ll have anyways in high bandwidth mode).&lt;br/&gt;&lt;br/&gt;Not quite true, since if their mempools differ they&amp;#39;ll use different&lt;br/&gt;encoding lengths, but yes, you&amp;#39;ll get less of this.&lt;br/&gt;&lt;br/&gt;&amp;gt; With a nonce a sender does have the option of reusing what they got--&lt;br/&gt;&amp;gt; but the actual encoding cost is negligible, for a 2500 transaction&lt;br/&gt;&amp;gt; block its 27 microseconds (once per block, shared across all peers)&lt;br/&gt;&amp;gt; using Pieter&amp;#39;s suggestion of siphash 1-3 instead of the cheaper&lt;br/&gt;&amp;gt; construct in the current draft.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, if you&amp;#39;re going to check your whole mempool to reroll the&lt;br/&gt;&amp;gt; nonce, thats another matter-- but that seems wasteful compared to just&lt;br/&gt;&amp;gt; using a table driven size with a known negligible failure rate.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not worried about the sender: The recipient needs to encode all the&lt;br/&gt;mempool.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; As Peter R points out, we could later enhance receiver to brute force&lt;br/&gt;&amp;gt;&amp;gt; collisions (you could speed that by sending a XOR of all the txids, but&lt;br/&gt;&amp;gt;&amp;gt; really if there are more than a few collisions, give up).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The band between &amp;#34;no collisions&amp;#34; and &amp;#34;infeasible many&amp;#34; is fairly&lt;br/&gt;&amp;gt; narrow.  You can add a small amount more space to the ids and&lt;br/&gt;&amp;gt; immediately be in the no collision zone.&lt;br/&gt;&lt;br/&gt;Indeed, I would be adding extra bits in the sender and not implementing&lt;br/&gt;brute force in the receiver.  But I welcome someone else to do so.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:50:21&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspehzpt680pjzxw2365fk3lu0ugafqfcw55qr5gpwv9t65mqe5aegzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2w5nhvk</id>
    
      <title type="html">📅 Original date posted:2016-05-10 📝 Original message:Pieter ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspehzpt680pjzxw2365fk3lu0ugafqfcw55qr5gpwv9t65mqe5aegzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2w5nhvk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdhqyax5ck7jyd8czvdcsuegvgfd3c2ugf78rquns03nys87drgucr2ctmc&#39;&gt;nevent1q…ctmc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-05-10&lt;br/&gt;📝 Original message:Pieter Wuille via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; On 05/03/2016 12:13 AM, lf-lists at mattcorallo.com (Matt Corallo) wrote:&lt;br/&gt;&amp;gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; The following is a BIP-formatted design spec for compact block relay&lt;br/&gt;&amp;gt;&amp;gt; designed to limit on wire bytes during block relay. You can find the&lt;br/&gt;&amp;gt;&amp;gt; latest version of this document at&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/TheBlueMatt/bips/blob/master/bip-TODO.mediawiki&#34;&gt;https://github.com/TheBlueMatt/bips/blob/master/bip-TODO.mediawiki&lt;/a&gt;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hi Matt,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; thank you for working on this!&lt;br/&gt;&lt;br/&gt;Indeed!  Sorry for the delayed feedback.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; |shortids||List of uint64_ts||8*shortids_length bytes||Little&lt;br/&gt;&amp;gt;&amp;gt; Endian||The short transaction IDs calculated from the transactions which&lt;br/&gt;&amp;gt;&amp;gt; were not provided explicitly in prefilledtxn&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I tried to derive what length of short ids is actually necessary (some&lt;br/&gt;&amp;gt; write-up is on&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://gist.github.com/sipa/b2eb2e486156b5509ac711edd16153ed&#34;&gt;https://gist.github.com/sipa/b2eb2e486156b5509ac711edd16153ed&lt;/a&gt; but it&amp;#39;s&lt;br/&gt;&amp;gt; incomplete).&lt;br/&gt;&lt;br/&gt;I did this for IBLT testing.&lt;br/&gt;&lt;br/&gt;I used variable-length bit encodings, and used the shortest encoding&lt;br/&gt;which is unique to you (including mempool).  It&amp;#39;s a little more work,&lt;br/&gt;but for an average node transmitting a block with 1300 txs and another&lt;br/&gt;~3000 in the mempool, you expect about 12 bits per transaction.  IOW,&lt;br/&gt;about 1/5 of your current size.  Critically, we might be able to fit in&lt;br/&gt;two or three TCP packets.&lt;br/&gt;&lt;br/&gt;The wire encoding of all those bit arrays was:&lt;br/&gt;  [varint-min-numbits] - Shortest bit array length&lt;br/&gt;  [varint-array-size]  - Number of bit arrays.&lt;br/&gt;          [varint-num].... - Number of entries in array N (x varint-array-size)&lt;br/&gt;  [packed-bit-arrays...]&lt;br/&gt;&lt;br/&gt;  Last byte was padded with zeros.&lt;br/&gt;  See: &lt;a href=&#34;https://github.com/rustyrussell/bitcoin-iblt/blob/master/wire_encode.cpp#L12&#34;&gt;https://github.com/rustyrussell/bitcoin-iblt/blob/master/wire_encode.cpp#L12&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I would also avoid the nonce to save recalculating for each node, and&lt;br/&gt;instead define an id as:&lt;br/&gt;&lt;br/&gt;        [&amp;lt;64-bit-short-id&amp;gt;][txid]&lt;br/&gt;&lt;br/&gt;Since you only ever send as many bits as needed to distinguish, this only&lt;br/&gt;makes a difference if there actually are collisions.&lt;br/&gt;&lt;br/&gt;As Peter R points out, we could later enhance receiver to brute force&lt;br/&gt;collisions (you could speed that by sending a XOR of all the txids, but&lt;br/&gt;really if there are more than a few collisions, give up).&lt;br/&gt;&lt;br/&gt;And a prototype could just always send 64-bit ids to start.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:50:21&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw30fsjkuqjyvm85z7a46ssxrk4g0p8pv89h6k4vpzj4cthdp9cxszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2w4ngwc</id>
    
      <title type="html">📅 Original date posted:2016-01-11 📝 Original message:Gavin ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw30fsjkuqjyvm85z7a46ssxrk4g0p8pv89h6k4vpzj4cthdp9cxszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2w4ngwc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8ell3js98jg56x98p80z08523d0k2fzs0p02hxzayj68upwt9l9c2fpqca&#39;&gt;nevent1q…pqca&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-11&lt;br/&gt;📝 Original message:Gavin Andresen via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; How many years until we think a 2^84 attack where the work is an ECDSA&lt;br/&gt;&amp;gt; private-&amp;gt;public key derivation will take a reasonable amount of time?&lt;br/&gt;&lt;br/&gt;vanitygen can generate keypairs pretty fast (on my CPU it&amp;#39;s comparable&lt;br/&gt;with hashing time), and there are ways to make it faster.  Since you can&lt;br/&gt;generate multiple script variations, too, I think hashing is the&lt;br/&gt;bottleneck.&lt;br/&gt;&lt;br/&gt;Antminer S7 can do 4.73 Terahash per second for $1.2k.  (Double SHA, but&lt;br/&gt;let&amp;#39;s assume RIPEMD160(SHA256()) is the same speed).&lt;br/&gt;&lt;br/&gt;766,760,562,123 seconds to do 3*2^80, so you&amp;#39;d need over 200 million&lt;br/&gt;S7s to do it in an hour.[1] If you want to do that for $1M, wait 27&lt;br/&gt;years and hope Moore&amp;#39;s Law holds?&lt;br/&gt;&lt;br/&gt;Also, a colleague points out you could use this attack against a site&lt;br/&gt;like bitrated.com which publishes one side&amp;#39;s pubkey, giving you a much&lt;br/&gt;longer attack window.&lt;br/&gt;     &lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;[1] Weirdly, the bitcoin network is doing this much work every 57&lt;br/&gt;    days, for about $92M.  If that&amp;#39;s all the attack costs, it&amp;#39;s under&lt;br/&gt;    1M in 10 years.
    </content>
    <updated>2023-06-07T19:47:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs08usa5yvxan83npu0mgcfhla2a0m2s6mw7rf03du9dsvden4kd6qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz28sn0tk</id>
    
      <title type="html">📅 Original date posted:2016-01-08 📝 Original message:Matt ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs08usa5yvxan83npu0mgcfhla2a0m2s6mw7rf03du9dsvden4kd6qzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz28sn0tk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxa4sf4l7kg6yssww42lh26ag39sqhfp5nrxk0kf8flzah2sdvrtcff85rf&#39;&gt;nevent1q…85rf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-08&lt;br/&gt;📝 Original message:Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Indeed, anything which uses P2SH is obviously vulnerable if there is&lt;br/&gt;&amp;gt; an attack on RIPEMD160 which reduces it&amp;#39;s security only marginally.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is true?  Even if you can generate a collision in&lt;br/&gt;RIPEMD160, that doesn&amp;#39;t help you since you need to create a specific&lt;br/&gt;SHA256 hash for the RIPEMD160 preimage.&lt;br/&gt;&lt;br/&gt;Even a preimage attack only helps if it leads to more than one preimage&lt;br/&gt;fairly cheaply; that would make grinding out the SHA256 preimage easier.&lt;br/&gt;AFAICT even MD4 isn&amp;#39;t this broken.&lt;br/&gt;&lt;br/&gt;But just with Moore&amp;#39;s law (doubling every 18 months), we&amp;#39;ll worry about&lt;br/&gt;economically viable attacks in 20 years.[1]&lt;br/&gt;&lt;br/&gt;That&amp;#39;s far enough away that I would choose simplicity, and have all SW&lt;br/&gt;scriptPubKeys simply be &amp;#34;&amp;lt;0&amp;gt; RIPEMD(SHA256(WP))&amp;#34; for now, but it&amp;#39;s&lt;br/&gt;not a no-brainer.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] Assume bitcoin-network-level compute (collision in 19 days) costs&lt;br/&gt;    $1B to build today.  Assume there will be 100 million dollars a day&lt;br/&gt;    in vulnerable txs, and you&amp;#39;re on one end of all of them (or can MITM&lt;br/&gt;    if you find a collision), *and* can delay them all by 10 seconds,&lt;br/&gt;    and none are in parallel so you can attack all of them.  IOW, just&lt;br/&gt;    like a single $100M opportunity for 3650 seconds each year.&lt;br/&gt;&lt;br/&gt;    Our machine has a 0.11% chance of finding a collision in 1 hour, so&lt;br/&gt;    it&amp;#39;s worth about $110,000.  We can build it for that in about 20&lt;br/&gt;    years.
    </content>
    <updated>2023-06-07T19:47:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdtqmjs34jdcr9pu334lgrcfkxsx3cwz0j3jszdj7d6t3n3yrjdcgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2swyxfk</id>
    
      <title type="html">📅 Original date posted:2016-01-08 📝 Original message:Pieter ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdtqmjs34jdcr9pu334lgrcfkxsx3cwz0j3jszdj7d6t3n3yrjdcgzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2swyxfk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspn42hq4059kd29d39hzlmtp9qeugptpa79rvth2rxn9q5a5gdk5cwn50uf&#39;&gt;nevent1q…50uf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-08&lt;br/&gt;📝 Original message:Pieter Wuille via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;writes:&lt;br/&gt;&amp;gt; Yes, this is what I worry about. We&amp;#39;re constructing a 2-of-2 multisig&lt;br/&gt;&amp;gt; escrow in a contract. I reveal my public key A, you do a 80-bit search for&lt;br/&gt;&amp;gt; B and C such that H(A and B) = H(B and C). You tell me your keys B, and I&lt;br/&gt;&amp;gt; happily send to H(A and B), which you steal with H(B and C).&lt;br/&gt;&lt;br/&gt;FWIW, this attack would effect the current lightning-network &amp;#34;deployable&lt;br/&gt;lightning&amp;#34; design at channel establishment; we reveal our pubkey in the&lt;br/&gt;opening packet (which is used to redeem a P2SH using normal 2of2).&lt;br/&gt;&lt;br/&gt;At least you need to grind before replying (which will presumably time&lt;br/&gt;out), rather than being able to do it once the channel is open.&lt;br/&gt;&lt;br/&gt;We could pre-commit by exchanging hashes of pubkeys first, but contracts&lt;br/&gt;on bitcoin are hard enough to get right that I&amp;#39;m reluctant to add more&lt;br/&gt;hoops.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:47:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2tvn7l2nzp224gnqynmj0aeuerm896dnv48h8hcunrr087xerfegzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2lrd8yd</id>
    
      <title type="html">📅 Original date posted:2015-12-20 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2tvn7l2nzp224gnqynmj0aeuerm896dnv48h8hcunrr087xerfegzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2lrd8yd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9rl9emgdrtwwlw8jtnytngxvhltkpzpjjkvmw4txqr3vansydd8qaurc32&#39;&gt;nevent1q…rc32&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-12-20&lt;br/&gt;📝 Original message:Jonathan Toomim via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;writes:&lt;br/&gt;&amp;gt; On Dec 18, 2015, at 10:30 AM, Pieter Wuille via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1) The risk of an old full node wallet accepting a transaction that is&lt;br/&gt;&amp;gt;&amp;gt; invalid to the new rules.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; The receiver wallet chooses what address/script to accept coins on.&lt;br/&gt;&amp;gt;&amp;gt; They&amp;#39;ll upgrade to the new softfork rules before creating an address&lt;br/&gt;&amp;gt;&amp;gt; that depends on the softfork&amp;#39;s features.&lt;br/&gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt;&amp;gt; So, not a problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mallory wants to defraud Bob with a 1 BTC payment for some beer. Bob&lt;br/&gt;&amp;gt; runs the old rules. Bob creates a p2pkh address for Mallory to&lt;br/&gt;&amp;gt; use. Mallory takes 1 BTC, and creates an invalid SegWit transaction&lt;br/&gt;&amp;gt; that Bob cannot properly validate and that pays into one of Mallory&amp;#39;s&lt;br/&gt;&amp;gt; wallets. Mallory then immediately spends the unconfirmed transaction&lt;br/&gt;&amp;gt; into Bob&amp;#39;s address. Bob sees what appears to be a valid transaction&lt;br/&gt;&amp;gt; chain which is not actually valid.&lt;br/&gt;&lt;br/&gt;Pretty sure Bob&amp;#39;s wallet will be looking for &amp;#34;OP_DUP OP_HASH160&lt;br/&gt;&amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG&amp;#34; scriptSig.  The SegWit-usable&lt;br/&gt;outputs will (have to) look different, won&amp;#39;t they?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:46:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg435aqzjpzmgdm06t7hzzjtne7408lw7v54yxh98g5jawq2msheqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz27vm6pg</id>
    
      <title type="html">📅 Original date posted:2015-12-03 📝 Original message:Gavin ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg435aqzjpzmgdm06t7hzzjtne7408lw7v54yxh98g5jawq2msheqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz27vm6pg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspmx0f0xp0722qv2ukx6056cyntd5amrn5kqnln35tu8gqdu70chqu3stv7&#39;&gt;nevent1q…stv7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-12-03&lt;br/&gt;📝 Original message:Gavin Andresen via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;writes:&lt;br/&gt;&amp;gt; On Wed, Dec 2, 2015 at 1:57 PM, Emin Gün Sirer &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; How to Do It&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If we want to compress Bitcoin, a programming challenge/contest would be&lt;br/&gt;&amp;gt;&amp;gt; one of the best ways to find the best possible, Bitcoin-specific&lt;br/&gt;&amp;gt;&amp;gt; compressor. This is the kind of self-contained exercise that bright young&lt;br/&gt;&amp;gt;&amp;gt; hackers love to tackle. It&amp;#39;d bring in new programmers into the ecosystem,&lt;br/&gt;&amp;gt;&amp;gt; and many of us would love to discover the limits of compressibility for&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin bits on a wire. And the results would be interesting even if the&lt;br/&gt;&amp;gt;&amp;gt; final compression engine is not enabled by default, or not even merged.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I love this idea. Lets build a standardized data set to test against using&lt;br/&gt;&amp;gt; real data from the network (has anybody done this yet?).&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://github.com/rustyrussell/bitcoin-corpus&#34;&gt;https://github.com/rustyrussell/bitcoin-corpus&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;It includes mempool contents and tx receipt logs for 1 week across 4&lt;br/&gt;nodes.  I vaguely plan to update it every year.&lt;br/&gt;&lt;br/&gt;A more ambitious version would add some topology information, but we&lt;br/&gt;need to figure out some anonymization strategy for the data.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:45:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg8es6ktf5n05rkwtqqrehcjwkgv53ta3nyaqa4l60nnlpsxa2q5gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2tyyp2t</id>
    
      <title type="html">📅 Original date posted:2015-09-30 📝 Original message:Adam ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg8es6ktf5n05rkwtqqrehcjwkgv53ta3nyaqa4l60nnlpsxa2q5gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2tyyp2t" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8lus9p67luvle9t2xah8lkhtp7f4ffas5xu3hlth2ahldmerqu8q7m89at&#39;&gt;nevent1q…89at&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-30&lt;br/&gt;📝 Original message:Adam Back &amp;lt;adam at cypherspace.org&amp;gt; writes:&lt;br/&gt;&amp;gt; I think from discussion with Gavin sometime during the montreal&lt;br/&gt;&amp;gt; scaling bitcoin workshop, XT maybe willing to make things easy and&lt;br/&gt;&amp;gt; adapt what it&amp;#39;s doing.  For example in relation to versionBits Gavin&lt;br/&gt;&amp;gt; said he&amp;#39;d be willing to update XT with an updated/improved&lt;br/&gt;&amp;gt; versionBits, for example.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It seems more sensible to do what is simple and clean and have both&lt;br/&gt;&amp;gt; core do that, and XT follow if there is no particular philosophy&lt;br/&gt;&amp;gt; debate on a given technical topic.  This seems a quite constructive&lt;br/&gt;&amp;gt; approach.&lt;br/&gt;&lt;br/&gt;That too, but let&amp;#39;s not break existing software.  This proposal allows&lt;br/&gt;that, and is trivial.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:41:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8f3a66g9d49qm0cvur9dm7dg5walyd7d563rn38lsmelcc3kvheqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2tt92vd</id>
    
      <title type="html">📅 Original date posted:2015-09-30 📝 Original message:John ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8f3a66g9d49qm0cvur9dm7dg5walyd7d563rn38lsmelcc3kvheqzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2tt92vd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg8es6ktf5n05rkwtqqrehcjwkgv53ta3nyaqa4l60nnlpsxa2q5gxskz7k&#39;&gt;nevent1q…kz7k&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-30&lt;br/&gt;📝 Original message:John Winslow via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;writes:&lt;br/&gt;&amp;gt; Two observations from a Bitcoin investor and non-programmer:&lt;br/&gt;&lt;br/&gt;Please take this off the -dev list.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:41:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8ljgfzpqfmvsn2j60rqprvrfxwq04t02w5llzafzhtfpc6w8er4gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ajax3x</id>
    
      <title type="html">📅 Original date posted:2015-09-29 📝 Original message:Tom ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8ljgfzpqfmvsn2j60rqprvrfxwq04t02w5llzafzhtfpc6w8er4gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2ajax3x" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxn0a2k9eytlvjv3vj84x2rqc475a5r02kd95rg3lmkhhl0k9ku8scndls0&#39;&gt;nevent1q…dls0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-29&lt;br/&gt;📝 Original message:Tom Harding via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;writes:&lt;br/&gt;&amp;gt; On 9/13/2015 11:56 AM, Rusty Russell via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;#39;&amp;#39;&amp;#39;Success: Activation Delay&amp;#39;&amp;#39;&amp;#39;&lt;br/&gt;&amp;gt;&amp;gt; The consensus rules related to &amp;#39;&amp;#39;locked-in&amp;#39;&amp;#39; soft fork will be enforced in&lt;br/&gt;&amp;gt;&amp;gt; the second retarget period; ie. there is a one retarget period in&lt;br/&gt;&amp;gt;&amp;gt; which the remaining 5% can upgrade.  At the that activation block and&lt;br/&gt;&amp;gt;&amp;gt; after, the bit B may be reused for a different soft fork.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Rather than a simple one-period delay, should there be a one-period &lt;br/&gt;&amp;gt; &amp;#34;burn-in&amp;#34; to show sustained support of the threshold?  During this &lt;br/&gt;&amp;gt; period, support must continuously remain above the threshold.  Any lapse &lt;br/&gt;&amp;gt; resets to inactivated state.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With a simple delay, you can have the embarrassing situation where &lt;br/&gt;&amp;gt; support falls off during the delay period and there is far below &lt;br/&gt;&amp;gt; threshold support just moments prior to enforcement, but enforcement &lt;br/&gt;&amp;gt; happens anyway.&lt;br/&gt;&lt;br/&gt;Yeah, but Gavin&amp;#39;s right.  If you can&amp;#39;t account for all the corner cases,&lt;br/&gt;all you can do is keep it simple and well defined.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:40:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyvan6m62lg6e9e6h5h83nvd77vus8g8q28t99fvr3r44tj9l527gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2l30hzg</id>
    
      <title type="html">📅 Original date posted:2015-09-17 📝 Original message:Tier ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyvan6m62lg6e9e6h5h83nvd77vus8g8q28t99fvr3r44tj9l527gzyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz2l30hzg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxudsm3h520f54pgesrrdj74kayfqdr4rulpzp653jpcw6un5t4lqpd0w9n&#39;&gt;nevent1q…0w9n&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-17&lt;br/&gt;📝 Original message:Tier Nolan via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; On Wed, Sep 16, 2015 at 9:19 PM, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; You need a timeout: an ancient (non-mining, thus undetectable) node&lt;br/&gt;&amp;gt;&amp;gt; should never fork itself off the network because someone reused a failed&lt;br/&gt;&amp;gt;&amp;gt; BIP bit.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I meant if the 2nd bit was part of the BIP.  One of the 2 bits is &amp;#34;FOR&amp;#34; and&lt;br/&gt;&amp;gt; the other is &amp;#34;AGAINST&amp;#34;.  If against hits 25%, then it is deemed a failure.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The 2nd bit wouldn&amp;#39;t be used normally.  This means that proposals can be&lt;br/&gt;&amp;gt; killed quickly if they are obviously going to fail.&lt;br/&gt;&lt;br/&gt;This could be added if we approach one failed soft fork every 5 weeks,&lt;br/&gt;I guess (or it could be just for specific soft forks).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.
    </content>
    <updated>2023-06-07T19:40:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9yh3qmkkc448guqldev3zn4ar70pkhg5sj95hrfl4eukjskp4rzszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz20rgyst</id>
    
      <title type="html">📅 Original date posted:2016-01-08 📝 Original message:Matt ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9yh3qmkkc448guqldev3zn4ar70pkhg5sj95hrfl4eukjskp4rzszyqfmmrqutcan2z9q0jf9npj8zc93r2cdam6vg5sf3c3ru3purjjz20rgyst" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdngct5acusvkmjyw35p6uc3t7a7qdzmsps0ylfl4vqg6xsjqurlst95lue&#39;&gt;nevent1q…5lue&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2016-01-08&lt;br/&gt;📝 Original message:Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; writes:&lt;br/&gt;&amp;gt; Indeed, anything which uses P2SH is obviously vulnerable if there is&lt;br/&gt;&amp;gt; an attack on RIPEMD160 which reduces it&amp;#39;s security only marginally.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is true?  Even if you can generate a collision in&lt;br/&gt;RIPEMD160, that doesn&amp;#39;t help you since you need to create a specific&lt;br/&gt;SHA256 hash for the RIPEMD160 preimage.&lt;br/&gt;&lt;br/&gt;Even a preimage attack only helps if it leads to more than one preimage&lt;br/&gt;fairly cheaply; that would make grinding out the SHA256 preimage easier.&lt;br/&gt;AFAICT even MD4 isn&amp;#39;t this broken.&lt;br/&gt;&lt;br/&gt;But just with Moore&amp;#39;s law (doubling every 18 months), we&amp;#39;ll worry about&lt;br/&gt;economically viable attacks in 20 years.[1]&lt;br/&gt;&lt;br/&gt;That&amp;#39;s far enough away that I would choose simplicity, and have all SW&lt;br/&gt;scriptPubKeys simply be &amp;#34;&amp;lt;0&amp;gt; RIPEMD(SHA256(WP))&amp;#34; for now, but it&amp;#39;s&lt;br/&gt;not a no-brainer.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Rusty.&lt;br/&gt;&lt;br/&gt;[1] Assume bitcoin-network-level compute (collision in 19 days) costs&lt;br/&gt;    $1B to build today.  Assume there will be 100 million dollars a day&lt;br/&gt;    in vulnerable txs, and you&amp;#39;re on one end of all of them (or can MITM&lt;br/&gt;    if you find a collision), *and* can delay them all by 10 seconds,&lt;br/&gt;    and none are in parallel so you can attack all of them.  IOW, just&lt;br/&gt;    like a single $100M opportunity for 3650 seconds each year.&lt;br/&gt;&lt;br/&gt;    Our machine has a 0.11% chance of finding a collision in 1 hour, so&lt;br/&gt;    it&amp;#39;s worth about $110,000.  We can build it for that in about 20&lt;br/&gt;    years.
    </content>
    <updated>2023-06-07T19:31:35&#43;02:00</updated>
  </entry>

</feed>