<?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/npub1ppn2nhlfdzkw9gw0ytljpef5dpyzsxzw8ffcyykamt32hw6pge0smhs2fw.rss" />
  <link href="https://nostr.ae/npub1ppn2nhlfdzkw9gw0ytljpef5dpyzsxzw8ffcyykamt32hw6pge0smhs2fw" />
  <id>https://nostr.ae/npub1ppn2nhlfdzkw9gw0ytljpef5dpyzsxzw8ffcyykamt32hw6pge0smhs2fw</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqs8hjwq37smcwa8ytdce0jfespprfwl9utta0gf77ntg77tp6qfxaqzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r9755q4vm</id>
    
      <title type="html">📅 Original date posted:2023-09-29 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8hjwq37smcwa8ytdce0jfespprfwl9utta0gf77ntg77tp6qfxaqzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r9755q4vm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspqzyuyf20tngfpjsgt2pwflnz5t8qv54cuk3d4e6y6hm9et9ucjszdk6vn&#39;&gt;nevent1q…k6vn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-29&lt;br/&gt;🗒️ Summary of this message: The author has implemented the MATT challenge protocol in Bitcoin Script and provides a detailed description and instructions on how to run the code. They propose using OP_CHECKCONTRACTVERIFY and OP_CAT opcodes to trace program execution and challenge computations. The next steps involve creating a generic framework for compiling high-level programs into MATT-compatible Bitcoin Scripts.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi, all!&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve been working on an implementation of the original MATT challenge&lt;br/&gt;protocol[0], with a detailed description of how we go from a&lt;br/&gt;&amp;#34;high-level arbitrary program&amp;#34; to something that can be verified&lt;br/&gt;on-chain in Bitcoin Script.&lt;br/&gt;&lt;br/&gt;You can find the write-up here, which also includes instructions of&lt;br/&gt;how to run the code and inspect the transactions using a local block&lt;br/&gt;explorer: &lt;a href=&#34;https://github.com/halseth/mattlab/blob/main/docs/challenge.md&#34;&gt;https://github.com/halseth/mattlab/blob/main/docs/challenge.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;TLDR; Using the proposed opcode OP_CHECKCONTRACTVERIFY and OP_CAT, we&lt;br/&gt;show to trace execution of the program `multiply` [1] and challenge&lt;br/&gt;this computation in O(n logn) on-chain transactions:&lt;br/&gt;&lt;br/&gt;func multiply(x int) int {&lt;br/&gt;    i := 0&lt;br/&gt;    while {&lt;br/&gt;        if i &amp;lt; 8 {&lt;br/&gt;            x = x &#43; x&lt;br/&gt;            i = i &#43; 1&lt;br/&gt;        } else {&lt;br/&gt;            break&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;    return x&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;Next steps would be to make this a generic framework with tools to&lt;br/&gt;automatically compile arbitrary high-level programs down to&lt;br/&gt;MATT-compatible Bitcoin Scripts.&lt;br/&gt;&lt;br/&gt;All feedback appreciated!&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-November/021182.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-November/021182.html&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-November/021205.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-November/021205.html&lt;/a&gt;
    </content>
    <updated>2023-10-03T23:44:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsywe94m0c4w8wuhxym7j0ghclvjxxsxempvxha98jwfdvsw0ldr0szyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r970v9d5h</id>
    
      <title type="html">📅 Original date posted:2020-09-11 📝 Original message: Hi, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsywe94m0c4w8wuhxym7j0ghclvjxxsxempvxha98jwfdvsw0ldr0szyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r970v9d5h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsraa2m52pszfqazwex2h5z5khwyvalqw6v3qafkf4tfmnn9ycxcksmxdrph&#39;&gt;nevent1q…drph&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-09-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi,&lt;br/&gt;&lt;br/&gt;Very good observation, most definitely not a type of attack I forseen!&lt;br/&gt;&lt;br/&gt;Luckily, it was the plan to phase out update_fee all along, in favor&lt;br/&gt;of only accepting the minimum relay fee (zero fee if/when package&lt;br/&gt;relay is a reality). If I understand the scenario correctly, that&lt;br/&gt;should mitigate this attack completely, as the attacker cannot impact&lt;br/&gt;the intended miner fees on the HTLCs, and could only siphon off the&lt;br/&gt;minimal miner fee if anything at all.&lt;br/&gt;&lt;br/&gt;I would be open to patching the spec to disallow update_fee for anchor&lt;br/&gt;channels, but maybe we can just add a warning and discourage it.&lt;br/&gt;&lt;br/&gt;Johan&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Sep 10, 2020 at 8:13 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hi Antoine,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Great findings!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think an even simpler mitigation is just for the non-initiator to _reject_&lt;br/&gt;&amp;gt; update_fee proposals that are &amp;#34;unreasonable&amp;#34;. The non-initiator can run a&lt;br/&gt;&amp;gt; &amp;#34;fee leak calculation&amp;#34; to compute the worst-case leakage of fees in the&lt;br/&gt;&amp;gt; revocation case. This can be done to day without any significant updates to&lt;br/&gt;&amp;gt; implementations, and some implementations may already be doing this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One issue is that we don&amp;#39;t have a way to do a &amp;#34;soft reject&amp;#34; of an update_fee&lt;br/&gt;&amp;gt; as is. However, depending on the implementations, it may be possible to just&lt;br/&gt;&amp;gt; reconnect and issue a co-op close if there&amp;#39;re no HTLCs on the commitment&lt;br/&gt;&amp;gt; transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As you mentioned by setting proper values for max allowed htlcs, max in&lt;br/&gt;&amp;gt; flight, reserve, etc, nodes are able to quantify this fee leak risk ahead of&lt;br/&gt;&amp;gt; time, and set reasonable parameters based on their security model. One issue&lt;br/&gt;&amp;gt; is that these values are set in stone rn when the channel is opened, but&lt;br/&gt;&amp;gt; future iterations of dynamic commitments may allow us to update them on the&lt;br/&gt;&amp;gt; fly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the mid-term, implementations can start to phase out usage of update_fee&lt;br/&gt;&amp;gt; by setting a minimal commitment fee when the channel is first opened, then&lt;br/&gt;&amp;gt; relying on CPFP to bump up the commitment and any HTLCs if needed. This&lt;br/&gt;&amp;gt; discovery might very well hasten the demise of update_fee in the protocol&lt;br/&gt;&amp;gt; all together as well.  I don&amp;#39;t think we need to depend entirely on a&lt;br/&gt;&amp;gt; theoretical package relay Bitcoin p2p upgrade assuming implementations are&lt;br/&gt;&amp;gt; willing to make an assumption that say 20 sat/byte or w/e has a good chance&lt;br/&gt;&amp;gt; of widespread propagation into mempools.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; From the perspective of channel safety, and variations of attacks like&lt;br/&gt;&amp;gt; &amp;#34;flood &amp;amp; loot&amp;#34;, imo it&amp;#39;s absolutely critical that nodes are able to update&lt;br/&gt;&amp;gt; the fees on their second-level HTLC transactions. As this is where the real&lt;br/&gt;&amp;gt; danger lies: if nodes aren&amp;#39;t able to get 2nd level HTLCs in the chain in&lt;br/&gt;&amp;gt; time, then the incoming HTLC expiry will expire, creating a race condition&lt;br/&gt;&amp;gt; across both commitments which can potentially cascade.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In lnd today, anchors is still behind a build flag, but we plan to enable&lt;br/&gt;&amp;gt; it by default for our upcoming 0.12 release. The blockers on our end were to&lt;br/&gt;&amp;gt; add support for towers, and add basic deadline aware bumping, both of which&lt;br/&gt;&amp;gt; are currently on track. We&amp;#39;ll now also look into setting clamps on the&lt;br/&gt;&amp;gt; receiver end to just not accept unreasonable values for the fee rate of a&lt;br/&gt;&amp;gt; commitment, as this ends up eating into the true HTLC values for both sides.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, Sep 10, 2020 at 9:28 AM Antoine Riard &amp;lt;antoine.riard at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In this post, I would like to expose a potential vulnerability introduced by the recent anchor output spec update related to the new usage of SIGHASH_SINGLE for HTLC transactions. This new malleability combined with the currently deployed mechanism of `update_fee` is likely harmful for funds safety.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This has been previously shared with deployed implementations devs, as anchor channels are flagged as experimental it&amp;#39;s better to discuss and solve this publicly. That said, if you&amp;#39;re currently running experimental anchor channels with non-trusted parties on mainnet, you might prefer to close them.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # SIGHASH_SINGLE and `update_fee` (skip it if you&amp;#39;re familiar)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First, let&amp;#39;s get started by a quick reminder of the data set committed by signature digest algorithm of Segwit transactions (BIP 143):&lt;br/&gt;&amp;gt;&amp;gt; * nVersion&lt;br/&gt;&amp;gt;&amp;gt; * hashPrevouts&lt;br/&gt;&amp;gt;&amp;gt; * hashSequence&lt;br/&gt;&amp;gt;&amp;gt; * outpoint&lt;br/&gt;&amp;gt;&amp;gt; * scriptCode of the input&lt;br/&gt;&amp;gt;&amp;gt; * value of the output spent by this input&lt;br/&gt;&amp;gt;&amp;gt; * nSequence of the input&lt;br/&gt;&amp;gt;&amp;gt; * hashOutputs&lt;br/&gt;&amp;gt;&amp;gt; * nLocktime&lt;br/&gt;&amp;gt;&amp;gt; * sighash type of the signature&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Anchor output switched the sighash type from SIGHASH_ALL to SIGHASH_SINGLE | SIGHASH_ANYONECANPAY for HTLC signatures sent to your counterparty. Thus it can spend non-cooperatively its HTLC outputs on its commitment transactions. I.e when Alice broadcasts her commitment transaction, every Bob&amp;#39;s signatures on Alice&amp;#39;s HTLC-Success/Timeout transactions are now flagging the new sighash type.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus `hashPrevouts`, `hashSequence` (ANYONECANPAY) and `hashOutputs` (SINGLE) aren&amp;#39;t committed anymore. SINGLE only enforces commitment to the output scriptpubkey/amount at the same index that&lt;br/&gt;&amp;gt;&amp;gt; the spending input. Alice is free to attach additional inputs/outputs to her HTLC transaction. This change is aiming to let a single-party bump the feerate of 2nd-stage HTLC transactions in case of mempool-congestion, without counterparty cooperation and thus make HTLC funds safer.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The attached outputs are _not_ encumbered by a revokeable redeemscript for a potential punishment.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; That said, anchor ouput spec didn&amp;#39;t change disable the current fee mechanism already covering HTLC transactions. Pre/post-anchor channels are negotiating a feerate through `update_fee` exchange, initiated by the channel funder. This `update_fee` can be rejected by the receiver if it&amp;#39;s deemed unreasonable compared to your local fee estimator view, but as of today implementations are pretty liberal in their acceptance, admitting a divergence from a scale of 1 to no-bound at all.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This negotiated feerate (`feerate_per_kw`) is used by channel participants to compute effective fees which have to be deduced either from the funder balance output for commitment transactions or from HTLC output value for HTLC transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # The Vulnerability : a Penalty Escape Vector&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; By increasing the feerate thanks to `update_fee`, a malicious party can inflate fees committed on HTLC input/output pairs and redirect this inflated fee to a single-controlled output attached to these malleable pairs. This won&amp;#39;t be punishable by an honest party in case of revoked state broadcast and thus enable to partially escape the penalty.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As an example, Alice and Bob have a 100_000 sats channel. `feerate_per_kw` is 10000 sats.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; At state N, Alice balance is all on her side. She announces 10 outgoing HTLCs of value 7000 sats.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As Commitment tx weight with 10 outputs is 2844 (post-anchor), the absolute fee committed is 28440 sats.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As HTLC-timeout weight is 666 (post-anchor), the absolute fee committed is of 6660 sat, the HTLC tx output as counter-signed by Bob is of 340 sat. This absolute fee aims to pay the miner fee in case Alice needs to timeout HTLC onchain.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Her remaining balance is 1560 sat, above both dust_limit_satoshi and the channel reserve as constrained by Bob (likely 1%).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Alice waits for HTLCs to expire and advances state to N&#43;1. Then she empties her balance minus reserve by sending a HTLC relayed by Bob either to a colluding channel on the rest of network or back to an onchain address thanks to a swap service.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; At state N&#43;2, Alice finalizes HTLC-timeout of state N by capturing almost all of the absolute fee to a new P2WPKH output only controlled by her. She broadcasts the revoked commitment tx N and burns 28440 sats in commitment fee.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Her balance of 1560 sats is punished by Bob&amp;#39;s justice transaction.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; After confirmation and thus maturing of the CSV of 1 on her HTLC output Alice broadcasts her 10 HTLC-timeout sending back to her 6660 sat - 660 to pay a low-fee. Bob punishes the 10 HTLC-timeout outputs of 340 sats.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Alice gain =  99_000 (swap spend) &#43; 66_660 (HTLCs escape) - 1560 (commitment balance punishment) - 28440 (commitment fee) - 660*10 (HTLCs fees) - 340*10 (HTLCs output) = 125600 sats.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Alice&amp;#39;s gain is superior at channel value as it has been partially double-spend by bypassing the revocation punishment.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # Limitations of Attacker Success&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A first limitation of attack success which can be point of is the fact that post-anchor HTLC outputs are CSV&amp;#39;ed by 1, which means in theory a honest party can punish this output before the malicious spend them with the revoked HTLC txn. In practice a malicious party can attach a branch of descendants to its anchor output and that way only allowing one more mempool victim&amp;#39;s transaction on the revoked commitment. The victim must spend all outputs at once or otherwise they&amp;#39;re going to obstrucate each other at mempool acceptance.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Secondly, other limitations  are the per-implementation channel policy `max_accepted_htlcs`, `max_htlc_value_in_flight`, `channel_reserve` and acceptance bound of `update_fee`. A quick look at default policies, even if they vary between deploy implementations, let it think there is room to escape a substantial part of channel value.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lastly, after the revoked commitment transaction is confirmed, both attacker and victim are in a feerate race to confirm either a justice transaction or a malicious HTLC-timeout. As fee estimator logic of the victim&amp;#39;s implementation is a public piece of knowledge, it shouldn&amp;#39;t be hard for the attacker to know the range of the first fee bid and override it by a bit to confirm it before the victim RBF at next block. Currently, not all implementations have RBF of justice transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As of today, if anchor output is deployed and given how LN implementations are managing fees/rebroadcast of onchain transactions, the chance of attack success sounds high in my opinion.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # Countermeasures&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Channel policies could be tighter, like bounded further down `max_accepted_htlcs` or restraining acceptance of `update_fee`. For the latter, it&amp;#39;s pretty hard as a) fee estimators diverge on mempool views b) an attacker can craft escape HTLC-txn in a period of high-fee and patiently waits a low-fee period to launch the exploitation.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Justice transactions can adopt a scorched earth approach binding their feerate to the max to increase odds of winning the feerate race and thus deter attackers. But this sounds like introducing a griefing attack vector. Your counterparty can burn more of your lawful balance in fees than you&amp;#39;ll punish its revoked balance.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A workable option would be to patch current anchor spec to remove `feerate_per_kw` appliance on 2nd-stage transactions, maybe just committing a minimal relay fee.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thoughts of further countermeasures ?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think the vulnerability described is mostly right but please point any missing details.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Antoine&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;&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-06-09T15:00:52&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvu4n8x6fwd6kzcr0me0dx3g27gqldl42jm5prw9pws6d9aplyx0gzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r972va3fn</id>
    
      <title type="html">📅 Original date posted:2019-10-24 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvu4n8x6fwd6kzcr0me0dx3g27gqldl42jm5prw9pws6d9aplyx0gzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r972va3fn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvp88p5w5zgcdgzxaz5shg39uhqvgm3gx40q0jy3cwwhs6xkc8mqcftp0m0&#39;&gt;nevent1q…p0m0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-24&lt;br/&gt;📝 Original message:&lt;br/&gt;Reviving this old thread now that the recently released RC for bitcoind&lt;br/&gt;0.19 includes the above mentioned carve-out rule.&lt;br/&gt;&lt;br/&gt;In an attempt to pave the way for more robust CPFP of on-chain contracts&lt;br/&gt;(Lightning commitment transactions), the carve-out rule was added in&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/15681&#34;&gt;https://github.com/bitcoin/bitcoin/pull/15681&lt;/a&gt;. However, having worked on an&lt;br/&gt;implementation of a new commitment format for utilizing the Bring Your Own&lt;br/&gt;Fees strategy using CPFP, I’m wondering if the special case rule should&lt;br/&gt;have been relaxed a bit, to avoid the need for adding a 1 CSV to all&lt;br/&gt;outputs (in case of Lightning this means HTLC scripts would need to be&lt;br/&gt;changed to add the CSV delay).&lt;br/&gt;&lt;br/&gt;Instead, what about letting the rule be&lt;br/&gt;&lt;br/&gt;The last transaction which is added to a package of dependent&lt;br/&gt;transactions in the mempool must:&lt;br/&gt;  * Have no more than one unconfirmed parent.&lt;br/&gt;&lt;br/&gt;This would of course allow adding a large transaction to each output of the&lt;br/&gt;unconfirmed parent, which in effect would allow an attacker to exceed the&lt;br/&gt;MAX_PACKAGE_VIRTUAL_SIZE limit in some cases. However, is this a problem&lt;br/&gt;with the current mempool acceptance code in bitcoind? I would imagine&lt;br/&gt;evicting transactions based on feerate when the max mempool size is met&lt;br/&gt;handles this, but I’m asking since it seems like there has been several&lt;br/&gt;changes to the acceptance code and eviction policy since the limit was&lt;br/&gt;first introduced.&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, Feb 13, 2019 at 6:57 AM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Thus, even if you imagine a steady-state mempool growth, unless the&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;#34;near the top of the mempool&amp;#34; criteria is &amp;#34;near the top of the next&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; block&amp;#34; (which is obviously *not* incentive-compatible)&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; I was defining &amp;#34;top of mempool&amp;#34; as &amp;#34;in the first 4 MSipa&amp;#34;, ie. next&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; block, and assumed you&amp;#39;d only allow RBF if the old package wasn&amp;#39;t in the&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; top and the replacement would be.  That seems incentive compatible; more&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; than the current scheme?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; My point was, because of block time variance, even that criteria doesn&amp;#39;t&lt;br/&gt;&amp;gt; hold up. If you assume a steady flow of new transactions and one or two&lt;br/&gt;&amp;gt; blocks come in &amp;#34;late&amp;#34;, suddenly &amp;#34;top 4MWeight&amp;#34; isn&amp;#39;t likely to get&lt;br/&gt;&amp;gt; confirmed until a few blocks come in &amp;#34;early&amp;#34;. Given block variance within a&lt;br/&gt;&amp;gt; 12 block window, this is a relatively likely scenario.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [ Digging through old mail. ]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Doesn&amp;#39;t really matter.  Lightning close algorithm would be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  Give bitcoind unileratal close.&lt;br/&gt;&amp;gt; 2.  Ask bitcoind what current expidited fee is (or survey your mempool).&lt;br/&gt;&amp;gt; 3.  Give bitcoind child &amp;#34;push&amp;#34; tx at that total feerate.&lt;br/&gt;&amp;gt; 4.  If next block doesn&amp;#39;t contain unilateral close tx, goto 2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In this case, if you allow a simpified RBF where &amp;#39;you can replace if&lt;br/&gt;&amp;gt; 1. feerate is higher, 2. new tx is in first 4Msipa of mempool, 3. old tx&lt;br/&gt;&amp;gt; isnt&amp;#39;,&lt;br/&gt;&amp;gt; it works.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It allows someone 100k of free tx spam, sure.  But it&amp;#39;s simple.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We could further restrict it by marking the unilateral close somehow to&lt;br/&gt;&amp;gt; say &amp;#34;gonna be pushed&amp;#34; and further limiting the child tx weight (say,&lt;br/&gt;&amp;gt; 5kSipa?) in that case.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Rusty.&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;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191024/065e650f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191024/065e650f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:56:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfgjykx0yu44hc697pdhe7kufq6lf3fvehp5kwyy0em9hz8hmeaygzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97aa6r05</id>
    
      <title type="html">📅 Original date posted:2019-10-25 📝 Original message: It ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfgjykx0yu44hc697pdhe7kufq6lf3fvehp5kwyy0em9hz8hmeaygzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97aa6r05" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs98x9je4esp87vwa7hz8r9fuuq080unkffmq4k0n2kza3uctqa2tc6pecj4&#39;&gt;nevent1q…ecj4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-25&lt;br/&gt;📝 Original message:&lt;br/&gt;It essentially changes the rule to always allow CPFP-ing the commitment as&lt;br/&gt;long as there is an output available without any descendants. It changes&lt;br/&gt;the commitment from &amp;#34;you always need at least, and exactly, one non-CSV&lt;br/&gt;output per party. &amp;#34; to &amp;#34;you always need at least one non-CSV output per&lt;br/&gt;party. &amp;#34;&lt;br/&gt;&lt;br/&gt;I realize these limits are there for a reason though, but I&amp;#39;m wondering if&lt;br/&gt;could relax them. Also now that jeremyrubin has expressed problems with the&lt;br/&gt;current mempool limits.&lt;br/&gt;&lt;br/&gt;On Thu, Oct 24, 2019 at 11:25 PM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; I may be missing something, but I&amp;#39;m not sure how this changes anything?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you have a commitment transaction, you always need at least, and&lt;br/&gt;&amp;gt; exactly, one non-CSV output per party. The fact that there is a size&lt;br/&gt;&amp;gt; limitation on the transaction that spends for carve-out purposes only&lt;br/&gt;&amp;gt; effects how many other inputs/outputs you can add, but somehow I doubt&lt;br/&gt;&amp;gt; its ever going to be a large enough number to matter.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Matt&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 10/24/19 1:49 PM, Johan Torås Halseth wrote:&lt;br/&gt;&amp;gt; &amp;gt; Reviving this old thread now that the recently released RC for bitcoind&lt;br/&gt;&amp;gt; &amp;gt; 0.19 includes the above mentioned carve-out rule.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In an attempt to pave the way for more robust CPFP of on-chain contracts&lt;br/&gt;&amp;gt; &amp;gt; (Lightning commitment transactions), the carve-out rule was added in&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/15681&#34;&gt;https://github.com/bitcoin/bitcoin/pull/15681&lt;/a&gt;. However, having worked on&lt;br/&gt;&amp;gt; &amp;gt; an implementation of a new commitment format for utilizing the Bring&lt;br/&gt;&amp;gt; &amp;gt; Your Own Fees strategy using CPFP, I’m wondering if the special case&lt;br/&gt;&amp;gt; &amp;gt; rule should have been relaxed a bit, to avoid the need for adding a 1&lt;br/&gt;&amp;gt; &amp;gt; CSV to all outputs (in case of Lightning this means HTLC scripts would&lt;br/&gt;&amp;gt; &amp;gt; need to be changed to add the CSV delay).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Instead, what about letting the rule be&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The last transaction which is added to a package of dependent&lt;br/&gt;&amp;gt; &amp;gt; transactions in the mempool must:&lt;br/&gt;&amp;gt; &amp;gt;   * Have no more than one unconfirmed parent.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This would of course allow adding a large transaction to each output of&lt;br/&gt;&amp;gt; &amp;gt; the unconfirmed parent, which in effect would allow an attacker to&lt;br/&gt;&amp;gt; &amp;gt; exceed the MAX_PACKAGE_VIRTUAL_SIZE limit in some cases. However, is&lt;br/&gt;&amp;gt; &amp;gt; this a problem with the current mempool acceptance code in bitcoind? I&lt;br/&gt;&amp;gt; &amp;gt; would imagine evicting transactions based on feerate when the max&lt;br/&gt;&amp;gt; &amp;gt; mempool size is met handles this, but I’m asking since it seems like&lt;br/&gt;&amp;gt; &amp;gt; there has been several changes to the acceptance code and eviction&lt;br/&gt;&amp;gt; &amp;gt; policy since the limit was first introduced.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - Johan&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Wed, Feb 13, 2019 at 6:57 AM Rusty Russell &amp;lt;rusty at rustcorp.com.au&lt;br/&gt;&amp;gt; &amp;gt; &amp;lt;mailto:rusty at rustcorp.com.au&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     Matt Corallo &amp;lt;lf-lists at mattcorallo.com&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;mailto:lf-lists at mattcorallo.com&amp;gt;&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&amp;gt; Thus, even if you imagine a steady-state mempool growth, unless&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&amp;gt; &amp;#34;near the top of the mempool&amp;#34; criteria is &amp;#34;near the top of the&lt;br/&gt;&amp;gt; next&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&amp;gt; block&amp;#34; (which is obviously *not* incentive-compatible)&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; I was defining &amp;#34;top of mempool&amp;#34; as &amp;#34;in the first 4 MSipa&amp;#34;, ie.&lt;br/&gt;&amp;gt; next&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; block, and assumed you&amp;#39;d only allow RBF if the old package wasn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt;     in the&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; top and the replacement would be.  That seems incentive&lt;br/&gt;&amp;gt; &amp;gt;     compatible; more&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; than the current scheme?&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     &amp;gt; My point was, because of block time variance, even that criteria&lt;br/&gt;&amp;gt; &amp;gt;     doesn&amp;#39;t hold up. If you assume a steady flow of new transactions and&lt;br/&gt;&amp;gt; &amp;gt;     one or two blocks come in &amp;#34;late&amp;#34;, suddenly &amp;#34;top 4MWeight&amp;#34; isn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt;     likely to get confirmed until a few blocks come in &amp;#34;early&amp;#34;. Given&lt;br/&gt;&amp;gt; &amp;gt;     block variance within a 12 block window, this is a relatively likely&lt;br/&gt;&amp;gt; &amp;gt;     scenario.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     [ Digging through old mail. ]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     Doesn&amp;#39;t really matter.  Lightning close algorithm would be:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     1.  Give bitcoind unileratal close.&lt;br/&gt;&amp;gt; &amp;gt;     2.  Ask bitcoind what current expidited fee is (or survey your&lt;br/&gt;&amp;gt; mempool).&lt;br/&gt;&amp;gt; &amp;gt;     3.  Give bitcoind child &amp;#34;push&amp;#34; tx at that total feerate.&lt;br/&gt;&amp;gt; &amp;gt;     4.  If next block doesn&amp;#39;t contain unilateral close tx, goto 2.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     In this case, if you allow a simpified RBF where &amp;#39;you can replace if&lt;br/&gt;&amp;gt; &amp;gt;     1. feerate is higher, 2. new tx is in first 4Msipa of mempool, 3.&lt;br/&gt;&amp;gt; &amp;gt;     old tx isnt&amp;#39;,&lt;br/&gt;&amp;gt; &amp;gt;     it works.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     It allows someone 100k of free tx spam, sure.  But it&amp;#39;s simple.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     We could further restrict it by marking the unilateral close somehow&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; &amp;gt;     say &amp;#34;gonna be pushed&amp;#34; and further limiting the child tx weight (say,&lt;br/&gt;&amp;gt; &amp;gt;     5kSipa?) 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;     &amp;lt;mailto:Lightning-dev at lists.linuxfoundation.org&amp;gt;&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;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191025/58a3d7b8/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191025/58a3d7b8/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:56:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvghleyhqm02ta9cyguccad54lsavv5z2xfyyx7enuu4tux2g7jeczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97ets8wj</id>
    
      <title type="html">📅 Original date posted:2019-04-03 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvghleyhqm02ta9cyguccad54lsavv5z2xfyyx7enuu4tux2g7jeczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97ets8wj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszad2v8zxte7q37gaqf42gxnfggsyqgm0rhcs5danwn6t99gatz6cfaztll&#39;&gt;nevent1q…ztll&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-04-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Pierre and list folks,&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t looked at the technical implications of implementing this in&lt;br/&gt;detail, but I like the high-level direction this proposal is taking :)&lt;br/&gt;&lt;br/&gt;I think it nicely ties together several concepts that have been proposed&lt;br/&gt;earlier, and with the correct design could give the sender all the&lt;br/&gt;flexibility needed to craft payments according to its own&lt;br/&gt;reliability/privacy/fee tradeoff.&lt;br/&gt;&lt;br/&gt;In an ideal world we would have:&lt;br/&gt;- Multi-hop locks: hop decorrelation will be even more important when the&lt;br/&gt;sender no longer controls the whole payment path.&lt;br/&gt;&lt;br/&gt;- Packet switched routing: the sender can choose whether to route purely&lt;br/&gt;packet switched (only knowing the destination, no need to keep any routing&lt;br/&gt;table) or route purely onion-based (as today), or something in between. As&lt;br/&gt;Christian mentions, this is similar to how TOR/TCP works, and I like the&lt;br/&gt;flexibility this layering allows.&lt;br/&gt;&lt;br/&gt;- Rendezvous routing: such a proposal would be nice to combine with&lt;br/&gt;rendezvous routing. This way even the sender wouldn&amp;#39;t necessarily know if&lt;br/&gt;the &amp;#34;destination node&amp;#34; is just another trampoline. Maybe maybe this concern&lt;br/&gt;shouldn&amp;#39;t be on this layer though?&lt;br/&gt;&lt;br/&gt;- Fees: (as today) the sender would set the fees it is willing to pay&lt;br/&gt;between trampolines, and it could dynamically learn about fee levels needed&lt;br/&gt;to reach different parts of the network. Today we know the fee needed to&lt;br/&gt;reach the next hop, but here we could start out low (for the&lt;br/&gt;trampoline-to-trampoline fee) and let different trampolines return&lt;br/&gt;competing fee offers to get to the next hop.&lt;br/&gt;&lt;br/&gt;As mentioned, I haven&amp;#39;t thought about the technical implications of all&lt;br/&gt;this, and it would certainly require a lot of work to get this actually&lt;br/&gt;implemented.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Johan&lt;br/&gt;&lt;br/&gt;On Wed, Apr 3, 2019 at 5:42 AM ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Pierre and list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     There is another unrelated issue: because trampoline nodes don&amp;#39;t know&lt;br/&gt;&amp;gt; &amp;gt;     anything about what happened before they received the onion, they may&lt;br/&gt;&amp;gt; &amp;gt;     unintentionnaly create overlapping routes. So we can&amp;#39;t simply use the&lt;br/&gt;&amp;gt; &amp;gt;     payment_hash as we currently do, we would have to use something a bit&lt;br/&gt;&amp;gt; &amp;gt;     more elaborate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Just to be clear, the issue is for example with a network like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     A ------- B -------- C&lt;br/&gt;&amp;gt;              / \&lt;br/&gt;&amp;gt;             /   \&lt;br/&gt;&amp;gt;            /     \&lt;br/&gt;&amp;gt;           /       \&lt;br/&gt;&amp;gt;          D ------- E&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then, A creates an inner trampoline onion &amp;#34;E-&amp;gt;C&amp;#34;, and an outer onion&lt;br/&gt;&amp;gt; &amp;#34;A-&amp;gt;B-&amp;gt;E&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; E, on receiving the inner trampoline onion &amp;#34;E-&amp;gt;C&amp;#34;, finds that E-&amp;gt;B&lt;br/&gt;&amp;gt; direction is low capacity, so routes over the outer onion &amp;#34;E-&amp;gt;D-&amp;gt;B-&amp;gt;C&amp;#34; with&lt;br/&gt;&amp;gt; inner trampoline onion &amp;#34;C&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This creates an overall route A-&amp;gt;B-&amp;gt;E-&amp;gt;D-&amp;gt;B-&amp;gt;C.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When the B-&amp;gt;C HTLC is resolved, B can instead claim the A-&amp;gt;B HTLC and just&lt;br/&gt;&amp;gt; fail the D-&amp;gt;B HTLC, thereby removing D and E from the route and claiming&lt;br/&gt;&amp;gt; their fees, even though they participated in the route.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; (maybe private keys?)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Do you refer to the changing from &amp;#34;H&amp;#34;TLC to &amp;#34;P&amp;#34;TLC point-locked timelocked&lt;br/&gt;&amp;gt; contracts?&lt;br/&gt;&amp;gt; i.e. instead of payment hash / preimage, we use payment point / scalar.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think a few ideas would be improved by this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  Trampoline payments, as described above.&lt;br/&gt;&amp;gt; 2.  Offline vending machines&lt;br/&gt;&amp;gt;     - Instead of storing a fixed number of invoices from the always-online&lt;br/&gt;&amp;gt; payment node, store a HD parent point and derive child points for payments.&lt;br/&gt;&amp;gt; 3.  Enables payment decorrelation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Perhaps we should consider switching to payment points/scalars sometime&lt;br/&gt;&amp;gt; soon.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&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;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190403/24eb7d58/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190403/24eb7d58/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:54:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvzh9pk99k60fxkuypnujjc4dy65jph046yx2q6y0knq69cjcaqcqzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97tpgm3u</id>
    
      <title type="html">📅 Original date posted:2018-11-26 📝 Original message: This ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvzh9pk99k60fxkuypnujjc4dy65jph046yx2q6y0knq69cjcaqcqzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97tpgm3u" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0cn6vkkxfcgwng4vjy5f63qeyag3pk7qjac360gkfg04afjarlag28d9xg&#39;&gt;nevent1q…d9xg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-26&lt;br/&gt;📝 Original message:&lt;br/&gt;This shouldn&amp;#39;t be problem, as the invoice will already indicate that the&lt;br/&gt;node supports BaseAMP. If you have a reason to not reveal that you support&lt;br/&gt;BAMP for certain invoices, you&amp;#39;ll just not specify it in the invoice, and&lt;br/&gt;act non-BAMPy when receiving payments to this payment hash.&lt;br/&gt;&lt;br/&gt;Of course, this will also be opt-in for both sides and won&amp;#39;t affect&lt;br/&gt;existing nodes in any way.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Johan&lt;br/&gt;&lt;br/&gt;On Wed, Nov 21, 2018 at 11:54 PM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Johan Torås Halseth &amp;lt;johanth at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Seems like we can restrict the changes to BOLT11 by having the receiver&lt;br/&gt;&amp;gt; &amp;gt; assume NAMP for incoming payments &amp;lt; invoice_amount. (with some timeout of&lt;br/&gt;&amp;gt; &amp;gt; course, but that would need to be the case even when the sender is&lt;br/&gt;&amp;gt; &amp;gt; signalling NAMP).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This would effectively become a probe for Base AMP; if you get a partial&lt;br/&gt;&amp;gt; payment error, it&amp;#39;s because the recipient didn&amp;#39;t support Base AMP.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Seems cleaner to have a flag, both on BOLT11 and inside the onion.  Then&lt;br/&gt;&amp;gt; it&amp;#39;s explicitly opt-in for both sides and doesn&amp;#39;t affect existing nodes&lt;br/&gt;&amp;gt; in any way.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Rusty.&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181126/67166a9b/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181126/67166a9b/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:52:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs00qymms56z9uf6xec8yxslx833f8n80qa7cftkwma4xuc3tfjztqzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97gm9h3h</id>
    
      <title type="html">📅 Original date posted:2018-11-13 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs00qymms56z9uf6xec8yxslx833f8n80qa7cftkwma4xuc3tfjztqzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97gm9h3h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8lxvpkwlhzdrasx3cg7seqwdknrmpyugqmdys6nghgdaj6k29p4q0jh5na&#39;&gt;nevent1q…h5na&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-13&lt;br/&gt;📝 Original message:&lt;br/&gt;Good evening Z and list,&lt;br/&gt;&lt;br/&gt;I&amp;#39;m wondering, since these payments are no longer atomic, should we name it&lt;br/&gt;accordingly?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Johan&lt;br/&gt;&lt;br/&gt;On Tue, Nov 13, 2018 at 1:28 PM ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I propose the below to support Base AMP.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The below would allow arbitrary merges of paths, but not arbitrary&lt;br/&gt;&amp;gt; splits.  I am uncertain about the safety of arbitrary splits.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### The `multipath_merge_per_hop` type (`option_base_amp`)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This indicates that payment has been split by the sender using Base AMP,&lt;br/&gt;&amp;gt; and that the receiver should wait for the total intended payment before&lt;br/&gt;&amp;gt; forwarding or claiming the payment.&lt;br/&gt;&amp;gt; In case the receiving node is not the last node in the path, then&lt;br/&gt;&amp;gt; succeeding hops MUST be the same across all splits.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 1 (`termination_per_hop`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;   * [`8` : `short_channel_id`]&lt;br/&gt;&amp;gt;   * [`8` : `amt_to_forward`]&lt;br/&gt;&amp;gt;   * [`4` : `outgoing_cltv_value`]&lt;br/&gt;&amp;gt;   * [`8` : `intended_total_payment`]&lt;br/&gt;&amp;gt;   * [`4` : `zeros`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The contents of this hop will be the same across all paths of the Base AMP.&lt;br/&gt;&amp;gt; The `payment_hash` of the incoming HTLCs will also be the same across all&lt;br/&gt;&amp;gt; paths of the Base AMP.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `intended_total_payment` is the total amount of money that this node&lt;br/&gt;&amp;gt; should expect to receive in all incoming paths to the same `payment_hash`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This may be the last hop of a payment onion, in which case the `HMAC` for&lt;br/&gt;&amp;gt; this hop will be `0` (the same rule as for `per_hop_type` 0).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The receiver:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * MUST impose a reasonable timeout for waiting to receive all component&lt;br/&gt;&amp;gt; paths, and fail all incoming HTLC offers for the `payment_hash`  if they&lt;br/&gt;&amp;gt; have not totalled equal to `intended_total_payment`.&lt;br/&gt;&amp;gt; * MUST NOT forward (if an intermediate node) or claim (if the final node)&lt;br/&gt;&amp;gt; unless it has received a total greater or equal to `intended_total_payment`&lt;br/&gt;&amp;gt; in all incoming HTLCs for the same `payment_hash`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The sender:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * MUST use the same `payment_hash` for all paths of a single multipath&lt;br/&gt;&amp;gt; payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&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;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181113/6342ecf1/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181113/6342ecf1/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:52:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs02v7jyjncksgwatpeg6q4rtvwcvpats53x6esxn05jh2h8vw2krczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97yd7qc4</id>
    
      <title type="html">📅 Original date posted:2018-09-20 📝 Original message: I was ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs02v7jyjncksgwatpeg6q4rtvwcvpats53x6esxn05jh2h8vw2krczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97yd7qc4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfmh4emh4y3wzcghf37vc6uglph4n7h0mjqre2nes349chxd2zgwc352c6g&#39;&gt;nevent1q…2c6g&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-09-20&lt;br/&gt;📝 Original message:&lt;br/&gt;I was thinking you could just make many requests to get the same&lt;br/&gt;information, but if you always choose the same channel as long as its&lt;br/&gt;capacity meets the requirement, then not much is learnt :)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Sep 20, 2018 at 9:26 AM Christian Decker &amp;lt;decker.christian at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; That might not be so desirable, since it leaks the current channel&lt;br/&gt;&amp;gt; capacity to the user. Depending on how fine grained the amount in the&lt;br/&gt;&amp;gt; invoice is and how the user can control it, he could do a binary search&lt;br/&gt;&amp;gt; over capacities and very reliably tell how much capacity you have and&lt;br/&gt;&amp;gt; track it over time. That is still the case for a single channel, but if&lt;br/&gt;&amp;gt; you always chose the same channel it reduces how much info is leaked.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Christian&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Johan Torås Halseth &amp;lt;johanth at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Any reason not to include _all_ (up to a limit) incoming channels with&lt;br/&gt;&amp;gt; &amp;gt; sufficient capacity?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt; Johan&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Thu, Sep 20, 2018 at 4:12 AM Rusty Russell &amp;lt;rusty at blockstream.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;         I&amp;#39;m considering a change to c-lightning, where `invoice` would&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; automatically append an &amp;#39;r&amp;#39; field for a channel which has sufficient&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; *incoming* capacity for the amount (using a weighted probability across&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; our peers).&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;          This isn&amp;#39;t quite what &amp;#39;r&amp;#39; was for, but it would be a useful&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; hint for payment routing and also potentially for establishing an&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; initial channel.  This is an issue for the Blockstream Store which&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; deliberately doesn&amp;#39;t advertize an address any more to avoid&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; centralization.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Thoughts welcome!&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Rusty.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;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;&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;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180920/114dfd18/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180920/114dfd18/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:51:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxcef27s5c5s3hsdjjn5flm46l4edgmaqp6jz4cegr0q2tgfdvqkczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97refxtc</id>
    
      <title type="html">📅 Original date posted:2018-02-08 📝 Original message: Yeah, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxcef27s5c5s3hsdjjn5flm46l4edgmaqp6jz4cegr0q2tgfdvqkczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97refxtc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp0h5jjj2dr85txx7vj240z39stewcfugtz5ca5vl5rm4jgjdqgsgdywdly&#39;&gt;nevent1q…wdly&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-02-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Yeah, that is true, it would only give you the atomicity, not the decorrelation. I don’t see how you could get all the same properties using only one hash though. I guess the sender has no incentive to claim any of the payments before all of them have arrived, but you get no guarantee that partial payments cannot be made. Seems hard to do without introducing new primitives.&lt;br/&gt;- Johan&lt;br/&gt;&lt;br/&gt;On Thu, Feb 8, 2018 at 12:44, Jim Posen &amp;lt;jim.posen at gmail.com&amp;gt; wrote:&lt;br/&gt;If using two hashes to deliver the payment while still getting a proof, I&amp;#39;m not sure what that provides above just sending regular lightning payments over multiple routes with one hash. Firstly, if there is a second hash, it would presumably be the same for all routes, making them linkable again, which AMP tries to solve. And secondly, the receiver has no incentive to claim any of the HTLCs before all of them are locked in, because in that case they are releasing the transaction receipt before fully being paid.&lt;br/&gt;&lt;br/&gt;On Thu, Feb 8, 2018 at 8:41 AM, Johan Torås Halseth &amp;lt; johanth at gmail.com [johanth at gmail.com] &amp;gt; wrote:&lt;br/&gt;An obvious way to make this compatible with proof-of-payment would be to require two hashes to claim the HTLC: the presage from the invoice payment hash (as today) &#43; the new hash introduced here. This would give the sender a receipt after only one of the HTLCs was claimed. Would require changes to the scripts of course.&lt;br/&gt;With Schnorr/EC operations this could probably be made more elegant, as mentioned.&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;On Wed, Feb 7, 2018 at 18:21, Rusty Russell &amp;lt; rusty at rustcorp.com.au [rusty at rustcorp.com.au] &amp;gt; wrote:&lt;br/&gt;Olaoluwa Osuntokun &amp;lt; laolu32 at gmail.com [laolu32 at gmail.com] &amp;gt; writes:&lt;br/&gt;&amp;gt; Hi Y&amp;#39;all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A common question I&amp;#39;ve seen concerning Lightning is: &amp;#34;I have five $2&lt;br/&gt;&amp;gt; channels, is it possible for me to *atomically* send $6 to fulfill a&lt;br/&gt;&amp;gt; payment?&amp;#34;. The answer to this question is &amp;#34;yes&amp;#34;, provided that the receiver&lt;br/&gt;&lt;br/&gt;This is awesome! I&amp;#39;m kicking myself for not proposing it :)&lt;br/&gt;&lt;br/&gt;Unfortunately, your proposal defines a way to make multipath donations,&lt;br/&gt;not multipath payments :(&lt;br/&gt;&lt;br/&gt;In other words, you&amp;#39;ve lost proof of payment, which IMHO is critical.&lt;br/&gt;&lt;br/&gt;Fortunately, this can be fairly trivially fixed when we go to scriptless&lt;br/&gt;scripts or other equivalent decorrelation mechanism, when I think this&lt;br/&gt;mechanism becomes extremely powerful.&lt;br/&gt;&lt;br/&gt;&amp;gt; - Potential fee savings for larger payments, contingent on there being a&lt;br/&gt;&amp;gt; super-linear component to routed fees. It&amp;#39;s possible that with&lt;br/&gt;&amp;gt; modifications to the fee schedule, it&amp;#39;s actually *cheaper* to send&lt;br/&gt;&amp;gt; payments over multiple flows rather than one giant flow.&lt;br/&gt;&lt;br/&gt;This is a stretch. I&amp;#39;d stick with the increased reliability/privacy&lt;br/&gt;arguments which are overwhelmingly compelling IMHO.&lt;br/&gt;&lt;br/&gt;If I have any important feedback on deeper reading (and after a sccond&lt;br/&gt;coffee), I&amp;#39;ll send a separate email.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.&lt;br/&gt;______________________________ _________________&lt;br/&gt;Lightning-dev mailing list&lt;br/&gt;Lightning-dev at lists. linuxfoundation.org [Lightning-dev at lists.linuxfoundation.org]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation&#34;&gt;https://lists.linuxfoundation&lt;/a&gt;. org/mailman/listinfo/ lightning-dev [&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;&lt;br/&gt;______________________________ _________________&lt;br/&gt;Lightning-dev mailing list&lt;br/&gt;Lightning-dev at lists. linuxfoundation.org [Lightning-dev at lists.linuxfoundation.org]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation&#34;&gt;https://lists.linuxfoundation&lt;/a&gt;. org/mailman/listinfo/ lightning-dev [&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;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180208/edbfbd41/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180208/edbfbd41/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:49:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8ku9w5ld6e7l6rs0mmdz4jlmr53x74wyrz90qt6mqqq9xq52552czyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97z3602j</id>
    
      <title type="html">📅 Original date posted:2018-02-08 📝 Original message: An ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8ku9w5ld6e7l6rs0mmdz4jlmr53x74wyrz90qt6mqqq9xq52552czyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97z3602j" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvxy0vfpd766w0tsl3exus244e2z0kavpzzl4lypfll0ks9uctr7glhcdlf&#39;&gt;nevent1q…cdlf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-02-08&lt;br/&gt;📝 Original message:&lt;br/&gt;An obvious way to make this compatible with proof-of-payment would be to &lt;br/&gt;require two hashes to claim the HTLC: the presage from the invoice payment &lt;br/&gt;hash (as today) &#43; the new hash introduced here. This would give the sender &lt;br/&gt;a receipt after only one of the HTLCs was claimed. Would require changes to &lt;br/&gt;the scripts of course.&lt;br/&gt;With Schnorr/EC operations this could probably be made more elegant, as &lt;br/&gt;mentioned.&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;On Wed, Feb 7, 2018 at 18:21, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; writes:&lt;br/&gt; &amp;gt; Hi Y&amp;#39;all,&lt;br/&gt; &amp;gt;&lt;br/&gt; &amp;gt; A common question I&amp;#39;ve seen concerning Lightning is: &amp;#34;I have five $2&lt;br/&gt; &amp;gt; channels, is it possible for me to *atomically* send $6 to fulfill a&lt;br/&gt; &amp;gt; payment?&amp;#34;. The answer to this question is &amp;#34;yes&amp;#34;, provided that the &lt;br/&gt;receiver&lt;br/&gt;&lt;br/&gt;This is awesome! I&amp;#39;m kicking myself for not proposing it :)&lt;br/&gt;&lt;br/&gt;Unfortunately, your proposal defines a way to make multipath donations,&lt;br/&gt;not multipath payments :(&lt;br/&gt;&lt;br/&gt;In other words, you&amp;#39;ve lost proof of payment, which IMHO is critical.&lt;br/&gt;&lt;br/&gt;Fortunately, this can be fairly trivially fixed when we go to scriptless&lt;br/&gt;scripts or other equivalent decorrelation mechanism, when I think this&lt;br/&gt;mechanism becomes extremely powerful.&lt;br/&gt;&lt;br/&gt; &amp;gt; - Potential fee savings for larger payments, contingent on there being a&lt;br/&gt; &amp;gt; super-linear component to routed fees. It&amp;#39;s possible that with&lt;br/&gt; &amp;gt; modifications to the fee schedule, it&amp;#39;s actually *cheaper* to send&lt;br/&gt; &amp;gt; payments over multiple flows rather than one giant flow.&lt;br/&gt;&lt;br/&gt;This is a stretch. I&amp;#39;d stick with the increased reliability/privacy&lt;br/&gt;arguments which are overwhelmingly compelling IMHO.&lt;br/&gt;&lt;br/&gt;If I have any important feedback on deeper reading (and after a sccond&lt;br/&gt;coffee), I&amp;#39;ll send a separate email.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Rusty.&lt;br/&gt;_______________________________________________&lt;br/&gt;Lightning-dev mailing list&lt;br/&gt;Lightning-dev at lists.linuxfoundation.org&lt;br/&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;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180208/ec4e6b34/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180208/ec4e6b34/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:49:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx7h0235rp8p6azasyy3h3hpmt59j2se3k0ewc325ugdgdh0lqejczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r976nvtvr</id>
    
      <title type="html">📅 Original date posted:2023-05-26 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx7h0235rp8p6azasyy3h3hpmt59j2se3k0ewc325ugdgdh0lqejczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r976nvtvr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswp803wyaacepy24arqes7h0hc0ak0f3633e5l8xe3pgkut3pfyhc2kpgyn&#39;&gt;nevent1q…pgyn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-26&lt;br/&gt;🗒️ Summary of this message: OP_CICV and OP_COCV, along with OP_CAT, enable interesting use cases such as CoinPools, allowing easy checking of input data and enforcing new commitments on output. Suggestions for further extension are proposed.&lt;br/&gt;📝 Original message:Hi, Salvatore.&lt;br/&gt;&lt;br/&gt;As a further exploration of this idea, I implemented a&lt;br/&gt;proof-of-concept of OP_CICV and OP_COCV in btcd[1] that together with&lt;br/&gt;OP_CAT enables a set of interesting use cases.&lt;br/&gt;&lt;br/&gt;One such use case is, as mentioned earlier, CoinPools[2]. The opcodes&lt;br/&gt;let you easily check the &amp;#34;dynamically committed data&amp;#34; of an input you&lt;br/&gt;are spending, and enforce a new commitment on the output. The idea is&lt;br/&gt;to have the set of participants in the pool, and their balances, be&lt;br/&gt;the UTXOs committed data, and  use this to validate the legitimacy of&lt;br/&gt;a transaction, determining whether it permits a peer to exit with a&lt;br/&gt;portion of the pooled funds.&lt;br/&gt;&lt;br/&gt;Doing what you suggested above, having the input and output commit to&lt;br/&gt;a merkle tree of participants and balances, we are able to quite&lt;br/&gt;elegantly verify the coin pool exit clause. Here is a working example&lt;br/&gt;of how that could look like: [3]. Obviously this lacks a lot before it&lt;br/&gt;is a working CoinPool implementation, but it demonstrates how&lt;br/&gt;OP_C[I/O]V introduces &amp;#34;memory&amp;#34; to Bitcoin script.&lt;br/&gt;&lt;br/&gt;Having done this exercise, I have a few suggestions on how one could&lt;br/&gt;further extend the proposal:&lt;br/&gt;&lt;br/&gt;1. In the current proposal for OP_CHECKOUTPUTCONTRACTVERIFY, the&lt;br/&gt;opcodes check whether the output key Q is key X tweaked with data D&lt;br/&gt;and taproot T: Q == tweak(tweak(X,D), T).&lt;br/&gt;&lt;br/&gt;OP_CHECKINPUTCONTRACTVERIFY on the other hand, works on the input&lt;br/&gt;internal key, and does not care about the taptree on the input: P ==&lt;br/&gt;tweak(X,D), where Q = tweak(P, T). In most cases this is probably good&lt;br/&gt;enough, since you are already executing the current script and that&lt;br/&gt;way know the spender has provided the correct taproot.&lt;br/&gt;&lt;br/&gt;However, in the coin pool script mentioned above, I found that I&lt;br/&gt;wanted to re-use the same taproot for the output (recursively). I&lt;br/&gt;believe this would be a quite common use case. To solve this I&lt;br/&gt;committed the taproot as part of the data itself: D&amp;#39; = hash(T&#43;D),&lt;br/&gt;which was then verified by OP_CICV. If you are aware of more efficient&lt;br/&gt;alternatives, I am eager to hear them.&lt;br/&gt;&lt;br/&gt;A simpler way IMO, would be to make OP_CICV and OP_COCV symmetrical:&lt;br/&gt;Have OP_CICV take an optional taproot and do the same check as is done&lt;br/&gt;for the output: Q == tweak(tweak(X,D), T).&lt;br/&gt;&lt;br/&gt;2.To make fully functioning CoinPools, one would need functionality&lt;br/&gt;similar to OP_MERKLESUB[4]: remove some data from the merkle tree, and&lt;br/&gt;remove a key from the aggregated internal key.This suggestion may&lt;br/&gt;surpass the intended scope of this proposal, and would likely&lt;br/&gt;necessitate the availability of multiple EC operations to accommodate&lt;br/&gt;various key schemes. If we had opcodes for adding and removing keys&lt;br/&gt;from the internal key this would be even more powerful.&lt;br/&gt;&lt;br/&gt;I look forward to hearing your thoughts on these suggestions and&lt;br/&gt;further exploring the possibilities of the proposal!&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Johan&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/halseth/btcd/pull/1/commits/90a4065bdcd8029fe3325514a250490cba66fddd&#34;&gt;https://github.com/halseth/btcd/pull/1/commits/90a4065bdcd8029fe3325514a250490cba66fddd&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-June/017964.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-June/017964.html&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://github.com/halseth/tapsim/tree/matt-demo/examples/matt/coinpool&#34;&gt;https://github.com/halseth/tapsim/tree/matt-demo/examples/matt/coinpool&lt;/a&gt;&lt;br/&gt;[4] &lt;a href=&#34;https://github.com/ariard/bips/blob/coinpool-bips/bip-merklesub.mediawiki&#34;&gt;https://github.com/ariard/bips/blob/coinpool-bips/bip-merklesub.mediawiki&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, May 5, 2023 at 11:18 PM Salvatore Ingala&lt;br/&gt;&amp;lt;salvatore.ingala at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, 4 May 2023 at 10:34, Johan Torås Halseth &amp;lt;johanth at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; It sounds like we can generalize the description of the construct to:&lt;br/&gt;&amp;gt; &amp;gt; Access to (the hash of) embedded data of inputs and outputs, and the&lt;br/&gt;&amp;gt; &amp;gt; enforcement of output keys and (static) taptrees. In other words, as&lt;br/&gt;&amp;gt; &amp;gt; long as you can dynamically compute the output embedded data in&lt;br/&gt;&amp;gt; &amp;gt; Script, you can enforce more or less anything (since you can make the&lt;br/&gt;&amp;gt; &amp;gt; output script enforce presenting a witness &amp;#34;satisfying&amp;#34; the embedded&lt;br/&gt;&amp;gt; &amp;gt; data).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Does that sound about right?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes. Fraud proofs allow us to extend beyond what Script can do (with the&lt;br/&gt;&amp;gt; necessary tradeoffs), but there is plenty that can be done without them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; For instance, I believe you could simulate coin pools pretty easily:&lt;br/&gt;&amp;gt; &amp;gt; Commit to the set of pubkeys and amounts owned by the participants in&lt;br/&gt;&amp;gt; &amp;gt; the pool, and an output taptree where each participant has their own&lt;br/&gt;&amp;gt; &amp;gt; spending path. Now, to exit the pool unilaterally, the participant&lt;br/&gt;&amp;gt; &amp;gt; must present a proof that their pubkey&#43;amount is committed to in the&lt;br/&gt;&amp;gt; &amp;gt; input and an output where it is no longer committed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think one would want to have a tapleaf for each participant:&lt;br/&gt;&amp;gt; that would make you pay log n hashes just to reveal the tapleaf, and&lt;br/&gt;&amp;gt; then you still need to pay log n hashes to access the embedded data.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Instead, the &amp;#34;unilateral withdrawal Script&amp;#34; can be the same for all the&lt;br/&gt;&amp;gt; participants. The witness would be the Merkle proof, plus perhaps some&lt;br/&gt;&amp;gt; additional information to identify the leaf in the tree (depending on&lt;br/&gt;&amp;gt; how the Merkle tree is implemented). In a complete Merkle tree for&lt;br/&gt;&amp;gt; N = 2^n participants, the witness could contain the n hashes that allow&lt;br/&gt;&amp;gt; to prove the value of the leaf, plus n bits to identify the path to the&lt;br/&gt;&amp;gt; leaf (0/1 for &amp;#39;left/right&amp;#34; child), since Script doesn&amp;#39;t have enough&lt;br/&gt;&amp;gt; opcodes to extract the bits from the leaf index.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The data in the leaf can contain a commitment to all the information&lt;br/&gt;&amp;gt; relevant for that participant (e.g.: their balance and pubkey, in a&lt;br/&gt;&amp;gt; CoinPool construction).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then, the same witness can easily be reused to compute the new Merkle&lt;br/&gt;&amp;gt; root after the data in the leaf is modified (for example, setting the&lt;br/&gt;&amp;gt; amount to 0 for one participant).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A question that arises is how one would efficiently (in Script) prove&lt;br/&gt;&amp;gt; &amp;gt; the inclusion/exclusion of the data in the commitment. One could&lt;br/&gt;&amp;gt; &amp;gt; naively hash all the data twice during script execution (once for the&lt;br/&gt;&amp;gt; &amp;gt; input, once for the output), but that is costly. It would be natural&lt;br/&gt;&amp;gt; &amp;gt; to show merkle tree inclusion/exclusion in script, but perhaps there&lt;br/&gt;&amp;gt; &amp;gt; are more efficient ways to prove it?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A Merkle tree as described above commits to an entire vector that you&lt;br/&gt;&amp;gt; can index positionally. That&amp;#39;s quite versatile, and easier to handle&lt;br/&gt;&amp;gt; than more complex constructions like accumulators with exclusion proofs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A Merkle proof for 2^7 = 128 participants requires about 8 hashes, so&lt;br/&gt;&amp;gt; around 250 bytes in total of witness size; 2^10 = 1024 should bring that&lt;br/&gt;&amp;gt; to the ballpark of 350 bytes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Salvatore Ingala
    </content>
    <updated>2023-06-08T01:21:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswgav5q0cf6jwczmyracqq6rratdr6em72r9edsxssctt56msz4zgzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97d45t79</id>
    
      <title type="html">📅 Original date posted:2023-05-04 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswgav5q0cf6jwczmyracqq6rratdr6em72r9edsxssctt56msz4zgzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97d45t79" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgeavevzr9jpumqgn727l99000gul95dt98s9wplxy3naad6d2jgs5cd3ta&#39;&gt;nevent1q…d3ta&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-04&lt;br/&gt;🗒️ Summary of this message: The construct allows access to embedded data of inputs and outputs, and enforcement of output keys and static taptrees. Merkle tree inclusion/exclusion in script could be used for efficient proof.&lt;br/&gt;📝 Original message:Thank you for the example.&lt;br/&gt;&lt;br/&gt;It sounds like we can generalize the description of the construct to:&lt;br/&gt;Access to (the hash of) embedded data of inputs and outputs, and the&lt;br/&gt;enforcement of output keys and (static) taptrees. In other words, as&lt;br/&gt;long as you can dynamically compute the output embedded data in&lt;br/&gt;Script, you can enforce more or less anything (since you can make the&lt;br/&gt;output script enforce presenting a witness &amp;#34;satisfying&amp;#34; the embedded&lt;br/&gt;data).&lt;br/&gt;&lt;br/&gt;Does that sound about right?&lt;br/&gt;&lt;br/&gt;For instance, I believe you could simulate coin pools pretty easily:&lt;br/&gt;Commit to the set of pubkeys and amounts owned by the participants in&lt;br/&gt;the pool, and an output taptree where each participant has their own&lt;br/&gt;spending path. Now, to exit the pool unilaterally, the participant&lt;br/&gt;must present a proof that their pubkey&#43;amount is committed to in the&lt;br/&gt;input and an output where it is no longer committed.&lt;br/&gt;&lt;br/&gt;A question that arises is how one would efficiently (in Script) prove&lt;br/&gt;the inclusion/exclusion of the data in the commitment. One could&lt;br/&gt;naively hash all the data twice during script execution (once for the&lt;br/&gt;input, once for the output), but that is costly. It would be natural&lt;br/&gt;to show merkle tree inclusion/exclusion in script, but perhaps there&lt;br/&gt;are more efficient ways to prove it?&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, May 2, 2023 at 12:44 AM Salvatore Ingala via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I apologize for a couple of oversights in my last e-mail.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The first is that m_B can&amp;#39;t be committed as-is in the contract&amp;#39;s&lt;br/&gt;&amp;gt; embedded data, with the current semantics of OP_COCV, which&lt;br/&gt;&amp;gt; only allows 32-byte values. A solution could be to store its&lt;br/&gt;&amp;gt; hash SHA256(m_B), instead.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (I didn&amp;#39;t test the Scripts, so there could be other bugs − hopefully the&lt;br/&gt;&amp;gt; general idea is clear, anyway)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Mon, 1 May 2023 at 15:11, Salvatore Ingala &amp;lt;salvatore.ingala at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If the internal_pubkey is a musig-aggregated key of Alice and Bob,&lt;br/&gt;&amp;gt;&amp;gt; the game can be settled entirely offline after the first transaction.&lt;br/&gt;&amp;gt;&amp;gt; Simply, Bob communicates his move to Alice, Alice reveals her move to&lt;br/&gt;&amp;gt;&amp;gt; Bob, and they can settle the bet. The game would be played without&lt;br/&gt;&amp;gt;&amp;gt; any script being executed, therefore all transactions could look like&lt;br/&gt;&amp;gt;&amp;gt; any other P2TR, with the only possible fingerprinting being due to the&lt;br/&gt;&amp;gt;&amp;gt; input amounts.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is incomplete: Alice can&amp;#39;t trust Bob by revealing her move, as&lt;br/&gt;&amp;gt; he could then cheat on-chain and play a different move.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The fix should be straightforward, after adding the requirement that the&lt;br/&gt;&amp;gt; internal pubkey of [S1] is a musig2 of both players.&lt;br/&gt;&amp;gt; After Bob reveals his move (say, Rock), Alice will only agree to continue&lt;br/&gt;&amp;gt; the game off-chain if Bob pre-signs transactions for the state [S1] (where&lt;br/&gt;&amp;gt; m_B = Paper, and m_B = Scissors) that send all the money to Alice.&lt;br/&gt;&amp;gt; This guarantees that a cheating Bob is punished.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Salvatore Ingala&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;
    </content>
    <updated>2023-06-08T01:21:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxe6x2auw0t94rr4w7mj76k398xr3e35n27eahtvq2nlerjnactagzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r9750cstz</id>
    
      <title type="html">📅 Original date posted:2019-10-30 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxe6x2auw0t94rr4w7mj76k398xr3e35n27eahtvq2nlerjnactagzyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r9750cstz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9pg0plupyxp98lta2x6kv5u6gurv0srcs49qvzrws8c03ec52kdsmxsu2n&#39;&gt;nevent1q…su2n&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-30&lt;br/&gt;📝 Original message:On Mon, Oct 28, 2019 at 6:16 PM David A. Harding &amp;lt;dave at dtrt.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; A parent transaction near the limit of 100,000 vbytes could have almost&lt;br/&gt;&amp;gt; 10,000 outputs paying OP_TRUE (10 vbytes per output).  If the children&lt;br/&gt;&amp;gt; were limited to 10,000 vbytes each (the current max carve-out size),&lt;br/&gt;&amp;gt; that allows relaying 100 mega-vbytes or nearly 400 MB data size (larger&lt;br/&gt;&amp;gt; than the default maximum mempool size in Bitcoin Core).&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Thanks, Dave, I wasn&amp;#39;t aware the limits would allow this many outputs. And&lt;br/&gt;as your calculation shows, this opens up the potential for free relay of&lt;br/&gt;large amounts of data.&lt;br/&gt;&lt;br/&gt;We could start special casing to only allow this for &amp;#34;LN commitment-like&amp;#34;&lt;br/&gt;transactions, but this would be application specific changes, and your&lt;br/&gt;calculation shows that even with the BOLT2 numbers there still exists cases&lt;br/&gt;with a large number of children.&lt;br/&gt;&lt;br/&gt;We are moving forward with adding a 1 block delay to all outputs to utilize&lt;br/&gt;the current carve-out rule, and the changes aren&amp;#39;t that bad. See Joost&amp;#39;s&lt;br/&gt;post in &amp;#34;[PATCH] First draft of option_simplfied_commitment&amp;#34;&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20191030/bc2a90f3/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20191030/bc2a90f3/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:21:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxcl6xwf9vewy5fehcea4apta60mctdtpqzl8lk0f8z5efl53sfyszyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97nwv532</id>
    
      <title type="html">📅 Original date posted:2019-10-28 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxcl6xwf9vewy5fehcea4apta60mctdtpqzl8lk0f8z5efl53sfyszyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97nwv532" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszmfxkfj8gr44ntsyccmq7mlvnprrfku76rxngx9zs4atmq68dkeqt77x3g&#39;&gt;nevent1q…7x3g&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-28&lt;br/&gt;📝 Original message:&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don’te see how? Let’s imagine Party A has two spendable outputs, now&lt;br/&gt;&amp;gt; they stuff the package size on one of their spendable outlets until it is&lt;br/&gt;&amp;gt; right at the limit, add one more on their other output (to meet the&lt;br/&gt;&amp;gt; Carve-Out), and now Party B can’t do anything.&lt;br/&gt;&lt;br/&gt;Matt: With the proposed change, party B would always be able to add a child&lt;br/&gt;to its output, regardless of what games party A is playing.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thanks for the explanation, Jeremy!&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; In terms of relay cost, if an ancestor can be replaced, it will invalidate&lt;br/&gt;&amp;gt; all it&amp;#39;s children, meaning that no one paid for that broadcasting. This can&lt;br/&gt;&amp;gt; be fixed by appropriately assessing Replace By Fee update fees to&lt;br/&gt;&amp;gt; encapsulate all descendants, but there are some tricky edge cases that make&lt;br/&gt;&amp;gt; this non-obvious to do.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Relay cost is the obvious problem with just naively removing all limits.&lt;br/&gt;Relaxing the current rules by allowing to add a child to each output as&lt;br/&gt;long as it has a single unconfirmed parent would still only allow free&lt;br/&gt;relay of O(size of parent) extra data (which might not be that bad? Similar&lt;br/&gt;to the carve-out rule we could put limits on the child size). This would be&lt;br/&gt;enough for the current LN use case (increasing fee of commitment tx), but&lt;br/&gt;not for OP_SECURETHEBAG I guess, as you need the tree of children, as you&lt;br/&gt;mention.&lt;br/&gt;&lt;br/&gt;I imagine walking the mempool wouldn&amp;#39;t change much, as you would only have&lt;br/&gt;one extra child per output. But here I&amp;#39;m just speculating, as I don&amp;#39;t know&lt;br/&gt;the code well enough know what the diff would look like.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; OP_SECURETHEBAG can help with the LN issue by putting all HTLCS into a&lt;br/&gt;&amp;gt; tree where they are individualized leaf nodes with a preceding CSV. Then,&lt;br/&gt;&amp;gt; the above fix would ensure each HTLC always has time to close properly as&lt;br/&gt;&amp;gt; they would have individualized lockpoints. This is desirable for some&lt;br/&gt;&amp;gt; additional reasons and not for others, but it should &amp;#34;work&amp;#34;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This is interesting for an LN commitment! You could really hide every&lt;br/&gt;output of the commitment within OP_STB, which could either allow bypassing&lt;br/&gt;the fee-pinning attack entirely (if the output cannot be spent unconfirmed)&lt;br/&gt;or adding fees to the commitment using SIGHASH_SINGLE|ANYONECANPAY.&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;&lt;br/&gt;On Sun, Oct 27, 2019 at 8:13 PM Jeremy &amp;lt;jlrubin at mit.edu&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Johan,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The issues with mempool limits for OP_SECURETHEBAG are related, but have&lt;br/&gt;&amp;gt; distinct solutions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are two main categories of mempool issues at stake. One is relay&lt;br/&gt;&amp;gt; cost, the other is mempool walking.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In terms of relay cost, if an ancestor can be replaced, it will invalidate&lt;br/&gt;&amp;gt; all it&amp;#39;s children, meaning that no one paid for that broadcasting. This can&lt;br/&gt;&amp;gt; be fixed by appropriately assessing Replace By Fee update fees to&lt;br/&gt;&amp;gt; encapsulate all descendants, but there are some tricky edge cases that make&lt;br/&gt;&amp;gt; this non-obvious to do.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The other issue is walking the mempool -- many of the algorithms we use in&lt;br/&gt;&amp;gt; the mempool can be N log N or N^2 in the number of descendants. (simple&lt;br/&gt;&amp;gt; example: an input chain of length N to a fan out of N outputs that are all&lt;br/&gt;&amp;gt; spent, is O(N^2) to look up ancestors per-child, unless we&amp;#39;re caching).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The other sort of walking issue is where the indegree or outdegree for a&lt;br/&gt;&amp;gt; transaction is high. Then when we are computing descendants or ancestors we&lt;br/&gt;&amp;gt; will need to visit it multiple times. To avoid re-expanding a node, we&lt;br/&gt;&amp;gt; currently cache it with a set. This uses O(N) extra memory and makes O(N&lt;br/&gt;&amp;gt; Log N) (we use std::set not unordered_set) comparisons.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I just opened a PR which should help with some of the walking issues by&lt;br/&gt;&amp;gt; allowing us to cheaply cache which nodes we&amp;#39;ve visited on a run. It makes a&lt;br/&gt;&amp;gt; lot of previously O(N log N) stuff O(N) and doesn&amp;#39;t allocate as much new&lt;br/&gt;&amp;gt; memory. See: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/17268&#34;&gt;https://github.com/bitcoin/bitcoin/pull/17268&lt;/a&gt;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now, for OP_SECURETHEBAG we want a particular property that is very&lt;br/&gt;&amp;gt; different from with lightning htlcs (as is). We want that an unlimited&lt;br/&gt;&amp;gt; number of child OP_SECURETHEBAG txns may extend from a confirmed&lt;br/&gt;&amp;gt; OP_SECURETHEBAG, and then at the leaf nodes, we want the same rule as&lt;br/&gt;&amp;gt; lightning (one dangling unconfirmed to permit channels).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_SECURETHEBAG can help with the LN issue by putting all HTLCS into a&lt;br/&gt;&amp;gt; tree where they are individualized leaf nodes with a preceding CSV. Then,&lt;br/&gt;&amp;gt; the above fix would ensure each HTLC always has time to close properly as&lt;br/&gt;&amp;gt; they would have individualized lockpoints. This is desirable for some&lt;br/&gt;&amp;gt; additional reasons and not for others, but it should &amp;#34;work&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; @JeremyRubin &amp;lt;&lt;a href=&#34;https://twitter.com/JeremyRubin&amp;gt&#34;&gt;https://twitter.com/JeremyRubin&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://twitter.com/JeremyRubin&amp;gt&#34;&gt;https://twitter.com/JeremyRubin&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Fri, Oct 25, 2019 at 10:31 AM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I don’te see how? Let’s imagine Party A has two spendable outputs, now&lt;br/&gt;&amp;gt;&amp;gt; they stuff the package size on one of their spendable outlets until it is&lt;br/&gt;&amp;gt;&amp;gt; right at the limit, add one more on their other output (to meet the&lt;br/&gt;&amp;gt;&amp;gt; Carve-Out), and now Party B can’t do anything.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Oct 24, 2019, at 21:05, Johan Torås Halseth &amp;lt;johanth at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ﻿&lt;br/&gt;&amp;gt;&amp;gt; It essentially changes the rule to always allow CPFP-ing the commitment&lt;br/&gt;&amp;gt;&amp;gt; as long as there is an output available without any descendants. It changes&lt;br/&gt;&amp;gt;&amp;gt; the commitment from &amp;#34;you always need at least, and exactly, one non-CSV&lt;br/&gt;&amp;gt;&amp;gt; output per party. &amp;#34; to &amp;#34;you always need at least one non-CSV output per&lt;br/&gt;&amp;gt;&amp;gt; party. &amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I realize these limits are there for a reason though, but I&amp;#39;m wondering&lt;br/&gt;&amp;gt;&amp;gt; if could relax them. Also now that jeremyrubin has expressed problems with&lt;br/&gt;&amp;gt;&amp;gt; the current mempool limits.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Thu, Oct 24, 2019 at 11:25 PM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I may be missing something, but I&amp;#39;m not sure how this changes anything?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; If you have a commitment transaction, you always need at least, and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; exactly, one non-CSV output per party. The fact that there is a size&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; limitation on the transaction that spends for carve-out purposes only&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; effects how many other inputs/outputs you can add, but somehow I doubt&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; its ever going to be a large enough number to matter.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Matt&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; On 10/24/19 1:49 PM, Johan Torås Halseth wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Reviving this old thread now that the recently released RC for bitcoind&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 0.19 includes the above mentioned carve-out rule.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; In an attempt to pave the way for more robust CPFP of on-chain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; contracts&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; (Lightning commitment transactions), the carve-out rule was added in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/15681&#34;&gt;https://github.com/bitcoin/bitcoin/pull/15681&lt;/a&gt;. However, having worked&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; on&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; an implementation of a new commitment format for utilizing the Bring&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Your Own Fees strategy using CPFP, I’m wondering if the special case&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; rule should have been relaxed a bit, to avoid the need for adding a 1&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; CSV to all outputs (in case of Lightning this means HTLC scripts would&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; need to be changed to add the CSV delay).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Instead, what about letting the rule be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; The last transaction which is added to a package of dependent&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; transactions in the mempool must:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;   * Have no more than one unconfirmed parent.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; This would of course allow adding a large transaction to each output of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; the unconfirmed parent, which in effect would allow an attacker to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; exceed the MAX_PACKAGE_VIRTUAL_SIZE limit in some cases. However, is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; this a problem with the current mempool acceptance code in bitcoind? I&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; would imagine evicting transactions based on feerate when the max&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; mempool size is met handles this, but I’m asking since it seems like&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; there has been several changes to the acceptance code and eviction&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; policy since the limit was first introduced.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; - Johan&lt;br/&gt;&amp;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; On Wed, Feb 13, 2019 at 6:57 AM Rusty Russell &amp;lt;rusty at rustcorp.com.au&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;lt;mailto:rusty at rustcorp.com.au&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Matt Corallo &amp;lt;lf-lists at mattcorallo.com&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;lt;mailto:lf-lists at mattcorallo.com&amp;gt;&amp;gt; writes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&amp;gt; Thus, even if you imagine a steady-state mempool growth,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; unless the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&amp;gt; &amp;#34;near the top of the mempool&amp;#34; criteria is &amp;#34;near the top of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; next&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&amp;gt; block&amp;#34; (which is obviously *not* incentive-compatible)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; I was defining &amp;#34;top of mempool&amp;#34; as &amp;#34;in the first 4 MSipa&amp;#34;, ie.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; next&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; block, and assumed you&amp;#39;d only allow RBF if the old package&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; wasn&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     in the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; top and the replacement would be.  That seems incentive&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     compatible; more&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&amp;gt; than the current scheme?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;gt; My point was, because of block time variance, even that criteria&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     doesn&amp;#39;t hold up. If you assume a steady flow of new transactions&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     one or two blocks come in &amp;#34;late&amp;#34;, suddenly &amp;#34;top 4MWeight&amp;#34; isn&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     likely to get confirmed until a few blocks come in &amp;#34;early&amp;#34;. Given&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     block variance within a 12 block window, this is a relatively&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; likely&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     scenario.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     [ Digging through old mail. ]&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Doesn&amp;#39;t really matter.  Lightning close algorithm would be:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     1.  Give bitcoind unileratal close.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     2.  Ask bitcoind what current expidited fee is (or survey your&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; mempool).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     3.  Give bitcoind child &amp;#34;push&amp;#34; tx at that total feerate.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     4.  If next block doesn&amp;#39;t contain unilateral close tx, goto 2.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     In this case, if you allow a simpified RBF where &amp;#39;you can replace&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; if&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     1. feerate is higher, 2. new tx is in first 4Msipa of mempool, 3.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     old tx isnt&amp;#39;,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     it works.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     It allows someone 100k of free tx spam, sure.  But it&amp;#39;s simple.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     We could further restrict it by marking the unilateral close&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; somehow to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     say &amp;#34;gonna be pushed&amp;#34; and further limiting the child tx weight&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; (say,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     5kSipa?) in that case.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Cheers,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Rusty.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     &amp;lt;mailto:Lightning-dev at lists.linuxfoundation.org&amp;gt;&lt;br/&gt;&amp;gt;&amp;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;&amp;gt; &amp;gt;&lt;br/&gt;&amp;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;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20191028/92777d7b/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20191028/92777d7b/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:21:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsry9qgwgx4xdq5jm5kjc7dxq8cqmr3m0x3l3awxu59wvek34hj6mczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r9775dz4q</id>
    
      <title type="html">📅 Original date posted:2018-05-23 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsry9qgwgx4xdq5jm5kjc7dxq8cqmr3m0x3l3awxu59wvek34hj6mczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r9775dz4q" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr0tq6dcly52jqxdkn22u565a60lm3hmpf87xlypehpruty2g592gw4etpk&#39;&gt;nevent1q…etpk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-23&lt;br/&gt;📝 Original message:Thanks, Jimpo!&lt;br/&gt;&lt;br/&gt;This is very encouraging, I think. I sorta assumed that separating the&lt;br/&gt;elements into their own sub-filters would hurt the compression a lot more.&lt;br/&gt;Can the compression ratio/false positive rate be tweaked with the&lt;br/&gt;sub-filters in mind?&lt;br/&gt;&lt;br/&gt;With the total size of the separated filters being no larger than the&lt;br/&gt;combined filters, I see no benefit of combined filters? Committing to them&lt;br/&gt;all in the headers would also save space, and we could ensure nodes are&lt;br/&gt;serving all sub-filters.&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;&lt;br/&gt;On Wed, May 23, 2018 at 9:38 AM, Jim Posen &amp;lt;jim.posen at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; So I checked filter sizes (as a proportion of block size) for each of the&lt;br/&gt;&amp;gt; sub-filters. The graph is attached.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As interpretation, the first ~120,000 blocks are so small that the&lt;br/&gt;&amp;gt; Golomb-Rice coding can&amp;#39;t compress the filters that well, which is why the&lt;br/&gt;&amp;gt; filter sizes are so high proportional to the block size. Except for the&lt;br/&gt;&amp;gt; input filter, because the coinbase input is skipped, so many of them have 0&lt;br/&gt;&amp;gt; elements. But after block 120,000 or so, the filter compression converges&lt;br/&gt;&amp;gt; pretty quickly to near the optimal value. The encouraging thing here is&lt;br/&gt;&amp;gt; that if you look at the ratio of the combined size of the separated filters&lt;br/&gt;&amp;gt; vs the size of a filter containing all of them (currently known as the&lt;br/&gt;&amp;gt; basic filter), they are pretty much the same size. The mean of the ratio&lt;br/&gt;&amp;gt; between them after block 150,000 is 99.4%. So basically, not much&lt;br/&gt;&amp;gt; compression efficiently is lost by separating the basic filter into&lt;br/&gt;&amp;gt; sub-filters.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, May 22, 2018 at 5:42 PM, Jim Posen &amp;lt;jim.posen at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; My suggestion was to advertise a bitfield for each filter type the node&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; serves,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; where the bitfield indicates what elements are part of the filters. This&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; essentially&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; removes the notion of decided filter types and instead leaves the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; decision to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; full-nodes.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think it makes more sense to construct entirely separate filters for&lt;br/&gt;&amp;gt;&amp;gt; the different types of elements and allow clients to download only the ones&lt;br/&gt;&amp;gt;&amp;gt; they care about. If there are enough elements per filter, the compression&lt;br/&gt;&amp;gt;&amp;gt; ratio shouldn&amp;#39;t be much worse by splitting them up. This prevents the&lt;br/&gt;&amp;gt;&amp;gt; exponential blowup in the number of filters that you mention, Johan, and it&lt;br/&gt;&amp;gt;&amp;gt; works nicely with service bits for advertising different filter types&lt;br/&gt;&amp;gt;&amp;gt; independently.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; So if we created three separate filter types, one for output scripts, one&lt;br/&gt;&amp;gt;&amp;gt; for input outpoints, and one for TXIDs, each signaled with a separate&lt;br/&gt;&amp;gt;&amp;gt; service bit, are people good with that? Or do you think there shouldn&amp;#39;t be&lt;br/&gt;&amp;gt;&amp;gt; a TXID filter at all, Matt? I didn&amp;#39;t include the option of a prev output&lt;br/&gt;&amp;gt;&amp;gt; script filter or rolling that into the block output script filter because&lt;br/&gt;&amp;gt;&amp;gt; it changes the security model (cannot be proven to be correct/incorrect&lt;br/&gt;&amp;gt;&amp;gt; succinctly).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Then there&amp;#39;s the question of whether to separate or combine the headers.&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;d lean towards keeping them separate because it&amp;#39;s simpler that way.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180523/7df6715a/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180523/7df6715a/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw8exvz35whg54wr82v7vxpp3n7lhgtkmg7rz7eujt3du5hmz2klczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97rthaan</id>
    
      <title type="html">📅 Original date posted:2018-05-22 📝 Original message:Maybe ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw8exvz35whg54wr82v7vxpp3n7lhgtkmg7rz7eujt3du5hmz2klczyqyxd2wla952ec4peu307g89x35ys2qcfca98qsjmhdw92amg9r97rthaan" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsddhd0dkf27zhnangn5j6h9w6eurje5g9dzqjwaygxxdquvuas8fg8cgmyq&#39;&gt;nevent1q…gmyq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-22&lt;br/&gt;📝 Original message:Maybe I didn&amp;#39;t make it clear, but the distinction is that the current track&lt;br/&gt;allocates&lt;br/&gt;one service bit for each &amp;#34;filter type&amp;#34;, where it has to be agreed upon up&lt;br/&gt;front what&lt;br/&gt;elements such a filter type contains.&lt;br/&gt;&lt;br/&gt;My suggestion was to advertise a bitfield for each filter type the node&lt;br/&gt;serves,&lt;br/&gt;where the bitfield indicates what elements are part of the filters. This&lt;br/&gt;essentially&lt;br/&gt;removes the notion of decided filter types and instead leaves the decision&lt;br/&gt;to&lt;br/&gt;full-nodes.&lt;br/&gt;&lt;br/&gt;This would require a &amp;#34;getcftypes&amp;#34; message, of course.&lt;br/&gt;&lt;br/&gt;- Johan&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, May 22, 2018 at 3:16 AM, Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; What if instead of trying to decide up front which subset of elements&lt;br/&gt;&amp;gt; will&lt;br/&gt;&amp;gt; &amp;gt; be most useful to include in the filters, and the size tradeoff, we let&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt; full-node decide which subsets of elements it serves filters for?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is already the case. The current &amp;#34;track&amp;#34; is to add new service bits&lt;br/&gt;&amp;gt; (while we&amp;#39;re in the uncommitted phase) to introduce new fitler types. Light&lt;br/&gt;&amp;gt; clients can then filter out nodes before even connecting to them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Mon, May 21, 2018 at 1:35 AM Johan Torås Halseth &amp;lt;johanth at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Most light wallets will want to download the minimum amount of data&lt;br/&gt;&amp;gt;&amp;gt; required to operate, which means they would ideally download the smallest&lt;br/&gt;&amp;gt;&amp;gt; possible filters containing the subset of elements they need.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What if instead of trying to decide up front which subset of elements&lt;br/&gt;&amp;gt;&amp;gt; will be most useful to include in the filters, and the size tradeoff, we&lt;br/&gt;&amp;gt;&amp;gt; let the full-node decide which subsets of elements it serves filters for?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; For instance, a full node would advertise that it could serve filters for&lt;br/&gt;&amp;gt;&amp;gt; the subsets 110 (txid&#43;script&#43;outpoint), 100 (txid only), 011 (script&#43;outpoint)&lt;br/&gt;&amp;gt;&amp;gt; etc. A light client could then choose to download the minimal filter type&lt;br/&gt;&amp;gt;&amp;gt; covering its needs.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The obvious benefit of this would be minimal bandwidth usage for the&lt;br/&gt;&amp;gt;&amp;gt; light client, but there are also some less obvious ones. We wouldn’t have&lt;br/&gt;&amp;gt;&amp;gt; to decide up front what each filter type should contain, only the possible&lt;br/&gt;&amp;gt;&amp;gt; elements a filter can contain (more can be added later without breaking&lt;br/&gt;&amp;gt;&amp;gt; existing clients). This, I think, would let the most served filter types&lt;br/&gt;&amp;gt;&amp;gt; grow organically, with full-node implementations coming with sane defaults&lt;br/&gt;&amp;gt;&amp;gt; for served filter types (maybe even all possible types as long as the&lt;br/&gt;&amp;gt;&amp;gt; number of elements is small), letting their operator add/remove types at&lt;br/&gt;&amp;gt;&amp;gt; will.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The main disadvantage of this as I see it, is that there’s an exponential&lt;br/&gt;&amp;gt;&amp;gt; blowup in the number of possible filter types in the number of element&lt;br/&gt;&amp;gt;&amp;gt; types. However, this would let us start out small with only the elements we&lt;br/&gt;&amp;gt;&amp;gt; need, and in the worst case the node operators just choose to serve the&lt;br/&gt;&amp;gt;&amp;gt; subsets corresponding to what now is called “regular” &#43; “extended” filters&lt;br/&gt;&amp;gt;&amp;gt; anyway, requiring no more resources.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This would also give us some data on what is the most widely used filter&lt;br/&gt;&amp;gt;&amp;gt; types, which could be useful in making the decision on what should be part&lt;br/&gt;&amp;gt;&amp;gt; of filters to eventually commit to in blocks.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; - Johan&lt;br/&gt;&amp;gt;&amp;gt; On Sat, May 19, 2018 at 5:12, Olaoluwa Osuntokun via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Thu, May 17, 2018 at 2:44 PM Jim Posen via bitcoin-dev &amp;lt;bitcoin-&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Monitoring inputs by scriptPubkey vs input-txid also has a massive&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; advantage for parallel filtering: You can usually known your pubkeys&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; well in advance, but if you have to change what you&amp;#39;re watching block&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; N&#43;1 for based on the txids that paid you in N you can&amp;#39;t filter them&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; in parallel.&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, I&amp;#39;ll grant that this is a benefit of your suggestion.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yeah parallel filtering would be pretty nice. We&amp;#39;ve implemented a serial&lt;br/&gt;&amp;gt;&amp;gt; filtering for btcwallet [1] for the use-case of rescanning after a seed&lt;br/&gt;&amp;gt;&amp;gt; phrase import. Parallel filtering would help here, but also we don&amp;#39;t yet&lt;br/&gt;&amp;gt;&amp;gt; take advantage of batch querying for the filters themselves. This would&lt;br/&gt;&amp;gt;&amp;gt; speed up the scanning by quite a bit.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I really like the filtering model though, it really simplifies the code,&lt;br/&gt;&amp;gt;&amp;gt; and we can leverage identical logic for btcd (which has RPCs to fetch the&lt;br/&gt;&amp;gt;&amp;gt; filters) as well.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1]: &lt;a href=&#34;https://github.com/Roasbeef/btcwallet/blob/master/chain/&#34;&gt;https://github.com/Roasbeef/btcwallet/blob/master/chain/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; neutrino.go#L180&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________ bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org &lt;a href=&#34;https://lists.linuxfoundation&#34;&gt;https://lists.linuxfoundation&lt;/a&gt;.&lt;br/&gt;&amp;gt;&amp;gt; org/mailman/listinfo/bitcoin-dev&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180522/cdeb1da6/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180522/cdeb1da6/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:14&#43;02:00</updated>
  </entry>

</feed>