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




  <entry>
    <id>https://nostr.ae/nevent1qqs8ga0whvcljfjd7x4u2mqkg9xm2ua9c354uezn0s7vglycmd4w5eqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4vqj09</id>
    
      <title type="html">📅 Original date posted:2023-09-10 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8ga0whvcljfjd7x4u2mqkg9xm2ua9c354uezn0s7vglycmd4w5eqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4vqj09" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsddykxvk4g7ne6ca9qhst8qp0ns5vzep3w7xwv9vh25k74ph5ny7qeskzvp&#39;&gt;nevent1q…kzvp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-10&lt;br/&gt;🗒️ Summary of this message: There is a tradeoff between trust and capital efficiency when it comes to UTXOs and lightning updates. If a user cheats, it can result in a large number of on-chain transactions. The impact of these transactions depends on the timeframe and can affect fees. Users can calculate the number of transactions based on their desired timeframe and adjust their rollover accordingly. This reduces the capital efficiency for the user who cheated. Casual users cannot easily reduce their timeout by splitting into different UTXOs.&lt;br/&gt;📝 Original message:&lt;br/&gt;On Fri, Sep 08, 2023 at 06:54:46PM &#43;0000, jlspc via Lightning-dev wrote:&lt;br/&gt;&amp;gt; TL;DR&lt;br/&gt;&amp;gt; =====&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t really digested this, but I think there&amp;#39;s a trust vs&lt;br/&gt;capital-efficiency tradeoff here that&amp;#39;s worth extracting.&lt;br/&gt;&lt;br/&gt;Suppose you have a single UTXO, that&amp;#39;s claimable by &amp;#34;B&amp;#34; at time T&#43;L,&lt;br/&gt;but at time T that UTXO holds funds belonging not only to B, but also&lt;br/&gt;millions of casual users, C_1..C_1000000. If B cheats (eg by not signing&lt;br/&gt;any further lightning updates between now and time T&#43;L), then each&lt;br/&gt;casual user needs to drop their channel to the chain, or else lose all&lt;br/&gt;their funds. (Passive rollovers doesn&amp;#39;t change this -- it just moves the&lt;br/&gt;responsibility for dropping the channel to the chain to some other&lt;br/&gt;participant)&lt;br/&gt;&lt;br/&gt;That then faces the &amp;#34;thundering herd&amp;#34; problem -- instead of the single&lt;br/&gt;one-in/one-out tx that we expected when B is doing the right thing,&lt;br/&gt;we&amp;#39;re instead seeing between 1M and 2M on-chain txs as everyone recovers&lt;br/&gt;their funds (the number of casual users multiplied by some factor that&lt;br/&gt;depends on how many outputs each internal tx has).&lt;br/&gt;&lt;br/&gt;But whether an additional couple of million txs is a problem depends&lt;br/&gt;on how long a timeframe they&amp;#39;re spread over -- if it&amp;#39;s a day or two,&lt;br/&gt;then it might simply be impossible; if it&amp;#39;s over a year or more, it&lt;br/&gt;may not even be noticable; if it&amp;#39;s somewhere in between, it might just&lt;br/&gt;mean you&amp;#39;re paying a modest amount in additional fees than you&amp;#39;d have&lt;br/&gt;normally expected.&lt;br/&gt;&lt;br/&gt;Suppose that casual users have a factor in mind, eg &amp;#34;If worst comes to&lt;br/&gt;worst, and everyone decides to exit at the same time I do, I want to be&lt;br/&gt;sure that only generates 100 extra transactions per block if everyone&lt;br/&gt;wants to recover their funds prior to B being able to steal everything&amp;#34;.&lt;br/&gt;&lt;br/&gt;Then in that case, they can calculate along the following lines: 1M users&lt;br/&gt;with 2-outputs per internal tx means 2M transactions, divide that by 100&lt;br/&gt;gives 20k blocks, at 144 blocks per day, that&amp;#39;s 5 months. Therefore,&lt;br/&gt;I&amp;#39;m going to ensure all my funds are rolled over to a new utxo while&lt;br/&gt;there&amp;#39;s at least 5 months left on the timeout.&lt;br/&gt;&lt;br/&gt;That lowers B&amp;#39;s capital efficiency -- if all the causal users follow&lt;br/&gt;that policy, then B is going to own all the funds in Fx for five whole&lt;br/&gt;months before it can access them. So each utxo here has its total&lt;br/&gt;lifetime (L) actually split into two phases: an active lifetime LA of&lt;br/&gt;some period, and an inactive lifetime of LI=5 months, which would have&lt;br/&gt;been used by everyone to recover their funds if B had attempted to block&lt;br/&gt;normal rollover. The capital efficiency is then reduced by a factor of&lt;br/&gt;1/(1&#43;LA/LI). (LI is dependent on the number of users, their willingness&lt;br/&gt;to pay high fees to recover their funds, and global blockchain capacity,&lt;br/&gt;LA is L-LI, L is your choice)&lt;br/&gt;&lt;br/&gt;Note that casual users can&amp;#39;t easily reduce their LI timeout just by&lt;br/&gt;having the provider split them into different utxos -- if the provider&lt;br/&gt;cheats/fails, that&amp;#39;s almost certainly a correlated across all their&lt;br/&gt;utxos, and all the participants across each of those utxos will need&lt;br/&gt;to drop to the chain to preserve their funds, each competing with each&lt;br/&gt;other for confirmation.&lt;br/&gt;&lt;br/&gt;Also, if different providers collude, they can cause problems: if you&lt;br/&gt;expected 2M transactions over five months due to one provider failing,&lt;br/&gt;that&amp;#39;s one thing; but if a dozen providers fail simultaneously, then that&lt;br/&gt;balloons up to perhaps 24M txs over the same five months, or perhaps 25%&lt;br/&gt;of every block, which may be quite a different matter.&lt;br/&gt;&lt;br/&gt;Ignoring that caveat, what do numbers here look like? If you&amp;#39;re a provider&lt;br/&gt;who issues a new utxo every week (so new customers can join without too&lt;br/&gt;much delay), have a million casual users as customers, and target LA=16&lt;br/&gt;weeks (~3.5 months), so users don&amp;#39;t need to rollover too frequently,&lt;br/&gt;and each user has a balanced channel with $2000 of their own funds,&lt;br/&gt;and $2000 of your funds, so they can both pay and be paid, then your&lt;br/&gt;utxos might look like:&lt;br/&gt;&lt;br/&gt;   active_1 through active_16: 62,500 users each; $250M balance each&lt;br/&gt;   inactive_17 through inactive_35: $250M balance each, all your funds,&lt;br/&gt;      waiting for timeout to be usable&lt;br/&gt;&lt;br/&gt;That&amp;#39;s:&lt;br/&gt;  * $2B of user funds&lt;br/&gt;  * $2B of your funds in active channels&lt;br/&gt;  * $4.5B of your funds locked up, waiting for timeout&lt;br/&gt;&lt;br/&gt;In that case, only 30% of the $6.5B worth of working capital that you&amp;#39;ve&lt;br/&gt;dedicated to lightning is actually available for routing.&lt;br/&gt;&lt;br/&gt;Optimising that formula by making LA as large as possible doesn&amp;#39;t&lt;br/&gt;necessarily work -- if a casual user spends all their funds and&lt;br/&gt;disappears prior to the active lifetime running out, then those&lt;br/&gt;funds can&amp;#39;t be easily spent by B until the total lifetime runs out,&lt;br/&gt;so depending on how persistent your casual users are, I think that&amp;#39;s&lt;br/&gt;another way of ending up with your capital locked up unproductively.&lt;br/&gt;(There are probably ways around this with additional complexity: eg,&lt;br/&gt;you could peer with a dedicated node, and have the timeout path be&lt;br/&gt;&amp;#34;you&#43;them&#43;timeout&amp;#34;, so that while you could steal from casual users who&lt;br/&gt;don&amp;#39;t rollover, you can&amp;#39;t steal from your dedicated peer, so that $4.5B&lt;br/&gt;could be rolled into a channel with them, and used for routing)&lt;br/&gt;&lt;br/&gt;You could perhaps also vary the timeout at different layers of the&lt;br/&gt;internal tree -- if you have 500k users with a $10 balance, and give them&lt;br/&gt;a timeout of 16 weeks, and give the remaining 500k with an average $2000&lt;br/&gt;balance a timeout of 26 weeks, then each will calculate LI=10 weeks,&lt;br/&gt;and the $10 folks will rollover at 1.5 months, and the remainder will&lt;br/&gt;rollover at about 4 months; but your idle balance will be $5M for 20&lt;br/&gt;weeks plus $1B for 10 weeks, rather than $1.005B for 20 weeks.&lt;br/&gt;&lt;br/&gt;Anyway, I think that&amp;#39;s an interesting way of capturing a big concern&lt;br/&gt;with this sort of approach (namely, &amp;#34;what happens if the nice, scalable&lt;br/&gt;path doesn&amp;#39;t work, and we have to dump *LOTS* of stuff onchain&amp;#34;) in a&lt;br/&gt;measurable way.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-09-12T10:59:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgqzmu5nggpaatl5nng3a7yw8dxs0f77jp0cpp6y0yndmclvfsjfczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k70wuf7</id>
    
      <title type="html">📅 Original date posted:2023-04-03 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgqzmu5nggpaatl5nng3a7yw8dxs0f77jp0cpp6y0yndmclvfsjfczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k70wuf7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvzyhgvf8zscrr4llcvhyruajxdsjqst4geyym9rtyg8jk59w8yus6fy0xe&#39;&gt;nevent1q…y0xe&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-03&lt;br/&gt;🗒️ Summary of this message: A new construction called tunable penalties has been introduced for 2-party lightning channels, allowing for layered commit transactions and preventing loss of funds due to cheating.&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sat, Mar 18, 2023 at 12:41:00AM &#43;0000, jlspc via Lightning-dev wrote:&lt;br/&gt;&amp;gt; TL;DR&lt;br/&gt;&lt;br/&gt;Even with Harding&amp;#39;s optech write ups, and the optech space, I barely&lt;br/&gt;follow all this, so I&amp;#39;m going to try explaining it too as a way of&lt;br/&gt;understanding it myself; hopefully maybe that helps someone. Corrections&lt;br/&gt;welcome, obviously!&lt;br/&gt;&lt;br/&gt;I think understanding all this requires going through each of the four&lt;br/&gt;steps.&lt;br/&gt;&lt;br/&gt;Step 1: Tunable penalties;&lt;br/&gt;  &lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This is a clever constructions that lets you do a 2-party lightning&lt;br/&gt;channel with existing opcodes where cheating doesn&amp;#39;t result in you&lt;br/&gt;losing all your funds (or, in fact, any of your in-channel funds). It&lt;br/&gt;also retains the ability to do layered commit transactions, that is you can&lt;br/&gt;immediately commit to claiming an HTLC or that it&amp;#39;s already timed out,&lt;br/&gt;even while you&amp;#39;re waiting for the to_self_delay to expire to ensure&lt;br/&gt;you&amp;#39;re not cheating.&lt;br/&gt;&lt;br/&gt;The way that it works is by separating the flow of channels funds, from&lt;br/&gt;the control flow. So instead of managing the channel via a single utxo,&lt;br/&gt;we instead manage it via 3 utxos: F (the channel funds), InA (control&lt;br/&gt;flow for a unilateral close by A), InB (control flow for a unilateral&lt;br/&gt;close by B).&lt;br/&gt;&lt;br/&gt;For each update to a new state &amp;#34;i&amp;#34;, which has &amp;#34;k&amp;#34; HTLCs, we create 4 primary txs, and 8k HTLC claims.&lt;br/&gt;&lt;br/&gt;  StAi which spends InA, and has k&#43;1 outputs. The first output is used&lt;br/&gt;  for controlling broadcast of the commitment tx, the remaining k are for&lt;br/&gt;  controlling the resolution of each HTLC.&lt;br/&gt;&lt;br/&gt;  ComAi is the commitment for the state. It spends the funding output&lt;br/&gt;  F, and the first output of StAi. In order to spend StAi, it requires&lt;br/&gt;  a to_self_delay (and signature by A), giving B time to object that i&lt;br/&gt;  is a revoked state. If B does object, he is able to immediately spend&lt;br/&gt;  the first output of StAi directly using the revocation information,&lt;br/&gt;  and these funds form the penalty. It has k&#43;2 outputs, one for the&lt;br/&gt;  balance of each participant, and one for each HTLC.&lt;br/&gt;&lt;br/&gt;  For each of the k HTLCs, we construct two success and two timeout&lt;br/&gt;  transactions: (HAi-j-s, HAi-j-p); (HAi-j-t, HAi-j-r). HAi-j-s and&lt;br/&gt;  HAi-j-t both spend the jth output of StAi, conditional either on a&lt;br/&gt;  preimage reveal or a timeout respectively; HAi-j-p and HAi-j-r spend&lt;br/&gt;  the output of HAi-j-s and HAi-j-t respectively, as well as the output&lt;br/&gt;  of ComAi. (s=success commitment, t=timeout commitment, p=payment on&lt;br/&gt;  success, r=refund)&lt;br/&gt;&lt;br/&gt;  And Bob has similar versions of all of these.&lt;br/&gt;&lt;br/&gt;So if Alice is honest, the process is:&lt;br/&gt;&lt;br/&gt;  * Alice publishes StAi&lt;br/&gt;  * Alice publishes HAi-j-{s,t} for any HTLCs she is able to resolve&lt;br/&gt;    immediately; as does Bob.&lt;br/&gt;  * Alice waits for to_self_delay to complete&lt;br/&gt;  * Alice publishes ComAi, and any HAi-j-{r,p} transactions she is able&lt;br/&gt;    to, and if desired consolidates her funds.&lt;br/&gt;  * As any remaining HTLCs resolve, those are also claimed.&lt;br/&gt;  * Bob&amp;#39;s InB output is available to do whatever he wants with.&lt;br/&gt;&lt;br/&gt;If Alice is dishonest, the process is:&lt;br/&gt;&lt;br/&gt;  * Alice publishes StAi, and perhaps publishes some HAi-j-{s,t}&lt;br/&gt;    transactions.&lt;br/&gt;  * Bob spends the first output of StAi unilaterally claiming the&lt;br/&gt;  * penalty, meaning ComAi can now never be confirmed.&lt;br/&gt;  * Bob publishes StBi&amp;#39;, and continues with the honest protocol.&lt;br/&gt;&lt;br/&gt;Bob only needs the usual O(log(n)) state in order to be able to&lt;br/&gt;reconstruct the key to spend the first output of revoked StAi txs.&lt;br/&gt;Because that prevents the corresponding ComAi from ever being published,&lt;br/&gt;no revoked HTLC-related state can make it on chain in any way that Bob&lt;br/&gt;needs to care about.&lt;br/&gt;&lt;br/&gt;If both Alice and Bob are dishonest (Alice tries to cheat, but Bob&lt;br/&gt;restored from an old backup and also publishes a revoked state) then&lt;br/&gt;both the StAi and StBi&amp;#39; may have their first output claimed by the other&lt;br/&gt;party, in which case the channels funds are lost (unless Alice and Bob&lt;br/&gt;manage to agree to a cooperative close somehow, even after all the&lt;br/&gt;attempts to cheat each other).&lt;br/&gt;&lt;br/&gt;While 4&#43;8k transactions per state is a lot, I think you only actually&lt;br/&gt;need 2&#43;4k signatures in advance (StAi and HAi-j-{s,t} only need to be&lt;br/&gt;signed when they&amp;#39;re broadcast). Perhaps using ANYPREVOUT would let you&lt;br/&gt;reduce the number of HTLC states?&lt;br/&gt;&lt;br/&gt;Step 2: Efficient Factories for Lightning Channels&lt;br/&gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-January/003827.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-January/003827.html&lt;/a&gt;&lt;br/&gt; &lt;a href=&#34;https://github.com/JohnLaw2/ln-efficient-factories&#34;&gt;https://github.com/JohnLaw2/ln-efficient-factories&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This generalizes the tunable penalties setup for more than two&lt;br/&gt;participants.&lt;br/&gt;&lt;br/&gt;The first part of this is a straightforward generalisation, and&lt;br/&gt;doesn&amp;#39;t cover HTLCs. Where we had 2(2&#43;4k) transactions previously, we&lt;br/&gt;presumably would now have P(2&#43;4k) transactions, where P is the number&lt;br/&gt;of participants.&lt;br/&gt;&lt;br/&gt;The second part of this aims to avoid that factor P. It does this by&lt;br/&gt;introducing Trigger and Mold transactions.&lt;br/&gt;&lt;br/&gt;To do this, we first establish the number of states that the factory&lt;br/&gt;will support; perhaps 2**40. In that case, the trigger transaction will&lt;br/&gt;spend the funding tx, and have 40&#43;1 outputs. All of them will require a&lt;br/&gt;P-of-P signature to be spend, with the first also requiring a relative&lt;br/&gt;timelock of 3*to_self_delay and containing the channel funds, while the&lt;br/&gt;rest contain dust-ish amounts.&lt;br/&gt;&lt;br/&gt;For any given state i, we represent i as a binary number, and the&lt;br/&gt;commitment tx Com_i will spend the outputs corresponding to &amp;#34;0&amp;#34; in&lt;br/&gt;the binary number, as well as the first output containing the channel&lt;br/&gt;funds.&lt;br/&gt;&lt;br/&gt;We will also have St{A..Z}_i transactions, spending In{A..Z} as&lt;br/&gt;previously. The sole output of StAi (etc) will be spent either by any&lt;br/&gt;other participant via a revoked pubkey, or else by the Mold{A..Z}_i&lt;br/&gt;transaction. The Mold{A..Z}_i transaction will also spend the remaining&lt;br/&gt;outputs of the Trigger transaction that were not spent by Com_i.&lt;br/&gt;&lt;br/&gt;In the honest scenario, this looks like:&lt;br/&gt;&lt;br/&gt; * Alice publishes Trigger&lt;br/&gt; * Alice publishes StA_i&lt;br/&gt; * Alice waits to_self_delay&lt;br/&gt; * Alice publishes MoldA_i&lt;br/&gt; * Alice waits an additional 2*to_self_delay&lt;br/&gt; * Alice publishes Com_i&lt;br/&gt; * Alice and everyone else claims their funds&lt;br/&gt;&lt;br/&gt;There are various dishonest scenarios available:&lt;br/&gt;&lt;br/&gt; * If Alice publishes StA_i before publishing the Trigger, someone else&lt;br/&gt;   publishes the Trigger.&lt;br/&gt;&lt;br/&gt; * If Alice doesn&amp;#39;t publish StA_i quickly, Bob publishes StB_i&lt;br/&gt;   and continues. If multiple St{A..Z}_i&amp;#39;s are published, whoever does&lt;br/&gt;   not publish the Mold transaction simply reclaims their funds by the&lt;br/&gt;   &amp;#34;revocation&amp;#34; path.&lt;br/&gt;&lt;br/&gt; * If Alice publishes an old StA_i, Bob claims the funds using the&lt;br/&gt;   revoked key, penalising A, and then publishes the correct StB_i,&lt;br/&gt;   and continues.&lt;br/&gt;&lt;br/&gt; * If Alice does not publish MoldA_i, Bob can publish StB_i and MoldB_i.&lt;br/&gt;&lt;br/&gt; * Once MoldB_i is confirmed, someone could attempt to broadcast an&lt;br/&gt;   outdated Com_i&amp;#39; where i&amp;#39; &amp;lt; i. In that case, the outputs corresponding&lt;br/&gt;   to all the 1&amp;#39;s in the binary representation of i are already spent&lt;br/&gt;   (by MoldB_i), but for any i&amp;#39; &amp;lt; i, the i&amp;#39; necessarily has a 0 somewhere&lt;br/&gt;   where i had a 1 (otherwise i&amp;#39; &amp;gt;= i), so Com_i&amp;#39; would be double spending&lt;br/&gt;   an input already spent by MoldB_i.&lt;br/&gt;&lt;br/&gt;In this case, you need to track P&#43;1 outputs (F&#43;InA..Z), you need&lt;br/&gt;O(P*log(N)) state, and the onchain impact of a unilateral close is ideally&lt;br/&gt;4 transactions (Trigger, StAi, MoldAi, Comi) with size O(log(MaxN)),&lt;br/&gt;but maybe be up to 2*P&#43;2 transactions (Trigger, St{A..Z}i, MoldAi,&lt;br/&gt;refund{B..Z}i, Comi).&lt;br/&gt;&lt;br/&gt;Note that this doesn&amp;#39;t consider HTLCs at all.&lt;br/&gt;&lt;br/&gt;Step 3: Factory Optimized protocols for Lighting&lt;br/&gt; &lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&lt;/a&gt;&lt;br/&gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&lt;/a&gt;&lt;br/&gt; &lt;a href=&#34;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&#34;&gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps this should have been step 2, whoopsie. Anyway, this optimises&lt;br/&gt;the construction in step 1 for channels included in factories; mostly&lt;br/&gt;to deal with the fact that closing a factory is tedious and can take a&lt;br/&gt;while. I&amp;#39;m ignoring the Partial-Factory-Optimized step -- it&amp;#39;s barely&lt;br/&gt;different to the Tunable Penalty mechanism. The Fully Factory Optimized&lt;br/&gt;protocol is more interesting.&lt;br/&gt;&lt;br/&gt;The main idea here is this: if a channel in a factory goes defunct while&lt;br/&gt;an HTLC is pending, we&amp;#39;d like to be able to guarantee we&amp;#39;ve resolved&lt;br/&gt;the HTLC to our satisfaction while deferring the decision of whether&lt;br/&gt;to shutdown the entire factory in order to close the channel, just&lt;br/&gt;in case our channel partner eventually comes back, and we can resolve&lt;br/&gt;everything properly.&lt;br/&gt;&lt;br/&gt;The way we do that is twofold: first, we set things up so that the default&lt;br/&gt;resolution of an HTLC is a refund. That immediately does away with half&lt;br/&gt;of our HTLC transactions, because now we only need the success/payment&lt;br/&gt;paths, not the timeout/refund ones. Second, we require whoever&amp;#39;s&lt;br/&gt;going to receive the payment to publish their StXi transaction -- that&lt;br/&gt;avoids us having to do P*k success/payment paths, now we only need 1*k&lt;br/&gt;success/payment paths.  Unfortunately, we do introduce a new &amp;#34;kickoff&amp;#34;&lt;br/&gt;transaction to make it a three transaction kickoff/success/payment path,&lt;br/&gt;rather than just two transactions.&lt;br/&gt;&lt;br/&gt;In this case your transactions are:&lt;br/&gt;&lt;br/&gt;  F - the funding output, only available once the factory is closed&lt;br/&gt;  InB - as before&lt;br/&gt;  StBi - your state commitment, one output that will be spent by ComBi,&lt;br/&gt;         k outputs for each pending HTLC paying to B in state i.&lt;br/&gt;  HBi-j-k - the kickoff transaction for HTLC &amp;#34;j&amp;#34; paying to B, spends&lt;br/&gt;         the appropriate output of StBi, conditional on revealing the&lt;br/&gt;	 HTLC preimage and B&amp;#39;s signature. Spendable either by B after&lt;br/&gt;	 to-self-delay, or by A after the HTLC&amp;#39;s expiry plus&lt;br/&gt;	 to-self-delay&lt;br/&gt;  HBi-j-s - the success transaction, spendable by B&lt;br/&gt;  HBi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;         from ComB_i&lt;br/&gt;  HAi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;         from ComA_i&lt;br/&gt;&lt;br/&gt;I think there&amp;#39;s an error in the paper here; it says as well as being&lt;br/&gt;spendable by H{A,B}i-j-p as above, the HTLC output in ComA_i should be&lt;br/&gt;spendable by A after to-self-delay. I believe it should require both&lt;br/&gt;to-self-delay (relative timelock) and the HTLC expiry (absolute timelock)&lt;br/&gt;before it can be spendable by A.&lt;br/&gt;&lt;br/&gt;Anyway, how&amp;#39;s that work? If you want to shut the factory down&lt;br/&gt;immediately, it looks like:&lt;br/&gt;&lt;br/&gt; * Shut the factory down&lt;br/&gt; * Broadcast StBi, HBi-j-k&lt;br/&gt; * Wait to-self-delay&lt;br/&gt; * Broadcast ComBi, HBi-j-s, HBi-j-p&lt;br/&gt; * Done!&lt;br/&gt;&lt;br/&gt;If you were cheating, then:&lt;br/&gt;&lt;br/&gt; * Alice steals StBi&amp;#39;s first output if i was on old state, and ComBi&lt;br/&gt;   cannot be broadcast. Alice publishes the current StAi&amp;#39;, ComAi&amp;#39;, etc.&lt;br/&gt; &lt;br/&gt; * If the HTLC had timed out, Alice claims the output of HBi-j-k before&lt;br/&gt;   to-self-delay is finished, so that HBi-j-p cannot be broadcast, then&lt;br/&gt;   claims the output of ComBi once both timeouts are complete.&lt;br/&gt;&lt;br/&gt;However, what if you don&amp;#39;t want to shut the factory down? In that&lt;br/&gt;case:&lt;br/&gt;&lt;br/&gt; * Broadcast StBi, HBi-j-k.&lt;br/&gt; * Wait for to_self_delay.&lt;br/&gt; * Spend HBi-j-k to HBi-j-s.&lt;br/&gt; * Wait some more.&lt;br/&gt; * The other guy comes online! Let&amp;#39;s recover the channel!&lt;br/&gt; * Propose spending the first output of StBi and the output of HBi-j-s&lt;br/&gt;   to a new InB2, but don&amp;#39;t sign it.&lt;br/&gt; * Update all the off-chain channel data to a new state i&#43;1 that uses&lt;br/&gt;   InB2 instead of InB, and that acknowledges your claim to the HTLC&lt;br/&gt;   funds.&lt;br/&gt; * Sign and broadcast InB2&lt;br/&gt; * Continue &lt;br/&gt;&lt;br/&gt;If the other guy doesn&amp;#39;t come online, you close the factory, immediately&lt;br/&gt;spend F and the first output of StBi via ComBi, and immediately spend&lt;br/&gt;HBi-j-s and the HTLC output of ComBi to claim your funds.&lt;br/&gt;&lt;br/&gt;While this is described as an optimisation focussed on improving channels&lt;br/&gt;within factories; it seems to me that the reduction in state compared to&lt;br/&gt;the &amp;#34;tunable penalties&amp;#34; approach in step 1 makes this a strict improvement&lt;br/&gt;in general.&lt;br/&gt;&lt;br/&gt;Anyway, combining this step and the previous gives us an idea how to do&lt;br/&gt;both factories and HTLCs. I believe that would look like:&lt;br/&gt;&lt;br/&gt; Factory funding output -- multisig of A..Z&lt;br/&gt; Factory In{A..Z}&lt;br/&gt;&lt;br/&gt; Factory Trigger, spends the funding output&lt;br/&gt; Factory St{A..Z}i spends In{A..Z}&lt;br/&gt; Factory Mold{A..Z}i spends St{A..Z}i and various Trigger outputs&lt;br/&gt; Factory Com_i spends the other Trigger outputs; its outputs are the&lt;br/&gt;   channels in the factory.&lt;br/&gt;&lt;br/&gt; Channel F_x - an output of the Factory Com_i&lt;br/&gt; Channel InA, InB&lt;br/&gt; Channel StAi, StBi -- spends InA/InB&lt;br/&gt; Channel ComAi, ComBi -- spends F_x and the first output of StA/StB&lt;br/&gt; Channel H{A,B}i_j_{k,s,p} -- success path funds for active HTLCs&lt;br/&gt;&lt;br/&gt;So to update the channel state, the channel participants need:&lt;br/&gt;&lt;br/&gt; 3*k HTLC transactions (only 1 pre-signed)&lt;br/&gt; 2 commitment transactions (both pre-signed)&lt;br/&gt; 2 St transactions (neither pre-signed)&lt;br/&gt;&lt;br/&gt;Every time the factory updates, every channel state must also update (as&lt;br/&gt;the channel funding outputs will change txid).&lt;br/&gt;&lt;br/&gt;Every participant needs 1&#43;c &amp;#34;In&amp;#34; confirmed utxos available -- one for&lt;br/&gt;the factory itself, and one for each channel they&amp;#39;re involved in.&lt;br/&gt;&lt;br/&gt;Every participant needs to monitor P&#43;c&#43;1 outputs on chain -- the factory&lt;br/&gt;Funding output (which may be spent by the Trigger tx), the P&lt;br/&gt;St{A..Z}i outputs, and their counterparty&amp;#39;s InX output for each channel&lt;br/&gt;they&amp;#39;re participating in.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s getting pretttty complicated, so I&amp;#39;m not confident I&amp;#39;ve got it&lt;br/&gt;all in my head correctly, but I think it still works.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m skipping over the watchtower-freedom/casual user section here. cf&lt;br/&gt;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2022/10/12/#ln-with-long-timeouts-proposal&#34;&gt;https://bitcoinops.org/en/newsletters/2022/10/12/#ln-with-long-timeouts-proposal&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Step 4: Resizing Lightning Channels Off-Chain / Hierarchial Channels&lt;br/&gt;  &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&#34;&gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Hey, we made it to this thread!&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not entirely sure of the novelty in this proposal; once you have&lt;br/&gt;channels in factories, lots of magic is possible, but it&amp;#39;s all very&lt;br/&gt;complex. I believe the particular proposal here is something like:&lt;br/&gt;&lt;br/&gt; - Instead of just having Alice/Bob/Carol/etc as identities in&lt;br/&gt;   lightning, let them &amp;#34;pair&amp;#34; up, so that AliceBob is considered a node,&lt;br/&gt;   and CarolDave is also a node.&lt;br/&gt;&lt;br/&gt; - So we have a utxo where AliceBob has a channel with CarolDave, and&lt;br/&gt;   another where CarolDave has a channel with Elizabeth, eg.&lt;br/&gt;&lt;br/&gt; - But actually the AliceBob/CarolDave utxo is a factory; and there&amp;#39;s&lt;br/&gt;   an internal channel between Alice and Bob, and another between Carol&lt;br/&gt;   and Dave&lt;br/&gt;&lt;br/&gt; - Now, because we describe AliceBob and CarolDave as a channel, that&lt;br/&gt;   means funds can move between AliceBob and CarolDave; but that is&lt;br/&gt;   equivalent to saying the overall capacity of the internal Alice/Bob&lt;br/&gt;   channel is actually decreasing without any on-chain activity! Neat!&lt;br/&gt;&lt;br/&gt;But... that was always the point of channel factories? And the specific&lt;br/&gt;structure of four participants split into a single pair of channels&lt;br/&gt;doesn&amp;#39;t seem particularly compelling? I don&amp;#39;t know, I feel like I&amp;#39;m&lt;br/&gt;missing something here. Or maybe it&amp;#39;s just the first three steps were&lt;br/&gt;amazing, so merely interesting seems pedestrian by comparison?&lt;br/&gt;&lt;br/&gt;Hmm, looking at Harding&amp;#39;s email, I see:&lt;br/&gt;&lt;br/&gt;&amp;gt; **Liquidity multiplexing:** Alice, Bob, Carol, and Dan each rightfully&lt;br/&gt;&amp;gt; own some portion of a UTXO.  Alice and Bob expect to always be&lt;br/&gt;&amp;gt; available; Carol and Dan may sometimes be unavailable.  The proposal&lt;br/&gt;&amp;gt; allows Carol and Dan to spend/receive in combination with Alice and&lt;br/&gt;&amp;gt; Bob, but also ensures Alice and Bob can spend back and forth the&lt;br/&gt;&amp;gt; entirety their portions of the UTXO even if Carol, Dan, or both of&lt;br/&gt;&amp;gt; them are unavailable.&lt;br/&gt;&lt;br/&gt;I guess I&amp;#39;m not entirely enthusiastic about that because in that case&lt;br/&gt;Alice can only send funds to Carol when Dan (and whoever else is involved&lt;br/&gt;in the factory) eventually come online to signoff on the factory state&lt;br/&gt;update. That&amp;#39;s still useful for (slow) offchain channel reallocations,&lt;br/&gt;but it doesn&amp;#39;t seem reliable/fast enough for a payment.&lt;br/&gt;&lt;br/&gt;For the case where all factory participants are reliably online (perhaps&lt;br/&gt;with some exceptions) I guess I could see that making sense?  Then you&amp;#39;re&lt;br/&gt;generally just treating it as a 4-party channel of A/B/C/D with everyone&lt;br/&gt;able to easily forward to anyone; but when Alice is offline for system&lt;br/&gt;maintenance for an hour every week, it automatically degrades to just&lt;br/&gt;having the Carol/Dave channel operational, with no other problems.&lt;br/&gt;&lt;br/&gt;fin&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:12:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstaxs59k7w4fnl5ndwdlq6pdndjg5zyc2ck6cdjhgr74x477k74cgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kng8fqg</id>
    
      <title type="html">📅 Original date posted:2023-01-04 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstaxs59k7w4fnl5ndwdlq6pdndjg5zyc2ck6cdjhgr74x477k74cgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kng8fqg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgazs3yd5hw0x9pzdcu6hyzlhqav2pcy80h7udgl4vxr0llstrdrc6p2ne3&#39;&gt;nevent1q…2ne3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-04&lt;br/&gt;🗒️ Summary of this message: A proposal for using a covenant to establish a channel without an expiry date, allowing it to be a first-class citizen among channels.&lt;br/&gt;📝 Original message:&lt;br/&gt;On Wed, Jan 04, 2023 at 01:06:36PM &#43;1100, Lloyd Fournier wrote:&lt;br/&gt;&amp;gt; The advantage of using a covenant&lt;br/&gt;&amp;gt; is that the channel would not have an expiry date and therefore be a first&lt;br/&gt;&amp;gt; class citizen among channels.&lt;br/&gt;&lt;br/&gt;I think the approach here would be:&lt;br/&gt;&lt;br/&gt; * receive funds on the in-potentiam address with 8000 block CSV&lt;br/&gt; * LSP tracks immediately&lt;br/&gt; * user&amp;#39;s wallet wakes up, LSP reports address to user, user signs&lt;br/&gt;   a funding tx to establish the channel, and the state 0 close tx&lt;br/&gt; * LSP considers it immediately active&lt;br/&gt; * LSP broadcasts the tx, targeting confirmation within 3 days&lt;br/&gt; * if the funding tx confirms promptly, you just have an ordinary channel&lt;br/&gt; * after 800 blocks, if the tx hasn&amp;#39;t confirmed, LSP fee bumps or&lt;br/&gt;   closes the channel (relying on the high-feerate unilateral close&lt;br/&gt;   tx to do the fee bumping)&lt;br/&gt;&lt;br/&gt;ie:&lt;br/&gt;&lt;br/&gt; day 0: someone -&amp;gt; in-potentiam address (payment made on-chain, confirmed)&lt;br/&gt;&lt;br/&gt; day 7: in-potentiam -&amp;gt; funding (wallet wakes up, tx signed and broadcast,&lt;br/&gt;          not necessarily confirmed, channel active)&lt;br/&gt;&lt;br/&gt; day 12: in-potentiam -&amp;gt; funding (confirmed)&lt;br/&gt;&lt;br/&gt; day 9999: funding -&amp;gt; unilateral/cooperative close&lt;br/&gt;&lt;br/&gt;or:&lt;br/&gt;&lt;br/&gt; day 0: someone -&amp;gt; in-potentiam address (payment made on-chain, confirmed)&lt;br/&gt;&lt;br/&gt; day 14: LSP forgets about in-potentiam utxo as its expiry is only 1000&lt;br/&gt;         blocks away&lt;br/&gt;&lt;br/&gt; day 420: in-potentiam -&amp;gt; wherever (payment made on-chain by user)&lt;br/&gt;&lt;br/&gt;So while the tx introspection approach you advocate *would* allow the&lt;br/&gt;setup phase to skip the &amp;#34;expiry on day 14&amp;#34; restriction, I think the&lt;br/&gt;*bigger* benefit is that you also wouldn&amp;#39;t need the on-chain &amp;#34;in-potentiam&lt;br/&gt;-&amp;gt; funding&amp;#34; transaction, but could instead just leave the in-potentiam&lt;br/&gt;tx on chain indefinitely, until it was time to close the channel (which,&lt;br/&gt;if it was a cooperative close, could just be a musig key path spend).&lt;br/&gt;&lt;br/&gt;Either approach probably implies that you either have multiple channels&lt;br/&gt;with your LSP (one for each in-potentiam payment you receive), or&lt;br/&gt;that your single channel with your LSP is backed by multiple UTXOs&lt;br/&gt;(maybe you choose an order for them, so that Alice owns 100% of the&lt;br/&gt;balance in utxos 1..(k-1) and Bob owns 100% of the balance in utxos&lt;br/&gt;(k&#43;1)..n?). Otherwise you&amp;#39;d need an on-chain tx anyway to splice the new&lt;br/&gt;funds into your existing channel; and that seems both annoying of itself,&lt;br/&gt;and probably bad for privacy.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:12:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8x88yhky24tg3k4wx34s54hdeuawjvprlu632x4afj7vzjqtny6gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kan6ddu</id>
    
      <title type="html">📅 Original date posted:2023-04-03 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8x88yhky24tg3k4wx34s54hdeuawjvprlu632x4afj7vzjqtny6gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kan6ddu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrn9g5azjhddlss2ylepyc05ge85xc4qcd9csxkk0lj9sqjenz7kcnwsxxd&#39;&gt;nevent1q…sxxd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-03&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sat, Mar 18, 2023 at 12:41:00AM &#43;0000, jlspc via Lightning-dev wrote:&lt;br/&gt;&amp;gt; TL;DR&lt;br/&gt;&lt;br/&gt;Even with Harding&amp;#39;s optech write ups, and the optech space, I barely&lt;br/&gt;follow all this, so I&amp;#39;m going to try explaining it too as a way of&lt;br/&gt;understanding it myself; hopefully maybe that helps someone. Corrections&lt;br/&gt;welcome, obviously!&lt;br/&gt;&lt;br/&gt;I think understanding all this requires going through each of the four&lt;br/&gt;steps.&lt;br/&gt;&lt;br/&gt;Step 1: Tunable penalties;&lt;br/&gt;  &lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This is a clever constructions that lets you do a 2-party lightning&lt;br/&gt;channel with existing opcodes where cheating doesn&amp;#39;t result in you&lt;br/&gt;losing all your funds (or, in fact, any of your in-channel funds). It&lt;br/&gt;also retains the ability to do layered commit transactions, that is you can&lt;br/&gt;immediately commit to claiming an HTLC or that it&amp;#39;s already timed out,&lt;br/&gt;even while you&amp;#39;re waiting for the to_self_delay to expire to ensure&lt;br/&gt;you&amp;#39;re not cheating.&lt;br/&gt;&lt;br/&gt;The way that it works is by separating the flow of channels funds, from&lt;br/&gt;the control flow. So instead of managing the channel via a single utxo,&lt;br/&gt;we instead manage it via 3 utxos: F (the channel funds), InA (control&lt;br/&gt;flow for a unilateral close by A), InB (control flow for a unilateral&lt;br/&gt;close by B).&lt;br/&gt;&lt;br/&gt;For each update to a new state &amp;#34;i&amp;#34;, which has &amp;#34;k&amp;#34; HTLCs, we create 4 primary txs, and 8k HTLC claims.&lt;br/&gt;&lt;br/&gt;  StAi which spends InA, and has k&#43;1 outputs. The first output is used&lt;br/&gt;  for controlling broadcast of the commitment tx, the remaining k are for&lt;br/&gt;  controlling the resolution of each HTLC.&lt;br/&gt;&lt;br/&gt;  ComAi is the commitment for the state. It spends the funding output&lt;br/&gt;  F, and the first output of StAi. In order to spend StAi, it requires&lt;br/&gt;  a to_self_delay (and signature by A), giving B time to object that i&lt;br/&gt;  is a revoked state. If B does object, he is able to immediately spend&lt;br/&gt;  the first output of StAi directly using the revocation information,&lt;br/&gt;  and these funds form the penalty. It has k&#43;2 outputs, one for the&lt;br/&gt;  balance of each participant, and one for each HTLC.&lt;br/&gt;&lt;br/&gt;  For each of the k HTLCs, we construct two success and two timeout&lt;br/&gt;  transactions: (HAi-j-s, HAi-j-p); (HAi-j-t, HAi-j-r). HAi-j-s and&lt;br/&gt;  HAi-j-t both spend the jth output of StAi, conditional either on a&lt;br/&gt;  preimage reveal or a timeout respectively; HAi-j-p and HAi-j-r spend&lt;br/&gt;  the output of HAi-j-s and HAi-j-t respectively, as well as the output&lt;br/&gt;  of ComAi. (s=success commitment, t=timeout commitment, p=payment on&lt;br/&gt;  success, r=refund)&lt;br/&gt;&lt;br/&gt;  And Bob has similar versions of all of these.&lt;br/&gt;&lt;br/&gt;So if Alice is honest, the process is:&lt;br/&gt;&lt;br/&gt;  * Alice publishes StAi&lt;br/&gt;  * Alice publishes HAi-j-{s,t} for any HTLCs she is able to resolve&lt;br/&gt;    immediately; as does Bob.&lt;br/&gt;  * Alice waits for to_self_delay to complete&lt;br/&gt;  * Alice publishes ComAi, and any HAi-j-{r,p} transactions she is able&lt;br/&gt;    to, and if desired consolidates her funds.&lt;br/&gt;  * As any remaining HTLCs resolve, those are also claimed.&lt;br/&gt;  * Bob&amp;#39;s InB output is available to do whatever he wants with.&lt;br/&gt;&lt;br/&gt;If Alice is dishonest, the process is:&lt;br/&gt;&lt;br/&gt;  * Alice publishes StAi, and perhaps publishes some HAi-j-{s,t}&lt;br/&gt;    transactions.&lt;br/&gt;  * Bob spends the first output of StAi unilaterally claiming the&lt;br/&gt;  * penalty, meaning ComAi can now never be confirmed.&lt;br/&gt;  * Bob publishes StBi&amp;#39;, and continues with the honest protocol.&lt;br/&gt;&lt;br/&gt;Bob only needs the usual O(log(n)) state in order to be able to&lt;br/&gt;reconstruct the key to spend the first output of revoked StAi txs.&lt;br/&gt;Because that prevents the corresponding ComAi from ever being published,&lt;br/&gt;no revoked HTLC-related state can make it on chain in any way that Bob&lt;br/&gt;needs to care about.&lt;br/&gt;&lt;br/&gt;If both Alice and Bob are dishonest (Alice tries to cheat, but Bob&lt;br/&gt;restored from an old backup and also publishes a revoked state) then&lt;br/&gt;both the StAi and StBi&amp;#39; may have their first output claimed by the other&lt;br/&gt;party, in which case the channels funds are lost (unless Alice and Bob&lt;br/&gt;manage to agree to a cooperative close somehow, even after all the&lt;br/&gt;attempts to cheat each other).&lt;br/&gt;&lt;br/&gt;While 4&#43;8k transactions per state is a lot, I think you only actually&lt;br/&gt;need 2&#43;4k signatures in advance (StAi and HAi-j-{s,t} only need to be&lt;br/&gt;signed when they&amp;#39;re broadcast). Perhaps using ANYPREVOUT would let you&lt;br/&gt;reduce the number of HTLC states?&lt;br/&gt;&lt;br/&gt;Step 2: Efficient Factories for Lightning Channels&lt;br/&gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-January/003827.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-January/003827.html&lt;/a&gt;&lt;br/&gt; &lt;a href=&#34;https://github.com/JohnLaw2/ln-efficient-factories&#34;&gt;https://github.com/JohnLaw2/ln-efficient-factories&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This generalizes the tunable penalties setup for more than two&lt;br/&gt;participants.&lt;br/&gt;&lt;br/&gt;The first part of this is a straightforward generalisation, and&lt;br/&gt;doesn&amp;#39;t cover HTLCs. Where we had 2(2&#43;4k) transactions previously, we&lt;br/&gt;presumably would now have P(2&#43;4k) transactions, where P is the number&lt;br/&gt;of participants.&lt;br/&gt;&lt;br/&gt;The second part of this aims to avoid that factor P. It does this by&lt;br/&gt;introducing Trigger and Mold transactions.&lt;br/&gt;&lt;br/&gt;To do this, we first establish the number of states that the factory&lt;br/&gt;will support; perhaps 2**40. In that case, the trigger transaction will&lt;br/&gt;spend the funding tx, and have 40&#43;1 outputs. All of them will require a&lt;br/&gt;P-of-P signature to be spend, with the first also requiring a relative&lt;br/&gt;timelock of 3*to_self_delay and containing the channel funds, while the&lt;br/&gt;rest contain dust-ish amounts.&lt;br/&gt;&lt;br/&gt;For any given state i, we represent i as a binary number, and the&lt;br/&gt;commitment tx Com_i will spend the outputs corresponding to &amp;#34;0&amp;#34; in&lt;br/&gt;the binary number, as well as the first output containing the channel&lt;br/&gt;funds.&lt;br/&gt;&lt;br/&gt;We will also have St{A..Z}_i transactions, spending In{A..Z} as&lt;br/&gt;previously. The sole output of StAi (etc) will be spent either by any&lt;br/&gt;other participant via a revoked pubkey, or else by the Mold{A..Z}_i&lt;br/&gt;transaction. The Mold{A..Z}_i transaction will also spend the remaining&lt;br/&gt;outputs of the Trigger transaction that were not spent by Com_i.&lt;br/&gt;&lt;br/&gt;In the honest scenario, this looks like:&lt;br/&gt;&lt;br/&gt; * Alice publishes Trigger&lt;br/&gt; * Alice publishes StA_i&lt;br/&gt; * Alice waits to_self_delay&lt;br/&gt; * Alice publishes MoldA_i&lt;br/&gt; * Alice waits an additional 2*to_self_delay&lt;br/&gt; * Alice publishes Com_i&lt;br/&gt; * Alice and everyone else claims their funds&lt;br/&gt;&lt;br/&gt;There are various dishonest scenarios available:&lt;br/&gt;&lt;br/&gt; * If Alice publishes StA_i before publishing the Trigger, someone else&lt;br/&gt;   publishes the Trigger.&lt;br/&gt;&lt;br/&gt; * If Alice doesn&amp;#39;t publish StA_i quickly, Bob publishes StB_i&lt;br/&gt;   and continues. If multiple St{A..Z}_i&amp;#39;s are published, whoever does&lt;br/&gt;   not publish the Mold transaction simply reclaims their funds by the&lt;br/&gt;   &amp;#34;revocation&amp;#34; path.&lt;br/&gt;&lt;br/&gt; * If Alice publishes an old StA_i, Bob claims the funds using the&lt;br/&gt;   revoked key, penalising A, and then publishes the correct StB_i,&lt;br/&gt;   and continues.&lt;br/&gt;&lt;br/&gt; * If Alice does not publish MoldA_i, Bob can publish StB_i and MoldB_i.&lt;br/&gt;&lt;br/&gt; * Once MoldB_i is confirmed, someone could attempt to broadcast an&lt;br/&gt;   outdated Com_i&amp;#39; where i&amp;#39; &amp;lt; i. In that case, the outputs corresponding&lt;br/&gt;   to all the 1&amp;#39;s in the binary representation of i are already spent&lt;br/&gt;   (by MoldB_i), but for any i&amp;#39; &amp;lt; i, the i&amp;#39; necessarily has a 0 somewhere&lt;br/&gt;   where i had a 1 (otherwise i&amp;#39; &amp;gt;= i), so Com_i&amp;#39; would be double spending&lt;br/&gt;   an input already spent by MoldB_i.&lt;br/&gt;&lt;br/&gt;In this case, you need to track P&#43;1 outputs (F&#43;InA..Z), you need&lt;br/&gt;O(P*log(N)) state, and the onchain impact of a unilateral close is ideally&lt;br/&gt;4 transactions (Trigger, StAi, MoldAi, Comi) with size O(log(MaxN)),&lt;br/&gt;but maybe be up to 2*P&#43;2 transactions (Trigger, St{A..Z}i, MoldAi,&lt;br/&gt;refund{B..Z}i, Comi).&lt;br/&gt;&lt;br/&gt;Note that this doesn&amp;#39;t consider HTLCs at all.&lt;br/&gt;&lt;br/&gt;Step 3: Factory Optimized protocols for Lighting&lt;br/&gt; &lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&lt;/a&gt;&lt;br/&gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&lt;/a&gt;&lt;br/&gt; &lt;a href=&#34;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&#34;&gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps this should have been step 2, whoopsie. Anyway, this optimises&lt;br/&gt;the construction in step 1 for channels included in factories; mostly&lt;br/&gt;to deal with the fact that closing a factory is tedious and can take a&lt;br/&gt;while. I&amp;#39;m ignoring the Partial-Factory-Optimized step -- it&amp;#39;s barely&lt;br/&gt;different to the Tunable Penalty mechanism. The Fully Factory Optimized&lt;br/&gt;protocol is more interesting.&lt;br/&gt;&lt;br/&gt;The main idea here is this: if a channel in a factory goes defunct while&lt;br/&gt;an HTLC is pending, we&amp;#39;d like to be able to guarantee we&amp;#39;ve resolved&lt;br/&gt;the HTLC to our satisfaction while deferring the decision of whether&lt;br/&gt;to shutdown the entire factory in order to close the channel, just&lt;br/&gt;in case our channel partner eventually comes back, and we can resolve&lt;br/&gt;everything properly.&lt;br/&gt;&lt;br/&gt;The way we do that is twofold: first, we set things up so that the default&lt;br/&gt;resolution of an HTLC is a refund. That immediately does away with half&lt;br/&gt;of our HTLC transactions, because now we only need the success/payment&lt;br/&gt;paths, not the timeout/refund ones. Second, we require whoever&amp;#39;s&lt;br/&gt;going to receive the payment to publish their StXi transaction -- that&lt;br/&gt;avoids us having to do P*k success/payment paths, now we only need 1*k&lt;br/&gt;success/payment paths.  Unfortunately, we do introduce a new &amp;#34;kickoff&amp;#34;&lt;br/&gt;transaction to make it a three transaction kickoff/success/payment path,&lt;br/&gt;rather than just two transactions.&lt;br/&gt;&lt;br/&gt;In this case your transactions are:&lt;br/&gt;&lt;br/&gt;  F - the funding output, only available once the factory is closed&lt;br/&gt;  InB - as before&lt;br/&gt;  StBi - your state commitment, one output that will be spent by ComBi,&lt;br/&gt;         k outputs for each pending HTLC paying to B in state i.&lt;br/&gt;  HBi-j-k - the kickoff transaction for HTLC &amp;#34;j&amp;#34; paying to B, spends&lt;br/&gt;         the appropriate output of StBi, conditional on revealing the&lt;br/&gt;	 HTLC preimage and B&amp;#39;s signature. Spendable either by B after&lt;br/&gt;	 to-self-delay, or by A after the HTLC&amp;#39;s expiry plus&lt;br/&gt;	 to-self-delay&lt;br/&gt;  HBi-j-s - the success transaction, spendable by B&lt;br/&gt;  HBi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;         from ComB_i&lt;br/&gt;  HAi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;         from ComA_i&lt;br/&gt;&lt;br/&gt;I think there&amp;#39;s an error in the paper here; it says as well as being&lt;br/&gt;spendable by H{A,B}i-j-p as above, the HTLC output in ComA_i should be&lt;br/&gt;spendable by A after to-self-delay. I believe it should require both&lt;br/&gt;to-self-delay (relative timelock) and the HTLC expiry (absolute timelock)&lt;br/&gt;before it can be spendable by A.&lt;br/&gt;&lt;br/&gt;Anyway, how&amp;#39;s that work? If you want to shut the factory down&lt;br/&gt;immediately, it looks like:&lt;br/&gt;&lt;br/&gt; * Shut the factory down&lt;br/&gt; * Broadcast StBi, HBi-j-k&lt;br/&gt; * Wait to-self-delay&lt;br/&gt; * Broadcast ComBi, HBi-j-s, HBi-j-p&lt;br/&gt; * Done!&lt;br/&gt;&lt;br/&gt;If you were cheating, then:&lt;br/&gt;&lt;br/&gt; * Alice steals StBi&amp;#39;s first output if i was on old state, and ComBi&lt;br/&gt;   cannot be broadcast. Alice publishes the current StAi&amp;#39;, ComAi&amp;#39;, etc.&lt;br/&gt; &lt;br/&gt; * If the HTLC had timed out, Alice claims the output of HBi-j-k before&lt;br/&gt;   to-self-delay is finished, so that HBi-j-p cannot be broadcast, then&lt;br/&gt;   claims the output of ComBi once both timeouts are complete.&lt;br/&gt;&lt;br/&gt;However, what if you don&amp;#39;t want to shut the factory down? In that&lt;br/&gt;case:&lt;br/&gt;&lt;br/&gt; * Broadcast StBi, HBi-j-k.&lt;br/&gt; * Wait for to_self_delay.&lt;br/&gt; * Spend HBi-j-k to HBi-j-s.&lt;br/&gt; * Wait some more.&lt;br/&gt; * The other guy comes online! Let&amp;#39;s recover the channel!&lt;br/&gt; * Propose spending the first output of StBi and the output of HBi-j-s&lt;br/&gt;   to a new InB2, but don&amp;#39;t sign it.&lt;br/&gt; * Update all the off-chain channel data to a new state i&#43;1 that uses&lt;br/&gt;   InB2 instead of InB, and that acknowledges your claim to the HTLC&lt;br/&gt;   funds.&lt;br/&gt; * Sign and broadcast InB2&lt;br/&gt; * Continue &lt;br/&gt;&lt;br/&gt;If the other guy doesn&amp;#39;t come online, you close the factory, immediately&lt;br/&gt;spend F and the first output of StBi via ComBi, and immediately spend&lt;br/&gt;HBi-j-s and the HTLC output of ComBi to claim your funds.&lt;br/&gt;&lt;br/&gt;While this is described as an optimisation focussed on improving channels&lt;br/&gt;within factories; it seems to me that the reduction in state compared to&lt;br/&gt;the &amp;#34;tunable penalties&amp;#34; approach in step 1 makes this a strict improvement&lt;br/&gt;in general.&lt;br/&gt;&lt;br/&gt;Anyway, combining this step and the previous gives us an idea how to do&lt;br/&gt;both factories and HTLCs. I believe that would look like:&lt;br/&gt;&lt;br/&gt; Factory funding output -- multisig of A..Z&lt;br/&gt; Factory In{A..Z}&lt;br/&gt;&lt;br/&gt; Factory Trigger, spends the funding output&lt;br/&gt; Factory St{A..Z}i spends In{A..Z}&lt;br/&gt; Factory Mold{A..Z}i spends St{A..Z}i and various Trigger outputs&lt;br/&gt; Factory Com_i spends the other Trigger outputs; its outputs are the&lt;br/&gt;   channels in the factory.&lt;br/&gt;&lt;br/&gt; Channel F_x - an output of the Factory Com_i&lt;br/&gt; Channel InA, InB&lt;br/&gt; Channel StAi, StBi -- spends InA/InB&lt;br/&gt; Channel ComAi, ComBi -- spends F_x and the first output of StA/StB&lt;br/&gt; Channel H{A,B}i_j_{k,s,p} -- success path funds for active HTLCs&lt;br/&gt;&lt;br/&gt;So to update the channel state, the channel participants need:&lt;br/&gt;&lt;br/&gt; 3*k HTLC transactions (only 1 pre-signed)&lt;br/&gt; 2 commitment transactions (both pre-signed)&lt;br/&gt; 2 St transactions (neither pre-signed)&lt;br/&gt;&lt;br/&gt;Every time the factory updates, every channel state must also update (as&lt;br/&gt;the channel funding outputs will change txid).&lt;br/&gt;&lt;br/&gt;Every participant needs 1&#43;c &amp;#34;In&amp;#34; confirmed utxos available -- one for&lt;br/&gt;the factory itself, and one for each channel they&amp;#39;re involved in.&lt;br/&gt;&lt;br/&gt;Every participant needs to monitor P&#43;c&#43;1 outputs on chain -- the factory&lt;br/&gt;Funding output (which may be spent by the Trigger tx), the P&lt;br/&gt;St{A..Z}i outputs, and their counterparty&amp;#39;s InX output for each channel&lt;br/&gt;they&amp;#39;re participating in.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s getting pretttty complicated, so I&amp;#39;m not confident I&amp;#39;ve got it&lt;br/&gt;all in my head correctly, but I think it still works.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m skipping over the watchtower-freedom/casual user section here. cf&lt;br/&gt;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2022/10/12/#ln-with-long-timeouts-proposal&#34;&gt;https://bitcoinops.org/en/newsletters/2022/10/12/#ln-with-long-timeouts-proposal&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Step 4: Resizing Lightning Channels Off-Chain / Hierarchial Channels&lt;br/&gt;  &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&#34;&gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Hey, we made it to this thread!&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not entirely sure of the novelty in this proposal; once you have&lt;br/&gt;channels in factories, lots of magic is possible, but it&amp;#39;s all very&lt;br/&gt;complex. I believe the particular proposal here is something like:&lt;br/&gt;&lt;br/&gt; - Instead of just having Alice/Bob/Carol/etc as identities in&lt;br/&gt;   lightning, let them &amp;#34;pair&amp;#34; up, so that AliceBob is considered a node,&lt;br/&gt;   and CarolDave is also a node.&lt;br/&gt;&lt;br/&gt; - So we have a utxo where AliceBob has a channel with CarolDave, and&lt;br/&gt;   another where CarolDave has a channel with Elizabeth, eg.&lt;br/&gt;&lt;br/&gt; - But actually the AliceBob/CarolDave utxo is a factory; and there&amp;#39;s&lt;br/&gt;   an internal channel between Alice and Bob, and another between Carol&lt;br/&gt;   and Dave&lt;br/&gt;&lt;br/&gt; - Now, because we describe AliceBob and CarolDave as a channel, that&lt;br/&gt;   means funds can move between AliceBob and CarolDave; but that is&lt;br/&gt;   equivalent to saying the overall capacity of the internal Alice/Bob&lt;br/&gt;   channel is actually decreasing without any on-chain activity! Neat!&lt;br/&gt;&lt;br/&gt;But... that was always the point of channel factories? And the specific&lt;br/&gt;structure of four participants split into a single pair of channels&lt;br/&gt;doesn&amp;#39;t seem particularly compelling? I don&amp;#39;t know, I feel like I&amp;#39;m&lt;br/&gt;missing something here. Or maybe it&amp;#39;s just the first three steps were&lt;br/&gt;amazing, so merely interesting seems pedestrian by comparison?&lt;br/&gt;&lt;br/&gt;Hmm, looking at Harding&amp;#39;s email, I see:&lt;br/&gt;&lt;br/&gt;&amp;gt; **Liquidity multiplexing:** Alice, Bob, Carol, and Dan each rightfully&lt;br/&gt;&amp;gt; own some portion of a UTXO.  Alice and Bob expect to always be&lt;br/&gt;&amp;gt; available; Carol and Dan may sometimes be unavailable.  The proposal&lt;br/&gt;&amp;gt; allows Carol and Dan to spend/receive in combination with Alice and&lt;br/&gt;&amp;gt; Bob, but also ensures Alice and Bob can spend back and forth the&lt;br/&gt;&amp;gt; entirety their portions of the UTXO even if Carol, Dan, or both of&lt;br/&gt;&amp;gt; them are unavailable.&lt;br/&gt;&lt;br/&gt;I guess I&amp;#39;m not entirely enthusiastic about that because in that case&lt;br/&gt;Alice can only send funds to Carol when Dan (and whoever else is involved&lt;br/&gt;in the factory) eventually come online to signoff on the factory state&lt;br/&gt;update. That&amp;#39;s still useful for (slow) offchain channel reallocations,&lt;br/&gt;but it doesn&amp;#39;t seem reliable/fast enough for a payment.&lt;br/&gt;&lt;br/&gt;For the case where all factory participants are reliably online (perhaps&lt;br/&gt;with some exceptions) I guess I could see that making sense?  Then you&amp;#39;re&lt;br/&gt;generally just treating it as a 4-party channel of A/B/C/D with everyone&lt;br/&gt;able to easily forward to anyone; but when Alice is offline for system&lt;br/&gt;maintenance for an hour every week, it automatically degrades to just&lt;br/&gt;having the Carol/Dave channel operational, with no other problems.&lt;br/&gt;&lt;br/&gt;fin&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:08:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswsfjey8f0tn6xwl4ead6nfadwngyz83dn5nxgvhq5a73yas20rugzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kl4str3</id>
    
      <title type="html">📅 Original date posted:2023-01-30 📝 Original message: After ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswsfjey8f0tn6xwl4ead6nfadwngyz83dn5nxgvhq5a73yas20rugzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kl4str3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs96kc6at047q00z6pj89yvu3erdy36m2vrfj3wgd23ken8tfgjqcsckwckj&#39;&gt;nevent1q…wckj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-30&lt;br/&gt;📝 Original message:&lt;br/&gt;After listening to the optech space on the topic, thought it might be&lt;br/&gt;worth having a second go at explaining the idea...&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Alice is trying to pay Bob. Alice has an LSP, Louise. Bob has an LSP&lt;br/&gt;Larry. Louise and Larry are online 24/7 but don&amp;#39;t have access to Alice&lt;br/&gt;and Bob&amp;#39;s private keys. We want the payment flow to be something like:&lt;br/&gt;&lt;br/&gt; 1) Larry gets some setup info from Bob, Bob goes offline.&lt;br/&gt;&lt;br/&gt; * Alice hears about Bob&amp;#39;s address, and decides to pay Bob $50.&lt;br/&gt; 2) Alice coordinates a unique invoice id with Larry, which we&amp;#39;ll call S.&lt;br/&gt; 3) Alice tells Louise that she&amp;#39;s trying to pay Bob $50 for invoice S.&lt;br/&gt; * Louise registers with Larry to be told when Bob is online.&lt;br/&gt; * Alice goes offline.&lt;br/&gt;&lt;br/&gt; * Bob goes online.&lt;br/&gt; * Larry tells Louise that Bob is online.&lt;br/&gt; 4) Louise sends the payment to Bob conditional on S.&lt;br/&gt; 5) Bob accepts the payment.&lt;br/&gt; * Louise claims the $50 from Alice and closes out the transaction.&lt;br/&gt; 6) Alice receives a receipt from Bob.&lt;br/&gt;&lt;br/&gt;The goal of a receipt is that if two people want to pay Bob $50, they&amp;#39;ll&lt;br/&gt;be able to guarantee that (a) Bob was paid, rather than someone else; (b)&lt;br/&gt;that the receipts are different (so Bob received $100 total, rather than&lt;br/&gt;$50 going somewhere else and one of them just got a photocopied receipt);&lt;br/&gt;and (c) after the fact they can prove that the receipt was theirs,&lt;br/&gt;not someone else&amp;#39;s. (a) and (b) prevent the funds getting misdirected;&lt;br/&gt;(c) potentially allows you to use the receipt as evidence to a third&lt;br/&gt;party if you paid for something in advance, then didn&amp;#39;t receive it.&lt;br/&gt;&lt;br/&gt;To get all those things, what we want is really more like a signature,&lt;br/&gt;than just a hash/preimage. But PTLC preimages and schnorr signatures&lt;br/&gt;aren&amp;#39;t much different: with a PTLC preimage, you pay to point S and then&lt;br/&gt;receive back the preimage s, where s*G = S. Meanwhile schnorr signatures&lt;br/&gt;are made up of a number (s) and a point (R), which satisfy the equation:&lt;br/&gt;&lt;br/&gt;  s*G = R &#43; H(R,P,m)*P&lt;br/&gt;&lt;br/&gt;But, if you&amp;#39;re willing to squint a bit, you can just wrap the whole&lt;br/&gt;right side of the equation up as &amp;#34;S&amp;#34;, and treat it as a PTLC.&lt;br/&gt;&lt;br/&gt;(notation: I use capital letters to represent points, and lower case&lt;br/&gt;letters to represent numbers; so if A is a point, a is it&amp;#39;s discrete log,&lt;br/&gt;and a*G = A)&lt;br/&gt;&lt;br/&gt;To calculate S, you need to know three things: R, P and m -- P is just&lt;br/&gt;the signer&amp;#39;s public key, m is the message being signed, but &amp;#34;R&amp;#34; is the&lt;br/&gt;public &amp;#34;nonce&amp;#34; part of the signature, that has to be chosen by the signer&lt;br/&gt;(otherwise whoever does choose it can probably arrange to discover the&lt;br/&gt;signer&amp;#39;s private key after a signature or two).&lt;br/&gt;&lt;br/&gt;So in that case, the protocol looks like:&lt;br/&gt;&lt;br/&gt;  Alice proposes that Bob signs a message, eg&lt;br/&gt;    m = &amp;#34;Alice paid me $50 -- Bob&amp;#34;&lt;br/&gt;    (perhaps this can be some standard nostr message, eg)&lt;br/&gt;  Bob chooses an R for this signature, and tells Alice what R is&lt;br/&gt;  Alice calculates &amp;#34;S&amp;#34;&lt;br/&gt;  Alice pays Bob $50 via a PTLC conditional on S&lt;br/&gt;  If Bob accepts the $50, Alice receives the preimage of S, ie s&lt;br/&gt;  Alice combines (R,s) and that is a Bob&amp;#39;s signature on her message&lt;br/&gt;&lt;br/&gt;Having Bob be offline with Alice only able to talk to his&lt;br/&gt;not-fully-trusted representative Larry complicates things. Bob now can&amp;#39;t&lt;br/&gt;just choose a brand new R after already knowing Alice&amp;#39;s message m, and&lt;br/&gt;that introduces cryptographic attacks [0], where if Alice can request&lt;br/&gt;nonces for many messages she may be able to find a lucky combination&lt;br/&gt;of messages/nonces where she can combine the signatures Bob ends up&lt;br/&gt;generating to steal Bob&amp;#39;s private key.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://medium.com/blockstream/insecure-shortcuts-in-musig-2ad0d38a97da&#34;&gt;https://medium.com/blockstream/insecure-shortcuts-in-musig-2ad0d38a97da&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I *think* those attacks can be avoided by using the same musig2 approach&lt;br/&gt;to generating nonces:&lt;br/&gt;&lt;br/&gt;  Bob prepares a nonce *pair* R1, R2&lt;br/&gt;  Alice chooses the message m&lt;br/&gt;  The nonce for the message m is calculated as H(R1,R2,m)*R1 &#43; R2&lt;br/&gt;&lt;br/&gt;Note that this doesn&amp;#39;t allow you to safely reuse nonces -- if you have&lt;br/&gt;three messages signed with the same R1/R2 pair, the schnorr signing&lt;br/&gt;equation (s = r &#43; H(R,P,m)*p) over each of the three messages gives you&lt;br/&gt;three equations with just three unknowns (r1, r2, and the secret key&lt;br/&gt;p), which you can use regular maths to solve, no fancy attacks needed.&lt;br/&gt;(Presumably if you just reuse a pair twice you open yourself back up to&lt;br/&gt;a Wagner attack)&lt;br/&gt;&lt;br/&gt;So that adds up to:&lt;br/&gt;&lt;br/&gt; 1) Bob shares with Larry a bunch of (R1,R2) points that will form the&lt;br/&gt;    basis of his signature nonces. They can be constructed via a&lt;br/&gt;    (hardened) HD scheme so that Bob can easily regenerate them just&lt;br/&gt;    from an index, eg.&lt;br/&gt;&lt;br/&gt; 2) Alice obtains a unique (R1,R2) pair from Larry&lt;br/&gt;    Alice determines the message she wants Bob to sign (presumably Bob&lt;br/&gt;    provides a standard template, and Alice fills in her name and perhaps&lt;br/&gt;    what she&amp;#39;s paying for) -- this is &amp;#34;m&amp;#34;.&lt;br/&gt;    Alice calculates R from R1,R2,m; and S from R,P,m &lt;br/&gt;&lt;br/&gt; 3) Alice passes &amp;#34;m&amp;#34; and &amp;#34;S&amp;#34; onto Louise and starts the payment, locking&lt;br/&gt;    up her funds&lt;br/&gt;&lt;br/&gt; 4) Louise passes &amp;#34;m&amp;#34;, &amp;#34;R1&amp;#34;, &amp;#34;R2&amp;#34; onto Bob once he&amp;#39;s online and sends&lt;br/&gt;    the payment to Bob.&lt;br/&gt; &lt;br/&gt; 5) Bob checks that R1/R2 were what he generated and haven&amp;#39;t already&lt;br/&gt;    been used; Bob checks that &amp;#34;m&amp;#34; is something he&amp;#39;s willing to sign;&lt;br/&gt;    Bob calculates s and S, and accepts the payment for S, provided it&amp;#39;s&lt;br/&gt;    the correct amount as specified in &amp;#34;m&amp;#34;, by revealing s.&lt;br/&gt;&lt;br/&gt; 6) Alice already calculated R and now receives s from Louise when&lt;br/&gt;    Louise claims her funds, and (R,s) is a BIP340 signature of m by&lt;br/&gt;    Bob, satisfying s*G = R &#43; H(R,P,m)*P, and that signature serves as&lt;br/&gt;    her payment receipt from Bob.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;On Thu, Jan 26, 2023 at 11:04:12AM &#43;1000, Anthony Towns wrote:&lt;br/&gt;&amp;gt; On Tue, Jan 10, 2023 at 07:41:09PM &#43;0000, vwallace via Lightning-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; The open research question relates to how the sender will get an invoice from the receiver, given that they are offline at sending-time.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Assuming the overall process is:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;  * Alice sends a payment to Bob, who has provided a reusable address&lt;br/&gt;&amp;gt;    AddrBob&lt;br/&gt;&amp;gt;  * Bob is offline at the time the payment is sent, but his semi-trusted&lt;br/&gt;&amp;gt;    LSP Larry is online&lt;br/&gt;&amp;gt;  * Alice is willing/able to do bidirectional communication with Larry&lt;br/&gt;&amp;gt;  * The payment does not complete until Bob is online (at which point&lt;br/&gt;&amp;gt;    Alice may be offline)&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I think in this case you want to aim for the receipt to be a BIP340&lt;br/&gt;&amp;gt; signature of the message &amp;#34;Alice has paid me $50 -- signed Bob&amp;#34;.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Given Bob&amp;#39;s public signature nonce, R, Alice (and Larry) can calculate&lt;br/&gt;&amp;gt; S = R &#43; H(R,P,m)*P (m is the receipt message, P is Bob&amp;#39;s public key),&lt;br/&gt;&amp;gt; and then Alice can send a PTLC conditional on revealing the log of S, ie&lt;br/&gt;&amp;gt; s where s*G=S; and at that point (s, R) is a valid signature by Bob of a&lt;br/&gt;&amp;gt; message confirming payment to Bob, which then serves as the final receipt.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; However for this to work, Alice needs to discover &amp;#34;R&amp;#34; while Bob is&lt;br/&gt;&amp;gt; offline. I think this is only doable if Bob pre-generates a set of&lt;br/&gt;&amp;gt; nonces and shares the public part with Larry, who can then share them&lt;br/&gt;&amp;gt; with potential payers.  I think to avoid attacks via Wagner&amp;#39;s algorithm,&lt;br/&gt;&amp;gt; you probably need to do a similar setup as musig2 does, ie share (R1,R2)&lt;br/&gt;&amp;gt; pairs, and calculate R = H(P,R1,R2,m)*R1&#43;R2.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; So a setup like:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;   Alice gets AddrBob. Decodes Bob&amp;#39;s pubkey, Larry&amp;#39;s pubkey, and the&lt;br/&gt;&amp;gt;   route to Larry.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;   Alice -&amp;gt; Larry: &amp;#34;Hi, I want to send Bob $50, and get a receipt&amp;#34;&lt;br/&gt;&amp;gt;   Larry -&amp;gt; Alice: &amp;#34;The nonce for that will be R&amp;#34;&lt;br/&gt;&amp;gt;   Alice: calculates m = &amp;#34;Hash(&amp;#34;Alice paid Bob $50&amp;#34;), S = R&#43;H(R,P,m)*P&lt;br/&gt;&amp;gt;   Alice -&amp;gt; Larry(for Bob): PTLC[$50, S]&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;   Larry -&amp;gt; Bob: PTLC[$50, S]&lt;br/&gt;&amp;gt;                 Alice wants to pay you $50, using nonce pair #12345&lt;br/&gt;&amp;gt;   Bob: verifies nonce #12345 has not been previously used, calculates R,&lt;br/&gt;&amp;gt;        calculates m, calculates s, and checks that s*G = S, checks&lt;br/&gt;&amp;gt;        there&amp;#39;s a $50 PTLC conditional on S waiting for confirmation.&lt;br/&gt;&amp;gt;   Bob -&amp;gt; Alice: claims $50 from PTLC by revealing s&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;   Alice: receives s; (R,s) serves as Bob&amp;#39;s signature confirming payment&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; seems plausible?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Every &amp;#34;S&amp;#34; here commits to a value chosen by the sender (ie, their&lt;br/&gt;&amp;gt; &amp;#34;identity&amp;#34;), so there&amp;#39;s no way for Larry to get two different payers&lt;br/&gt;&amp;gt; to use the same S. Using the same nonce twice will just mean Bob has to&lt;br/&gt;&amp;gt; reject the payment (and find a new LSP).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It may make sense to require Alice to make a micropayment to Larry in&lt;br/&gt;&amp;gt; order to claim a nonce. You&amp;#39;d want a standard template for &amp;#34;m&amp;#34; so that&lt;br/&gt;&amp;gt; it&amp;#39;s easy to generate and parse consistently, of course.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I think you could even have separate LSPs if you wanted: one to issue&lt;br/&gt;&amp;gt; nonces while you&amp;#39;re offline, and the other to actually hold onto incoming&lt;br/&gt;&amp;gt; PTLCs while you&amp;#39;re offline.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; FWIW, some previous discussion, which didn&amp;#39;t focus on offline recipients:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-February/001034.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-February/001034.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001490.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001490.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;----- End forwarded message -----
    </content>
    <updated>2023-06-09T15:07:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrfe3wp4laxtvzz0m6va0uy99h7fn7kdmhr4zh6ckw9gv9kkpukpgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kme2060</id>
    
      <title type="html">📅 Original date posted:2022-12-13 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrfe3wp4laxtvzz0m6va0uy99h7fn7kdmhr4zh6ckw9gv9kkpukpgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kme2060" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp0xsmnca8xkaeyl2kj88tcaxq2a7yn9vptzl7a9s66rs6v6psjsss0d43s&#39;&gt;nevent1q…d43s&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-12-13&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, Dec 12, 2022 at 08:38:43PM -0500, Antoine Riard wrote:&lt;br/&gt;&amp;gt; The attack purpose is to delay the confirmation of the final settlement&lt;br/&gt;&amp;gt; transaction S, to double-spend a HTLC forwarded by a routing hop.&lt;br/&gt;&amp;gt; The cltv_expiry_delta requested by Ned is equal to N=144.&lt;br/&gt;&lt;br/&gt;I believe what you&amp;#39;re suggesting here is:&lt;br/&gt;&lt;br/&gt;  Mallory has two channels with Bob, M1 and M2. Both have a to_self_delay&lt;br/&gt;  of 144 blocks. In that case cltv_expiry_delay should include some slack,&lt;br/&gt;  I&amp;#39;m going to assume it&amp;#39;s 154 blocks in total.&lt;br/&gt;&lt;br/&gt;  Mallory forwards a large payment, M1-&amp;gt;Bob-&amp;gt;M2.&lt;br/&gt;&lt;br/&gt;  Mallory claims the funds on M2 just prior to the timeout, but&lt;br/&gt;  goes offline on M1.&lt;br/&gt;&lt;br/&gt;  Bob chose the timeout for M2 via cltv_expiry_delay, so now has 154&lt;br/&gt;  blocks before the CLTV on the M1-&amp;gt;Bob payment expires.&lt;br/&gt;&lt;br/&gt;In this scenario, under the two-party eltoo scheme, Bob should:&lt;br/&gt;&lt;br/&gt;  1) immediately broadcast the most recent UB.n state for M1/Bob,&lt;br/&gt;     aiming for this to be confirmed within 5 blocks&lt;br/&gt;&lt;br/&gt;  2) wait 144 blocks for the relative timelock to expire&lt;br/&gt;&lt;br/&gt;  3) broadcast SB.n to finalise the funds, and immediately claim the&lt;br/&gt;     large HTLC. providing this confirms within 5 blocks, it will confirm&lt;br/&gt;     before the HTLC timelock expires, and Mallory will have been unable&lt;br/&gt;     to claim the funds.&lt;br/&gt;&lt;br/&gt;The only transactions Mallory could broadcast are:&lt;br/&gt;&lt;br/&gt;  prior to (1): UA.k (k &amp;lt;= n) -- However this allows Bob to immediately&lt;br/&gt;  broadcast one of either CA.n or RA.n, and will then have ~150 blocks&lt;br/&gt;  to claim the HTLC before its timeout&lt;br/&gt;&lt;br/&gt;  during (2): CA.n -- Again, this allows Bob to claim the HTLC&lt;br/&gt;  immediately, prior to its timeout&lt;br/&gt;&lt;br/&gt;The only delaying attack with repeated transactions comes if Bob&lt;br/&gt;broadcasts an old state UB.k (k &amp;lt; n), in which case Mallory can broadcast&lt;br/&gt;(n-k) WA.i watchtower transactions prior to finalising the state. However&lt;br/&gt;if Bob *only* has old state, Mallory can simply broadcast WA.n, at which&lt;br/&gt;point Bob can do nothing, as (by assumption) he doesn&amp;#39;t have access&lt;br/&gt;to current state and thus doesn&amp;#39;t have SB.n to broadcast it.&lt;br/&gt;&lt;br/&gt;&amp;gt; The attack scenario works in the following way: Malicia updates the Eltoo&lt;br/&gt;&amp;gt; channel N time, getting the possession of N update transactions. At block&lt;br/&gt;&amp;gt; A, she breaks the channel and confirms the update transaction 0 by&lt;br/&gt;&amp;gt; attaching a feerate equal to or superior to top mempool block space &#43; 1&lt;br/&gt;&amp;gt; sat. At each new block, she iterates by confirming the next update&lt;br/&gt;&amp;gt; transaction, i.e update transaction 1 at block A&#43;1, update transaction&lt;br/&gt;&amp;gt; transaction 2 at block A&#43;2, update transaction 3 at block A&#43;3, ...&lt;br/&gt;&lt;br/&gt;I think traditional eltoo envisages being able to spend update transaction&lt;br/&gt;1 immediately, without having to wait for the next block.  This might&lt;br/&gt;not be compatible with the version 3 relay rules that are being thought&lt;br/&gt;about, though, and presumably would hit ancestor limits.&lt;br/&gt;&lt;br/&gt;I think a simple way to avoid that problem would be for eltoo nodes&lt;br/&gt;to have a priority tx relay network -- if they see a channel close to&lt;br/&gt;state N, always replace any txs closing to an earlier state K&amp;lt;N, and&lt;br/&gt;always quickly relay that close to all other peers. There&amp;#39;s no reason&lt;br/&gt;to assume the bad guys have the best access to the network when we can&lt;br/&gt;write code so that the honest participants have it instead.&lt;br/&gt;&lt;br/&gt;&amp;gt; From Ned&amp;#39;s viewpoint, there is limited rationality of the network mempools,&lt;br/&gt;&amp;gt; as such each punishment transaction R, as it&amp;#39;s confirmation could have been&lt;br/&gt;&amp;gt; delay due to &amp;#34;honest&amp;#34; slow propagation on the network is likely to be&lt;br/&gt;&amp;gt; pre-signed with top mempool block space feerate, but not more to save on&lt;br/&gt;&amp;gt; fees. Therefore, transaction RN.0 should fail to punish update transaction&lt;br/&gt;&amp;gt; 0 as it&amp;#39;s double-spent by update transaction 1, transaction RN.1 should&lt;br/&gt;&amp;gt; fail to punish update transaction 1 as it&amp;#39;s double-spent by update&lt;br/&gt;&amp;gt; transaction 2, transaction RN.2 should fail to punish update transaction 2&lt;br/&gt;&amp;gt; as it&amp;#39;s double-spent by update transaction 3...&lt;br/&gt;&lt;br/&gt;In the two-party scheme, the only transaction Mallory can broadcast&lt;br/&gt;after sending UA.k and having it confirmed on chain is SA.k, and that&lt;br/&gt;only after a 144 block relative timelock. UA.(k&#43;1) etc only spend the&lt;br/&gt;funding output, but that has already been spent by UA.k.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:07:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs83flgs87luhxpwtzgpg9gzhjrv8cf28vnql7nhf66wpkv0uwa6vgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kht2awe</id>
    
      <title type="html">📅 Original date posted:2022-09-26 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs83flgs87luhxpwtzgpg9gzhjrv8cf28vnql7nhf66wpkv0uwa6vgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kht2awe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsre3ejv3fuz03cxrzm4hygjghz4rn0jervdevly9t8fwyqt88rvjqyej4ss&#39;&gt;nevent1q…j4ss&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-26&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, Sep 26, 2022 at 01:26:57AM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; * you&amp;#39;re providing a way of throttling payment traffic independent of&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; fees -- since fees are competitive, they can have discontinuous effects&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; where a small change to fee can cause a large change to traffic volume;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; but this seems like it should mostly have a proportional response,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; with a small decrease in htlc_max_msat resulting in a small decrease in&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; payment volume, and conversely. Much better for stability/optimisation!&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; This may depend on what gets popular for sender algorithms.&lt;br/&gt;&amp;gt; &amp;gt; Senders may quantize their payments, i.e. select a &amp;#34;standard&amp;#34; value and divide all payments into multipath sub-payments of this value.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think that&amp;#39;s really the case. &lt;br/&gt;&lt;br/&gt;One option is that you quantize based on the individual payment -- you&lt;br/&gt;want to send $100, great, your software splits it into 50x $2 payments,&lt;br/&gt;and routes them. But that doesn&amp;#39;t have an all or nothing effect: if you&lt;br/&gt;reject anything over $1.99, then instead of routing 1/50th of payments&lt;br/&gt;up to $100, you&amp;#39;re routing 1/50th of payments up to $99.50.&lt;br/&gt;&lt;br/&gt;The other approach is to quantize by some fixed value no matter what the&lt;br/&gt;payment is (maybe for better privacy?). I don&amp;#39;t think that&amp;#39;s a good idea&lt;br/&gt;in the first place -- it trades off maybe a small win for your privacy&lt;br/&gt;for using up everyone else&amp;#39;s HTLC slots -- but if it is, it&amp;#39;ll need to be&lt;br/&gt;quite a small value so as not to force you to round up the overall payment&lt;br/&gt;too much, and to allow small payments in the first place. But in that case&lt;br/&gt;most channels will have their html_max_msat well above that value anyway.&lt;br/&gt;&lt;br/&gt;&amp;gt; Basically, the intuition &amp;#34;small decrease in `htlc_max_msat` == small decrease in payment volume&amp;#34; inherently assumes that HTLC sizes have a flat distribution across all possible sizes.&lt;br/&gt;&lt;br/&gt;The intuition is really the other way around: if you want a stable,&lt;br/&gt;decentralised network, then you need the driving decision on routing to&lt;br/&gt;be something other than just &amp;#34;who&amp;#39;s cheaper by 0.0001%&amp;#34; -- otherwise&lt;br/&gt;everyone just chooses the same route at all times (which becomes&lt;br/&gt;centralised towards the single provider who can best monetise forwarding&lt;br/&gt;via something other than fees), and probably that route quickly becomes&lt;br/&gt;unusable due to being drained (which isn&amp;#39;t stable).&lt;br/&gt;&lt;br/&gt;(But of course, I hadn&amp;#39;t had any ideas on what such a thing could be,&lt;br/&gt;otherwise I&amp;#39;d have suggested something like this earlier!)&lt;br/&gt;&lt;br/&gt;So, to extend the intuition further: that means that if using&lt;br/&gt;htlc_max_msat as a valve/throttle can fill that role, then that&amp;#39;s a reason&lt;br/&gt;to not do weird things like force every HTLC to be 2**n msats or similar.&lt;br/&gt;&lt;br/&gt;If there is a conflict, far better to have a lightning network that&amp;#39;s&lt;br/&gt;decentralised, stable, and doesn&amp;#39;t require node operators to spy on&lt;br/&gt;transactions to pay for their servers.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s not quite as bad as you suggest though -- the payment sizes&lt;br/&gt;don&amp;#39;t need to have a flat distribution, they only need to have a&lt;br/&gt;smooth/continuous distribution.&lt;br/&gt;&lt;br/&gt;&amp;gt; * Coffee or other popular everyday product may settle on a standard price, which again implies a spike around that standard price.&lt;br/&gt;&lt;br/&gt;Imagine the price of coffee is $5, and you find three potential paths &lt;br/&gt;to pay for that coffee:&lt;br/&gt;&lt;br/&gt;  Z -&amp;gt; A -&amp;gt; X&lt;br/&gt;  Z -&amp;gt; B -&amp;gt; C -&amp;gt; X&lt;br/&gt;  Z -&amp;gt; B -&amp;gt; D -&amp;gt; X&lt;br/&gt;&lt;br/&gt;(I think you choose both the fee and max_msat for Z-&amp;gt;A and Z-&amp;gt;B hops,&lt;br/&gt;so we&amp;#39;ll assume they&amp;#39;re 0%/infinite, respectively)&lt;br/&gt;&lt;br/&gt;Suppose the fee on AX is 0.01%, and the total fee for BCX is 0.02%&lt;br/&gt;and the total fee for BDX is 0.1%.&lt;br/&gt;&lt;br/&gt;If AX&amp;#39;s max_msat is $5, they&amp;#39;ll get the entire transaction. If it&amp;#39;s&lt;br/&gt;$4.99, you might instead optimise fees by doing AMP: send $4.99 through&lt;br/&gt;AX and $0.01 through BCX, for a total fee rate of 0.01002%.&lt;br/&gt;&lt;br/&gt;If everyone quantizes at 10c (500sat?) instead of 1c (50sat?) or lower&lt;br/&gt;then that just means instead of getting maybe a 0.2% reduction in payment&lt;br/&gt;flow, AX gets a 2% reduction in payment flow.&lt;br/&gt;&lt;br/&gt;Likewise, if AX&amp;#39;s max_msat is $1, BCX&amp;#39;s max_msat is $3, and BDX&amp;#39;s max_msat&lt;br/&gt;is $20, then you split your payment up as $1/$3/$1 and pay a fee of&lt;br/&gt;0.034%. Meanwhile AX&amp;#39;s payment flow has been reduced by perhaps 80%&lt;br/&gt;(if everyone&amp;#39;s buying $5 coffees), and BCX&amp;#39;s by perhaps 25% (from $4 to&lt;br/&gt;$3), allowing them to maintain balanced channels.&lt;br/&gt;&lt;br/&gt;&amp;gt; So the reliability of `htlc_max_msat` as a valve is dependent on market forces, and may be as non-linear as feerates, which *are* the sum total of the market force.&lt;br/&gt;&lt;br/&gt;No: without some sort of external throttle, fees have a tendency to be all&lt;br/&gt;or nothing. If there&amp;#39;s no metric other than fees, why would I ever choose&lt;br/&gt;to pay 0.02% (let alone 0.1%!) in fees? And if a new path comes along&lt;br/&gt;offering a fee rate of 0.00999% fees, why would I continue paying 0.01%?&lt;br/&gt;&lt;br/&gt;Even if everyone does start quantizing their payments -- and does so with&lt;br/&gt;an almost 6 order of magnitude jump from 1msat to 500sats -- you&amp;#39;re only&lt;br/&gt;implying traffic bumps of perhaps 2% when tweaking parameters that are&lt;br/&gt;near important thresholds, rather than 100%.&lt;br/&gt;&lt;br/&gt;&amp;gt; Feerates on the other hand are always going to be something that senders optimize for, [...]&lt;br/&gt;&lt;br/&gt;Sure, but that can&amp;#39;t be the end of the story, since it has a clear winner&lt;br/&gt;that everyone immediately agrees upon, and there&amp;#39;s no point anyone else&lt;br/&gt;participating in trying to route lightning transactions.&lt;br/&gt;&lt;br/&gt;There&amp;#39;s plenty of other possible throttling mechanisms: at the very least,&lt;br/&gt;senders can *not* optimise for fees, and instead randomly select routes&lt;br/&gt;within a budget; or you can maintain external &amp;#34;reliability&amp;#34; scores for&lt;br/&gt;nodes and factor those in along with fee rates.&lt;br/&gt;&lt;br/&gt;What&amp;#39;s novel and interesting about this approach (IMO) is it&amp;#39;s one that&lt;br/&gt;the channel operator can use directly (so the person who&amp;#39;s meant to know&lt;br/&gt;the private channel state is making the decision that depends on the&lt;br/&gt;private channel state), and that they don&amp;#39;t have a particular incentive&lt;br/&gt;to lie about (with random choice, maybe you want to pretend you have many&lt;br/&gt;nodes/channels so you get selected more often; if reliability is factored&lt;br/&gt;in, maybe you&amp;#39;re tempted to pretend to be more reliable than you are).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:06:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsy38k2xcv27crfhfgc4u23v4lvec2qzvwmvn66ju4wxgzalls7h2czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kaw02dq</id>
    
      <title type="html">📅 Original date posted:2022-09-24 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy38k2xcv27crfhfgc4u23v4lvec2qzvwmvn66ju4wxgzalls7h2czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kaw02dq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswlq0wchxkeqanejykle9nttwgr285uadgupezu8wxfvzzjlqx0wspc60qv&#39;&gt;nevent1q…60qv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-24&lt;br/&gt;📝 Original message:&lt;br/&gt;On Fri, Sep 23, 2022 at 03:13:53PM -0500, lisa neigut wrote:&lt;br/&gt;&amp;gt; Some interesting points here. Will try to respond to some of them.&lt;br/&gt;&amp;gt; &amp;gt; pathfinding algorithms which depend on unscalable data collection&lt;br/&gt;&amp;gt; Failed payment attempts are indistinguishable from data collection probing.&lt;br/&gt;&lt;br/&gt;Even so, data collection probing is *preferable* -- it can happen out&lt;br/&gt;of band, and doesn&amp;#39;t need to cause latency when you&amp;#39;re trying to finish&lt;br/&gt;paying for your coffee so you can sit down and get back to doomscrolling.&lt;br/&gt;&lt;br/&gt;In general: if you need to know channel capacities to efficiently make&lt;br/&gt;payments, doesn&amp;#39;t that fundamentally mean that that information should&lt;br/&gt;be gossipped?&lt;br/&gt;&lt;br/&gt;For instance, in a world where everyone&amp;#39;s doing rate cards, maybe every&lt;br/&gt;channel is advertising fees at -0.05, &#43;0.01, &#43;0.1, &#43;1.0 bps because that&amp;#39;s&lt;br/&gt;just what turns out to be &amp;#34;best&amp;#34;. But then when you&amp;#39;re trying to find a&lt;br/&gt;route, it becomes critically important to know which channels are at which&lt;br/&gt;capacity quartile. If you&amp;#39;re not gossipping that information, then someone&lt;br/&gt;making a payment needs to either probe every plausible path, or subscribe&lt;br/&gt;to an information provider that is regularly probing every channel.&lt;br/&gt;&lt;br/&gt;I still think what I wrote in June applies; from [0], what you want&lt;br/&gt;to maintain is a balanced flow over time, not any particular channel&lt;br/&gt;balance -- so collecting less fees at 25% balance than at 75% balance&lt;br/&gt;is generally a false optimisation; and from [1], having fee rate cards&lt;br/&gt;that just depend on time of day/week is probably a much better method of&lt;br/&gt;optimising for what actually matters -- &amp;#34;these are the times my channel&lt;br/&gt;is in high demand in this direction, so fees are high; these are the&lt;br/&gt;times demand is low, so fees are low&amp;#34;.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-June/003624.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-June/003624.html&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-June/003627.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-June/003627.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; I like to think that the introduction of negative fees make channel&lt;br/&gt;&amp;gt; balance data a competitive advantage and will actually cause node&lt;br/&gt;&amp;gt; operators to more closely guard their balances / the balance data&lt;br/&gt;&amp;gt; they&amp;#39;ve collected about peers, which should hopefully reduce the current&lt;br/&gt;&amp;gt; trend of sharing this information with centralized parties.&lt;br/&gt;&lt;br/&gt;Having fees depend on the channel balance makes the data a competitive&lt;br/&gt;advantage to the people trying to use the channel; for the channel owner,&lt;br/&gt;the optimal situation is everyone knows the balance, so that more payments&lt;br/&gt;get routed over the channel (because people don&amp;#39;t overestimate the fee&lt;br/&gt;rate). That encourages channel owners to broadcast the information,&lt;br/&gt;not keep it private. If they can&amp;#39;t broadcast it, that just creates a&lt;br/&gt;market for centralised information brokers...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:06:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqsjztnpm4s2sy9gukzh90mvhe2tpjzj9e7c2f9j3r68lsk6x0e0gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6xkwrr</id>
    
      <title type="html">📅 Original date posted:2022-06-29 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqsjztnpm4s2sy9gukzh90mvhe2tpjzj9e7c2f9j3r68lsk6x0e0gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6xkwrr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszyaqr8pcjeee5jctfq6qxfmqfp06sclw5uyklv73z6m4kjjcdphgupsk7t&#39;&gt;nevent1q…sk7t&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-06-29&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sun, Jun 05, 2022 at 02:29:28PM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&lt;br/&gt;Just sharing my thoughts on this.&lt;br/&gt;&lt;br/&gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;           Optimize for reliability&#43;&lt;br/&gt;&amp;gt;            uncertainty&#43;fee&#43;drain&#43;uptime...&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;              /              \&lt;br/&gt;&amp;gt;             /                \&lt;br/&gt;&amp;gt;         _--&amp;#39;                  `--_&lt;br/&gt;&amp;gt;         Just                  Just&lt;br/&gt;&amp;gt;       optimize              optimize&lt;br/&gt;&amp;gt;         for                   for&lt;br/&gt;&amp;gt;       low fee               low fee&lt;br/&gt;&lt;br/&gt;I think ideally you want to optimise for some combination of fee, speed&lt;br/&gt;and reliability (both liklihood of a clean failure that you can retry&lt;br/&gt;and of generating stuck payments). As Matt/Peter suggest in another&lt;br/&gt;thread, maybe for some uses you can accept low speed for low fees,&lt;br/&gt;while in others you&amp;#39;d rather pay more and get near-instant results. I&lt;br/&gt;think drain should just go to fee, and uncertainty/uptime are just ways&lt;br/&gt;of estimating reliability.&lt;br/&gt;&lt;br/&gt;It might be reasonable to generate local estimates for speed/reliability&lt;br/&gt;by regularly sending onion messages or designed-to-fail htlcs.&lt;br/&gt;&lt;br/&gt;Sorry if that makes me a midwit :)&lt;br/&gt;&lt;br/&gt;&amp;gt; Rene Pickhardt also presented the idea of leaking friend-of-a-friend balances, to help payers increase their payment reliability.&lt;br/&gt;&lt;br/&gt;I think foaf (as opposed to global) gossip of *fee rates* is a very&lt;br/&gt;interesting approach to trying to give nodes more *current* information,&lt;br/&gt;without flooding the entire network with more traffic than it can&lt;br/&gt;cope with.&lt;br/&gt;&lt;br/&gt;&amp;gt; Now we can consider that *every channel is a marketplace*.&lt;br/&gt;&amp;gt; What is being sold is the sats inside the channel.&lt;br/&gt;&lt;br/&gt;(Really, the marketplace is a channel pair (the incoming channel and&lt;br/&gt;the outgoing channel), and what&amp;#39;s being sold is their relative balance)&lt;br/&gt;&lt;br/&gt;&amp;gt; So my concrete proposal is that we can do the same friend-of-a-friend balance leakage proposed by Rene, except we leak it using *existing* mechanisms --- i.e. gossiping a `channel_update` with new feerates adjusted according to the supply on the channel --- rather than having a new message to leak friend-of-a-friend balance directly.&lt;br/&gt;&lt;br/&gt;&#43;42&lt;br/&gt;&lt;br/&gt;&amp;gt; Because we effectively leak the balance of channels by the feerates on the channel, this totally leaks the balance of channels.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is true -- you ideally want to adjust fees not to&lt;br/&gt;maintain a balanced channel (50% on each side), but a balanced *flow*&lt;br/&gt;(1:1 incoming/outgoing payment volume) -- it doesn&amp;#39;t really matter if&lt;br/&gt;you get the balanced flow that results in an average of a 50:50, 80:20&lt;br/&gt;or 20:80 ratio of channel balances (at least, it doesn&amp;#39;t as long as your&lt;br/&gt;channel capacity is 10 or 100 times the payment size, and your variance&lt;br/&gt;is correspondingly low).&lt;br/&gt;&lt;br/&gt;Further, you have two degrees of freedom when setting fee rates: one&lt;br/&gt;is how balanced the flows are, which controls how long your channel can&lt;br/&gt;remain useful, but the other is how *much* flow there is -- if halving&lt;br/&gt;your fee rate doubles the flow rate in sats/hour, then that will still&lt;br/&gt;increase your profit. That also doesn&amp;#39;t leak balance information.&lt;br/&gt;&lt;br/&gt;&amp;gt; ### Inverting The Filter: Feerate Cards&lt;br/&gt;&amp;gt; Basically, a feerate card is a mapping between a probability-of-success range and a feerate.&lt;br/&gt;&amp;gt; * 00%-&amp;gt;25%: -10ppm&lt;br/&gt;&amp;gt; * 26%-&amp;gt;50%: 1ppm&lt;br/&gt;&amp;gt; * 51%-&amp;gt;75%: 5ppm&lt;br/&gt;&amp;gt; * 76%-&amp;gt;100%: 50ppm&lt;br/&gt;&lt;br/&gt;Feerate cards don&amp;#39;t really make sense to me; &amp;#34;probability of success&amp;#34;&lt;br/&gt;isn&amp;#39;t a real measure the payer can use -- naively, if it were, they could&lt;br/&gt;just retry at 1ppm 10 times and get to 95% chances of success. But if&lt;br/&gt;they can afford to retry (background rebalancing?), they might as well&lt;br/&gt;just try at -10ppm, 1ppm, 5ppm, 10ppm (or perhaps with a binary search?),&lt;br/&gt;and see if they&amp;#39;re lucky; but if they want a 1s response time, and can&amp;#39;t&lt;br/&gt;afford retries, what good is even a 75% chance of success if that&amp;#39;s the&lt;br/&gt;individual success rate on each hop of their five hop path?&lt;br/&gt;&lt;br/&gt;And if you&amp;#39;re not just going by odds of having to retry, then you need to&lt;br/&gt;get some current information about the channel to plug into the formula;&lt;br/&gt;but if you&amp;#39;re getting *current* information, why not let that information&lt;br/&gt;be the feerate directly?&lt;br/&gt;&lt;br/&gt;&amp;gt; More concretely, we set some high feerate, impose some kind of constant &amp;#34;gravity&amp;#34; that pulls down the feerate over time, then we measure the relative loss of outgoing liquidity to serve as &amp;#34;lift&amp;#34; to the feerate.&lt;br/&gt;&lt;br/&gt;If your current fee rate is F (ppm), and your current volume (flow) is V&lt;br/&gt;(sats forwarded per hour), then your profit is FV. If dropping your fee&lt;br/&gt;rate by dF (&amp;lt;0) results in an increase of V by dV (&amp;gt;0), then you want:&lt;br/&gt;&lt;br/&gt;   (F&#43;dF)(V&#43;dV) &amp;gt; FV&lt;br/&gt;   FV &#43; VdF &#43; FdV &#43; dFdV &amp;gt; FV&lt;br/&gt;   FdV &amp;gt; -VdF&lt;br/&gt;   dV/dF &amp;lt; -V/F (flip the inequality because dF is negative)&lt;br/&gt;&lt;br/&gt;   (dV/V)/(dF/F) &amp;lt; -1  (fee-elasticity of volume is in the elastic&lt;br/&gt;                        region)&lt;br/&gt;&lt;br/&gt;(&amp;lt;-1 == elastic == flow changes more than the fee does == drop the fee&lt;br/&gt;rate; &amp;gt;-1 == ineleastic == flow changes less than the fee does == raise&lt;br/&gt;the fee rate; =-1 == unit elastic == you&amp;#39;ve found a locally optimal&lt;br/&gt;fee rate)&lt;br/&gt;&lt;br/&gt;You could optimise base fee in the same way, if you set F to be sats/tx&lt;br/&gt;and V to be txs/hour, but then you&amp;#39;re trying to optimise two variables&lt;br/&gt;on a 2 dimensional plane, which is harder. So probably better to do&lt;br/&gt;zero base fees and just set it to 0 and ignore it, or use your actual&lt;br/&gt;computation costs -- perhaps about 20msat if you&amp;#39;re paying $100USD/month&lt;br/&gt;for your lightning node, a channel update takes 10ms, each forwarded HTLC&lt;br/&gt;accounts for 4 updates, 2 on the incoming channel, 2 on the outgoing,&lt;br/&gt;with no batching, and only 40% of payments are successful, at $20k/BTC.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s likely more important to have balanced flows than maximally&lt;br/&gt;profitable ones though, as that&amp;#39;s what allows you to keep your channel&lt;br/&gt;open. That&amp;#39;s probably pretty hard to optimise, since a changed fee on&lt;br/&gt;one channel will affect the volume on ther channels as well.&lt;br/&gt;&lt;br/&gt;Relatedly:&lt;br/&gt;&lt;br/&gt;&amp;gt; I want to propose that all published nodes support some kind of&lt;br/&gt;&amp;gt; onchain/offchain swap capability.&lt;br/&gt;&lt;br/&gt;If you&amp;#39;re running a forwarding node, and collecting fees for forwarding,&lt;br/&gt;considered in net your channels won&amp;#39;t be balanced: the fees you collect&lt;br/&gt;are all coming in, and there&amp;#39;s nothing to compensate for that. Having some&lt;br/&gt;way to send those fees &amp;#34;out&amp;#34; is necessary to keep your channels balanced&lt;br/&gt;and avoid the need to have to close them. Having a swap capability like&lt;br/&gt;this is perhaps a relatively easy way to be able to (automatically)&lt;br/&gt;fix imbalances caused by collecting fees, and thus preserve your older&lt;br/&gt;channels.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:06:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv5caew5m3am36fsrn885kunl6hdyysz0kfsuqgtuj72car66pf6czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ks7syqu</id>
    
      <title type="html">📅 Original date posted:2021-12-21 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv5caew5m3am36fsrn885kunl6hdyysz0kfsuqgtuj72car66pf6czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ks7syqu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxpnch8uctppln9rpthq8d7207cma9gzx3qnzv260n2mhxjn6qangf6v8kk&#39;&gt;nevent1q…v8kk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-21&lt;br/&gt;📝 Original message:&lt;br/&gt;On Tue, Dec 21, 2021 at 04:25:41PM &#43;0100, Bastien TEINTURIER wrote:&lt;br/&gt;&amp;gt; The reason we have &amp;#34;toxic waste&amp;#34; with HTLCs is because we commit to the&lt;br/&gt;&amp;gt; payment_hash directly inside the transaction scripts, so we need to&lt;br/&gt;&amp;gt; remember all the payment_hash we&amp;#39;ve seen to be able to recreate the&lt;br/&gt;&amp;gt; scripts (and spend the outputs, even if they are revoked).&lt;br/&gt;&lt;br/&gt;I think &amp;#34;toxic waste&amp;#34; refers to having old data around that, if used,&lt;br/&gt;could cause you to lose all the funds in your channel -- that&amp;#39;s why it&amp;#39;s&lt;br/&gt;toxic. This is more just regular landfill :)&lt;br/&gt;&lt;br/&gt;&amp;gt; *_anchor: dust, who cares -- might be better if local_anchor used key =&lt;br/&gt;&amp;gt; &amp;gt; revkey&lt;br/&gt;&amp;gt; I don&amp;#39;t think we can use revkey, &lt;br/&gt;&lt;br/&gt;musig(revkey, remote_key) &lt;br/&gt;  --&amp;gt; allows them to spend after you&amp;#39;ve revealed the secret for revkey&lt;br/&gt;      you can never spend because you&amp;#39;ll never know the secret for&lt;br/&gt;      remote_key&lt;br/&gt;&lt;br/&gt;but if you just say:&lt;br/&gt;&lt;br/&gt;(revkey)&lt;br/&gt;&lt;br/&gt;then you can spend (because you know revkey) immediately (because it&amp;#39;s&lt;br/&gt;an anchor output, so intended to be immediately spent) or they can spend&lt;br/&gt;if it&amp;#39;s an obsolete commitment and you&amp;#39;ve revealed the revkey secret.&lt;br/&gt;&lt;br/&gt;&amp;gt; this would prevent us from bumping the&lt;br/&gt;&amp;gt; current remote commitment if it appears on-chain (because we don&amp;#39;t know&lt;br/&gt;&amp;gt; the private revkey yet if this is the latest commitment). Usually the&lt;br/&gt;&amp;gt; remote peer should bump it, but if they don&amp;#39;t, we may want to bump it&lt;br/&gt;&amp;gt; ourselves instead of publishing our own commitment (where our main&lt;br/&gt;&amp;gt; output has a long CSV).&lt;br/&gt;&lt;br/&gt;If we&amp;#39;re going to bump someone else&amp;#39;s commitment, we&amp;#39;ll use the&lt;br/&gt;remote_anchor they provided, not the local_anchor, so I think this is&lt;br/&gt;fine (as long as I haven&amp;#39;t gotten local/remote confused somewhere along&lt;br/&gt;the way).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:04:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf7fwkfqu8zlplf67h3w42rwsm635vma2apl694ypm0dhrmavnu9qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kvp3jhu</id>
    
      <title type="html">📅 Original date posted:2021-12-09 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf7fwkfqu8zlplf67h3w42rwsm635vma2apl694ypm0dhrmavnu9qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kvp3jhu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswpj285egn0d9yelt535gjj6e3mmf38vq7faerrvkul3478uja3hs0wkcs7&#39;&gt;nevent1q…kcs7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-09&lt;br/&gt;📝 Original message:&lt;br/&gt;On Thu, Dec 09, 2021 at 12:34:00PM &#43;1100, Lloyd Fournier wrote:&lt;br/&gt;&amp;gt; I wanted to add a theoretical note that you might be aware of. The final&lt;br/&gt;&amp;gt; message &amp;#34;Bob -&amp;gt; Alice: revoke_and_ack&amp;#34; is not strictly necessary. Alice&lt;br/&gt;&amp;gt; does not care about Bob revoking a commit tx that gives her strictly more&lt;br/&gt;&amp;gt; coins.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s true if Alice is only sending new tx&amp;#39;s paying Bob; and Rusty&amp;#39;s&lt;br/&gt;examples in the `option_simplified_update` proposal do only include new&lt;br/&gt;HTLCs...&lt;br/&gt;&lt;br/&gt;But I think it&amp;#39;s intended to cover *all* update messages, and if Alice is&lt;br/&gt;also including any `update_fulfill_htlc` or `update_fail_htlc` messages in&lt;br/&gt;the commitment, she&amp;#39;s potentially gaining funds, both for the amount of&lt;br/&gt;fees she saves by avoiding extra transactions, but for the fulfill case,&lt;br/&gt;potentially also because she doesn&amp;#39;t need to worry about the fulfilled&lt;br/&gt;htlc reaching its timeout.&lt;br/&gt;&lt;br/&gt;Actually, as an alternative to the `option_simplified_update` approach,&lt;br/&gt;has anyone considered an approach more like this:&lt;br/&gt;&lt;br/&gt; * each node can unilaterally send various messages that always update&lt;br/&gt;   the state, eg:&lt;br/&gt;     &#43; new htlc/ptlc paying the other node (update_add_htlc)&lt;br/&gt;     &#43; secret reveal of htlc/ptlc paying self (update_fulfil_htlc)&lt;br/&gt;     &#43; rejection of htlc/ptlc paying self (update_fail_htlc)&lt;br/&gt;     &#43; timeout of htlc/ptlc paying the other node (not currently allowed?)&lt;br/&gt;     &#43; update the channel fee rate (update_fee)&lt;br/&gt;&lt;br/&gt; * continue to allow these to occur at any time, asynchronously, but&lt;br/&gt;   to make it easier to keep track of them, add a uint64_t counter&lt;br/&gt;   to each message, that each peer increments by 1 for each message.&lt;br/&gt;&lt;br/&gt; * each channel state (n) then corresponds to the accumulation of&lt;br/&gt;   updates from each each peer, up to message (a) for Alice, and message&lt;br/&gt;   (b) for Bob.&lt;br/&gt;&lt;br/&gt; * so when updating to a new commitment (n&#43;1), the proposal message&lt;br/&gt;   should just include both update values (a&amp;#39;) and (b&amp;#39;)&lt;br/&gt;&lt;br/&gt; * nodes can then track the state by having a list of&lt;br/&gt;   htlcs/ptlcs/balances, etc for state (n), and a list of unapplied&lt;br/&gt;   update messages for themselves and the other party (a&#43;1,...,a&amp;#39;) and&lt;br/&gt;   (b&#43;1,...,b&amp;#39;), and apply them in order when constructing the new state&lt;br/&gt;   (n&#43;1) for a new commitment signing round&lt;br/&gt;&lt;br/&gt;I think that retains both the interesting async bits (anyone can queue&lt;br/&gt;state updates immediately) but also makes it fairly simple to maintain&lt;br/&gt;the state?&lt;br/&gt;&lt;br/&gt;&amp;gt; Bob&amp;#39;s new commit tx can use the same revocation key as the previous&lt;br/&gt;&amp;gt; one&lt;br/&gt;&lt;br/&gt;That&amp;#39;s a neat idea, but I think the fail/fulfill messages break it.&lt;br/&gt;_But_ I think that means it would still be an interesting technique to&lt;br/&gt;use for fast forwards which get updated for every add message...&lt;br/&gt;&lt;br/&gt;&amp;gt; Not sending messages you don&amp;#39;t need to is usually&lt;br/&gt;&amp;gt; both more performant and simpler &lt;br/&gt;&lt;br/&gt;The extra message from Bob allows Alice to discard the adaptor sigs&lt;br/&gt;associated with the old state, which I think is probably worthwhile&lt;br/&gt;anyway?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:04:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9uu6t33pn8dep9hlzsthsffyz49mgcth9jhv6frdv6n0gna5kgcszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kdhg9y6</id>
    
      <title type="html">📅 Original date posted:2021-12-08 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9uu6t33pn8dep9hlzsthsffyz49mgcth9jhv6frdv6n0gna5kgcszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kdhg9y6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdvzr9lmyx3ua3gp5cr8xwmfcjydgvpan5xr7dfc3ezpuptdxgjjsyhgkp7&#39;&gt;nevent1q…gkp7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-08&lt;br/&gt;📝 Original message:&lt;br/&gt;On Tue, Dec 07, 2021 at 11:52:04PM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt; Alternately, fast-forwards, which avoid this because it does not change commitment transactions on the payment-forwarding path.&lt;br/&gt;&amp;gt; You only change commitment transactions once you have enough changes to justify collapsing them.&lt;br/&gt;&lt;br/&gt;I think the problem t-bast describes comes up here as well when you&lt;br/&gt;collapse the fast-forwards (or, anytime you update the commitment&lt;br/&gt;transaction even if you don&amp;#39;t collapse them).&lt;br/&gt;&lt;br/&gt;That is, if you have two PTLCs, one from A-&amp;gt;B conditional on X, one&lt;br/&gt;from B-&amp;gt;A conditional on Y. Then if A wants to update the commitment tx,&lt;br/&gt;she needs to&lt;br/&gt;&lt;br/&gt;  1) produce a signature to give to B to spend the funding tx&lt;br/&gt;  2) produce an adaptor signature to authorise B to spend via X from his&lt;br/&gt;     commitment tx&lt;br/&gt;  3) produce a signature to allow B to recover Y after timeout from his&lt;br/&gt;     commitment tx spending to an output she can claim if he cheats&lt;br/&gt;  4) *receive* an adaptor signature from B to be able to spend the Y output&lt;br/&gt;     if B posts his commitment tx using A&amp;#39;s signature in (1)&lt;br/&gt;&lt;br/&gt;The problem is, she can&amp;#39;t give B the result of (1) until she&amp;#39;s received&lt;br/&gt;(4) from B.&lt;br/&gt;&lt;br/&gt;It doesn&amp;#39;t matter if the B-&amp;gt;A PTLC conditional on Y is in the commitment&lt;br/&gt;tx itself or within a fast-forward child-transaction -- any previous&lt;br/&gt;adaptor sig will be invalidated because there&amp;#39;s a new commitment&lt;br/&gt;transaction, and if you allowed any way of spending without an adaptor&lt;br/&gt;sig, B wouldn&amp;#39;t be able to recover the secret and would lose funds.&lt;br/&gt;&lt;br/&gt;It also doesn&amp;#39;t matter if the commitment transaction that A and B will&lt;br/&gt;publish is the same or different, only that it&amp;#39;s different from the&lt;br/&gt;commitment tx that previous adaptor sigs committed to. (So ANYPREVOUT&lt;br/&gt;would fix this if it were available)&lt;br/&gt;&lt;br/&gt;So I think this is still a relevant question, even if fast-forwards&lt;br/&gt;make it a rare problem, that perhaps is only applicable to very heavily&lt;br/&gt;used channels.&lt;br/&gt;&lt;br/&gt;(I said the following in email to t-bast already)&lt;br/&gt;&lt;br/&gt;I think doing a synchronous update of commitments to the channel state,&lt;br/&gt;something like:&lt;br/&gt;&lt;br/&gt;   Alice -&amp;gt; Bob: propose_new_commitment&lt;br/&gt;       channel id&lt;br/&gt;       adaptor sigs for PTLCs to Bob&lt;br/&gt;&lt;br/&gt;   Bob -&amp;gt; Alice: agree_new_commitment&lt;br/&gt;       channel id&lt;br/&gt;       adaptor sigs for PTLCs to Alice&lt;br/&gt;       sigs for Alice to spend HTLCs and PTLCs to Bob from her own&lt;br/&gt;         commitment tx&lt;br/&gt;       signature for Alice to spend funding tx&lt;br/&gt;&lt;br/&gt;   Alice -&amp;gt; Bob: finish_new_commitment_1&lt;br/&gt;       channel id&lt;br/&gt;       sigs for Bob to spend HTLCs and PTLCs to Alice from his own&lt;br/&gt;         commitment tx&lt;br/&gt;       signature for Bob to spend funding tx&lt;br/&gt;       reveal old prior commitment secret&lt;br/&gt;       new commitment nonce&lt;br/&gt;&lt;br/&gt;   Bob -&amp;gt; Alice: finish_new_commitment_2&lt;br/&gt;       reveal old prior commitment secret&lt;br/&gt;       new commitment nonce&lt;br/&gt;&lt;br/&gt;would work pretty well.&lt;br/&gt;&lt;br/&gt;This adds half a round-trip compared to now:&lt;br/&gt;&lt;br/&gt;   Alice -&amp;gt; Bob: commitment_signed&lt;br/&gt;   Bob -&amp;gt; Alice: revoke_and_ack, commitment_signed&lt;br/&gt;   Alice -&amp;gt; Bob: revoke_and_ack&lt;br/&gt;&lt;br/&gt;The timings change like so:&lt;br/&gt;&lt;br/&gt;  Bob can use the new commitment after 1.5 round-trips (previously 0.5)&lt;br/&gt;&lt;br/&gt;  Alice can be sure Bob won&amp;#39;t use the old commitment after 2 round-trips&lt;br/&gt;  (previously 1)&lt;br/&gt;&lt;br/&gt;  Alice can use the new commitment after 1 round-trip (unchanged)&lt;br/&gt;&lt;br/&gt;  Bob can be sure Alice won&amp;#39;t use the old commitment after 1.5 round-trips&lt;br/&gt;  (unchanged -- note: this is what&amp;#39;s relevant for forwarding)&lt;br/&gt;&lt;br/&gt;Making the funding tx a musig setup would mean also supplying 64B&lt;br/&gt;of musig2 nonces along with the &amp;#34;adaptor sigs&amp;#34; in one direction,&lt;br/&gt;and providing the other side&amp;#39;s 64B of musig2 nonces back along with the&lt;br/&gt;(now partial) signature for spending the funding tx (a total of 256B of&lt;br/&gt;nonce data, not 128B).&lt;br/&gt;&lt;br/&gt;Because it keeps both peers&amp;#39; commitments synchronised to a single channel&lt;br/&gt;state, I think the same protocol should work fine with the revocable&lt;br/&gt;signatures on a single tx approach too, though I haven&amp;#39;t tried working&lt;br/&gt;through the details.&lt;br/&gt;&lt;br/&gt;Fast forwards would then be reducing the 2 round-trip protocol to&lt;br/&gt;update the state commitment to a 0.5 round-trip update, to reduce&lt;br/&gt;latency when forwarding by the same amount as before (1.5 round-trips&lt;br/&gt;to 0.5 round-trips).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:04:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf4r3tx2x3ky4gajzugkkmgfn0hhmgz8t6r3jnspkpnhzde23akkqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kdvsk2k</id>
    
      <title type="html">📅 Original date posted:2021-10-11 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf4r3tx2x3ky4gajzugkkmgfn0hhmgz8t6r3jnspkpnhzde23akkqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kdvsk2k" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsy4mjrgg4rz3t2wdzjjmp5tqg4p6ltxz9d7qetkl7cm6wha04pu6q3mlr05&#39;&gt;nevent1q…lr05&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-11&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sat, Oct 09, 2021 at 11:12:07AM &#43;1000, Anthony Towns wrote:&lt;br/&gt;&amp;gt;  2. The balance transaction - tracks the funding transaction, contains&lt;br/&gt;&amp;gt;     a &amp;#34;balance&amp;#34; output for each of the participants.&lt;br/&gt;&amp;gt;  3. The inflight transactions - spends a balance output from the balance&lt;br/&gt;&amp;gt;     transaction and provides outputs for any inflight htlc/ptlc transactions.&lt;br/&gt;&amp;gt;  4. Layered transactions - spends inflight htlc/ptlc outputs by revealing&lt;br/&gt;&amp;gt;     the preimage, while still allowing for the penalty path.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think the layering here quite works: if Alice forwarded a payment&lt;br/&gt;to Bob, with timeout T, then the only way she can be sure that she can&lt;br/&gt;either reclaim the funds or know the preimage by time T is to close the&lt;br/&gt;channel on-chain at time T-to_self_delay.&lt;br/&gt;&lt;br/&gt;Any time later than that, say T-to_self_delay&#43;x&#43;1, would allow Bob to&lt;br/&gt;post the inflight tx at T&#43;x (prior to Alice being able to claim her&lt;br/&gt;balance directly due to the to_self_delay) and then immediately post the&lt;br/&gt;layered transaction (4, above) revealing the preimage, and preventing&lt;br/&gt;Alice from claiming the refund.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:04:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfyvj2tvwg7ecuswzmruz492z86w8t6l0jpwahh0utghz2hgdwvpgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ktmn0kj</id>
    
      <title type="html">📅 Original date posted:2021-10-12 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfyvj2tvwg7ecuswzmruz492z86w8t6l0jpwahh0utghz2hgdwvpgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ktmn0kj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg3kkqkyd4t8m64uvn5vwdxzcx04eqhcyvnxf3tve2wsl4lz5966s35p6hm&#39;&gt;nevent1q…p6hm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, Oct 11, 2021 at 09:23:19PM &#43;1100, Lloyd Fournier wrote:&lt;br/&gt;&amp;gt; On Mon, 11 Oct 2021 at 17:30, Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;     I don&amp;#39;t think the layering here quite works: if Alice forwarded a payment&lt;br/&gt;&amp;gt;     to Bob, with timeout T, then the only way she can be sure that she can&lt;br/&gt;&amp;gt;     either reclaim the funds or know the preimage by time T is to close the&lt;br/&gt;&amp;gt;     channel on-chain at time T-to_self_delay.&lt;br/&gt;&amp;gt; This problem may not be as bad as it seems.&lt;br/&gt;&lt;br/&gt;Maybe you can break it down a little bit further. Consider *three*&lt;br/&gt;delays:&lt;br/&gt;&lt;br/&gt; 1) refund delay: how long you have before a payment attempt starts&lt;br/&gt;    getting refunded&lt;br/&gt;&lt;br/&gt; 2) channel recovery delay: how long you have to recover from node&lt;br/&gt;    failure to prevent an old state being committed to, potentially losing&lt;br/&gt;    your entire channel balance&lt;br/&gt;&lt;br/&gt; 3) payment recovery delay: how long you have to recover from node&lt;br/&gt;    failure to prevent losing funds due to a forwarded payment (eg,&lt;br/&gt;    Carol claimed the payment, while Alice claimed the refund, leaving&lt;br/&gt;    Bob out of pocket)&lt;br/&gt;&lt;br/&gt;(Note that if you allow payments up to the total channel balance, there&amp;#39;s&lt;br/&gt;not really any meaningful distinction between (2) and (3), at least in&lt;br/&gt;the worst case)&lt;br/&gt;&lt;br/&gt;With layered transactions, (2) and (3) are different -- if Bob&amp;#39;s node&lt;br/&gt;fails near the timeout, then both Alice and Carol drop to the blockchain,&lt;br/&gt;and Carol knows the preimage, Bob may have as little as the channel&lt;br/&gt;&amp;#34;delay&amp;#34; parameter to extract the preimage from Carol&amp;#39;s layered commitment&lt;br/&gt;tx to be able to post a layered commitment on top of Alice&amp;#39;s unilateral&lt;br/&gt;close to avoid being out of pocket.&lt;br/&gt;&lt;br/&gt;(Note that that&amp;#39;s a worst case -- Carol would normally reveal the preimage&lt;br/&gt;onchain earlier than just before the timeout, giving Bob more time to&lt;br/&gt;recover his node and claim the funds from Alice)&lt;br/&gt;&lt;br/&gt;If you&amp;#39;re willing to accept that &amp;#34;worst case&amp;#34; happening more often, I&lt;br/&gt;think you could then retain the low latency forwarding, by having the&lt;br/&gt;transaction structure be:&lt;br/&gt;&lt;br/&gt;commitment tx&lt;br/&gt;  input:&lt;br/&gt;     funding tx&lt;br/&gt;  outputs:&lt;br/&gt;     Alice&amp;#39;s balance&lt;br/&gt;     (others)&lt;br/&gt;&lt;br/&gt;low-latency inflight tx:&lt;br/&gt;  input:&lt;br/&gt;    Alice&amp;#39;s balance&lt;br/&gt;  output:&lt;br/&gt;    (1) or (2)&lt;br/&gt;    Alice&amp;#39;s remaining balance&lt;br/&gt;&lt;br/&gt;Bob claim:&lt;br/&gt;  input:&lt;br/&gt;    (1) [&amp;lt;payment-recovery-delay&amp;gt; CSV bob CHECKSIG]&lt;br/&gt;  output:&lt;br/&gt;    [&amp;lt;bob-revoke&amp;gt; checksigverify &amp;lt;alice&amp;gt; checksig&lt;br/&gt;     ifdup notif &amp;lt;channel-recovery-delay&amp;gt; csv endif]&lt;br/&gt;&lt;br/&gt;Too-slow:&lt;br/&gt;  input:&lt;br/&gt;    (2) [&amp;lt;payment-timeout&amp;gt; CLTV alice CHECKSIG]&lt;br/&gt;  output:&lt;br/&gt;    Alice&lt;br/&gt;&lt;br/&gt;The idea being:&lt;br/&gt;&lt;br/&gt; * Alice sends the low-latency inflight tx which Bob then forwards&lt;br/&gt;   immediately.&lt;br/&gt;&lt;br/&gt; * Bob then tries to update the base channel state with Alice, so both&lt;br/&gt;   sides have a commitment to the new payment, and the low-latency&lt;br/&gt;   inflight tx is voided (since it&amp;#39;s based on a revoked channel state)&lt;br/&gt;   If this succeeds, everything is fine as usual.&lt;br/&gt;&lt;br/&gt; * If Alice is unavailable to confirm that update, Bob closes the&lt;br/&gt;   channel prior to (payment-timeout - payment-recover-delay), and posts&lt;br/&gt;   &amp;#34;Bob claim&amp;#34;. After an additional pyment recovery delay (and prior&lt;br/&gt;   to payment-timeout) Bob posts Bob claim, ensuring that the only way&lt;br/&gt;   Alice can claim the funds is if he had posted a revoked state.&lt;br/&gt;&lt;br/&gt; * In this case, Alice has at least one payment-recovery-delay period&lt;br/&gt;   prior to the payment-timeout to notice the transaction onchain and&lt;br/&gt;   recover the preimage.&lt;br/&gt;&lt;br/&gt; * If Bob posted the low-latency inflight tx later than&lt;br/&gt;   (payment-timeout - payment-recovery-delay) then Alice will have&lt;br/&gt;   payment-recovery-delay time to notice and post the &amp;#34;too-slow&amp;#34; tx and&lt;br/&gt;   claim the funds via the timeout path.&lt;br/&gt;&lt;br/&gt; * If Bob posted a revoked state, Alice can also claim the funds via&lt;br/&gt;   Bob claim, provided she notices within the channel-recovery-delay&lt;br/&gt;&lt;br/&gt;That only allows one low-latency payment to be inflight though, which I&amp;#39;m&lt;br/&gt;not sure is that interesting... It&amp;#39;s also kinda complicated, and doesn&amp;#39;t&lt;br/&gt;cover both the low-latency and offline cases, which is disappointing...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:04:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsypzt57r0ltjcjxuhzccpyn7nee0zl7vl6qzfvmtfgfz2ffavwztgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kpwm2v0</id>
    
      <title type="html">📅 Original date posted:2021-10-12 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsypzt57r0ltjcjxuhzccpyn7nee0zl7vl6qzfvmtfgfz2ffavwztgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kpwm2v0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswqcu4tmpvryc3czxj3gr2pq2f4alpvcmu4pvfydne9jygh05eyjscjrf9v&#39;&gt;nevent1q…rf9v&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, Oct 11, 2021 at 05:05:05PM &#43;1100, Lloyd Fournier wrote:&lt;br/&gt;&amp;gt; ### Scorched earth punishment&lt;br/&gt;&amp;gt; Another thing that I&amp;#39;d like to mention is that using revocable signatures&lt;br/&gt;&amp;gt; enables scorched earth punishments [2]. &lt;br/&gt;&lt;br/&gt;I kind-of think it&amp;#39;d be more interesting to simulate eltoo&amp;#39;s behaviour.&lt;br/&gt;If Alice&amp;#39;s current state has balances (A, B) and P in in-flight&lt;br/&gt;payments, and Bob posts an earlier state with (A&amp;#39;, B&amp;#39;) and P&amp;#39; (so A&#43;B&#43;P&lt;br/&gt;= A&amp;#39;&#43;B&amp;#39;&#43;P&amp;#39;), then maybe Alice&amp;#39;s justice transaction should pay:&lt;br/&gt;&lt;br/&gt;   A&#43;P &#43; max(0, B&amp;#39;-B)*0.1 to Alice&lt;br/&gt;   B-f - max(0, B&amp;#39;-B)*0.1 to Bob&lt;br/&gt;&lt;br/&gt;(where &amp;#34;f&amp;#34; is the justice transaction fees)&lt;br/&gt;&lt;br/&gt;Idea being that in an ideal world there wouldn&amp;#39;t be a hole in your pocket&lt;br/&gt;that lets all your coins fall out, but in the event that there is such&lt;br/&gt;a hole, it&amp;#39;s a *nicer* world if the people who find your coins give them&lt;br/&gt;back to you out of the kindness of their heart.&lt;br/&gt;&lt;br/&gt;&amp;gt;     Note that we number each currently inflight transaction by &amp;#34;k&amp;#34;,&lt;br/&gt;&amp;gt;     starting at 0. The same htlc/ptlc may have a different value for k&lt;br/&gt;&amp;gt;     between different inflight transactions.&lt;br/&gt;&amp;gt; Can you expand on why &amp;#34;k&amp;#34; is needed in addition to &amp;#34;n&amp;#34; and &amp;#34;i&amp;#34;. k sounds like&lt;br/&gt;&amp;gt; the same thing as i to me.&lt;br/&gt;&lt;br/&gt;&amp;#34;k&amp;#34; is used to distinguish the inflight payments (htlcs/ptlcs), not the&lt;br/&gt;inflight state (which is &amp;#34;i&amp;#34;).&lt;br/&gt;&lt;br/&gt;&amp;gt; Also what does RP/2/k notation imply given the definition of RP you gave above?&lt;br/&gt;&lt;br/&gt;I defined earlier that if P=musig(A,B) then P/x/y = musig(A/x/y,B/x/y);&lt;br/&gt;so RP/2/k = musig(A/2/n/i/2/k,RB2(n,i)/2/k).&lt;br/&gt;&lt;br/&gt;&amp;gt;      * if the inflight transaction contains a ptlc output, [...]&lt;br/&gt;&amp;gt; What about just doing a scriptless PTLC to avoid this (just CSV input of&lt;br/&gt;&amp;gt; presigned tx)? The cost is pre-sharing more nonces per PTLC message.&lt;br/&gt;&lt;br/&gt;Precisely that reason. Means you have to share &amp;#34;k&#43;1&amp;#34; nonce pairs in&lt;br/&gt;advance of every inflight tx update. Not a show stopper, just seemed&lt;br/&gt;like a headache. (It&amp;#39;s already a scriptless-script, this would let you&lt;br/&gt;use a key path spend instead of a script path spend)&lt;br/&gt;&lt;br/&gt;&amp;gt;     This does not support option_static_remotekey, but compensates for that&lt;br/&gt;&amp;gt;     by allowing balances to be recovered with only the channel setup data&lt;br/&gt;&amp;gt;     even if all revocation data is lost.&lt;br/&gt;&amp;gt; This is rather big drawback but is this really the case? Can&amp;#39;t &amp;#34;in-flight&amp;#34;&lt;br/&gt;&amp;gt; transactions send the balance of the remote party to their unencumbered static&lt;br/&gt;&amp;gt; remote key?&lt;br/&gt;&lt;br/&gt;They could, but there&amp;#39;s no guarantee that there is an inflight&lt;br/&gt;transaction, or that the other party will post it for you. In those case,&lt;br/&gt;you have to be able to redeem your output from the balance tx directly,&lt;br/&gt;and if you can do that, might as well have every possible address be&lt;br/&gt;derived differently to minimise the amount of information any third&lt;br/&gt;parties could glean.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:04:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg6xlw0466p6hrdt6llqngx8w66h7cec74xyvesa0r28da0laq7mczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt9rzr5</id>
    
      <title type="html">📅 Original date posted:2021-10-08 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg6xlw0466p6hrdt6llqngx8w66h7cec74xyvesa0r28da0laq7mczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt9rzr5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqste8d7gdr3e4gayr7yrs9mw45e2cpxrkheeja72r586uw2a6332xgvtd6ya&#39;&gt;nevent1q…d6ya&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sat, Oct 09, 2021 at 01:49:38AM &#43;0000, ZmnSCPxj wrote:&lt;br/&gt;&amp;gt; A transaction is required, but I believe it is not necessary to put it *onchain* (at the cost of implementation complexity in the drop-onchain case).&lt;br/&gt;&lt;br/&gt;The trick with that is that if you don&amp;#39;t put it on chain, you need&lt;br/&gt;to calculate the fees for it in advance so that they&amp;#39;ll be sufficient&lt;br/&gt;when you do want to put it on chain, *and* you can&amp;#39;t update it without&lt;br/&gt;going onchain, because there&amp;#39;s no way to revoke old off-chain funding&lt;br/&gt;transactions.&lt;br/&gt;&lt;br/&gt;&amp;gt; This has the advantage of maintaining the historical longevity of the channel.&lt;br/&gt;&amp;gt; Many pathfinding and autopilot heuristics use channel lifetime as a positive indicator of desirability,&lt;br/&gt;&lt;br/&gt;Maybe that&amp;#39;s a good reason for routing nodes to do shadow channels as&lt;br/&gt;a matter of course -- call the currently established channel between&lt;br/&gt;Alice and Bob &amp;#34;C1&amp;#34;, and leave it as bolt#3 based, but establish a new&lt;br/&gt;taproot based channel C2 also between Alice and Bob. Don&amp;#39;t advertise C2&lt;br/&gt;(making it a shadow channel), just say that C1 now supports PTLCs, but&lt;br/&gt;secretly commit to those PTLCs to C2 instead C1. Once the C2 funding tx&lt;br/&gt;is buried enough, start advertising C2 instead taking advantage of its&lt;br/&gt;now sufficiently buried funding transaction, and convert C1 to a shadow&lt;br/&gt;channel instead.&lt;br/&gt;&lt;br/&gt;In particular, that setup allows you to splice funds into or out of the&lt;br/&gt;shadow channel while retaining the positive longevity heuristics of the&lt;br/&gt;public channel.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:04:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvlnvjkdf40kamrsz757derkpuahuqmgw9a38260qrpcdm8upn8rczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kf2jyn9</id>
    
      <title type="html">📅 Original date posted:2021-10-08 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvlnvjkdf40kamrsz757derkpuahuqmgw9a38260qrpcdm8upn8rczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kf2jyn9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstl38dw29j9zung8e5j06m6lvn2s37sk7e6quhzlmfzqqhsjjzywqcdkryc&#39;&gt;nevent1q…kryc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;Here&amp;#39;s my proposal for replacing BOLT#2 and BOLT#3 to take advantage of&lt;br/&gt;taproot and implement PTLCs. &lt;br/&gt;&lt;br/&gt;It&amp;#39;s particularly inspired by ZmnSCPxj&amp;#39;s thoughts from Dec 2019 [0], and&lt;br/&gt;some of his and Lloyd Fournier&amp;#39;s posts since then (which are listed in&lt;br/&gt;references) -- in particular, I think those allow us to drop the latency&lt;br/&gt;for forwarding a payment *massively* (though refunding a payment still&lt;br/&gt;requires roundtrips), and also support receiving via a mostly offline&lt;br/&gt;lightning wallet, which seems kinda cool.&lt;br/&gt;&lt;br/&gt;I somehow hadn&amp;#39;t realised it prior to a conversation with @brian_trollz&lt;br/&gt;via twitter DM, but I think switching to PTLCs, even without eltoo,&lt;br/&gt;means that there&amp;#39;s no longer any need to permanently store old payment&lt;br/&gt;info in order to recover the entirety of the channel&amp;#39;s funds. (Some brute&lt;br/&gt;force is required to recover the timeout info, but in my testing I think&lt;br/&gt;that&amp;#39;s about 0.05 seconds of work per ptlc output via python&#43;libsecp256k1)&lt;br/&gt;&lt;br/&gt;This doesn&amp;#39;t require any soft-forks, so I think we could start work on&lt;br/&gt;it immediately, and the above benefits actually seem pretty worth it,&lt;br/&gt;even ignoring any privacy/efficiency benefits from doing taproot key&lt;br/&gt;path spends and forwarding PTLCs.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve sketched up the musig/musig2 parts for the &amp;#34;balance&amp;#34; transactions&lt;br/&gt;in python [1] and tested it a little on signet [2], which I think is&lt;br/&gt;enough to convince me that this is implementable. There&amp;#39;ll be a bit of&lt;br/&gt;preliminary work needed in actually defining specs/BIPs for musig and&lt;br/&gt;musig2 and adaptor signatures, I think.&lt;br/&gt;&lt;br/&gt;Anyway, details follow. They&amp;#39;re also up on github as a gist [3] if that&lt;br/&gt;floats your boat.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/ajtowns/bitcoin/blob/202109-ptlc-lnpenalty/test/functional/feature_ln_ptlc.py&#34;&gt;https://github.com/ajtowns/bitcoin/blob/202109-ptlc-lnpenalty/test/functional/feature_ln_ptlc.py&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[2] The balance transaction (spending the funding tx and with outputs&lt;br/&gt;    being Alice&amp;#39;s and Bob&amp;#39;s channel balance is at):&lt;br/&gt;    &lt;a href=&#34;https://explorer.bc-2.jp/tx/ba58d99dfaad83e105a0de1a9becfcf8eaf897aaaada54bd7b08134ff579997c?input:0&amp;amp;expand&#34;&gt;https://explorer.bc-2.jp/tx/ba58d99dfaad83e105a0de1a9becfcf8eaf897aaaada54bd7b08134ff579997c?input:0&amp;amp;expand&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://gist.github.com/ajtowns/12f58fa8a4dc9f136ed04ca2584816a2/&#34;&gt;https://gist.github.com/ajtowns/12f58fa8a4dc9f136ed04ca2584816a2/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Goals&lt;br/&gt;=====&lt;br/&gt;&lt;br/&gt;1. Support HTLCs&lt;br/&gt;2. Support PTLCs&lt;br/&gt;3. Minimise long-term data storage requirements&lt;br/&gt;4. Minimise latency when forwarding payments&lt;br/&gt;5. Minimise latency when refunding payments&lt;br/&gt;6. Support offline receiving&lt;br/&gt;7. Minimise on-chain footprint&lt;br/&gt;8. Minimise ability for third-parties to analyse&lt;br/&gt;&lt;br/&gt;Setup&lt;br/&gt;=====&lt;br/&gt;&lt;br/&gt;We have two participants in the channel, Alice and Bob. They each have&lt;br/&gt;bip32 private keys, a and b, and share the corresponding xpubs A and B&lt;br/&gt;with each other.&lt;br/&gt;&lt;br/&gt;Musig&lt;br/&gt;-----&lt;br/&gt;&lt;br/&gt;We will use musig to combine the keys, where P = musig(A,B) = H(A,B,1)*A&lt;br/&gt;&#43; H(A,B,2)*B. We&amp;#39;ll talk about subkeys of P, eg P/4/5/6, which are&lt;br/&gt;calculated by taking subkeys of the input and then applying musig,&lt;br/&gt;eg P/4/5/6 = musig(A/4/5/6, B/4/5/6). (Note that we don&amp;#39;t use hardened&lt;br/&gt;paths anywhere)&lt;br/&gt;&lt;br/&gt;Musig2&lt;br/&gt;------&lt;br/&gt;&lt;br/&gt;We&amp;#39;ll use musig2 to sign for these keys, that is both parties will&lt;br/&gt;pre-share two nonce points each, NA1, NA2, NB1, NB2, and the nonce will be&lt;br/&gt;calculated as: R=(NA1&#43;NB1)&#43;k(NA2&#43;NB2), where k=Hash(P,NA1,NA2,NB1,NB2,m),&lt;br/&gt;where P is the pubkey that will be signing and m is the message to be&lt;br/&gt;signed. Note that NA1, NA2, NB1, NB2 can be calculated and shared prior&lt;br/&gt;to knowing what message will be signed.&lt;br/&gt;&lt;br/&gt;The partial sig by A for a message m with nonce R as above is calculated as:&lt;br/&gt;&lt;br/&gt;    sa = (na1&#43;k*na2) &#43; H(R,A&#43;B,m)*a&lt;br/&gt;&lt;br/&gt;where na1, na2, and a are the secrets generating NA1, NA2 and A respectively.&lt;br/&gt;Calculating the corresponding partial signature for B,&lt;br/&gt;&lt;br/&gt;    sb = (nb1&#43;k*nb2) &#43; H(R,A&#43;B,m)*b&lt;br/&gt;&lt;br/&gt;gives a valid signature (R,sa&#43;sb) for (A&#43;B):&lt;br/&gt;&lt;br/&gt;    (sa&#43;sb)G = R &#43; H(R,A&#43;B,m)*(A&#43;B)&lt;br/&gt;&lt;br/&gt;Note that BIP340 sepcifies x-only pubkeys, so A&#43;B and R implicitly have&lt;br/&gt;even y, however since those values are caluclated via musig and musig2&lt;br/&gt;respectively, this cannot be ensured in advance. Instead, if we find:&lt;br/&gt;&lt;br/&gt;    H(A,B,1)*A &#43; H(A,B,2)*B&lt;br/&gt;&lt;br/&gt;does not have even y, we calculate:&lt;br/&gt;&lt;br/&gt;    P = (-H(A,B,1))*A &#43; (-H(A,B,2))*B&lt;br/&gt;&lt;br/&gt;instead, which will have even y. Similarly, if (NA1&#43;NB1&#43;k(NA2&#43;NB2)) does&lt;br/&gt;not have even y, when signing, we replace each partial nonce by its negation,&lt;br/&gt;eg: sa = -(na1&#43;k*na2) &#43; H(R,A&#43;B,m).&lt;br/&gt;&lt;br/&gt;Adaptor Sigs&lt;br/&gt;------------&lt;br/&gt;&lt;br/&gt;An adaptor signature for P for secret X is calculated as:&lt;br/&gt;&lt;br/&gt;    s = r &#43; H(R&#43;X, P, m)*p&lt;br/&gt;&lt;br/&gt;which gives:&lt;br/&gt;&lt;br/&gt;    (s&#43;x)G = (R&#43;X) &#43; H(R&#43;X, P, m)*P&lt;br/&gt;&lt;br/&gt;so that (R&#43;X,s&#43;x) is a valid signature by P of m, and the preimage for&lt;br/&gt;X can be calculated as the difference between the published sig and the&lt;br/&gt;adaptor sig, x=(s&#43;x)-(s).&lt;br/&gt;&lt;br/&gt;Note that if R&#43;X does not have even Y, we will need to negate both R and X,&lt;br/&gt;and the recovered secret preimage will be -x instead of x.&lt;br/&gt;&lt;br/&gt;Revocable Secrets&lt;br/&gt;-----------------&lt;br/&gt;&lt;br/&gt;Alice and Bob have shachain secrets RA(n) and RB(n) respectively,&lt;br/&gt;and second level shachain secrets RA2(n,i) and RB2(n,i), with n and i&lt;br/&gt;counting up from 0 to a maximum.&lt;br/&gt;&lt;br/&gt;Summary&lt;br/&gt;=======&lt;br/&gt;&lt;br/&gt;We&amp;#39;ll introduce four layers of transactions:&lt;br/&gt;&lt;br/&gt; 1. The funding transaction - used to establish the channel, provides&lt;br/&gt;    the utxo backing the channel while the channel is open.&lt;br/&gt; 2. The balance transaction - tracks the funding transaction, contains&lt;br/&gt;    a &amp;#34;balance&amp;#34; output for each of the participants.&lt;br/&gt; 3. The inflight transactions - spends a balance output from the balance&lt;br/&gt;    transaction and provides outputs for any inflight htlc/ptlc transactions.&lt;br/&gt; 4. Layered transactions - spends inflight htlc/ptlc outputs by revealing&lt;br/&gt;    the preimage, while still allowing for the penalty path.&lt;br/&gt;&lt;br/&gt;Funding transaction&lt;br/&gt;===================&lt;br/&gt;&lt;br/&gt;The funding transaction simply pays to P/0/f via taproot, where f starts&lt;br/&gt;at 0 and increases any time the funding transaction is updated onchain&lt;br/&gt;(eg when splicing funds in or out).&lt;br/&gt;&lt;br/&gt;Balance transaction&lt;br/&gt;===================&lt;br/&gt;&lt;br/&gt;The balance transaction spends the funding transaction, and has two&lt;br/&gt;outputs, one for Alice&amp;#39;s balance and one for Bob&amp;#39;s balance (omitting a&lt;br/&gt;zero/dust balance).&lt;br/&gt;&lt;br/&gt;We count the number of balance updates, starting at 0, and call it &amp;#34;n&amp;#34;.&lt;br/&gt;&amp;#34;n&amp;#34; is encoded in the transaction locktime and the input nsequence, so&lt;br/&gt;if a balance transaction appears on chain, &amp;#34;n&amp;#34; can be decoded from the&lt;br/&gt;nsequence and locktime.&lt;br/&gt;&lt;br/&gt;Alice&amp;#39;s balance is paid to an address with internal pubkey P/1/n/0&lt;br/&gt;and a script path of &amp;#34;&amp;lt;A/1/n&amp;gt; CHECKSIGVERIFY &amp;lt;D&amp;gt; CSV&amp;#34; where D is&lt;br/&gt;Alice&amp;#39;s to_self_delay. Bob&amp;#39;s balance is similar, with internal pubkey&lt;br/&gt;P/1/n/1.&lt;br/&gt;&lt;br/&gt;In order to update to a new balance transaction, the process is as follows.&lt;br/&gt;First, nonces are exchanged in advance:&lt;br/&gt;&lt;br/&gt;  Alice:&lt;br/&gt;    Generates a nonce pair NA1, NA2 derived from RA(n). Shares this with&lt;br/&gt;    Bob.&lt;br/&gt;  Bob:&lt;br/&gt;    Generates a nonce pair NB1, NB2 derived from RB(n). Shares this with&lt;br/&gt;    Alice.&lt;br/&gt;&lt;br/&gt;Then, presuming Alice initiates the update:&lt;br/&gt;&lt;br/&gt;  Alice:&lt;br/&gt;    Generates deterministic nonce pair, DA1, DA2. Combines this with&lt;br/&gt;    Bob&amp;#39;s NB1, NB2 nonce pair.  Generates partial signature for nonce&lt;br/&gt;    (DA, NB) for the transaction. Sends DA1 and DA2 and the partial&lt;br/&gt;    signature to Bob.&lt;br/&gt;&lt;br/&gt;  Bob:&lt;br/&gt;    Checks the partial signature is valid. Updates to the new balance&lt;br/&gt;    transaction. Generates a nonce pair, DB1, DB2, and gnerates a partial&lt;br/&gt;    signature for the balance transaction for nonce (NA, DB). Sends DB1,&lt;br/&gt;    DB2, and the partial signature to Alice. Generates a new revocable&lt;br/&gt;    secret RB(n&#43;1). Revokes the previous secret RB(n) and sends the&lt;br/&gt;    details of both to Alice.&lt;br/&gt;&lt;br/&gt;  Alice:&lt;br/&gt;    Checks the partial signature is valid. Updates to the new balance&lt;br/&gt;    transaction. Checks the secret revocation info is correct and stores&lt;br/&gt;    it. Generates a new revocable secret RA(n&#43;1). Revokes the previous&lt;br/&gt;    secret RA(n) and sends the details of both to Bob.&lt;br/&gt;&lt;br/&gt;  Bob:&lt;br/&gt;    Checks the secret revocation info is correct an stores it.&lt;br/&gt;&lt;br/&gt;This means that both Alice and Bob have the same balance transaction here&lt;br/&gt;(with the same txid) but have different signatures for it (and thus&lt;br/&gt;differing wtxids).&lt;br/&gt;&lt;br/&gt;Because updating the balance transaction involves two round trips&lt;br/&gt;before Bob can be sure Alice cannot use the old state, we move all the&lt;br/&gt;transaction information to the inflight transactions, which we will be&lt;br/&gt;able to update immediately, without requiring a round trip at all.&lt;br/&gt;&lt;br/&gt;Note that if Bob publishes the signature for an old state, then the&lt;br/&gt;signature is:&lt;br/&gt;&lt;br/&gt;   s = ((DA1&#43;NB1) &#43; k(DA2&#43;NB2)) &#43; H(R,A&#43;B,m)(a&#43;b)&lt;br/&gt;&lt;br/&gt;but Alice can calculate the secrets for both DA1 and DA2 (she generated&lt;br/&gt;those deterministically herself in the first place), and NB1 and NB2 (she&lt;br/&gt;has the secret revocation information, and verified that it correctly&lt;br/&gt;generated the nonces Bob was using), which allows her to calculate Bob&amp;#39;s&lt;br/&gt;private key using modular arithmetic:&lt;br/&gt;&lt;br/&gt;   b = H(R,P,m) / (s - (DA1&#43;NB1) - b(DA2&#43;NB2)) - a&lt;br/&gt;&lt;br/&gt;which means she can then directly sign without Bob&amp;#39;s assistance, allowing&lt;br/&gt;her to claim any funds.&lt;br/&gt;&lt;br/&gt;Inflight and Layered Transactions&lt;br/&gt;=================================&lt;br/&gt;&lt;br/&gt;We construct two inflight transactions on top of the current balance&lt;br/&gt;transaction, one spending Alice&amp;#39;s balance, and one spending Bob&amp;#39;s balance.&lt;br/&gt;&lt;br/&gt;We will use &amp;#34;i&amp;#34; to represent the number of times a given inflight&lt;br/&gt;transaction has been updated for the nth update to the balance&lt;br/&gt;transaction.&lt;br/&gt;&lt;br/&gt;At any time Alice can update the inflight transaction spending her balance&lt;br/&gt;to transfer funds towards Bob, either by updating the balances directly,&lt;br/&gt;or adding a htlc/ptlc entry to conditionally transfer funds to Bob. (And&lt;br/&gt;conversely for Bob)&lt;br/&gt;&lt;br/&gt;We will define RP=musig(A/2/n/i, RB2(n,i)).&lt;br/&gt;&lt;br/&gt;The inflight transaction spending Alice&amp;#39;s balance can have multiple&lt;br/&gt;types of outputs:&lt;br/&gt;&lt;br/&gt; * Alice&amp;#39;s remaining balance: pays directly to A/2/n/i&lt;br/&gt;&lt;br/&gt; * Bob&amp;#39;s remaining balances: pays to RP/2 with script path&lt;br/&gt;   &amp;#34;&amp;lt;B/2/n/i&amp;gt; CHECKSIGVERIFY &amp;lt;D&amp;gt; CSV&amp;#34;&lt;br/&gt;&lt;br/&gt; * An htlc paying to Bob: pays to RP/2/k with script paths:&lt;br/&gt;   &#43; &amp;#34;LENGTH 32 EQUALVERIFY HASH160 &amp;lt;X&amp;gt; EQUALVERIFY &amp;lt;B/2/n/i/k&amp;gt; CHECKSIGVERIFY &amp;lt;A/2/n/i/k&amp;gt; CHECKSIG&amp;#34;&lt;br/&gt;   &#43; &amp;#34;&amp;lt;A/2/n/i/k/1&amp;gt; CHECKSIGVERIFY &amp;lt;T&amp;gt; CLTV&amp;#34;&lt;br/&gt;&lt;br/&gt; * A ptlc paying to Bob: pays to RP/2/k with script paths:&lt;br/&gt;   &#43; &amp;#34;&amp;lt;B/2/n/i/k&amp;gt; CHECKSIG NOTIF &amp;lt;T&amp;gt; CLTV DROP ENDIF &amp;lt;A/2/n/i/k&amp;gt; CHECKSIG&amp;#34;&lt;br/&gt;&lt;br/&gt;Any outputs that would be zero or dust are not included.&lt;br/&gt;&lt;br/&gt;Note that we number each currently inflight transaction by &amp;#34;k&amp;#34;,&lt;br/&gt;starting at 0. The same htlc/ptlc may have a different value for k&lt;br/&gt;between different inflight transactions.&lt;br/&gt;&lt;br/&gt;The inflight transation&amp;#39;s locktime is set to the current block&lt;br/&gt;height. This enables brute force searching for the locktime of any&lt;br/&gt;inflight ptlcs (so that in a penalty scenario when the other party posts&lt;br/&gt;an out of date inflight transaction, you can search through a small&lt;br/&gt;number of possible timeout values simply by not sending any ptlcs with&lt;br/&gt;a timeout more that L blocks in the future).&lt;br/&gt;&lt;br/&gt;The balance input&amp;#39;s nsequence is used to encode the value of the lower&lt;br/&gt;24 bits of i in the same way the balance transaction&amp;#39;s fund input&amp;#39;s&lt;br/&gt;nsequence encodes the upper 24 bits of n.&lt;br/&gt;&lt;br/&gt;The layered transaction will spend the htlc/ptlc outputs, with an&lt;br/&gt;ANYONECANPAY|SINGLE signature by Alice using the A/2/n/i/k path.&lt;br/&gt;The output committed to is:&lt;br/&gt;&lt;br/&gt; * pays to RP/3/k with script path:&lt;br/&gt;   &#43; &amp;lt;B/3/n/i/k&amp;gt; CHECKSIGVERIFY &amp;lt;D&amp;gt; CSV&lt;br/&gt;&lt;br/&gt;with no absolute or relative locktime.&lt;br/&gt;&lt;br/&gt;To update the inflight transaction spending Alice&amp;#39;s balance as well as&lt;br/&gt;any dependent layered transactions, the process is as follows:&lt;br/&gt;&lt;br/&gt;  Bob:&lt;br/&gt;    Generates a second level revocable secret, RB2(n,i) and sends Alice&lt;br/&gt;    the corresponding point, PB2. Calculates a nonce pair, NB1, NB2, and&lt;br/&gt;    sends that to Alice. This is done in advance.&lt;br/&gt;&lt;br/&gt;  Alice:&lt;br/&gt;    Calculates the new inflight transaction. Calculates new nonces NA1,&lt;br/&gt;    NA2, and partially signs the spend of her balance via the key path,&lt;br/&gt;    with musig2 nonces NA1, NB1, NA2, NB2. For each inflight htlc,&lt;br/&gt;    Alice provides a signature via A/2/n/i/k. For each inflight ptlc,&lt;br/&gt;    Alice provides an adaptor signature via the A/2/n/i/k/0 path that&lt;br/&gt;    is conditional on the ptlc&amp;#39;s point.&lt;br/&gt;&lt;br/&gt;  Bob:&lt;br/&gt;    Bob verifies the new proposed inflight state and each of the&lt;br/&gt;    signatures. Bob may now rely on the new state. Bob revokes their&lt;br/&gt;    prior secret, RB2(n, i-1), and sends a new point/nonce pair (PB2&amp;#39;,&lt;br/&gt;    NB1&amp;#39;, NB2&amp;#39;) to Alice to prepare for the next round.&lt;br/&gt;&lt;br/&gt;Note that Bob could stream multiple point/nonce pairs in advance,&lt;br/&gt;allowing Alice to do multiple inflight tx updates within the time taken&lt;br/&gt;for a roundtrip.&lt;br/&gt;&lt;br/&gt;Alice can unilaterally do the following safely:&lt;br/&gt;&lt;br/&gt; 1. transfer from Alice&amp;#39;s balance to Bob&amp;#39;s balance&lt;br/&gt; 2. accept that a htlc/ptlc succeeded, removing the corresponding output&lt;br/&gt;    and allocating the funds associated with it directly to Bob&amp;#39;s balance&lt;br/&gt; 3. introduce a htlc/ptlc, spending funds from Alice&amp;#39;s balance&lt;br/&gt;&lt;br/&gt;However refunding/cancelling a htlc/ptlc requires a two-phase commit&lt;br/&gt;with 1.5 round trips:&lt;br/&gt;&lt;br/&gt; - Bob proposes refunding a htlc/ptlc&lt;br/&gt; - Alice agrees and sends a partial signature for the new transaction&lt;br/&gt;   with the htlc/ptlc funds transferred back to her balance,&lt;br/&gt; - Bob records the new transaction, and revokes the earlier second&lt;br/&gt;   level secret RB2(n, i-1).&lt;br/&gt; - Alice verifies the revocation, and can safely treat the funds as&lt;br/&gt;   refunded (and thus refund back to the original payer, eg).&lt;br/&gt;&lt;br/&gt;The advantage of doing this over negotiating a new balance transaction&lt;br/&gt;is that only the second level revocation secrets need to be online,&lt;br/&gt;allowing for operation by semi-offline lightning nodes (ie, having the&lt;br/&gt;channel private key and first level revocation secrets offline). Such&lt;br/&gt;semi-offline nodes risk losing funds in the &amp;#34;inflight&amp;#34; transaction&lt;br/&gt;(either by revealing the second level revocation secrets or by simply&lt;br/&gt;data loss of the current inflight/layered transactions) but do not risk&lt;br/&gt;losing or spending funds in their own output of the balance transaction.&lt;br/&gt;&lt;br/&gt;This means the funds locked in Alice&amp;#39;s balance can be spent in the&lt;br/&gt;following ways:&lt;br/&gt;&lt;br/&gt; * Alice can claim them directly if Bob does not post the inflight&lt;br/&gt;   transaction before the delay expires, via the script balance output&amp;#39;s&lt;br/&gt;   script path. Alice gets the entire balance in this case.&lt;br/&gt;&lt;br/&gt; * Bob can post a revoked inflight transaction, for which Alice knows the&lt;br/&gt;   secret for RB(n,i). In this case Alice recovers the value of i from&lt;br/&gt;   the nsequence (using brute force for the upper bits if she has&lt;br/&gt;   provided more than 16M updates of the inflight tx for any given&lt;br/&gt;   balance transaction), and then calculates the secret key for PB,&lt;br/&gt;   and hence PB/2/k and PB/3/k, at which point she can claim every&lt;br/&gt;   output via a key path spend, even if Bob posts some or all of the&lt;br/&gt;   layered transactions. Alice gets the entire balance in this case&lt;br/&gt;   (though spends more on fees).&lt;br/&gt;&lt;br/&gt; * Bob can post a current inflight transaction, along with layered&lt;br/&gt;   transactions for any of the inflight htlc/ptlcs for which he knows the&lt;br/&gt;   corresponding preimage, allowing Alice to recover the preimages from&lt;br/&gt;   the on-chain spends immediately. Alice can claim her balance output and&lt;br/&gt;   any timed out funds immediately as well. Bob can finish claiming his&lt;br/&gt;   balance and any claimed htlc/ptlc funds after the delay has finished.&lt;br/&gt;&lt;br/&gt;Note that Bob never shares his signature to spend Alice&amp;#39;s balance prior&lt;br/&gt;to posting the inflight transaction, so Alice can never post an inflight&lt;br/&gt;transaction that spends her own balance.&lt;br/&gt;&lt;br/&gt;The cases where Alice may have difficulty claiming funds is Bob posts&lt;br/&gt;a revoked inflight transaction (possibly spending a revoked balance&lt;br/&gt;transaction) are:&lt;br/&gt;&lt;br/&gt; * if the inflight transaction contains a htlc output, then if Alice&lt;br/&gt;   has not retained the old htlc details (the hash160 and the timeout)&lt;br/&gt;   she will not be able to reconstruct the script path, and thus will&lt;br/&gt;   not be able to calculate the TapTweak to sign for the key path.&lt;br/&gt;   However if Bob attempts to claim the output (via the pre-signed&lt;br/&gt;   layered transaction), that will reveal the information she was missing,&lt;br/&gt;   and she can immediately claim the funds via the layered transaction&lt;br/&gt;   output, prior to Bob being able to spend that output.&lt;br/&gt;&lt;br/&gt; * if the inflight transaction contains a ptlc output, then if Alice&lt;br/&gt;   has not retained the old ptlc details (the point and the timeout)&lt;br/&gt;   she will not trivially be able to reconstruct the script path,&lt;br/&gt;   which includes the timeout. However, presuming the timeout was&lt;br/&gt;   within 5000 blocks, then the only possible timeouts are the inflight&lt;br/&gt;   tx&amp;#39;s nlocktime&#43;i with 0&amp;lt;i&amp;lt;=5000, and she will only need to calculate&lt;br/&gt;   5000*k cases and match the corresponding scriptPubKeys to exhaustively&lt;br/&gt;   enumerate every possible ptlc output, which should take under a minute,&lt;br/&gt;   and be easily achievable. In addition, if Bob attempts to claim the&lt;br/&gt;   funds, he will reveal the script path, and Alice will be either able&lt;br/&gt;   to claim the inflight output directly or the layered output.&lt;br/&gt;&lt;br/&gt;Misc&lt;br/&gt;====&lt;br/&gt;&lt;br/&gt;In order to transition from BOLT#3 format to this proposal, an onchain&lt;br/&gt;transaction is required, as the &amp;#34;revocable signatures&amp;#34; arrangement cannot&lt;br/&gt;be mimicked via the existing 2-of-2 CHECKMULTISIG output.&lt;br/&gt;&lt;br/&gt;To allow splicing in/out, it may be important to maintain multiple&lt;br/&gt;concurrent funding transactions (paying to P/0/f and P/0/f&#43;1 eg),&lt;br/&gt;which then requires maintaining multiple current balance transactions&lt;br/&gt;(paying to P/1/n/* and P/1/n&#43;1/x eg) and likewise multiple current&lt;br/&gt;inflight/layered transactions. This will require ensuring the states&lt;br/&gt;for all those transactions are synchoronised when verifying upates,&lt;br/&gt;and requires sharing multiple nonces for signing (eg RA(n) and RA(n&#43;1)&lt;br/&gt;and RB2(n,i), and RB2(n&#43;1,i)).&lt;br/&gt;&lt;br/&gt;Fees for the balance and inflight transactions must be considered upfront,&lt;br/&gt;and paid for from the channel balance (or perhaps via additional anchor&lt;br/&gt;outputs that allocate more than the dust threshold and are immediately&lt;br/&gt;spendable). Fees for the layered transactions however can (and must)&lt;br/&gt;be provided by whoever is attempting to claim the funds.&lt;br/&gt;&lt;br/&gt;Bob having a current inflight transaction spending Alice&amp;#39;s balance is&lt;br/&gt;advantageous to Alice as Bob posting the inflight transaction allows&lt;br/&gt;her to immediately claim her balance, rather than having to wait for&lt;br/&gt;the delay to complete.&lt;br/&gt;&lt;br/&gt;If two nodes agree to only forward ptlcs in future, then updating the&lt;br/&gt;funding transaction (to P/0/f&#43;1 eg) and ignoring any proposed inflight&lt;br/&gt;transactions that include htlc outputs is enough to ensure that all htlc&lt;br/&gt;records can be forgotten without risking any part of the channel balance&lt;br/&gt;being unclaimable.&lt;br/&gt;&lt;br/&gt;This does not support option_static_remotekey, but compensates for that&lt;br/&gt;by allowing balances to be recovered with only the channel setup data&lt;br/&gt;even if all revocation data is lost.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;References&lt;br/&gt;==========&lt;br/&gt;&lt;br/&gt;Hopefully the above includes enough explanation to be understood on its own,&lt;br/&gt;but here&amp;#39;s references for a bunch of the concepts.&lt;br/&gt;&lt;br/&gt; * musig: &lt;a href=&#34;https://blockstream.com/2018/01/23/en-musig-key-aggregation-schnorr-signatures/&#34;&gt;https://blockstream.com/2018/01/23/en-musig-key-aggregation-schnorr-signatures/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; * musig2: &lt;a href=&#34;https://medium.com/blockstream/musig2-simple-two-round-schnorr-multisignatures-bf9582e99295&#34;&gt;https://medium.com/blockstream/musig2-simple-two-round-schnorr-multisignatures-bf9582e99295&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; * adaptor sigs: &lt;a href=&#34;https://github.com/ElementsProject/scriptless-scripts/blob/master/md/atomic-swap.md&#34;&gt;https://github.com/ElementsProject/scriptless-scripts/blob/master/md/atomic-swap.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; * fast forwards [ZmnSCPxj]&lt;br/&gt;    &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-April/001986.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-April/001986.html&lt;/a&gt;&lt;br/&gt;    &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003043.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003043.html&lt;/a&gt;&lt;br/&gt;    &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003265.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003265.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; * revocable signatures [LLFourn]&lt;br/&gt;    &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-August/002785.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-August/002785.html&lt;/a&gt;
    </content>
    <updated>2023-06-09T15:04:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs24av8p3gjf6k4y9l3wgh0ux0sgy5l6dtx5ayxrffs2dny2yx9e8szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kv5h8fa</id>
    
      <title type="html">📅 Original date posted:2021-08-16 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs24av8p3gjf6k4y9l3wgh0ux0sgy5l6dtx5ayxrffs2dny2yx9e8szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kv5h8fa" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfmxuclhlnmxup5kauw4eezch6je42m9wl2vyx9tlu67u3jldktlc5lagez&#39;&gt;nevent1q…agez&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-16&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sun, Aug 15, 2021 at 10:21:52PM -0400, Matt Corallo wrote:&lt;br/&gt;&amp;gt; On 8/15/21 22:02, Anthony Towns wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; In&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; one particular class of applicable routing algorithms you could use for&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; lightning routing having a base fee makes the algorithm intractably slow,&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think of that as the problem, but rather as the base fee having&lt;br/&gt;&amp;gt; &amp;gt; a multiplicative effect as you split payments.&lt;br/&gt;&amp;gt; Yes, matching the real-world costs of forwarding an HTLC.&lt;br/&gt;&lt;br/&gt;Actually, no, not at all. &lt;br/&gt;&lt;br/&gt;The base&#43;proportional fees paid only on success roughly match the *value*&lt;br/&gt;of forwarding an HTLC, they don&amp;#39;t match the costs particularly well&lt;br/&gt;at all.&lt;br/&gt;&lt;br/&gt;Why not? Because the costs are incurred on failed HTLCs as well, and&lt;br/&gt;also depend on the time a HTLC lasts, and also vary heavily depending&lt;br/&gt;on how many other simultaneous HTLCs there are.&lt;br/&gt;&lt;br/&gt;&amp;gt; Yes. You have to pay the cost of a node. If we&amp;#39;re really worried about this,&lt;br/&gt;&amp;gt; we should be talking about upfront fees and/or refunds on HTLC fulfillment,&lt;br/&gt;&amp;gt; not removing the fees entirely.&lt;br/&gt;&lt;br/&gt;(I don&amp;#39;t believe either of those are the right approach, but based on&lt;br/&gt;previous discussions, I don&amp;#39;t think anyone&amp;#39;s going to realise I&amp;#39;m right&lt;br/&gt;until I implement it and prove it, so *shrug*)&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Being denominated in sats, the base fee also changes in value as the&lt;br/&gt;&amp;gt; &amp;gt; bitcoin price changes -- c-lightning dropped the base fee to 1sat (from&lt;br/&gt;&amp;gt; &amp;gt; 546 sat!) in Jan 2018, but the value of 1sat has increased about 4x&lt;br/&gt;&amp;gt; &amp;gt; since then, and it seems unlikely the fixed costs of a successful HTLC&lt;br/&gt;&amp;gt; &amp;gt; payment have likewise increased 4x.  Proportional fees deal with this&lt;br/&gt;&amp;gt; &amp;gt; factor automatically, of course.&lt;br/&gt;&amp;gt; This isn&amp;#39;t a protocol issue, implementations can automate this without issue.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think anyone&amp;#39;s proposing the protocol be changed; just that node&lt;br/&gt;operators set an option to a particular value?&lt;br/&gt;&lt;br/&gt;Well, except that Lisa&amp;#39;s maybe proposing that 0 not be allowed, and a&lt;br/&gt;value &amp;gt;= 0.001 sat be required? I&amp;#39;m not quite sure.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; There&amp;#39;s real cost to distorting the fee structures on the network away from&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; the costs of node operators,&lt;br/&gt;&amp;gt; &amp;gt; That&amp;#39;s precisely what the base fee is already doing.&lt;br/&gt;&amp;gt; Huh? For values much smaller than a node&amp;#39;s liquidity, the cost for nodes is&lt;br/&gt;&amp;gt; (mostly) a function of HTLCs, not the value. &lt;br/&gt;&lt;br/&gt;Yes, the cost for nodes is a function of the requests that come in, not&lt;br/&gt;how many succeed. The fees are proportional to how many succeed, which&lt;br/&gt;is at best a distorted reflection of the number of requests that come in.&lt;br/&gt;&lt;br/&gt;&amp;gt; The cost to nodes is largely [...]&lt;br/&gt;&lt;br/&gt;The cost to nodes is almost entirely the opportunity cost of not being&lt;br/&gt;able to accept other txs that would come in afterwards and would pay&lt;br/&gt;higher fees.&lt;br/&gt;&lt;br/&gt;And all those costs can be captured equally well (or badly) by just&lt;br/&gt;setting a proportional fee and a minimum payment value. I don&amp;#39;t know why&lt;br/&gt;you keep ignoring that point.&lt;br/&gt;&lt;br/&gt;&amp;gt; so I&amp;#39;d argue for many HTLCs forwarded&lt;br/&gt;&amp;gt; today per-payment costs mirror the cost to a node much, much, much, much&lt;br/&gt;&amp;gt; better than some proportional fees?&lt;br/&gt;&lt;br/&gt;You&amp;#39;re talking yourself into a *really* broken business model there.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Additionally, I don&amp;#39;t think HTLC slot usage needs to be kept as a&lt;br/&gt;&amp;gt; &amp;gt; limitation after we switch to eltoo;&lt;br/&gt;&amp;gt; The HTLC slot limit is to keep transactions broadcastable. I don&amp;#39;t see why&lt;br/&gt;&amp;gt; this would change, you still get an output for each HTLC on the latest&lt;br/&gt;&amp;gt; commitment in eltoo, AFAIU.&lt;br/&gt;&lt;br/&gt;eltoo gives us the ability to have channel factories, where we divide&lt;br/&gt;the overall factory balance amongst different channels, all updated&lt;br/&gt;off-chain. It seems likely we&amp;#39;ll want to do factories from day one,&lt;br/&gt;so that we don&amp;#39;t implicitly limit either the lifetime of the channel&lt;br/&gt;or its update rate (&amp;gt;1 update/sec ~= &amp;lt;4 year lifetime otherwise if I&lt;br/&gt;did the maths right). Once we&amp;#39;re doing factories, if we have more than&lt;br/&gt;however many htlcs for a channel, we can re-divide the factory balance&lt;br/&gt;and add a new channel. If the limit is 500 HTLCs per tx, you&amp;#39;d have to&lt;br/&gt;amortize 0.2% of the new tx across each HTLC, in addition to the cost&lt;br/&gt;of the HTLC itself, but that seems trivial.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; and in the meantime, I think it can&lt;br/&gt;&amp;gt; &amp;gt; be better managed via adjusting the min_htlc_amount -- at least for the&lt;br/&gt;&amp;gt; &amp;gt; scenario where problems are being caused by legitimate payment attempts,&lt;br/&gt;&amp;gt; &amp;gt; which is also the only place base fee can help.&lt;br/&gt;&amp;gt; Sure, we could also shift towards upfront fees or similar solutions,&lt;br/&gt;&lt;br/&gt;Upfront fees seem extremely vulnerable to attacks, and are certainly a&lt;br/&gt;(pretty large) protocol change.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Instead, we should investigate how we can&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; apply the ideas here with the more complicated fee structures we have.&lt;br/&gt;&amp;gt; &amp;gt; Fee structures should be *simple* not complicated.&lt;br/&gt;&amp;gt; &amp;gt; I mean, it&amp;#39;s kind of great that we started off complicated -- if it&lt;br/&gt;&amp;gt; &amp;gt; turns out base fee isn&amp;#39;t necessary, it&amp;#39;s easy to just set it to zero;&lt;br/&gt;&amp;gt; &amp;gt; if we didn&amp;#39;t have it, but needed it, it would be much more annoying to&lt;br/&gt;&amp;gt; &amp;gt; add it in later.&lt;br/&gt;&amp;gt; Fee structures should also match reality, and allow node operators&lt;br/&gt;&amp;gt; sufficient flexibility to capture their costs. I think we have a design that&lt;br/&gt;&amp;gt; does so quite well - its pretty simple, there&amp;#39;s only two knobs, but the two&lt;br/&gt;&amp;gt; knobs capture exactly the two broad categories of costs a node operator has.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t know how you can think these &amp;#34;exactly&amp;#34; capture node operators&amp;#39;&lt;br/&gt;costs. They&amp;#39;re missing the time factor, and don&amp;#39;t capture any of the&lt;br/&gt;costs due to failed payments.&lt;br/&gt;&lt;br/&gt;&amp;gt; Sure, the great thing about today is because the protocol exposes decent&lt;br/&gt;&amp;gt; knobs operators can tune&lt;br/&gt;&lt;br/&gt;Knobs are great for experimenting; but they&amp;#39;re also something to work&lt;br/&gt;at reducing once the experiments have come up with some results. I&lt;br/&gt;think #zerobasefee is more in the experiment stage: &amp;#34;hey, this seems&lt;br/&gt;like a great idea, let&amp;#39;s set this knob to zero and focus on these other&lt;br/&gt;ones instead&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; For an experimental plugin that aggressively splits payments up, I think&lt;br/&gt;&amp;gt; &amp;gt; either ignoring channels with &amp;gt;0 base fee entirely, or deciding that&lt;br/&gt;&amp;gt; &amp;gt; you&amp;#39;re happy to spend a total of X sats on base fees, and then ignoring&lt;br/&gt;&amp;gt; &amp;gt; channels whose base fee is greater than X/paths/path-length sats is fine.&lt;br/&gt;&amp;gt; Sure, experimental plugins can do whatever they want!&lt;br/&gt;&lt;br/&gt;Is there any reason to think any of this would be something other than&lt;br/&gt;node configuration options and experimental plugins any time soon?&lt;br/&gt;&lt;br/&gt;(By &amp;#34;any time soon&amp;#34; I mean, I could see software defaults changing if&lt;br/&gt;over 50% of the network deliberately switched to zero base fees and found&lt;br/&gt;it worked fine; and I could see deprecating non-zero fees if that ended&lt;br/&gt;up with 90% of the network on zero base fees, no good reasons for node&lt;br/&gt;operators wanting to stick with running non-zero base fees, and the&lt;br/&gt;experimental algos that relied on zero base fees being significantly&lt;br/&gt;easier to maintain or faster/better)&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; But long term, I also think that the base fee is an entirely unhelpful&lt;br/&gt;&amp;gt; &amp;gt; complication that will eventually just be hardcoded to zero by everyone,&lt;br/&gt;&amp;gt; &amp;gt; and eventually channels that propose non-zero base fees won&amp;#39;t even be&lt;br/&gt;&amp;gt; &amp;gt; gossiped. I don&amp;#39;t expect that to happen any time soon though.&lt;br/&gt;&amp;gt; I very strongly disagree, as discussed, and am left highly dubious&lt;br/&gt;&amp;gt; that it is a practical complication in any case.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s okay! Long term predictions would be pretty boring if everyone&lt;br/&gt;agreed with them.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:03:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswzmdtj2f05fsd23dwzn5aal6qyp5x5zs9gdv82nk8luqdax8dy0gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt9vau0</id>
    
      <title type="html">📅 Original date posted:2021-08-14 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswzmdtj2f05fsd23dwzn5aal6qyp5x5zs9gdv82nk8luqdax8dy0gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt9vau0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfctv7h3767s8x59xakchw6wkax3qhu77v6xs44g93d5klj2rcmhszqll3u&#39;&gt;nevent1q…ll3u&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-14&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey *,&lt;br/&gt;&lt;br/&gt;There&amp;#39;s been discussions on twitter and elsewhere advocating for&lt;br/&gt;setting the BOLT#7 fee_base_msat value [0] to zero. I&amp;#39;m just writing&lt;br/&gt;this to summarise my understanding in a place that&amp;#39;s able to easily be&lt;br/&gt;referenced later.&lt;br/&gt;&lt;br/&gt;Setting the base fee to zero has a couple of benefits:&lt;br/&gt;&lt;br/&gt; - it means you only have one value to optimise when trying to collect&lt;br/&gt;   the most fees, and one-dimensional optimisation problems are&lt;br/&gt;   obviously easier to write code for than two-dimensional optimisation&lt;br/&gt;   problems&lt;br/&gt;&lt;br/&gt; - when finding a route, if all the fees on all the channels are&lt;br/&gt;   proportional only, you&amp;#39;ll never have to worry about paying more fees&lt;br/&gt;   just as a result of splitting a payment; that makes routing easier&lt;br/&gt;   (see [1])&lt;br/&gt;&lt;br/&gt;So what&amp;#39;s the cost? The cost is that there&amp;#39;s no longer a fixed minimum&lt;br/&gt;fee -- so if you try sending a 1sat payment you&amp;#39;ll pay 0.1% of the fee&lt;br/&gt;to send a 1000sat payment, and there may be fixed costs that you have&lt;br/&gt;in routing payments that you&amp;#39;d like to be compensated for (eg, the&lt;br/&gt;computational work to update channel state, the bandwith to forward the&lt;br/&gt;tx, or the opportunity cost for not being able to accept another htlc if&lt;br/&gt;you&amp;#39;ve hit your max htlcs per channel limit).&lt;br/&gt;&lt;br/&gt;But there&amp;#39;s no need to explicitly separate those costs the way we do&lt;br/&gt;now; instead of charging 1sat base fee and 0.02% proportional fee,&lt;br/&gt;you can instead just set the 0.02% proportional fee and have a minimum&lt;br/&gt;payment size of 5000 sats (htlc_minimum_msat=5e6, ~$2), since 0.02%&lt;br/&gt;of that is 1sat. Nobody will be asking you to route without offering a&lt;br/&gt;fee of at least 1sat, but all the optimisation steps are easier.&lt;br/&gt;&lt;br/&gt;You could go a step further, and have the node side accept smaller&lt;br/&gt;payments despite the htlc minimum setting: eg, accept a 3000 sat payment&lt;br/&gt;provided it pays the same fee that a 5000 sat payment would have. That is,&lt;br/&gt;treat the setting as minimum_fee=1sat, rather than minimum_amount=5000sat;&lt;br/&gt;so the advertised value is just calculated from the real settings,&lt;br/&gt;and that nodes that want to send very small values despite having to&lt;br/&gt;pay high rates can just invert the calculation.&lt;br/&gt;&lt;br/&gt;I think something like this approach also makes sense when your channel&lt;br/&gt;becomes overloaded; eg if you have x HTLC slots available, and y channel&lt;br/&gt;capacity available, setting a minimum payment size of something like&lt;br/&gt;y/2/x**2 allows you to accept small payments (good for the network)&lt;br/&gt;when you&amp;#39;re channel is not busy, but reserves the last slots for larger&lt;br/&gt;payments so that you don&amp;#39;t end up missing out on profits because you&lt;br/&gt;ran out of capacity due to low value spam.&lt;br/&gt;&lt;br/&gt;Two other aspects related to this:&lt;br/&gt;&lt;br/&gt;At present, I think all the fixed costs are also incurred even when&lt;br/&gt;a htlc fails, so until we have some way of charging failing txs for&lt;br/&gt;incurring those costs, it seems a bit backwards to penalise successful&lt;br/&gt;txs who at least pay a proportional fee for the same thing. Until we&amp;#39;ve&lt;br/&gt;got a way of handling that, having zero base fee seems at least fair.&lt;br/&gt;&lt;br/&gt;Lower value HTLCs don&amp;#39;t need to be included in the commitment transaction&lt;br/&gt;(if they&amp;#39;re below the dust level, they definitely shouldn&amp;#39;t be included,&lt;br/&gt;and if they&amp;#39;re less than 1sat they can&amp;#39;t be included), and as such don&amp;#39;t&lt;br/&gt;incur all the same fixed costs that HTLCs that are committed too do.&lt;br/&gt;Having different base fees for microtransactions that incur fewer costs&lt;br/&gt;would be annoying; so having that be &amp;#34;amortised&amp;#34; into the proportional&lt;br/&gt;fee might help there too.&lt;br/&gt;&lt;br/&gt;I think eltoo can help in two ways by reducing the fixed costs: you no&lt;br/&gt;longer need to keep HTLC information around permanently, and if you do&lt;br/&gt;a multilevel channel factory setup, you can probably remove the ~400&lt;br/&gt;HTLCs per channel at any one time limit. But there&amp;#39;s still other fixed&lt;br/&gt;costs, so I think that would just lower the fixed costs, not remove them&lt;br/&gt;altogether and isn&amp;#39;t a fundamental change.&lt;br/&gt;&lt;br/&gt;I think the fixed costs for forwarding a HTLC are very small; something&lt;br/&gt;like:&lt;br/&gt;&lt;br/&gt;   0.02sats -- cost of permanently storing the HTLC info&lt;br/&gt;               (100 bytes, $500/TB/year, 1% discount rate)&lt;br/&gt;   0.04sats -- compute and bandwidth cost for updating an HTLC ($40/month&lt;br/&gt;               at linode, 1 second of compute)&lt;br/&gt;&lt;br/&gt;The opportunity cost of having HTLC slots or Bitcoin locked up until&lt;br/&gt;the HTLC succeeds/fails could be much more significant, though.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#the-channel_update-message&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#the-channel_update-message&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://basefee.ln.rene-pickhardt.de/&#34;&gt;https://basefee.ln.rene-pickhardt.de/&lt;/a&gt;
    </content>
    <updated>2023-06-09T15:03:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp8jqgj9kqg3hwgp9wkhchtjtjf08m7gma6pew3yewyz55x3d84nczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjgy78d</id>
    
      <title type="html">📅 Original date posted:2021-07-12 📝 Original message: Hello ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp8jqgj9kqg3hwgp9wkhchtjtjf08m7gma6pew3yewyz55x3d84nczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjgy78d" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg5rsulzlaypasp5sjtz7zrp5929r9aywk0ztcsdxu97muavkde0gg2kxkc&#39;&gt;nevent1q…kxkc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Hello world,&lt;br/&gt;&lt;br/&gt;Suppose you have some payments going from Alice to Bob to Carol with&lt;br/&gt;eltoo channels. Bob&amp;#39;s lightning node crashes, and he recovers from an&lt;br/&gt;old backup, and Alice and Carol end up dropping newer channel states&lt;br/&gt;onto the blockchain.&lt;br/&gt;&lt;br/&gt;Suppose the timeout for the payments is a few hours away, while the&lt;br/&gt;channels have specified a week long CSV delay to rectify any problems&lt;br/&gt;on-chain.&lt;br/&gt;&lt;br/&gt;Then I think that that means that:&lt;br/&gt;&lt;br/&gt; 1) Carol will reveal the point preimages on-chain via adaptor&lt;br/&gt;    signatures, but Bob won&amp;#39;t be able to decode those adaptor signatures&lt;br/&gt;    because those signatures will need to change for each state&lt;br/&gt;&lt;br/&gt; 2) Even if Bob knows the point preimages, he won&amp;#39;t be able to&lt;br/&gt;    claim the PTLC payments on-chain, for the same reason: he needs&lt;br/&gt;    newer adaptor signatures that he&amp;#39;ll have lost with the state update&lt;br/&gt;&lt;br/&gt; 3) For any payments that timeout, Carol doesn&amp;#39;t have any particular&lt;br/&gt;    incentive to make it easy for Bob to claim the refund, and Bob won&amp;#39;t&lt;br/&gt;    have the adaptor signatures for the latest state to do so&lt;br/&gt;&lt;br/&gt; 4) But Alice will be able to claim refunds easily. This is working how&lt;br/&gt;    it&amp;#39;s meant to, at least!&lt;br/&gt;&lt;br/&gt;I think you could fix (3) by giving Carol (who does have all the adaptor&lt;br/&gt;signatures for the latest state) the ability to steal funds that are&lt;br/&gt;meant to have been refunded, provided she gives Bob the option of claiming&lt;br/&gt;them first.&lt;br/&gt;&lt;br/&gt;However fixing (1) and (2) aren&amp;#39;t really going against Alice or Carol&amp;#39;s&lt;br/&gt;interests, so maybe you can just ask: Carol loses nothing by allowing&lt;br/&gt;Bob to claim funds from Alice; and Alice has already indicated that&lt;br/&gt;knowing P is worth more to her than the PTLC&amp;#39;s funds -- otherwise she&lt;br/&gt;wouldn&amp;#39;t have forwarded the PTLC to Bob in the first place.&lt;br/&gt;&lt;br/&gt;Likewise, everyone&amp;#39;s probably incentivised to negotiate cooperative&lt;br/&gt;closes instead of going on-chain -- better privacy, less fees, and less&lt;br/&gt;delay before the funds can be used elsewhere.&lt;br/&gt;&lt;br/&gt;FWIW, I think a similar flaw exists even in the original eltoo spec --&lt;br/&gt;Alice could simply decline to publish the settlement transaction until&lt;br/&gt;the timeout has been reached, preventing Bob from revealing the HTLC&lt;br/&gt;preimage before Alice can claim the refund.&lt;br/&gt;&lt;br/&gt;So I think that adds up to:&lt;br/&gt;&lt;br/&gt; a) Nodes should share state on reconnection; if you find a node that&lt;br/&gt;    doesn&amp;#39;t do this, close the channel and put the node on your enemies&lt;br/&gt;    list. If you disagree on what the current state is, share your most&lt;br/&gt;    recent state, and if the other guy&amp;#39;s state is more recent, and all&lt;br/&gt;    the signatures verify, update your state to match theirs.&lt;br/&gt;&lt;br/&gt; b) Always negotiate a mutual/cooperative close if possible, to avoid&lt;br/&gt;    actually using the eltoo protocol on-chain.&lt;br/&gt;&lt;br/&gt; c) If you want to allow continuing the channel after restoring an old&lt;br/&gt;    state from backup, set the channel state index based on the real time,&lt;br/&gt;    eg (real_time-start_time)*(max_updates_per_second). That way your&lt;br/&gt;    first update after a restore from backup will ensure that any old&lt;br/&gt;    states that your channel partner may not have told you about are&lt;br/&gt;    invalidated.&lt;br/&gt;&lt;br/&gt; d) Accept that if you lose connectivity to a channel partner, you will&lt;br/&gt;    have to pay any PTLCs that were going to them, and won&amp;#39;t be able&lt;br/&gt;    to claim the PTLCs that were funding them. Perhaps limit the total&lt;br/&gt;    value of inbound PTLCs for forwarding that you&amp;#39;re willing to accept&lt;br/&gt;    at any one itme?&lt;br/&gt;&lt;br/&gt;Also, layered commitments seem like they make channel factories&lt;br/&gt;complicated too. Nobody came up with a way to avoid layered commitments&lt;br/&gt;while I wasn&amp;#39;t watching did they?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T15:03:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf005w528nthq6f3gzdldqw4h07dttleuvsjka0q7kgu06zvvasmszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kdtds84</id>
    
      <title type="html">📅 Original date posted:2020-02-20 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf005w528nthq6f3gzdldqw4h07dttleuvsjka0q7kgu06zvvasmszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kdtds84" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszcw7r83t79f6343squnyk5wucgt0kl6nm2aal9evkp87pgr4hhfqm7lsa9&#39;&gt;nevent1q…lsa9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-20&lt;br/&gt;📝 Original message:&lt;br/&gt;On Thu, Feb 20, 2020 at 03:42:39AM &#43;0000, ZmnSCPxj wrote:&lt;br/&gt;&amp;gt; A thought that arises here is, what happens if I have forwarded a payment, then the outgoing channel is dropped onchain and that peer disconnects from me?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Since the onchain HTLC might have a timelock of, say, a few hundred blocks from now, the outgoing peer can claim it up until the timelock.&lt;br/&gt;&amp;gt; If the peer does not claim it, I cannot claim it in my incoming as well.&lt;br/&gt;&amp;gt; I also cannot safely fail my incoming, as the outgoing peer can still claim it until the timelock expires.&lt;br/&gt;&lt;br/&gt;Suppose the channel state looks like:&lt;br/&gt;&lt;br/&gt;  Bob&amp;#39;s balance:   $150&lt;br/&gt;  Carol&amp;#39;s balance: $500&lt;br/&gt;  Bob to Carol:     $50, hash X, timelock &#43;2016 blocks&lt;br/&gt;&lt;br/&gt;The pre-signed close transaction will have already deducted maybe $1 in&lt;br/&gt;fees, say 50c from each balance.&lt;br/&gt;&lt;br/&gt;At 5% pa, that&amp;#39;s $50*0.05*2/52, so about 10 cents worth of &amp;#34;holding&amp;#34;&lt;br/&gt;fees, so that seems like it&amp;#39;s worth just committing to up-front, ie:&lt;br/&gt;&lt;br/&gt;  Bob&amp;#39;s balance:   $149.60 (-.50&#43;.10)&lt;br/&gt;  Carol&amp;#39;s balance: $499.40 (-.50-.10)&lt;br/&gt;  Bob to Carol:     $50, hash X, timelock &#43;2016 blocks&lt;br/&gt;  Fees:              $1&lt;br/&gt;&lt;br/&gt;And that seems necessary anyway: if the channel does drop to the chain,&lt;br/&gt;then the HTLC can&amp;#39;t be cancelled, so if it never confirms, Bob will have&lt;br/&gt;had to pay, say, 9.5c to Alice waiting for the timeout, and can then&lt;br/&gt;immediately cancel the HTLC with Alice allowing it to finish unwinding.&lt;br/&gt;&lt;br/&gt;So I think the idea would be not to accept a (rate, amount, timelock)&lt;br/&gt;tuple for an incoming HTLC unless the rate*amount*timelock product&lt;br/&gt;is substantially less than what you&amp;#39;re putting towards the blockchain&lt;br/&gt;fees anyway, as otherwise you&amp;#39;ve got bad incentives for the other guy to&lt;br/&gt;drop to the chain.&lt;br/&gt;&lt;br/&gt;Note the rate increases with number of hops, so if it&amp;#39;s 1% pa per hop,&lt;br/&gt;the 11th peer will be emitting 10% pa. I think that&amp;#39;s probably okay,&lt;br/&gt;because BTC&amp;#39;s deflationary nature probably means you don&amp;#39;t need to earn&lt;br/&gt;much interest on it, and you can naturally choose the rate dynamically&lt;br/&gt;based on how many HTLCs you currently have open and how much of your&lt;br/&gt;channel funds are being used up by the HTLC?&lt;br/&gt;&lt;br/&gt;Also, you&amp;#39;d presumably update your channel state every hundred blocks,&lt;br/&gt;reducing the 10c by half a cent or so each time, so you could have your&lt;br/&gt;risk reduce. Maybe there could be some way of bumping the timelock across&lt;br/&gt;a HTLC path so that the risk is capped, but if the HTLC is still being&lt;br/&gt;paid for it doesn&amp;#39;t have to be cancelled?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:58:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr5ey7l44cnls9lmnx0x4k7sleq84g8exltdt9gap2s3vqmydyqcqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmhjygr</id>
    
      <title type="html">📅 Original date posted:2020-02-20 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr5ey7l44cnls9lmnx0x4k7sleq84g8exltdt9gap2s3vqmydyqcqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmhjygr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8uhk7jvuaal29lumgy77n5vqvzucrvnkp4aw4lkdgvcfdqqdp70se4hhv7&#39;&gt;nevent1q…hhv7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-20&lt;br/&gt;📝 Original message:&lt;br/&gt;On Tue, Feb 18, 2020 at 10:23:29AM &#43;0100, Joost Jager wrote:&lt;br/&gt;&amp;gt; A different way of mitigating this is to reverse the direction in which the&lt;br/&gt;&amp;gt; bond is paid. So instead of paying to offer an htlc, nodes need to pay to&lt;br/&gt;&amp;gt; receive an htlc. This sounds counterintuitive, but for the described jamming&lt;br/&gt;&amp;gt; attack there is also an attacker node at the end of the route. The attacker&lt;br/&gt;&amp;gt; still pays.&lt;br/&gt;&lt;br/&gt;I think this makes a lot of sense. I think the way it would end up working&lt;br/&gt;is that the further the route extends, the greater the payments are, so:&lt;br/&gt;&lt;br/&gt;  A -&amp;gt; B   : B sends A 1msat per minute&lt;br/&gt;  A -&amp;gt; B -&amp;gt; C : C sends B 2msat per minute, B forwards 1msat/min to A&lt;br/&gt;  A -&amp;gt; B -&amp;gt; C -&amp;gt; D : D sends C 3 msat, etc&lt;br/&gt;  A -&amp;gt; B -&amp;gt; C -&amp;gt; D -&amp;gt; E : E sends D 4 msat, etc&lt;br/&gt;&lt;br/&gt;so each node is receiving &#43;1 msat/minute, except for the last one, who&amp;#39;s&lt;br/&gt;paying n msat/minute, where n is the number of hops to have gotten up to&lt;br/&gt;the last one. There&amp;#39;s the obvious privacy issue there, with fairly&lt;br/&gt;obvious ways to fudge around it, I think.&lt;br/&gt;&lt;br/&gt;But that&amp;#39;s rational, because that last node can either (a) collect the&lt;br/&gt;payment, covering their cost; or (b) forward the payment, at which point&lt;br/&gt;they&amp;#39;ll start collecting funds rather than paying them; or (c) cancel&lt;br/&gt;the payment releasing all the locked up funds all the way back.&lt;br/&gt;&lt;br/&gt;I think it might make sense for the payments to have a grace period --&lt;br/&gt;ie, &amp;#34;if you keep this payment open longer than 20 seconds, you have to&lt;br/&gt;start paying me x msat/minute, but if it fulfills or cancels before&lt;br/&gt;then, it&amp;#39;s all good&amp;#34;.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure if there needs to be any enforcement for this beyond &amp;#34;this&lt;br/&gt;peer isn&amp;#39;t obeying the protocol, so I&amp;#39;m going to close the channel&amp;#34;; not&lt;br/&gt;even sure it&amp;#39;s something that needs to be negotiated as part of payment&lt;br/&gt;routing -- it could just be something each peer does for HTLCs on their&lt;br/&gt;channels? If that can be made to work, it doesn&amp;#39;t need much crypto or&lt;br/&gt;bitcoin consensus changes, or even much deployment coordination, all of&lt;br/&gt;which would be awesome.&lt;br/&gt;&lt;br/&gt;I think at $10k/BTC then 1msat is about the fair price for locking up $5&lt;br/&gt;worth of BTC (so 50k sat) for 1 minute at a 1% pa interest rate, fwiw.&lt;br/&gt;&lt;br/&gt;Maybe this opens up some sort of an attack where a peer lies about the&lt;br/&gt;time to make the &amp;#34;per minute&amp;#34; go faster, but if msats-per-minute is the&lt;br/&gt;units, not sure that really matters.&lt;br/&gt;&lt;br/&gt;Maybe this also implies a different protocol for HTLC forwarding,&lt;br/&gt;something like:&lt;br/&gt;&lt;br/&gt;  1. A sends the HTLC onion packet to B&lt;br/&gt;  2. B decrypts it, makes sure it makes sense&lt;br/&gt;  3. B sends a half-signed updated channel state back to A&lt;br/&gt;  4. A accepts it, and forwards the other half-signed channel update to B&lt;br/&gt;&lt;br/&gt;so that at any point before (4) Alice can say &amp;#34;this is taking too long,&lt;br/&gt;I&amp;#39;ll start losing money&amp;#34; and safely abort the HTLC she was forwarding to&lt;br/&gt;Bob to avoid paying fees; while only after (4) can she start the time on&lt;br/&gt;expecting Bob to start paying fees that she&amp;#39;ll forward back. That means&lt;br/&gt;1.5 round-trips before Bob can really forward the HTLC on to Carol;&lt;br/&gt;but maybe it&amp;#39;s parallelisable, so Bob/Carol could start at (1) as soon&lt;br/&gt;as Alice/Bob has finished (2).&lt;br/&gt;&lt;br/&gt;Cheers&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:58:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq58d39mqwnws8ravdmhlycuhl7zz2yrct0ec42katd9ung0pdafszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2krwh0p0</id>
    
      <title type="html">📅 Original date posted:2019-12-17 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq58d39mqwnws8ravdmhlycuhl7zz2yrct0ec42katd9ung0pdafszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2krwh0p0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsz756m7dcnpurvxp8569y0hgxl57fz22zrnp525cc03vmc2m2expsefw206&#39;&gt;nevent1q…w206&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-17&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sun, Dec 15, 2019 at 03:43:07PM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt; For now, I am assuming the continued use of the existing Poon-Dryja update mechanism.&lt;br/&gt;&amp;gt; Decker-Russell-Osuntokun requires `SIGHASH_NOINPUT`/`SIGHASH_ANYPREVOUT`, and its details seem less settled for now than taproot details.&lt;br/&gt;&lt;br/&gt;Supporting PTLCs instead of HTLCs is a global upgrade in that you need&lt;br/&gt;all nodes along your payment path to support it; moving from Poon-Dryja&lt;br/&gt;to Decker-Russell-Osuntokun is only relevant to individual peers. So I&lt;br/&gt;think it makes sense to do PTLCs first if the required features aren&amp;#39;t&lt;br/&gt;both enabled at the same time.&lt;br/&gt;&lt;br/&gt;&amp;gt; Poon-Dryja with Schnorr&lt;br/&gt;&amp;gt; -----------------------&lt;br/&gt;&lt;br/&gt;I think MuSig between the two pairs is always superior to a NUMS point&lt;br/&gt;for the taproot internal key; you definitely want to calculate a point&lt;br/&gt;rather than use a constant, or you&amp;#39;re giving away that it&amp;#39;s lightning,&lt;br/&gt;and if you&amp;#39;re calculating you might as well calculate something that can&lt;br/&gt;be used for a cooperative key path spend if you ever want to.&lt;br/&gt;&lt;br/&gt;&amp;gt; A potential issue with MuSig is the increased number of communication rounds needed to generate signatures.&lt;br/&gt;&lt;br/&gt;I think you can reduce this via an alternative script path. In&lt;br/&gt;particular, if you want a script that the other guy can spend if they&lt;br/&gt;reveal the discrete log of point X, with musig you do:&lt;br/&gt;&lt;br/&gt;   P = H(H(A,B),1)*A &#43; H(H(A,B),2)*B&lt;br/&gt;   [exchange H(RA),H(RB),RA,RB]&lt;br/&gt;&lt;br/&gt;   [send X]&lt;br/&gt;&lt;br/&gt;   sb = rb &#43; H(RA&#43;RB&#43;X,P,m)*H(H(A,B),2)*b&lt;br/&gt;&lt;br/&gt;   [wait for sb]&lt;br/&gt;&lt;br/&gt;   sa = ra &#43; H(RA&#43;RB&#43;X,P,m)*H(H(A,B),1)*a&lt;br/&gt;&lt;br/&gt;   [store RA&#43;RB&#43;X, sa&#43;sb, supply sa, watch for sig]&lt;br/&gt;&lt;br/&gt;   sig = (RA&#43;RB&#43;X, sa&#43;sb&#43;x)&lt;br/&gt;&lt;br/&gt;So the 1.5 round trips are &amp;#34;I want to do a PTLC for X&amp;#34;, &amp;#34;okay here&amp;#39;s&lt;br/&gt;sb&amp;#34;, &amp;#34;great, here&amp;#39;s sa&amp;#34;.&lt;br/&gt;&lt;br/&gt;But with taproot you can have a script path as well, so you could have a&lt;br/&gt;script:&lt;br/&gt;&lt;br/&gt;   A CHECKSIGVERIFY B CHECKSIG&lt;br/&gt;&lt;br/&gt;and supply a partial signature:&lt;br/&gt;&lt;br/&gt;   R&#43;X,s,X where s = r &#43; H(R&#43;X,A,m)*a&lt;br/&gt;&lt;br/&gt;to allow them to satisfy &amp;#34;A CHECKSIGVERIFY&amp;#34; if they know the discrete&lt;br/&gt;log of X, and of course they can sign with B at any time. This is only&lt;br/&gt;half a round trip, and can be done at the same time as sending the &amp;#34;I&lt;br/&gt;want to do a PTLC for X&amp;#34; message to setup the (ultimately cheaper) MuSig&lt;br/&gt;spend. It&amp;#39;s an extra signature on the sender&amp;#39;s side and an extra verification &lt;br/&gt;on the receiver&amp;#39;s side, but I think it works out fine.&lt;br/&gt;&lt;br/&gt;&amp;gt; Pointlocked Timelocked Contracts&lt;br/&gt;&amp;gt; --------------------------------&lt;br/&gt;&amp;gt; First, I will discuss how to create a certain kind of PTLCs, which I call &amp;#34;purely scriptless&amp;#34; PTLCs.&lt;br/&gt;&amp;gt; In particular, I would like to point out that we *actually* use in current Poon-Dryja Lightning Network channels is *revocable* HTLCs, thus we need to have *revocable* PTLCs to replace them.&lt;br/&gt;&amp;gt; * First, we must have a sender A, who is buying a secret scalar, and knows the point equivalent to that scalar.&lt;br/&gt;&amp;gt; * Second, we have a receiver B, who knows this secret scalar (or can somehow learn this secret scalar).&lt;br/&gt;&amp;gt; * A and B agree on the specifications of the PTLC: the point, the future absolute timelock, the value.&lt;br/&gt;&amp;gt; * A creates (but *does not* sign or broadcast) a transaction that pays to a MuSig of A and B and shares the txid and output number with the relevant MuSig output.&lt;br/&gt;&amp;gt; * A and B create a backout transaction.&lt;br/&gt;&amp;gt;   * This backout has an `nLockTime` equal to the agreed absolute timelock.&lt;br/&gt;&amp;gt;   * It spends the above MuSig output (this input must enable `nLockTime`, e.g. by setting `nSequence` to `0xFFFFFFFE`).&lt;br/&gt;&amp;gt;   * It creates an output that is solely controlled by A.&lt;br/&gt;&amp;gt; * A and B perform a MuSig ritual to sign the backout transaction.&lt;br/&gt;&amp;gt; * A now signs and broadcast the first transaction, the one that has an output that represents the PTLC.&lt;br/&gt;&amp;gt; * A and B wait for the above transaction to confirm deeply.&lt;br/&gt;&amp;gt;   This completes the setup phase for the PTLC.&lt;br/&gt;&amp;gt; * After this point, if the agreed-upon locktime is reached, A broadcasts the backout transaction and aborts the ritual.&lt;br/&gt;&amp;gt; * A and B create a claim transaction.&lt;br/&gt;&amp;gt;   * This has an `nLockTime` of 0, or a present or past blockheight, or disabled `nLockTime`.&lt;br/&gt;&amp;gt;   * This spends the above MuSig output.&lt;br/&gt;&amp;gt;   * This creates an output that is solely controlled by B.&lt;br/&gt;&amp;gt; * A and B generate an adaptor signature for the claim transaction, which reveals the agreed scalar.&lt;br/&gt;&amp;gt;   * This is almost entirely a MuSig ritual, except at `s` exchange, B provides `t &#43; r &#43; h(R | MuSig(A,B) | m) * MuSigTweak(A, B, B) * b` first, then demands `r &#43; h(R | MuSig(A,B) | m) * MuSigTweak(A, B, A) * a` from A, then reveals `r &#43; h(R | MuSig(A,B) | m) * MuSigTweak(A, B, B) * b` (or the completed signature, by publishing onchain), revealing the secret scalar `t` to A.&lt;br/&gt;&amp;gt; * A is able to learn the secret scalar from the above adaptor signature followed by the full signature, completing the ritual.&lt;br/&gt;&lt;br/&gt;(I think it makes more sense to provide &amp;#34;r &#43; H(R&#43;T, P, m)*b&amp;#34; instead of&lt;br/&gt;&amp;#34;r&#43;t &#43; H(R,P,m)*b&amp;#34; -- you might not know &amp;#34;t&amp;#34; at the point you need to&lt;br/&gt;start the signature exchange)&lt;br/&gt;&lt;br/&gt;I think the setup can be similar to BOLT-3:&lt;br/&gt;&lt;br/&gt;  Funding TX output:  MuSig(A,B)&lt;br/&gt;&lt;br/&gt;  Commitment Tx Held by A:&lt;br/&gt;    - locktime: obscured commitment number&lt;br/&gt;    - input: funding tx&lt;br/&gt;    - outputs:&lt;br/&gt;        balance A&lt;br/&gt;	balance B&lt;br/&gt;	PTLC paying to A&lt;br/&gt;	PTLC paying to B&lt;br/&gt;        [etc]&lt;br/&gt;&lt;br/&gt;balance B can pay directly to B&lt;br/&gt;&lt;br/&gt;balance A pays to MuSig(Rn,B) -- where Rn is the revocation key for the&lt;br/&gt;nth commitment, and A holds a presigned tx by B with relative locktime&lt;br/&gt;set, paying the funds to A.&lt;br/&gt;&lt;br/&gt;PTLCs also pay to MuSig(Rn,B) -- &lt;br/&gt;&lt;br/&gt;for the one paying to A, A holds a tx&lt;br/&gt;partially presigned by B that needs the point&amp;#39;s discrete log added to x&lt;br/&gt;with relative timelock; for the one paying to B, A holds a presigned tx&lt;br/&gt;by B that has absolute locktime set and pays to MuSig(Rn,B) for which&lt;br/&gt;A has another presigned tx by B that has relative locktime set.&lt;br/&gt;&lt;br/&gt;HTLC&amp;#39;s also pay to MuSig(Rn,B) but they&amp;#39;re tweaked by a script -- if&lt;br/&gt;they&amp;#39;re paying to B, A just holds the same timelocked presigned tx&amp;#39;s as&lt;br/&gt;for PTLCs; if they&amp;#39;re paying to A, A will use a &amp;#34;HASH160 X EQUALVERIFY&lt;br/&gt;A CHECKSIGVERIFY delay CSV&amp;#34; script path instead.&lt;br/&gt;&lt;br/&gt;B has a similar commitment Tx; and A holds pre-signed tx&amp;#39;s for the&lt;br/&gt;PTLC&amp;#39;s there, except without the relative timelock txs.&lt;br/&gt;&lt;br/&gt;This adds up to B needing to provide A with signatures for:&lt;br/&gt;&lt;br/&gt;  the funding tx&lt;br/&gt;  A&amp;#39;s balance&lt;br/&gt;  each PTLC/HTLC paying/refunding to A from A&amp;#39;s commitment and the sub tx for each of those&lt;br/&gt;  each PTLC/HTLC paying/refunding to B from B&amp;#39;s commitment&lt;br/&gt;&lt;br/&gt;and each of those signatures need to be updated every commitment update.&lt;br/&gt;&lt;br/&gt;Note that you need to receive all the partial signatures to spend the&lt;br/&gt;commitment tx before you provide your partial signature over the funding&lt;br/&gt;tx to authorise the commitment tx. So yet more rounds of communication.&lt;br/&gt;&lt;br/&gt;I think this approach would let you upgrade existing channels to support&lt;br/&gt;PTLCs without closing/reopening, though.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think you could do something eltoo-ish to simplify watchtowers:&lt;br/&gt;&lt;br/&gt;    Funding TX output: MuSig(A,B)&lt;br/&gt;&lt;br/&gt;    Commitment Tx Held by A:&lt;br/&gt;      - locktime: obscured commitment number&lt;br/&gt;      - inputs: funding tx&lt;br/&gt;      - outputs: MuSig(Rn,B)&lt;br/&gt;&lt;br/&gt;    Settlement Tx Held by A:&lt;br/&gt;      - nsequence: to_self_delay&lt;br/&gt;      - input: commitment tx held by A&lt;br/&gt;      - outputs:&lt;br/&gt;         balance A&lt;br/&gt;	 balance B&lt;br/&gt;	 PTLC paying to A&lt;br/&gt;	 PTLC paying to B&lt;br/&gt;&lt;br/&gt;    Secondary Settlement Tx Held by B:&lt;br/&gt;      - no abs/relative locktime&lt;br/&gt;      - input: commitment tx held by A&lt;br/&gt;      - outputs:&lt;br/&gt;         balance A&lt;br/&gt;	 balance B&lt;br/&gt;	 PTLC paying to A&lt;br/&gt;	 PTLC paying to B&lt;br/&gt;&lt;br/&gt;in which case once the commitment is revoked, B only needs to do a single&lt;br/&gt;signature of MuSig(Rn,B) to claim all the funds if A publishes the&lt;br/&gt;old commitment, without having to worry about any HTLC/PTLC info? The&lt;br/&gt;settlement tx can be a bit simplified I think too. Maybe the edge case&lt;br/&gt;when the absolute locktime is close to the relative locktime makes this&lt;br/&gt;painful, though I think it would make eltoo painful then too? Not sure&lt;br/&gt;if I&amp;#39;m missing something here. &lt;br/&gt;&lt;br/&gt;(Note that this gives symmetric delays: if A unilaterally closes the&lt;br/&gt;channel by publishing the commitment tx, and B wants their funds, B can&lt;br/&gt;either immediately claim all the funds via the revocation secret if A&lt;br/&gt;was cheating, or has to publish the settlement tx first, at which point&lt;br/&gt;A can get all A&amp;#39;s funds immediately as well)&lt;br/&gt;&lt;br/&gt;&amp;gt; Revocable Outputs and PTLCs&lt;br/&gt;&amp;gt; ---------------------------&lt;br/&gt;&amp;gt; * No wallet uses relative-timelock for ordinary spends, unlike abolute-locktime where Bitcoin Core always uses absolute-locktime `nLockTime` for ordinary spends.&lt;br/&gt;&lt;br/&gt;I think the fact lightning relative timelocks will be &amp;#34;round&amp;#34; numbers,&lt;br/&gt;and the timelocked tx will be published as soon as possible will make&lt;br/&gt;it relatively easy to distinguish them from other spends anyway. Doing&lt;br/&gt;it scriptlessly is cheaper on chain though.&lt;br/&gt;&lt;br/&gt;Anyway, my picks are:&lt;br/&gt;&lt;br/&gt; - [x] Poon-Dryja PTLCs prior to eltoo&lt;br/&gt; - [x] scriptless revocation via MuSig(Rn,B) internal keys&lt;br/&gt; - [x] support HTLCs via taproot&lt;br/&gt; - [x] (optionally) allow use of script paths to minimise round trip&lt;br/&gt;       delay&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:57:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgcaznhyuq826zunhr72jmh7xhksfw8wy4chmxpfzztucatz59pgszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kgfgdyk</id>
    
      <title type="html">📅 Original date posted:2019-12-03 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgcaznhyuq826zunhr72jmh7xhksfw8wy4chmxpfzztucatz59pgszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kgfgdyk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqg9ncc6k9zdrx7ya978pxy879rnmxwm8mtrnd0u3gaz2jgya0sqsecuthf&#39;&gt;nevent1q…uthf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-03&lt;br/&gt;📝 Original message:&lt;br/&gt;On Tue, Nov 26, 2019 at 03:41:14PM -0800, Conner Fromknecht wrote:&lt;br/&gt;&amp;gt; I recently revisited the eltoo paper and noticed some things related&lt;br/&gt;&amp;gt; watchtowers that might affect channel construction.&lt;br/&gt;&amp;gt; In order to spend, however, the tower must also produce a witness&lt;br/&gt;&amp;gt; script which when hashed matches the witness program of the input. To&lt;br/&gt;&amp;gt; ensure settlement txns can only spend from exactly one update txn,&lt;br/&gt;&amp;gt; each update txn uses unique keys for the settlement clause, meaning&lt;br/&gt;&amp;gt; that each state has a _unique_ witness program.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t believe that&amp;#39;s necessary with the ANYPREVOUT design, see&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-May/001996.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-May/001996.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The design I&amp;#39;m thinking of use a common taproot internal key&lt;br/&gt;P=muSig(A,B) for update transactions. The tapscript paths are&lt;br/&gt;(with the chaperone sigs dropped):&lt;br/&gt;&lt;br/&gt;  Update n: [nLockTime = 500e6&#43;n]&lt;br/&gt;    script: OP_1 CHECKSIGVERIFY [500e6&#43;n&#43;1] CLTV&lt;br/&gt;    witness: [ANYPREVOUTANYSCRIPT sig]&lt;br/&gt;&lt;br/&gt;  Settlement n: [nSequence = delay; nLockTime=500e6&#43;n&#43;1]&lt;br/&gt;    witness: [ANYPREVOUT sig]  &lt;br/&gt;&lt;br/&gt;(This relies on having the two variants of ANYPREVOUT, one of which&lt;br/&gt;commits to the state number via commiting to the [500e6&#43;n&#43;1] value in&lt;br/&gt;the update tx&amp;#39;s script, so that you don&amp;#39;t need unique keys to ensure&lt;br/&gt;settlement tx n can&amp;#39;t spend settlement tx n&#43;k)&lt;br/&gt;&lt;br/&gt;With this you can tell which update was posted by subtracting 500e6 from&lt;br/&gt;the nLocktime, and use that to calculate the tapscript the update tx used,&lt;br/&gt;and the internal key is constant.&lt;br/&gt;&lt;br/&gt;The watchtower only needs to post the update tx -- as long as the latest&lt;br/&gt;update is posted, the only tx that can spend it is the correct settlement,&lt;br/&gt;so you can post that whenever you&amp;#39;re back online, even if that&amp;#39;s weeks&lt;br/&gt;or months later, and likewise for actually claiming your funds from the&lt;br/&gt;settlement tx&amp;#39;s outputs.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:57:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswqqcsg5c4rp0kv252zjpkeaaclgf0vtg4xl8yg6yxchys0etwgdgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kh33tnj</id>
    
      <title type="html">📅 Original date posted:2019-11-08 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswqqcsg5c4rp0kv252zjpkeaaclgf0vtg4xl8yg6yxchys0etwgdgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kh33tnj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstqjsr5r2w86q4eydurnt4w03ehr687cp43g4769ayvyknfgknhps4f5jg5&#39;&gt;nevent1q…5jg5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-08&lt;br/&gt;📝 Original message:&lt;br/&gt;On Fri, Nov 08, 2019 at 01:08:04PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; [ Snip summary, which is correct ]&lt;br/&gt;&lt;br/&gt;Huzzah!&lt;br/&gt;&lt;br/&gt;This correlates all the hops in a payment when the route reaches its end&lt;br/&gt;(due to the final preimage getting propogated back for everyone to justify&lt;br/&gt;the funds they claim). Maybe solvable by converting from hashes to ECC&lt;br/&gt;as the trapdoor function?&lt;br/&gt;&lt;br/&gt;The refund amount propogating back also reveals the path, probably.&lt;br/&gt;Could that be obfusticated by somehow paying each intermediate node&lt;br/&gt;both as the funds go out and come back, so the refund decreases on the&lt;br/&gt;way back?&lt;br/&gt;&lt;br/&gt;Oh, can we make the amounts work like the onion, where it stays constant?&lt;br/&gt;So:&lt;br/&gt;&lt;br/&gt;  Alice wants to pay Dave via Bob, Carol. Bob gets 700 msat, Carol gets&lt;br/&gt;  400 msat, Dave gets 300 msat, and Alice gets 100 msat refunded.&lt;br/&gt;&lt;br/&gt;  Success:&lt;br/&gt;    Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;    Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;    Carol forwards 1500 msat to Dave  (-1500, 0, 0, &#43;1500)&lt;br/&gt;    Dave refunds 1200 msat to Carol   (-1500, 0, &#43;1200, &#43;300)&lt;br/&gt;    Carol refunds 800 msat to Bob     (-1500, &#43;800, &#43;400, &#43;300)&lt;br/&gt;    Bob refunds 100 msat to Alice     (-1400, &#43;700, &#43;400, &#43;300)&lt;br/&gt;&lt;br/&gt;  Clean routing failure at Carol/Dave:&lt;br/&gt;    Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;    Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;    Carol says Dave&amp;#39;s not talking&lt;br/&gt;    Carol refunds 1100 msat to Bob    (-1500, &#43;1100, &#43;400, 0)&lt;br/&gt;    Bob refunds 400 msat to Alice     (-1100, &#43;700, &#43;400, 0)&lt;br/&gt;&lt;br/&gt;I think that breaks the correlation pretty well, so you just need a&lt;br/&gt;decent way of obscuring path length?&lt;br/&gt;&lt;br/&gt;In the uncooperative routing failure case, I wonder if using an ECC&lt;br/&gt;trapdoor and perhaps scriptless scripts, you could make it so Carol&lt;br/&gt;doesn&amp;#39;t even get an updated state without revealing the preimage...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:57:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswlaxer34xu34edds7tdvehdwwrxdwtw70z0q4xquufwruc6jkl7qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kstacv4</id>
    
      <title type="html">📅 Original date posted:2019-11-06 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswlaxer34xu34edds7tdvehdwwrxdwtw70z0q4xquufwruc6jkl7qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kstacv4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdp5hpse9epnvsxecwrnusdmc5nfnwsw8spcl8raeamqq8x4f7vxs0x94u9&#39;&gt;nevent1q…94u9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-06&lt;br/&gt;📝 Original message:&lt;br/&gt;On Wed, Nov 06, 2019 at 10:43:23AM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Rusty prepares a nonce, AAAAA and hashes it 25 times = ZZZZZ.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; ZmnSCPxj prepares the onion, but adds extra fields (see below).  &lt;br/&gt;&amp;gt; &amp;gt; It would have made more sense to me for Alice (Zmn) to generate&lt;br/&gt;&amp;gt; &amp;gt; the nonce, hash it, and prepare the onion, so that the nonce is&lt;br/&gt;&amp;gt; &amp;gt; revealed to Dave (Rusty) if/when the message ever actually reaches its&lt;br/&gt;&amp;gt; &amp;gt; destination. Otherwise Rusty has to send AAAAA to Zmn already so that&lt;br/&gt;&amp;gt; &amp;gt; Zmn can prepare the onion?&lt;br/&gt;&amp;gt; The entire point is to pay *up-front*, though, to prevent spam.&lt;br/&gt;&lt;br/&gt;Hmm, I&amp;#39;m not sure I see the point of paying upfront but not&lt;br/&gt;unconditionally -- you already commit the funds as part of the HTLC,&lt;br/&gt;and if you&amp;#39;re refunding some of them, you kind-of have to keep them&lt;br/&gt;reserved or you risk finalising the HTLC causing a failure because you&lt;br/&gt;don&amp;#39;t have enough msats spare to do the refund?&lt;br/&gt;&lt;br/&gt;If you refund on routing failure, why wouldn&amp;#39;t a spammer just add a fake&lt;br/&gt;&amp;#34;Ezekiel&amp;#34; at the end of the route after Dave, so that the HTLCs always&lt;br/&gt;fail and all the fees are returned?&lt;br/&gt;&lt;br/&gt;&amp;gt; Bob/ZmnSCPxj doesn&amp;#39;t prepare anything in the onion.  They get handed the&lt;br/&gt;&amp;gt; last hash directly: Alice is saying &amp;#34;I&amp;#39;ll pay you 50msat for each&lt;br/&gt;&amp;gt; preimage you can give me leading to this hash&amp;#34;.&lt;br/&gt;&lt;br/&gt;So my example was Alice paying Dave via Bob and Carol (so Alice/Bob,&lt;br/&gt;Bob/Carol, Carol/Dave being the individual channels).&lt;br/&gt;&lt;br/&gt;What you wrote to Zmn says &amp;#34;Rusty decrypts the onion, reads the prepay&lt;br/&gt;field: it says 14, LLLL.&amp;#34; but Alice doesn&amp;#39;t know anything other than&lt;br/&gt;ZZZZ so can&amp;#39;t put LLLL in the onion?&lt;br/&gt;&lt;br/&gt;Are you using Hornet so that every intermediary can communicate a nonce&lt;br/&gt;back to the source of the route? If not, &amp;#34;Rusty&amp;#34; generating the nonce&lt;br/&gt;seems like you&amp;#39;re informing Rusty that you&amp;#39;re actually the origin of the&lt;br/&gt;HTLC, and not just innocently forwarding it along; if so, it seems like&lt;br/&gt;you have independent nonces at each step, rather than&lt;br/&gt;AAAA/BBBB/LLLL/ZZZZ in a direct chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m not sure why lucky hashing should result in a discount?&lt;br/&gt;&amp;gt; Because the PoW adds noise to the amounts, otherwise the path length is&lt;br/&gt;&amp;gt; trivially exposed, esp in the failure case.  It&amp;#39;s weak protection&lt;br/&gt;&amp;gt; though.&lt;br/&gt;&lt;br/&gt;With a linear/exponential relationship you just get &amp;#34;half the time it&amp;#39;s&lt;br/&gt;1 unit, 25% of the time it&amp;#39;s 2 units, 12% of the time it&amp;#39;s 3 units&amp;#34;, so&lt;br/&gt;I don&amp;#39;t think that&amp;#39;s adding much noise?&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; You&amp;#39;ve only got two nonce choices -- the initial AAAA and the depth&lt;br/&gt;&amp;gt; &amp;gt; that you tell Bob and Carol to hash to as steps in the route;&lt;br/&gt;&amp;gt; No, the sphinx construction allows for grinding, that was my intent&lt;br/&gt;&amp;gt; here.  The prepay hashes are independent.&lt;br/&gt;&lt;br/&gt;Oh, because you&amp;#39;re also xoring with the onion packet, right, I see.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I think you could just make the scheme be:&lt;br/&gt;&amp;gt; &amp;gt;   Alice sends HTLC(k,v) &#43; 1250 msat to Bob&lt;br/&gt;&amp;gt; &amp;gt;   Bob unwraps the onion and forwards HTLC(k,v) &#43; 500 msat to Carol&lt;br/&gt;&amp;gt; &amp;gt;   Carol unwraps the onion and forwards HTLC(k,v) &#43; 250 msat to Dave&lt;br/&gt;&amp;gt; &amp;gt;   Dave redeems the HTLC, claims an extra 300 msat and refunds 200 msat to Carol&lt;br/&gt;&lt;br/&gt;The math here doesn&amp;#39;t add up. Let&amp;#39;s assume I meant:&lt;br/&gt;&lt;br/&gt;  Bob keeps 500 sat, forwards 750 sat&lt;br/&gt;  Carol keeps 250 sat, forwards 500 sat&lt;br/&gt;  Dave keeps 300 sat, refunds 200 sat&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;   Carol redeems the HTLC and refunds 200 msat to Bob&lt;br/&gt;&amp;gt; &amp;gt;   Bob redeems the HTLC and refunds 200 msat to Alice&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If there&amp;#39;s a failure, Alice loses the 1250 msat, and someone in the&lt;br/&gt;&amp;gt; &amp;gt; path steals the funds.&lt;br/&gt;&amp;gt; This example confuses me.&lt;br/&gt;&lt;br/&gt;Well, that makes us even at least? :)&lt;br/&gt;&lt;br/&gt;&amp;gt; So, you&amp;#39;re charging 250msat per hop?  Why is Bob taking 750?  Does Carol&lt;br/&gt;&amp;gt; now know Dave is the last hop?&lt;br/&gt;&lt;br/&gt;No, Alice is choosing to pay 500, 250 and 300 msat to Bob, Carol and&lt;br/&gt;Dave respectively, as part of setting up the onion, and picks those&lt;br/&gt;numbers via some magic algo trading off privacy and cost.&lt;br/&gt;&lt;br/&gt;&amp;gt; Does Alice lose everything on any routing failure?&lt;br/&gt;&lt;br/&gt;That was my thought yeah; it seems weird to pay upfront but expect a&lt;br/&gt;refund on failure -- the HTLC funds are already committed upfront and&lt;br/&gt;refunded on failure.&lt;br/&gt;&lt;br/&gt;&amp;gt; If so, that is strong incentive for Alice to reduce path-length privacy&lt;br/&gt;&amp;gt; by keeping payments minimal, which I was really trying to avoid.&lt;br/&gt;&lt;br/&gt;Assuming v is much larger than 1250msat, and 1250 msat is much lower than&lt;br/&gt;the cost to Bob of losing the channel with Alice, I don&amp;#39;t think that&amp;#39;s&lt;br/&gt;a problem. 1250msat pays for 125kB of bandwdith under your assumptions&lt;br/&gt;I think?&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Does that miss anything that all the hashing achieves?&lt;br/&gt;&amp;gt; It does nothing if Carol is the one who can&amp;#39;t route.&lt;br/&gt;&lt;br/&gt;If Carol can&amp;#39;t route, then ideally she just refunds all the money and&lt;br/&gt;everyone&amp;#39;s happy.&lt;br/&gt;&lt;br/&gt;If Carol tries to steal, then she can keep 750 msat instead of 250 msat.&lt;br/&gt;This doesn&amp;#39;t give any way for Bob to prove Carol cheated on him though;&lt;br/&gt;but Bob could just refund the 1250 msat and write the 750 msat off as a&lt;br/&gt;loss of dealing with cheaters like Carol.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:57:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstf90wckugxszautqcavtjusyxukjxpda9rqr8lvyuks5j6h29chszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ks4nw20</id>
    
      <title type="html">📅 Original date posted:2019-10-01 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstf90wckugxszautqcavtjusyxukjxpda9rqr8lvyuks5j6h29chszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ks4nw20" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgrmarl9me6cc42azmkx2zgg2jat6expfkd56k7lf6p39q7dkv5qgt84xcn&#39;&gt;nevent1q…4xcn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-01&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, Sep 30, 2019 at 11:28:43PM &#43;0000, ZmnSCPxj via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Suppose rather than `SIGHASH_NOINPUT`, we created a new opcode, `OP_CHECKSIG_WITHOUT_INPUT`.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think there&amp;#39;s any meaningful difference between making a new&lt;br/&gt;opcode and making a new tapscript public key type; the difference is&lt;br/&gt;just one of encoding:&lt;br/&gt;&lt;br/&gt;   3301&amp;lt;key&amp;gt;AC   [CHECKSIG of public key type 0x01]&lt;br/&gt;   32&amp;lt;key&amp;gt;B3     [CHECKSIG_WITHOUT_INPUT (replacing NOP4) of key]&lt;br/&gt;&lt;br/&gt;&amp;gt; This new opcode ignores any `SIGHASH` flags, if present, on a signature,&lt;br/&gt;&lt;br/&gt;(How sighash flags are treated can be redefined by new public key types;&lt;br/&gt;if that&amp;#39;s not obvious already)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:56:21&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfe78g0n63vcdynphwt4d0hyc50vrn8n7mc0c5hzcwqn0f0g6hzgszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3f8x25</id>
    
      <title type="html">📅 Original date posted:2019-09-25 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfe78g0n63vcdynphwt4d0hyc50vrn8n7mc0c5hzcwqn0f0g6hzgszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3f8x25" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszhctedlxmywtag69qqq60jrvf3xkxnhzg64yl6ffl3xrsr9e8h0qd7w78q&#39;&gt;nevent1q…w78q&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-09-25&lt;br/&gt;📝 Original message:&lt;br/&gt;On Wed, Sep 25, 2019 at 01:30:39PM &#43;0000, ZmnSCPxj wrote:&lt;br/&gt;&amp;gt; &amp;gt; Since it&amp;#39;s off chain, you could also provide R and C and a zero knowledge&lt;br/&gt;&amp;gt; &amp;gt; proof that you know an r such that:&lt;br/&gt;&amp;gt; &amp;gt; R = SHA256( r )&lt;br/&gt;&amp;gt; &amp;gt; C = SHA256( x || r )&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; in which case you could do it with lightning as it exists today.&lt;br/&gt;&amp;gt; I can insist on paying only if the server reveals an `r` that matches some known `R` such that `R = SHA256(r)`, as currently in Lightning network.&lt;br/&gt;&amp;gt; However, how would I prove, knowing only `R` and `x`, and that there exists some `r` such that `R = SHA256(r)`, that `C = SHA256(x || r)`?&lt;br/&gt;&lt;br/&gt;If you know x and r, you can generate C and R and a zero knowledge proof&lt;br/&gt;of the relationship between x,C,R that doesn&amp;#39;t reveal r (eg, I think&lt;br/&gt;you could do that with bulletproofs). Unfortunately that zkp already&lt;br/&gt;proves that C was generated based on x, so you get your timestamp for&lt;br/&gt;free. Ooops. :(&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:56:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsprsgplyxqjtx9amgxyvddqaqr3p4gvv9akphv7p7qe8pnhp9lh8qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k84nlf3</id>
    
      <title type="html">📅 Original date posted:2019-09-25 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsprsgplyxqjtx9amgxyvddqaqr3p4gvv9akphv7p7qe8pnhp9lh8qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k84nlf3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxm2w0k4qsh3ymn7u3mzaye2lpq6y6vhjc024wdz9n76mzauwfq8sw9lgwd&#39;&gt;nevent1q…lgwd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-09-25&lt;br/&gt;📝 Original message:&lt;br/&gt;On Wed, Sep 25, 2019 at 11:01:28AM &#43;0200, Konstantin Ketterer wrote:&lt;br/&gt;&amp;gt; Motivation: If I had to timestamp multiple messages I could simply aggregate&lt;br/&gt;&amp;gt; them in a merkle tree and pay relatively low fees per message. However, if I&lt;br/&gt;&amp;gt; only need to timestamp something once in a while I need to rely on free&lt;br/&gt;&amp;gt; services or pay high fees.&lt;br/&gt;&lt;br/&gt;Maybe model the timestamping service as having fixed and floating users,&lt;br/&gt;in which case the fixed users pay a subscription fee that covers the costs&lt;br/&gt;and get placed relatively high in the merkle tree, while the floating&lt;br/&gt;users are placed low in the merkle tree and are basically free money?&lt;br/&gt;&lt;br/&gt;Your merkle tree might then have 2**N-1 fixed slots, all at height N,&lt;br/&gt;then 2**K floating slots, all at height N&#43;K, but you don&amp;#39;t need to charge&lt;br/&gt;the floating slots anything up front, because your fixed costs are all&lt;br/&gt;paid for by subscription income from the fixed slots.&lt;br/&gt;&lt;br/&gt;You might still want to charge some up front fee to prevent people&lt;br/&gt;spamming you with things to timestamp that they&amp;#39;re never going to pay&lt;br/&gt;for though.&lt;br/&gt;&lt;br/&gt;&amp;gt; Solution: buy a place in a merkle tree &amp;#34;risk-free&amp;#34;&lt;br/&gt;&amp;gt; 1. send hash x of my message (or the merkle root of another tree) to the&lt;br/&gt;&amp;gt; timstamping server&lt;br/&gt;&amp;gt; 2. server calculates Pedersen commit: C = x*H &#43; r*G, hashes it, builds merkle&lt;br/&gt;&amp;gt; tree with other commits in it and publishes a valid transaction containing the&lt;br/&gt;&amp;gt; merkle root to the Bitcoin blockchain&lt;br/&gt;&amp;gt; 3. after a certain number of block confirmations and with the given proof I can&lt;br/&gt;&amp;gt; confirm that the commitment C is indeed part of the Bitcoin blockchain&lt;br/&gt;&amp;gt; 4. I now have to send a lightning payment with C - x*H = r*G as the payment&lt;br/&gt;&amp;gt; point  to the timestamping server and as a proof of payment the server must&lt;br/&gt;&amp;gt; reveal r to receive the money.&lt;br/&gt;&lt;br/&gt;Nice.&lt;br/&gt;&lt;br/&gt;Since it&amp;#39;s off chain, you could also provide R and C and a zero knowledge&lt;br/&gt;proof that you know an r such that:&lt;br/&gt;&lt;br/&gt;   R = SHA256( r )&lt;br/&gt;   C = SHA256( x || r )&lt;br/&gt;&lt;br/&gt;in which case you could do it with lightning as it exists today.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:56:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9xms42p66cyna5zv3vgzx5tdwvxpd53qf565lwr784hhtpmagvcszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2krq87nh</id>
    
      <title type="html">📅 Original date posted:2019-03-18 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9xms42p66cyna5zv3vgzx5tdwvxpd53qf565lwr784hhtpmagvcszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2krq87nh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr6mve0xzsm5gpx4jvlh4rquzqkq06r2pnznfrchkexwulgskktagw7hxhp&#39;&gt;nevent1q…hxhp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-18&lt;br/&gt;📝 Original message:&lt;br/&gt;On Thu, Mar 14, 2019 at 01:00:56PM &#43;0100, Christian Decker wrote:&lt;br/&gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m thinking of tagged outputs as &amp;#34;taproot plus&amp;#34; (ie, plus noinput),&lt;br/&gt;&amp;gt; &amp;gt; so if you used a tagged output, you could do everything normal taproot&lt;br/&gt;&amp;gt; &amp;gt; address could, but also do noinput sigs for them.&lt;br/&gt;&amp;gt; &amp;gt; So you might have:&lt;br/&gt;&amp;gt; &amp;gt;    funding tx -&amp;gt; cooperative claim&lt;br/&gt;&amp;gt; &amp;gt;    funding tx -&amp;gt; update 3 [TAGGED] -&amp;gt; settlement 3 -&amp;gt; claim&lt;br/&gt;&amp;gt; &amp;gt;    funding tx -&amp;gt; update 3 [TAGGED] -&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;                  update 4 [TAGGED,NOINPUT] -&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; 		 settlement 4 [TAGGED,NOINPUT] -&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; 		 claim [NOINPUT]&lt;br/&gt;&amp;gt; &amp;gt; In the cooperative case, no output tagging needed.&lt;br/&gt;&amp;gt; I might be missing something here, but how do you bind update 3 to the&lt;br/&gt;&amp;gt; funding tx output, when that output is not tagged? Do we keep each&lt;br/&gt;&amp;gt; update in multiple separate states, one bound to the funding tx output&lt;br/&gt;&amp;gt; and another signed with noinput?&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t know that &amp;#34;separate states&amp;#34; is a great description -- until it&lt;br/&gt;hits the blockchain &amp;#34;update N&amp;#34; is a template that can be filled out in a&lt;br/&gt;variety of ways -- in the above the ways are:&lt;br/&gt; - with a NOINPUT sig and a previous &amp;#34;update&amp;#34; tx as its input&lt;br/&gt; - or with a SINGLE|ANYONECANPAY sig and the funding tx as input&lt;br/&gt;&lt;br/&gt;The important thing is that approach means two sigs for each update tx.&lt;br/&gt;The above also has two sigs for each settlement tx (and likewise two sigs&lt;br/&gt;for each HTLC claim if using scriptless scripts) -- one using NOINPUT&lt;br/&gt;in case multiple update tx&amp;#39;s make it to the blockchain, and one assuming&lt;br/&gt;everything works as expected that can just use direct key path spending.&lt;br/&gt;&lt;br/&gt;I think you can do SINGLE,ANYCANPAY and combine multiple channel closures&lt;br/&gt;if you&amp;#39;re directly spending the funding tx, but can&amp;#39;t do that if you&amp;#39;re&lt;br/&gt;using a NOINPUT sig, because the NOINPUT sig would commit to the tx&amp;#39;s&lt;br/&gt;locktime and different channel&amp;#39;s states will generally have different&lt;br/&gt;locktimes. You still probably want SINGLE,ANYCANPAY in that case so you&lt;br/&gt;can bump fees though.&lt;br/&gt;&lt;br/&gt;&amp;gt; If that&amp;#39;s the case we just doubled our&lt;br/&gt;&amp;gt; storage and communication requirements for very little gain.&lt;br/&gt;&lt;br/&gt;There&amp;#39;s three potential gains:&lt;br/&gt; * it lets us make a safer version of NOINPUT&lt;br/&gt; * it makes the common paths give fewer hints that you&amp;#39;re using eltoo&lt;br/&gt; * it puts less data/computation load on the blockchain&lt;br/&gt;&lt;br/&gt;With tagged outputs your update tx already indicates you&amp;#39;re maybe going&lt;br/&gt;to use NOINPUT, so that probably already gives away that you&amp;#39;re using&lt;br/&gt;eltoo, so, at least with output tagging, the second benefit probably&lt;br/&gt;doesn&amp;#39;t exist. Using a key path spend (without a script) is probably&lt;br/&gt;going to be cheaper on the blockchain though.&lt;br/&gt;&lt;br/&gt;But while I think output tagging is probably better than nothing,&lt;br/&gt;requiring a non-NOINPUT signature seems a better approach to me. With&lt;br/&gt;that one, having a dedicated sig for the normal &amp;#34;publish the latest&lt;br/&gt;state spending the funding tx&amp;#34; case, reduces a unilateral close to only&lt;br/&gt;being special due to the settlement tx having a relative timelock, and&lt;br/&gt;the various tx&amp;#39;s using SINGLE|ANYCANPAY, which seems like a win. In that&lt;br/&gt;scenario, just using a single sig is much cheaper than revealing a taproot&lt;br/&gt;point, a pubkey or two, and using two sigs and a CLTV check of course.&lt;br/&gt;&lt;br/&gt;It does goes from 1&#43;n signatures per update today to 4&#43;n signatures,&lt;br/&gt;if you&amp;#39;re using scriptless scripts. If you don&amp;#39;t mind revealing the&lt;br/&gt;HTLCs are HTLCs, and could do them with actual scripts, that reduces to&lt;br/&gt;4 signatures. You could reduce it to 2 signatures by also always posting&lt;br/&gt;&amp;#34;funding tx -&amp;gt; update 0 -&amp;gt; update N -&amp;gt; settlement N&amp;#34;, or you could reduce&lt;br/&gt;it to 2&#43;2/k signatures by only doing the non-NOINPUT sigs for every k&amp;#39;th&lt;br/&gt;state (or no more often than every t seconds or similar).&lt;br/&gt;&lt;br/&gt;&amp;gt; An&lt;br/&gt;&amp;gt; alternative is to add a trigger transaction that needs to be published&lt;br/&gt;&amp;gt; in a unilateral case, but that&amp;#39;d increase our on-chain footprint.&lt;br/&gt;&lt;br/&gt;(The above essentially uses update tx&amp;#39;s as optional trigger tx&amp;#39;s)&lt;br/&gt;&lt;br/&gt;Also, I&amp;#39;d expect the extra latency introduced by the interactive signing&lt;br/&gt;protocol for muSig would be more of a hit (share the nonce hash, share&lt;br/&gt;the nonce, calculate the sig). Particularly if you&amp;#39;re doing multiparty&lt;br/&gt;channels with many participants, rather than just two.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:54:28&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstk4jhmdszh3f2y3k8q64n4ulr4795qtwa9k4ddagvrhr26wx600szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k0t6apx</id>
    
      <title type="html">📅 Original date posted:2019-03-12 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstk4jhmdszh3f2y3k8q64n4ulr4795qtwa9k4ddagvrhr26wx600szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k0t6apx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgdfr6v93py5ncfl29km2hdqfwuqwwntum62jn464wj9zh03fx02q5jk2hy&#39;&gt;nevent1q…k2hy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;The following has some more thoughts on trying to make a NOINPUT&lt;br/&gt;implementation as safe as possible for the Bitcoin ecosystem.&lt;br/&gt;&lt;br/&gt;One interesting property of NOINPUT usage like in eltoo is that it&lt;br/&gt;actually reintroduces the possibility of third-party malleability to&lt;br/&gt;transactions -- ie, you publish transactions to the blockchain (tx A,&lt;br/&gt;which is spent by tx B, which is spent by tx C), and someone can come&lt;br/&gt;along and change A or B so that C is no longer valid). The way this works&lt;br/&gt;is due to eltoo&amp;#39;s use of NOINPUT to &amp;#34;skip intermediate states&amp;#34;. If you&lt;br/&gt;publish to the blockchain:&lt;br/&gt;&lt;br/&gt;      funding tx -&amp;gt; state 3 -&amp;gt; state 4[NOINPUT] -&amp;gt; state 5[NOINPUT] -&amp;gt; finish&lt;br/&gt;&lt;br/&gt;then in the event of a reorg, state 4 could be dropped, state 5&amp;#39;s&lt;br/&gt;inputs adjusted to refer to state 3 instead (the sig remains valid&lt;br/&gt;due to NOINPUT, so this can be done by anyone not just holders of some&lt;br/&gt;private key), and finish would no longer be a valid tx (because the new&lt;br/&gt;&amp;#34;state 5&amp;#34; tx has different inputs so a different txid, and finish uses&lt;br/&gt;SIGHASH_ALL for the signature so committed to state 5&amp;#39;s original txid).&lt;br/&gt;&lt;br/&gt;There is a safety measure here though: if the &amp;#34;finish&amp;#34; transaction is&lt;br/&gt;itself a NOINPUT tx, and has a a CSV delay (this is the case in eltoo;&lt;br/&gt;the CSV delay is there to give time for a hypothetical state 6 to be&lt;br/&gt;published), then the only way to have a problem is for some SIGHASH_ALL tx&lt;br/&gt;that spends finish, and a reorg deeper than the CSV delay (so that state&lt;br/&gt;4 can be dropped, state 5 and finish can be altered). Since the CSV delay&lt;br/&gt;is chosen by the participants, the above is still a possible scenario&lt;br/&gt;in eltoo, though, and it means there&amp;#39;s some risk for someone accepting&lt;br/&gt;bitcoins that result from a non-cooperative close of an eltoo channel.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Beyond that, I think NOINPUT has two fundamental ways to cause problems&lt;br/&gt;for the people doing NOINPUT sigs:&lt;br/&gt;&lt;br/&gt; 1) your signature gets applied to a unexpectedly different&lt;br/&gt;    script, perhaps making it look like you&amp;#39;ve being dealing&lt;br/&gt;    with some blacklisted entity. OP_MASK and similar solves&lt;br/&gt;    this.&lt;br/&gt;&lt;br/&gt; 2) your signature is applied to some transaction and works&lt;br/&gt;    perfectly; but then someone else sends money to the same address&lt;br/&gt;    and reuses your prior signature to forward it on to the same&lt;br/&gt;    destination, without your consent&lt;br/&gt;&lt;br/&gt;I still like OP_MASK as a solution to (1), but I can&amp;#39;t convince myself that&lt;br/&gt;the problem it solves is particularly realistic; it doesn&amp;#39;t apply to&lt;br/&gt;address blacklists, because for OP_MASK to make the signature invalid&lt;br/&gt;the address has to be different, and you could just short circuit the&lt;br/&gt;whole thing by sending money from a blacklisted address to the target&amp;#39;s&lt;br/&gt;personal address directly. Further, if the sig&amp;#39;s been seen on chain&lt;br/&gt;before, that&amp;#39;s probably good evidence that someone&amp;#39;s messing with you;&lt;br/&gt;and if it hasn&amp;#39;t been seen on chain before, how is anyone going to tell&lt;br/&gt;it&amp;#39;s your sig to blame you for it?&lt;br/&gt;&lt;br/&gt;I still wonder if there isn&amp;#39;t a real problem hiding somewhere here,&lt;br/&gt;but if so, I&amp;#39;m not seeing it.&lt;br/&gt;&lt;br/&gt;For the second case, that seems a little more concerning. The nightmare&lt;br/&gt;scenario is maybe something like:&lt;br/&gt;&lt;br/&gt; * naive users do silly things with NOINPUT signatures, and end up&lt;br/&gt;   losing funds due to replays like the above&lt;br/&gt;&lt;br/&gt; * initial source of funds was some major exchange, who decide it&amp;#39;s&lt;br/&gt;   cheaper to refund the lost funds than deal with the customer complaints&lt;br/&gt;&lt;br/&gt; * the lost funds end up costing enough that major exchanges just outright&lt;br/&gt;   ban sending funds to any address capable of NOINPUT, which also bans&lt;br/&gt;   all taproot/schnorr addresses&lt;br/&gt;&lt;br/&gt;That&amp;#39;s not super likely to happen by chance: NOINPUT sigs will commit&lt;br/&gt;to the value being spent, so to lose money, you (Alice) have to have&lt;br/&gt;done a NOINPUT sig spending a coin sent to your address X, to someone&lt;br/&gt;(Bob) and then have to have a coin with the exact same value sent from&lt;br/&gt;someone else again (Carol) to your address X (or if you did a script&lt;br/&gt;path NOINPUT spend, to some related address Y with a script that uses the same&lt;br/&gt;key). But because it involves losing money to others, bad actors might&lt;br/&gt;trick people into having it happen more often than chance (or well&lt;br/&gt;written software) would normally allow.&lt;br/&gt;&lt;br/&gt;That &amp;#34;nightmare&amp;#34; could be stopped at either the first step or the&lt;br/&gt;last step:&lt;br/&gt;&lt;br/&gt; * if we &amp;#34;tag&amp;#34; addresses that can be spent via NOINPUT then having an&lt;br/&gt;   exchange ban those addresses doesn&amp;#39;t also impact regular&lt;br/&gt;   taproot/schnorr addresses, though it does mean you can tell when&lt;br/&gt;   someone is using a protocol like eltoo that might need to make use&lt;br/&gt;   of NOINPUT signatures.  This way exchanges and wallets could simply&lt;br/&gt;   not provide NOINPUT capable addresses in the first place normally,&lt;br/&gt;   and issue very large warnings when asked to send money to one. That&amp;#39;s&lt;br/&gt;   not a problem for eltoo, because all the NOINPUT-capable address eltoo&lt;br/&gt;   needs are internal parts of the protocol, and are spent automatically.&lt;br/&gt;&lt;br/&gt; * or we could make it so NOINPUT signatures aren&amp;#39;t replayable on&lt;br/&gt;   different transactions, at least by third parties. one way of doing&lt;br/&gt;   this might be to require NOINPUT signatures always be accompanied by a&lt;br/&gt;   non-NOINPUT signature (presumably for a different public key, or there&lt;br/&gt;   would be no point). This would prevent NOINPUT key-path spends, you&amp;#39;d&lt;br/&gt;   always have to use the taproot script-path for a NOINPUT signature so&lt;br/&gt;   that you could specify both public keys, and would also increase the&lt;br/&gt;   witness size due to needing two signatures and specifying an additional&lt;br/&gt;   public key -- this would increase the cost in fees by about 25% compared&lt;br/&gt;   to a plain key-path spend.&lt;br/&gt;&lt;br/&gt;Conversely, this &amp;#34;nightmare&amp;#34; scenario *can&amp;#39;t* be stopped if we allow&lt;br/&gt;key-path spending of (untagged) taproot addresses with NOINPUT signatures:&lt;br/&gt;exchanges could not distinguish such addresses from regular addresses, and&lt;br/&gt;the only way to prevent the signature from applying to two tx&amp;#39;s with the&lt;br/&gt;same value and address would be for the sig to commit to info from the tx.&lt;br/&gt;&lt;br/&gt;It seems like there&amp;#39;s one big choice then:&lt;br/&gt;&lt;br/&gt; - just ignore this concern&lt;br/&gt;&lt;br/&gt; - drop NOINPUT from normal taproot key path spending&lt;br/&gt;&lt;br/&gt;If we drop NOINPUT from taproot key path spending, then we can do NOINPUT&lt;br/&gt;as a logically separate upgrade to taproot, rather than it needing to&lt;br/&gt;be done at the same time.  There&amp;#39;s two ways we could do proceed:&lt;br/&gt;&lt;br/&gt; - introduce a new NOINPUT-capable scriptPubKey format (ie, &amp;#34;tag&amp;#34;&lt;br/&gt;   NOINPUT spendable addresses); either a different length segwit v1&lt;br/&gt;   output, or a different segwit version entirely. Using version &amp;#34;16&amp;#34; in&lt;br/&gt;   this scenario might be appealing: we could reserve all v16 addresses&lt;br/&gt;   for &amp;#34;not intended to be used by humans directly&amp;#34; and update BIP 173&lt;br/&gt;   to say these aren&amp;#39;t even something you should use bech32 to represent.&lt;br/&gt;&lt;br/&gt; - alternatively, we could require every script to have a valid signature&lt;br/&gt;   that commits to the input. In that case, you could do eltoo with a&lt;br/&gt;   script like either:&lt;br/&gt;&lt;br/&gt;        &amp;lt;A&amp;gt; CHECKSIGVERIFY &amp;lt;B&amp;gt; CHECKSIG&lt;br/&gt;     or &amp;lt;P&amp;gt; CHECKSIGVERIFY &amp;lt;Q&amp;gt; CHECKSIG&lt;br/&gt;&lt;br/&gt;   where A is Alice&amp;#39;s key and B is Bob&amp;#39;s key, P is muSig(A,B) and Q is&lt;br/&gt;   a key they both know the private key for. In the first case, Alice&lt;br/&gt;   would give Bob a NOINPUT sig for the tx, and when Bob wanted to publish&lt;br/&gt;   Bob would just do a SIGHASH_ALL sig with his own key. In the second,&lt;br/&gt;   Alice and Bob would share partial NOINPUT sigs of the tx with P, and&lt;br/&gt;   finish that when they wanted to publish.&lt;br/&gt;&lt;br/&gt;   This is a bit more costly than a key path spend: you have to reveal&lt;br/&gt;   the taproot point to do a script (&#43;33B) and you have two signatures&lt;br/&gt;   instead of one (&#43;65B) and you have to reveal two keys as well&lt;br/&gt;   (&#43;66B), plus some script overhead. If we did the &amp;lt;P,Q&amp;gt; variant,&lt;br/&gt;   we could provide a &amp;#34;PUSH_TAPROOT_KEY&amp;#34; opcode that would just push&lt;br/&gt;   the taproot key to stack, saving 33B from pushing P as a literal,&lt;br/&gt;   but you can&amp;#39;t do much better than that. All in all, it&amp;#39;d be about 25%&lt;br/&gt;   overhead in order to prevent cheating. [0]&lt;br/&gt;&lt;br/&gt;I think that output tagging doesn&amp;#39;t provide a workable defense against the&lt;br/&gt;third party malleability via a deeper-than-the-CSV-delay reorg mentioned&lt;br/&gt;earlier; but requiring a non-NOINPUT sig does: you&amp;#39;d have to replace&lt;br/&gt;the non-NOINPUT sig to make state 5 spend state 3 instead of state 4,&lt;br/&gt;and only the holders of the appropriate private key can do that.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;In any event, if we get some experience with NOINPUT in practice, we can&lt;br/&gt;reconsider whether NOINPUT key path spends are a good idea when we do&lt;br/&gt;the next segwit version -- both cross-input signature aggregation and&lt;br/&gt;graftroot will need an upgrade anyway.&lt;br/&gt;&lt;br/&gt;(Also, note that, at least for eltoo, all of the above only applies to&lt;br/&gt;non-cooperative closes: the funding tx&amp;#39;s txid is known from the start,&lt;br/&gt;so you can always arrange to spend it via SIGHASH_ALL, so it doesn&amp;#39;t&lt;br/&gt;need to be tagged, and a cooperative/mutual close of the channel will&lt;br/&gt;still just be a simple key path spend)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Anyway, presented for your consideration.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;FWIW, I don&amp;#39;t have a strong opinion here yet, but:&lt;br/&gt;&lt;br/&gt; - I&amp;#39;m still inclined to err on the side of putting more safety&lt;br/&gt;   measures in for NOINPUT, rather than fewer&lt;br/&gt;&lt;br/&gt; - the &amp;#34;must have a sig that commits to the input tx&amp;#34; seems like it&lt;br/&gt;   should be pretty safe, not too expensive, and keeps taproot&amp;#39;s privacy&lt;br/&gt;   benefits in the cases where you end up needing to use NOINPUT&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:54:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspupsw526gxgm3r8zzd6a3hlvwd2sm7dupm3v80r5xttk9ay4y3qczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6truz4</id>
    
      <title type="html">📅 Original date posted:2019-03-13 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspupsw526gxgm3r8zzd6a3hlvwd2sm7dupm3v80r5xttk9ay4y3qczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6truz4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvhs5vrmarvlm42dw8haywma5j76xj7rgvgayg8dt477c62ggwt6qpsedyk&#39;&gt;nevent1q…edyk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-03-13&lt;br/&gt;📝 Original message:&lt;br/&gt;On Wed, Mar 13, 2019 at 06:41:47AM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; -   alternatively, we could require every script to have a valid signature&lt;br/&gt;&amp;gt; &amp;gt;     that commits to the input. In that case, you could do eltoo with a&lt;br/&gt;&amp;gt; &amp;gt;     script like either:&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;A&amp;gt; CHECKSIGVERIFY &amp;lt;B&amp;gt; CHECKSIG&lt;br/&gt;&amp;gt; &amp;gt;     or &amp;lt;P&amp;gt; CHECKSIGVERIFY &amp;lt;Q&amp;gt; CHECKSIG&lt;br/&gt;&amp;gt; &amp;gt; where A is Alice&amp;#39;s key and B is Bob&amp;#39;s key, P is muSig(A,B) and Q is&lt;br/&gt;&amp;gt; &amp;gt; a key they both know the private key for. In the first case, Alice&lt;br/&gt;&amp;gt; &amp;gt; would give Bob a NOINPUT sig for the tx, and when Bob wanted to publish&lt;br/&gt;&amp;gt; &amp;gt; Bob would just do a SIGHASH_ALL sig with his own key. In the second,&lt;br/&gt;&amp;gt; &amp;gt; Alice and Bob would share partial NOINPUT sigs of the tx with P, and&lt;br/&gt;&amp;gt; &amp;gt; finish that when they wanted to publish.&lt;br/&gt;&amp;gt; At my point of view, if a NONINPUT sig is restricted and cannot be&lt;br/&gt;&amp;gt; used to spend an &amp;#34;ordinary&amp;#34; 2-of-2, this is output tagging regardless&lt;br/&gt;&amp;gt; of exact mechanism.&lt;br/&gt;&lt;br/&gt;With taproot, you could always do the 2-of-2 spend without revealing a&lt;br/&gt;script at all, let alone that it was meant to be NOINPUT capable. The&lt;br/&gt;setup I&amp;#39;m thinking of in this scenario is something like:&lt;br/&gt;&lt;br/&gt;  0) my key is A, your key is B, we want to setup an eltoo channel&lt;br/&gt;&lt;br/&gt;  1) post a funding tx to the blockchain, spending money to an address&lt;br/&gt;     P = muSig(A,B)&lt;br/&gt;&lt;br/&gt;  2) we cycle through a bunch of states from 0..N, with &amp;#34;0&amp;#34; being the&lt;br/&gt;     refund state we establish before publishing the funding tx to&lt;br/&gt;     the blockchain. each state essentially has two corresponding tx&amp;#39;s,&lt;br/&gt;     and update tx and a settlement tx.&lt;br/&gt;&lt;br/&gt;  3) the update tx for state k spends to an output Qk which is a&lt;br/&gt;     taproot address Qk = P &#43; H(P,Sk)*G where Sk is the eltoo ratchet&lt;br/&gt;     condition:&lt;br/&gt;        Sk = (5e8&#43;k&#43;1) CLTV A CHECKDLS_NOINPUT B CHECKDLS_NOINPUT_VERIFY&lt;br/&gt;&lt;br/&gt;     we establish two partial signatures for update state k, one which&lt;br/&gt;     is a partial signature spending the funding tx with key P and&lt;br/&gt;     SIGHASH_ALL, the other is a NOINPUT signature via A (for you) and&lt;br/&gt;     via B (for me) with locktime set to (k&#43;5e8), so that we can spend&lt;br/&gt;     any earlier state&amp;#39;s update tx&amp;#39;s, but not itself or any later&lt;br/&gt;     state&amp;#39;s update tx&amp;#39;s.&lt;br/&gt;&lt;br/&gt;  4) for each state we have also have a settlement transaction,&lt;br/&gt;     Sk, which spends update tx k, to outputs corresponding to the state&lt;br/&gt;     of the channel, after a relative timelock delay.&lt;br/&gt;&lt;br/&gt;     we have two partial signatures for this transaction too, one with&lt;br/&gt;     SIGHASH_ALL assuming that we directly spent the funding tx with&lt;br/&gt;     update state k (so the input txid is known), via the key path with&lt;br/&gt;     key Qk; the other SIGHASH_NOINPUT via the Sk path. both partially&lt;br/&gt;     signed tx&amp;#39;s have nSequence set to the required relative timelock&lt;br/&gt;     delay.&lt;br/&gt;&lt;br/&gt;  5) if you&amp;#39;re using scriptless scripts to do HTLCs, you&amp;#39;ll need to&lt;br/&gt;     allow for NOINPUT sigs when claiming funds as well (and update&lt;br/&gt;     the partial signatures for the non-NOINPUT cases if you want to&lt;br/&gt;     maximise privacy), which is a bit fiddly&lt;br/&gt;&lt;br/&gt;  6) when closing the channel the process is then:&lt;br/&gt;&lt;br/&gt;       - if you&amp;#39;re in contact with the other party, negotiate a new&lt;br/&gt;         key path spend of the funding tx, publish it, and you&amp;#39;re done.&lt;br/&gt;&lt;br/&gt;       - otherwise, if the funding tx hasn&amp;#39;t been spent, post the latest&lt;br/&gt;         update tx you know about, using the &amp;#34;spend the funding tx via&lt;br/&gt;	 key path&amp;#34; partial signature&lt;br/&gt;&lt;br/&gt;       - otherwise, trace the children of the funding tx, so you can see&lt;br/&gt;         the most recent published state:&lt;br/&gt;	   - if that&amp;#39;s newer than the latest state you know about, your&lt;br/&gt;	     info is out of date (restored from an old backup?), and you&lt;br/&gt;	     have to wait for your counterparty to post the settlement tx&lt;br/&gt;	   - if it&amp;#39;s equal to the latest state you know about, wait&lt;br/&gt;	   - if it&amp;#39;s older than the latest state, post the latest update&lt;br/&gt;	     tx (via the NOINPUT script path sig), and wait&lt;br/&gt;&lt;br/&gt;       - once the CSV delay for the latest update tx has expired, post&lt;br/&gt;	 the corresponding settlement tx (key path if the update tx&lt;br/&gt;	 spent the funding tx, NOINPUT if the update tx spent an earlier&lt;br/&gt;	 update tx)&lt;br/&gt;&lt;br/&gt;       - once the settlement tx is posted, claim your funds&lt;br/&gt;&lt;br/&gt;So the cases look like:&lt;br/&gt;&lt;br/&gt;   mutual close:&lt;br/&gt;     funding tx -&amp;gt; claimed funds&lt;br/&gt;&lt;br/&gt;     -- only see one key via muSig, single signature, SIGHASH_ALL&lt;br/&gt;     -- if there are active HTLCs when closing the channel, and they&lt;br/&gt;        timeout, then the claiming tx will likely be one-in, one-out,&lt;br/&gt;	SIGHASH_ALL, with a locktime, which may be unusual enough to&lt;br/&gt;	indicate a lightning channel.&lt;br/&gt;&lt;br/&gt;   unilateral close, no cheating: &lt;br/&gt;     funding tx -&amp;gt; update N -&amp;gt; settlement N -&amp;gt; claimed funds&lt;br/&gt;&lt;br/&gt;     -- update N is probably SINGLE|ANYONECANPAY, so chain analysis&lt;br/&gt;        of accompanying inputs might reveal who closed the channel&lt;br/&gt;     -- settlement N has relative timelock&lt;br/&gt;     -- claimed funds may have timelocks if they claim active HTLCs via&lt;br/&gt;        the refund path&lt;br/&gt;     -- no NOINPUT signatures needed, and all signatures use the key path&lt;br/&gt;        so don&amp;#39;t reveal any scripts&lt;br/&gt;&lt;br/&gt;   unilateral close, attempted cheating:&lt;br/&gt;     funding tx -&amp;gt; update K -&amp;gt; update N -&amp;gt; settlement N -&amp;gt; claimed funds&lt;br/&gt;&lt;br/&gt;     -- update K, update N are probably SINGLE|ANYONECANPAY, so chain&lt;br/&gt;        analysis might reveal the identity of both sides of the channel &lt;br/&gt;     -- update N and settlement N both use NOINPUT signatures and&lt;br/&gt;        reveal CLTV script that looks like eltoo&lt;br/&gt;     -- update N has timelock set&lt;br/&gt;     -- settlement N has a relative timelock&lt;br/&gt;     -- claimed funds may have timelocks if they claim active HTLCs via&lt;br/&gt;        the refund path&lt;br/&gt;&lt;br/&gt;     Notes:&lt;br/&gt;      * cheating isn&amp;#39;t 100% accurate: could be due to someone having to&lt;br/&gt;        restore from an old backup&lt;br/&gt;&lt;br/&gt;      * you could end up with:&lt;br/&gt;&lt;br/&gt;          funding tx -&amp;gt; update K -&amp;gt; update W -&amp;gt; update N&lt;br/&gt;	             -&amp;gt; settlement N -&amp;gt; claimed funds&lt;br/&gt;&lt;br/&gt;	if someone restored from an old backup and posted K, a watchtower&lt;br/&gt;	had a newer but not current state W, and finally you posted&lt;br/&gt;	state N directly. with multiple watchtowers you might have more&lt;br/&gt;	intermediate states&amp;#39; update tx&amp;#39;s posted. afaics it has similar&lt;br/&gt;	privacy results to the 2-update-tx case.&lt;br/&gt;&lt;br/&gt;&amp;gt; So the restriction to add a non-NOINPUT sig in addition to a NOINPUT sig is still output tagging, as a cooperative close would still reveal that the output is not a 2-of-2.&lt;br/&gt;&lt;br/&gt;With the above setup, you don&amp;#39;t discover that NOINPUT was possible unless it&lt;br/&gt;is actually needed because someone cheated.&lt;br/&gt;&lt;br/&gt;As long as you&amp;#39;re using muSig key path spending for a cooperative close,&lt;br/&gt;you&amp;#39;re not even revealing the output is 2-of-2, let alone a weird&lt;br/&gt;2-of-2 variant.&lt;br/&gt;&lt;br/&gt;&amp;gt; Ideally, historical data of whether onchain coin was used in Lightning or not should be revealed as little as possible.&lt;br/&gt;&amp;gt; So in a cooperative close (which we hope, to be a common case), ideally the spend should look no different from an ordinary 2-of-2 spend.&lt;br/&gt;&lt;br/&gt;With taproot, the goal is it shouldn&amp;#39;t look different from an ordinary&lt;br/&gt;&amp;#34;pay to public key&amp;#34; spend, and I think that&amp;#39;s pretty achievable.&lt;br/&gt;&lt;br/&gt;&amp;gt; Of course if the channel is published on Lightning, those who participated in Lightning at the time will learn of it, but at least the effort to remember this information is on those who want to remember this fact.&lt;br/&gt;&lt;br/&gt;Well, presumaby lightning will continue to support private channels that&lt;br/&gt;don&amp;#39;t get published, and the concern&amp;#39;s definitely valid for them!&lt;br/&gt;&lt;br/&gt;&amp;gt; Now, this can be worked around by adding a &amp;#34;kickoff&amp;#34; transaction that spends the eltoo setup transaction.&lt;br/&gt;&amp;gt; The eltoo setup transaction outputs to an ordinary 2-of-2.&lt;br/&gt;&amp;gt; The kickoff outputs to an output that allows NOINPUT.&lt;br/&gt;&amp;gt; Then the rest of the protocol anchors on top of the kickoff.&lt;br/&gt;&amp;gt; [...]&lt;br/&gt;&lt;br/&gt;I think this is possible too, but I think the scheme I describe above&lt;br/&gt;is superior: iit means calculating a few more signatures each update,&lt;br/&gt;but keeps more information off chain, which is better for privacy, and&lt;br/&gt;probably cheaper (unless you have very high-frequency channel updates?).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:54:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsztunnm7mwfkr0jyjm5qk2kwlsnn4q9suhnaeg4q75efnqp75jwzqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kz2yj0v</id>
    
      <title type="html">📅 Original date posted:2018-11-16 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsztunnm7mwfkr0jyjm5qk2kwlsnn4q9suhnaeg4q75efnqp75jwzqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kz2yj0v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsydsq8lufn554n6mmydgfwwq0qt47yreylsm52ju03janmml2jsqs8f9vys&#39;&gt;nevent1q…9vys&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-16&lt;br/&gt;📝 Original message:&lt;br/&gt;On Thu, Nov 15, 2018 at 11:54:22PM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt; The improvement is in a reduction in `fee_base_msat` in the C-&amp;gt;D path.&lt;br/&gt;&lt;br/&gt;I think reliability (and simplicity!) are the biggest things to improve&lt;br/&gt;in lightning atm. Having the flag just be incuded in invoices and not&lt;br/&gt;need to be gossiped seems simpler to me; and I think endpoint-only&lt;br/&gt;merging is better for reliability too. Eg, if you find candidate routes:&lt;br/&gt;&lt;br/&gt;  A -&amp;gt; B -&amp;gt; M -- actual directed capacity $6&lt;br/&gt;  A -&amp;gt; C -&amp;gt; M -- actual directed capacity $5.50&lt;br/&gt;  M -&amp;gt; E -&amp;gt; F -- actual directed capacity $6&lt;br/&gt;  A -&amp;gt; X -&amp;gt; F -- actual directed capacity $7&lt;br/&gt;&lt;br/&gt;and want to send $9 form A to F, you might start by trying to send&lt;br/&gt;$5 via B and $4 via C.&lt;br/&gt;&lt;br/&gt;With endpoint-only merging you&amp;#39;d do:&lt;br/&gt;&lt;br/&gt;   $5 via A,B,M,E,F -- partial success&lt;br/&gt;   $4 via A,C,M,E -- failure&lt;br/&gt;   $4 via A,X,F -- payment completion&lt;br/&gt;&lt;br/&gt;whereas with in-route merging, you&amp;#39;d do:&lt;br/&gt;&lt;br/&gt;   $5 via A,B,M -- held&lt;br/&gt;   $4 via A,C,M -- to be continued&lt;br/&gt;   $9 via M,E -- both partial payments fail&lt;br/&gt;&lt;br/&gt;which seems a fair bit harder to incrementally recover from.&lt;br/&gt;&lt;br/&gt;&amp;gt; Granted, current `fee_base_msat` across the network is very low currently.&lt;br/&gt;&amp;gt; So I do not object to restricting merge points to ultimate payees.&lt;br/&gt;&amp;gt; If fees rise later, we can revisit this.&lt;br/&gt;&lt;br/&gt;So, while we already agree on the approach to take, I think the above&lt;br/&gt;provides an additional rationale :)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:52:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqv8gwpjxh58dls7amr5kc0s7ajtjhy0xm9e0d4jzhdqspcuu8rwqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjfzkxn</id>
    
      <title type="html">📅 Original date posted:2018-11-05 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqv8gwpjxh58dls7amr5kc0s7ajtjhy0xm9e0d4jzhdqspcuu8rwqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjfzkxn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvkkjj5g2alg40tak280duymmdcqj6awln2dvx3cfpfkrnv760res4v32tp&#39;&gt;nevent1q…32tp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-05&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, Nov 05, 2018 at 01:05:17AM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; And it just doesn&amp;#39;t work unless you give over uniquely identifying&lt;br/&gt;&amp;gt; &amp;gt; information. AJ posts to r/bitcoin demonstrating payment, demanding his&lt;br/&gt;&amp;gt; &amp;gt; goods. Sock puppet says &amp;#34;No, I&amp;#39;m the AJ in Australia&amp;#34; and cut &amp;amp; pastes&lt;br/&gt;&amp;gt; &amp;gt; the same proof.&lt;br/&gt;&amp;gt; Technically speaking, all that AJ in Australia needs to show is that he or she knows, the private key behind the public key that is indicated on the invoice.&lt;br/&gt;&lt;br/&gt;Interesting. I think what you&amp;#39;re saying is that with secp256k1 preimages&lt;br/&gt;(with decorrelation), if you have the payment hash Q, then the payment&lt;br/&gt;preimage q (Q=q*G) is only known to the payee and the payer (and not&lt;br/&gt;any intermediaries thanks to decorrelation), so if you see a statement&lt;br/&gt;&lt;br/&gt;  m=&amp;#34;This invoice has been paid but not delivered as at 2018-11-05&amp;#34;&lt;br/&gt;&lt;br/&gt;signed by &amp;#34;Q&amp;#34; (so, some s,R s.t. s*G = R &#43; H(Q,R,m)*Q) then that means&lt;br/&gt;either the payee signed it, in which case there&amp;#39;s no dispute, or the&lt;br/&gt;payer signed it... And that&amp;#39;s publicly verifiable with only the original&lt;br/&gt;invoice information (ie &amp;#34;Q&amp;#34;).&lt;br/&gt;&lt;br/&gt;(I don&amp;#39;t think there&amp;#39;s any need for multiple rounds of signatures)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;FWIW, I don&amp;#39;t see reddit as a particularly viable &amp;#34;court&amp;#34;; there&amp;#39;s&lt;br/&gt;no way for reddit to tell who&amp;#39;s actually right in a dispute, eg if I&lt;br/&gt;say blockstream didn&amp;#39;t send stickers I paid for, and blockstream says&lt;br/&gt;they did; ie there&amp;#39;s no need for a sock puppet in the above scenario,&lt;br/&gt;blockstream can just say &amp;#34;according to our records you signed for&lt;br/&gt;delivery, stop whinging&amp;#34;. (And if we both agree that it did or didn&amp;#39;t&lt;br/&gt;arrive, there&amp;#39;s no need to post cryptographic proofs to reddit afaics)&lt;br/&gt;&lt;br/&gt;I think there&amp;#39;s maybe four sorts of &amp;#34;proof of payment&amp;#34; people might&lt;br/&gt;desire:&lt;br/&gt;&lt;br/&gt;  0) no proof: &amp;#34;completely&amp;#34; deniable payments (donations?)&lt;br/&gt;&lt;br/&gt;  1) shared secret: ability to prove directly to the payee that an&lt;br/&gt;     invoice was paid (what we have now)&lt;br/&gt;&lt;br/&gt;  2) signed payment: ability to prove to a different business unit of&lt;br/&gt;     the payee that payment was made, so that you can keep all the &lt;br/&gt;     secrets in the payment-handling part, and have the service-delivery&lt;br/&gt;     part not be at risk for losing all your money&lt;br/&gt;&lt;br/&gt;  3) third-party verifiable: so you can associate a payment with real&lt;br/&gt;     world identity information, and take them to court (or reddit) as a&lt;br/&gt;     contract dispute; needs PKI infrastructure so you can be confident&lt;br/&gt;     the pubkey maps to the real world people you think it does, etc&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:52:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdcftxpkcv8ws4q5y4ayxhwywgcydg3nmvgugn4kaefr4clzl9wkgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6ym09n</id>
    
      <title type="html">📅 Original date posted:2018-11-04 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdcftxpkcv8ws4q5y4ayxhwywgcydg3nmvgugn4kaefr4clzl9wkgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6ym09n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs97y5k67w2r2psxe6yzq52srkhmhx47td5kdnrk5c8pqx0ah3v4dqhwx4un&#39;&gt;nevent1q…x4un&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-04&lt;br/&gt;📝 Original message:&lt;br/&gt;On Sun, Nov 04, 2018 at 01:30:48PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt; I&amp;#39;m not sure.  Jonas Nick proposed a scheme, which very much assumes&lt;br/&gt;&amp;gt; Schnorr AFAICT:&lt;br/&gt;&amp;gt; Jonas Nick wrote:&lt;br/&gt;&amp;gt; &amp;gt; How I thought it would work is that the invoice would contain a&lt;br/&gt;&amp;gt; &amp;gt; Schnorr nonce R.&lt;br/&gt;&lt;br/&gt;(Note this means the &amp;#34;invoice&amp;#34; must be unique for each payment)&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Then the payer would construct s*G = R &#43;&lt;br/&gt;&amp;gt; &amp;gt; H(payee_pubkey,R,&amp;#34;I&amp;#39;ve bought 5 shirts shipped to Germany&amp;#34;)*G. Then&lt;br/&gt;&amp;gt; &amp;gt; the payer builds the scriptless script payment path such that when the&lt;br/&gt;&amp;gt; &amp;gt; payee claims, the payer learns s and thus has a complete&lt;br/&gt;&amp;gt; &amp;gt; signature. However, that doesn’t work with recurrent payments because&lt;br/&gt;&amp;gt; &amp;gt; the payee can use the nonce only once.&lt;br/&gt;&lt;br/&gt;So that&amp;#39;s totally fine to do however you receive the &amp;#34;s&amp;#34; value -- the&lt;br/&gt;message that&amp;#39;s getting the Schnorr signature isn&amp;#39;t a valid bitcoin&lt;br/&gt;transaction, so it&amp;#39;s something that only needs to be validated by&lt;br/&gt;BOLT-aware courts.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I also think you can get recurrent payments easily by extending the&lt;br/&gt;verification algorithm. Basically instead of Verify(m,P,sig) have&lt;br/&gt;Verify(m,P,n,sig) to verify you&amp;#39;ve made n payments of the invoice &amp;#34;m&amp;#34;.&lt;br/&gt;&lt;br/&gt;Construct &amp;#34;m&amp;#34; to include the postimage X = H(pre,1000) which indicates&lt;br/&gt;&amp;#34;pre&amp;#34; has been hashed 1000 times, so X = H(H(pre,1000-n),n).&lt;br/&gt;&lt;br/&gt;Calculate the original signature as:&lt;br/&gt;&lt;br/&gt;   s = r &#43; H(P,R,m&#43;X)*p&lt;br/&gt;&lt;br/&gt;and verify that n payments have been made by checking:&lt;br/&gt;&lt;br/&gt;   Verify(m,P,n,(s,R,rcpt)) :: s*G = R &#43; H(P,R,m&#43;H(rcpt,n))*P&lt;br/&gt;&lt;br/&gt;You&amp;#39;d provide s,R,X when setting up the subscription, then reveal the&lt;br/&gt;preimage to X, the preimage to the preimage of X etc on each payment.&lt;br/&gt;(Maybe shachain would work here?)&lt;br/&gt;&lt;br/&gt;I think that approach is independent of using sha256/secp256k1 for&lt;br/&gt;preimages over lightning too.&lt;br/&gt;&lt;br/&gt;&amp;gt; I would probably enhance this to include a nonce, which allows for AMP&lt;br/&gt;&amp;gt; (you have to xor the AMP payments to get the nonce):&lt;br/&gt;&amp;gt; R &#43; H(payee_pubkey,R,&amp;#34;I&amp;#39;ve bought 5 shirts shipped to Germany&amp;#34;,NONCE)*G&lt;br/&gt;&lt;br/&gt;R is already a unique nonce under the hash here, so I don&amp;#39;t think a&lt;br/&gt;second one adds any value fwiw.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I think it makes sense to think of proof-of-payment in terms of a&lt;br/&gt;&amp;gt; &amp;gt; verification algorithm (that a third party court could use), that takes:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   m - the invoice details, eg&lt;br/&gt;&amp;gt; &amp;gt;       &amp;#34;aj paid $11 for stickers to be delivered to Australia&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt;   P - the pubkey of the vendor&lt;br/&gt;&amp;gt; &amp;gt;   sig - some signature&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; With the current SHA256 preimages, you can make sig=(R,s,pre)&lt;br/&gt;&amp;gt; &amp;gt; where the sig is valid if:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   s*G = R &#43; H(P,R,m&#43;SHA256(pre))*P&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If you share R,s,SHA256(pre) beforehand, the payer can tell they&amp;#39;ll have&lt;br/&gt;&amp;gt; &amp;gt; a valid signature if they pay to SHA256(pre). That&amp;#39;s a 96B signature,&lt;br/&gt;&amp;gt; &amp;gt; and it requires &amp;#34;pre&amp;#34; be different for each sale, and needs pre-payment&lt;br/&gt;&amp;gt; &amp;gt; interactivity to agree on m and communicate R,s back to the payer.&lt;br/&gt;&amp;gt; For current-style invoices (no payer-supplied data), the payee knows&lt;br/&gt;&amp;gt; &amp;#39;m&amp;#39;, so no interactivity needed, which is nice.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m looking at it as needing interactivity to determine m prior to&lt;br/&gt;the payment going through -- the payer needs to send through &amp;#34;aj&amp;#34; and&lt;br/&gt;&amp;#34;Australia&amp;#34; in the example above, before the payee can generate s,R to&lt;br/&gt;send back, at which point the payer can make the payment knowing they&amp;#39;ll&lt;br/&gt;either get a cryptographic proof of payment or a refund.&lt;br/&gt;&lt;br/&gt;&amp;gt; In the payer-supplied data case, I think &amp;#39;m&amp;#39; should include a signature&lt;br/&gt;&amp;gt; for a key only the payer knows: this lets them prove *they* made the&lt;br/&gt;&amp;gt; payment.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t object to that, but I think it&amp;#39;s unnecessary; as long as there&lt;br/&gt;was a payment for delivery of the widget to &amp;#34;aj&amp;#34; in &amp;#34;Australia&amp;#34; does it&lt;br/&gt;matter if the payment was technically made by &amp;#34;aj&amp;#34; by &amp;#34;Visa on behalf&lt;br/&gt;of aj&amp;#34; or by &amp;#34;Bank of America on behalf of Mastercard on behalf of aj&amp;#39;s&lt;br/&gt;friend who owed him some money&amp;#34; ?&lt;br/&gt;&lt;br/&gt;&amp;gt; How does this interact with AMP, however?&lt;br/&gt;&lt;br/&gt;The way I see it is they&amp;#39;re separate: you have a way of getting the&lt;br/&gt;preimage back over lightning (which is affected by AMP), and you have a&lt;br/&gt;way of turning a preimage into a third-party-verifiable PoP (with&lt;br/&gt;Schnorr or whatever).&lt;br/&gt;&lt;br/&gt;(That might not be true if there&amp;#39;s a clever way of safely feeding the&lt;br/&gt;nonce R back, so that you can go straight from a generic offer to an&lt;br/&gt;accepted payment with proof of payment)&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; With seckp256k1 preimages, it&amp;#39;s easy to reduce that to sig=(R,s),&lt;br/&gt;&amp;gt; &amp;gt; and needing to communicate an R to the payer initially, who can then&lt;br/&gt;&amp;gt; &amp;gt; calculate S and send &amp;#34;m&amp;#34; along with the payment.&lt;br/&gt;&amp;gt; OK, I buy that.&lt;br/&gt;&lt;br/&gt;Crap, do I need to give you proof of payment for it now? :)&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Maybe it makes sense to disambiguate the term &amp;#34;invoice&amp;#34; -- when you don&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; know who you might be giving the goods/service to, call it an &amp;#34;offer&amp;#34;,&lt;br/&gt;&amp;gt; &amp;gt; which can be a write-once/accept-by-anyone deal that you just leave on&lt;br/&gt;&amp;gt; &amp;gt; a webpage or your email signature; but an &amp;#34;invoice&amp;#34; should be specific&lt;br/&gt;&amp;gt; &amp;gt; to each individual payment, with a &amp;#34;receipt&amp;#34; provided once an invoice&lt;br/&gt;&amp;gt; &amp;gt; is paid.&lt;br/&gt;&amp;gt; &amp;#34;offer&amp;#34; is a good name, since I landed on the same one while thinking&lt;br/&gt;&amp;gt; about this too :)&lt;br/&gt;&lt;br/&gt;Yay!&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; It seems to me like there are three levels that could be implemented:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;  - laolu/conner: (&amp;#34;low AMP&amp;#34; ?)&lt;br/&gt;&amp;gt; &amp;gt;     works with sha256&lt;br/&gt;&amp;gt; &amp;gt;     some privacy improvement&lt;br/&gt;&amp;gt; &amp;gt;     loses proof-of-payment&lt;br/&gt;&amp;gt; &amp;gt;     can&amp;#39;t claim unless all payments arrive&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Yep.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;  - just send multiple payments with the same hash:&lt;br/&gt;&amp;gt; &amp;gt;     works with sha256&lt;br/&gt;&amp;gt; &amp;gt;     privacy not improved much (some intermediary nodes no longer know&lt;br/&gt;&amp;gt; &amp;gt;       full invoice value)&lt;br/&gt;&amp;gt; &amp;gt;     can claim partial payments as soon as they arrive&lt;br/&gt;&amp;gt; &amp;gt;     accepting any partial payment provides proof-of-payment&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Interestingly, if vendor takes part payment, rest can be stolen by&lt;br/&gt;&amp;gt; intermediaries.&lt;br/&gt;&lt;br/&gt;Or you could just see a $5 bill, send $0.50 through, and wait to see&lt;br/&gt;if the take the partial payment immediately before even trying the&lt;br/&gt;remaining $4.50.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;  - secp256k1: (&amp;#34;high AMP&amp;#34; ?)&lt;br/&gt;&amp;gt; &amp;gt;     needs secp256k1 preimages&lt;br/&gt;&amp;gt; &amp;gt;     works fine with decorrelation improving privacy at every step&lt;br/&gt;&amp;gt; &amp;gt;     can set it up so can only claim once all partial payments arrive&lt;br/&gt;&amp;gt; &amp;gt;     accepting partial payment provides proof-of-payment&lt;br/&gt;&amp;gt; Yes.  Though I&amp;#39;m not sure exactly how this works with your scheme&lt;br/&gt;&amp;gt; above...&lt;br/&gt;&lt;br/&gt; Vendor -&amp;gt; *:        &amp;#34;I sell widgets for 0.01 BTC, my pubkey is P&amp;#34;&lt;br/&gt; Customer -&amp;gt; Vendor: &amp;#34;I want to buy a widget&amp;#34;&lt;br/&gt; Vendor -&amp;gt; Customer: &amp;#34;Here&amp;#39;s an R value&amp;#34;&lt;br/&gt; Customer: calculates S = R &#43; H(P,R,&amp;#34;send $me a widget at $address&amp;#34;)*P&lt;br/&gt; Customer -&amp;gt; Vendor: &amp;#34;here&amp;#39;s 0.01 BTC for s corresponding to S, my&lt;br/&gt;                      details are R, $me, $address&amp;#34;&lt;br/&gt; Vendor: looks up r for R=r*G, calculates s = r &#43; H(P,R,&amp;#34;send $me a&lt;br/&gt;         widget at $address&amp;#34;)*p, checks S=s*G&lt;br/&gt; Vendor -&amp;gt; Customer: &amp;lt;accepts payment, revealing s&amp;gt;&lt;br/&gt;&lt;br/&gt; Customer -&amp;gt; Court: reveals the invoice (&amp;#34;send $me a widget...&amp;#34;) and the&lt;br/&gt;                    signature by Vendor&amp;#39;s pubkey P, (s,R)&lt;br/&gt;&lt;br/&gt;I think the way to do secp256k1 AMP with that is that when sending&lt;br/&gt;through the payment is for the customer to send three payments to the&lt;br/&gt;Vendor conditional on preimages for A,B,C calculated as:&lt;br/&gt;&lt;br/&gt;   A = S &#43; H(1,secret)*G&lt;br/&gt;   B = S &#43; H(2,secret)*G&lt;br/&gt;   C = S &#43; H(3,secret)*G&lt;br/&gt;&lt;br/&gt;where &amp;#34;secret&amp;#34; is your xor of info from each of the three message hashes.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; In theory, both &amp;#34;just send multiple payments&amp;#34; and &amp;#34;secp256k1&amp;#34; could have&lt;br/&gt;&amp;gt; &amp;gt; splitting and joining at any hop, if we could encode the instructions&lt;br/&gt;&amp;gt; &amp;gt; on how to do that in the onion message; joining is probably easy, but&lt;br/&gt;&amp;gt; &amp;gt; splitting seems like it might be hard?&lt;br/&gt;&amp;gt; I don&amp;#39;t think so.  If you can join two payments, it wasn&amp;#39;t private?&lt;br/&gt;&lt;br/&gt;Sorry, I mean &amp;#34;source-directed splits and joins&amp;#34;, so rather than&lt;br/&gt;your source routing being a linear &amp;#34;me -&amp;gt; A -&amp;gt; B -&amp;gt; C -&amp;gt; D -&amp;gt; you&amp;#34;,&lt;br/&gt;you specify a graph: &amp;#34;me -&amp;gt; A -&amp;gt; B,E ; B -&amp;gt; C ; E -&amp;gt; F -&amp;gt; G ; C,G -&amp;gt;&lt;br/&gt;D -&amp;gt; you&amp;#34; so you tell &amp;#34;A&amp;#34; how to split the payment into two new routes,&lt;br/&gt;and tell &amp;#34;D&amp;#34; to join two payments and continue it on. The ECC part works&lt;br/&gt;fine for that, but the onion routed messages seem difficult and probably&lt;br/&gt;not worth considering for spec v1.1.&lt;br/&gt;&lt;br/&gt;&amp;gt; Note: if we need an interaction message for BOLT11 features we want in&lt;br/&gt;&amp;gt; future[1], then it has the advantage that it decouples the bolt11&lt;br/&gt;&amp;gt; features from changing preimages to secp256k1.  That makes this question&lt;br/&gt;&amp;gt; *critical* for the Summit next week.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Thanks!&lt;br/&gt;&amp;gt; Rusty.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [1] If we&amp;#39;re not careful we&amp;#39;re going to implement HORNET so we can pass&lt;br/&gt;&amp;gt; arbitrary messages around, which means we want to start charging for&lt;br/&gt;&amp;gt; them to prevent spam, which means we reopen the pre-payment debate, and&lt;br/&gt;&amp;gt; need reliable error messages...&lt;br/&gt;&lt;br/&gt;Could leave the interactivity to the &amp;#34;web store&amp;#34; layer, eg have a BOLT&lt;br/&gt;11 v1.1 &amp;#34;offer&amp;#34; include a url for the website where you go an enter your&lt;br/&gt;name and address and whatever other info they need, and get a personalised&lt;br/&gt;BOLT 11 v1.1 &amp;#34;invoice&amp;#34; back with payment-hash/nonce/signature/whatever?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:52:04&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspxtnpjlk64ln60mlsfahu3qqjjyf3lauarp8wkuassskza2sfxmszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kajpypy</id>
    
      <title type="html">📅 Original date posted:2018-11-03 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspxtnpjlk64ln60mlsfahu3qqjjyf3lauarp8wkuassskza2sfxmszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kajpypy" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq4dky3ky0stxq5re8zazfpr3delspczc69d890hpqeea2x8xxv6q5lpffv&#39;&gt;nevent1q…pffv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-03&lt;br/&gt;📝 Original message:&lt;br/&gt;On Fri, Nov 02, 2018 at 03:45:58PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; On Fri, Nov 02, 2018 at 10:20:46AM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;         There&amp;#39;s been some discussion of what the lightning payment flow&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; might look like in the future, and I thought I&amp;#39;d try to look forwards so&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; we can avoid painting ourselves into a corner now.  I haven&amp;#39;t spent time&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; on concrete design and implementation to be sure this is correct,&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; however.&lt;br/&gt;&amp;gt; &amp;gt; I think I&amp;#39;d like to see v1.1 of the lightning spec include&lt;br/&gt;&amp;gt; &amp;gt; experimental/optional support for using secp256k1 public/private keys&lt;br/&gt;&amp;gt; &amp;gt; for payment hashes/preimages. That assumes using either 2-party ECDSA&lt;br/&gt;&amp;gt; &amp;gt; magic or script magic until it&amp;#39;s viable to do it via Schnorr scriptless&lt;br/&gt;&amp;gt; &amp;gt; scripts, but that seems like it&amp;#39;s not totally infeasible?&lt;br/&gt;&amp;gt; Not totally infeasible, but since every intermediary needs to support&lt;br/&gt;&amp;gt; it, I think we&amp;#39;d need considerable buy-in before we commit to it in 1.1.&lt;br/&gt;&lt;br/&gt;&amp;#34;every intermediary&amp;#34; just means &amp;#34;you have to find a path where every&lt;br/&gt;channel supports it&amp;#34;; nodes/channels that aren&amp;#39;t in the route you choose&lt;br/&gt;aren&amp;#39;t a problem, and can still pass on the gossiped announcements,&lt;br/&gt;I think?&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I think the&lt;br/&gt;&amp;gt; &amp;gt; components would need to be:&lt;br/&gt;&amp;gt; &amp;gt;  - invoices: will the preimage for the hash be a secp256k1 private key&lt;br/&gt;&amp;gt; &amp;gt;    or a sha256 preimage? (or payer&amp;#39;s choice?)&lt;br/&gt;&amp;gt; From BOLT11:&lt;br/&gt;&amp;gt;    The `p` field supports the current 256-bit payment hash, but future&lt;br/&gt;&amp;gt;    specs could add a new variant of different length, in which case&lt;br/&gt;&amp;gt;    writers could support both old and new, and old readers would ignore&lt;br/&gt;&amp;gt;    the one not the correct length.&lt;br/&gt;&amp;gt; So the plan would be you provide two `p` fields in transition.&lt;br/&gt;&lt;br/&gt;Yeah, that sounds workable.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;  - channel announcements: do you support secp256k1 for hashes or just&lt;br/&gt;&amp;gt; &amp;gt;    sha256?&lt;br/&gt;&amp;gt; Worse, it becomes &amp;#34;I support secp256k1 with ECDSA&amp;#34; then a new &amp;#34;I support&lt;br/&gt;&amp;gt; secp256k1 with Schnorr&amp;#34;.  You need a continuous path of channels with&lt;br/&gt;&amp;gt; the same feature.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think that&amp;#39;s correct: whether it&amp;#39;s 2p-ecdsa, Schnorr or script&lt;br/&gt;magic only matters for the two nodes directly involved in the channel&lt;br/&gt;(who need to be able to understand the commitment transactions they&amp;#39;re&lt;br/&gt;signing, and extract the private key from the on-chain tx if the channel&lt;br/&gt;gets unilaterally closed). For everyone else, they just need to know that&lt;br/&gt;they can put in a public key based HTLC, and get back the corresponding&lt;br/&gt;private key when the HTLC goes through.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s also (theoretically) upgradable afaics: if two nodes have a channel&lt;br/&gt;that supports 2p-ecdsa, and eventually both upgrade to support segwit&lt;br/&gt;v1 scriptless schnorr sigs or whatever, they just need to change the&lt;br/&gt;addresses they use in new commitment txs, even for existing HTLCs.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Even if you calculate r differently, I don&amp;#39;t think you can do this&lt;br/&gt;&amp;gt; &amp;gt; without Bob and Alice interacting to get the nonce R prior to sending&lt;br/&gt;&amp;gt; &amp;gt; the transaction, which seems effectively the same as having dynamic&lt;br/&gt;&amp;gt; &amp;gt; invoice hashes, though.&lt;br/&gt;&amp;gt; I know Andrew Poelstra thought it was possible, so I&amp;#39;m going to leave a&lt;br/&gt;&amp;gt; response to him :)&lt;br/&gt;&lt;br/&gt;AFAICT, in general, if you&amp;#39;re going to have n signatures with a public&lt;br/&gt;key P, you need to generate the n R=r*G values from n*32B worth of random data,&lt;br/&gt;that&amp;#39;s previously unknown to the signature recipients. If you&amp;#39;ve got&lt;br/&gt;less than that, then you will have calculated each R by doing something&lt;br/&gt;like based on &amp;lt;n*32B of data you&amp;#39;ve been given:&lt;br/&gt;&lt;br/&gt;    R = a*R1 &#43; b*R2 &#43; ..&lt;br/&gt;&lt;br/&gt;and the n signatures you eventually receive will give you n simultaneous&lt;br/&gt;linear equations along the lines of:&lt;br/&gt;&lt;br/&gt;    s = (a*r1 &#43; b*r2 &#43; c*r3 &#43; ..) &#43; H(..)*p&lt;br/&gt;&lt;br/&gt;with &amp;lt;= n unknowns (p and less than n r1,r2,.. values). (If you don&amp;#39;t&lt;br/&gt;known the values a,b,c you won&amp;#39;t be able to calculate the R values for&lt;br/&gt;your signatures in the first place)&lt;br/&gt;&lt;br/&gt;Willing to be surprised by a different approach, but I&amp;#39;m pretty&lt;br/&gt;skeptical...&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think it makes sense to think of proof-of-payment in terms of a&lt;br/&gt;verification algorithm (that a third party court could use), that takes:&lt;br/&gt;&lt;br/&gt;  m - the invoice details, eg&lt;br/&gt;      &amp;#34;aj paid $11 for stickers to be delivered to Australia&amp;#34;&lt;br/&gt;  P - the pubkey of the vendor&lt;br/&gt;  sig - some signature&lt;br/&gt;&lt;br/&gt;With the current SHA256 preimages, you can make sig=(R,s,pre)&lt;br/&gt;where the sig is valid if:&lt;br/&gt;&lt;br/&gt;  s*G = R &#43; H(P,R,m&#43;SHA256(pre))*P&lt;br/&gt;&lt;br/&gt;If you share R,s,SHA256(pre) beforehand, the payer can tell they&amp;#39;ll have&lt;br/&gt;a valid signature if they pay to SHA256(pre). That&amp;#39;s a 96B signature,&lt;br/&gt;and it requires &amp;#34;pre&amp;#34; be different for each sale, and needs pre-payment&lt;br/&gt;interactivity to agree on m and communicate R,s back to the payer.&lt;br/&gt;&lt;br/&gt;With seckp256k1 preimages, it&amp;#39;s easy to reduce that to sig=(R,s),&lt;br/&gt;and needing to communicate an R to the payer initially, who can then&lt;br/&gt;calculate S and send &amp;#34;m&amp;#34; along with the payment.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Maybe it makes sense to disambiguate the term &amp;#34;invoice&amp;#34; -- when you don&amp;#39;t&lt;br/&gt;know who you might be giving the goods/service to, call it an &amp;#34;offer&amp;#34;,&lt;br/&gt;which can be a write-once/accept-by-anyone deal that you just leave on&lt;br/&gt;a webpage or your email signature; but an &amp;#34;invoice&amp;#34; should be specific&lt;br/&gt;to each individual payment, with a &amp;#34;receipt&amp;#34; provided once an invoice&lt;br/&gt;is paid.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;AMP:&lt;br/&gt;&lt;br/&gt;&amp;gt; I think a general scheme is: payer creates a random group-marker, sends&lt;br/&gt;&amp;gt; &amp;lt;group-marker&amp;gt;&amp;lt;32-byte-randomness&amp;gt;[encrypted data...] in each payment.&lt;br/&gt;&amp;gt; Receipient collects payments by &amp;lt;group-marker&amp;gt;, xoring the&lt;br/&gt;&amp;gt; &amp;lt;32-byte-randomness&amp;gt;; if that xor successfully decrypts the data, you&amp;#39;ve&lt;br/&gt;&amp;gt; got all the pieces.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; (For low-AMP, you use payment_hash as &amp;lt;group-marker&amp;gt;, and just use&lt;br/&gt;&amp;gt; SHA256(&amp;lt;xor-of-all-randomness&amp;gt;&amp;lt;32-byte-randomness&amp;gt;) as the per-payment&lt;br/&gt;&amp;gt; preimage so no [encrypted data] needed).&lt;br/&gt;&lt;br/&gt;Hmm, right, I&amp;#39;ve got decorrelation and AMP combined in my head. I&amp;#39;m also&lt;br/&gt;a bit confused about what exactly you mean by &amp;#34;low-AMP&amp;#34;...&lt;br/&gt;&lt;br/&gt;Rereading through the AMP threads, Christian&amp;#39;s post makes a lot of sense&lt;br/&gt;to me:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-February/001023.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-February/001023.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not really seeing the benefits in complicated AMP schemes without&lt;br/&gt;decorrelation...&lt;br/&gt;&lt;br/&gt;It seems to me like there are three levels that could be implemented:&lt;br/&gt;&lt;br/&gt; - laolu/conner: (&amp;#34;low AMP&amp;#34; ?)&lt;br/&gt;    works with sha256&lt;br/&gt;    some privacy improvement&lt;br/&gt;    loses proof-of-payment&lt;br/&gt;    can&amp;#39;t claim unless all payments arrive&lt;br/&gt;&lt;br/&gt; - just send multiple payments with the same hash:&lt;br/&gt;    works with sha256&lt;br/&gt;    privacy not improved much (some intermediary nodes no longer know&lt;br/&gt;      full invoice value)&lt;br/&gt;    can claim partial payments as soon as they arrive&lt;br/&gt;    accepting any partial payment provides proof-of-payment&lt;br/&gt;&lt;br/&gt; - secp256k1: (&amp;#34;high AMP&amp;#34; ?)&lt;br/&gt;    needs secp256k1 preimages&lt;br/&gt;    works fine with decorrelation improving privacy at every step&lt;br/&gt;    can set it up so can only claim once all partial payments arrive&lt;br/&gt;    accepting partial payment provides proof-of-payment&lt;br/&gt;&lt;br/&gt;In theory, both &amp;#34;just send multiple payments&amp;#34; and &amp;#34;secp256k1&amp;#34; could have&lt;br/&gt;splitting and joining at any hop, if we could encode the instructions&lt;br/&gt;on how to do that in the onion message; joining is probably easy, but&lt;br/&gt;splitting seems like it might be hard?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:52:02&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdk24wmvzf5emxm9h9stp8pj93kckphrxjug8805p3luv7cv62vhczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmpva96</id>
    
      <title type="html">📅 Original date posted:2018-07-18 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdk24wmvzf5emxm9h9stp8pj93kckphrxjug8805p3luv7cv62vhczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmpva96" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspkva95hezzh87j3yaezhrxfq073my8fhf6dzu08x0axy7tskqj3s8vv8ll&#39;&gt;nevent1q…v8ll&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-07-18&lt;br/&gt;📝 Original message:&lt;br/&gt;(bitcoin-dev dropped from cc)&lt;br/&gt;&lt;br/&gt;On Mon, Apr 30, 2018 at 05:41:38PM &#43;0200, Christian Decker wrote:&lt;br/&gt;&amp;gt; eltoo is a drop-in replacement for the penalty based invalidation&lt;br/&gt;&amp;gt; mechanism that is used today in the Lightning specification. [...]&lt;br/&gt;&lt;br/&gt;I think you can simplify eltoo further, both in the way the transactions&lt;br/&gt;work and in the game theory ensuring people play fair.&lt;br/&gt;&lt;br/&gt;In essence: rather than having a funding transaction spending to address&lt;br/&gt;&amp;#34;X&amp;#34;, and a set of ratcheting states that spend from-and-to the same&lt;br/&gt;address &amp;#34;X&amp;#34;, I think it&amp;#39;s feasible to have a simpler ratchet mechanism:&lt;br/&gt;&lt;br/&gt;  (1) funding address: multisig by A and B as usual&lt;br/&gt;&lt;br/&gt;  (2) commit to state &amp;gt;=N by A&lt;br/&gt;&lt;br/&gt;  (3a) commit to state N by A after delay D; or&lt;br/&gt;  (3b) commit to state M (M&amp;gt;=N) by B&lt;br/&gt;&lt;br/&gt;I believe those transactions (while partially signed, before posting to&lt;br/&gt;the blockchain) would look like:&lt;br/&gt;&lt;br/&gt;  (1) pay to &amp;#34;2 A1 B1 2 OP_CHECKMULTISIG&amp;#34;&lt;br/&gt;&lt;br/&gt;  (2) signed by B1, nlocktime set to (N&#43;E)&lt;br/&gt;      pay to &amp;#34;(N&#43;E) OP_CLTV OP_DROP 2 A2a B2a 2 OP_CHECKMULTISIG&amp;#34;&lt;br/&gt;&lt;br/&gt;  (3a) signed by B2a, nSequence set to the channel pay to self delay,&lt;br/&gt;       nlocktime set to (N&#43;E)&lt;br/&gt;       pays to the channel balances / HTLCs, with no delays or&lt;br/&gt;       revocation clauses&lt;br/&gt;&lt;br/&gt;  (3b) signed by A2a with SIGHASH_NOINPUT_UNSAFE, nlocktime set to (M&#43;E)&lt;br/&gt;       pays to the channel balances / HTLCs, with no delays or&lt;br/&gt;       revocation clauses&lt;br/&gt;&lt;br/&gt;You spend (2)&#43;delay&#43;(3a)&#43;[claim balance/HTLC] if your counterparty&lt;br/&gt;goes away.  You spend (2) and your counterparty spends (3b) if you&amp;#39;re&lt;br/&gt;both monitoring the blockchain. (3a) and (3b) should have the same tx&lt;br/&gt;size, fee rate and outputs.&lt;br/&gt;&lt;br/&gt;(A1, A2a are keys held by A; B1, B2a are keys held by B; E is&lt;br/&gt;LOCKTIME_THRESHOLD; N is the current state number)&lt;br/&gt;&lt;br/&gt;That seems like it has a few nice features:&lt;br/&gt;&lt;br/&gt; - txes at (3a) and (3b) can both pay current market fees with minimal&lt;br/&gt;   risk, and can be CPFPed by a tx spending your own channel balance&lt;br/&gt;&lt;br/&gt; - txes at (2) can pay a non-zero fee, provided it&amp;#39;s constant for the&lt;br/&gt;   lifetime of the channel (to conform with the NOINPUT rules)&lt;br/&gt;&lt;br/&gt; - if both parties are monitoring the blockchain, then the channel&lt;br/&gt;   can be fully closed in a single block, by (2)&#43;(3b)&#43;[balance/HTLC&lt;br/&gt;   claims], and the later txes can do CPFP for tx (2).&lt;br/&gt;&lt;br/&gt; - both parties can claim their funds as soon as the other can, no&lt;br/&gt;   matter who initiates the close&lt;br/&gt;&lt;br/&gt; - you only need 3 pre-signed txes for the current state; the txes&lt;br/&gt;   for claiming HTLCs/balances don&amp;#39;t need to be half-signed (unless&lt;br/&gt;   you&amp;#39;re doing them via schnorr scriptless scripts etc)&lt;br/&gt;&lt;br/&gt;The game theory looks fine to me. If you&amp;#39;re posting transaction (2), then&lt;br/&gt;you can choose between a final state F, paying you f and your counterparty&lt;br/&gt;b-f, or some earlier state N, paying you n, and your counterparty b-n. If&lt;br/&gt;f&amp;gt;n, it makes sense for you to choose F, in which case your counterparty&lt;br/&gt;is also forced to choose state F for (3b) and you&amp;#39;re forced to choose F&lt;br/&gt;for (3a). If n&amp;gt;f, then if you choose N, your counterparty will either&lt;br/&gt;choose state F because b-f&amp;gt;b-n and you will receive f as before, or&lt;br/&gt;will choose some other state M&amp;gt;N, where b-m&amp;gt;b-f, and you will receive&lt;br/&gt;m&amp;lt;f&amp;lt;n, which is a worse result. So the rational strategy seems to me&lt;br/&gt;to be to choose either F all the time, or at worst an earlier state N&lt;br/&gt;where every payment since then went from you towards your counterparty,&lt;br/&gt;on the off-chance they&amp;#39;re not watching the blockchain and you can get&lt;br/&gt;that money back.&lt;br/&gt;&lt;br/&gt;Note that unlike eltoo, dealing with attempted cheating in this scenario&lt;br/&gt;has no extra cost over a completely fair/honest close. Always attempting&lt;br/&gt;to cheat by trying to reclaim the last few payments if they were towards&lt;br/&gt;your counterparty might help ensure implementations handle cheating well?&lt;br/&gt;&lt;br/&gt;&amp;gt; eltoo addresses some of the issues we encountered while speficying and&lt;br/&gt;&amp;gt; implementing the Lightning Network. For example outsourcing becomes very&lt;br/&gt;&amp;gt; simple since old states becoming public can&amp;#39;t hurt us anymore.&lt;br/&gt;&lt;br/&gt;The scheme above isn&amp;#39;t great for (untrusted) outsourcing, because if&lt;br/&gt;you reveal enough for an adversary to post tx (3b) for state N, then&lt;br/&gt;they can then collaborate with your channel counterparty to roll you&lt;br/&gt;back from state N&#43;1000 back to state N.&lt;br/&gt;&lt;br/&gt;With eltoo if they do the same, then you have the opportunity to catch&lt;br/&gt;them at it, and play state N&#43;1000 to the blockchain -- but if you&amp;#39;re&lt;br/&gt;monitoring the blockchain carefully enough to catch that, why are you&lt;br/&gt;outsourcing in the first place? If you&amp;#39;re relying on multiple outsourcers&lt;br/&gt;to keep each other honest, then I think you run into challenges paying&lt;br/&gt;them to publish the txes for you.&lt;br/&gt;&lt;br/&gt;Thoughts? Apart from still requiring NOINPUT and not working with&lt;br/&gt;adversarial outsourcing, this seems like it works nicely to me, but&lt;br/&gt;maybe I missed something...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:51:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstjlqx2yw9nl5ltzwd9n45l3ujelzylkz7jewl4slwp3e527hppqszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kawhflx</id>
    
      <title type="html">📅 Original date posted:2018-05-14 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstjlqx2yw9nl5ltzwd9n45l3ujelzylkz7jewl4slwp3e527hppqszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kawhflx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxpfxqygnyr4f9zkx94smyfr0ky6nsr9lvymuvxc7q3ltczf5rkxqrfyqf3&#39;&gt;nevent1q…yqf3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-14&lt;br/&gt;📝 Original message:&lt;br/&gt;On Thu, May 10, 2018 at 08:34:58AM &#43;0930, Rusty Russell wrote:&lt;br/&gt;&amp;gt; &amp;gt; The big concern I have with _NOINPUT is that it has a huge failure&lt;br/&gt;&amp;gt; &amp;gt; case: if you use the same key for multiple inputs and sign one of them&lt;br/&gt;&amp;gt; &amp;gt; with _NOINPUT, you&amp;#39;ve spent all of them. The current proposal kind-of&lt;br/&gt;&amp;gt; &amp;gt; limits the potential damage by still committing to the prevout amount,&lt;br/&gt;&amp;gt; &amp;gt; but it still seems a big risk for all the people that reuse addresses,&lt;br/&gt;&amp;gt; &amp;gt; which seems to be just about everyone.&lt;br/&gt;&amp;gt; If I can convince you to sign with SIGHASH_NONE, it&amp;#39;s already a problem&lt;br/&gt;&amp;gt; today.&lt;br/&gt;&lt;br/&gt;So, I don&amp;#39;t find that very compelling: &amp;#34;there&amp;#39;s already a way to lose&lt;br/&gt;your money, so it&amp;#39;s fine to add other ways to lose your money&amp;#34;. And&lt;br/&gt;again, I think NOINPUT is worse here, because a SIGHASH_NONE signature&lt;br/&gt;only lets others take the coin you&amp;#39;re trying to spend, messing up when&lt;br/&gt;using NOINPUT can cause you to lose other coins as well (with caveats).&lt;br/&gt;&lt;br/&gt;&amp;gt; [...]&lt;br/&gt;&amp;gt; In a world where SIGHASH_NONE didn&amp;#39;t exist, this might be an argument :)&lt;br/&gt;&lt;br/&gt;I could see either dropping support for SIGHASH_NONE for segwit&lt;br/&gt;v1 addresses, or possibly limiting SIGHASH_NONE in a similar way to&lt;br/&gt;limiting SIGHASH_NOINPUT. Has anyone dug through the blockchain to see&lt;br/&gt;if SIGHASH_NONE is actually used/useful?&lt;br/&gt;&lt;br/&gt;&amp;gt; That was also suggested by Mark Friedenbach, but I think we&amp;#39;ll end up&lt;br/&gt;&amp;gt; with more &amp;#34;magic key&amp;#34; a-la Schnorr/taproot/graftroot and less script in&lt;br/&gt;&amp;gt; future.&lt;br/&gt;&lt;br/&gt;Taproot and graftroot aren&amp;#39;t &amp;#34;less script&amp;#34; at all -- if anything they&amp;#39;re&lt;br/&gt;the opposite in that suddenly every address can have a script path.&lt;br/&gt;I think NOINPUT has pretty much the same tradeoffs as taproot/graftroot&lt;br/&gt;scripts: in the normal case for both you just use a SIGHASH_ALL&lt;br/&gt;signature to spend your funds; in the abnormal case for NOINPUT, you use&lt;br/&gt;a SIGHASH_NOINPUT (multi)sig for unilateral eltoo closes or watchtower&lt;br/&gt;penalties, in the abnormal case for taproot/graftroot you use a script.&lt;br/&gt;&lt;br/&gt;&amp;gt; That means we&amp;#39;d actually want a different Segwit version for&lt;br/&gt;&amp;gt; &amp;#34;NOINPUT-can-be-used&amp;#34;, which seems super ugly.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s backwards. If you introduce a new opcode, you can use the existing&lt;br/&gt;segwit version, rather than needing segwit v1. You certainly don&amp;#39;t need&lt;br/&gt;v1 segwit for regular coins and v2 segwit for NOINPUT coins, if that&amp;#39;s&lt;br/&gt;where you were going?&lt;br/&gt;&lt;br/&gt;For segwit v0, that would mean your addresses for a key &amp;#34;X&amp;#34;, might be:&lt;br/&gt;&lt;br/&gt;   [pubkey]  X    &lt;br/&gt;    - not usable with NOINPUT&lt;br/&gt;   [script]  2 X Y 2 CHECKMULTISIG&lt;br/&gt;    - not usable with NOINPUT&lt;br/&gt;   [script]  2 X Y 2 CHECKMULTISIG_1USE_VERIFY&lt;br/&gt;    - usable with NOINPUT (or SIGHASH_ALL)&lt;br/&gt;&lt;br/&gt;CHECKMULTISIG_1USE_VERIFY being soft-forked in by replacing an OP_NOP,&lt;br/&gt;of course. Any output spendable via a NOINPUT signature would then have&lt;br/&gt;had to have been deliberately created as being spendable by NOINPUT.&lt;br/&gt;&lt;br/&gt;For a new segwit version with taproot that likewise includes an opcode,&lt;br/&gt;that might be:&lt;br/&gt;&lt;br/&gt;   [taproot]  X&lt;br/&gt;    - not usable with NOINPUT&lt;br/&gt;   [taproot]  X or: X CHECKSIG_1USE&lt;br/&gt;    - usable with NOINPUT&lt;br/&gt;&lt;br/&gt;If you had two UTXOs (with the same value), then if you construct&lt;br/&gt;a taproot witness script for the latter address it will look like:&lt;br/&gt;&lt;br/&gt;    X [X CHECKSIG_1USE] [sig_X_NOINPUT]&lt;br/&gt;&lt;br/&gt;and that signature can&amp;#39;t be used for addresses that were just intending&lt;br/&gt;to pay to X, because the NOINPUT sig/sighash simply isn&amp;#39;t supported&lt;br/&gt;without a taproot path that includes the CHECKSIG_1USE opcode.&lt;br/&gt;&lt;br/&gt;In essence, with the above construction there&amp;#39;s two sorts of addresses&lt;br/&gt;you generate from a public key X: addresses where you spend each coin&lt;br/&gt;individually, and different addresses where you spend the wallet of&lt;br/&gt;coins with that public key (and value) at once; and that remains the&lt;br/&gt;same even if you use a single key for both.&lt;br/&gt;&lt;br/&gt;I think it&amp;#39;s slightly more reasonable to worry about signing with NOINPUT&lt;br/&gt;compared to signing with SIGHASH_NONE: you could pretty reasonably setup&lt;br/&gt;your (light) bitcoin wallet to not be able to sign (or verify) with&lt;br/&gt;SIGHASH_NONE ever; but if you want to use lightning v2, it seems pretty&lt;br/&gt;likely your wallet will be signing things with SIGHASH_NOINPUT. From&lt;br/&gt;there, it&amp;#39;s a matter of having a bug or a mistake cause you to&lt;br/&gt;cross-contaminate keys into your lightning subsystem, and not be&lt;br/&gt;sufficiently protected by other measures (eg, muSig versus checkmultisig).&lt;br/&gt;&lt;br/&gt;(For me the Debian ssh key generation bug from a decade ago is sufficient&lt;br/&gt;evidence that people you&amp;#39;d think are smart and competent do make really&lt;br/&gt;stupid mistakes in real life; so defense in depth here makes sense even&lt;br/&gt;though you&amp;#39;d have to do really stupid things to get a benefit from it)&lt;br/&gt;&lt;br/&gt;The other benefit of a separate opcode is support can be soft-forked in&lt;br/&gt;independently of a new segwit version (either earlier or later).&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think the code has to be much more complicated with a separate&lt;br/&gt;opcode; passing an extra flag to TransactionSignatureChecker::CheckSig()&lt;br/&gt;is probably close to enough. Some sort of flag remains needed anyway&lt;br/&gt;since v0 and pre-segwit signatures won&amp;#39;t support NOINPUT.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:50:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsypqv2s3ml8p87ye4k7p7z8uvt64nsgzy3xrz4627dxmdnlw4ysmqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmyc0lv</id>
    
      <title type="html">📅 Original date posted:2015-11-27 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsypqv2s3ml8p87ye4k7p7z8uvt64nsgzy3xrz4627dxmdnlw4ysmqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmyc0lv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs09mku7j5qluskx8v73yxh9ny3qzheshjmnq7ywx5tlz7r0tx20eg474wgg&#39;&gt;nevent1q…4wgg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-11-27&lt;br/&gt;📝 Original message:&lt;br/&gt;On Fri, Nov 27, 2015 at 04:37:04PM &#43;0900, Nicolas Dorier wrote:&lt;br/&gt;&amp;gt; By adapting an idea from gmaxwell (&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://bitcointalk.org/index.php?topic=303088.0&#34;&gt;https://bitcointalk.org/index.php?topic=303088.0&lt;/a&gt;) it is possible to open a&lt;br/&gt;&amp;gt; channel without suffering from malleability attack.&lt;br/&gt;&amp;gt; The process for A to open channel with B is the following:&lt;br/&gt;&amp;gt; * A asks B pubkey&lt;br/&gt;&amp;gt; * A create the first commitment transaction&lt;br/&gt;&amp;gt; * A extract the hash that B needs to sign to be able to broadcast the&lt;br/&gt;&amp;gt; commitment&lt;br/&gt;&amp;gt; * A asks B to sign the hash, but do not disclose the commitment&lt;br/&gt;&amp;gt; * A broadcast the anchor&lt;br/&gt;&amp;gt; * After confirmation, A announce the anchor to B.&lt;br/&gt;&lt;br/&gt;A also passes the original unsigned commitment to B, who verifies that&lt;br/&gt;it&amp;#39;s in the right format (ie, can be revoked), and hashes to the hash&lt;br/&gt;that he signed.&lt;br/&gt;&lt;br/&gt;&amp;gt; B can&amp;#39;t identify A&amp;#39;s anchor before announcement because he does not know&lt;br/&gt;&amp;gt; the P2SH of the multisig.&lt;br/&gt;&amp;gt; Am I missing something ?&lt;br/&gt;&lt;br/&gt;Someone other than B (ie a third party) could malleate the anchor between&lt;br/&gt;broadcast and confirmation just for their own amusement.&lt;br/&gt;&lt;br/&gt;B can&amp;#39;t reuse pubkeys between different channels with this protocol&lt;br/&gt;either, but that&amp;#39;s good practice anyway.&lt;br/&gt;&lt;br/&gt;&amp;gt;From the same forum post, using child-pays-for-parent seems plausible.&lt;br/&gt;Doing:&lt;br/&gt;&lt;br/&gt;  txA: spend 6 BTC to&lt;br/&gt;     5 BTC to A&amp;amp;B&lt;br/&gt;     1 BTC to A&lt;br/&gt;&lt;br/&gt;  txB: spend 1 BTC from txA:1 to&lt;br/&gt;     0.999 BTC to A&lt;br/&gt;&lt;br/&gt;should be pretty safe: either someone malleates txA and mines it for&lt;br/&gt;0 fee; or they mine both txA&#43;txB for 0.001 BTC fee, and txA can&amp;#39;t be&lt;br/&gt;malleated. But CPFP doesn&amp;#39;t work yet, and segregated witness seems like&lt;br/&gt;it&amp;#39;ll happen sooner anyway?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:45:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq2dlusae752hs284vz0u569e9eh7t3tjawxafdhjq7jdqujksh6gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8me9em</id>
    
      <title type="html">📅 Original date posted:2015-11-27 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq2dlusae752hs284vz0u569e9eh7t3tjawxafdhjq7jdqujksh6gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8me9em" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxravg4r3wqfwdr99dw2evump2zl9tdgp4pr2vl7qkdd533j9yazsnqqcra&#39;&gt;nevent1q…qcra&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-11-27&lt;br/&gt;📝 Original message:&lt;br/&gt;On Fri, Nov 27, 2015 at 07:14:54AM &#43;0100, Mats Jerratsch wrote:&lt;br/&gt;&amp;gt; Another way to deal with it is to add two HTLCs to the commit, basically&lt;br/&gt;&amp;gt; &amp;#39;I pay you 1.00000001 BTC and you pay me 1 BTC, so effectively I paid&lt;br/&gt;&amp;gt; you 1 satoshi&amp;#39;.&lt;br/&gt;&lt;br/&gt;True! Doubles the cost of the HTLC if it gets published to the&lt;br/&gt;blockchain though...&lt;br/&gt;&lt;br/&gt;&amp;gt; One issue with this is that it increases the fees by a lot, as the&lt;br/&gt;&amp;gt; locked up capital increases by quite a lot. It might also not&lt;br/&gt;&amp;gt; translate that well over many hops, when fees are different in each&lt;br/&gt;&amp;gt; direction.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think number of hops matters; it only affects each channel&lt;br/&gt;directly (so hop1 pays a&#43;b one way, and b the other way; hop2 pays&lt;br/&gt;a-f&#43;c one way, c the other way; etc), a as the transaction amount,&lt;br/&gt;f as b&amp;#39;s fee, b and c arbitrary channel parameters for a/b and b/c&lt;br/&gt;channels respectively.&lt;br/&gt;&lt;br/&gt;You only have to lock up a little more than the dust amount, so call that&lt;br/&gt;1c per HTLC, assume a locktime of 20 days, and a time cost of bitcoin&lt;br/&gt;of 20% pa, then that&amp;#39;s an extra cost of 0.01 of a cent per transaction.&lt;br/&gt;If you&amp;#39;re aiming for a 1% per-hop fee, you can still handle transactions&lt;br/&gt;worth about a cent with that approach. If you&amp;#39;ve got a time cost of&lt;br/&gt;bitcoin at about 5% pa and a lock time of 10 days, you can do a 2c&lt;br/&gt;transaction with a per-hop fee of about 0.1%.&lt;br/&gt;&lt;br/&gt;&amp;gt; We might want to have some special protocol for these&lt;br/&gt;&amp;gt; payments?&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think that helps?&lt;br/&gt;&lt;br/&gt;&amp;gt; By the way, as far as I know the dust value got increased to 5430? So&lt;br/&gt;&amp;gt; even more of a problem for us now... (wow, that&amp;#39;s already 2ct, don&amp;#39;t&lt;br/&gt;&amp;gt; think we can just disallow these, given that we promised the holy&lt;br/&gt;&amp;gt; grail of micro payments ;) )&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think so? minrelayfee got increased to .05 mBTC, but that&amp;#39;s for&lt;br/&gt;1000 bytes while the dust threshold is for 546 bytes, so that&amp;#39;s 2730&lt;br/&gt;satoshi (a little under 1c at $351 USD/BTC).&lt;br/&gt;&lt;br/&gt;According to Visa, anything less than $20 is a micropayment though, so&lt;br/&gt;there&amp;#39;s still plenty of leeway ;)&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;http://www.techworld.com.au/article/351015/visa_payclick_takes_paypal_micropayments/&#34;&gt;http://www.techworld.com.au/article/351015/visa_payclick_takes_paypal_micropayments/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; I also don&amp;#39;t think just adding these to the change amount is&lt;br/&gt;&amp;gt; sustainable. That&amp;#39;s a thing I realized some time ago, as soon as there&lt;br/&gt;&amp;gt; is some loop hole somewhere, there will be one guy who will move&lt;br/&gt;&amp;gt; heaven and earth to make a profit off of it.&lt;br/&gt;&lt;br/&gt;Yeah, and with onion routing and so on, I could be that guy!!&lt;br/&gt;&lt;br/&gt;If you anonymously setup two channels with another node, and route a whole&lt;br/&gt;bunch of dust payments to yourself, ie me1 -&amp;gt; them -&amp;gt; me2, then:&lt;br/&gt;&lt;br/&gt; - if the HTLCs are in both txns, you can&amp;#39;t do anything&lt;br/&gt;&lt;br/&gt; - if the second channel&amp;#39;s commitment unconditionally pays you for a&lt;br/&gt;   bunch of transactions, close the channel, and never reveal any of&lt;br/&gt;   the secrets.  you eventually get all your money back in me1, and made&lt;br/&gt;   a profit in me2.&lt;br/&gt;&lt;br/&gt; - if the first channel&amp;#39;s commitment doesn&amp;#39;t debit you for a bunch&lt;br/&gt;   of transactions, reveal the corresponding secrets in the second&lt;br/&gt;   channel, updating its commitment, but refuse to follow protocol to&lt;br/&gt;   update the transactions in the first channel, closing it, but keeping&lt;br/&gt;   your money.&lt;br/&gt;&lt;br/&gt; - if txns in the second channel are credited to fees, but have HTLCs&lt;br/&gt;   in the first channel; close the second channel, and the txns timeout,&lt;br/&gt;   refunding your money, but costing the other node the sum of those&lt;br/&gt;   HTLCs.&lt;br/&gt;&lt;br/&gt;Yay, more problems!&lt;br/&gt;&lt;br/&gt;Maybe you could tweak the dual HTLC approach to make attacks unattractive:&lt;br/&gt;&lt;br/&gt;  42 satoshi from A -&amp;gt; B&lt;br/&gt;&lt;br/&gt;  10042 satoshi for (B &amp;amp;&amp;amp; R || A &amp;amp;&amp;amp; 20days CLTV)&lt;br/&gt;  10000 satoshi for (A &amp;amp;&amp;amp; R &amp;amp;&amp;amp; 15 days CLTV || B &amp;amp;&amp;amp; 20days CLTV)&lt;br/&gt;&lt;br/&gt;If it resolves on channel, fine; but if it hits the blockchain, A has to&lt;br/&gt;wait 15 days even if R gets revealed to get her 3.5c back.&lt;br/&gt;&lt;br/&gt;Not actually sure if that does any real good though...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;&amp;gt; 2015-11-27 4:58 GMT&#43;01:00 Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt;:&lt;br/&gt;&amp;gt; &amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Hey,&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Suppose you have a lightning channel, with balances of exactly 2 BTC&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; on your side, and 1 BTC on the other (and 1mBTC for fees). You send a&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; micropayment of 42 satoshi across the channel, resulting in an updated&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; commitment that looks like:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;   in:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;     anchor (3.001 BTC): [yoursig theirsig redeemscript]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;   out:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;     1 BTC: [pay2pubkey(theirs)]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;     1.99999958 BTC: [pay2pubkey(yours)]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;     0.00000042 BTC: [pay2scripthash(htlc to them with R or you after&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;                      timeout)]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; But the third output will hit the IsDust() test (less than 546 satoshi&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; for a min relay fee of 0.01 mBTC) and the entire transaction will be&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; rejected, so the channel can&amp;#39;t be closed at all!&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; This is a similar problem to sub 1-satoshi payments, but it&amp;#39;s different&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; in that while you can&amp;#39;t represent them as an HTLC output, you can&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; represent them as soon as they complete -- ie:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;   out:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;     1.00000042 BTC: [pay2pubkey(theirs)]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;     1.99999958 BTC: [pay2pubkey(yours)]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; is completely legitimate (whereas an output of 1.0 &#43; 0.042e-8 BTC&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; wouldn&amp;#39;t be).&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; I assume treating them much the same way is the only real option --&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; account for them exactly in the lightning state, but just approximate the&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; results in the actual commitments. So long as you&amp;#39;re closing channels&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; infrequently, losing a few hundred satoshi here and there won&amp;#39;t matter&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; much.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Yes, unfortunately we&amp;#39;ll have to have a rule to avoid producing those&lt;br/&gt;&amp;gt; &amp;gt; outputs.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;ve opened &lt;a href=&#34;https://github.com/ElementsProject/lightning/issues/14&#34;&gt;https://github.com/ElementsProject/lightning/issues/14&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; so we make sure we track this.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Another option might be to weaken the dust protection in the network --&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; eg if you made the dust output be&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;     0.00000042 BTC: [(them &amp;amp;&amp;amp; (R || revoke))&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;                      || (you &amp;amp;&amp;amp; d CSV &amp;amp;&amp;amp; t CLTV)&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;                      || (3 months CSV)]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; then anyone could clear the dust after 3 months if it weren&amp;#39;t otherwise&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; claimed; maybe having some dust for a finite time is okay. But it&amp;#39;d also&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; mean paying to an actual (non-standard) script, rather than a scripthash,&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; which would be annoying in its own way... And, really, adding that output&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; to the txn would probably cost more in additional fees that it&amp;#39;s going&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; to pay you in any case.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Agreed, we&amp;#39;ll just cull those outputs and let them go to fees.
    </content>
    <updated>2023-06-09T14:45:17&#43;02:00</updated>
  </entry>

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

  <entry>
    <id>https://nostr.ae/nevent1qqs8a3dv2f77nzdjlhvf0rtawfrngwgcntt30am7qpz34367x089kwqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k74uv6r</id>
    
      <title type="html">📅 Original date posted:2015-11-17 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8a3dv2f77nzdjlhvf0rtawfrngwgcntt30am7qpz34367x089kwqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k74uv6r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswhaqszehnxnpr42xygcmcsjtap8qzl3ayw26754tdaqgud9c2azcwaldde&#39;&gt;nevent1q…ldde&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-11-17&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;An obvious privacy limitation with lightning is that even with onion&lt;br/&gt;routing, differents hops can be associated as being part of the same&lt;br/&gt;transaction due to sharing a common R value. So if you see a HTLC from&lt;br/&gt;Alice to Bob, paying $5 to Bob on receipt of R where SHA(R)=12345..;&lt;br/&gt;and you see another HTLC from Carol to Dave, paying $4.95 to Bob on&lt;br/&gt;receipt of R under the same condition, SHA(R)=12345..., then you know&lt;br/&gt;it&amp;#39;s part of the same transaction.&lt;br/&gt;&lt;br/&gt;If you could change R at each step in the route, this would go away,&lt;br/&gt;improving payment anonymity and making it harder to attack the system in&lt;br/&gt;general.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s hard, because as a forwarding node, if you receive a HTLC payable&lt;br/&gt;on R1, then to send a HTLC payable on R2, you need to be able to&lt;br/&gt;calculate R1 from R2 or you&amp;#39;ll be out of pocket. But you also can&amp;#39;t be&lt;br/&gt;able to calculate R1 *without* R2, or you could just rip off whoever&amp;#39;s&lt;br/&gt;making the payment. And, of course you have to know SHA(R2) to forward the&lt;br/&gt;payment at all. And if you only know SHA(R1) and SHA(R2) it&amp;#39;s hard to&lt;br/&gt;say anything at all about R1 and R2 because cryptographic hash functions&lt;br/&gt;are designed to make any structural relationships go away.&lt;br/&gt;&lt;br/&gt;BUT! I think the magic of SNARKs [0] lets you do this!&lt;br/&gt;&lt;br/&gt;With a SNARK, you can &amp;#34;prove&amp;#34; that you have some secrets (ie, R1 and R2)&lt;br/&gt;that satisfy some programmable condition (ie, SHA(R1)=H1 and SHA(R2)=H2&lt;br/&gt;and R1=R2 XOR X), based on public inputs (H1, H2 and X), without revealing&lt;br/&gt;those secrets.&lt;br/&gt;&lt;br/&gt;I think that&amp;#39;s pretty safe, because if you receive an HTLC asking for a&lt;br/&gt;preimage for H1, along with instructions in the onion saying ask Bob for&lt;br/&gt;a preimage for H2, and here&amp;#39;s X and a proof, then either:&lt;br/&gt;&lt;br/&gt; - your forwarded HTLC will fail, and everything&amp;#39;s fine&lt;br/&gt;&lt;br/&gt; - you&amp;#39;ll receive R2, calculate R1=R2 XOR X and see SHA(R1)=H1 as&lt;br/&gt;   expected, and everything&amp;#39;s fine&lt;br/&gt;&lt;br/&gt; - you&amp;#39;ll receive R2, calculate R1=R2 XOR X and see SHA(R1) != H1,&lt;br/&gt;   which is only possible if the cryptography behind SNARKs are broken&lt;br/&gt;&lt;br/&gt; - you&amp;#39;ll receive RX, such that H2=SHA(RX) but RX being too&lt;br/&gt;   long or too short. If SNARKs aren&amp;#39;t broken, this means that you know&lt;br/&gt;   R2alt and someone else knows R2 that are different but hash to the&lt;br/&gt;   same value, meaning SHA has been broken.&lt;br/&gt;&lt;br/&gt;It seems like there are research-level tools out there that actually&lt;br/&gt;make this practical to try out. I&amp;#39;ve had a go at implementing this using&lt;br/&gt;snarkfront [1]. Using it looks like:&lt;br/&gt;&lt;br/&gt;1) initial setup of proof/verification keys&lt;br/&gt;&lt;br/&gt; $ ./test_lightning -m keygen &amp;gt; keygen.txt  # global setup&lt;br/&gt;&lt;br/&gt;2) generate a proof, using a 32 byte secret, and XOR key (64 hex digits)&lt;br/&gt;&lt;br/&gt; $ SECRET=&amp;#34;the quick brown fox jumps lazily&amp;#34;&lt;br/&gt; $ XOR=$(echo &amp;#34;she sells sea shells&amp;#34; | sha256sum | head -c64)&lt;br/&gt; $ cat keygen.txt |&lt;br/&gt;     ./test_lightning -m proof -s &amp;#34;$SECRET&amp;#34; -x &amp;#34;$XOR&amp;#34; &amp;gt; proof.txt&lt;br/&gt;   m: proof.&lt;br/&gt;   f: .&lt;br/&gt;   b: .&lt;br/&gt;   x: 5677d356ccd6ff29b296a697791d109a1703557ecbbcf52b4f38d4b680858912.&lt;br/&gt;   F: 74686520717569636b2062726f776e20666f78206a756d7073206c617a696c79&lt;br/&gt;   B: 221fb676bda3964ad9b6c4e5166a7eba716c2d5ea1c9985b3c18b8d7faece56b&lt;br/&gt;   #F: ae4d48f71fdb6f74149fab591e88f2cc07d4e696968def1aa7ca1e07096c5b85&lt;br/&gt;   #B: 166e4f9b8ec5895e870f0f0508327d73ba9ad9af4e9841599bafb1bf55c8a245&lt;br/&gt;   generate proof&lt;br/&gt;   (6) ..................................................&lt;br/&gt;   (5) ..................................................&lt;br/&gt;   (4) ..................................................&lt;br/&gt;   (3) ..................................................&lt;br/&gt;   (2) ..................................................&lt;br/&gt;   (1) ..................................................&lt;br/&gt;&lt;br/&gt;3) Verify the proof:&lt;br/&gt;&lt;br/&gt; $ F=ae4d48f71fdb6f74149fab591e88f2cc07d4e696968def1aa7ca1e07096c5b85&lt;br/&gt; $ B=166e4f9b8ec5895e870f0f0508327d73ba9ad9af4e9841599bafb1bf55c8a245&lt;br/&gt; $ cat keygen.txt proof.txt |&lt;br/&gt;     ./test_lightning -m verify -h &amp;#34;$F&amp;#34; -b &amp;#34;$B&amp;#34; -x &amp;#34;$XOR&amp;#34;&lt;br/&gt;   m: verify.&lt;br/&gt;   f: ae4d48f71fdb6f74149fab591e88f2cc07d4e696968def1aa7ca1e07096c5b85.&lt;br/&gt;   b: 166e4f9b8ec5895e870f0f0508327d73ba9ad9af4e9841599bafb1bf55c8a245.&lt;br/&gt;   x: 5677d356ccd6ff29b296a697791d109a1703557ecbbcf52b4f38d4b680858912.&lt;br/&gt;   verify proof (6) (5) (4) (3) (2) (1) &lt;br/&gt;   proof is verified&lt;br/&gt;&lt;br/&gt;4) Verify it doesn&amp;#39;t report a valid proof with different inputs:&lt;br/&gt;&lt;br/&gt;  $ cat keygen.txt proof.txt |&lt;br/&gt;     ./test_lightning -m verify -h &amp;#34;$B&amp;#34; -b &amp;#34;$F&amp;#34; -x &amp;#34;$XOR&amp;#34;&lt;br/&gt;   m: verify.&lt;br/&gt;   f: 166e4f9b8ec5895e870f0f0508327d73ba9ad9af4e9841599bafb1bf55c8a245.&lt;br/&gt;   b: ae4d48f71fdb6f74149fab591e88f2cc07d4e696968def1aa7ca1e07096c5b85.&lt;br/&gt;   x: 5677d356ccd6ff29b296a697791d109a1703557ecbbcf52b4f38d4b680858912.&lt;br/&gt;   verify proof (6) (5) (4) (3) (2)&lt;br/&gt;   proof is rejected&lt;br/&gt;&lt;br/&gt;Some results:&lt;br/&gt;&lt;br/&gt; * the proof/verification key data take up about 100MB -- in theory&lt;br/&gt;   one set of this data can be used by everyone; the only catch is&lt;br/&gt;   that everyone has to trust that nobody has kept the original random&lt;br/&gt;   numbers used to generate it.&lt;br/&gt;&lt;br/&gt; * proof/verification key data takes about a minute to generate,&lt;br/&gt;   and about 650MB of RAM.&lt;br/&gt;&lt;br/&gt; * the proof data itself (which would need to be sent to the node that&amp;#39;s&lt;br/&gt;   going to switch R&amp;#39;s) is just 864 bytes; so it&amp;#39;d use up about 5 hops&lt;br/&gt;   worth of onion routing at 192B per hop -- in a 4096 byte packet eg,&lt;br/&gt;   you could have four hops, changing R each time; or you could have 9&lt;br/&gt;   hops, changing R only three times.&lt;br/&gt;&lt;br/&gt; * generating the proof data for a given R1,X pair takes about 10&lt;br/&gt;   seconds, and 260MB of RAM&lt;br/&gt;&lt;br/&gt; * verifying the proof is quick-ish -- it takes 0.5s on my laptop,&lt;br/&gt;   and uses about 150MB of RAM.&lt;br/&gt;&lt;br/&gt;For comparison, that last point makes a SNARK verification 500&#43; times&lt;br/&gt;more expensive than an ECDH operation. If I got my maths right, you&lt;br/&gt;can translate 3c for a linode CPU-hour into 2.5 satoshi for a linode&lt;br/&gt;CPU-second (at $338/BTC), so you&amp;#39;re probably looking at a minimum fee&lt;br/&gt;of a few satoshi per SNARK verification, but that&amp;#39;s still pretty okay&lt;br/&gt;for transactions of 500 satoshi or more, ie anything more than about a&lt;br/&gt;fifth of a US cent.&lt;br/&gt;&lt;br/&gt;The 10s proof generation time is probably more of a limitation -- though&lt;br/&gt;you could generate them in advance easily enough and just store them until&lt;br/&gt;you need to use them, which would avoid lag being a problem at least. But&lt;br/&gt;even then it&amp;#39;s still essentially adding up to 30c of additional costs to&lt;br/&gt;your transaction (ie 10s cpu time valued at up to 3c/s), which probably&lt;br/&gt;isn&amp;#39;t worthwhile for transactions smaller than a dollar or two.&lt;br/&gt;&lt;br/&gt;A drawback is that you&amp;#39;d either (a) have to do all this on the merchant&amp;#39;s&lt;br/&gt;side (not just sending SHA(R) to whoever wants to pay you, but sending&lt;br/&gt;SHA(R1), SHA(R2), SHA(R3), SHA(R4), X12, X23, X34, and three proofs,&lt;br/&gt;which would be pretty painful; or (b) you&amp;#39;d have to generate all the&lt;br/&gt;R secrets as a consumer, and you wouldn&amp;#39;t get to use the fact that you&lt;br/&gt;know R as evidence that you paid the merchant.&lt;br/&gt;&lt;br/&gt;Anyway, it&amp;#39;s obviously not ready for prime time today: SNARKs are still&lt;br/&gt;pretty new as a concept; I&amp;#39;m definitely not familiar enough with SNARK&lt;br/&gt;theory to be sure I&amp;#39;m not misusing the concept somehow; snarkfront may not&lt;br/&gt;have implemented the theory fully correctly; and I might not have captured&lt;br/&gt;everything I needed to in order for my &amp;#34;proof&amp;#34; to actually say what I&lt;br/&gt;want it to. So not a great idea to use this to protect real money today.&lt;br/&gt;&lt;br/&gt;But still, this seems like it&amp;#39;s not all /that/ far from being practical,&lt;br/&gt;and if the crypto&amp;#39;s not fundamentally broken, seems like it goes a long&lt;br/&gt;way to filling in the biggest privacy hole in lightning today [3]...&lt;br/&gt;&lt;br/&gt;Code is at &lt;a href=&#34;https://github.com/ajtowns/snarkfront/&#34;&gt;https://github.com/ajtowns/snarkfront/&lt;/a&gt; or more directly at:&lt;br/&gt;&lt;a href=&#34;https://github.com/ajtowns/snarkfront/blob/lightning-sha/test_lightning.cpp&#34;&gt;https://github.com/ajtowns/snarkfront/blob/lightning-sha/test_lightning.cpp&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://tahoe-lafs.org/trac/tahoe-lafs/wiki/SNARKs&#34;&gt;https://tahoe-lafs.org/trac/tahoe-lafs/wiki/SNARKs&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/jancarlsson/snarkfront&#34;&gt;https://github.com/jancarlsson/snarkfront&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[2] This would also improve privacy/anonymity for other applications of&lt;br/&gt;    HTLCs, such as atomic swaps across chains:&lt;br/&gt;&lt;br/&gt;     1 bitcoin, payable on R1 &#43; Alice&amp;#39;s sig or timeout &#43; Bob&amp;#39;s sig&lt;br/&gt;     100 litecoin, payable on R2 &#43; Robert&amp;#39;s sig or timeout &#43; Ally&amp;#39;s sig&lt;br/&gt;&lt;br/&gt;    Alice and Bob communicate privately, agreeing to trade 1 BTC for 100&lt;br/&gt;    litecoin and revealing their aliases Robert and Ally; Alice generates&lt;br/&gt;    R1, R2, and reveals SHA(R1), SHA(R2), R1^R2 and the SNARK proof and&lt;br/&gt;    publishes the litecoin payment. Bob verifies the proof, and publishes&lt;br/&gt;    the bitcoin payment. Alice claims the bitcoin payment, revealing R1;&lt;br/&gt;    Bob calculates R2 and claims the litecoin payment. The swap can take&lt;br/&gt;    place trustlessly because Bob knows the only way Alice can claim his&lt;br/&gt;    bitcoin is by revealing enough info so he can claim the corresponding&lt;br/&gt;    litecoin. But there isn&amp;#39;t any on-chain information linking the two&lt;br/&gt;    transactions, because R1 and R2 are independent (and could even be&lt;br/&gt;    using different hash functions as well as different preimages).&lt;br/&gt;    After the funds have been claimed, the private communication is&lt;br/&gt;    also completely deniable, since anyone could generate R1^R2 and a&lt;br/&gt;    corresponding SNARK proof just using the info on the blockchain.
    </content>
    <updated>2023-06-09T14:45:02&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsy9n3pzs4vdsclmma5j5auzte5mfjer87chawwww6lxqjzvmvc5yczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kyx9lpw</id>
    
      <title type="html">📅 Original date posted:2015-10-16 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy9n3pzs4vdsclmma5j5auzte5mfjer87chawwww6lxqjzvmvc5yczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kyx9lpw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyg6x28tchqkwg2vcwnkuxkz5h2wc0m8avgphedru7tss7k5jfkugzngan9&#39;&gt;nevent1q…gan9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-10-16&lt;br/&gt;📝 Original message:&lt;br/&gt;On Fri, Oct 16, 2015 at 02:22:25PM &#43;0100, Mats Jerratsch wrote:&lt;br/&gt;&amp;gt; [...] an attacker could trick it into a fake network, [...]&lt;br/&gt;&lt;br/&gt;How do you tell the difference between the &amp;#34;real&amp;#34; network and a &amp;#34;fake&amp;#34;&lt;br/&gt;one? (ie, what does a Turing test for the lightning network look like?)&lt;br/&gt;&lt;br/&gt;I think there&amp;#39;s two things:&lt;br/&gt;&lt;br/&gt; 1) you can figure out a route to people you want to pay (and&lt;br/&gt;    vice-versa)&lt;br/&gt;&lt;br/&gt; 2) payments on those routes actually go through&lt;br/&gt;&lt;br/&gt;Even better, you can test this! Get a couple of merchant ids you find&lt;br/&gt;interesting, and pay 1 satoshi to each of them, setting the R value as&lt;br/&gt;the (double) SHA256 of the decrypted onion message. [0]&lt;br/&gt;&lt;br/&gt;If you spent 1 satoshi to each of 10 merchants every day for a year to&lt;br/&gt;verify connectivity, that&amp;#39;d still only amount to about $0.01 USD total&lt;br/&gt;at current exchange rates, so it seems pretty affordable. [1]&lt;br/&gt;&lt;br/&gt;It only works if you actually setup a channel, though -- so you have to&lt;br/&gt;lock some money into the channel for however many confirmations until&lt;br/&gt;the channel activates, before you can test, plus the OP_CSV delay if&lt;br/&gt;the test fails.&lt;br/&gt;&lt;br/&gt;But I think that would let people trustlessly avoid &amp;#34;fake&amp;#34; lightning&lt;br/&gt;networks, even with a sybil-esque attack; no extra infrastructure needed.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] If you&amp;#39;re already on the lightning network, and you&amp;#39;re establishing&lt;br/&gt;    a new channel as backup, you can just pay yourself 1 satoshi to verify&lt;br/&gt;    connectivity. If you have friends on lightning, you could pay them&lt;br/&gt;    1 satoshi to verify connectivity rather than a random merchant too.&lt;br/&gt;&lt;br/&gt;[1] Hmm, does forwarding 1 satoshi (2.6 10,000ths of a cent) make&lt;br/&gt;    sense, or would the CPU cycles cost more than the fees you&amp;#39;d make?&lt;br/&gt;    How much does it cost to forward a transaction? In python on my&lt;br/&gt;    laptop, I get about 1000 ECDH operations per second in python, and&lt;br/&gt;    290k AES ops over a 3kB onion per second, and about 77k SHA256 ops&lt;br/&gt;    per second. So just counting elliptic ops, forwarding a transaction&lt;br/&gt;    requires three ops: an ECDH on the onion message, and an ECDSA on&lt;br/&gt;    the commitment transaction to add the HTLC, and another sometime&lt;br/&gt;    later to remove it.  So say 1/350th of a CPU-second. My linode costs&lt;br/&gt;    3c/hour and seems to be about half as fast on the SHA256 test, but&lt;br/&gt;    gives me two CPUs which evens it out. So so 3/60/60/350 cents is&lt;br/&gt;    about the cost of forwarding a single transaction, which is about&lt;br/&gt;    2.4e-8 dollars, which is currently about 9.1e-11 bitcoin, which&lt;br/&gt;    is 0.0091 satoshi. Conveniently lightning balances are denominated&lt;br/&gt;    in millisatoshi, so as long as yours increases by 9 or 10, you&amp;#39;re&lt;br/&gt;    doing fine. 10 millisatoshi is 1% of 1 satoshi, so that seems like&lt;br/&gt;    the right order of magnitude.
    </content>
    <updated>2023-06-09T14:44:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9z7ngplzrjkwv3gnr86afnwztvzw3jk0mdm94x4yvsna4vufu6dqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjs2np0</id>
    
      <title type="html">📅 Original date posted:2015-09-18 📝 Original message: On 19 ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9z7ngplzrjkwv3gnr86afnwztvzw3jk0mdm94x4yvsna4vufu6dqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjs2np0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0pdx2xsfgh77ankwcs225772vs9p755wfcpn7rwtzu4xruw2x3vsz6cqvm&#39;&gt;nevent1q…cqvm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-18&lt;br/&gt;📝 Original message:&lt;br/&gt;On 19 September 2015 9:39:44 am AEST, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt;        // Sum of this whole thing after decryption.&lt;br/&gt;&amp;gt;        required sha256_hash sum = 1;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;        // Where to next?&lt;br/&gt;&amp;gt;        oneof next {&lt;br/&gt;&amp;gt;                // Actually, this is the last one&lt;br/&gt;&amp;gt;                bool end = 2;&lt;br/&gt;&amp;gt;                // Next lightning node.&lt;br/&gt;&amp;gt;                pubkey lightning = 3;&lt;br/&gt;&amp;gt;                // Other realms go here...&lt;br/&gt;&amp;gt;        }&lt;br/&gt;&amp;gt;        &lt;br/&gt;&amp;gt;        // How much fee you can take (== all, if last node)&lt;br/&gt;&amp;gt;        required int32 fee = 4;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;        // Remainder (route blob for next node).&lt;br/&gt;&amp;gt;        required bytes route = 5;&lt;br/&gt;&lt;br/&gt;&amp;gt;Nodes create the route backwards, to calculate the size.  Then picks a&lt;br/&gt;&amp;gt;total size randomly between 1024 and 4096, and pads to that size (at&lt;br/&gt;&amp;gt;least 32 bytes of random padding).  Then walks backwards to wrap and&lt;br/&gt;&amp;gt;encrypt it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;This offers some protection from guessing the route length.&lt;br/&gt;Wouldn&amp;#39;t it be better to store the expected balance to be forwarded rather than the fee? That way if someone takes too much, the next node can immediately abort the transaction.&lt;br/&gt;&lt;br/&gt;Shouldn&amp;#39;t the onion blob be re-padded when forwarded? Otherwise it&amp;#39;d sometimes drop below 1024 bytes and you&amp;#39;d be able to tell you&amp;#39;re near the end of the chain. Just adding random bytes on to the end should work I think - they&amp;#39;ll just be treated as extra padding and ignored. Alternatively, maybe you could just append the encrypted bytes that made up your post of the payload from your incoming message: it was encrypted to you so should be effectively random to anyone else and will be garbled further when the next node &amp;#34;decrypts&amp;#34; it. That would save on entropy/crypto ops, and a constant message size would leak minimal info I think.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;-- &lt;br/&gt;Sent from my phone.
    </content>
    <updated>2023-06-09T14:44:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0pdx2xsfgh77ankwcs225772vs9p755wfcpn7rwtzu4xruw2x3vszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kksghps</id>
    
      <title type="html">📅 Original date posted:2015-09-22 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0pdx2xsfgh77ankwcs225772vs9p755wfcpn7rwtzu4xruw2x3vszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kksghps" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxvlrt3027zd9v9p763k7jlzkl72a23qjyn4y76zg5kvk98x6n5agf0rela&#39;&gt;nevent1q…rela&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-09-22&lt;br/&gt;📝 Original message:&lt;br/&gt;On Tue, Sep 22, 2015 at 11:22:57AM &#43;1000, Anthony Towns wrote:&lt;br/&gt;&amp;gt; If you use OFB or CTR mode for the symmetric cypher, you can calculate&lt;br/&gt;&amp;gt; D_KD() of all the padding and use that to work out the hash H of the&lt;br/&gt;&amp;gt; plaintex message:&lt;br/&gt;&amp;gt;   here&amp;#39;s $15&lt;br/&gt;&amp;gt;   grbg grbg ... grbg&lt;br/&gt;&amp;gt;   D_KD(&lt;br/&gt;&amp;gt;         D_KC( D_KB( E_KA( 0000 ) ) )&lt;br/&gt;&amp;gt;         D_KC( E_KB( 0000 ) )&lt;br/&gt;&amp;gt;         E_KC( 0000 )&lt;br/&gt;&amp;gt;       )&lt;br/&gt;&lt;br/&gt;On Mon, Sep 21, 2015 at 06:18:37AM &#43;0930, Rusty Russell wrote:&lt;br/&gt;&amp;gt; &amp;gt; For a general solution, I think you could completely rule out probing&lt;br/&gt;&amp;gt; &amp;gt; by having two R values, one known only by the recipient, and one by&lt;br/&gt;&amp;gt; &amp;gt; the sender (call it S say). Then make the htlcs payable on&lt;br/&gt;&amp;gt; &amp;gt; presentation of both R and S and include S encrypted to the final&lt;br/&gt;&amp;gt; &amp;gt; recipient in the onion payload. Munging the payload then makes the&lt;br/&gt;&amp;gt; &amp;gt; htlc irredeemable so misrouting it gives no information.&lt;br/&gt;&amp;gt; That&amp;#39;s clever.  And I think it works.&lt;br/&gt;&lt;br/&gt;You could combine these two approaches actually. If X is the plaintext&lt;br/&gt;routing message the payee gets (&amp;#34;here&amp;#39;s $15 grbg grbg ...&amp;#34;), and H is&lt;br/&gt;its hash that was prefixed to the plaintext, then set S=sha256(H&#43;X),&lt;br/&gt;and require revealing S as well as R for payment redemption (ie, include&lt;br/&gt;&amp;#34;OP_SHA256 sha256(S) OP_EQ&amp;#34; in the HTLC).&lt;br/&gt;&lt;br/&gt;That way *any* attempt to garble the padding makes S unrecoverable&lt;br/&gt;and renders the payment unredeemable, without relying on any&lt;br/&gt;verification/cooperation from anyone else on the network.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-09T14:44:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2mtr9wyvsc0per028y0q6a0gkkwczgljpa6am9w2qss7uel3kqvgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kl00dfg</id>
    
      <title type="html">📅 Original date posted:2015-07-24 📝 Original message: On 24 ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2mtr9wyvsc0per028y0q6a0gkkwczgljpa6am9w2qss7uel3kqvgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kl00dfg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstxrc8z6hzhsxerdc76u7327zznvh25fw3pg6tngmrraveu3ct29q09w7f0&#39;&gt;nevent1q…w7f0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-07-24&lt;br/&gt;📝 Original message:&lt;br/&gt;On 24 July 2015 at 10:49, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; If Alice ever tries cheating, and publishes and old commitment:&lt;br/&gt;&amp;gt; &amp;gt;   800 Alice &#43; DELAY | #Alice_42 &#43; Bob&lt;br/&gt;&amp;gt; &amp;gt;   200 Bob&lt;br/&gt;&amp;gt; &amp;gt; Then Bob needs to work out which of the 100 Alice_N hashes he knows or&lt;br/&gt;&amp;gt; can&lt;br/&gt;&amp;gt; &amp;gt; work out is being abused; prior to the DELAY expiring. With millions of&lt;br/&gt;&amp;gt; &amp;gt; transactions that could be a bunch of hash calculations or a 100MB lookup&lt;br/&gt;&amp;gt; &amp;gt; table. Might make more sense to have a dummy output of &amp;#34;0: OP_RETURN 42&amp;#34;&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; &amp;gt; make that calculation trivial though? That could trivially be verified as&lt;br/&gt;&amp;gt; &amp;gt; part of the &amp;#34;forms hash chain as expect&amp;#34; and &amp;#34;txn structure&amp;#34; checks.&lt;br/&gt;&amp;gt; It might be millions.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;If a channel is updated ~100 of times a second, and lasts for a month, that&lt;br/&gt;would be 259M updates​, which on your laptop would be 22 minutes of search&lt;br/&gt;time. If we&amp;#39;re talking 3 days worth of OP_CSV delay, even that would be&lt;br/&gt;pretty fine. So yeah, okay, seems plausible.&lt;br/&gt;&lt;br/&gt;&amp;gt; HTLCs are harder if you assume pay2scripthash is used though. If Alice&lt;br/&gt;&amp;gt; &amp;gt; published:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   100 Alice &#43; Delay | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt; &amp;gt;   100 Bob&lt;br/&gt;&amp;gt; &amp;gt;   200 R1 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT1 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt; &amp;gt;   200 R2 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT2 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt; &amp;gt;   200 R3 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT3 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt; &amp;gt;   200 R4 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT4 | #Alice_55 &#43; Bob&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; well after R1..R4 were known and Alice_55 was revealed in order to try&lt;br/&gt;&amp;gt; &amp;gt; stealing most of the channel&amp;#39;s funds, I think Bob could only claim the&lt;br/&gt;&amp;gt; &amp;gt; final outputs if he could unhash the scripts, which would require having&lt;br/&gt;&amp;gt; &amp;gt; remembered R1..R4 even after those contracts had long been resolved. I&lt;br/&gt;&amp;gt; &amp;gt; guess it could be feasible in that case to have the extra output be &amp;#34;0:&lt;br/&gt;&amp;gt; &amp;gt; OP_RETURN 42 #R1 #R2 #R3 #R4&amp;#34;?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good point!  With p2sh you need to know the R hash values and timeouts&lt;br/&gt;&amp;gt; to spend the output (40 bytes).  Since OP_RETURN is length-limited to 80&lt;br/&gt;&amp;gt; bytes, you can&amp;#39;t fit more than 2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;​You could have multiple OP_RETURN outputs though? Your txn would look like:&lt;br/&gt;&lt;br/&gt; version&lt;br/&gt; n inputs: 2&lt;br/&gt; input 1: [txn] [idx] [len] [SIGA SIGB] [seq]&lt;br/&gt; input 2: [txn] [idx] [len] [SIGB SIGA] [seq]&lt;br/&gt; n outputs: 2 &#43; x&lt;br/&gt;​ output 1: [value] [len] [p2sh] # Alice&lt;br/&gt; output 2: [value] [len] [p2sh] # Bob&lt;br/&gt; output 3: [value] [len] [p2sh] # R1&lt;br/&gt; output 4: [value] [len] [p2sh] # R2&lt;br/&gt; output 5: [value] [len] [OP_RETURN R1R2]&lt;br/&gt; ...&lt;br/&gt;&lt;br/&gt;p2sh outputs are 32 bytes total I think; OP_RETURN is 51 bytes, so you&amp;#39;re&lt;br/&gt;increasing the txn size by about 80%.&lt;br/&gt;&lt;br/&gt;Otherwise I think you have to remember all the R&amp;#39;s you see. But if that&amp;#39;s&lt;br/&gt;okay -- 100/second for a month is just 5GB if you just store them in the&lt;br/&gt;order you see them; you can probably do something like:&lt;br/&gt;&lt;br/&gt; - at the time of this transaction, I&amp;#39;ve seen 0 &amp;lt; N &amp;lt; 2^32 R&amp;#39;s on this&lt;br/&gt;channel&lt;br/&gt; - here&amp;#39;s a 288 bit bloom filter telling you which of the first N R&amp;#39;s that&lt;br/&gt;I&amp;#39;ve seen are worth checking&lt;br/&gt; - add a single 0btc &amp;#34;OP_RETURN [N | bloomfilter]&amp;#34; output&lt;br/&gt; - (or if there are 10 or less R outputs, just concatenate their indexes as&lt;br/&gt;the OP_RETURN data)&lt;br/&gt;&lt;br/&gt;Actually, I forgot about the TIMEOUT values which you&amp;#39;d presumably also&lt;br/&gt;need; so I guess that&amp;#39;s an extra 4 bytes to include in the database of&lt;br/&gt;every R (&#43;25%), and if you&amp;#39;re not storing, I guess an extra OP_RETURN&lt;br/&gt;output that covers 10 R&amp;#39;s for an additional overhead of 16%, so ~96%&lt;br/&gt;overhead all up.&lt;br/&gt;&lt;br/&gt;If you consider your counterparty very reliable, then having 100% overhead&lt;br/&gt;in the commitment txns might not be a big deal -- you&amp;#39;ll almost always&lt;br/&gt;close the channel cooperatively anyway, so the commitments don&amp;#39;t get used&lt;br/&gt;and the fees for the overhead won&amp;#39;t get paid; OTOH, if your counterparty&lt;br/&gt;isn&amp;#39;t known to you, and you think it&amp;#39;s likely they might randomly disappear&lt;br/&gt;off the net and you&amp;#39;ll have to use the commitment, then trading off disk&lt;br/&gt;for fees might be sensible. You could change the choice while the channel&amp;#39;s&lt;br/&gt;operating -- if a new R value is verbatim in the output, no need to store&lt;br/&gt;it locally, whether or not you&amp;#39;ve stored previous R values locally.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;-- &lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&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/20150724/268e220f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20150724/268e220f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:43:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8v2g3gjrse9l6zf7yvluxmxhd2tuw2ufm75llczg3vlztzge0vagzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8hawm4</id>
    
      <title type="html">📅 Original date posted:2015-07-23 📝 Original message: Hi *, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8v2g3gjrse9l6zf7yvluxmxhd2tuw2ufm75llczg3vlztzge0vagzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8hawm4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8p0rnqv3qnqfarmaa33qmfy829xszl3v5rwld30k48n6fcvlc2eqq0xl6k&#39;&gt;nevent1q…xl6k&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-07-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi *,&lt;br/&gt;&lt;br/&gt;For my own understanding I&amp;#39;ve been trying to work out what the lightning&lt;br/&gt;protocol looks like at a network-protocol level. I think the following&lt;br/&gt;works, maybe it&amp;#39;s interesting for others:&lt;br/&gt;&lt;br/&gt;For notational convenience I&amp;#39;m going to just list the secrets that need to&lt;br/&gt;be known to use to spend an output. &amp;#34;Alice&amp;#34; and &amp;#34;Bob&amp;#34; are Alice and Bob&amp;#39;s&lt;br/&gt;respective keys, Alice_N and Bob_N are the Nth numbers in shachain&lt;br/&gt;sequences [0]. I&amp;#39;m using TIMEOUT for the checktimelockverify construction;&lt;br/&gt;DELAY for the checksequenceverify construction.&lt;br/&gt;&lt;br/&gt;​Assume Alice and Bob already have a channel setup. Then their current&lt;br/&gt;commitments might be:&lt;br/&gt;&lt;br/&gt;Alice&amp;#39;s commitment txn: (fully signed)&lt;br/&gt;  500 Alice &#43; DELAY | #Alice_101 &#43; Bob&lt;br/&gt;  500 Bob&lt;br/&gt;&lt;br/&gt;Bob&amp;#39;s commitment txn: (fully signed)&lt;br/&gt;  500 Alice&lt;br/&gt;  500 Bob &#43; DELAY | #Bob_101 &#43; Alice&lt;br/&gt;&lt;br/&gt;Alice knows the hash of #Bob_101 and Bob knows the hash of #Alice_101&lt;br/&gt;(because they&amp;#39;ve respectively seen the full txns to sign them).&lt;br/&gt;&lt;br/&gt;If Alice wants to update the channel to reflect a conditional payment from&lt;br/&gt;Bob once R is revealed, they can follow the following steps:&lt;br/&gt;&lt;br/&gt;1) Alice proposes: (unsigned)&lt;br/&gt;     500 Alice &#43; DELAY | #Alice_102 &#43; Bob&lt;br/&gt;     400 Bob&lt;br/&gt;     100 R &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT | #Alice_102 &#43; Bob&lt;br/&gt;&lt;br/&gt;     [1]&lt;br/&gt;&lt;br/&gt;   Bob checks: txn structure, amounts, R, Bob key is correct&lt;br/&gt;   Bob stores the hash of #Alice_102&lt;br/&gt;&lt;br/&gt;2a) Bob declines; proposal never happened&lt;br/&gt;2b) Bob approves, replies:&lt;br/&gt;     signing Alice&amp;#39;s proposal&lt;br/&gt;     requesting sig of:&lt;br/&gt;       500 Alice&lt;br/&gt;       400 Bob &#43; DELAY | #Bob_102 &#43; Alice&lt;br/&gt;       100 R &#43; Alice | Bob &#43; TIMEOUT &#43; DELAY | #Bob_102 &#43; Alice&lt;br/&gt;&lt;br/&gt;    Alice checks: signature, txn structure, amounts, R, Alice key is correct&lt;br/&gt;    Alice signs and stores new txn.&lt;br/&gt;    Alice stores the hash of #Bob_102&lt;br/&gt;&lt;br/&gt;3) Alice discards old commitment txn.&lt;br/&gt;   Alice replies:&lt;br/&gt;     signing Bob&amp;#39;s transaction&lt;br/&gt;     revealing Alice_101&lt;br/&gt;&lt;br/&gt;    Bob checks: signature,&lt;br/&gt;     Alice_101 hashes correctly (ie matches the hash of #Alice_101, stored&lt;br/&gt;previously),&lt;br/&gt;     Alice_101 forms hash chain with prior secrets (Alice_100, Alice_99..)&lt;br/&gt;as expected&lt;br/&gt;&lt;br/&gt;    Bob signs and stores his new commitment txn&lt;br/&gt;    Bob discards the hash of #Alice_101.&lt;br/&gt;&lt;br/&gt;4) Bob discards old commitment txn&lt;br/&gt;   Bob replies:&lt;br/&gt;     revealing Bob_101&lt;br/&gt;&lt;br/&gt;    Alice checks:&lt;br/&gt;     Bob_101 hashes correctly (ie #Bob_101 does clear the old txn),&lt;br/&gt;     Bob_101 forms hash chain with prior secrets (Bob_100, Alice_99..) as&lt;br/&gt;expected&lt;br/&gt;    Alice discards the hash of #Bob_101&lt;br/&gt;&lt;br/&gt;If the protocol follows through to completion, then they each have&lt;br/&gt;matching, updated, signed commitment transactions; along with the secrets&lt;br/&gt;necessary to void attempts to use older commitments. If the protocol goes&lt;br/&gt;off track (checks fail, or no response from partner within a protocol&lt;br/&gt;timeout), then either party can safely close the channel after any step:&lt;br/&gt;&lt;br/&gt; Alice can close at (500/500) up until step (3)&lt;br/&gt; Alice can close at (500/400/100) after step (2b)&lt;br/&gt;&lt;br/&gt; Bob can close at (500/500) up until step (4)&lt;br/&gt; Bob can close at (500/400/100) after step (3)&lt;br/&gt;&lt;br/&gt;If Alice ever tries cheating, and publishes and old commitment:&lt;br/&gt;&lt;br/&gt;  800 Alice &#43; DELAY | #Alice_42 &#43; Bob&lt;br/&gt;  200 Bob&lt;br/&gt;&lt;br/&gt;Then Bob needs to work out which of the 100 Alice_N hashes he knows or can&lt;br/&gt;work out is being abused; prior to the DELAY expiring. With millions of&lt;br/&gt;transactions that could be a bunch of hash calculations or a 100MB lookup&lt;br/&gt;table. Might make more sense to have a dummy output of &amp;#34;0: OP_RETURN 42&amp;#34; to&lt;br/&gt;make that calculation trivial though? That could trivially be verified as&lt;br/&gt;part of the &amp;#34;forms hash chain as expect&amp;#34; and &amp;#34;txn structure&amp;#34; checks.&lt;br/&gt;&lt;br/&gt;HTLCs are harder if you assume pay2scripthash is used though. If Alice&lt;br/&gt;published:&lt;br/&gt;&lt;br/&gt;  100 Alice &#43; Delay | #Alice_55 &#43; Bob&lt;br/&gt;  100 Bob&lt;br/&gt;  200 R1 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT1 | #Alice_55 &#43; Bob&lt;br/&gt;  200 R2 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT2 | #Alice_55 &#43; Bob&lt;br/&gt;  200 R3 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT3 | #Alice_55 &#43; Bob&lt;br/&gt;  200 R4 &#43; Alice &#43; DELAY | Bob &#43; TIMEOUT4 | #Alice_55 &#43; Bob&lt;br/&gt;&lt;br/&gt;well after R1..R4 were known and Alice_55 was revealed in order to try&lt;br/&gt;stealing most of the channel&amp;#39;s funds, I think Bob could only claim the&lt;br/&gt;final outputs if he could unhash the scripts, which would require having&lt;br/&gt;remembered R1..R4 even after those contracts had long been resolved. I&lt;br/&gt;guess it could be feasible in that case to have the extra output be &amp;#34;0:&lt;br/&gt;OP_RETURN 42 #R1 #R2 #R3 #R4&amp;#34;?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;​[0] It&amp;#39;s easy to calculate Alice_N given Alice_M for some M &amp;gt; N, but&lt;br/&gt;unfeasible for any M &amp;lt; N.&lt;br/&gt;&lt;br/&gt;​[1] I don&amp;#39;t understand the construction for HTLCs in 0.5.9 of the&lt;br/&gt;lightning paper; what I&amp;#39;m doing instead is taking an underlying output of&lt;br/&gt;&amp;#34;Alice &#43; R | Bob &#43; TIMEOUT&amp;#34; and mapping it through &amp;#34;my key becomes my key &#43;&lt;br/&gt;DELAY&amp;#34; &#43; &amp;#34;they get everything with my secret sequence and their key&amp;#34;. I&amp;#39;ll&lt;br/&gt;post about that separately so it can get shot down :)&lt;br/&gt;&lt;br/&gt;[2] (Unattached footnote) This project&amp;#39;s motto is &amp;#34;The lightning network:&lt;br/&gt;it&amp;#39;s off the chain!&amp;#34; right?&lt;br/&gt;&lt;a href=&#34;http://www.urbandictionary.com/define.php?term=off&#43;the&#43;chain&#34;&gt;http://www.urbandictionary.com/define.php?term=off&#43;the&#43;chain&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- &lt;br/&gt;Anthony Towns &amp;lt;aj at erisian.com.au&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/20150723/b330b01a/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20150723/b330b01a/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:43:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfaxedh4rgjx5vfxs0gxm42yluauq4lu7t85sz09enaw42cahawvczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4rxetq</id>
    
      <title type="html">📅 Original date posted:2023-03-09 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfaxedh4rgjx5vfxs0gxm42yluauq4lu7t85sz09enaw42cahawvczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4rxetq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgsk40ju2z2qn5j2vccr8kllpdalqxemzuj5ylssmstwwl3kzg34cq3gwq6&#39;&gt;nevent1q…gwq6&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-03-09&lt;br/&gt;🗒️ Summary of this message: The email discusses the use of OP_FORWARD_SELF as a JET of OP_FLU in the revaulting common case, with a suggestion to use a special case instead.&lt;br/&gt;📝 Original message:On 10 March 2023 4:45:15 am AEST, Greg Sanders via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;1) OP_FORWARD_SELF is a JET of OP_FLU in the revaulting common case. Maybe&lt;br/&gt;&amp;gt;obvious but I missed this initially and thought it was useful to be pointed&lt;br/&gt;&amp;gt;out.&lt;br/&gt;&lt;br/&gt;That was true for TLUV - iirc &amp;#34;FALSE FALSE 0 TLUV&amp;#34; would preserve the spk - but I don&amp;#39;t think it&amp;#39;s true for OP_FLU: you can&amp;#39;t commit to preserving the current script without a way to observe the current script; trying to include a copy of the script in the script makes the script size infinite, and trying to include a hash of the script inside the script is cryptographically infeasible.&lt;br/&gt;&lt;br/&gt;You could just special case &amp;#34;0 0 OP_FLU&amp;#34; to result in the same script rather than an empty one though, which would avoid the need for a dedicated FWD_SELF opcode.&lt;br/&gt;&lt;br/&gt;(Not convinced calling things Jets when they&amp;#39;re unrelated to simplicity makes sense)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;-- &lt;br/&gt;Sent from my phone.
    </content>
    <updated>2023-06-08T01:20:02&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8fa0k90lhgqmc92saljflagznf33qextn66c7enppznnmjcs5mjgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4qr89m</id>
    
      <title type="html">📅 Original date posted:2023-03-24 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8fa0k90lhgqmc92saljflagznf33qextn66c7enppznnmjcs5mjgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4qr89m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfaxedh4rgjx5vfxs0gxm42yluauq4lu7t85sz09enaw42cahawvceh9yxz&#39;&gt;nevent1q…9yxz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-03-24&lt;br/&gt;🗒️ Summary of this message: A proposed update to Bitcoin&amp;#39;s scripting language includes new opcodes for conditional transactions. These could enable non-custodial, on-chain auctions of ordinals.&lt;br/&gt;📝 Original message:On Tue, Mar 07, 2023 at 10:45:34PM &#43;1000, Anthony Towns via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; I think there are perhaps four opcodes that are interesting in this class:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;    idx sPK OP_FORWARD_TARGET&lt;br/&gt;&amp;gt;      -- sends the value to a particular output (given by idx), and&lt;br/&gt;&amp;gt;         requires that output have a particular scriptPubKey (given&lt;br/&gt;&amp;gt;         by sPK).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;    idx [...] n script OP_FORWARD_LEAF_UPDATE&lt;br/&gt;&amp;gt;      -- sends the value to a particular output (given by idx), and&lt;br/&gt;&amp;gt; 	requires that output to have almost the same scriptPubKey as this&lt;br/&gt;&amp;gt; 	input, _except_ that the current leaf is replaced by &amp;#34;script&amp;#34;,&lt;br/&gt;&amp;gt; 	with that script prefixed by &amp;#34;n&amp;#34; pushes (of values given by [...])&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;    idx OP_FORWARD_SELF&lt;br/&gt;&amp;gt;      -- sends the value to a particular output (given by idx), and&lt;br/&gt;&amp;gt;         requires that output to have the same scriptPubKey as this input&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;    amt OP_FORWARD_PARTIAL&lt;br/&gt;&amp;gt;      -- modifies the next OP_FORWARD_* opcode to only affect &amp;#34;amt&amp;#34;,&lt;br/&gt;&amp;gt;         rather than the entire balance. opcodes after that affect the&lt;br/&gt;&amp;gt; 	remaining balance, after &amp;#34;amt&amp;#34; has been subtracted. if &amp;#34;amt&amp;#34; is&lt;br/&gt;&amp;gt; 	0, the next OP_FORWARD_* becomes a no-op.&lt;br/&gt;&lt;br/&gt;The BIP 345 draft has been updated [0] [1] and now pretty much defines&lt;br/&gt;OP_VAULT to have the behaviour specced for OP_FORWARD_LEAF_UPDATE above,&lt;br/&gt;and OP_VAULT_RECOVER to behave as OP_FORWARD_TARGET above. Despite&lt;br/&gt;that, for this email I&amp;#39;m going to continue using the OP_FORWARD_*&lt;br/&gt;naming convention.&lt;br/&gt;&lt;br/&gt;Given the recent controversy over the Yuga labs ordinal auction [2],&lt;br/&gt;perhaps it&amp;#39;s interesting to consider that these proposed opcodes come&lt;br/&gt;close to making it possible to do a fair, non-custodial, on-chain auction&lt;br/&gt;of ordinals [3].&lt;br/&gt;&lt;br/&gt;The idea here is that you create a utxo on chain that contains the ordinal&lt;br/&gt;in question, which commits to the address of the current leading bidder,&lt;br/&gt;and can be spent in two ways:&lt;br/&gt;&lt;br/&gt;  1) it can be updated to a new bidder, if the bid is raised by at least&lt;br/&gt;     K satoshis, in which case the previous bidder is refunded their&lt;br/&gt;     bid; or,&lt;br/&gt;&lt;br/&gt;  2) if there have been no new bids for a day, the current high bidder&lt;br/&gt;     wins, and the ordinal is moved to their address, while the funds&lt;br/&gt;     from their winning bid are sent to the original vendor&amp;#39;s address.&lt;br/&gt;&lt;br/&gt;I believe this can be implemented in script as follows,&lt;br/&gt;assuming the opcodes OP_FORWARD_TARGET(OP_VAULT_RECOVER),&lt;br/&gt;OP_FORWARD_LEAF_UPDATE(OP_VAULT), OP_FORWARD_PARTIAL (as specced above),&lt;br/&gt;and OP_PUSHCURRENTINPUTINDEX (as implemented in liquid/elements [4])&lt;br/&gt;are all available.&lt;br/&gt;&lt;br/&gt;First, figure out the parameters:&lt;br/&gt;&lt;br/&gt; * Set VENDOR to the scriptPubKey corresponding to the vendor&amp;#39;s address.&lt;br/&gt; * Set K to the minimum bid increment [5].&lt;br/&gt; * Initially, set X equal to VENDOR.&lt;br/&gt; * Initially, set V to just below the reserve price (V&#43;K is the&lt;br/&gt;   minimum initial bid).&lt;br/&gt;&lt;br/&gt;Then construct the following script:&lt;br/&gt;&lt;br/&gt; [X] [V] [SSS] TOALT TOALT TOALT&lt;br/&gt; 0 PUSHCURRENTINPUTINDEX EQUALVERIFY&lt;br/&gt; DEPTH NOT IF&lt;br/&gt;   0 10000 FORWARD_PARTIAL&lt;br/&gt;   0 FROMALT FORWARD_TARGET&lt;br/&gt;   1 [VENDOR] FWD_TARGET&lt;br/&gt;   144&lt;br/&gt; ELSE&lt;br/&gt;   FROMALT SWAP TUCK FROMALT&lt;br/&gt;   [K] ADD GREATERTHANOREQUAL VERIFY&lt;br/&gt;   1 SWAP FORWARD_TARGET&lt;br/&gt;   DUP FORWARD_PARTIAL&lt;br/&gt;   0 ROT ROT&lt;br/&gt;   FROMALT DUP 3 SWAP FORWARD_LEAF_UPDATE&lt;br/&gt;   0&lt;br/&gt; ENDIF&lt;br/&gt; CSV&lt;br/&gt; 1ADD&lt;br/&gt;&lt;br/&gt;where &amp;#34;SSS&amp;#34; is a pushdata of the rest of the script (&amp;#34;TOALT TOALT TOALT&lt;br/&gt;.. 1ADD&amp;#34;).&lt;br/&gt;&lt;br/&gt;Finally, make that script the sole tapleaf, accompanied by a NUMS point&lt;br/&gt;as the internal public key, calculate the taproot address corresponding&lt;br/&gt;to that, and send the ordinal to that address as the first satoshi.&lt;br/&gt;&lt;br/&gt;There are two ways to spend that script. With an empty witness stack,&lt;br/&gt;the following will be executed:&lt;br/&gt;&lt;br/&gt; [X] [V] [SSS] TOALT TOALT TOALT&lt;br/&gt;   -- altstack now contains [SSS V X]&lt;br/&gt; 0 PUSHCURRENTINPUTINDEX EQUALVERIFY&lt;br/&gt;   -- this input is the first, so the ordinal will move to the first&lt;br/&gt;      output&lt;br/&gt; DEPTH NOT IF&lt;br/&gt;   -- take this branch: the auction is over!&lt;br/&gt;   1 [VENDOR] FWD_TARGET&lt;br/&gt;   -- output 1 gets the entire value of this input, and pays to&lt;br/&gt;      the vendor&amp;#39;s hardcoded scriptPubKey&lt;br/&gt;   0 10000 FORWARD_PARTIAL&lt;br/&gt;   0 FROMALT FORWARD_TARGET&lt;br/&gt;   -- we forward at least 10k sats to output 0 (if there were 0 sats,&lt;br/&gt;      the ordinal would end up in output 1 instead, which would be a&lt;br/&gt;      bug), and output 0 pays to scriptPubKey &amp;#34;X&amp;#34;&lt;br/&gt;   144&lt;br/&gt; ELSE .. ENDIF&lt;br/&gt;   -- skip over the other branch&lt;br/&gt; CSV&lt;br/&gt;   -- check that this input has baked for 144 blocks (~1 day)&lt;br/&gt; 1ADD&lt;br/&gt;   -- leave 145 on the stack, which is true. success!&lt;br/&gt;&lt;br/&gt;Alternatively, if you want to increase the bid you provide a stack with&lt;br/&gt;two items: your scriptPubKey and the new bid [X&amp;#39; V&amp;#39;]. Execution this&lt;br/&gt;time looks like:&lt;br/&gt;&lt;br/&gt; [X] [V] [SSS] TOALT TOALT TOALT&lt;br/&gt;   -- stack contains [X&amp;#39; V&amp;#39;], altstack now contains [SSS V X]&lt;br/&gt; 0 PUSHCURRENTINPUTINDEX EQUALVERIFY&lt;br/&gt;   -- this input is the first, so the ordinal will move to the first&lt;br/&gt;      output&lt;br/&gt; DEPTH NOT IF ... ELSE&lt;br/&gt;   -- skip over the other branch (without violating minimalif rules)&lt;br/&gt;   FROMALT SWAP TUCK FROMALT&lt;br/&gt;   -- stack contains [X&amp;#39; V&amp;#39; X V&amp;#39; V], altstack contains [SSS]&lt;br/&gt;   [K] ADD GREATERTHANOREQUAL VERIFY&lt;br/&gt;   -- check V&amp;#39; &amp;gt;= V&#43;K, stack contains [X&amp;#39; V&amp;#39; X]&lt;br/&gt;   1 SWAP FORWARD_TARGET&lt;br/&gt;   -- output 1 pays to X (previous bidder&amp;#39;s scriptPubKey), and the&lt;br/&gt;      entire value of this input goes there; stack contains [X&amp;#39; V&amp;#39;]&lt;br/&gt;   DUP FORWARD_PARTIAL&lt;br/&gt;   -- execute &amp;#34;V&amp;#39; FORWARD_PARTIAL&amp;#34;, stack contains [X&amp;#39; V&amp;#39;]&lt;br/&gt;   0 ROT ROT&lt;br/&gt;   -- stack contains [0 X&amp;#39; V&amp;#39;]&lt;br/&gt;   FROMALT DUP 3 SWAP FORWARD_LEAF_UPDATE&lt;br/&gt;   -- execute &amp;#34;0 X&amp;#39; V&amp;#39; SSS 3 SSS FORWARD_LEAF_UPDATE&amp;#34; which checks&lt;br/&gt;      that output 0 spends at least V&amp;#39; satoshis back to the same&lt;br/&gt;      script (because that&amp;#39;s how we defined SSS), except the first&lt;br/&gt;      three pushes (previously X V SSS) are replaced by X&amp;#39; V&amp;#39; SSS.&lt;br/&gt;   0&lt;br/&gt; ENDIF&lt;br/&gt; CSV&lt;br/&gt;   -- &amp;#34;0 CSV&amp;#34; requires nSequnce to be set, which makes the tx rbf&amp;#39;able,&lt;br/&gt;      which hopefully makes it harder to pin&lt;br/&gt; 1ADD&lt;br/&gt;   -- ends with 1 on the stack; success!&lt;br/&gt;&lt;br/&gt;(The &amp;#34;SSS n SSS FORWARD_LEAF_UPDATE&amp;#34; construct is more or less a quine,&lt;br/&gt;ie a program that outputs its own source code)&lt;br/&gt;&lt;br/&gt;I think that script is about 211 witness bytes, with an additional 40&lt;br/&gt;witness bytes for X&amp;#39;/V&amp;#39;, so when making a bid, your tx would be&lt;br/&gt;something like:&lt;br/&gt;&lt;br/&gt;   tx header, 10vb&lt;br/&gt;   input 0: 103vb for the old bid including witness and control block&lt;br/&gt;   input 1: 58vb for a taproot key path spend&lt;br/&gt;   output 0: 43vb for the new bid&lt;br/&gt;   output 1: 43vb for your change&lt;br/&gt;&lt;br/&gt;for a total of about 257vb -- slightly larger than a regular 2-in-2-out&lt;br/&gt;transaction, but not terribly much. Mostly because input 0 doesn&amp;#39;t require&lt;br/&gt;a signature -- it&amp;#39;s size is effectively 6 pubkeys: X, X&amp;#39; VENDOR twice,&lt;br/&gt;and the script code twice, along with a little extra to encode the&lt;br/&gt;various numbers (10000, 144, K, V, V&amp;#39;).&lt;br/&gt;&lt;br/&gt;This approach seems pretty &amp;#34;MEV&amp;#34; resistant: you pay fees via input 1 if&lt;br/&gt;your bid succeeds; if it doesn&amp;#39;t, you don&amp;#39;t pay any fees. A potential&lt;br/&gt;scalper might want to put in an early low ball bid, then prevent&lt;br/&gt;higher bidders from winning the auction, take control of the ordinal,&lt;br/&gt;and resell it later, but unless they can prevent another miner from&lt;br/&gt;mining alternative bids for 144 blocks, they will fail at that. The bid&lt;br/&gt;is fixed by the bidder and committed to by the signature on input 1, so&lt;br/&gt;frontrunning a bid can&amp;#39;t do anything beyond invalidate the bid entirely.&lt;br/&gt;&lt;br/&gt;Obviously, this is a pretty limited auction mechanism in various ways;&lt;br/&gt;eg maybe you&amp;#39;d rather specify K as a percentage than an absoute increment;&lt;br/&gt;maybe you&amp;#39;d like to have the auction definitely finish by some particular&lt;br/&gt;time; maybe you&amp;#39;d like to be able to have the auction be able to continue&lt;br/&gt;above 21.47 BTC (2**31 sats); maybe you&amp;#39;d like to do a dutch auction&lt;br/&gt;rather than an english auction. I think you can probably do all those&lt;br/&gt;things with this set of opcodes and clever scripting, though it probably&lt;br/&gt;gets ugly.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is easily extensible to taro or rgb style assets,&lt;br/&gt;as rather than being able to ensure the asset is transferred by&lt;br/&gt;controlling the input/output positions, I think you&amp;#39;d need to build&lt;br/&gt;up merkle trees and do point tweaks beyond what&amp;#39;s supported by&lt;br/&gt;OP_FORWARD_LEAF_UPDATE/OP_VAULT. Of course, without something like&lt;br/&gt;OP_PUSHCURRENTINPUTINDEX I don&amp;#39;t think you could do it for ordinals&lt;br/&gt;either.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/7f747fba82675f28c239df690a07b75529bd0960/bip-0345.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/7f747fba82675f28c239df690a07b75529bd0960/bip-0345.mediawiki&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://twitter.com/jamesob/status/1639019107432513537&#34;&gt;https://twitter.com/jamesob/status/1639019107432513537&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://cointelegraph.com/news/scammers-dream-yuga-s-auction-model-for-bitcoin-nfts-sees-criticism&#34;&gt;https://cointelegraph.com/news/scammers-dream-yuga-s-auction-model-for-bitcoin-nfts-sees-criticism&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[3] Inscriptions remain a wasteful way of publishing/committing&lt;br/&gt;    to content, however!&lt;br/&gt;&lt;br/&gt;[4] &lt;a href=&#34;https://github.com/ElementsProject/elements/blob/master/doc/tapscript_opcodes.md&#34;&gt;https://github.com/ElementsProject/elements/blob/master/doc/tapscript_opcodes.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[5] Setting K too low probably invites griefing, where a bidder may be&lt;br/&gt;    able to use rbf pinning vectors to prevent people who would be willing&lt;br/&gt;    to bid substantially higher from getting their bid confirmed on&lt;br/&gt;    chain.
    </content>
    <updated>2023-06-08T01:20:02&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0jrgasa3thaqwny3ynfh8egapa93gk0dfkclkyszdcky2tmkce0czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kd7q04c</id>
    
      <title type="html">📅 Original date posted:2023-03-07 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0jrgasa3thaqwny3ynfh8egapa93gk0dfkclkyszdcky2tmkce0czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kd7q04c" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrrp7n4v5hn7nhrcwe2va6zt4wq0n3k3e3sdvnjfj0gqeujxmv5hgyvyaks&#39;&gt;nevent1q…yaks&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-03-07&lt;br/&gt;🗒️ Summary of this message: A proposal to introduce the concept of &amp;#34;forwarding&amp;#34; input amounts to specified outputs with various restrictions on output scripts using new opcodes.&lt;br/&gt;📝 Original message:On Mon, Mar 06, 2023 at 10:25:38AM -0500, James O&amp;#39;Beirne via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; What Greg is proposing above is to in essence TLUV-ify this proposal.&lt;br/&gt;&lt;br/&gt;FWIW, the way I&amp;#39;m thinking about this is that the &amp;#34;OP_VAULT&amp;#34; concept is&lt;br/&gt;introducing two things:&lt;br/&gt;&lt;br/&gt; a) the concept of &amp;#34;forwarding&amp;#34; the input amount to specified&lt;br/&gt;    outputs in a way that elegantly allows merging/splitting&lt;br/&gt;&lt;br/&gt; b) various restrictions on the form of the output scripts&lt;br/&gt;&lt;br/&gt;These concepts go together well, because restricting an output script is&lt;br/&gt;only an interesting thing to do if you&amp;#39;re moving value from this input&lt;br/&gt;into it. And then it&amp;#39;s just a matter of figuring out a nice way to pick&lt;br/&gt;opcodes that combine those two concepts in interesting ways.&lt;br/&gt;&lt;br/&gt;This is different from TLUV, in that TLUV only did part (b), and&lt;br/&gt;assumed you&amp;#39;d do part (a) manually somehow, eg via &amp;#34;OP_IN_OUT_AMOUNT&amp;#34;&lt;br/&gt;and arithmetic opcodes. The advantage of this new approach over that&lt;br/&gt;one is that it makes it really easy to get the logic right (I often&lt;br/&gt;forgot to include the IN_OUT_AMOUNT checks at all, for instance), and&lt;br/&gt;also makes spending multiple inputs to a single output really simple,&lt;br/&gt;something that would otherwise require kind-of gnarly logic.&lt;br/&gt;&lt;br/&gt;I think there are perhaps four opcodes that are interesting in this class:&lt;br/&gt;&lt;br/&gt;   idx sPK OP_FORWARD_TARGET&lt;br/&gt;     -- sends the value to a particular output (given by idx), and&lt;br/&gt;        requires that output have a particular scriptPubKey (given&lt;br/&gt;        by sPK).&lt;br/&gt;&lt;br/&gt;   idx [...] n script OP_FORWARD_LEAF_UPDATE&lt;br/&gt;     -- sends the value to a particular output (given by idx), and&lt;br/&gt;	requires that output to have almost the same scriptPubKey as this&lt;br/&gt;	input, _except_ that the current leaf is replaced by &amp;#34;script&amp;#34;,&lt;br/&gt;	with that script prefixed by &amp;#34;n&amp;#34; pushes (of values given by [...])&lt;br/&gt;&lt;br/&gt;   idx OP_FORWARD_SELF&lt;br/&gt;     -- sends the value to a particular output (given by idx), and&lt;br/&gt;        requires that output to have the same scriptPubKey as this input&lt;br/&gt;&lt;br/&gt;   amt OP_FORWARD_PARTIAL&lt;br/&gt;     -- modifies the next OP_FORWARD_* opcode to only affect &amp;#34;amt&amp;#34;,&lt;br/&gt;        rather than the entire balance. opcodes after that affect the&lt;br/&gt;	remaining balance, after &amp;#34;amt&amp;#34; has been subtracted. if &amp;#34;amt&amp;#34; is&lt;br/&gt;	0, the next OP_FORWARD_* becomes a no-op.&lt;br/&gt;&lt;br/&gt;Then each time you see OP_FORWARD_TARGET or OP_FORWARD_LEAF_UPDATE, you&lt;br/&gt;accumulate the value that&amp;#39;s expected to be forwarded to the output by&lt;br/&gt;each input, and verify that the amount for that output is greater-or-equal&lt;br/&gt;to the accumulated value.&lt;br/&gt;&lt;br/&gt;&amp;gt; ## Required opcodes&lt;br/&gt;&amp;gt; - OP_VAULT: spent to trigger withdrawal&lt;br/&gt;&amp;gt; - OP_VAULT_RECOVER: spent to recover&lt;br/&gt;&lt;br/&gt;Naming here is OP_VAULT ~= OP_FORWARD_LEAF_UPDATE; OP_VAULT_RECOVER ~=&lt;br/&gt;OP_FORWARD_TARGET.&lt;br/&gt;&lt;br/&gt;&amp;gt; For each vault, vaulted coins are spent to an output with the taproot&lt;br/&gt;&amp;gt; structure&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;   taproot(internal_key, {$recovery_leaf, $trigger_leaf, ...})&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; where&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;   $trigger_leaf =&lt;br/&gt;&amp;gt;     &amp;lt;trigger&amp;gt; &amp;lt;auth&amp;gt; &amp;lt;script&amp;gt; &amp;lt;spend-delay&amp;gt; OP_VAULT&lt;br/&gt;&lt;br/&gt;With the opcodes above, the trigger_leaf (for spending some of the&lt;br/&gt;vaulted funds via your hot wallet) script might look like:&lt;br/&gt;&lt;br/&gt;   OP_FORWARD_PARTIAL OP_FORWARD_SELF&lt;br/&gt;   1 &amp;#34;288 OP_CSV OP_DROP OP_CTV&amp;#34; OP_FORWARD_LEAF_UPDATE&lt;br/&gt;   key CHECKSIG&lt;br/&gt;&lt;br/&gt;So if you have 2.0 BTC in a vault utxo, you might spend 0.4 BTC by&lt;br/&gt;supplying the witness data:&lt;br/&gt;&lt;br/&gt;  160000000  (1.6BTC in sats)&lt;br/&gt;  0 (output 0 puts 1.6BTC goes back into the vault)&lt;br/&gt;  &amp;lt;ctvhash&amp;gt; (the outputs where you want the remaining 0.4 BTC to end up)&lt;br/&gt;  1 (the output idx that will be spend via the CTV path once the CSV&lt;br/&gt;     delay is done)&lt;br/&gt;  &amp;lt;sig&amp;gt; (a signature of this transaction via the hot wallet &amp;#34;key&amp;#34;)&lt;br/&gt;&lt;br/&gt;That is, the script becomes:&lt;br/&gt;&lt;br/&gt;  160000000 FORWARD_PARTIAL&lt;br/&gt;  0 FORWARD_SELF&lt;br/&gt;  1 &amp;lt;ctvhash&amp;gt; 1 &amp;#34;288 CSV DROP CTV&amp;#34; FORWARD_LEAF_UPDATE&lt;br/&gt;  sig key CHECKSIG&lt;br/&gt;&lt;br/&gt;Output 1 would then have a tapscript of &amp;#34;&amp;lt;ctvhash&amp;gt; 288 OP_CSV OP_DROP&lt;br/&gt;OP_CTV&amp;#34;, satisfied with an empty witness stack (along with the recovery&lt;br/&gt;path, etc).&lt;br/&gt;&lt;br/&gt;Output 0 is just 1.6BTC back in your vault, and immediately available &lt;br/&gt;for use.&lt;br/&gt;&lt;br/&gt;Other inputs/outputs (for fees etc) would still be committed to by &amp;lt;sig&amp;gt;,&lt;br/&gt;so nothing here is malleable. The script here is about 45 bytes (compared&lt;br/&gt;to 34 for a simple &amp;#34;key CHECKSIG&amp;#34;) and the witness data is about 105 bytes&lt;br/&gt;(compared to 65 bytes for just a signature), which seems pretty nice.&lt;br/&gt;&lt;br/&gt;&amp;gt;   ... =&lt;br/&gt;&amp;gt;     other (optional) leaves in the taptree&lt;br/&gt;&lt;br/&gt;This would allow you to have multiple hot wallets (if any of them are&lt;br/&gt;compromised you can still use the recovery path to avoid loss of funds;&lt;br/&gt;but if some hot wallet becomes temporarily *inaccessible* you can still&lt;br/&gt;easily spend the funds via one of the alternative hot wallets), or,&lt;br/&gt;if you have multiple watchtowers validating your spends and recovering&lt;br/&gt;funds to your cold wallet on a violation, you could have multiple recovery&lt;br/&gt;paths to provide some auditability for who triggered the recovery.&lt;br/&gt;&lt;br/&gt;&amp;gt; Happens via script-path spend to $expr_withdraw, i.e. a timelocked&lt;br/&gt;&amp;gt; OP_CTV.&lt;br/&gt;&lt;br/&gt;Note that if you calculated the OP_CTV incorrectly (eg, you don&amp;#39;t set a&lt;br/&gt;correct nSequence timelock, so that any tx that passes OP_CTV won&amp;#39;t pass&lt;br/&gt;the OP_CSV check, and vice-versa) then this spend path becomes invalid,&lt;br/&gt;and the funds can only be reclaimed via some other path (key path spend,&lt;br/&gt;recovery tapscript, potentially an alternative hotwallet script path).&lt;br/&gt;&lt;br/&gt;OP_FORWARD_LEAF_UPDATE is equivalent to a very specific form of TLUV,&lt;br/&gt;namely &amp;#34;FALSE &amp;lt;h&amp;gt; 2 TLUV&amp;#34;, where &amp;#34;&amp;lt;h&amp;gt;&amp;#34; is calculated by building the&lt;br/&gt;script, prefixing the pushes, then doing the Hash_TapLeaf calculation.&lt;br/&gt;&lt;br/&gt;Not being able to tweak the internal public key (&amp;#34;FALSE&amp;#34; rather than&lt;br/&gt;&amp;#34;&amp;lt;x&amp;gt;&amp;#34;) means this can&amp;#39;t be used to build a coinpool with unilateral&lt;br/&gt;exit -- you can&amp;#39;t remove your key from the key path, which screws over&lt;br/&gt;everyone who&amp;#39;s still in the coinpool.&lt;br/&gt;&lt;br/&gt;On the other hand, not tweaking the internal public key avoids introducing&lt;br/&gt;all the x-only pubkey complications, and keeps it relatively simple,&lt;br/&gt;which is nice, and keeping things simple and targeted now means there&amp;#39;s&lt;br/&gt;still plenty of OP_SUCCESS opcodes available later for something more&lt;br/&gt;general, if that turns out to be desirable.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:20:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8xrx5m6zpezezvy4m44f257s0a5cfhrsc4qu5jv78l3l59vwkczgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k95fvj6</id>
    
      <title type="html">📅 Original date posted:2023-03-02 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8xrx5m6zpezezvy4m44f257s0a5cfhrsc4qu5jv78l3l59vwkczgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k95fvj6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyvg6wdj2yckm73eg5wq5a7te3xqj7ynxha8882q9qhg5myvwptlsqe9lac&#39;&gt;nevent1q…9lac&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-03-02&lt;br/&gt;🗒️ Summary of this message: A proposed replacement for two opcodes in Bitcoin involves a new opcode called OP_TRIGGER_FORWARD, which takes three arguments and can be generalized for more flexibility. The proposed opcode can be embedded in a tapscript and used to modify a TLUV-ish script. The existing OP_VAULT cleverness can be used to spend two inputs to the same output, but there is no way to refund values.&lt;br/&gt;📝 Original message:On Wed, Mar 01, 2023 at 10:05:47AM -0500, Greg Sanders via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Below is a sketch of a replacement for the two opcodes. &lt;br/&gt;&lt;br/&gt;I like this! I tried to come up with something along similar lines for&lt;br/&gt;similar reasons, but I think I tried too hard to reduce it to two opcodes&lt;br/&gt;or something and got myself confused.&lt;br/&gt;&lt;br/&gt;&amp;gt; `OP_TRIGGER_FORWARD`: Takes exactly three arguments:&lt;br/&gt;&amp;gt; 1) output index to match against (provided at spend time normally)&lt;br/&gt;&amp;gt; 2) target-outputs-hash: 32 byte hash to be forwarded to output given at (1)&lt;br/&gt;&amp;gt; (provided at spend time normally)&lt;br/&gt;&amp;gt; 3) spend-delay: value to be forwarded to output given at (1)&lt;br/&gt;&lt;br/&gt;I think you could generalise this as follows:&lt;br/&gt;&lt;br/&gt;   idx .. npush script OP_FORWARD_LEAF_UPDATE&lt;br/&gt;&lt;br/&gt;(OP_FLU :) with the behaviour being:&lt;br/&gt;&lt;br/&gt;   pop script from the stack&lt;br/&gt;   pop npush from the stack (error if non-minimal or &amp;lt;0)&lt;br/&gt;   pop npush entries from the stack,&lt;br/&gt;     prefix script with a minimal push of that entry&lt;br/&gt;   pop idx off the stack (error if idx is not a valid output)&lt;br/&gt;   calculate the spk corresponding to taking the current&lt;br/&gt;     input&amp;#39;s spk and replacing the current leaf with the&lt;br/&gt;     given script&lt;br/&gt;   check the output at idx matches this spk, and the&lt;br/&gt;     value from this input accumulates to that output&lt;br/&gt;&lt;br/&gt;Then instead of `idx hash delay OP_TRIGGER_FORWARD` you&lt;br/&gt;write `idx hash delay 2 &amp;#34;OP_CSV OP_DROP OP_FORWARD_OUTPUTS&amp;#34;&lt;br/&gt;OP_FORWARD_LEAF_UPDATE`&lt;br/&gt;&lt;br/&gt;That&amp;#39;s an additional 5 witness bytes, but a much more generic/composable&lt;br/&gt;opcode.&lt;br/&gt;&lt;br/&gt;Being able to prefix a script with push opcodes avoids the possibility&lt;br/&gt;of being able to add OP_SUCCESS instructions, so I think this is a fairly&lt;br/&gt;safe way of allowing a TLUV-ish script to be modified, especially compared&lt;br/&gt;to OP_CAT.&lt;br/&gt;&lt;br/&gt;I do recognise that it makes it take a variable number of stack elements&lt;br/&gt;though :)&lt;br/&gt;&lt;br/&gt;&amp;gt; As the derived tapscript, embedded in a output scriptpubkey of the form:&lt;br/&gt;&amp;gt; `tr(NUMS,{...,EXPR_WITHDRAW})`, meaning we literally take the control block&lt;br/&gt;&amp;gt; from the spending input, swap the inner pubkey for `NUMS`, use&lt;br/&gt;&amp;gt; `EXPR_WITHDRAW` as the tapleaf, reconstruct the merkle root. If the output&lt;br/&gt;&amp;gt; scriptpubkey doesnt match, fail.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think replacing the internal-public-key makes sense -- if it&lt;br/&gt;was immediately spendable via the keypath before there&amp;#39;s no reason for&lt;br/&gt;it not to be immediately spendable now.&lt;br/&gt;&lt;br/&gt;&amp;gt; Could save 2 WU having OP_FORWARD_OUTPUTS take the &amp;lt;spend-delay&amp;gt; directly&lt;br/&gt;&amp;gt; as an argument, or keep it more general as I did.&lt;br/&gt;&lt;br/&gt;Having OP_FORWARD_OUTPUTS not leave its input on the stack would let&lt;br/&gt;you move the OP_CSV to the end and drop the OP_DROP too, saving 1 WU.&lt;br/&gt;&lt;br/&gt;&amp;gt; Would love to know what you and others think about this direction. I&lt;br/&gt;&amp;gt; apologies for any misunderstandings I have about the current OP_VAULT BIP!&lt;br/&gt;&lt;br/&gt;I think the existing OP_VAULT cleverness would work here, allowing you&lt;br/&gt;to spend two inputs to the same output, accumulating their values.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think it quite gives you a way to &amp;#34;refund&amp;#34; values though -- so&lt;br/&gt;that you can take a vault with 3 BTC, start the &amp;lt;delay&amp;gt; wait to spend&lt;br/&gt;1.4 BTC, and then immediately decide to spend an additional 0.8 BTC on&lt;br/&gt;something else, without the 0.8 BTC effectively having a doubled delay.&lt;br/&gt;&lt;br/&gt;I think you could fix that with something as simple as an additional&lt;br/&gt;&amp;#34;idx OP_FORWARD_REFUND&amp;#34; opcode, though -- then the restriction is just&lt;br/&gt;that the output at the refund idx has the same sPK as this input, and&lt;br/&gt;the total value of this input is accumulated amongst all the outputs&lt;br/&gt;specified by OP_FORWARD opcodes. (Maybe you need to specify the refund&lt;br/&gt;amount explicitly as well, to keep verification easy)&lt;br/&gt;&lt;br/&gt;That would make maybe three new opcodes to cover the &amp;#34;accumulate value&lt;br/&gt;from one or more inputs into specified outputs&amp;#34;:&lt;br/&gt;&lt;br/&gt; - OP_FORWARD_LEAF_UPDATE --&amp;gt; forward input value to modified spk&lt;br/&gt; - OP_FORWARD_DESTINATION --&amp;gt; forward input value to given spk&lt;br/&gt; - OP_FORWARD_REFUND --&amp;gt; forward part of input value to same spk&lt;br/&gt;&lt;br/&gt;along with OP_CTV:&lt;br/&gt;&lt;br/&gt; - OP_FORWARD_OUTPUTS --&amp;gt; pay to specific outputs&lt;br/&gt;&lt;br/&gt;OP_VAULT&amp;#39;s &amp;#34;accumulate value&amp;#34; behaviour here makes the OP_IN_OUT_AMOUNT&lt;br/&gt;things from TLUV more implicit and automatic, which is nice. I think&lt;br/&gt;doing TLUV payment pools wouldn&amp;#39;t require much more than the ability to&lt;br/&gt;combine OP_FLU and OP_FDEST in a single script, explicitly specifying&lt;br/&gt;how much value is extracted via OP_FDEST with the rest assigned to OP_FLU.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:19:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgp9aqgdvgaqved7hda4pmsav5nrhpjxz3zy6j8y6r30s6lwml0dszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kyr98zp</id>
    
      <title type="html">📅 Original date posted:2023-02-17 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgp9aqgdvgaqved7hda4pmsav5nrhpjxz3zy6j8y6r30s6lwml0dszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kyr98zp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9g3asy6vm4t2k0rls2a05s4rs9kzs48x86hh48dlvxyslla7vvcc84weey&#39;&gt;nevent1q…weey&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-17&lt;br/&gt;🗒️ Summary of this message: The Bitcoin community is discussing solutions to the problem of 1 byte message type IDs lacking a coordination mechanism when multiple in-flight BIPs are proposing new message types. One solution is to use uniform encoding using the high-bit to increase the available ID space, but there is still the issue of ensuring that the most frequent message types get the shorter IDs. Another solution is to make type IDs negotiable per direction per connection, but this adds complexity. The community is considering restricting type IDs to [1, 127] and removing 1 byte allocations for messages that are sent at most once per connection per direction.&lt;br/&gt;📝 Original message:On Thu, Feb 16, 2023 at 05:43:22PM &#43;0000, Dhruv M via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Problem:&lt;br/&gt;&amp;gt; - 1 byte message type IDs are lacking a co-ordination mechanism when multiple in-flight BIPs are proposing new message types as the id space is reduced form 12 ASCII bytes to 1 byte.&lt;br/&gt;&amp;gt; - 1 byte IDs are scarce and should be allocated judiciously, especially given that gains on bandwidth are very much non-uniform across message types.&lt;br/&gt;&lt;br/&gt;ACK.&lt;br/&gt;&lt;br/&gt;&amp;gt; Solutions:&lt;br/&gt;&amp;gt; - Uniform encoding using the high-bit increases the available ID space drastically, however, there&amp;#39;s still the issue of making sure that the most frequent message types get the shorter IDs.&lt;br/&gt;&amp;gt; - Making type IDs negotiable(editable, really) per direction per connection solves that issue at the cost of some increased complexity.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Since we don&amp;#39;t really know the extent to which the protocol will ossify over time and that BIP324 is already quite a large change, we might want to optimize for the least additional complexity that doesn&amp;#39;t close the doors on any of the solutions. &lt;br/&gt;&lt;br/&gt;I think it&amp;#39;s probably less complex to close *some* of the doors?&lt;br/&gt;&lt;br/&gt;In particular, I think there&amp;#39;s two questions that have to get answered:&lt;br/&gt;&lt;br/&gt; 1) how do you distinguish the command from the payload for&lt;br/&gt;    non short-ids -- by a length prefix, or by setting the high-bit&lt;br/&gt;    of the final command byte?&lt;br/&gt;&lt;br/&gt; 2) are short ids available/meaningful to send prior to VERACK being&lt;br/&gt;    completed?&lt;br/&gt;&lt;br/&gt;&amp;gt; How about this:&lt;br/&gt;&amp;gt; - BIP324 restricts type IDs to [1, 127]&lt;br/&gt;&lt;br/&gt;Is this for short ids (currently [13-255] per the bip) or for every byte&lt;br/&gt;in a non-short-id command (for p2p v1, IsCommandValid() restricts each&lt;br/&gt;byte to being in the printable ascii range, ie [32-126])?&lt;br/&gt;&lt;br/&gt;Here&amp;#39;s another approach:&lt;br/&gt;&lt;br/&gt; idea: we use short ids to minimise bandwidth, and don&amp;#39;t care about&lt;br/&gt;       bandwidth for long ids&lt;br/&gt;&lt;br/&gt; implementation:&lt;br/&gt;       short id 0 is reserved for long commands. when received, we&lt;br/&gt;       decode the first 12 bytes of the payload and treat them&lt;br/&gt;       exactly the same as a v1 p2p message (trailing 0-bytes, etc)&lt;br/&gt;       (if there&amp;#39;s not 12 bytes of payload, it&amp;#39;s just treated as an&lt;br/&gt;       invalid command and dropped)&lt;br/&gt;&lt;br/&gt;       short ids 1-255 are available for use as aliases of particular&lt;br/&gt;       long commands&lt;br/&gt;&lt;br/&gt;(That&amp;#39;s exactly compatible with p2p v1, and also avoids the temptation&lt;br/&gt;to try to choose short command names rather than descriptive ones -- the&lt;br/&gt;0-padding to 12 bytes prevents you from saving any bandwidth that way;&lt;br/&gt;but that&amp;#39;s what we have short ids for anyway)&lt;br/&gt;&lt;br/&gt;If we decide we want &amp;gt;255 short ids, we can figure out how to extend&lt;br/&gt;them later, in a fairly open ended way I think, eg by having [128-255]&lt;br/&gt;imply a 2 byte short id, so that seems fine?&lt;br/&gt;&lt;br/&gt;&amp;gt; - We remove 1 byte allocations for messages that are sent at most once per connection per direction&lt;br/&gt;&lt;br/&gt;I think this leaves 32 commands that get short ids initially:&lt;br/&gt;&lt;br/&gt;    misc: ADDR, ADDRV2, BLOCK, FEEFILTER, GETBLOCKS, GETDATA, GETHEADERS,&lt;br/&gt;          HEADERS, INV, NOTFOUND, PING, PONG, TX&lt;br/&gt;    bip 35/37: FILTERADD, FILTERCLEAR, FILTERLOAD, MEMPOOL, MERKLEBLOCK&lt;br/&gt;    bip 152: BLOCKTXN, CMPCTBLOCK, GETBLOCKTXN&lt;br/&gt;    bip 157: CFCHECKPT, CFHEADERS, CFILTER, GETCFCHCKPT, GETCFHEADERS,&lt;br/&gt;        GETCFILTERS&lt;br/&gt;    bip 330: RECONCILDIFF, REQRECON, REQSKETCHEXT, SENDCMPCT, SKETCH&lt;br/&gt;&lt;br/&gt;which drops:&lt;br/&gt;&lt;br/&gt;    VERSION, VERACK, GETADDR, SENDADDRV2, SENDHEADERS, SENDTXRCNCL,&lt;br/&gt;    WTXIDRELAY  &lt;br/&gt;&lt;br/&gt;compared to bip 324 currently.&lt;br/&gt;&lt;br/&gt;I think the things missing from the current list (and not currently in&lt;br/&gt;use by bitcoin core) are:&lt;br/&gt;&lt;br/&gt;    bip 61: REJECT&lt;br/&gt;    bip 331: GETPKGTXNS, PKGTXNS, ANCPKGINFO&lt;br/&gt;&lt;br/&gt;&amp;gt; - Optionally, in the implementation we can attempt to move the type id mapping to the p2p layer away from the transport layer. I suspect this could also be done after the implementation is merged but might be cleaner as the mapping is a p2p concern.&lt;br/&gt;&lt;br/&gt;I agree that&amp;#39;s fine, though I expect that we&amp;#39;ll probably want to do it&lt;br/&gt;not long after bip 331 is ready for merge (or some other p2p improvement&lt;br/&gt;comes along)...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:19:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstrpcruam0hpss9wtspctrueqwasr4g5yknuk60km58756wj0kdsqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k26r4s8</id>
    
      <title type="html">📅 Original date posted:2023-02-11 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstrpcruam0hpss9wtspctrueqwasr4g5yknuk60km58756wj0kdsqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k26r4s8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyfkhaagcz6jymnntea42yz4nafe3w9maq8k3qsm5xd7apf3s7t8c672z9g&#39;&gt;nevent1q…2z9g&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-11&lt;br/&gt;🗒️ Summary of this message: A bug in Taproot allows the same Tapleaf to be repeated multiple times, incurring different Tapfee rates, but a fix is available.&lt;br/&gt;📝 Original message:On 9 February 2023 12:04:16 am AEST, Russell O&amp;#39;Connor via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;The fix for the bug is to sign the entire tapbranch instead of the tapleaf.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;On Wed., Feb. 8, 2023, 04:35 Michael Folkson, &amp;lt;michaelfolkson at protonmail.com&amp;gt;&lt;br/&gt;&amp;gt;wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Andrew&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; There is a bug in Taproot that allows the same Tapleaf to be repeated&lt;br/&gt;&amp;gt;&amp;gt; multiple times in the same Taproot, potentially at different Taplevels&lt;br/&gt;&amp;gt;&amp;gt; incurring different Tapfee rates.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; The countermeasure is that you should always know the entire Taptree&lt;br/&gt;&amp;gt;&amp;gt; when interacting with someone&amp;#39;s Tapspend.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I wouldn&amp;#39;t say it is a &amp;#34;bug&amp;#34; unless there is a remedy for the bug that&lt;br/&gt;&amp;gt;&amp;gt; wasn&amp;#39;t (and retrospectively should have been) included in the Taproot&lt;br/&gt;&amp;gt;&amp;gt; design. In retrospect and assuming you could redesign the Taproot consensus&lt;br/&gt;&amp;gt;&amp;gt; rules again today would you prevent spending from a valid P2TR address if a&lt;br/&gt;&amp;gt;&amp;gt; repeated Tapleaf hash was used to prove that a spending path was embedded&lt;br/&gt;&amp;gt;&amp;gt; in a Taproot tree? That&amp;#39;s the only thing I can think of to attempt to&lt;br/&gt;&amp;gt;&amp;gt; remedy this &amp;#34;bug&amp;#34; and it would only be a partial protection as proving a&lt;br/&gt;&amp;gt;&amp;gt; spending path exists within a Taproot tree only requires a subset of the&lt;br/&gt;&amp;gt;&amp;gt; Tapleaf hashes.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I only point this out because there seems to be a push to find &amp;#34;bugs&amp;#34; and&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;accidental blowups&amp;#34; in the Taproot design currently. No problem with this&lt;br/&gt;&amp;gt;&amp;gt; if there are any, they should definitely be highlighted and discussed if&lt;br/&gt;&amp;gt;&amp;gt; they do exist. The nearest to a possible inferior design decision thus far&lt;br/&gt;&amp;gt;&amp;gt; that I&amp;#39;m aware of is x-only pubkeys in BIP340 [0].&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks&lt;br/&gt;&amp;gt;&amp;gt; Michael&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0]:&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://btctranscripts.com/london-bitcoin-devs/2022-08-11-tim-ruffing-musig2/#a-retrospective-look-at-bip340&#34;&gt;https://btctranscripts.com/london-bitcoin-devs/2022-08-11-tim-ruffing-musig2/#a-retrospective-look-at-bip340&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; --&lt;br/&gt;&amp;gt;&amp;gt; Michael Folkson&lt;br/&gt;&amp;gt;&amp;gt; Email: michaelfolkson at protonmail.com&lt;br/&gt;&amp;gt;&amp;gt; Keybase: michaelfolkson&lt;br/&gt;&amp;gt;&amp;gt; PGP: 43ED C999 9F85 1D40 EAF4 9835 92D6 0159 214C FEE3&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ------- Original Message -------&lt;br/&gt;&amp;gt;&amp;gt; On Tuesday, February 7th, 2023 at 18:35, Russell O&amp;#39;Connor 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; There is a bug in Taproot that allows the same Tapleaf to be repeated&lt;br/&gt;&amp;gt;&amp;gt; multiple times in the same Taproot, potentially at different Taplevels&lt;br/&gt;&amp;gt;&amp;gt; incurring different Tapfee rates.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The countermeasure is that you should always know the entire Taptree when&lt;br/&gt;&amp;gt;&amp;gt; interacting with someone&amp;#39;s Tapspend.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Tue, Feb 7, 2023 at 1:10 PM Andrew Poelstra 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;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Some people highlighted some minor problems with my last email:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; On Tue, Feb 07, 2023 at 01:46:22PM &#43;0000, Andrew Poelstra via bitcoin-dev&lt;br/&gt;&amp;gt;&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; &amp;lt;snip&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; [1] &lt;a href=&#34;https://bitcoin.sipa.be/miniscript/&#34;&gt;https://bitcoin.sipa.be/miniscript/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; [2] In Taproot, if you want to prevent signatures migrating to another&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; branch or within a branch, you can use the CODESEPARATOR opcode&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; which was redisegned in Taproot for exactly this purpose... we&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; really did about witness malleation in its design!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; In Taproot the tapleaf hash is always covered by the signature (though&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; not in some ANYONECANPAY proposals) so you can never migrate signatures&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; between tapbranches.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I had thought this was the case, but then I re-confused myself by&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; reading BIP 341 .... which has much of the sighash specified, but not&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; all of it! The tapleaf hash is added in BIP 342.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; If you want to prevent signatures from moving around *within* a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; branch,&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; And this sentence I just meant to delete :)&lt;br/&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; --&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Andrew Poelstra&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Director of Research, Blockstream&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Email: apoelstra at wpsoftware.net&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Web: &lt;a href=&#34;https://www.wpsoftware.net/andrew&#34;&gt;https://www.wpsoftware.net/andrew&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; The sun is always shining in space&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; -Justin Lewis-Webster&lt;br/&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; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Is this something that should be fixed in bip118 signatures then?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;-- &lt;br/&gt;Sent from my phone.
    </content>
    <updated>2023-06-08T01:19:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsft08jac0gml5hns2jrkwawwe807cl8k2v69z507aqkpls0z7cekczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kddk8gr</id>
    
      <title type="html">📅 Original date posted:2023-02-02 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsft08jac0gml5hns2jrkwawwe807cl8k2v69z507aqkpls0z7cekczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kddk8gr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdrctkpm2ggpprtf8krpa5yz8t3wwwktt6vys5cfx7z06mpg4fdhcfnqczs&#39;&gt;nevent1q…qczs&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-02&lt;br/&gt;🗒️ Summary of this message: Casey Rodarmor proposes using ordinal numbers to create non-fungible tokens whose ownership can be transferred by a bitcoin transaction. Inscriptions can be moved off-chain.&lt;br/&gt;📝 Original message:Hi *,&lt;br/&gt;&lt;br/&gt;Casey Rodarmor&amp;#39;s ordinals use the technique of tracking the identity of&lt;br/&gt;individual satoshis throughout their lifetime:&lt;br/&gt;&lt;br/&gt;On Tue, Feb 22, 2022 at 04:43:52PM -0800, Casey Rodarmor via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Briefly, newly mined satoshis are sequentially numbered in the order in&lt;br/&gt;&amp;gt; which they are mined. These numbers are called &amp;#34;ordinal numbers&amp;#34; or&lt;br/&gt;&amp;gt; &amp;#34;ordinals&amp;#34;. When satoshis are spent in a transaction, the input satoshi&lt;br/&gt;&amp;gt; ordinal numbers are assigned to output satoshis using a simple&lt;br/&gt;&amp;gt; first-in-first-out algorithm.&lt;br/&gt;&lt;br/&gt;This is proposed as a BIP at &lt;a href=&#34;https://github.com/bitcoin/bips/pull/1408&#34;&gt;https://github.com/bitcoin/bips/pull/1408&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;When accompanied by a standard for associating some data or right with&lt;br/&gt;such an identity, this allows the creation of non-fungible tokens (or&lt;br/&gt;semi-fungible tokens) whose ownership can be transferred by a bitcoin&lt;br/&gt;transaction.&lt;br/&gt;&lt;br/&gt;The proposed BIP doesn&amp;#39;t document any method for associating data or a&lt;br/&gt;right with an ordinal, but the &amp;#34;ord&amp;#34; tool defines &amp;#34;inscriptions&amp;#34; to fill&lt;br/&gt;this gap [0], providing a way of including mime-encoded data in a taproot&lt;br/&gt;witness. To make such an inscription, two transactions are required:&lt;br/&gt;one paying some sats to a special scriptPubKey that commits to the&lt;br/&gt;inscribed data, and a second that spends those sats to the owner of the&lt;br/&gt;newly inscribed ordinal, and in so doing revealing the full inscription.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://docs.ordinals.com/inscriptions.html&#34;&gt;https://docs.ordinals.com/inscriptions.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I think, however, that you can move inscriptions entirely off-chain. I&lt;br/&gt;wrote a little on this idea on twitter already [1], but after a bit more&lt;br/&gt;thought, I think pushing things even further off-chain would be plausible.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://twitter.com/ajtowns/status/1619554871166013441&#34;&gt;https://twitter.com/ajtowns/status/1619554871166013441&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;In particular, rather than looking at it as being the owner of the sats&lt;br/&gt;that inscribes some content on those sats (analogously to signing a $100&lt;br/&gt;bill [2]), you could look at it as saying &amp;#34;the owner of this thing is&lt;br/&gt;whoever owns this particular sat&amp;#34; (eg instead of &amp;#34;whoever owns this&lt;br/&gt;share certificate is a shareholder&amp;#34;, it&amp;#39;s &amp;#34;whoever owns the $1 bill with&lt;br/&gt;serial number X is a shareholder&amp;#34;).&lt;br/&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://www.espn.com/nfl/story/_/id/14375536/owner-100-bill-autograph-cleveland-browns-qb-johnny-manziel-getting-offers&#34;&gt;https://www.espn.com/nfl/story/_/id/14375536/owner-100-bill-autograph-cleveland-browns-qb-johnny-manziel-getting-offers&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Implementing that is fairly straightforward: you just need a protocol&lt;br/&gt;for creating an asset offchain and associating it with an ordinal --&lt;br/&gt;nothing needs to happen on-chain at all. That is, you can do something&lt;br/&gt;as simple as posting a single nostr message:&lt;br/&gt;&lt;br/&gt;  {&lt;br/&gt;    &amp;#34;pubkey&amp;#34;: &amp;lt;creator&amp;#39;s pubkey&amp;gt;&lt;br/&gt;    &amp;#34;kind&amp;#34;: 0,&lt;br/&gt;    &amp;#34;tags&amp;#34;: [&lt;br/&gt;      [&amp;#34;ord&amp;#34;, &amp;#34;txid:vout:sat&amp;#34;]&lt;br/&gt;    ],&lt;br/&gt;    &amp;#34;content&amp;#34;: [jpeg goes here],&lt;br/&gt;    &amp;#34;id&amp;#34;: &amp;lt;hash of the above&amp;gt;&lt;br/&gt;    &amp;#34;sig&amp;#34;: &amp;lt;signature of id by creator&amp;#39;s pubkey&amp;gt;&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;You can prove current ownership of the message by showing a custody&lt;br/&gt;chain, that is the transaction specified by &amp;#34;txid&amp;#34; in the &amp;#34;ord&amp;#34; tag,&lt;br/&gt;then every transaction that spent the given sat, until you get to one&lt;br/&gt;that&amp;#39;s still in the utxo set [3]. You don&amp;#39;t need to provide witness&lt;br/&gt;data or validate any of these tx&amp;#39;s signatures, as that is already&lt;br/&gt;implicit in that you end up at a tx in the utxo set. Just calculating&lt;br/&gt;the txids and comparing against the output containing the sat you&amp;#39;re&lt;br/&gt;interested in is sufficient.&lt;br/&gt;&lt;br/&gt;[3] If the satoshi was lost to fees at some point, you could continue to&lt;br/&gt;    follow ownership by including an entire block in the custody chain.&lt;br/&gt;    But seems better to just consider it as &amp;#34;abandoned&amp;#34; or &amp;#34;lost to the&lt;br/&gt;    public domain&amp;#34; at that point.&lt;br/&gt;&lt;br/&gt;This approach allows all the &amp;#34;inscription&amp;#34; data to be entirely off-chain,&lt;br/&gt;the only thing that requires a transaction on-chain is transferring&lt;br/&gt;ownership to someone else. That allows the NFT&amp;#39;s existance can be kept&lt;br/&gt;entirely private if desired; it also makes it cheap to create a new NFT&lt;br/&gt;(you don&amp;#39;t need to pay any on-chain fees at all); and it doesn&amp;#39;t impose&lt;br/&gt;an outsized overhead on people who aren&amp;#39;t interested in your inscriptions,&lt;br/&gt;but may be interested either in bitcoin per se, or in other inscriptions.&lt;br/&gt;&lt;br/&gt;For things that have real intrinsic value -- equity rights in a company,&lt;br/&gt;bragging rights for supporting an artist, etc -- this seems like it&amp;#39;s&lt;br/&gt;probably a viable approach: owners can &amp;#34;self-custody&amp;#34; all the information&lt;br/&gt;about the things they own without having to rely on third parties,&lt;br/&gt;transfers are no more censorable than any other bitcoin transaction&lt;br/&gt;(especially if the association of the NFT with some particular sat is&lt;br/&gt;not widely known), etc.&lt;br/&gt;&lt;br/&gt;The &amp;#34;inscription&amp;#34; approach might still be desirable for broadcasting&lt;br/&gt;information that might otherwise be subject to heavy censorship; presuming&lt;br/&gt;that the censoring entity isn&amp;#39;t also willing and able to censor bitcoin&lt;br/&gt;itself. It&amp;#39;s not clear that there&amp;#39;s any &amp;#34;rights&amp;#34; to be owned for such a&lt;br/&gt;case -- you can&amp;#39;t buy the right to be the person that first published&lt;br/&gt;it, and the point of widely broadcasting the information is so it&amp;#39;s&lt;br/&gt;not a secret only known to a few anymore. Also, claiming ownership of&lt;br/&gt;such information would presumably make you a target for the censor,&lt;br/&gt;even if just as an example for others. So I&amp;#39;m dubious of the value of&lt;br/&gt;associating an inscription with an ordinal for that use case.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s also possible that the perceived value of the NFT isn&amp;#39;t due to&lt;br/&gt;the inscription, but rather due to the scarcity of the blockspace it&lt;br/&gt;was inscribed in (eg [4]). This is different from Bitcoin&amp;#39;s scarcity&lt;br/&gt;-- by 2100 or so there&amp;#39;ll be a total of 2100T satoshis available,&lt;br/&gt;but in that same time there will only have been about 4T vbytes of&lt;br/&gt;blockspace available, and perhaps it could make sense to value spent&lt;br/&gt;vbytes proportionally, so 4 spent vbytes is worth 2100 sats. In that&lt;br/&gt;case if you spent 50kvb inscribing a jpeg, perhaps the &amp;#34;rights&amp;#34; to that&lt;br/&gt;jpeg should be worth the same as 50k/4*2100 sats or 0.26 BTC. Doesn&amp;#39;t&lt;br/&gt;seem like a sound argument to me -- there&amp;#39;s always more blockspace being&lt;br/&gt;created, by fewer and fewer sats being created, and ordinals are far more&lt;br/&gt;awkward to deal with, but I suppose it&amp;#39;s still conceivable, and people&lt;br/&gt;at least claim to believe it. If it were true, this argument suggests&lt;br/&gt;the price for blockspace today should be around 2488sat/vB (19.28MBTC /&lt;br/&gt;774700 MvB), rather than 1sat/vB.&lt;br/&gt;&lt;br/&gt;[4] &lt;a href=&#34;https://twitter.com/vnprc/status/1619876888687820801&#34;&gt;https://twitter.com/vnprc/status/1619876888687820801&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Anyway, comparisons to ordinal inscriptions aside, I think there&amp;#39;s&lt;br/&gt;another interesting point from all this.&lt;br/&gt;&lt;br/&gt;Presume you have a tool that implements the nostr ordinal assignment&lt;br/&gt;suggested above: that is, a small modification of the &amp;#34;ord&amp;#34; tool that&lt;br/&gt;can track a chain of custody for an ordinal specified in a nostr event&lt;br/&gt;like the above. That allows you to do NFTs completely unobservably --&lt;br/&gt;you don&amp;#39;t have to publish anything to the blockchain apart from ordinary&lt;br/&gt;looking transactions to transfer ownership of your NFT. To your benefit,&lt;br/&gt;that makes it hard for anyone to censor you; but to bitcoin more broadly,&lt;br/&gt;I think it means that the possibility of coloured bitcoins is largely&lt;br/&gt;unavoidable and simply something that must be dealt with, rather than&lt;br/&gt;something we should spend time trying to prevent/avoid. Compare with:&lt;br/&gt;&lt;br/&gt;&amp;gt; My personal, and possibly controversial, opinion is that colored coin&lt;br/&gt;&amp;gt; protocols have no business being on the Bitcoin chain, possibly beyond&lt;br/&gt;&amp;gt; committing to an occasional batched state update or so. Both because&lt;br/&gt;&amp;gt; there is little benefit for tokens with a trusted issuer already, and&lt;br/&gt;&amp;gt; because it competes with using Bitcoin for BTC - the token that pays&lt;br/&gt;&amp;gt; for its security (at least as long as the subsidy doesn&amp;#39;t run out).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, personal opinions are no reason to dictate what people should&lt;br/&gt;&amp;gt; or can use the chain for, but I do think it&amp;#39;s reason to voice hesitancy&lt;br/&gt;&amp;gt; to worsening the system&amp;#39;s scalability properties only to benefit what&lt;br/&gt;&amp;gt; I consider misguided use.&lt;br/&gt;&lt;br/&gt; -- &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019500.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019500.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this actually results in majorly misaligned incentives&lt;br/&gt;though: in the nostr-nfts-on-btc world, everyone is still optimising&lt;br/&gt;bitcoin transactions for the same thing -- transfer of value. It&amp;#39;s just&lt;br/&gt;that in some cases some sats are valued differently than others --&lt;br/&gt;perhaps my uninscribed sats are worth 0.025 cents each, but you have&lt;br/&gt;a particular inscribed sat that&amp;#39;s worth $100k. But we&amp;#39;re both dealing&lt;br/&gt;just spending utxos and creating new utxos, doing signatures and maybe&lt;br/&gt;some timelocks or hash reveals. And it&amp;#39;s always been possible that&lt;br/&gt;your transaction transferring $100k won&amp;#39;t get charged higher fees than&lt;br/&gt;my transfer of $50 -- we care about transaction size, not value after&lt;br/&gt;all. How much does it matter if your tx matters more to your because&lt;br/&gt;someone wants your particular sat, rather than what could happen today&lt;br/&gt;where you have a utxo with 4 BTC while my utxo only has 0.002 BTC?&lt;br/&gt;&lt;br/&gt;I think the only way to prevent that sort of NFT structure would be&lt;br/&gt;to have every transaction use fancy zero-knowledge proofs that make it&lt;br/&gt;impossible to associate who received bitcoin with who spent it -- *even&lt;br/&gt;if* both the sender and recipient were willing to cooperate to reveal&lt;br/&gt;that information. I think it would be hard to achieve that while still&lt;br/&gt;making it easy to audit bitcoin&amp;#39;s total supply, but I might be wrong.&lt;br/&gt;&lt;br/&gt;Note that off-chain colouring here means that someone can create an NFT&lt;br/&gt;that you don&amp;#39;t want it, and just assign it to a sat that&amp;#39;s already in your&lt;br/&gt;wallet. However, they can do this anyway, by first creating the NFT, then&lt;br/&gt;sending it to your wallet address. A difference though is that they could&lt;br/&gt;create an NFT and assign it to the same ordinal/sat as some existing NFT&lt;br/&gt;that you do value, at which point it&amp;#39;s (presumably) impossible to discard&lt;br/&gt;one without discarding both. But again, this is simply something they&lt;br/&gt;can do, just be writing a patch to ord and composing a nostr message;&lt;br/&gt;it&amp;#39;s not something you can actually prevent even if you dislike it.&lt;br/&gt;&lt;br/&gt;Particularly for semi-fungible tokens, this is perhaps inferior to&lt;br/&gt;Liquid&amp;#39;s multi-asset model -- here if you have a utxo with 1M sats, 500&lt;br/&gt;of which are inscribed to each represent rights to $1 worth of USDT,&lt;br/&gt;then rather than acting like a stable coin and being worth $500; it&amp;#39;s&lt;br/&gt;actually worth $500&#43;0.01BTC, which is more like $750, and changes as&lt;br/&gt;the value of bitcoin changes.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:19:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdmy799j537ecdgk4tfaunj3tg25kkn87ejzp6nsp6gtd600m2dzszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6qxeet</id>
    
      <title type="html">📅 Original date posted:2023-01-11 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdmy799j537ecdgk4tfaunj3tg25kkn87ejzp6nsp6gtd600m2dzszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k6qxeet" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxhy74uze9r3krv08t4ag4a44z4gv0pujkfdfegs7gvzpypfme7pggvjme7&#39;&gt;nevent1q…jme7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-11&lt;br/&gt;🗒️ Summary of this message: Discussion on optimizing witness scripts for Bitcoin transactions, including the use of OP_VAULT and pay-to-contract constructions for recovery paths.&lt;br/&gt;📝 Original message:On Tue, Jan 10, 2023 at 03:22:54PM -0500, James O&amp;#39;Beirne wrote:&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think that makes sense? With a general scheme, you&amp;#39;d only be&lt;br/&gt;&amp;gt; &amp;gt; bloating the witness data (perhaps including the witness script) not&lt;br/&gt;&amp;gt; &amp;gt; the scriptPubKey?&lt;br/&gt;&amp;gt; Sorry, sloppy language on my part. To be charitable, I&amp;#39;m talking about&lt;br/&gt;&amp;gt; the &amp;#34;figurative sPK,&amp;#34; which of course these days lives in the witness&lt;br/&gt;&amp;gt; for script-path-ish spends. Maybe the witness discount means that&lt;br/&gt;&amp;gt; &amp;#34;complicated&amp;#34; scripts aren&amp;#39;t as big a deal, depending on the actual&lt;br/&gt;&amp;gt; difference in raw script size.&lt;br/&gt;&lt;br/&gt;Sure. I think there&amp;#39;s three aspects that matter for the witness script:&lt;br/&gt;&lt;br/&gt; 1) it shouldn&amp;#39;t be long/costly to do things that are common and easy:&lt;br/&gt;    if you can express &amp;#34;OP_VAULT&amp;#34; in ~70 bytes, you shouldn&amp;#39;t have to&lt;br/&gt;    spend 1000 bytes to do so; if it can be cheap to validate, you&lt;br/&gt;    shouldn&amp;#39;t have to pay 100x markup in fees to use it. With the&lt;br/&gt;    exception of things that build up from basics (like&lt;br/&gt;    CAT/CHECKSIGFROMSTACK approaches), I think this is mostly fine&lt;br/&gt;    though.&lt;br/&gt;&lt;br/&gt; 2) once someone figures out a design, it should be easy to reuse;&lt;br/&gt;    but I think that&amp;#39;s not a big deal: you just write up a spec for&lt;br/&gt;    your script, and people use that in their different wallet software,&lt;br/&gt;    much like the specialised scripts for lightning HTLCs&lt;br/&gt;&lt;br/&gt; 3) primitives should be designed to be easy to safely build on and&lt;br/&gt;    scripts should be as easy as possible to analyse once written;&lt;br/&gt;    ie, we want things more like miniscript than &amp;#34;The story of Mel,&lt;br/&gt;    a Real Programmer&amp;#34;&lt;br/&gt;&lt;br/&gt;With some caveats (like that using the cold wallet xpub to scan the&lt;br/&gt;blockchain before you&amp;#39;ve frozen all your funds is dangerous), OP_VAULT&lt;br/&gt;seems really good on all those fronts, of course.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I think it might be better to use a pay-to-contract construction for&lt;br/&gt;&amp;gt; &amp;gt; the recovery path, rather than an empty witness.&lt;br/&gt;&amp;gt; So I guess the one advantage that what you&amp;#39;re proposing has over just&lt;br/&gt;&amp;gt; using a recovery-path key signature is that it&amp;#39;s all derivable from your&lt;br/&gt;&amp;gt; cold privkey; you don&amp;#39;t have to worry about accidentally losing the&lt;br/&gt;&amp;gt; recovery-path key.&lt;br/&gt;&amp;gt; Of course you&amp;#39;re still vulnerable to spurious sweeps if the&lt;br/&gt;&amp;gt; sha256(secret) value gets found out, which presumably you&amp;#39;d want in an&lt;br/&gt;&amp;gt; accessible cache to avoid touching the cold secret every time you want&lt;br/&gt;&amp;gt; to sweep.&lt;br/&gt;&lt;br/&gt;Sure, &amp;#34;sha256(secret)&amp;#34; itself needs to be semi-secret -- it allows anyone&lt;br/&gt;who knows it to freeze your funds, even if it doesn&amp;#39;t allow anyone to&lt;br/&gt;steal them. You could presumably do all the usual things to protect that&lt;br/&gt;secret: split it up with secret sharing; put it in a hardware wallet;&lt;br/&gt;keep it offline; etc.&lt;br/&gt;&lt;br/&gt;&amp;gt; What do you think about the idea of making the recovery-path&lt;br/&gt;&amp;gt; authorization behavior variable on a single byte flag preceding the 32&lt;br/&gt;&amp;gt; byte data push, as I mentioned in another post?&lt;br/&gt;&lt;br/&gt;] &amp;#34;if&lt;br/&gt;] &amp;lt;recovery-path-hash&amp;gt; is 32 bytes, treat it as it&amp;#39;s currently used. If it&amp;#39;s&lt;br/&gt;] 33 bytes, use the first byte as a parameter for how to interpret it.&amp;#34; To&lt;br/&gt;] start with, an extra prefix byte of 0x00 could mean &amp;#34;require a witness&lt;br/&gt;] satisfying the scriptPubKey that hashes to the remaining 32 bytes&amp;#34; in the&lt;br/&gt;] same way we do the unvault signing.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think 33 bytes would be enough? There isn&amp;#39;t really a way to&lt;br/&gt;commit to the recovery destination within the script? So I think you&amp;#39;d&lt;br/&gt;need &amp;#34;&amp;lt;32 byte recovery-path-hash&amp;gt;&amp;lt;n byte scriptPubKey&amp;gt;&amp;#34;&lt;br/&gt;&lt;br/&gt;Aside from that, my opinion&amp;#39;s one/all of:&lt;br/&gt;&lt;br/&gt;a) sounds fine&lt;br/&gt;&lt;br/&gt;b) maybe you could just always have it include a scriptPubKey? for the&lt;br/&gt;times when you just want &amp;#34;reveal the cold wallet preimage&amp;#34; just have&lt;br/&gt;the scriptPubKey be the single byte &amp;#34;OP_TRUE&amp;#34;; for the times when you&lt;br/&gt;it to be &amp;#34;reveal random preimage&amp;#34; you&amp;#39;d have it be the 22 byte &amp;#34;HASH160&lt;br/&gt;&amp;lt;hash160(sha256(secret))&amp;gt; EQUAL&amp;#34;?&lt;br/&gt;&lt;br/&gt;c) delegation to a script is a great idea, that&amp;#39;s come up multiple times&lt;br/&gt;(OP_EVAL, BIP117, graftroot) -- it&amp;#39;s probably better to have it&lt;br/&gt;available as a generic feature, than bolted on to particular features&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I think a generic OP_UNVAULT can be used to simulate OP_CTV: replace&lt;br/&gt;&amp;gt; &amp;gt; &amp;#34;&amp;lt;h&amp;gt; OP_CTV&amp;#34; with &amp;#34;&amp;lt;000..0&amp;gt; 0 &amp;lt;h&amp;gt; OP_UNVAULT&amp;#34;.&lt;br/&gt;&amp;gt; Yup, that&amp;#39;s an inefficient way of emulating CTV.&lt;br/&gt;&lt;br/&gt;Sure; I think it&amp;#39;s only interesting in establishing how powerful the&lt;br/&gt;construct is in the abstract. It&amp;#39;s not an exact match for CTV since it&lt;br/&gt;hashes some things differently.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t really think it&amp;#39;s necessarily that inefficient fwiw; &amp;#34;0 SHA256&lt;br/&gt;0 &amp;lt;h&amp;gt; UNVAULT&amp;#34; is only 3 more bytes than &amp;#34;&amp;lt;h&amp;gt; CTV&amp;#34;, could give you an&lt;br/&gt;unspendable recovery path, provided UNVAULT wants either a BIP341 tagged&lt;br/&gt;hash (which is what the implementation does, by the looks), or a HASH256&lt;br/&gt;for the recovery path.&lt;br/&gt;&lt;br/&gt;(Again, this assumes UNVAULT is available in script, and isn&amp;#39;t just a&lt;br/&gt;special scriptPubKey type)&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I think there&amp;#39;s maybe a cleverer way of batching / generalising&lt;br/&gt;&amp;gt; &amp;gt; checking that input/output amounts match.&lt;br/&gt;&amp;gt; &amp;gt; [...]&lt;br/&gt;&amp;gt; &amp;gt;  * set C = the sum of each output that has a vault tag with&lt;br/&gt;&amp;gt; &amp;gt;    #recovery=X&lt;br/&gt;&amp;gt; This would also need to take into account that the &amp;lt;spend-delay&amp;gt;s are&lt;br/&gt;&amp;gt; compatible, but your point is well taken.&lt;br/&gt;&lt;br/&gt;Sure, I guess output/UNVAULT delay &amp;gt;= input/VAULT delay would be&lt;br/&gt;sufficient for that.&lt;br/&gt;&lt;br/&gt;I guess having all that stuff exposed in the scriptPubKey would be&lt;br/&gt;slightly annoying for griefing -- you set your wallet delay to be 1008&lt;br/&gt;blocks, and someone sends to your vault with a 1007 block delay, or a&lt;br/&gt;6 block delay: does your wallet notice the tx? if it does, what do you&lt;br/&gt;do with those funds?&lt;br/&gt;&lt;br/&gt;Maybe that would be a(nother) good reason to hide the OP_VAULT side of&lt;br/&gt;things in taproot (or p2wsh): then you just have a (shorter) taproot&lt;br/&gt;sPK that encodes both things, and people normally don&amp;#39;t even have enough&lt;br/&gt;information to correctly tweak your sPK to have a different delay.&lt;br/&gt;&lt;br/&gt;&amp;gt; I can see what you&amp;#39;re saying about having more generic &amp;#34;group amounts by&lt;br/&gt;&amp;gt; compatible vault params, and then compare to similarly grouped outputs,&amp;#34;&lt;br/&gt;&lt;br/&gt;I mostly wrote that up because that&amp;#39;s what I imagined your batching&lt;br/&gt;doing before I&amp;#39;d finished reading...&lt;br/&gt;&lt;br/&gt;A big disadvantage of that approach compared to yours is that you have&lt;br/&gt;to analyse a potentially arbitrarily large transaction as a whole while&lt;br/&gt;validating each input -- this input uses recovery key XXX which output&amp;#39;s&lt;br/&gt;match; this input uses recovery key YYY; oh, this one uses XXX again;&lt;br/&gt;etc. With your approach, you only have to look at particular outputs.&lt;br/&gt;&lt;br/&gt;An advantage of that extra complexity is that you could combine operations&lt;br/&gt;from multiple different vaults into a single transaction, potentially&lt;br/&gt;along with fees or a coinjoin or whatever else. Maybe that would be&lt;br/&gt;interesting if this were something you could code in script via some&lt;br/&gt;generic opcodes; but here it would be extra complexity in consensus code,&lt;br/&gt;and it doesn&amp;#39;t seem like a good match for OP_VAULT&amp;#39;s design parameters.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:18:20&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2swuxg78qak5qfnd6csaqqlgdmny2m5zftx0chcxk9eaajp49d5gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8gt0uw</id>
    
      <title type="html">📅 Original date posted:2022-11-02 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2swuxg78qak5qfnd6csaqqlgdmny2m5zftx0chcxk9eaajp49d5gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8gt0uw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd56u6hdpjgszu6jey8c3gk0eyj9pqgecn9rr5pj5kkenvf0lj5hqsg2txv&#39;&gt;nevent1q…2txv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-11-02&lt;br/&gt;📝 Original message:On Mon, Oct 31, 2022 at 12:25:46PM -0400, Greg Sanders via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; For 0-conf services we have potential thieves who are willing&lt;br/&gt;&amp;gt; to *out-bid themselves* to have funds come back to themselves. It&amp;#39;s not a&lt;br/&gt;&amp;gt; &amp;#34;legitimate&amp;#34; use-case, but a rational one.&lt;br/&gt;&lt;br/&gt;I think that&amp;#39;s a huge oversimplification of &amp;#34;rational&amp;#34; -- otherwise&lt;br/&gt;you might as well say that deliberately pinning txs is also rational,&lt;br/&gt;because it allows the person doing the pinning to steal funds from their&lt;br/&gt;counterparty by forcing a timeout to expire.&lt;br/&gt;&lt;br/&gt;There&amp;#39;s no need for us as developers, or us as node operators, to support&lt;br/&gt;every use case that some individual might find rational at some point in&lt;br/&gt;time. After all, it might be individually rational for someone to want the&lt;br/&gt;subsidy to stop decreasing, or to include 8MB of transactions per block.&lt;br/&gt;&lt;br/&gt;Note that it&amp;#39;s also straightforwardly rational and incentive compatible&lt;br/&gt;for miners to not want this patch to be available, under the following&lt;br/&gt;scenario:&lt;br/&gt;&lt;br/&gt; - a significant number of on-chain txs are for zeroconf services&lt;br/&gt; - fee income would be reduced if zeroconf services went away&lt;br/&gt;   (both directly due to the absence of zeroconf payments, and by&lt;br/&gt;   reducing mempool pressure, reducing fee income from the on-chain txs&lt;br/&gt;   that remain)&lt;br/&gt; - miners adopting fullrbf would cause zeroconf services to go away,&lt;br/&gt;   (and won&amp;#39;t enable a comparable volume of new services that generates&lt;br/&gt;   comparable transaction volume)&lt;br/&gt; - including the option in core would make other miners adopting&lt;br/&gt;   fullrbf more likely&lt;br/&gt;&lt;br/&gt;I think the first three of those are fairly straightforward and objective,&lt;br/&gt;at least at this point in time. The last is just a risk; but without&lt;br/&gt;any counterbalancing benefit, why take it?&lt;br/&gt;&lt;br/&gt;Gaining a few thousand sats due to high feerate replacement txs from&lt;br/&gt;people exploiting zeroconf services for a few months before all those&lt;br/&gt;services shutdown doesn&amp;#39;t make up for the lost fee income over the months&lt;br/&gt;or years it might have otherwise taken people to naturally switch to&lt;br/&gt;some better alternative.&lt;br/&gt;&lt;br/&gt;Even if fullrbf worked for preventing pinning that likely doesn&amp;#39;t directly&lt;br/&gt;result in much additional fee income: once you know that pinning doesn&amp;#39;t&lt;br/&gt;work, you just don&amp;#39;t try it, which means there&amp;#39;s no opportunity for&lt;br/&gt;miners to profit from a bidding war from the pinners counterparties&lt;br/&gt;repeatedly RBFing their preferred tx to get it mined.&lt;br/&gt;&lt;br/&gt;That also excludes second order risks: if you can&amp;#39;t do zeroconf with BTC&lt;br/&gt;anymore, do you switch to ERC20 tokens, and then trade your BTC savings&lt;br/&gt;for ETH or USDT, and do enough people do that to lower the price of BTC?&lt;br/&gt;If investors see BTC being less used for payments, does that lower their&lt;br/&gt;confidence in bitcoin&amp;#39;s future, and cause them to sell?&lt;br/&gt;&lt;br/&gt;&amp;gt; Removing a&lt;br/&gt;&amp;gt; quite-likely-incentive-compatible option from the software just encourages&lt;br/&gt;&amp;gt; miners to adopt an additional patch&lt;br/&gt;&lt;br/&gt;Why shouldn&amp;#39;t miners adopt an additional patch if they want some unusual&lt;br/&gt;functionality?&lt;br/&gt;&lt;br/&gt;Don&amp;#39;t we want/expect miners to have the ability to change the code in&lt;br/&gt;meaningful ways, at a minimum to be able to cope with the scenario where&lt;br/&gt;core somehow gets coopted and releases bad code, or to be able to deal&lt;br/&gt;with the case where an emergency patch is needed?&lt;br/&gt;&lt;br/&gt;Is there any evidence miners even want this option? Peter suggested&lt;br/&gt;that some non-signalling replacements were being mined already [0], but&lt;br/&gt;as far as I can see [1] all of those are simply due to the transaction&lt;br/&gt;they replaced not having propagated in the first place (or having been&lt;br/&gt;evicted somehow? hard to tell without any data on the original tx).&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-October/021012.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-October/021012.html&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1292692367&#34;&gt;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1292692367&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; 2) Forcing miners to honor fees left on the table with respect to 0-conf,&lt;br/&gt;&amp;gt; or forcing them to run a custom patchset to go around it, is a step&lt;br/&gt;&amp;gt; backwards.&lt;br/&gt;&lt;br/&gt;As you already acknowledged, any miner that wants this behaviour can just&lt;br/&gt;pick up the patch (or could run Knots, which already has the feature&lt;br/&gt;enabled by default). It&amp;#39;s simply false to say miners are being forced&lt;br/&gt;to do anything, no matter what we do here. &lt;br/&gt;&lt;br/&gt;If the direction you&amp;#39;re facing is one where you&amp;#39;re moving towards making&lt;br/&gt;life easier for people to commit fraud, and driving away businesses&lt;br/&gt;that aren&amp;#39;t doing anyone harm, without achieving anything much else;&lt;br/&gt;then taking a step backwards seems like a sensible thing to do to me.&lt;br/&gt;&lt;br/&gt;(I remain optimistic about coming up with better RBF policy, and willing&lt;br/&gt;to be gung ho about everyone switching over to it even if it does kill&lt;br/&gt;off zeroconf, provided it actually does some good and we give people 6&lt;br/&gt;months or more notice that it&amp;#39;s definitely happening and what exactly&lt;br/&gt;the new rules will be, though)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:16:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp0ycc3pnje06ee0nv60fcnn44fx98hm9n5yj4tlu0l252kexkrlqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2km747ug</id>
    
      <title type="html">📅 Original date posted:2022-10-29 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp0ycc3pnje06ee0nv60fcnn44fx98hm9n5yj4tlu0l252kexkrlqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2km747ug" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp0ve3m55ymnpel4vqycga49ytk4fkjd4lvqlehfu73m5rpachzug8vfyyu&#39;&gt;nevent1q…fyyu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-29&lt;br/&gt;📝 Original message:On Fri, Oct 28, 2022 at 09:45:09PM -1000, David A. Harding via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; I think this might be understating the problem.  A 95% chance of having&lt;br/&gt;&amp;gt; an outbound peer accept your tx conversely implies 1 in 20 payments will&lt;br/&gt;&amp;gt; fail to propagate on their initial broadcast.&lt;br/&gt;&lt;br/&gt;Whether that&amp;#39;s terrible or not depends on how easy it is to retry (and how&lt;br/&gt;likely the retry is to succeed) after a failure -- if a TCP packet fails,&lt;br/&gt;it just gets automatically resent, and if that succeeds, there&amp;#39;s a little&lt;br/&gt;lag, but your connection is still usable. I think it&amp;#39;s *conceivable* that&lt;br/&gt;a 5% failure rate could be detectable and automatically rectified. Not&lt;br/&gt;that I have a good idea how you&amp;#39;d actually do that, in a way that&amp;#39;s&lt;br/&gt;efficient/private/decentralised...&lt;br/&gt;&lt;br/&gt;&amp;gt; Some napkin math: there are about 250,000 transactions a day; if&lt;br/&gt;&amp;gt; we round that up to 100 million a year and assume we only want one&lt;br/&gt;&amp;gt; transaction per year to fail to initially propagate on a network where&lt;br/&gt;&amp;gt; 30% of nodes have adopted a more permissive policy, lightweight clients&lt;br/&gt;&amp;gt; will need to connect to over 50 randomly selected nodes.[1]  &lt;br/&gt;&lt;br/&gt;A target failure probability of 1-in-1e8 means:&lt;br/&gt;&lt;br/&gt; * with 8 connections, you need 90% of the network to support your txs&lt;br/&gt; * with 12 connections, you need ~79%&lt;br/&gt; * with 24 connections (eg everyone running a long-lived node is&lt;br/&gt;   listening, so long lived nodes make 12 outbound and receive about&lt;br/&gt;   ~12 inbound; shortlived nodes just do 24 outbound), you need ~54%&lt;br/&gt;&lt;br/&gt;So with that success target, and no preferential peering, you need&lt;br/&gt;a majority of listening nodes to support your tx&amp;#39;s features in most&lt;br/&gt;reasonable scenarios, I think.&lt;br/&gt;&lt;br/&gt;&amp;gt; For a more&lt;br/&gt;&amp;gt; permissive policy only adopted by 10% of nodes, the lightweight client&lt;br/&gt;&amp;gt; needs to connect to almost 150 nodes.&lt;br/&gt;&lt;br/&gt;I get 175 connections needed for that scenario; or 153 with a target&lt;br/&gt;failure rate of 1-in-10-million.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:16:02&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszpgggmq2jmtf3y97da2kf6x02vepn3naent39cnd5sejnjsclhwszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kpwljq8</id>
    
      <title type="html">📅 Original date posted:2022-10-30 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszpgggmq2jmtf3y97da2kf6x02vepn3naent39cnd5sejnjsclhwszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kpwljq8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgt9qrz6uqaswmdp8pfajrfkglnxphhnsjwt7zvu7x50t79dlkewsy00m4l&#39;&gt;nevent1q…0m4l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-30&lt;br/&gt;📝 Original message:On Thu, Oct 27, 2022 at 09:29:47PM &#43;0100, Antoine Riard via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Let&amp;#39;s take the contra.&lt;br/&gt;&lt;br/&gt;(I don&amp;#39;t think I know that phrase? Is it like &amp;#34;play devil&amp;#39;s advocate&amp;#34;?)&lt;br/&gt;&lt;br/&gt;&amp;gt; I would say the current post describes the state of Bitcoin Core and&lt;br/&gt;&amp;gt; beyond policy&lt;br/&gt;&amp;gt; rules with a high-degree of exhaustivity and completeness, though itt what&lt;br/&gt;&amp;gt; is, mostly a description. While I think it ends with a set of&lt;br/&gt;&amp;gt; recommendations&lt;br/&gt;&lt;br/&gt;It was only intended as a description, not a recommendation for anything.&lt;br/&gt;&lt;br/&gt;At this point, the only thing I think I could honestly recommend&lt;br/&gt;that doesn&amp;#39;t seem like it comes with massive downsides, is for core to&lt;br/&gt;recommend and implement a particular mempool policy, and only have options&lt;br/&gt;that either make it feasible to scale that policy to different hardware&lt;br/&gt;limitations, and provide options that users can activate en-masse if it&lt;br/&gt;turns out people are doing crazy things in the mempool (eg, a new policy&lt;br/&gt;turns out to be ill-conceived, and it&amp;#39;s better to revert to a previous&lt;br/&gt;policy; or a potential spam vector gets exploited at scale).&lt;br/&gt;&lt;br/&gt;&amp;gt; What should be actually the design goals and&lt;br/&gt;&amp;gt; principles of Core&amp;#39;s transaction-relay propagation rules&lt;br/&gt;&amp;gt; of which mempool accepts ones is a subset?&lt;br/&gt;&lt;br/&gt;I think the goals of mempool/relay policy are _really_ simple; namely:&lt;br/&gt;&lt;br/&gt; * relay transactions from users to all potential miners, so that&lt;br/&gt;   non-mining nodes don&amp;#39;t have to directly contact miners to announce&lt;br/&gt;   their tx, both for efficiency (your tx can appear in the next block&lt;br/&gt;   anyone mines, rather than just the next block you mine) and privacy&lt;br/&gt;   (so that miners don&amp;#39;t know who a transaction belongs to, so that&lt;br/&gt;   users don&amp;#39;t have to know who miners are, and so there&amp;#39;s no/minimal&lt;br/&gt;   correlation between who proposed a tx and who mined the block it&lt;br/&gt;   appears in)&lt;br/&gt;&lt;br/&gt; * having most of the data that makes up the next block pre-validated&lt;br/&gt;   and pre-distributed throughout the network, so that block validation&lt;br/&gt;   and relay is much more efficient&lt;br/&gt;&lt;br/&gt;&amp;gt; By such design goals, I&amp;#39;m&lt;br/&gt;&amp;gt; thinking either, a qualitative framework, like attacks game for a concrete&lt;br/&gt;&amp;gt; application (&amp;#34;Can we prevent pinning against multi-party Coinjoin ?&amp;#34;).&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think that even makes sense as a question at that level: you can&lt;br/&gt;only ask questions like that if you already have known mempool policies&lt;br/&gt;across the majority of nodes and miners. If you don&amp;#39;t, you have to allow&lt;br/&gt;for the possibility that 99% of hashrate is receiving private blacklists&lt;br/&gt;from OFAC and that one of your coinjoin counterparties is on that list,&lt;br/&gt;eg, and at that point, I don&amp;#39;t think pinning is even conceivably solvable.&lt;br/&gt;&lt;br/&gt;&amp;gt; I believe we would come up with a&lt;br/&gt;&amp;gt; second-order observation. That we might not be able to satisfy every&lt;br/&gt;&amp;gt; use-case with the standard set of policy rules. E.g, a contracting protocol&lt;br/&gt;&amp;gt; could look for package size beyond the upper bound anti-Dos limit.&lt;br/&gt;&lt;br/&gt;One reason that limit is in place is that it the larger the tx is&lt;br/&gt;compared to the block limit, the more likely you are to hit corner cases&lt;br/&gt;where greedily filling a block with the highest fee ratex txs first&lt;br/&gt;is significantly suboptimal. That might mean, eg, that there&amp;#39;s 410kvB&lt;br/&gt;of higher fee rate txs than your 600kvB large package, and that your&lt;br/&gt;stuff gets delayed, because the miner isn&amp;#39;t clever enough to realise&lt;br/&gt;dropping the 10kvB is worthwhile. Or it might mean that your tx gets&lt;br/&gt;delayed because the complicated analysis takes a minute to run and a&lt;br/&gt;block was mined using the simpler algorithm first. Or it might mean that&lt;br/&gt;some mining startup with clever proprietary software that can calculate&lt;br/&gt;this stuff quickly make substantially more profit than everyone else,&lt;br/&gt;so they start dominating block generation, despite the fact that they&amp;#39;re&lt;br/&gt;censoring transactions due to OFAC rules.&lt;br/&gt;&lt;br/&gt;&amp;gt; Or even the&lt;br/&gt;&amp;gt; global ressources offered by the network of full-nodes are not high enough&lt;br/&gt;&amp;gt; to handle some application event.&lt;br/&gt;&lt;br/&gt;Blocks are limited on average to 4MB-per-10-minutes (6.7kB/second),&lt;br/&gt;and applications certainly shouldn&amp;#39;t be being designed to only work if&lt;br/&gt;they can monopolise the entirety of the next few blocks. I don&amp;#39;t think&lt;br/&gt;it makes any sense to imagine application events in Bitcoin that exceed&lt;br/&gt;the capacity of a random full node. And equally, even if you&amp;#39;re talking&lt;br/&gt;about some other blockchain with higher capacity; I don&amp;#39;t really think&lt;br/&gt;it makes sense to call it a &amp;#34;full&amp;#34; node if it can&amp;#39;t actually cope with&lt;br/&gt;the demands placed on it by any application that works on that network.&lt;br/&gt;&lt;br/&gt;&amp;gt; E.g a Lightning Service Provider doing a&lt;br/&gt;&amp;gt; liquidity maintenance round of all its counterparties, and as such&lt;br/&gt;&amp;gt; force-closing and broadcasting more transactions than can be handled at the&lt;br/&gt;&amp;gt; transaction-relay layer due to default MAX_PEER_TX_ANNOUNCEMENTS value.&lt;br/&gt;&lt;br/&gt;MAX_PEER_TX_ANNOUNCEMENTS is 5000 txs, and it&amp;#39;s per-peer. If you&amp;#39;re an&lt;br/&gt;LSP that&amp;#39;s doing that much work, it seems likely that you&amp;#39;d at least&lt;br/&gt;be running a long-lived listening node, so likely have 100&#43; peers, and&lt;br/&gt;could conceivably simultaneously announce 500k txs distributed across&lt;br/&gt;them, which at 130vB each (1-taproot-in, 2-p2wpkh out, which I think is&lt;br/&gt;pretty minimal) adds up to 65 blocks worth of transactions. And then,&lt;br/&gt;you could run more than one node, as well.&lt;br/&gt;&lt;br/&gt;Your real limitation is likely that most nodes on the network&lt;br/&gt;will only relay your txs onwards at an average rate of ~7/second&lt;br/&gt;(INVENTORY_BROADCAST_PER_SECOND), so even 5000 txs will likely take over&lt;br/&gt;700s to propagate anyway.&lt;br/&gt;&lt;br/&gt;&amp;gt; My personal take on those subjects, we might have to realize we&amp;#39;re facing&lt;br/&gt;&amp;gt; an heterogeneity of Bitcoin applications and use-cases [1].&lt;br/&gt;&lt;br/&gt;Sure; but that&amp;#39;s why you make your policy generic, rather than having&lt;br/&gt;to introduce a new, different policy targeted at each new use case.&lt;br/&gt;&lt;br/&gt;&amp;gt; And this sounds&lt;br/&gt;&amp;gt; like a long-term upward trend, akin to the history of the Internet: mail&lt;br/&gt;&amp;gt; clients, web browser, streaming applications, etc, all with different&lt;br/&gt;&amp;gt; service-level requirements in terms of latency, jitters and bandwidth.&lt;br/&gt;&lt;br/&gt;Back in the mid/late 90s, people argued that real-time communication,&lt;br/&gt;(like audio chat, let alone streaming video) wasn&amp;#39;t suitable for IP,&lt;br/&gt;but would require a different network like ATM where dedicated circuits&lt;br/&gt;were established between the sender and recipient to avoid latency,&lt;br/&gt;jitter and bandwidth competition. Turns out that separate networks&lt;br/&gt;weren&amp;#39;t optimal for that.&lt;br/&gt;&lt;br/&gt;&amp;gt; To put it simply, some advanced Bitcoin&lt;br/&gt;&amp;gt; applications might have to outgrow the &amp;#34;mempool policy rules&amp;#34; game,&lt;br/&gt;&lt;br/&gt;I think if you stick to the fundamentals -- that relay/mempool is about&lt;br/&gt;getting transactions to miners and widely preseeding the contents of&lt;br/&gt;whatever the next block will be -- then it&amp;#39;s pretty unlikely that any&lt;br/&gt;Bitcoin application will outgrow the mempool policy game.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think this has been historically the case with&lt;br/&gt;&amp;gt; some miners deciding to join FIBER, to improve their view of mined blocks.&lt;br/&gt;&lt;br/&gt;FIBRE (it doesn&amp;#39;t use the US spelling) is a speedup on top of compact&lt;br/&gt;block relay -- it still gets you exactly the same data if you don&amp;#39;t use,&lt;br/&gt;it&amp;#39;s just everything is slightly faster if you do. Even better, if you&lt;br/&gt;get a block via FIBRE, then you relay it on to your peers over regular&lt;br/&gt;p2p, helping them get it faster too.&lt;br/&gt;&lt;br/&gt;Doing something similar with mempool txs -- having some high bandwidth&lt;br/&gt;overlay network where the edges then feed txs back into the main p2p&lt;br/&gt;network at a slower rate that filters out spam or whatever -- would&lt;br/&gt;probably likewise be a fine addition to bitcoin, provided it had the&lt;br/&gt;same policy rules as regular bitcoin nodes employ for tx relay. If it&lt;br/&gt;had different ones, it would become a signficant centralisation risk: app&lt;br/&gt;developers who make use of the different rules would need to comply with&lt;br/&gt;the overlay networks ToS to avoid getting banned, and miners would need&lt;br/&gt;to subscribe to the feed to avoid missing out on txs and thus fee income.&lt;br/&gt;&lt;br/&gt;&amp;gt; What I&amp;#39;m expressing is a long-term perspective, and we might be too early&lt;br/&gt;&amp;gt; in the evolutionary process that is Bitcoin Core development to abandon yet&lt;br/&gt;&amp;gt; the &amp;#34;one-size-fits-all&amp;#34; policy rules conception that I understand from&lt;br/&gt;&amp;gt; your post.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think &amp;#34;one-size-fits-all&amp;#34; is a principle at all; I think&lt;br/&gt;decentralisation/censorship-resistance, privacy, and efficiency are the&lt;br/&gt;fundamental principles. As far as I can see, a one-size-fits-all approach&lt;br/&gt;(or, more precisely, an approach where &amp;gt;90% of the network converges to&lt;br/&gt;the same set of rules) is far better at achieving those principles than&lt;br/&gt;a heterogenous policy approach.&lt;br/&gt;&lt;br/&gt;&amp;gt; After exposure and exploration of more Bitcoin use-cases and applications,&lt;br/&gt;&amp;gt; and even among the different requirement among types of use-cases nodes&lt;br/&gt;&amp;gt; (e.g LN mobile vs LSP), I believe more heterogeneity in the policy rules&lt;br/&gt;&amp;gt; usage makes more sense&lt;br/&gt;&lt;br/&gt;I think when you say &amp;#34;more heterogeneity&amp;#34; what you&amp;#39;re actually assuming&lt;br/&gt;is that miners will implement a superset of all those policies, so that&lt;br/&gt;if *any* node on the network accepts a tx X, *every* miner will also&lt;br/&gt;accept a tx X, with the only exception being if there&amp;#39;s some conflicting&lt;br/&gt;tx Y that allows the miner to collect more fees.&lt;br/&gt;&lt;br/&gt;But that&amp;#39;s not really a heterogenous policy: in that case all miners&lt;br/&gt;are employing exactly the same policy.&lt;br/&gt;&lt;br/&gt;In that scenario, I don&amp;#39;t think you&amp;#39;ll end up with nodes running&lt;br/&gt;heteregenous policies either: part of the point of having mempool&lt;br/&gt;policies is to predict the next block, so if all miners really do have&lt;br/&gt;a common policy, it makes sense for nodes to have the same policy. The&lt;br/&gt;only potential difference is miners might be willing to dedicate more&lt;br/&gt;resources, so might set some knobs related to memory/bandwidth/cpu&lt;br/&gt;consumption differently.&lt;br/&gt;&lt;br/&gt;I think what you&amp;#39;re actually assuming is that this scenario will mean&lt;br/&gt;that miners will quickly expand their shared policy to accept *any*&lt;br/&gt;set of txs that are accepted by a small minority of relay nodes: after&lt;br/&gt;all, if there are some txs out there that pay fees, why wouldn&amp;#39;t miners&lt;br/&gt;want to include them? That&amp;#39;s what incentive compatible means, right? And&lt;br/&gt;that&amp;#39;s great from a protocol reasearch point-of-view: it allows you to&lt;br/&gt;handwave away people complaining that your idea is bad -- by assumption,&lt;br/&gt;all you need to do is deploy it, and it immediately starts working,&lt;br/&gt;without anyone else needing to adopt it.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think that&amp;#39;s actually a realistic assumption though: first,&lt;br/&gt;updating miners&amp;#39; policy rules requires updated software to be tested&lt;br/&gt;and deployed, so isn&amp;#39;t trivial enough that it should be handwaved away,&lt;br/&gt;second, as in the &amp;#34;big packages&amp;#34; example above, constructing an efficient&lt;br/&gt;block becomes harder the more mempool rules you throw away, so even if&lt;br/&gt;there are txs violating those rules that are offering extra fees, they&lt;br/&gt;may not actually cover the extra costs to generate a block when you&amp;#39;re&lt;br/&gt;no longer able to rely on those rules to reduce the complexity of the&lt;br/&gt;problem space.&lt;br/&gt;&lt;br/&gt;Note also that &amp;#34;relay nodes will want to use the same policy as mining&lt;br/&gt;nodes&amp;#34; goes both ways -- if that doesn&amp;#39;t happen, and compact block&lt;br/&gt;relay requires an extra round trip to reconstruct the block, miners&amp;#39;&lt;br/&gt;blocks won&amp;#39;t relay as quickly, and they&amp;#39;ll have an increased orphan rate.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:16:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsy4mf75etjdmru8hvwus3yygv56kfp75z69vffntt5z4u58getvvqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kp2ukwm</id>
    
      <title type="html">📅 Original date posted:2022-10-27 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy4mf75etjdmru8hvwus3yygv56kfp75z69vffntt5z4u58getvvqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kp2ukwm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrmccyhsucnzx7elt25ae6yqzvxqu7ramnpszltx0gs6v8lwxxwygljhxyw&#39;&gt;nevent1q…hxyw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-27&lt;br/&gt;📝 Original message:On Thu, Oct 27, 2022 at 01:36:47PM &#43;0100, Gloria Zhao wrote:&lt;br/&gt;&amp;gt; &amp;gt; The cutoff for that is probably something like &amp;#34;do 30% of listening&lt;br/&gt;&amp;gt; &amp;gt; nodes have a compatible policy&amp;#34;? If they do, then you&amp;#39;ll have about a&lt;br/&gt;&amp;gt; &amp;gt; 95% chance of having at least one of your outbound peers accept your tx,&lt;br/&gt;&amp;gt; &amp;gt; just by random chance.&lt;br/&gt;&amp;gt; Yes, in most cases, whether Bitcoin Core is restricting or loosening&lt;br/&gt;&amp;gt; policy, the user in question is fine as long as they have a path from their&lt;br/&gt;&amp;gt; node to a miner that will accept it. This is the case for something like&lt;br/&gt;&amp;gt; -datacarriersize if the use case is putting stuff into OP_RETURN outputs,&lt;br/&gt;&amp;gt; or if they&amp;#39;re LN and using CPFP carveout, v3, package relay, etc.&lt;br/&gt;&lt;br/&gt;&amp;gt; But&lt;br/&gt;&amp;gt; replacement is not only a question of &amp;#34;will my transaction propagate&amp;#34; but&lt;br/&gt;&amp;gt; also, &amp;#34;will someone else&amp;#39;s transaction propagate, invalidating mine&amp;#34; or, in&lt;br/&gt;&amp;gt; other words, &amp;#34;can I prevent someone else&amp;#39;s transaction from propagating.&amp;#34;&lt;br/&gt;&lt;br/&gt;&amp;#34;Can I prevent someone else&amp;#39;s transaction from propagating&amp;#34; is almost&lt;br/&gt;the entirety of the question with -datacarrier, -datacarriersize and&lt;br/&gt;-permitbaremultisig though: &amp;#34;we&amp;#34; don&amp;#39;t want people to spam the utxo&lt;br/&gt;set or the blockchain with lots of data (cf BSV&amp;#39;s gigabytes worth of&lt;br/&gt;dog pictures [0]), so for the people who are going to find some way&lt;br/&gt;of putting data in we&amp;#39;d like to encourage them to make it small, and&lt;br/&gt;do it in a way that&amp;#39;s prunable and doesn&amp;#39;t bloat the utxo set, whose&lt;br/&gt;size matters even more than the overall blockchain&amp;#39;s size does. As I&lt;br/&gt;understand it, people were doing that by creating bare multisig utxos,&lt;br/&gt;ie a bare (non-p2sh) scriptPubKey that perhaps looks like:&lt;br/&gt;&lt;br/&gt;  1 my_key data1 data2 data3 data4 data5 5 CHECKMULTISIG&lt;br/&gt;&lt;br/&gt;which is &amp;#34;bad&amp;#34; in two ways: you&amp;#39;re only committing to the data, so why&lt;br/&gt;not save 128 bytes by doing hash(data1 data2 data3 data4 data5) instead;&lt;br/&gt;and even more so, that data is only interesting to you, not everyone else,&lt;br/&gt;so why not do it in a way that doesn&amp;#39;t bloat the utxo set, which we want&lt;br/&gt;to keep small so that it&amp;#39;s easier to efficiently look up potential spends.&lt;br/&gt;&lt;br/&gt;Hence the -datacarriersize limitation that limits you to about 2.5&lt;br/&gt;&amp;#34;dataN&amp;#34; entries per tx (&amp;#34;we&amp;#39;ll prevent your tx from propagating if you&lt;br/&gt;do much more than publish a hash&amp;#34;) and hence at least the potential for&lt;br/&gt;doing the same for baremultisig in general.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://twitter.com/bsvdata/status/1427866510035324936&#34;&gt;https://twitter.com/bsvdata/status/1427866510035324936&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; A&lt;br/&gt;&amp;gt; zeroconf user relies on there *not* being a path from someone else&amp;#39;s full&lt;br/&gt;&amp;gt; RBF node to a full RBF miner. This is why I think RBF is so controversial&lt;br/&gt;&amp;gt; in general,&lt;br/&gt;&lt;br/&gt;Yes; but I think it&amp;#39;s also true to say that this is why *zeroconf* is as&lt;br/&gt;controversial as it is.&lt;br/&gt;&lt;br/&gt;Likewise OP_RETURN has had its own &amp;#34;controversies&amp;#34; to some extent, too:&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://blog.bitmex.com/dapps-or-only-bitcoin-transactions-the-2014-debate/&#34;&gt;https://blog.bitmex.com/dapps-or-only-bitcoin-transactions-the-2014-debate/&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/3715&#34;&gt;https://github.com/bitcoin/bitcoin/pull/3715&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/3939&#34;&gt;https://github.com/bitcoin/bitcoin/pull/3939&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; why -mempoolfullrbf on someone else&amp;#39;s node is considered more&lt;br/&gt;&amp;gt; significant than another policy option, and why full RBF shouldn&amp;#39;t be&lt;br/&gt;&amp;gt; compared with something like datacarriersize.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s definitely a different scenario: unexpected RBF can cause you to&lt;br/&gt;have less money than you expected; whereas more OP_RETURN data just&lt;br/&gt;bloats the blockchain, and losing money that you thought was yours is&lt;br/&gt;definitely more painful than more spam.&lt;br/&gt;&lt;br/&gt;But while the level of pain is different; I don&amp;#39;t think the mechanism is:&lt;br/&gt;whether you&amp;#39;re trying to preserve zeroconf or prevent utxo set spam,&lt;br/&gt;you&amp;#39;re still relying on a vast majority of nodes working together to&lt;br/&gt;prevent even a small minority of hashpower from doing &amp;#34;bad&amp;#34; things, with&lt;br/&gt;no cryptographic assurances that will continue to work well or at all.&lt;br/&gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think past patterns can be easily applied here,&lt;br/&gt;&lt;br/&gt;I mean, technically they trivially could? We *could* roll out support for&lt;br/&gt;full RBF in exactly the same way we rolled out support for opt-in RBF:&lt;br/&gt;making it the default for all nodes, but supplying an option that node&lt;br/&gt;operators can use to disable the feature for seven releases / ~4 years:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://bitcoin.org/en/release/v0.12.0#opt-in-replace-by-fee-transactions&#34;&gt;https://bitcoin.org/en/release/v0.12.0#opt-in-replace-by-fee-transactions&lt;/a&gt;&lt;br/&gt;&lt;a href=&#34;https://bitcoin.org/en/release/v0.19.0.1#deprecated-or-removed-configuration-options&#34;&gt;https://bitcoin.org/en/release/v0.19.0.1#deprecated-or-removed-configuration-options&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;If we don&amp;#39;t want to do that immediately, but also want to make a definite&lt;br/&gt;move forward, then we could:&lt;br/&gt;&lt;br/&gt; * just say that, and then keep our word about it&lt;br/&gt; * keep the feature in master, but remove it in 24.x&lt;br/&gt; * put a time delay on the feature so that it doesn&amp;#39;t happen immediately&lt;br/&gt;   but is locked in in the code for whenever we are ready to do it&lt;br/&gt;&lt;br/&gt;&amp;gt; and I don&amp;#39;t think this necessarily shows a&lt;br/&gt;&amp;gt; different &amp;#34;direction&amp;#34; in thinking about mempool policy in general.&lt;br/&gt;&lt;br/&gt;If we&amp;#39;re not applying past patterns, then this is a different direction&lt;br/&gt;in how we&amp;#39;re thinking about things than what we did in the past.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s not necessarily a bad thing -- maybe we should be thinking&lt;br/&gt;differently; but I don&amp;#39;t see how you can honestly dispute it: those are&lt;br/&gt;just two ways of saying the exact same thing.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:15:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq8627aemvaxs3gd8qwqhu98uptwrdu6ek3u0gczad98hpefa2x6szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3l0pfj</id>
    
      <title type="html">📅 Original date posted:2022-10-26 📝 Original message:Hi *, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq8627aemvaxs3gd8qwqhu98uptwrdu6ek3u0gczad98hpefa2x6szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3l0pfj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs89eq9mua247h6k9m9q896nm56kldnlx3lwcwaxylp8ht77jwpl9gusrkls&#39;&gt;nevent1q…rkls&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-26&lt;br/&gt;📝 Original message:Hi *,&lt;br/&gt;&lt;br/&gt;TLDR: Yes, this post is too long, and there&amp;#39;s no TLDR. If it&amp;#39;s any&lt;br/&gt;consolation, it took longer to write than it does to read?&lt;br/&gt;&lt;br/&gt;On Tue, Jun 15, 2021 at 12:55:14PM -0400, Antoine Riard via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Subject: Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0&lt;br/&gt;&amp;gt; I&amp;#39;m writing to propose deprecation of opt-in RBF in favor of full-RBF&lt;br/&gt;&lt;br/&gt;&amp;gt; If there is ecosystem agreement on switching to full-RBF, but 0.24 sounds&lt;br/&gt;&amp;gt; too early, let&amp;#39;s defer it to 0.25 or 0.26. I don&amp;#39;t think Core has a&lt;br/&gt;&amp;gt; consistent deprecation process w.r.t to policy rules heavily relied-on by&lt;br/&gt;&amp;gt; Bitcoin users, if we do so let sets a precedent satisfying as many folks as&lt;br/&gt;&amp;gt; we can.&lt;br/&gt;&lt;br/&gt;One precedent that seems to be being set here, which to me seems fairly&lt;br/&gt;novel for bitcoin core, is that we&amp;#39;re about to start supporting and&lt;br/&gt;encouraging nodes to have meaningfully different mempool policies. From&lt;br/&gt;what I&amp;#39;ve seen, the baseline expectation has always been that while&lt;br/&gt;certainly mempools can and will differ, policies will be largely the same:&lt;br/&gt;&lt;br/&gt;  Firstly, there is no &amp;#34;the mempool&amp;#34;. There is no global mempool. Rather&lt;br/&gt;  each node maintains its own mempool and accepts and rejects transaction&lt;br/&gt;  to that mempool using their own internal policies. Most nodes have&lt;br/&gt;  the same policies, but due to different start times, relay delays,&lt;br/&gt;  and other factors, not every node has the same mempool, although they&lt;br/&gt;  may be very similar.&lt;br/&gt;&lt;br/&gt;  - &lt;a href=&#34;https://bitcoin.stackexchange.com/questions/98585/how-to-find-if-two-transactions-in-mempool-are-conflicting&#34;&gt;https://bitcoin.stackexchange.com/questions/98585/how-to-find-if-two-transactions-in-mempool-are-conflicting&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Up until now, the differences between node policies supported by different&lt;br/&gt;nodes running core have been quite small, with essentially the following&lt;br/&gt;options available:&lt;br/&gt;&lt;br/&gt; -minrelaytxfee, -maxmempool - changes the lowest fee rate you&amp;#39;ll accept&lt;br/&gt;&lt;br/&gt; -mempoolexpiry - how long to keep txs in the mempool&lt;br/&gt;&lt;br/&gt; -datacarrier - reject txs creating OP_RETURN outputs&lt;br/&gt;&lt;br/&gt; -datacarriersize - maximum size of OP_RETURN data&lt;br/&gt;&lt;br/&gt; -permitbaremultisig - prevent relay of bare multisig&lt;br/&gt;&lt;br/&gt; -bytespersigop - changes how SIGOP accounting works for relay and&lt;br/&gt; mining prioritisation&lt;br/&gt;&lt;br/&gt;as well as these, marked as &amp;#34;debug only&amp;#34; options (only shown with&lt;br/&gt;-help-debug):&lt;br/&gt;&lt;br/&gt; -incrementalrelayfee - make it easier/harder to spam txs by only&lt;br/&gt; slightly bumping the fee; marked as a &amp;#34;debug only&amp;#34; option&lt;br/&gt;&lt;br/&gt; -dustrelayfee - make it easier/harder to create uneconomic utxos;&lt;br/&gt; marked as a &amp;#34;debug only&amp;#34; option&lt;br/&gt;&lt;br/&gt; -limit{descendant,ancestor}{count,size} - changes how large the&lt;br/&gt; transaction chains can be; marked as a &amp;#34;debug only&amp;#34; option&lt;br/&gt;&lt;br/&gt;and in theory, but not available on mainnet:&lt;br/&gt;&lt;br/&gt; -acceptnonstdtxn - relay/mine non standard transactions&lt;br/&gt;&lt;br/&gt;There&amp;#39;s also the &amp;#34;prioritisetransaction&amp;#34; rpc, which can cause you to keep&lt;br/&gt;a low feerate transaction in your mempool longer than you might otherwise.&lt;br/&gt;&lt;br/&gt;I think that -minrelaytxfee, -maxmempool and -mempoolexpiry are the only&lt;br/&gt;ones of those options commonly set, and those only rarely result in any&lt;br/&gt;differences in the txs at the top of the mempool.&lt;br/&gt;&lt;br/&gt;There are also quite a few parameters that aren&amp;#39;t even runtime&lt;br/&gt;configurable:&lt;br/&gt;&lt;br/&gt; - MAX_STANDARD_TX_WEIGHT&lt;br/&gt; - MIN_STANDARD_TX_NONWITNESS_SIZE (see also #26265)&lt;br/&gt; - MAX_P2SH_SIGOPS (see also #26348)&lt;br/&gt; - MAX_STANDARD_TX_SIGOPS_COST&lt;br/&gt; - MAX_STANDARD_P2WSH_STACK_ITEMS&lt;br/&gt; - MAX_STANDARD_P2WSH_STACK_ITEM_SIZE&lt;br/&gt; - MAX_STANDARD_TAPSCRIPT_STACK_ITEM_SIZE&lt;br/&gt; - MAX_STANDARD_P2WSH_SCRIPT_SIZE&lt;br/&gt; - MAX_STANDARD_SCRIPTSIG_SIZE&lt;br/&gt; - EXTRA_DESCENDANT_TX_SIZE_LIMIT&lt;br/&gt; - MAX_REPLACEMENT_CANDIDATES&lt;br/&gt;&lt;br/&gt;And other plausible options aren&amp;#39;t configurable even at compile time&lt;br/&gt;-- eg, core doesn&amp;#39;t implement BIP 125&amp;#39;s inherited signalling rule so&lt;br/&gt;there&amp;#39;s no way to enable it; core doesn&amp;#39;t allow opting out of BIP 125&lt;br/&gt;rule 3 ratchet on absolute fee; core doesn&amp;#39;t allow CPFP carveout with&lt;br/&gt;more than 1 ancestor; core doesn&amp;#39;t allow opting out of LOW_S checks&lt;br/&gt;(even via -acceptnonstdtxn); etc.&lt;br/&gt;&lt;br/&gt;We also naturally have different mempool policies between different&lt;br/&gt;releases: eg, expansions of policy, such as allowing OP_RETURN or&lt;br/&gt;expanding it from 40 to 80 bytes or new soft forks where old nodes won&amp;#39;t&lt;br/&gt;relay transactions that use the new; and also occassional restrictions&lt;br/&gt;in policy, such as the LOW_S requirement.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;While supporting and encouraging different mempool polices might be new&lt;br/&gt;for core, it&amp;#39;s not new for knots: knots changes some of these defaults&lt;br/&gt;(-permitbaremultisig defaults to false, -datacarriersize is reduced to&lt;br/&gt;42), allows the use of -acceptnonstdtxn on mainnet, and introduces new&lt;br/&gt;options including -spkreuse and -mempoolreplacement (giving the latter&lt;br/&gt;full rbf behaviour by default). Knots also includes a `-corepolicy`&lt;br/&gt;option to make it easy to get a configuration matching core&amp;#39;s defaults.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think gmaxwell&amp;#39;s take from Feb 2015 (in the context of how restrictive&lt;br/&gt;policy on OP_RETURN data should be) was a reasonable description for&lt;br/&gt;core&amp;#39;s approach up until now:&lt;br/&gt;&lt;br/&gt;  There is also a matter of driving competent design rather than lazy&lt;br/&gt;  first thing that works. E.g. In stealth addresses the early proposals&lt;br/&gt;  use highly inefficient single ECDH point per output instead of simply&lt;br/&gt;  pooling them. Network behavior is one of the few bits of friction&lt;br/&gt;  driving good technical design rather than &amp;#34;move fast, break things, and&lt;br/&gt;  force everyone else onto my way of doing thing rather than discussing&lt;br/&gt;  the design in public&amp;#34;. No one wants to be an outright gatekeeper,&lt;br/&gt;  but the network is a shared resource and it&amp;#39;s perfectly reasonable&lt;br/&gt;  node behavior to be stingy about the perpetual storage impact of the&lt;br/&gt;  transactions they&amp;#39;re willing to process, especially when it comes to&lt;br/&gt;  neutral technical criteria like the amount of network irrelevant data&lt;br/&gt;  stuffed in transactions.&lt;br/&gt;&lt;br/&gt;  There is also a very clear pattern we&amp;#39;ve seen in the past where&lt;br/&gt;  people take anything the system lets them do as strong evidence that&lt;br/&gt;  they have a irrevocable right to use the system in that way, and that&lt;br/&gt;  their only responsibility-- and if their usage harms the system it&amp;#39;s&lt;br/&gt;  the responsibility of the system to not permit it. [...&lt;br/&gt;  ...] For mitigating these risks it&amp;#39;s optimal if transactions&lt;br/&gt;  seem as uniform and indistinguishable as reasonably possible.&lt;br/&gt;&lt;br/&gt;  - &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/5286#issuecomment-72564175&#34;&gt;https://github.com/bitcoin/bitcoin/pull/5286#issuecomment-72564175&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps see also sdaftuar in Nov 2015,&lt;br/&gt;&lt;br/&gt;  To me the most important question is, is priority something that miners&lt;br/&gt;  want to use?&lt;br/&gt;&lt;br/&gt;  If a non-negligible amount of hashpower intends to use it in their&lt;br/&gt;  transaction selection, then I think it makes sense for nodes to use it&lt;br/&gt;  too, because it&amp;#39;s generally helpful to have your mempool predict the&lt;br/&gt;  UTXO as much as possible, and for nodes to be able to have reasonable&lt;br/&gt;  fee and priority estimates (which won&amp;#39;t happen unless they track the&lt;br/&gt;  priority transactions somehow -- I&amp;#39;m presuming that miners run with&lt;br/&gt;  much bigger mempools than regular nodes).&lt;br/&gt;&lt;br/&gt;  If the answer is no, then that&amp;#39;s fine and I don&amp;#39;t see a reason to push&lt;br/&gt;  in this direction. I sort of assumed there was enough hashpower mining&lt;br/&gt;  with priority, since last time I checked estimatepriority was still&lt;br/&gt;  giving meaningful results for low-ish blockheights, but I haven&amp;#39;t done&lt;br/&gt;  any kind of real analysis.&lt;br/&gt;&lt;br/&gt;  - &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/6992#issuecomment-155969455&#34;&gt;https://github.com/bitcoin/bitcoin/pull/6992#issuecomment-155969455&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;or in June 2019,&lt;br/&gt;&lt;br/&gt;  What this PR is proposing is to get rid of a command-line option that is&lt;br/&gt;  (a) a footgun for users and (b) does not reflect what I believe to be&lt;br/&gt;  the understanding most users have, which is that [X txs] are expected&lt;br/&gt;  to propagate well on the network.&lt;br/&gt;&lt;br/&gt;  ..&lt;br/&gt;&lt;br/&gt;  I don&amp;#39;t think this rises to the level that Luke is concerned about,&lt;br/&gt;  namely a prelude to forcing a common relay policy on all nodes. In&lt;br/&gt;  particular I do agree it makes sense that we offer some ways of&lt;br/&gt;  customizing policy parameters (eg the mempool size, min relay fee,&lt;br/&gt;  etc). Instead, I think the justification for this change is that we&lt;br/&gt;  should not support behaviors we think are harmful to the ecosystem&lt;br/&gt;  overall and have no legitimate use-case, and we should eliminate ways&lt;br/&gt;  that users might inadvertently shoot themselves in the foot.&lt;br/&gt;&lt;br/&gt;  - &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/16171#issuecomment-500393271&#34;&gt;https://github.com/bitcoin/bitcoin/pull/16171#issuecomment-500393271&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;(or see discussion in &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/7219&#34;&gt;https://github.com/bitcoin/bitcoin/pull/7219&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t mean to imply the above are saying &amp;#34;there&amp;#39;s one way to do&lt;br/&gt;things and it&amp;#39;s this way&amp;#34;, or that the old way of doing things should&lt;br/&gt;necessarily be the way we keep doing things. Just that previously core&lt;br/&gt;has tended towards designing a single policy that works as well as it&lt;br/&gt;can for everyone and the ecosystem as a whole. (I&amp;#39;m also not saying that&lt;br/&gt;fullrbf can&amp;#39;t work well for everyone or the ecosystem as a whole)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;By contrast, I think the most common response to pushback against the&lt;br/&gt;full rbf option has been along the lines of &amp;#34;it&amp;#39;s just an option, we&lt;br/&gt;don&amp;#39;t want to force people&amp;#34;, eg:&lt;br/&gt;&lt;br/&gt;  Blaming the default false -mempoolfullrbf option for a full RBF network&lt;br/&gt;  would be holding Bitcoin Core developers responsible for the decisions&lt;br/&gt;  of individual node operators and miners. I don&amp;#39;t think having the&lt;br/&gt;  option (again, default false) can directly cause a full RBF network,&lt;br/&gt;  and likewise, I don&amp;#39;t think removing this option removes the &amp;#34;risk&amp;#34;&lt;br/&gt;  of a full RBF network.&lt;br/&gt;   - glozow&lt;br/&gt;     &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1274949400&#34;&gt;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1274949400&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;  NACK. This is a default false option.&lt;br/&gt;   - achow101&lt;br/&gt;     &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1274953204&#34;&gt;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1274953204&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;  Erecting artificial barriers to prevent or make it difficult for users&lt;br/&gt;  to do what they want to do, is not appropriate behaviour.&lt;br/&gt;   - luke-jr&lt;br/&gt;     &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1290721905&#34;&gt;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1290721905&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;  I&amp;#39;m in general against removing options.&lt;br/&gt;   - instagibbs&lt;br/&gt;     &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1292030700&#34;&gt;https://github.com/bitcoin/bitcoin/pull/26287#issuecomment-1292030700&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I think this differs from what core has done in the past, in that&lt;br/&gt;previously we&amp;#39;ve tried to ensure a new policy is good for everyone (or as&lt;br/&gt;nearly as it can be), and then enabled it as soon as it&amp;#39;s implemented.&lt;br/&gt;Any options that have been added have either been to control resource&lt;br/&gt;usage in ways that don&amp;#39;t significantly effect tx propagation, to&lt;br/&gt;allow people to revert to the old behaviour when the new behaviour is&lt;br/&gt;controversial (eg the -mempoolreplacement=0 option from 0.12 to 0.18),&lt;br/&gt;and to make it easier to test/debug the implementation.&lt;br/&gt;&lt;br/&gt;Giving people a new relay behaviour they can opt-in to when we aren&amp;#39;t&lt;br/&gt;confident enough to turn on by default doesn&amp;#39;t match the approach I&amp;#39;ve&lt;br/&gt;seen core take in the past.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;If this is going to be an ongoing shift in how core sees relay/mempool&lt;br/&gt;policy, I think that&amp;#39;s significant and worth paying attention to.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think it&amp;#39;s necessary to have that shift to roll out full rbf.&lt;br/&gt;The other approach would be either:&lt;br/&gt;&lt;br/&gt; * set -mempoolfullrbf=true as the default for 24.0, and just have the&lt;br/&gt;   command line param there in case people want to do a&lt;br/&gt;   &amp;#34;UserRejectedMempoolPolicy&amp;#34; campaign to get everyone to opt-out&lt;br/&gt;&lt;br/&gt; * revert it for now because we don&amp;#39;t think mainnet is ready for fullrbf&lt;br/&gt;   yet, and introduce it as default true for 25.0 or 26.0 or 27.0 or&lt;br/&gt;   to activate at some scheduled date in that timeframe (potentially&lt;br/&gt;   backporting it to previous releases to help with adoption too,&lt;br/&gt;   whatever). same effect as the previous option, just with a bit more&lt;br/&gt;   advanced notice and time to prepare&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think anyone&amp;#39;s proposed the first (which I interpret as &amp;#34;most of&lt;br/&gt;us don&amp;#39;t think mainnet is ready for fullrbf today&amp;#34;), but the comments&lt;br/&gt;above are all pushback by people arguing against (the first step of)&lt;br/&gt;the second approach, and they seem to be winning the day.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s also possible that this is something of a one time thing: full rbf&lt;br/&gt;has been controversial for ages, but widely liked by devs, and other&lt;br/&gt;attempts (eg making it available in knots) haven&amp;#39;t actually achieved&lt;br/&gt;much of a result in practice. So maybe this is just a special case and&lt;br/&gt;not a precedent, and when people propose other default false options,&lt;br/&gt;there will be substantially more resistance to them being merged,&lt;br/&gt;despite all the talk about users having options that&amp;#39;s going on right now.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Assuming it is the change of direction it appears to be -- and all of&lt;br/&gt;the above is really just justification for that assumption -- then like&lt;br/&gt;I said, I think it&amp;#39;s worth seriously considering what it means for people&lt;br/&gt;to choose their own relay/mempool policies and for you to expect to have&lt;br/&gt;different mempool policies to many or most of your potential peers.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;One thing maybe worth noting is that is that you can still only choose&lt;br/&gt;your policy from options that people write code for -- if it wasn&amp;#39;t&lt;br/&gt;something you could get by running knots or compiling a rejected PR&lt;br/&gt;yourself, it won&amp;#39;t magically become more possible now.  Presumably it&lt;br/&gt;would mean that once a PR is written, it might get better review (rather&lt;br/&gt;than being dismissed as not suitable for everyone), and there would be&lt;br/&gt;less maintenance burden than if it had to be manually rebased every&lt;br/&gt;release, though (or at least the maintenance burden would be shared&lt;br/&gt;across everyone working on the codebase).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;The second thing is that whatever your relay policy is, you still&lt;br/&gt;need a path all the way to miners through nodes that will accept your&lt;br/&gt;transaction at every step. If you&amp;#39;re making your mempool more restrictive&lt;br/&gt;(eg -permitbaremultisig=0, -datacarrier=0), that&amp;#39;s easy for you (though&lt;br/&gt;you&amp;#39;re making life more difficult for people who do create those sorts&lt;br/&gt;of txs); but if you want a more permissive policy (package relay,&lt;br/&gt;version-3-rbf, full-rbf), you might need to do some work.&lt;br/&gt;&lt;br/&gt;The cutoff for that is probably something like &amp;#34;do 30% of listening&lt;br/&gt;nodes have a compatible policy&amp;#34;? If they do, then you&amp;#39;ll have about a&lt;br/&gt;95% chance of having at least one of your outbound peers accept your tx,&lt;br/&gt;just by random chance. If erlay allows increasing your outbound count to&lt;br/&gt;12 connections instead of 8; that might reduce down to needing just 20%&lt;br/&gt;of listening nodes (~93%).&lt;br/&gt;&lt;br/&gt;But for cases where less than 30% (20%) of network supports your preferred&lt;br/&gt;policy, you probably need to do something cleverer.&lt;br/&gt;&lt;br/&gt;One approach is to set a service bit and preferentially peer with other&lt;br/&gt;nodes that advertise that service bit; knots does the first half of this&lt;br/&gt;for fullrbf, and both halves have been proposed for core in #25600.&lt;br/&gt;Preferential peering was previously done for the segwit deployment,&lt;br/&gt;though in that case it was necessary not just for tx propogation but&lt;br/&gt;also for ensuring block propogation, making it effectively a consensus&lt;br/&gt;critical issue.&lt;br/&gt;&lt;br/&gt;Another approach is having a separate relay network -- eg, lightning nodes&lt;br/&gt;already have a gossip network, and might want to help their own ecosystem&lt;br/&gt;by ensuring unilateral channel closes and justice transactions are quickly&lt;br/&gt;relayed. Using their own gossip network to relay the transaction around,&lt;br/&gt;and each lightning node adding it to their local bitcoind&amp;#39;s mempool and&lt;br/&gt;allowing it to propogate (or not) from there as normal, would also be a&lt;br/&gt;way of allowing transactions to propogate well. It does mean that miners&lt;br/&gt;would either need to also participate in lightning gossip directly, or&lt;br/&gt;that miners would need to connect to *many* peers to be confident of&lt;br/&gt;seeing those transactions (eg, if only 2% of the network would see a&lt;br/&gt;tx, you&amp;#39;d need to make 228 connections to have a 99% chance of seeing&lt;br/&gt;the tx). You can&amp;#39;t currently do something like this, because all the&lt;br/&gt;relay policies are also applied when adding txs to the mempool via RPC,&lt;br/&gt;and there&amp;#39;s no convenient way to remove txs from the mempool.&lt;br/&gt;&lt;br/&gt;A case where something like that might occur is in preventing L2&lt;br/&gt;transactions from pinning attacks -- so you might have a high-fee,&lt;br/&gt;low-feerate transaction that&amp;#39;s been widely propogated, sitting in the&lt;br/&gt;bottom of people&amp;#39;s mempools, and you want to replace it with a smaller,&lt;br/&gt;higher-feerate transaction, but don&amp;#39;t want to pay a higher absolute fee,&lt;br/&gt;and are thus blocked by BIP 125 rule 3. Perhaps 98% of the network is&lt;br/&gt;unwilling to deviate from BIP 125 rule 3 for you; because that would&lt;br/&gt;make it easy for random griefers to spam their mempool with large txs&lt;br/&gt;then delete them while only paying a small fee; but your L2 peers may be&lt;br/&gt;able to decode your replacement transaction and be sure that you aren&amp;#39;t&lt;br/&gt;going to spam them, and thus will happily relay it.&lt;br/&gt;&lt;br/&gt;&amp;gt;From a technical point-of-view, that&amp;#39;s largely fine; the downside is it&lt;br/&gt;increases the centralisation pressure on mining: whether that&amp;#39;s by having&lt;br/&gt;to connect to substantially more nodes, or having to parse through more&lt;br/&gt;spam, you can&amp;#39;t just run your mining operation off a standard install&lt;br/&gt;of bitcoin core anymore, but need to actively opt-in to find all the&lt;br/&gt;weird unusual ways people are sending transactions around in order to&lt;br/&gt;actually collect as much in fees as your competitors are.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s probably moderately bad for privacy as well -- if lightning or&lt;br/&gt;coinjoins need special relay rules that most nodes haven&amp;#39;t opted into,&lt;br/&gt;it&amp;#39;s potentially easy to use that to find the bitcoin nodes on the&lt;br/&gt;network that are participating in those protocols, and from there to&lt;br/&gt;either identify the operator, or run a DoS attack to make it hard for you&lt;br/&gt;to keep doing what you want. Obviously if you&amp;#39;re setting a service bit to&lt;br/&gt;get better routing, you&amp;#39;ve given up that privacy already. Likewise if the&lt;br/&gt;government or random vandals are opposed to bitcoin mining, and miners&lt;br/&gt;have to have special configuration on their nodes that distinguish them&lt;br/&gt;from regular users, then perhaps that makes it easier to find or shut&lt;br/&gt;down their operations.&lt;br/&gt;&lt;br/&gt;There are a few efficiencies to be gained from similar mempool policies as&lt;br/&gt;well: more reliable compact block reconstruction (if you&amp;#39;re not missing&lt;br/&gt;any transactions, you avoid a round-trip) and presumably more efficient&lt;br/&gt;set reconstruction with erlay. You&amp;#39;ll also waste less bandwidth sending&lt;br/&gt;transactions that the other node is only going to reject. Both those&lt;br/&gt;depend on how many transactions are going to rely on unusual mempool&lt;br/&gt;policies in the first place though.&lt;br/&gt;&lt;br/&gt;ariard wrote:&lt;br/&gt;&lt;br/&gt;  I know I&amp;#39;ve advocated in the past to turn RBF support by default in&lt;br/&gt;  the past. Though after gathering a lot of feedbacks, this approach&lt;br/&gt;  of offering the policy flexiblity to the interested users only and&lt;br/&gt;  favoring a full-rbf gradual deployment sounds better to me.&lt;br/&gt;&lt;br/&gt;  - &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/25353#issuecomment-1157137026&#34;&gt;https://github.com/bitcoin/bitcoin/pull/25353#issuecomment-1157137026&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I guess all the above leads me to think that gradual deployments of&lt;br/&gt;mempool policies are likely the worse approach: even when they&amp;#39;re not&lt;br/&gt;hurting anyone, it makes them hard to use during the gradual phase,&lt;br/&gt;and getting around that comes with worrying compromises on privacy and&lt;br/&gt;centralisation; and when they are problematic for some, the indeterminate&lt;br/&gt;nature of a gradual deployment means it&amp;#39;s hard to plan for when that&lt;br/&gt;risk is going to eventuate.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Theoretically, one way to recover the good parts of core deciding on&lt;br/&gt;what&amp;#39;s good for the network might be for people outside of core to&lt;br/&gt;recommend a mempool configuration; then core can just have an option&lt;br/&gt;to make that easy, similar to &amp;#34;-std=c&#43;&#43;17&amp;#34; for a C&#43;&#43; compiler, and much&lt;br/&gt;the same as knots&amp;#39; &amp;#34;-corepolicy&amp;#34; option.&lt;br/&gt;&lt;br/&gt;Presuming anyone actually wants to take on that job, and listen to the&lt;br/&gt;concerns of zeroconf businesses, lightning and coinjoin devs, miners, etc;&lt;br/&gt;and can come up with something that keeps most of them happy, and that&lt;br/&gt;70% or 90% of the network ends up just following those recommendations&lt;br/&gt;because it&amp;#39;s easy, it works, and it&amp;#39;s recommended by all the apps they&lt;br/&gt;want to use, then that could work great:&lt;br/&gt;&lt;br/&gt; * miners don&amp;#39;t need to do anything special, so there&amp;#39;s no new&lt;br/&gt;   mining centralisation pressure&lt;br/&gt; * miners and users don&amp;#39;t reveal what they&amp;#39;re doing with bitcoin by the way&lt;br/&gt;   they configure their nodes, so there&amp;#39;s no privacy problems&lt;br/&gt; * devs can be fairly confident in how they have to design their apps&lt;br/&gt;   in order to get their transactions to most hashpower&lt;br/&gt; * devs don&amp;#39;t have to add new p2p layers to make it happen&lt;br/&gt; * at least there&amp;#39;s someone to talk to when you&amp;#39;re trying to figure out&lt;br/&gt;   how to make some new project possible when it&amp;#39;s inhibited by current&lt;br/&gt;   relay policies and you don&amp;#39;t have to try to convince everyone to&lt;br/&gt;   upgrade on your own&lt;br/&gt; * core devs just provide options, and don&amp;#39;t have to worry about being&lt;br/&gt;   seen as gatekeepers&lt;br/&gt;&lt;br/&gt;The &amp;#34;downside&amp;#34; in that scenario is that users/dev aren&amp;#39;t making much&lt;br/&gt;actual use of all the choices core is offering by making different&lt;br/&gt;options available; but the upside is that that choice is at least readily&lt;br/&gt;available should whoever is coming up with these policy become out of&lt;br/&gt;step with what people actually want.&lt;br/&gt;&lt;br/&gt;One thing that might make an approach like that difficult is that core&lt;br/&gt;has historically been happy to remove options that don&amp;#39;t seem useful&lt;br/&gt;anymore: eg the ability to turn of BIP 125 support (#16171), and priority&lt;br/&gt;transactions (#9602). Perhaps that&amp;#39;s fine if you&amp;#39;re trying to actively&lt;br/&gt;craft a single mempool/relay policy that&amp;#39;s good enough for almost everyone&lt;br/&gt;(after all, it makes the code simpler and more efficient, and reduces&lt;br/&gt;the number of footguns); all you&amp;#39;re doing is leaving a minority of people&lt;br/&gt;who want weird things to run a fork, and that&amp;#39;s going to happen anyway.&lt;br/&gt;&lt;br/&gt;But if people are following policy developed outside of core, core&lt;br/&gt;might well disagree with them and decide &amp;#34;no that&amp;#39;s a stupid policy,&lt;br/&gt;no one should do that&amp;#34; and remove some feature that others thing should&lt;br/&gt;continue to be normal. Beyond the examples above, there&amp;#39;s already talk of&lt;br/&gt;removing the ability to disable fullrbf support in #26305, for instance.&lt;br/&gt;If that happens, then the people maintaining the policy will instead&lt;br/&gt;end up maintaining an entire fork of bitcoin core, and all we&amp;#39;ve done&lt;br/&gt;is transition to people running software from a different repo, and a&lt;br/&gt;different set of maintainers.&lt;br/&gt;&lt;br/&gt;If we&amp;#39;re really going to a world where core&amp;#39;s eager to add new options,&lt;br/&gt;and reluctant to remove them, at least if anyone at all finds them&lt;br/&gt;interesting, that&amp;#39;s presumably a non-issue, though.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:15:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq4muqt3wen5l07rv6gkqele8snp6k6llwsckx4g69glm8a552axqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kj83ugg</id>
    
      <title type="html">📅 Original date posted:2022-10-20 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq4muqt3wen5l07rv6gkqele8snp6k6llwsckx4g69glm8a552axqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kj83ugg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgs0p498lrfu50efe6eyfnjv5pc0c3drdedypf8ltp8an5qua93fgkzvff5&#39;&gt;nevent1q…vff5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-20&lt;br/&gt;📝 Original message:On Wed, Oct 19, 2022 at 04:29:57PM &#43;0200, Sergej Kotliar via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; The&lt;br/&gt;&amp;gt; biggest risk in accepting bitcoin payments is in fact not zeroconf risk&lt;br/&gt;&amp;gt; (it&amp;#39;s actually quite easily managed),&lt;br/&gt;&lt;br/&gt;You mean &amp;#34;it&amp;#39;s quite easily managed, provided the transaction doesn&amp;#39;t&lt;br/&gt;opt-in to rbf&amp;#34;, right? At least, that&amp;#39;s what I understood you saying last&lt;br/&gt;time; ie that if the tx signals rbf, then you just don&amp;#39;t do zeroconf no&lt;br/&gt;matter what other trustworthy signals you might see:&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://twitter.com/ziggamon/status/1435863691816275970&#34;&gt;https://twitter.com/ziggamon/status/1435863691816275970&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;(rbf txs seem to have increased from 22% then to 29% now)&lt;br/&gt;&lt;br/&gt;&amp;gt; it&amp;#39;s FX risk as the merchant must&lt;br/&gt;&amp;gt; commit to a certain BTCUSD rate ahead of time for a purchase. Over time&lt;br/&gt;&amp;gt; some transactions lose money to FX and others earn money - that evens out&lt;br/&gt;&amp;gt; in the end.&lt;br/&gt;&lt;br/&gt;&amp;gt; But if there is an _easily accessible in the wallet_ feature to&lt;br/&gt;&amp;gt; &amp;#34;cancel transaction&amp;#34; that means it will eventually get systematically&lt;br/&gt;&amp;gt; abused. A risk of X% loss on many payments that&amp;#39;s easy to systematically&lt;br/&gt;&amp;gt; abuse is more scary than a rare risk of losing 100% of one occasional&lt;br/&gt;&amp;gt; payment. It&amp;#39;s already possible to execute this form of abuse with opt-in&lt;br/&gt;&amp;gt; RBF,&lt;br/&gt;&lt;br/&gt;If someone&amp;#39;s going to systematically exploit your store via this&lt;br/&gt;mechanism, it seems like they&amp;#39;d just find a single wallet with a good&lt;br/&gt;UX for opt-in RBF and lowballing fees, and go to town -- not something&lt;br/&gt;where opt-in rbf vs fullrbf policies make any difference at all? &lt;br/&gt;&lt;br/&gt;It&amp;#39;s not like existing wallets that don&amp;#39;t let you set RBF will suddenly&lt;br/&gt;get a good UX for replacing transactions just because they&amp;#39;d be relayed&lt;br/&gt;if they did, is it?&lt;br/&gt;&lt;br/&gt;&amp;gt; To successfully fool (non-RBF)&lt;br/&gt;&amp;gt; zeroconf one needs to have access to mining infrastructure and probability&lt;br/&gt;&amp;gt; of success is the % of hash rate controlled.&lt;br/&gt;&lt;br/&gt;I thought the &amp;#34;normal&amp;#34; avenue for fooling non-RBF zeroconf was to create&lt;br/&gt;two conflicting txs in advance, one paying the merchant, one paying&lt;br/&gt;yourself, connect to many peers, relay the one paying the merchant to&lt;br/&gt;the merchant, and the other to everyone else.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m just basing this off Peter Todd&amp;#39;s stuff from years ago:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://np.reddit.com/r/Bitcoin/comments/40ejy8/peter_todd_with_my_doublespendpy_tool_with/cytlhh0/&#34;&gt;https://np.reddit.com/r/Bitcoin/comments/40ejy8/peter_todd_with_my_doublespendpy_tool_with/cytlhh0/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://github.com/petertodd/replace-by-fee-tools/blob/master/doublespend.py&#34;&gt;https://github.com/petertodd/replace-by-fee-tools/blob/master/doublespend.py&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Currently Lightning is somewhere around 15% of our total bitcoin payments.&lt;br/&gt;&lt;br/&gt;So, based on last year&amp;#39;s numbers, presumably that makes your bitcoin&lt;br/&gt;payments break down as something like:&lt;br/&gt;&lt;br/&gt;   5% txs are on-chain and seem shady and are excluded from zeroconf&lt;br/&gt;  15% txs are lightning&lt;br/&gt;  20% txs are on-chain but signal rbf and are excluded from zeroconf&lt;br/&gt;  60% txs are on-chain and seem fine for zeroconf&lt;br/&gt;&lt;br/&gt;&amp;gt; This is very much not nothing, and all of us here want Lightning to grow,&lt;br/&gt;&amp;gt; but I think it warrants a serious discussion on whether we want Lightning&lt;br/&gt;&amp;gt; adoption to go to 100% by means of disabling on-chain commerce.&lt;br/&gt;&lt;br/&gt;If the numbers above were accurate, this would just mean you&amp;#39;d go from 60%&lt;br/&gt;zeroconf/25% not-zeroconf to 85% not-zeroconf; wouldn&amp;#39;t be 0% on-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; For me&lt;br/&gt;&amp;gt; personally it would be an easier discussion to have when Lightning is at&lt;br/&gt;&amp;gt; 80%&#43; of all bitcoin transactions.&lt;br/&gt;&lt;br/&gt;Can you extrapolate from the numbers you&amp;#39;ve seen to estimate when that&lt;br/&gt;might be, given current trends? Or perhaps when fine-for-zeroconf txs&lt;br/&gt;drop to 20%, since opt-in-RBF txs and considered-unsafe txs would still&lt;br/&gt;work the same in a fullrbf world.&lt;br/&gt;&lt;br/&gt;&amp;gt; The benefits of Lightning are many and obvious,&lt;br/&gt;&amp;gt; we don&amp;#39;t need to limit onchain to make Lightning more appealing. &lt;br/&gt;&lt;br/&gt;To be fair, I think making lightning (and coinjoins) work better is&lt;br/&gt;exactly what inspired this -- not as a &amp;#34;make on-chain worse so we look&lt;br/&gt;better in comparison&amp;#34;, but as a &amp;#34;making lightning work well is a bunch&lt;br/&gt;of hard problems, here&amp;#39;s the next thing we need in order to beat the&lt;br/&gt;next problem&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt; Sidenote: On the efficacy of RBF to &amp;#34;unstuck&amp;#34; stuck transactions&lt;br/&gt;&amp;gt; After interacting with users during high-fee periods I&amp;#39;ve come to not&lt;br/&gt;&amp;gt; appreciate RBF as a solution to that issue. Most users (80% or so) simply&lt;br/&gt;&amp;gt; don&amp;#39;t have access to that functionality, because their wallet doesn&amp;#39;t&lt;br/&gt;&amp;gt; support it, or they use a custodial (exchange) wallet etc. Of those that&lt;br/&gt;&amp;gt; have the feature - only the power users understand how RBF works, and&lt;br/&gt;&amp;gt; explaining how to do RBF to a non-power-user is just too complex, for the&lt;br/&gt;&amp;gt; same reason why it&amp;#39;s complex for wallets to make sensible non-power-user UI&lt;br/&gt;&amp;gt; around it. Current equilibrium is that mostly only power users have access&lt;br/&gt;&amp;gt; to RBF and they know how to handle it, so things are somewhat working. But&lt;br/&gt;&amp;gt; rolling this out to the broad market is something else and would likely&lt;br/&gt;&amp;gt; cause more confusion.&lt;br/&gt;&amp;gt; CPFP is somewhat more viable but also not perfect as it would require lots&lt;br/&gt;&amp;gt; of edge case code to handle abuse vectors: What if users abuse a generous&lt;br/&gt;&amp;gt; CPFP policy to unstuck past transactions or consolidate large wallets. Best&lt;br/&gt;&amp;gt; is for CPFP to be done on the wallet side, not the merchant side, but there&lt;br/&gt;&amp;gt; too are the same UX issues as with RBF.&lt;br/&gt;&lt;br/&gt;I think if you&amp;#39;re ruling out both merchants and users being able to add&lt;br/&gt;fees to a tx to get it to confirm, then you&amp;#39;re going to lose either way.&lt;br/&gt;Txs will either expire because they&amp;#39;ve been stuck for more than a week,&lt;br/&gt;and be vulnerable to replacement at that point anyway, or they&amp;#39;ll be&lt;br/&gt;dropped from mempools because they&amp;#39;ve filled up and they were the lowest&lt;br/&gt;fee tx, and be vulnerable to replacement for that reason. In the expiry&lt;br/&gt;case, the merchant can rebroadcast the original transaction to keep it&lt;br/&gt;alive, perhaps with a good chance of beating an attacker to the punch,&lt;br/&gt;but in the full mempool case, you could only do that if you were also&lt;br/&gt;CPFPing it, which you already ruled out.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:14:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxdg0t0m3gj6q6g9yq0z6e8xxv9cw6v4n22zqk4w24xjq8wdqz9xczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kzdx9et</id>
    
      <title type="html">📅 Original date posted:2022-10-12 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxdg0t0m3gj6q6g9yq0z6e8xxv9cw6v4n22zqk4w24xjq8wdqz9xczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kzdx9et" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp4gxr9j0p6gsgw55n034u80thz8l25zjd3husd90xl7acjjwh9psy5y48l&#39;&gt;nevent1q…y48l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-12&lt;br/&gt;📝 Original message:On Tue, Oct 11, 2022 at 04:18:10PM &#43;0000, Pieter Wuille via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; On Friday, October 7th, 2022 at 5:37 PM, Dario Sneidermanis via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; Thanks for the fast answer! It seems I missed the link to the PR, sorry for the&lt;br/&gt;&amp;gt; &amp;gt; confusion. I&amp;#39;m referring to the opt-in flag for full-RBF from #25353&lt;br/&gt;&amp;gt; &amp;gt; (&lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/25353&#34;&gt;https://github.com/bitcoin/bitcoin/pull/25353&lt;/a&gt;).&lt;br/&gt;&amp;gt; It is not clear to me why you believe the merging of this particular pull request poses an immediate risk to you.&lt;br/&gt;&lt;br/&gt;Did you see the rest of Dario&amp;#39;s reply, bottom-posted after the quoted&lt;br/&gt;text? Namely:&lt;br/&gt;&lt;br/&gt;On Fri, Oct 07, 2022 at 06:37:38PM -0300, Dario Sneidermanis via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; The &amp;#34;activation&amp;#34; of full-RBF after deployment works in a pretty interesting&lt;br/&gt;&amp;gt; way:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; 1. If no miner is running full-RBF or there aren&amp;#39;t easily accessible&lt;br/&gt;&amp;gt; connected components of nodes running full-RBF connected to the miners, then&lt;br/&gt;&amp;gt; full-RBF is mostly ineffective since replacements aren&amp;#39;t relayed and/or mined.&lt;br/&gt;&amp;gt; 2. There&amp;#39;s a middle ground where *some* connected components of full-RBF&lt;br/&gt;&amp;gt;    nodes can relay and mine replacements, where some full-RBF nodes will be&lt;br/&gt;&amp;gt;    able to replace via full-RBF and some won&amp;#39;t (depending on their peers).&lt;br/&gt;&amp;gt; 3. With high enough adoption, the relay graph has enough density of full-RBF&lt;br/&gt;&amp;gt;    nodes that almost all full-RBF nodes can replace transactions via&lt;br/&gt;&amp;gt;    full-RBF.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; While there have been forks of Bitcoin Core (like Bitcoin Knots) running&lt;br/&gt;&amp;gt; full-RBF for a while, today most nodes (by far) are running Bitcoin Core.&lt;br/&gt;&amp;gt; So,&lt;br/&gt;&amp;gt; Bitcoin Core adding an opt-in flag (ie. off by default) makes it easier to&lt;br/&gt;&amp;gt; be&lt;br/&gt;&amp;gt; picked up by most node operators. Making the flag opt-out (ie. on by&lt;br/&gt;&amp;gt; default)&lt;br/&gt;&amp;gt; would make it easier still. We are dealing with a gradient going from hard&lt;br/&gt;&amp;gt; enough that we are still in 1, to easy enough that we get to 3.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The question then is whether an opt-in flag for full-RBF will have enough&lt;br/&gt;&amp;gt; adoption to get us from 1 to 2. If it isn&amp;#39;t, then #25353 won&amp;#39;t meet its&lt;br/&gt;&amp;gt; objective of allowing nodes participating in multi-party funding protocols&lt;br/&gt;&amp;gt; to assume that they can rely on full-RBF. If it is, then zero-conf applications&lt;br/&gt;&amp;gt; will be at severe risk (per the logic in the initial email).&lt;br/&gt;&lt;br/&gt;That logic seems reasonably sound to me:&lt;br/&gt;&lt;br/&gt; - if adding the option does nothing, then there&amp;#39;s no point adding it,&lt;br/&gt;   and no harm in restricting it to test nets only&lt;br/&gt;&lt;br/&gt; - if adding the option does do something, then businesses using zero-conf&lt;br/&gt;   need to react immediately, or will go from approximately zero risk of&lt;br/&gt;   losing funds, to substantial risk&lt;br/&gt;&lt;br/&gt;(I guess having the option today may allow you to manually switch your&lt;br/&gt;node over to supporting fullrbf in future when the majority of the network&lt;br/&gt;supports it, without needing to do an additional upgrade in the meantime;&lt;br/&gt;but that seems like a pretty weak benefit)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:14:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf63d5uqc6hh555ll7lp69kkqfq5wf3vh56dn9e6ph0k70j4nmnaqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kpmay2q</id>
    
      <title type="html">📅 Original date posted:2022-07-11 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf63d5uqc6hh555ll7lp69kkqfq5wf3vh56dn9e6ph0k70j4nmnaqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kpmay2q" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrw8p3apufut4ny2xzf7ra0xhaphtj0s05gz4wj42fj3hryvwlnfcgadv74&#39;&gt;nevent1q…dv74&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-11&lt;br/&gt;📝 Original message:On Mon, Jul 11, 2022 at 11:12:52AM -0700, Bram Cohen via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; If transaction fees came in at an even rate over time all at the exact same&lt;br/&gt;&amp;gt; level then they work fine for security, acting similarly to fixed block&lt;br/&gt;&amp;gt; rewards. Unfortunately that isn&amp;#39;t how it works in the real world.&lt;br/&gt;&lt;br/&gt;That just becomes a market design question. There&amp;#39;s been some trivial&lt;br/&gt;effort put into that for bitcoin (ie, getting people to actually chooses&lt;br/&gt;fees based on the weight of their transaction, and having weight be the&lt;br/&gt;sole limiting factor for miners), but not a lot, and there&amp;#39;s evidence&lt;br/&gt;both from previous times in Bitcoin&amp;#39;s history and from altcoin&amp;#39;s that&lt;br/&gt;the market can support higher fees.&lt;br/&gt;&lt;br/&gt;Should we work on that today, though? It doesn&amp;#39;t seem smart to me:&lt;br/&gt;the subsidy is already quite substantial ($6.5 billion USD per year at&lt;br/&gt;current prices) so raising fees to 10% of block reward would transfer&lt;br/&gt;another $650M USD from bitcoin users to miners (or ASIC manfucturers&lt;br/&gt;and electricity producers) each year, achieving what? Refuting some FUD?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:11:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs08zw4heytnvuh5zxexypm5cwqcju330ejhkpcke5yy6sj6t8zw2gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kasgnzn</id>
    
      <title type="html">📅 Original date posted:2022-07-13 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs08zw4heytnvuh5zxexypm5cwqcju330ejhkpcke5yy6sj6t8zw2gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kasgnzn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswtygqqqn2986gtzjlzt9zdf7g090gr7cqexeu556rztjyaa8hvrswpzgld&#39;&gt;nevent1q…zgld&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-13&lt;br/&gt;📝 Original message:On Mon, Jul 11, 2022 at 08:21:40PM -0400, Russell O&amp;#39;Connor via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Oops, you are right.  We need the bribe to be the output of the coinbase,&lt;br/&gt;&amp;gt; but due to the maturity rule, it isn&amp;#39;t really a bribe.&lt;br/&gt;&amp;gt; Too bad coinbases cannot take other coinbase outputs as inputs to bypass&lt;br/&gt;&amp;gt; the maturity rule.&lt;br/&gt;&lt;br/&gt;Sufficiently advanced tx introspection could be used for this; spend the&lt;br/&gt;fees in the coinbase to address A, but also create a 0sat output via a&lt;br/&gt;regular tx to the scriptPubKey &amp;#34;1 CSV&amp;#34;. Note that tx&amp;#39;s txid as B. The&lt;br/&gt;next miner claims the bribe B, by spending the 0sat output to itself&lt;br/&gt;with a 1-in, 1-out tx, with scriptPubKey C.&lt;br/&gt;&lt;br/&gt;  nVersion = 1&lt;br/&gt;  inputs = [txid=B, vout=0, scriptSig=&amp;#34;&amp;#34;, nSeq=1]&lt;br/&gt;  outputs = [value=0, scriptPubKey=C]&lt;br/&gt;  nLocktime = 0&lt;br/&gt;&lt;br/&gt;Now we get back to A, and say that it&amp;#39;s scriptPubKey uses a script that&lt;br/&gt;takes &amp;#34;C&amp;#34; as input, has &amp;#34;B&amp;#34; hardcoded, calculates the txid of the tx&lt;br/&gt;above, call it D, and then uses tx introspection to check that one of&lt;br/&gt;the inputs of the tx has D as the txid.&lt;br/&gt;&lt;br/&gt;&amp;gt; I guess that means the bribe has to be by leaving transactions in the&lt;br/&gt;&amp;gt; mempool.&lt;br/&gt;&lt;br/&gt;You *could* make that work if you allow tx&amp;#39;s to use the annex to commit&lt;br/&gt;to a recent block.&lt;br/&gt;&lt;br/&gt;That is, if you just mined block 740,000 and its hash was&lt;br/&gt;00000000000000000005f28764680afdbd8375216ff8f30b17eeb26bd98aac63,&lt;br/&gt;you construct a bribe tx paying to &amp;#34;OP_1&amp;#34;, but when you sign it,&lt;br/&gt;you add &amp;#34;50ee070b4aa0d98aac63&amp;#34; as the annex (tag=ee, length=07,&lt;br/&gt;value[0:3]=height=0b4aa0=470k, value[3:]=d98aac63), and (via a soft fork)&lt;br/&gt;nodes then only consider that tx valid if the block at &amp;#34;height&amp;#34; ends in&lt;br/&gt;&amp;#34;d98aac63&amp;#34;. There&amp;#39;s then only a 1-in-4B chance that someone who extends&lt;br/&gt;a competitor to your block could claim the bribe, at a cost of 11 extra&lt;br/&gt;witness bytes.&lt;br/&gt;&lt;br/&gt;But such txs (and anything that descends from them) would become invalid&lt;br/&gt;with as little as a 1-block reorg, which would pretty much defeat the&lt;br/&gt;entire purpose of the maturity delay...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:11:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs02z7ru55lxj8qfac84zyluw2tkha390gm7x4czfmkr832nuurneszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kwwqww4</id>
    
      <title type="html">📅 Original date posted:2022-07-11 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs02z7ru55lxj8qfac84zyluw2tkha390gm7x4czfmkr832nuurneszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kwwqww4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxrtnly00czdr0gu50twnnsjj0ddc0c7d9cf4ep9pajg3d49dc5tc2lx0mm&#39;&gt;nevent1q…x0mm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-11&lt;br/&gt;📝 Original message:On Mon, Jul 11, 2022 at 08:56:04AM -0400, Erik Aronesty via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; Alternatively, losses could be at a predictable rate that&amp;#39;s entirely&lt;br/&gt;&amp;gt; &amp;gt; different to the one Peter assumes.&lt;br/&gt;&amp;gt; No, peter only assumes that there *is* a rate.&lt;br/&gt;&lt;br/&gt;No, he assumes it&amp;#39;s a constant rate. His integration step gives a&lt;br/&gt;different result if lambda changes with t:&lt;br/&gt;&lt;a href=&#34;https://www.wolframalpha.com/input?i=dN%2Fdt&#43;%3D&#43;k&#43;-&#43;lambda%28t%29*N&#34;&gt;https://www.wolframalpha.com/input?i=dN%2Fdt&#43;%3D&#43;k&#43;-&#43;lambda%28t%29*N&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Mon, Jul 11, 2022 at 12:59:53PM -0400, Peter Todd via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Give me an example of an *actual* inflation rate you expect to see, given a&lt;br/&gt;&amp;gt; disaster of a given magnitude.&lt;br/&gt;&lt;br/&gt;All I was doing was saying your proof is incorrect (or, rather, relies&lt;br/&gt;on a highly unrealistic assumption), since I hadn&amp;#39;t seen anybody else&lt;br/&gt;point that out already.&lt;br/&gt;&lt;br/&gt;But even if the proof were correct, I don&amp;#39;t think it provides a useful&lt;br/&gt;mechanism (since there&amp;#39;s no reason to think miners gaining all the coins&lt;br/&gt;lost in a year will be sufficient for anything), and I don&amp;#39;t really&lt;br/&gt;think the &amp;#34;security budget&amp;#34; framework (ie, that the percentage of total&lt;br/&gt;supply given to miners each year is what&amp;#39;s important for security)&lt;br/&gt;you&amp;#39;re implicitly relying on is particularly meaningful.&lt;br/&gt;&lt;br/&gt;So no, not particularly interested in diving into it any deeper.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:11:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9qf7nzrvgm46w6sa9vdj4ex53lfmjp7nf0wav422nmj5kjpq8f4gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ketmpmt</id>
    
      <title type="html">📅 Original date posted:2022-07-10 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9qf7nzrvgm46w6sa9vdj4ex53lfmjp7nf0wav422nmj5kjpq8f4gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ketmpmt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2t29h7yr8raav9pysg5kjwvy9jrqp56uxhdql9a2mc7xf8tcuhasf5y84t&#39;&gt;nevent1q…y84t&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-10&lt;br/&gt;📝 Original message:On Sat, Jul 09, 2022 at 08:46:47AM -0400, Peter Todd via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; title:  &amp;#34;Surprisingly, Tail Emission Is Not Inflationary&amp;#34;&lt;br/&gt;&lt;br/&gt;&amp;gt; Of course, this isn&amp;#39;t realistic as coins are constantly being lost due to&lt;br/&gt;&amp;gt; deaths, forgotten passphrases, boating accidents, etc. These losses are&lt;br/&gt;&amp;gt; independent:&lt;br/&gt;&lt;br/&gt;This isn&amp;#39;t necessarily true: if the losses are due to a common cause,&lt;br/&gt;then they&amp;#39;ll be heavily correlated rather than independent; for example&lt;br/&gt;losses could be caused by a bug in a popular wallet/exchange software&lt;br/&gt;that sends funds to invalid addresses, or by a war or natural disaster&lt;br/&gt;that damages key storage hardware. They&amp;#39;re also not independent over&lt;br/&gt;time -- people improve their key storage habits over time; eg switching&lt;br/&gt;to less buggy wallets/exchanges, validating addresses before using them,&lt;br/&gt;using distributed multisig to prevent a localised disaster from being&lt;br/&gt;catastrophic.&lt;br/&gt;&lt;br/&gt;&amp;gt; the *rate* of coin loss at time $$t$$ is&lt;br/&gt;&amp;gt; proportional to the total supply *at that moment* in time.&lt;br/&gt;&lt;br/&gt;This is the key assumption that produces the claimed result.&lt;br/&gt;&lt;br/&gt;If you&amp;#39;re losing a constant fraction, x (Peter&amp;#39;s \lambda), of Bitcoins&lt;br/&gt;each year, then as soon as the supply increases enough that the constant&lt;br/&gt;reward, k, corresponds to the constant fraction, ie k = x*N(t), then&lt;br/&gt;you&amp;#39;ve hit an equilibrium.  (Likewise if you&amp;#39;re losing more than you&amp;#39;re&lt;br/&gt;increasing -- you just need to wait until N(t) decreases enough that you&lt;br/&gt;reach the same equilibrium point) You don&amp;#39;t really need any fancy maths.&lt;br/&gt;&lt;br/&gt;But that assumption doesn&amp;#39;t need to be true; coins could primarily be&lt;br/&gt;lost in &amp;#34;black swan&amp;#34; events (due to bugs, wars or disasters) rather&lt;br/&gt;than at a predictable rate -- with actions taken thereafter such that&lt;br/&gt;the same event repeating is no longer the same level of catastrophe,&lt;br/&gt;but instead another new black swan event is required to maintain the same&lt;br/&gt;loss rate. If that&amp;#39;s the case, then the rate at which funds are lost will&lt;br/&gt;vary chaotically, leading to &amp;#34;inflationary&amp;#34; periods in between events,&lt;br/&gt;and comparatively strong deflationary shocks when these events occur.&lt;br/&gt;&lt;br/&gt;Alternatively, losses could be at a predictable rate that&amp;#39;s entirely&lt;br/&gt;different to the one Peter assumes.&lt;br/&gt;&lt;br/&gt;One alternative predictable rate that seems plausible to me is if funds&lt;br/&gt;are lost due to people not be careful about losing small amounts; even&lt;br/&gt;though they are careful when amounts are larger. So when 10k BTC was&lt;br/&gt;worth $40, maybe it doesn&amp;#39;t matter if you misplace a hard drive with&lt;br/&gt;7500 BTC on it since that&amp;#39;s only worth $30; but by the time 7500 BTC&lt;br/&gt;is worth $150M, maybe you take a bit more care with that, but are still&lt;br/&gt;not too worried if you lose 1.5mBTC, since that&amp;#39;s also only worth $30.&lt;br/&gt;&lt;br/&gt;To mathematise that, perhaps there are K people holding Bitcoin, and with&lt;br/&gt;probability p, each loses $100 (in constant 2009 dollars say, so that we&lt;br/&gt;can ignore inflation) of that Bitcoin a year through carelessness. For&lt;br/&gt;an equilibrium to occur in that case, you need:&lt;br/&gt;&lt;br/&gt;  N(t) &#43; k - (100/P * Kp) = N(t)&lt;br/&gt;&lt;br/&gt;where P is the price of Bitcoin (again in constant 2009 dollars) and k&lt;br/&gt;is Peter&amp;#39;s fixed tail subsidy. Simplifying gives:&lt;br/&gt;&lt;br/&gt;  P = K * 100p/k&lt;br/&gt;&lt;br/&gt;But k and p are constant by assumption in this scenario, so equilibrium&lt;br/&gt;is reached only if price (P) is exactly proportional to number of&lt;br/&gt;users (K). That requires you to have a non-inflationary currency&lt;br/&gt;(supply is constant) with constant adoption (assume K doesn&amp;#39;t change)&lt;br/&gt;that maintains a constant price (P=K*100p/k) in real terms even if the&lt;br/&gt;economy is otherwise expanding or contracting.&lt;br/&gt;&lt;br/&gt;More importantly, just from a goals point of view, x is something we&lt;br/&gt;should be finding ways to minimise it over time, not leave constant.&lt;br/&gt;In fact, you could argue for an even stronger goal: &amp;#34;the real value held&lt;br/&gt;in BTC lost each year should decrease&amp;#34;, that is, x should be decreasing&lt;br/&gt;faster than 1/(N(t)*P).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:11:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqcq7tktkf4z03qeeddrf5m9d84p7sh2c2420nzmnvlv5sghfnmkqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kl4h03n</id>
    
      <title type="html">📅 Original date posted:2022-05-23 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqcq7tktkf4z03qeeddrf5m9d84p7sh2c2420nzmnvlv5sghfnmkqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kl4h03n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxjpudsgav3smntljs75tv5lpq0xuju44zc2gp2l44jteecw6uqlgzexs68&#39;&gt;nevent1q…xs68&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-23&lt;br/&gt;📝 Original message:On Wed, May 18, 2022 at 02:40:58PM -0400, Gloria Zhao via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; Does it make sense for these to be configurable, rather than implied&lt;br/&gt;&amp;gt; &amp;gt; by the version?&lt;br/&gt;&amp;gt; &amp;gt; … would it be better to either just not do sendpackages&lt;br/&gt;&amp;gt; &amp;gt; at all if you&amp;#39;re limiting ancestors in the mempool incompatibly&lt;br/&gt;&amp;gt; Effectively: if you’re setting your ancestor/descendant limits lower than&lt;br/&gt;&amp;gt; the default, you can’t do package relay. I wonder if this might be&lt;br/&gt;&amp;gt; controversial, since it adds pressure to adhere to Bitcoin Core’s current&lt;br/&gt;&amp;gt; mempool policy? I would be happy to do it this way, though - makes things&lt;br/&gt;&amp;gt; easier to implement.&lt;br/&gt;&lt;br/&gt;How about looking at it the other way: if you&amp;#39;re writing a protocol that&amp;#39;s&lt;br/&gt;dependent on people seeing that a package as a whole pays a competitive&lt;br/&gt;feerate, don&amp;#39;t you want to know in advance what conditions the network&lt;br/&gt;is going to impose on your transactions in order to consider them as a&lt;br/&gt;package? In that case, aren&amp;#39;t the &amp;#34;depth&amp;#34; and &amp;#34;size&amp;#34; constraints things&lt;br/&gt;we should specify in a standard?&lt;br/&gt;&lt;br/&gt;(The above&amp;#39;s not a rhetorical question; I&amp;#39;m not sure what the answer is.&lt;br/&gt;And even if it&amp;#39;s &amp;#34;yes&amp;#34;, maybe core&amp;#39;s defaults should be reconsidered&lt;br/&gt;rather than standardised as-is)&lt;br/&gt;&lt;br/&gt;Worst case, you could presumably do a new package relay version with&lt;br/&gt;different constraints, if needed.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 5. If &amp;#39;fRelay==false&amp;#39; in a peer&amp;#39;s version message, the node must not&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    send &amp;#34;sendpackages&amp;#34; to them. If a &amp;#34;sendpackages&amp;#34; message is&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; received by a peer after sending `fRelay==false` in their version&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; message, the sender should be disconnected.&lt;br/&gt;&amp;gt; &amp;gt; Seems better to just say &amp;#34;if you set fRelay=false in your version&lt;br/&gt;&amp;gt; &amp;gt; message, you must not send sendpackages&amp;#34;? You already won&amp;#39;t do packages&lt;br/&gt;&amp;gt; &amp;gt; with the peer if they don&amp;#39;t also announce sendpackages.&lt;br/&gt;&amp;gt; I guess, theoretically, if you allow bloom filters with this peer, it’s&lt;br/&gt;&amp;gt; plausible they’re saying “fRelay=false, I’ll send you a bloom filter later,&lt;br/&gt;&amp;gt; and I’ll also want to talk about packages.”&lt;br/&gt;&lt;br/&gt;I was just meaning &amp;#34;it&amp;#39;s okay to send VERSION fRelay=true then immediately&lt;br/&gt;send WTXIDRELAY then immediately send SENDPACKAGES&amp;#34; without having to&lt;br/&gt;first verify what the other guy&amp;#39;s fRelay was set to. On the other hand,&lt;br/&gt;you do already have to verify the other guy&amp;#39;s version is high enough,&lt;br/&gt;but it would be kind-of nice to move towards just announcing the features&lt;br/&gt;you support, and not having to make it a multistep negotiation...&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Maybe: &amp;#34;You must not send sendpackages unless you also send wtxidrelay&amp;#34; ?&lt;br/&gt;&amp;gt; Do you mean if we get a verack, and the peer sent “sendpackages” but not&lt;br/&gt;&amp;gt; “wtxidrelay,” we should disconnect them?&lt;br/&gt;&lt;br/&gt;Yes.&lt;br/&gt;&lt;br/&gt;&amp;gt; I have it as: we send a PCKG INV when this transaction’s feerate is above&lt;br/&gt;&amp;gt; the fee filter, but one or more of its parents don’t. I don’t think using&lt;br/&gt;&amp;gt; ancestor feerate is better.&lt;br/&gt;&amp;gt; See this counterexample:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://raw.githubusercontent.com/glozow/bitcoin-notes/master/mempool_garden/abc_1parent_2kids.png&#34;&gt; &lt;br/&gt;&amp;gt; A (0fee) has 2 kids, B (3sat/vB) and C (20sat/vB), everything’s the same&lt;br/&gt;&amp;gt; vsize. Let’s say the fee filter is 3sat/vB.&lt;br/&gt;&amp;gt; If we do it based on ancestor feerate, we won’t send B. But B is actually&lt;br/&gt;&amp;gt; fine; C is paying for A.&lt;br/&gt;&lt;br/&gt;But that only works if the receiver also has C, in which case they also&lt;br/&gt;have A, and you don&amp;#39;t need package relay to do anything with B? If they&lt;br/&gt;didn&amp;#39;t have C already, then relaying {A,B} would be a waste of time,&lt;br/&gt;because {A,B} would be rejected as only paying 1.5sat/vB or whatever..&lt;br/&gt;&lt;br/&gt;If you switch it to being:&lt;br/&gt;&lt;br/&gt;  A (0 sats, 200vB)&lt;br/&gt;  B (2000 sats, 200vB, spends A:0)&lt;br/&gt;  C (200 sats, 200vB)&lt;br/&gt;  D (1000 sats, 200vB, sepnds A:1, C:0)&lt;br/&gt;&lt;br/&gt;then you get:&lt;br/&gt;&lt;br/&gt;  A alone = 0s/vB&lt;br/&gt;  B&#43;A = 5s/vB&lt;br/&gt;&lt;br/&gt;  C alone = 1s/vB&lt;br/&gt;  D&#43;C&#43;A = 2s/vB&lt;br/&gt;  D&#43;C = 3s/vB      (B&#43;A already at 5s/vB)&lt;br/&gt;&lt;br/&gt;which I think recovers your point, while also having all the details&lt;br/&gt;only be dealing with direct parents.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Are &amp;#34;getpckgtxns&amp;#34; / &amp;#34;pcktxns&amp;#34; really limited to packages, or are they&lt;br/&gt;&amp;gt; &amp;gt; just a general way to request a batch of transactions?&lt;br/&gt;&amp;gt; &amp;gt; Maybe call those messages &amp;#34;getbatchtxns&amp;#34; and &amp;#34;batchtxns&amp;#34; and allow them to&lt;br/&gt;&amp;gt; &amp;gt; be used more generally, potentially in ways unrelated to packages/cpfp?&lt;br/&gt;&amp;gt; Indeed, it’s a general way to request a batch of transactions. I’ll&lt;br/&gt;&amp;gt; highlight that it is “all or nothing,” i.e. if the sender is missing any of&lt;br/&gt;&amp;gt; them, they’ll just send a notfound.&lt;br/&gt;&amp;gt; The idea here was to avoid downloading any transactions that can’t be&lt;br/&gt;&amp;gt; validated right away.&lt;br/&gt;&lt;br/&gt;Right; maybe I should just be calling a &amp;#34;batch of packages to be validated&lt;br/&gt;together&amp;#34; a &amp;#34;tx package&amp;#34; in the first place.&lt;br/&gt;&lt;br/&gt;Maybe it would be worth emphasising that you should be expecting to&lt;br/&gt;validate all the txs you receive as a response to getpckgtxns (getpkgtxs&lt;br/&gt;:) all at the same time, and immediately upon receiving them?&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; The &amp;#34;only be sent if both peers agreed to do package relay&amp;#34; rule could&lt;br/&gt;&amp;gt; &amp;gt; simply be dropped, I think.&lt;br/&gt;&amp;gt; Wouldn’t we need some way of saying “hey I support batchtxns?” Otherwise&lt;br/&gt;&amp;gt; you would have to guess by sending a request and waiting to see if it’s&lt;br/&gt;&amp;gt; ignored?&lt;br/&gt;&lt;br/&gt;Sure, perhaps I should have said leave that rule, but drop the following&lt;br/&gt;&amp;#34;should be disconnected&amp;#34; rule, so that other BIPs could add in other&lt;br/&gt;ways of negotiating the connection in future? *shrug*&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Shouldn&amp;#39;t the sender only be sending package announcements when they know&lt;br/&gt;&amp;gt; &amp;gt; the recipient will be interested in the package, based on their feefilter?&lt;br/&gt;&amp;gt; I think there are cases where the sender doesn’t necessarily know.&lt;br/&gt;&amp;gt; Consider this example:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://raw.githubusercontent.com/glozow/bitcoin-notes/master/mempool_garden/rich_parent_bad_cpfp.png&#34;&gt; &lt;br/&gt;&amp;gt; D (5sat/vB) has 2 parents, A (0sat/vB) and B (20sat/vB). All same size.&lt;br/&gt;&amp;gt; Feefilter is 3sat/vB.&lt;br/&gt;&amp;gt; If the receiver already has B, they’ll know they can just reject the&lt;br/&gt;&amp;gt; package already based on the pckginfo.&lt;br/&gt;&amp;gt; But the sender doesn’t really know that. The sender just knows A is below&lt;br/&gt;&amp;gt; feerate and D is above. D is above the fee filter, and its ancestor feerate&lt;br/&gt;&amp;gt; is above the fee filter.&lt;br/&gt;&lt;br/&gt;The sender would also need to know whether or not there&amp;#39;s some other&lt;br/&gt;child E that pays for A sufficiently?&lt;br/&gt;&lt;br/&gt;If you&amp;#39;re asking for the package for &amp;#34;D&amp;#34;, would a response telling you:&lt;br/&gt;&lt;br/&gt;  txid_D (500 sat, 100vB)&lt;br/&gt;  txid_A (0 sat, 100vB)&lt;br/&gt;  txid_B (2000 sat, 100 vB)&lt;br/&gt;&lt;br/&gt;be better, in that case? Then the receiver can maybe do the logic&lt;br/&gt;themselves to figure out that they already have A in their mempool&lt;br/&gt;so it&amp;#39;s fine, or not?&lt;br/&gt;&lt;br/&gt;If you&amp;#39;ve got a package for X, and its direct parents P1..Pn, then&lt;br/&gt;I think the logic would be:&lt;br/&gt;&lt;br/&gt;  * is X alone above my fee rate? no, then forget it&lt;br/&gt;  * otherwise, s := X.size, f := X.fees, R := [X]&lt;br/&gt;  * for P = P1..Pn:&lt;br/&gt;    * do I already have P? then skip to the next parent&lt;br/&gt;    * s &#43;= P.size, f &#43;= P.fees, R &#43;= [P]&lt;br/&gt;  * if f/s above my fee rate floor? if so, request all the txs in R&lt;br/&gt;&lt;br/&gt;and you&amp;#39;d request txs if-and-only-if they&amp;#39;re a match for you mempool rate?&lt;br/&gt;&lt;br/&gt;If you have a tx with 20 in-mempool parents, then the pkginfo1 message&lt;br/&gt;as proposed would be 737 bytes; including all the fee/size info would be&lt;br/&gt;957 bytes, maybe a 30% increase. Might be worth it though?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:09:47&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfx9n2lmf57w72klc76mjwmfprk7nts5hduduwya674gv8wjhmp5qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmdq9ap</id>
    
      <title type="html">📅 Original date posted:2022-05-17 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfx9n2lmf57w72klc76mjwmfprk7nts5hduduwya674gv8wjhmp5qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kmdq9ap" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw52qe3crec0arc0amjt0xlzu0r7dhx5ktns3wycrnxmguclswrqgqtqgc5&#39;&gt;nevent1q…qgc5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-17&lt;br/&gt;📝 Original message:On Tue, May 17, 2022 at 12:01:04PM -0400, Gloria Zhao via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; ====New Messages====&lt;br/&gt;&amp;gt; Three new protocol messages are added for use in any version of&lt;br/&gt;&amp;gt; package relay. Additionally, each version of package relay must define&lt;br/&gt;&amp;gt; its own inv type and &amp;#34;pckginfo&amp;#34; message version, referred to in this&lt;br/&gt;&amp;gt; document as &amp;#34;MSG_PCKG&amp;#34; and &amp;#34;pckginfo&amp;#34; respectively. See&lt;br/&gt;&amp;gt; BIP-v1-packages for a concrete example.&lt;br/&gt;&lt;br/&gt;The &amp;#34;PCKG&amp;#34; abbreviation threw me for a loop; isn&amp;#39;t the usual&lt;br/&gt;abbreviation &amp;#34;PKG&amp;#34; ?&lt;br/&gt;&lt;br/&gt;&amp;gt; =====sendpackages=====&lt;br/&gt;&amp;gt; |version || uint32_t || 4 || Denotes a package version supported by the&lt;br/&gt;&amp;gt; node.&lt;br/&gt;&amp;gt; |max_count || uint32_t || 4 ||Specifies the maximum number of transactions&lt;br/&gt;&amp;gt; per package this node is&lt;br/&gt;&amp;gt; willing to accept.&lt;br/&gt;&amp;gt; |max_weight || uint32_t || 4 ||Specifies the maximum total weight per&lt;br/&gt;&amp;gt; package this node is willing&lt;br/&gt;&amp;gt; to accept.&lt;br/&gt;&lt;br/&gt;Does it make sense for these to be configurable, rather than implied&lt;br/&gt;by the version? &lt;br/&gt;&lt;br/&gt;I presume the idea is to cope with people specifying different values for&lt;br/&gt;-limitancestorcount or -limitancestorsize, but if people are regularly&lt;br/&gt;relaying packages around, it seems like it becomes hard to have those&lt;br/&gt;values really be configurable while being compatible with that?&lt;br/&gt;&lt;br/&gt;I guess I&amp;#39;m asking: would it be better to either just not do sendpackages&lt;br/&gt;at all if you&amp;#39;re limiting ancestors in the mempool incompatibly; or&lt;br/&gt;alternatively, would it be better to do the package relay, then reject&lt;br/&gt;the particular package if it turns out too big, and log that you&amp;#39;ve&lt;br/&gt;dropped it so that the node operator has some way of realising &amp;#34;whoops,&lt;br/&gt;I&amp;#39;m not relaying packages properly because of how I configured my node&amp;#34;?&lt;br/&gt;&lt;br/&gt;&amp;gt; 5. If &amp;#39;fRelay==false&amp;#39; in a peer&amp;#39;s version message, the node must not&lt;br/&gt;&amp;gt;    send &amp;#34;sendpackages&amp;#34; to them. If a &amp;#34;sendpackages&amp;#34; message is&lt;br/&gt;&amp;gt; received by a peer after sending `fRelay==false` in their version&lt;br/&gt;&amp;gt; message, the sender should be disconnected.&lt;br/&gt;&lt;br/&gt;Seems better to just say &amp;#34;if you set fRelay=false in your version&lt;br/&gt;message, you must not send sendpackages&amp;#34;? You already won&amp;#39;t do packages&lt;br/&gt;with the peer if they don&amp;#39;t also announce sendpackages.&lt;br/&gt;&lt;br/&gt;&amp;gt; 7. If both peers send &amp;#34;wtxidrelay&amp;#34; and &amp;#34;sendpackages&amp;#34; with the same&lt;br/&gt;&amp;gt;    version, the peers should announce, request, and send package&lt;br/&gt;&amp;gt; information to each other.&lt;br/&gt;&lt;br/&gt;Maybe: &amp;#34;You must not send sendpackages unless you also send wtxidrelay&amp;#34; ?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;As I understand it, the two cases for the protocol flow are &amp;#34;I received&lt;br/&gt;an orphan, and I&amp;#39;d like its ancestors please&amp;#34; which seems simple enough,&lt;br/&gt;and &amp;#34;here&amp;#39;s a child you may be interested in, even though you possibly&lt;br/&gt;weren&amp;#39;t interested in the parents of that child&amp;#34;. I think the logic for&lt;br/&gt;the latter is:&lt;br/&gt;&lt;br/&gt; * if tx C&amp;#39;s fee rate is less than the peer&amp;#39;s feefilter, skip it&lt;br/&gt;   (will maybe treat it as a parent in some package later though)&lt;br/&gt; * if tx C&amp;#39;s ancestor fee rate is less than the peer&amp;#39;s feefilter, skip&lt;br/&gt;   it?&lt;br/&gt; * look at the lowest ancestor fee rate for any of C&amp;#39;s in-mempool&lt;br/&gt;   parents&lt;br/&gt; * if that is higher than the peer&amp;#39;s fee filter, send a normal INV&lt;br/&gt; * if it&amp;#39;s lower than the peer&amp;#39;s fee filter, send a PCKG INV&lt;br/&gt;&lt;br/&gt;Are &amp;#34;getpckgtxns&amp;#34; / &amp;#34;pcktxns&amp;#34; really limited to packages, or are they&lt;br/&gt;just a general way to request a batch of transactions? Particularly in&lt;br/&gt;the case of requesting the parents of an orphan tx you already have,&lt;br/&gt;it seems hard for the node receiving getpckgtxns to validate that the&lt;br/&gt;txs are related in some way; but also it doesn&amp;#39;t seem very necessary?&lt;br/&gt;&lt;br/&gt;Maybe call those messages &amp;#34;getbatchtxns&amp;#34; and &amp;#34;batchtxns&amp;#34; and allow them to&lt;br/&gt;be used more generally, potentially in ways unrelated to packages/cpfp?&lt;br/&gt;The &amp;#34;only be sent if both peers agreed to do package relay&amp;#34; rule could&lt;br/&gt;simply be dropped, I think.&lt;br/&gt;&lt;br/&gt;&amp;gt; 4. The reciever uses the package information to decide how to request&lt;br/&gt;&amp;gt;    the transactions. For example, if the receiver already has some of&lt;br/&gt;&amp;gt; the transactions in their mempool, they only request the missing ones.&lt;br/&gt;&amp;gt; They could also decide not to request the package at all based on the&lt;br/&gt;&amp;gt; fee information provided.&lt;br/&gt;&lt;br/&gt;Shouldn&amp;#39;t the sender only be sending package announcements when they know&lt;br/&gt;the recipient will be interested in the package, based on their feefilter?&lt;br/&gt;&lt;br/&gt;&amp;gt; =====pckginfo1=====&lt;br/&gt;&amp;gt; {|&lt;br/&gt;&amp;gt; |  Field Name  ||  Type  ||  Size  ||   Purpose&lt;br/&gt;&amp;gt; |-&lt;br/&gt;&amp;gt; |blockhash || uint256 || 32 || The chain tip at which this package is&lt;br/&gt;&amp;gt; defined.&lt;br/&gt;&amp;gt; |-&lt;br/&gt;&amp;gt; |pckg_fee||CAmount||4|| The sum total fees paid by all transactions in the&lt;br/&gt;&amp;gt; package.&lt;br/&gt;&lt;br/&gt;CAmount in consensus/amount.h is a int64_t so shouldn&amp;#39;t this be 8&lt;br/&gt;bytes? If you limit a package to 101kvB, an int32_t is enough to cover&lt;br/&gt;any package with a fee rate of about 212 BTC/block or lower, though.&lt;br/&gt;&lt;br/&gt;&amp;gt; |pckg_weight||int64_t||8|| The sum total weight of all transactions in the&lt;br/&gt;&amp;gt; package.&lt;br/&gt;&lt;br/&gt;The maximum block weight is 4M, and the default -limitancestorsize&lt;br/&gt;presumably implies a max package weight of 404k; seems odd to provide&lt;br/&gt;a uint64_t rather than an int32_t here, which easily allows either of&lt;br/&gt;those values?&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. &amp;#39;&amp;#39;Only 1 child with unconfirmed parents.&amp;#39;&amp;#39; The package must consist&lt;br/&gt;&amp;gt;    of one transaction and its unconfirmed parents. There must not be&lt;br/&gt;&amp;gt; any other transactions in the package. Other dependency relationships&lt;br/&gt;&amp;gt; may exist within the package (e.g. one parent may spend the output of&lt;br/&gt;&amp;gt; another parent) provided that topological order is respected.&lt;br/&gt;&lt;br/&gt;I think this means that some of the parents could also have unconfirmed&lt;br/&gt;parents, but they won&amp;#39;t be included in the package, and must be requested&lt;br/&gt;via the recipient-initiated approach?&lt;br/&gt;&lt;br/&gt;&amp;gt; 5. &amp;#39;&amp;#39;Total fees and weight.&amp;#39;&amp;#39; The &amp;#39;total_fee&amp;#39; and &amp;#39;total_weight&amp;#39;&lt;br/&gt;&amp;gt;    fields must accurately represent the sum total of all transactions&amp;#39;&lt;br/&gt;&amp;gt;    fees and weights as defined in BIP141, respectively.&lt;br/&gt;&lt;br/&gt;Presumably this excludes any unconfirmed grandparents and earlier&lt;br/&gt;ancestors since they aren&amp;#39;t part of the package, in this approach? Doesn&amp;#39;t&lt;br/&gt;that make this both harder to calculate (assuming we already have&lt;br/&gt;ancestor summaries) and less useful, in the case where those ancestors&lt;br/&gt;have a lower fee rate?&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;#39;&amp;#39;Q: Can &amp;#34;getpckgtxns&amp;#34; and &amp;#34;pckgtxns&amp;#34; messages contain only one&lt;br/&gt;&amp;gt; transaction?&amp;#39;&amp;#39;&lt;br/&gt;&amp;gt; Yes.&lt;br/&gt;&lt;br/&gt;This would be normal if you&amp;#39;re requesting a single missing parent for&lt;br/&gt;an orphan you&amp;#39;ve received, I think?&lt;br/&gt;&lt;br/&gt;I&amp;#39;m slightly surprised the process is:&lt;br/&gt;&lt;br/&gt; -&amp;gt;  INV PCKG1 C&lt;br/&gt;  &amp;lt;- GETDATA PCKG1 C&lt;br/&gt; -&amp;gt;  PCKGINFO1 blockhash A B C fee weight&lt;br/&gt;&lt;br/&gt;rather than announcing the package fee info in the first message.&lt;br/&gt;But if the sender is already applying the feefilter to the package before&lt;br/&gt;announcing it, it probably doesn&amp;#39;t matter, and means you&amp;#39;re only getting&lt;br/&gt;a 32B INV from every peer, rather than a 32*(n&#43;2) PCKGINFO1 message from&lt;br/&gt;every peer.&lt;br/&gt;&lt;br/&gt;I guess tx relay is low priority enough that it wouldn&amp;#39;t be worth tagging&lt;br/&gt;some peers as &amp;#34;high bandwidth&amp;#34; and having them immediately announce the&lt;br/&gt;PCKGINFO1 message, and skip the INV/GETDATA step?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:09:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdg829p5kww7fymzxmhvy7aqfkf4qq8gu2e5xaqc7rt7awjzj04rczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kyyxpmg</id>
    
      <title type="html">📅 Original date posted:2022-04-19 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdg829p5kww7fymzxmhvy7aqfkf4qq8gu2e5xaqc7rt7awjzj04rczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kyyxpmg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsz9gadvxkxrrjvmkly29vez86kks2hu43e3feetjrrvvj67s3vteql6fhxv&#39;&gt;nevent1q…fhxv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-19&lt;br/&gt;📝 Original message:On Thu, Feb 17, 2022 at 01:58:38PM -0800, Jeremy Rubin via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; AJ Wrote (in another thread):&lt;br/&gt;&amp;gt; &amp;gt;   I&amp;#39;d much rather see some real&lt;br/&gt;&amp;gt; &amp;gt;   third-party experimentation *somewhere* public first, and Jeremy&amp;#39;s CTV&lt;br/&gt;&amp;gt; &amp;gt;   signet being completely empty seems like a bad sign to me. &lt;br/&gt;&lt;br/&gt;There&amp;#39;s now been some 2,200 txs on CTV signet, of which (if I haven&amp;#39;t&lt;br/&gt;missed anything) 317 have been CTV spends:&lt;br/&gt;&lt;br/&gt; - none have been bare CTV (ie, CTV in scriptPubKey directly, not via&lt;br/&gt;   p2sh/p2wsh/taproot)&lt;br/&gt;&lt;br/&gt; - none have been via p2sh&lt;br/&gt;&lt;br/&gt; - 3 have been via taproot:&lt;br/&gt;    &lt;a href=&#34;https://explorer.ctvsignet.com/tx/f73f4671c6ee2bdc8da597f843b2291ca539722a168e8f6b68143b8c157bee20&#34;&gt;https://explorer.ctvsignet.com/tx/f73f4671c6ee2bdc8da597f843b2291ca539722a168e8f6b68143b8c157bee20&lt;/a&gt;&lt;br/&gt;    &lt;a href=&#34;https://explorer.ctvsignet.com/tx/7e4ade977db94117f2d7a71541d87724ccdad91fa710264206bb87ae1314c796&#34;&gt;https://explorer.ctvsignet.com/tx/7e4ade977db94117f2d7a71541d87724ccdad91fa710264206bb87ae1314c796&lt;/a&gt;&lt;br/&gt;    &lt;a href=&#34;https://explorer.ctvsignet.com/tx/e05d828bf716effc65b00ae8b826213706c216b930aff194f1fb2fca045f7f11&#34;&gt;https://explorer.ctvsignet.com/tx/e05d828bf716effc65b00ae8b826213706c216b930aff194f1fb2fca045f7f11&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;   The first two of these had alternative merkle paths, the last didn&amp;#39;t.&lt;br/&gt;&lt;br/&gt; - 314 have been via p2wsh&lt;br/&gt;    &lt;a href=&#34;https://explorer.ctvsignet.com/tx/62292138c2f55713c3c161bd7ab36c7212362b648cf3f054315853a081f5808e&#34;&gt;https://explorer.ctvsignet.com/tx/62292138c2f55713c3c161bd7ab36c7212362b648cf3f054315853a081f5808e&lt;/a&gt;&lt;br/&gt;   (don&amp;#39;t think there&amp;#39;s any meaningfully different examples?)&lt;br/&gt;&lt;br/&gt;As far as I can see, all the scripts take the form:&lt;br/&gt;&lt;br/&gt;  [PUSH 32 bytes] [OP_NOP4] [OP_DROP] [OP_1]&lt;br/&gt;&lt;br/&gt;(I didn&amp;#39;t think DROP/1 is necessary here? Doesn&amp;#39;t leaving the 32 byte&lt;br/&gt;hash on the stack evaluate as true? I guess that means everyone&amp;#39;s using&lt;br/&gt;sapio to construct the txs?)&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think there&amp;#39;s any demos of jamesob&amp;#39;s simple-ctv-vault [0], which&lt;br/&gt;I think uses a p2wsh of &amp;#34;IF n CSV DROP hotkey CHECKSIG ELSE lockcoldtx CTV&lt;br/&gt;ENDIF&amp;#34;, rather than taproot branches.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://github.com/jamesob/simple-ctv-vault&#34;&gt;https://github.com/jamesob/simple-ctv-vault&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Likewise I don&amp;#39;t think there&amp;#39;s any examples of &amp;#34;this CTV immediately;&lt;br/&gt;or if fees are too high, this other CTV that pays more fees after X&lt;br/&gt;days&amp;#34;, though potentially they could be hidden in the untaken taproot&lt;br/&gt;merkle branches.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think there&amp;#39;s any examples of two CTV outputs being combined&lt;br/&gt;and spent in a single transaction.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t see any txs with nSequence set meaningfully; though most (all?)&lt;br/&gt;of the CTV spends seem to set nSequence to 0x00400000 which I think&lt;br/&gt;doesn&amp;#39;t have a different effect from 0xfffffffe?&lt;br/&gt;&lt;br/&gt;That looks to me like there&amp;#39;s still not much practical (vs theoretical)&lt;br/&gt;exploration of CTV going on; but perhaps it&amp;#39;s an indication that CTV&lt;br/&gt;could be substantially simplified and still get all the benefits that&lt;br/&gt;people are particularly eager for.&lt;br/&gt;&lt;br/&gt;&amp;gt; I am unsure that &amp;#34;learning in public&amp;#34; is required --&lt;br/&gt;&lt;br/&gt;For a consensus system, part of the learning is &amp;#34;this doesn&amp;#39;t seem that&lt;br/&gt;interesting to me; is it actually valuable enough to others that the&lt;br/&gt;change is worth the risk it imposes on me?&amp;#34; and that&amp;#39;s not something&lt;br/&gt;you can do purely in private.&lt;br/&gt;&lt;br/&gt;One challenge with building a soft fork is that people don&amp;#39;t want to&lt;br/&gt;commit to spending time building something that relies on consensus&lt;br/&gt;features and run the risk that they might never get deployed. But the&lt;br/&gt;reverse of that is also a concern: you don&amp;#39;t want to deploy consensus&lt;br/&gt;changes and run the risk that they won&amp;#39;t actually turn out to be useful.&lt;br/&gt;&lt;br/&gt;Or, perhaps, to &amp;#34;meme-ify&amp;#34; it -- part of the &amp;#34;proof of work&amp;#34; for deploying&lt;br/&gt;a consensus change is actually proving that it&amp;#39;s going to be useful.&lt;br/&gt;Like sha256 hashing, that does require real work, and it might turn out&lt;br/&gt;to be wasteful.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:07:23&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsy86yjgp7ny0f6us7j6lpvvamyk3qef0wp4dfferr0xd48sndzyggzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ke6u0t6</id>
    
      <title type="html">📅 Original date posted:2022-04-25 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy86yjgp7ny0f6us7j6lpvvamyk3qef0wp4dfferr0xd48sndzyggzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ke6u0t6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw7gav00qqysld7aeymeumcz2p2pds6jc8s5uxx6099dyw2mcfc7spgafyd&#39;&gt;nevent1q…afyd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-25&lt;br/&gt;📝 Original message:On Mon, Apr 25, 2022 at 10:11:45AM -0600, Keagan McClelland via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; Under *any* other circumstance, when they&amp;#39;re used to activate a bad soft&lt;br/&gt;&amp;gt; &amp;gt; fork, speedy trial and bip8 are the same. If a resistance method works&lt;br/&gt;&amp;gt; &amp;gt; against bip8, it works against speedy trial; if it fails against speedy&lt;br/&gt;&amp;gt; &amp;gt; trial, it fails against bip8.&lt;br/&gt;&amp;gt; IIRC one essential difference between ST (which is a variant of BIP9) and&lt;br/&gt;&amp;gt; BIP8 is that since there is no mandatory signaling during the lockin&lt;br/&gt;&amp;gt; period, &lt;br/&gt;&lt;br/&gt;BIP8 doesn&amp;#39;t have mandatory signaling during the lockin period, it has&lt;br/&gt;semi-mandatory [0] signalling during the must_signal period. &lt;br/&gt;&lt;br/&gt;&amp;gt; you can&amp;#39;t do a counter soft fork as easily.&lt;br/&gt;&lt;br/&gt;The &amp;#34;counter&amp;#34; for bip8 activation is to reject any block during either&lt;br/&gt;the started or must_signal phases that would meet the threshold. In that&lt;br/&gt;case someone running bip8 might see blocks:&lt;br/&gt;&lt;br/&gt;  [elapsed=2010, count=1813, signal=yes]&lt;br/&gt;  [elapsed=2011, count=1813, signal=no]&lt;br/&gt;  [elapsed=2012, count=1814, signal=yes]&lt;br/&gt;  [elapsed=2013, count=1815, signal=yes, will-lockin!]&lt;br/&gt;  [elapsed=2014, count=1816, signal=yes]&lt;br/&gt;  [elapsed=2015, count=1816, signal=no]&lt;br/&gt;  [elapsed=2016, count=1816, signal=no]&lt;br/&gt;  [locked in!]&lt;br/&gt;&lt;br/&gt;But running software to reject the soft fork, you would reject the&lt;br/&gt;elapsed=2013 block, and any blocks that build on it. You would wait for&lt;br/&gt;someone else to mine a chain that looked like:&lt;br/&gt;&lt;br/&gt;  [elapsed=2013, count=1814, signal=no]&lt;br/&gt;  [elapsed=2014, count=1814, signal=no]&lt;br/&gt;  [elapsed=2015, count=1814, signal=no]&lt;br/&gt;  [elapsed=2016, count=1814, signal=no]&lt;br/&gt;  [failed!]&lt;br/&gt;&lt;br/&gt;That approach works *exactly* the same with speedy trial.&lt;br/&gt;&lt;br/&gt;Jeremy&amp;#39;s written code that does exactly this using the getdeploymentinfo&lt;br/&gt;rpc to check the deployment status, and the invalidateblock rpc to&lt;br/&gt;reject a block. See: &lt;a href=&#34;https://github.com/JeremyRubin/forkd&#34;&gt;https://github.com/JeremyRubin/forkd&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The difference to bip8 with lot=true is that nodes running speedy trial&lt;br/&gt;will reorg to follow the resisting chain if it has the most work. bip8&lt;br/&gt;with lot=true nodes will not reorg to a failing chain, potentially&lt;br/&gt;creating an ongoing chain split, unless one group or the other gives up,&lt;br/&gt;and changes their software.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] Semi-mandatory in that only &amp;#34;threshold&amp;#34; blocks must signal, so if&lt;br/&gt;    only 4% or 9% of miners aren&amp;#39;t signalling and the threshold is set&lt;br/&gt;    at 95% or 90%, no blocks will be orphaned.
    </content>
    <updated>2023-06-08T01:07:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgy8qm9n22s99vr934l0s94hp3xjfc6cksqlcct5dr8p63hum57xqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjwunu6</id>
    
      <title type="html">📅 Original date posted:2022-04-24 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgy8qm9n22s99vr934l0s94hp3xjfc6cksqlcct5dr8p63hum57xqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kjwunu6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswamu9r0my5ya0g6prmy4rj7rkum0cjeuxj4g2jh8gzwn2e6sdsdsev29ll&#39;&gt;nevent1q…29ll&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-24&lt;br/&gt;📝 Original message:On Sun, Apr 24, 2022 at 12:13:08PM &#43;0100, Jorge Timón wrote:&lt;br/&gt;&amp;gt; You&amp;#39;re not even considering user resistance in your cases. &lt;br/&gt;&lt;br/&gt;Of course I am. Again:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; My claim is that for *any* bad (evil, flawed, whatever) softfork, then&lt;br/&gt;&amp;gt; &amp;gt; attempting activation via bip8 is *never* superior to speedy trial,&lt;br/&gt;&amp;gt; &amp;gt; and in some cases is worse.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If I&amp;#39;m missing something, you only need to work through a single example&lt;br/&gt;&amp;gt; &amp;gt; to demonstrate I&amp;#39;m wrong, which seems like it ought to be easy... But&lt;br/&gt;&amp;gt; &amp;gt; just saying &amp;#34;I disagree&amp;#34; and &amp;#34;I don&amp;#39;t want to talk about that&amp;#34; isn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; going to convince anyone.&lt;br/&gt;&lt;br/&gt;The &amp;#34;some cases&amp;#34; where bip8 with lot=true is *worse* than speedy trial&lt;br/&gt;is when miners correctly see that a bad fork is bad.&lt;br/&gt;&lt;br/&gt;Under *any* other circumstance, when they&amp;#39;re used to activate a bad soft&lt;br/&gt;fork, speedy trial and bip8 are the same. If a resistance method works&lt;br/&gt;against bip8, it works against speedy trial; if it fails against speedy&lt;br/&gt;trial, it fails against bip8.&lt;br/&gt;&lt;br/&gt;&amp;gt; Sorry for the aggressive tone, but I when people ignore some of my points&lt;br/&gt;&amp;gt; repeteadly, I start to wonder if they do it on purpose. &lt;br/&gt;&lt;br/&gt;Perhaps examine the beam in your own eye.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:07:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9etl5agt9deltt7xmnwausgvc7qa8u9k4f8rpcw7qapr8sdqm23czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2knfvhhe</id>
    
      <title type="html">📅 Original date posted:2022-04-11 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9etl5agt9deltt7xmnwausgvc7qa8u9k4f8rpcw7qapr8sdqm23czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2knfvhhe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp7gr6862jhqte37epy5j602gqxzhekcevwmrggk56xufqmmq3n5g8qts3w&#39;&gt;nevent1q…ts3w&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-11&lt;br/&gt;📝 Original message:On Fri, Apr 08, 2022 at 11:58:48AM &#43;0200, Jorge Timón via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; On Wed, Mar 30, 2022 at 6:21 AM Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Let&amp;#39;s discuss those too. Feel free to point out how bip8 fails at some&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; hypothetical cases speedy trial doesn&amp;#39;t.&lt;br/&gt;&amp;gt; &amp;gt; Any case where a flawed proposal makes it through getting activation&lt;br/&gt;&amp;gt; &amp;gt; parameters set and released, but doesn&amp;#39;t achieve supermajority hashpower&lt;br/&gt;&amp;gt; &amp;gt; support is made worse by bip8/lot=true in comparison to speedy trial&lt;br/&gt;&amp;gt; I disagree. Also, again, not the hypothetical case I want to discuss.&lt;br/&gt;&lt;br/&gt;You just said &amp;#34;Let&amp;#39;s discuss those&amp;#34; and &amp;#34;Feel free to point out how bip8&lt;br/&gt;fails at some hypothetical cases speedy trial doesn&amp;#39;t&amp;#34;, now you&amp;#39;re&lt;br/&gt;saying it&amp;#39;s not what you want to discuss?&lt;br/&gt;&lt;br/&gt;But the above does include your &amp;#34;evil soft fork&amp;#34; hypothetical (I mean,&lt;br/&gt;unless you think being evil isn&amp;#39;t a flaw?). The evil soft fork gets&lt;br/&gt;proposed, and due to some failure in review, merged with activation&lt;br/&gt;parameters set (via either speedy trial or bip8), then:&lt;br/&gt;&lt;br/&gt; a) supermajority hashpower support is achieved quickly:&lt;br/&gt;     - both speedy trial and bip8&#43;lot=true activate the evil fork&lt;br/&gt;&lt;br/&gt; b) supermajority hashpower support is achieved slowly:&lt;br/&gt;     - speedy trial does *not* activate the evil fork, as it times out&lt;br/&gt;       quickly&lt;br/&gt;     - bip8 *does* activate the fork&lt;br/&gt;&lt;br/&gt; c) supermajority hashpower support support is never achieved:&lt;br/&gt;     - speedy trial does *not* activate the evil fork&lt;br/&gt;     - bip8&#43;lot=false does *not* activate the evil fork, but only after a&lt;br/&gt;       long timeout&lt;br/&gt;     - bip8&#43;lot=true *does* activate the evil fork&lt;br/&gt;&lt;br/&gt;In case (a), they both do the same thing; in case (b) speedy trial is&lt;br/&gt;superior to bip8 no matter whether lot=true/false since it blocks the&lt;br/&gt;evil fork, and in case (c) speedy trial is better than lot=false because&lt;br/&gt;it&amp;#39;s quicker, and much better than lot=true because lot=true activates&lt;br/&gt;the evil fork.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;  0&amp;#39;) someone has come up with a good idea (yay!)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;  1&amp;#39;) most of bitcoin is enthusiastically behind the idea&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;  2&amp;#39;) an enemy of bitcoin is essentially alone in trying to stop it&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;  3&amp;#39;) almost everyone remains enthusiastic, despite that guy&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; incoherent&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;      raving&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;  4&amp;#39;) nevertheless, the enemies of bitcoin should have the power to stop&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;      the good idea&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;#34;That guy&amp;#39;s incoherent raving&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;#34;I&amp;#39;m just disagreeing&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Uh, you realise the above is an alternative hypothetical, and not talking&lt;br/&gt;&amp;gt; &amp;gt; about you? I would have thought &amp;#34;that guy&amp;#34; being &amp;#34;an enemy of bitcoin&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; made that obvious... I think you&amp;#39;re mistaken; I don&amp;#39;t think your emails&lt;br/&gt;&amp;gt; &amp;gt; are incoherent ravings.&lt;br/&gt;&amp;gt; Do you realize IT IS NOT the hypothetical case I wanted to discuss. &lt;br/&gt;&lt;br/&gt;Yes, that&amp;#39;s what &amp;#34;alternative&amp;#34; means: a different one.&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m sorry, but I&amp;#39;m tired of trying to explain. and quite, honestly, you&lt;br/&gt;&amp;gt; don&amp;#39;t seem interested in listening to me and understanding me at all, but&lt;br/&gt;&amp;gt; only in &amp;#34;addressing my concerns&amp;#34;. Obviously we understand different things&lt;br/&gt;&amp;gt; by &amp;#34;addressing concerns&amp;#34;.&lt;br/&gt;&amp;gt; Perhaps it&amp;#39;s the language barrier or something.&lt;br/&gt;&lt;br/&gt;My claim is that for *any* bad (evil, flawed, whatever) softfork, then&lt;br/&gt;attempting activation via bip8 is *never* superior to speedy trial,&lt;br/&gt;and in some cases is worse.&lt;br/&gt;&lt;br/&gt;If I&amp;#39;m missing something, you only need to work through a single example&lt;br/&gt;to demonstrate I&amp;#39;m wrong, which seems like it ought to be easy... But&lt;br/&gt;just saying &amp;#34;I disagree&amp;#34; and &amp;#34;I don&amp;#39;t want to talk about that&amp;#34; isn&amp;#39;t&lt;br/&gt;going to convince anyone.&lt;br/&gt;&lt;br/&gt;I really don&amp;#39;t think the claim above should be surprising; bip8 is meant&lt;br/&gt;for activating good proposals, bad ones need to be stopped in review --&lt;br/&gt;as &amp;#34;pushd&amp;#34; has said in this thread: &amp;#34;Flawed proposal making it through&lt;br/&gt;activation is a failure of review process&amp;#34;, and Luke&amp;#39;s said similar things&lt;br/&gt;as well. The point of bip8 isn&amp;#39;t to make it easier to reject bad forks,&lt;br/&gt;it&amp;#39;s to make it easier to ensure *good* forks don&amp;#39;t get rejected. But&lt;br/&gt;that&amp;#39;s not your hypothetical, and you don&amp;#39;t want to talk about all the&lt;br/&gt;ways to stop an evil fork prior to an activation attempt...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:07:03&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0894tftfrget06tygasx4xhknk0es2wf5gszgkmp4f626k8azcnczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k7pnsrz</id>
    
      <title type="html">📅 Original date posted:2022-03-30 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0894tftfrget06tygasx4xhknk0es2wf5gszgkmp4f626k8azcnczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k7pnsrz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqvct6lujy2rn3jadp9hcs63ztf52ykk5gvgzcgxrcgc37fu5cldqkmcgxy&#39;&gt;nevent1q…cgxy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-30&lt;br/&gt;📝 Original message:On Mon, Mar 28, 2022 at 09:31:18AM &#43;0100, Jorge Timón via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; In particular, any approach that allows you to block an evil fork,&lt;br/&gt;&amp;gt; &amp;gt; even when everyone else doesn&amp;#39;t agree that it&amp;#39;s evil, would also allow&lt;br/&gt;&amp;gt; &amp;gt; an enemy of bitcoin to block a good fork, that everyone else correctly&lt;br/&gt;&amp;gt; &amp;gt; recognises is good. A solution that works for an implausible hypothetical&lt;br/&gt;&amp;gt; &amp;gt; and breaks when a single attacker decides to take advantage of it is&lt;br/&gt;&amp;gt; &amp;gt; not a good design.&lt;br/&gt;&amp;gt; Let&amp;#39;s discuss those too. Feel free to point out how bip8 fails at some&lt;br/&gt;&amp;gt; hypothetical cases speedy trial doesn&amp;#39;t.&lt;br/&gt;&lt;br/&gt;Any case where a flawed proposal makes it through getting activation&lt;br/&gt;parameters set and released, but doesn&amp;#39;t achieve supermajority hashpower&lt;br/&gt;support is made worse by bip8/lot=true in comparison to speedy trial.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s true both because of the &amp;#34;trial&amp;#34; part, in that activation can fail&lt;br/&gt;and you can go back to the drawing board without having to get everyone&lt;br/&gt;upgrade a second time, and also the &amp;#34;speedy&amp;#34; part, in that you don&amp;#39;t&lt;br/&gt;have to wait a year or more before you even know what&amp;#39;s going to happen.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;  0&amp;#39;) someone has come up with a good idea (yay!)&lt;br/&gt;&amp;gt; &amp;gt;  1&amp;#39;) most of bitcoin is enthusiastically behind the idea&lt;br/&gt;&amp;gt; &amp;gt;  2&amp;#39;) an enemy of bitcoin is essentially alone in trying to stop it&lt;br/&gt;&amp;gt; &amp;gt;  3&amp;#39;) almost everyone remains enthusiastic, despite that guy&amp;#39;s incoherent&lt;br/&gt;&amp;gt; &amp;gt;      raving&lt;br/&gt;&amp;gt; &amp;gt;  4&amp;#39;) nevertheless, the enemies of bitcoin should have the power to stop&lt;br/&gt;&amp;gt; &amp;gt;      the good idea&lt;br/&gt;&amp;gt; &amp;#34;That guy&amp;#39;s incoherent raving&amp;#34;&lt;br/&gt;&amp;gt; &amp;#34;I&amp;#39;m just disagreeing&amp;#34;.&lt;br/&gt;&lt;br/&gt;Uh, you realise the above is an alternative hypothetical, and not talking&lt;br/&gt;about you? I would have thought &amp;#34;that guy&amp;#34; being &amp;#34;an enemy of bitcoin&amp;#34;&lt;br/&gt;made that obvious... I think you&amp;#39;re mistaken; I don&amp;#39;t think your emails&lt;br/&gt;are incoherent ravings.&lt;br/&gt;&lt;br/&gt;It was intended to be the simplest possible case of where someone being&lt;br/&gt;able to block a change is undesirable: they&amp;#39;re motivated by trying to&lt;br/&gt;harm bitcoin, they&amp;#39;re as far as possible from being part of some economic&lt;br/&gt;majority, and they don&amp;#39;t even have a coherent rationale to provide for&lt;br/&gt;blocking the idea.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:06:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxz73cgqhed0zknkwvmt8zk0c49wtdazucd6l5lq3rhvr22gutcuczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kzt6uah</id>
    
      <title type="html">📅 Original date posted:2022-03-25 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxz73cgqhed0zknkwvmt8zk0c49wtdazucd6l5lq3rhvr22gutcuczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kzt6uah" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs87ptyqrfd9m99cratu6p8vy0e7ave8thuzszvryd8nvwdtcw7ymqsl5fvx&#39;&gt;nevent1q…5fvx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-25&lt;br/&gt;📝 Original message:On Thu, Mar 24, 2022 at 07:30:09PM &#43;0100, Jorge Timón via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Sorry, I won&amp;#39;t answer to everything, because it&amp;#39;s clear you&amp;#39;re not listening.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not agreeing with you; that&amp;#39;s different to not listening to you.&lt;br/&gt;&lt;br/&gt;&amp;gt; In the HYPOTHETICAL CASE that there&amp;#39;s an evil for, the fork being evil&lt;br/&gt;&amp;gt; is a PREMISE of that hypothetical case, a GIVEN.&lt;br/&gt;&lt;br/&gt;Do you really find people more inclined to start agreeing with you when&lt;br/&gt;you begin yelling at them? When other people start shouting at you,&lt;br/&gt;do you feel like it&amp;#39;s a discussion that you&amp;#39;re engaged in?&lt;br/&gt;&lt;br/&gt;&amp;gt; Your claim that &amp;#34;if it&amp;#39;s evil, good people would oppose it&amp;#34; is a NON&lt;br/&gt;&amp;gt; SEQUITUR, &amp;#34;good people&amp;#34; aren&amp;#39;t necessarily perfect and all knowing.&lt;br/&gt;&amp;gt; good people can make mistakes, they can be fooled too.&lt;br/&gt;&amp;gt; In the hypothetical case that THERE&amp;#39;S AN EVIL FORK, if &amp;#34;good people&amp;#34;&lt;br/&gt;&amp;gt; don&amp;#39;t complain, it is because they didn&amp;#39;t realize that the given fork&lt;br/&gt;&amp;gt; was evil. Because in our hypothetical example THE EVIL FORK IS EVIL BY&lt;br/&gt;&amp;gt; DEFINITION, THAT&amp;#39;S THE HYPOTHETICAL CASE I WANT TO DISCUSS, not the&lt;br/&gt;&amp;gt; hypothetical case where there&amp;#39;s a fork some people think it&amp;#39;s evil but&lt;br/&gt;&amp;gt; it&amp;#39;s not really evil.&lt;br/&gt;&lt;br/&gt;The problem with that approach is that any solution we come up with&lt;br/&gt;doesn&amp;#39;t only have to deal with the hypotheticals you want to discuss.&lt;br/&gt;&lt;br/&gt;In particular, any approach that allows you to block an evil fork,&lt;br/&gt;even when everyone else doesn&amp;#39;t agree that it&amp;#39;s evil, would also allow&lt;br/&gt;an enemy of bitcoin to block a good fork, that everyone else correctly&lt;br/&gt;recognises is good. A solution that works for an implausible hypothetical&lt;br/&gt;and breaks when a single attacker decides to take advantage of it is&lt;br/&gt;not a good design.&lt;br/&gt;&lt;br/&gt;And I did already address what to do in exactly that scenario:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; But hey what about the worst case: what if everyone else in bitcoin&lt;br/&gt;&amp;gt; &amp;gt; is evil and supports doing evil things. And maybe that&amp;#39;s not even&lt;br/&gt;&amp;gt; &amp;gt; implausible: maybe it&amp;#39;s not an &amp;#34;evil&amp;#34; thing per se, perhaps [...]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In that scenario, I think a hard fork is the best choice: split out a new&lt;br/&gt;&amp;gt; &amp;gt; coin that will survive the upcoming crash, adjust the mining/difficulty&lt;br/&gt;&amp;gt; &amp;gt; algorithm so it works from day one, and set it up so that you can&lt;br/&gt;&amp;gt; &amp;gt; maintain it along with the people who support your vision, rather than&lt;br/&gt;&amp;gt; &amp;gt; having to constantly deal with well-meaning attacks from &amp;#34;bitcoiners&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; who don&amp;#39;t see the risks and have lost the plot.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Basically: do what Satoshi did and create a better system, and let&lt;br/&gt;&amp;gt; &amp;gt; everyone else join you as the problems with the old one eventually become&lt;br/&gt;&amp;gt; &amp;gt; unavoidably obvious.&lt;br/&gt;&lt;br/&gt;&amp;gt; Once you understand what hypothetical case I&amp;#39;m talking about, maybe&lt;br/&gt;&amp;gt; you can understand the rest of my reasoning.&lt;br/&gt;&lt;br/&gt;As I understand it, your hypothetical is:&lt;br/&gt;&lt;br/&gt; 0) someone has come up with a bad idea&lt;br/&gt; 1) most of bitcoin is enthusiastically behind the idea&lt;br/&gt; 2) you are essentially alone in discovering that it&amp;#39;s a bad idea&lt;br/&gt; 3) almost everyone remains enthusiastic, despite your explanations that&lt;br/&gt;    it&amp;#39;s a bad idea&lt;br/&gt; 4) nevertheless, you and your colleagues who are aware the idea is bad&lt;br/&gt;    should have the power to stop the bad idea&lt;br/&gt; 5) bip8 gives you the power to stop the bad idea but speedy trial does not&lt;br/&gt;&lt;br/&gt;Again given (0), I think (1) and (2) are already not very likely, and (3)&lt;br/&gt;is simply not plausible. But in the event that it does somehow occur,&lt;br/&gt;I disagree with (4) for the reasons I describe above; namely, that any&lt;br/&gt;mechanism that did allow that would be unable to distinguish between the&lt;br/&gt;&amp;#34;bad idea&amp;#34; case and something along the lines of:&lt;br/&gt;&lt;br/&gt; 0&amp;#39;) someone has come up with a good idea (yay!)&lt;br/&gt; 1&amp;#39;) most of bitcoin is enthusiastically behind the idea&lt;br/&gt; 2&amp;#39;) an enemy of bitcoin is essentially alone in trying to stop it&lt;br/&gt; 3&amp;#39;) almost everyone remains enthusiastic, despite that guy&amp;#39;s incoherent&lt;br/&gt;     raving&lt;br/&gt; 4&amp;#39;) nevertheless, the enemies of bitcoin should have the power to stop&lt;br/&gt;     the good idea&lt;br/&gt;&lt;br/&gt;And, as I said in the previous mail, I think (5) is false, independently&lt;br/&gt;of any of the other conditions.&lt;br/&gt;&lt;br/&gt;&amp;gt; But if you don&amp;#39;t understand the PREMISES of my example, &lt;br/&gt;&lt;br/&gt;You can come up with hypothetical premises that invalidate bitcoin,&lt;br/&gt;let alone some activation method. For example, imagine if the Federal&lt;br/&gt;Reserve Board are full of geniuses and know exactly when to keep issuance&lt;br/&gt;predictable and when to juice the economy? Having flexibility gives more&lt;br/&gt;options than hardcoding &amp;#34;21M&amp;#34; somewhere, so clearly the USD&amp;#39;s approach&lt;br/&gt;is the way to go, and everything is just a matter of appointing the&lt;br/&gt;right people to the board, not all this decentralised stuff. &lt;br/&gt;&lt;br/&gt;The right answer is to reject bad premises, not to argue hypotheticals&lt;br/&gt;that have zero relationship to reality.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:06:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgf6kjhyrvcazl9rwqfe84a7c355htdhktsz29f2ppxatsp8eq7ugzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kwqcsj0</id>
    
      <title type="html">📅 Original date posted:2022-03-22 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgf6kjhyrvcazl9rwqfe84a7c355htdhktsz29f2ppxatsp8eq7ugzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kwqcsj0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8f5aj5ml9kv0l5ds897axev6v8wntgff0d6nm2zuxje4vgpguryspgwwxv&#39;&gt;nevent1q…wwxv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-22&lt;br/&gt;📝 Original message:On Thu, Mar 17, 2022 at 03:04:32PM &#43;0100, Jorge Timón via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; On Tue, Mar 15, 2022 at 4:45 PM Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; On Fri, Mar 11, 2022 at 02:04:29PM &#43;0000, Jorge Timón via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; People opposed to having taproot transactions in their chain had over&lt;br/&gt;&amp;gt; &amp;gt; three years to do that coordination before an activation method was merged&lt;br/&gt;&amp;gt; &amp;gt; [0], and then an additional seven months after the activation method was merged before taproot enforcement began [1].&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [0] 2018-01-23 was the original proposal, 2021-04-15 was when speedy&lt;br/&gt;&amp;gt; &amp;gt;     trial activation parameters for mainnet and testnet were merged.&lt;br/&gt;&amp;gt; &amp;gt; [1] 2021-11-14&lt;br/&gt;&amp;gt; People may be opposed only to the final version, but not the initial&lt;br/&gt;&amp;gt; one or the fundamental concept.&lt;br/&gt;&amp;gt; Please, try to think of worse case scenarios.&lt;br/&gt;&lt;br/&gt;I mean, I&amp;#39;ve already spent a lot of time thinking through these worst&lt;br/&gt;cast scenarios, including the ones you bring up. Maybe I&amp;#39;ve come up with&lt;br/&gt;wrong or suboptimal conclusions about it, and I&amp;#39;m happy to discuss that,&lt;br/&gt;but it&amp;#39;s a bit hard to avoid taking offense at the suggestion that I&lt;br/&gt;haven&amp;#39;t even thought about it.&lt;br/&gt;&lt;br/&gt;In the case of taproot, the final substantive update to the BIP was PR#982&lt;br/&gt;merged on 2020-08-27 -- so even if you&amp;#39;d only been opposed to the changes&lt;br/&gt;in the final version (32B pubkeys perhaps?) you&amp;#39;d have had 1.5 months to&lt;br/&gt;raise those concerns before the code implementing taproot was merged,&lt;br/&gt;and 6 months to raise those concerns before activation parameters were&lt;br/&gt;set. If you&amp;#39;d been following the discussion outside of the code and BIP&lt;br/&gt;text, in the case of 32B pubkeys, you&amp;#39;d have had an additional 15 months&lt;br/&gt;from the time the idea was proposed on 2019-05-22 (or 2019-05-29 if you&lt;br/&gt;only follow optech&amp;#39;s summaries) until it was included in the BIP.&lt;br/&gt;&lt;br/&gt;&amp;gt; Perhaps there&amp;#39;s no opposition until after activation code has been&lt;br/&gt;&amp;gt; released and miners are already starting to signal.&lt;br/&gt;&amp;gt; Perhaps at that moment a reviewer comes and points out a fatal flaw.&lt;br/&gt;&lt;br/&gt;Perhaps there&amp;#39;s no opposition until the change has been deployed and in&lt;br/&gt;wide use for 30 years. Aborting activation isn&amp;#39;t the be-all and end-all&lt;br/&gt;of addressing problems with a proposal, and it&amp;#39;s not going to be able to&lt;br/&gt;deal with every problem. For any problems that can be found before the&lt;br/&gt;change is deployed and in use, you want to find them while the proposal&lt;br/&gt;is being discussed.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;More broadly, what I don&amp;#39;t think you&amp;#39;re getting is that *any* method you&lt;br/&gt;can use to abort/veto/revert an activation that&amp;#39;s occuring via BIP8 (with&lt;br/&gt;or without mandatory activation), can also be used to abort/veto/revert&lt;br/&gt;a speedy trial activation.&lt;br/&gt;&lt;br/&gt;Speedy trial simply changes two things: it allows a minority (~10%)&lt;br/&gt;of hashpower to abort the activation; and it guarantees a &amp;#34;yes&amp;#34; or &amp;#34;no&amp;#34;&lt;br/&gt;answer within three months, while with BIP343 you initially don&amp;#39;t know&lt;br/&gt;when within a ~1 year period activation will occur.&lt;br/&gt;&lt;br/&gt;If you&amp;#39;re part of an (apparent) minority trying to abort/veto/reject&lt;br/&gt;activation, this gives you an additional option: if you can get support&lt;br/&gt;from ~10% of hashpower, you can force an initial &amp;#34;no&amp;#34; answer within&lt;br/&gt;three months, at which point many of the people who were ignoring your&lt;br/&gt;arguments up until then may be willing to reconsider them.&lt;br/&gt;&lt;br/&gt;For example, I think Mark Friedenbach&amp;#39;s concerns about unhashed pubkeys&lt;br/&gt;and quantum resistance don&amp;#39;t make sense, and (therefore) aren&amp;#39;t widely&lt;br/&gt;held; but if 10% of blocks during taproot&amp;#39;s speedy trial had included a&lt;br/&gt;tagline indicating otherwise and prevented activation, that would have&lt;br/&gt;been pretty clear objective evidence that the concern was more widely&lt;br/&gt;held than I thought, and might be worth reconsidering. Likewise, there&lt;br/&gt;could have somehow been other problems that somehow were being ignored,&lt;br/&gt;that could have similarly been reprioritised in the same way.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s not the way that you *want* things to work -- ideally people&lt;br/&gt;should be raising the concerns beforehand, and they should be taken&lt;br/&gt;seriously and fixed or addressed beforehand. That did happen with Mark&amp;#39;s&lt;br/&gt;concerns -- heck, I raised it as a question ~6 hours after Greg&amp;#39;s original&lt;br/&gt;taproot proposal -- and it&amp;#39;s directly addressed in the rationale section&lt;br/&gt;of BIP341.&lt;br/&gt;&lt;br/&gt;But in the worst case; maybe that doesn&amp;#39;t happen. Maybe bitcoin-dev and&lt;br/&gt;other places are somehow being censored, or sensible critics are being&lt;br/&gt;demonised and ignored. The advantage of a hashrate veto here is that it&amp;#39;s&lt;br/&gt;hard to fake and hard to censor -- whereas with mailing list messages and&lt;br/&gt;the like, it&amp;#39;s both easy to fake (setup sockpuppets and pay troll farms)&lt;br/&gt;and easy to censor (ban/moderate people for spamming say). So as a last&lt;br/&gt;ditch &amp;#34;we&amp;#39;ve been censored, please take us seriously&amp;#34; method of protest,&lt;br/&gt;it seems worthwhile to have to me.&lt;br/&gt;&lt;br/&gt;(Of course, a 90% majority might *still* choose to not take the concerns&lt;br/&gt;of the 10% minority seriously, and just continue to ignore the concern&lt;br/&gt;and followup with an immediate mandatory activation. But if that&amp;#39;s what&lt;br/&gt;happening, you can&amp;#39;t stop it; you can&amp;#39;t only choose whether you want to&lt;br/&gt;be a part of it, or leave)&lt;br/&gt;&lt;br/&gt;Another example: if we&amp;#39;d had a 3-month speedy trial for segwit, that would&lt;br/&gt;presumably have run from 2016-11-15 to 2017-02-15, and been successfully&lt;br/&gt;blocked by people objecting to segwit activation. That would have left a&lt;br/&gt;clean slate for either a simple and safe BIP149 style UASF activation of&lt;br/&gt;segwit (shaolinfry introduced the concept of &amp;#34;user activated softfork&lt;br/&gt;activation&amp;#34; in a post on 2017-02-25), or redesigning segwit to be&lt;br/&gt;compatible with covert ASICBoost (which Greg Maxwell revealed publicly&lt;br/&gt;on 2017-04-05, after apparently realising the potential interaction&lt;br/&gt;with segwit a month earlier) and retrying segwit activation with that&lt;br/&gt;approach via a new speedy trial later in the year.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; For comparison, the UASF activation attempt for segwit took between 4&lt;br/&gt;&amp;gt; &amp;gt; to 6 months to coordinate, assuming you start counting from either the&lt;br/&gt;&amp;gt; &amp;gt; &amp;#34;user activated soft fork&amp;#34; concept being raised on bitcoin-dev or the&lt;br/&gt;&amp;gt; &amp;gt; final params for BIP 148 being merged into the bips repo, and stop&lt;br/&gt;&amp;gt; &amp;gt; counting when segwit locked in.&lt;br/&gt;&amp;gt; That was extremely risky and could have been a disaster. &lt;br/&gt;&lt;br/&gt;The question that comment was addressing wasn&amp;#39;t whether BIP148 was a&lt;br/&gt;good idea, it was how quickly users can coordinate a software update to&lt;br/&gt;respond to consensus rules heading in a direction they find unacceptable.&lt;br/&gt;&lt;br/&gt;All the risk and potential for disaster was due to the goals of BIP148:&lt;br/&gt;to get segwit locked in prior to its activation timeout in Nov 2017,&lt;br/&gt;even if only supported by a minority of hashrate.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;  2) If that somehow doesn&amp;#39;t work, and people are pushing ahead with a&lt;br/&gt;&amp;gt; &amp;gt;     consensus change despite significant reasonable opposition; the next&lt;br/&gt;&amp;gt; &amp;gt;     thing to do would be to establish if either side is a paper tiger&lt;br/&gt;&amp;gt; &amp;gt;     and setup a futures market. That has the extra benefit of giving&lt;br/&gt;&amp;gt; &amp;gt;     miners some information about which (combination of) rules will be&lt;br/&gt;&amp;gt; &amp;gt;     most profitable to mine for.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     Once that&amp;#39;s setup and price discovery happens, one side or the other&lt;br/&gt;&amp;gt; &amp;gt;     will probably throw in the towel -- there&amp;#39;s not much point have a&lt;br/&gt;&amp;gt; &amp;gt;     money that other people aren&amp;#39;t interested in using. (And that more&lt;br/&gt;&amp;gt; &amp;gt;     or less is what happened with 2X)&lt;br/&gt;&amp;gt; Future markets can be manipulated.&lt;br/&gt;&lt;br/&gt;Futures markets measure people&amp;#39;s beliefs weighted by wealth and&lt;br/&gt;confidence; and unlike with hashrate signalling there&amp;#39;s a real cost to&lt;br/&gt;lying/being wrong. They&amp;#39;re certainly not perfect, but nothing is.&lt;br/&gt;&lt;br/&gt;&amp;gt; Regarding 2x, that&amp;#39;s not how I remember it. If I remember correctly,&lt;br/&gt;&amp;gt; &amp;#34;discovered&amp;#34; a price in btc for bcash that was&lt;br/&gt;&amp;gt; orders of magnitude higher than what it is today.&lt;br/&gt;&lt;br/&gt;2x and BCH were two different things.&lt;br/&gt;&lt;br/&gt;For BCH, the only futures market was run by viabtc (one of the main&lt;br/&gt;advocates of BCH), was only available a week before the split, and was&lt;br/&gt;(I think?) only available to Chinese investors (at least, it was only&lt;br/&gt;traded against CNY). Nevertheless, the price stabilised at around&lt;br/&gt;$300USD equivalent (0.1 BTC) prior to the split, and that was fairly&lt;br/&gt;in line with the spot price after the split had occurred. That price&lt;br/&gt;dropped during the next two weeks to ~0.07 BTC, then rose to ~0.2 BTC,&lt;br/&gt;and has since dropped to ~0.008 BTC. Coincidentally that&amp;#39;s about $300USD&lt;br/&gt;in today&amp;#39;s market, so if you&amp;#39;re pricing things in USD, the futures market&lt;br/&gt;was actually weirdly accurate.&lt;br/&gt;&lt;br/&gt;Viabtc also launched a market for BIP148, though in addition to the&lt;br/&gt;problems with its BCH market, it was pretty unusable in that if the&lt;br/&gt;BIP148-valid chain was the most-work chain, the BIP148 token wouldn&amp;#39;t&lt;br/&gt;be redeemed.&lt;br/&gt;&lt;br/&gt;But the 2x market I was thinking of was bitfinex&amp;#39;s; afaik bitfinex is&lt;br/&gt;reasonably unbiased, the market was fairly accessible and could be traded&lt;br/&gt;against the USD, and it was open for a month before the question of 2x&lt;br/&gt;was definitevely resolved. The discovered price was about 0.2 BTC up&lt;br/&gt;until it was announced that 2x was being abandoned at which point it&lt;br/&gt;dropped to something like 0.02 BTC, representing holding costs until&lt;br/&gt;the market was finalised about 2 months later.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;     If a futures market like that is going to be setup, I think it&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt;     best if it happens before signalling for the soft fork starts --&lt;br/&gt;&amp;gt; &amp;gt;     the information miners will get from it is useful for figuring out&lt;br/&gt;&amp;gt; &amp;gt;     how much resources to invest in signalling, eg. I think it might even&lt;br/&gt;&amp;gt; &amp;gt;     be feasible to set something up even before activation parameters are&lt;br/&gt;&amp;gt; &amp;gt;     finalised; you need something more than just one-on-one twitter bets&lt;br/&gt;&amp;gt; &amp;gt;     to get meaningful price discovery, but I think you could probably&lt;br/&gt;&amp;gt; &amp;gt;     build something based on a reasonably unbiassed oracle declaring an&lt;br/&gt;&amp;gt; &amp;gt;     outcome, without precisely defined parameters fixed in a BIP.&lt;br/&gt;&amp;gt; Whatever miners signal, until there are two chains and their real&lt;br/&gt;&amp;gt; rewards can be traded, it&amp;#39;s hard to know what they will mine&lt;br/&gt;&amp;gt; afterwards.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t agree. The BCH futures market accurately predicted the rewards&lt;br/&gt;(and hence hashrate) for mining BCH in the first couple of weeks after&lt;br/&gt;the split.&lt;br/&gt;&lt;br/&gt;On the same basis, the 2x futures market predicted that mining the 2x&lt;br/&gt;chain would be massively unprofitable: immediately after the split,&lt;br/&gt;both the 2x chain and the original-rules chain would have the same&lt;br/&gt;difficulty and hence have the same expected cost to mine a block; but&lt;br/&gt;the 2x chain would only have 25% of the reward (0.2 vs 0.8 valuation per&lt;br/&gt;the futures market). Without someone subsidising the first 2016 blocks on&lt;br/&gt;the 2x chain to the tune of about ~15,000 pre-split bitcoin (or ~75,000&lt;br/&gt;post-split 2x coins; or between $80M-$150M USD), either directly, or by&lt;br/&gt;mining at an economic loss, the 2x chain could only collapse.&lt;br/&gt;&lt;br/&gt;BCH avoided that fate by having a new difficulty adjustment algorithm&lt;br/&gt;that allowed the difficulty to drop immediately, rather than only on&lt;br/&gt;the next 2016 block boundary.&lt;br/&gt;&lt;br/&gt;&amp;gt; They could signal a change with 100% and then after it is activated on&lt;br/&gt;&amp;gt; one chain and resisted on another, they 95% of them may switch to the&lt;br/&gt;&amp;gt; old chain simply because its rewards are 20 times more valuable. This&lt;br/&gt;&amp;gt; may happen 3 days after activation or 3 months, or more.&lt;br/&gt;&lt;br/&gt;If it&amp;#39;s an either-or choice, it&amp;#39;s likely that 99.9% of hashrate will&lt;br/&gt;switch even if the rewards are only 0.1 times more valuable (or 1.1&lt;br/&gt;times as valuable if you prefer). That&amp;#39;s why you run a futures market,&lt;br/&gt;to figure out which will be more valuable and by how much.&lt;br/&gt;&lt;br/&gt;We saw the either-or case happen with BCH vs BTC; the difficulty of BCH&lt;br/&gt;would drop quickly due to the &amp;#34;EDA&amp;#34;, but only rise slowly, making BCH&lt;br/&gt;mining more profitable for an extended period so that opportunistic miners&lt;br/&gt;would switch to BCH for a while until it got expensive again then switch&lt;br/&gt;back to BTC, causing both chains&amp;#39; hashrate to be unstable. &lt;br/&gt;&lt;br/&gt;But if you don&amp;#39;t hard fork to a different difficulty adjustment algorithm&lt;br/&gt;the way BCH did on day one, then it doesn&amp;#39;t matter how long miners&lt;br/&gt;don&amp;#39;t mine on your chain, your chain&amp;#39;s difficulty won&amp;#39;t adjust, and so&lt;br/&gt;you&amp;#39;ll need to instead wait until BTC&amp;#39;s difficulty doubles or more,&lt;br/&gt;or its reward halves or more, or some combination of the two. That&amp;#39;s&lt;br/&gt;likely much more than 3 months away. I can&amp;#39;t imagine why anyone would&lt;br/&gt;still care about your proposed chain months or years later.&lt;br/&gt;&lt;br/&gt;So hardforking in merge-mining (so it&amp;#39;s not an either-or question) or&lt;br/&gt;a new difficulty adjustment algorithm (so you don&amp;#39;t have to wait months&lt;br/&gt;or years) seems a much more realistic approach.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;     So if acting like reasonable people and talking it through doesn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt;     work, this seems like the next step to me.&lt;br/&gt;&amp;gt; Not to me, but you&amp;#39;re free to create your future markets or trade in them.&lt;br/&gt;&amp;gt; I wouldn&amp;#39;t do any of them, and I would advice against it.&lt;br/&gt;&lt;br/&gt;*shrug* Do what you like (and I mean, I don&amp;#39;t trade in futures markets&lt;br/&gt;either) but I think you&amp;#39;d be missing out on very useful information,&lt;br/&gt;and losing a chance for people who aren&amp;#39;t devs to offer tangible and&lt;br/&gt;objective support for your cause.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;     I think the speedy trial approach here is ideal for a last ditch&lt;br/&gt;&amp;gt; &amp;gt;     &amp;#34;everyone stays on the same chain while avoiding this horrible change&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt;     attempt. The reason being that it allows everyone to agree to not&lt;br/&gt;&amp;gt; &amp;gt;     adopt the new rules with only very little cost: all you need is for&lt;br/&gt;&amp;gt; &amp;gt;     10% of hashpower to not signal over a three month period.&lt;br/&gt;&amp;gt; No, 10% of hashpower is not &amp;#34;very little cost&amp;#34;, that&amp;#39;s very expensive.&lt;br/&gt;&lt;br/&gt;If we&amp;#39;re talking about consensus changes, the target is 100% of hashpower,&lt;br/&gt;and also something approaching 100% of nodes. By comparison 10% of&lt;br/&gt;hashpower is *much* cheaper, especially when the 100% have to actively&lt;br/&gt;upgrade in order to support, while the 10% just have to not do anything&lt;br/&gt;in order to oppose.&lt;br/&gt;&lt;br/&gt;To be clear: You don&amp;#39;t have to setup the 10% of hashpower yourself,&lt;br/&gt;you just have to convince the existing owners of 10% of hashpower to&lt;br/&gt;not actively support the change.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;     That&amp;#39;s cheaper than bip9 (5% over 12 months requires 2x the&lt;br/&gt;&amp;gt; &amp;gt;     cumulative hashpower), and much cheaper than bip8 which requires&lt;br/&gt;&amp;gt; &amp;gt;     users to update their software&lt;br/&gt;&amp;gt; Updating software is not expensive. the code for bip8 could have been&lt;br/&gt;&amp;gt; merged long before taproot was even initially proposed.&lt;br/&gt;&amp;gt; It could be merged now before another proposal.&lt;br/&gt;&lt;br/&gt;The BIP8 spec we have today is very different to the BIP8 spec when&lt;br/&gt;taproot was merged, let alone before it was even proposed. As it was,&lt;br/&gt;it had serious problems that hadn&amp;#39;t been addressed, and the version we&lt;br/&gt;have today likewise has significant problems that haven&amp;#39;t been addressed,&lt;br/&gt;which is why it wasn&amp;#39;t and shouldn&amp;#39;t be merged.&lt;br/&gt;&lt;br/&gt;&amp;gt; Updating software is certainly not more expensive than getting 10% of&lt;br/&gt;&amp;gt; the hashrate.&lt;br/&gt;&lt;br/&gt;Updating software (or not updating software) is precisely *how* to get&lt;br/&gt;10% of hashrate. It&amp;#39;s not more or less expensive -- it *is* the expense.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;  4) At this point, if you were able to prevent activation, hopefully&lt;br/&gt;&amp;gt; &amp;gt;     that&amp;#39;s enough of a power move that people will take your concerns&lt;br/&gt;&amp;gt; &amp;gt;     seriously, and you get a second chance at step (1). If that still&lt;br/&gt;&amp;gt; &amp;gt;     results in an impasse, I&amp;#39;d expect there to be a second, non-speedy&lt;br/&gt;&amp;gt; &amp;gt;     activation of the soft fork, that either cannot be blocked at all, or&lt;br/&gt;&amp;gt; &amp;gt;     cannot be blocked without having control of at least 60% of hashpower.&lt;br/&gt;&amp;gt; And if you never got 10% hashpower, we move to the next step, I guess.&lt;br/&gt;&lt;br/&gt;Yes; you then move to the next step knowing that what level of&lt;br/&gt;interest/support you actually have.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;  5) If you weren&amp;#39;t able to prevent activation (whether or not you&lt;br/&gt;&amp;gt; &amp;gt;     prevented speedy trial from working), then you should have a lot&lt;br/&gt;&amp;gt; &amp;gt;     of information:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;       - you weren&amp;#39;t able to convince people there was a problem&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;       - you either weren&amp;#39;t in the economic majority and people don&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt;         think your concept of bitcoin is more valuable (perhaps they&lt;br/&gt;&amp;gt; &amp;gt;         don&amp;#39;t even think it&amp;#39;s valuable enough to setup a futures market&lt;br/&gt;&amp;gt; &amp;gt;         for you)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;       - you can&amp;#39;t get control of even 10% of hashpower for a few months&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     and your only option is to accept defeat or create a new chain.&lt;br/&gt;&amp;gt; What if it&amp;#39;s still the other people who are lacking information?&lt;br/&gt;&lt;br/&gt;If it&amp;#39;s other people that lack information, there&amp;#39;s two options. One,&lt;br/&gt;you might be able to explain things to them, so that they learn and gain&lt;br/&gt;the information. The other is that for whatever reason they&amp;#39;re not willing&lt;br/&gt;to listen to the truth and will remain ignorant. If it&amp;#39;s the first case,&lt;br/&gt;you&amp;#39;d have succeeded in an earlier step. If it&amp;#39;s the latter, then it&amp;#39;s&lt;br/&gt;not something you can change, and it doesn&amp;#39;t really matter in how you&lt;br/&gt;decide what to do next.&lt;br/&gt;&lt;br/&gt;&amp;gt; It wouldn&amp;#39;t be a new chain, it would be the old chain without the new&lt;br/&gt;&amp;gt; evil change, until you manage to show the other people that the change&lt;br/&gt;&amp;gt; was indeed evil.&lt;br/&gt;&amp;gt; Remember, in this example, the new change being evil is not a&lt;br/&gt;&amp;gt; possibility, but an assumption.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s extremely unhelpful to call things &amp;#34;evil&amp;#34; if what you want is a&lt;br/&gt;reasonable discussion. And if reasonable discussion isn&amp;#39;t what you want,&lt;br/&gt;you&amp;#39;re in the wrong place.&lt;br/&gt;&lt;br/&gt;At this point in the hypothetical you&amp;#39;re in a small minority, and have&lt;br/&gt;been unable to convince people of your point of view. Calling the people&lt;br/&gt;you disagree with &amp;#34;evil&amp;#34; (and saying they support something that&amp;#39;s evil&lt;br/&gt;is exactly that) isn&amp;#39;t going to improve your situation, and doing it in&lt;br/&gt;a hypothetical sure feels like bad faith.&lt;br/&gt;&lt;br/&gt;&amp;gt; What you&amp;#39;re arguing is &amp;#34;if you haven&amp;#39;t been able to stop the evil&lt;br/&gt;&amp;gt; change, then perhaps it wasn&amp;#39;t evil all along and the people trying to&lt;br/&gt;&amp;gt; resist it were wrong and don&amp;#39;t know it&amp;#34;.&lt;br/&gt;&lt;br/&gt;If it&amp;#39;s an evil change, then good people will oppose it. You&amp;#39;ve tried&lt;br/&gt;convincing devs in the &amp;#34;discuss the proposal&amp;#34; stage, whales in the&lt;br/&gt;&amp;#34;futures market&amp;#34; stage, and miners in the &amp;#34;hashpower signalling&amp;#34; phase,&lt;br/&gt;and failed each time because the good people in each of those groups&lt;br/&gt;haven&amp;#39;t opposed it. So yes, I think the most likely explanation is that&lt;br/&gt;you&amp;#39;re wrong in thinking it&amp;#39;s evil.&lt;br/&gt;&lt;br/&gt;But hey what about the worst case: what if everyone else in bitcoin&lt;br/&gt;is evil and supports doing evil things. And maybe that&amp;#39;s not even&lt;br/&gt;implausible: maybe it&amp;#39;s not an &amp;#34;evil&amp;#34; thing per se, perhaps it&amp;#39;s simply&lt;br/&gt;equally &amp;#34;misguided&amp;#34; as the things that central banks or wall street or&lt;br/&gt;similar are doing today. Perhaps bitcoin becomes the world currency,&lt;br/&gt;and in 100 or 200 years time, whether through complacency and forgetting&lt;br/&gt;the lessons of the past, or too much adherence to dogma that no longer&lt;br/&gt;matches reality, or just hitting some new problem that&amp;#39;s never been seen&lt;br/&gt;before and an inability to perfectly predict the future, and as a result&lt;br/&gt;most of the world opts into some change that will cause bitcoin to fail.&lt;br/&gt;&lt;br/&gt;In that scenario, I think a hard fork is the best choice: split out a new&lt;br/&gt;coin that will survive the upcoming crash, adjust the mining/difficulty&lt;br/&gt;algorithm so it works from day one, and set it up so that you can&lt;br/&gt;maintain it along with the people who support your vision, rather than&lt;br/&gt;having to constantly deal with well-meaning attacks from &amp;#34;bitcoiners&amp;#34;&lt;br/&gt;who don&amp;#39;t see the risks and have lost the plot.&lt;br/&gt;&lt;br/&gt;Basically: do what Satoshi did and create a better system, and let&lt;br/&gt;everyone else join you as the problems with the old one eventually become&lt;br/&gt;unavoidably obvious.&lt;br/&gt;&lt;br/&gt;&amp;gt; But that contradicts the premise: an evil change being deployed using&lt;br/&gt;&amp;gt; speedy trial.&lt;br/&gt;&lt;br/&gt;Again: any change that could be avoided if it were deployed via BIP8,&lt;br/&gt;can also be avoided *by the exact same techniques* if it were deployed&lt;br/&gt;via speedy trial or a similar approach.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;     Since your new chain won&amp;#39;t have a hashpower majority, you&amp;#39;ll likely&lt;br/&gt;&amp;gt; &amp;gt;     have significant problems if you don&amp;#39;t hard fork in a change to&lt;br/&gt;&amp;gt; &amp;gt;     how proof-of-work works; my guess is you&amp;#39;d either want to switch&lt;br/&gt;&amp;gt; &amp;gt;     to a different proof-of-work algorithm, or make your chain able&lt;br/&gt;&amp;gt; &amp;gt;     to be merge-mined against bitcoin, though just following BCH/BSV&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt;     example and tweaking the difficulty adjustment to be more dynamic&lt;br/&gt;&amp;gt; &amp;gt;     could work too.&lt;br/&gt;&amp;gt; No, I disagree. You&amp;#39;ll just get the hashpower you pay for with subsidy and fees.&lt;br/&gt;&lt;br/&gt;The value of the subsidy is something you can directly figure out from&lt;br/&gt;running a futures market; and unless you&amp;#39;re deliberately subsidising fees,&lt;br/&gt;they&amp;#39;ll almost certainly be ~0.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;     (For comparison, apparently BCH has 0.8% of bitcoin&amp;#39;s hashrate,&lt;br/&gt;&amp;gt; &amp;gt;     BSV has 0.2%. Meanwhile, Namecoin, RSK and Syscoin, which support&lt;br/&gt;&amp;gt; &amp;gt;     merge-mining, are apparently at 68%, 42% and 17% respectively)&lt;br/&gt;&amp;gt; Google tells me 0.0073BTC.&lt;br/&gt;&lt;br/&gt;I think you&amp;#39;re reading too much precision into those numbers? When&lt;br/&gt;I looked again the other day, I got a figure of 0.66%; today I get&lt;br/&gt;0.75%. I&amp;#39;m sure I rounded whatever figure I saw to one significant figure,&lt;br/&gt;so it might have been 0.75% then too.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://bitinfocharts.com/comparison/bitcoin-hashrate.html#3y&#34;&gt;https://bitinfocharts.com/comparison/bitcoin-hashrate.html#3y&lt;/a&gt;&lt;br/&gt;&lt;a href=&#34;https://bitinfocharts.com/comparison/bitcoin%20cash-hashrate.html#3y&#34;&gt;https://bitinfocharts.com/comparison/bitcoin%20cash-hashrate.html#3y&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; In perfect competition and leaving fees aside (in which probably&lt;br/&gt;&amp;gt; bitcoin wins too), BCH should have approximately 0.0073% the hashrate&lt;br/&gt;&amp;gt; bitcoin hash.&lt;br/&gt;&lt;br/&gt;Oh, or you&amp;#39;re just getting the percentage conversion wrong -- 0.0073&lt;br/&gt;BTC is 0.73% of a BTC, and thus it would be expected to have about 0.73%&lt;br/&gt;of the hashrate.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;     At the point that you&amp;#39;re doing a hard fork, making a clean split is&lt;br/&gt;&amp;gt; &amp;gt;     straightforward: schedule the hard fork for around the same time as&lt;br/&gt;&amp;gt; &amp;gt;     the start of enforcement of the soft fork you oppose, work out how&lt;br/&gt;&amp;gt; &amp;gt;     to make sure you&amp;#39;re on your own p2p network, and figure out how&lt;br/&gt;&amp;gt; &amp;gt;     exchanges and lightning channels and everything else are going to&lt;br/&gt;&amp;gt; &amp;gt;     cope with the coin split.&lt;br/&gt;&amp;gt; You shouldn&amp;#39;t need to do a hardfork to resist a consensus change you don&amp;#39;t like.&lt;br/&gt;&lt;br/&gt;Of course; that&amp;#39;s why option (1) is to talk to people about why it&amp;#39;s a&lt;br/&gt;bad idea so it doesn&amp;#39;t get proposed in the first place.&lt;br/&gt;&lt;br/&gt;But if you want to resist a consensus change that is overwhelmingly&lt;br/&gt;supported by the rest of the bitcoin economy, and for which your reasons&lt;br/&gt;aren&amp;#39;t even considered particularly logical by everyone else, then yeah,&lt;br/&gt;if you really want to go off on your own because everyone else is wrong,&lt;br/&gt;you *should* do a hardfork.&lt;br/&gt;&lt;br/&gt;If a change doesn&amp;#39;t have overwhelming support, then hopefully the costs&lt;br/&gt;to get 90% of hashrate signalling is a significant impediment. If you do&lt;br/&gt;have overwhelming support, then the cost to get 90% of hashrate signalling&lt;br/&gt;(or even apparently 99.8%, see getdeploymentinfo on block 693503) --&lt;br/&gt;doesn&amp;#39;t seem to be too bad.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;#34;around the same time&amp;#34;, with bip8 and the resistance mechanism&lt;br/&gt;&amp;gt; proposed by luke, it doesn&amp;#39;t need to be &amp;#34;around the same time&lt;br/&gt;&amp;gt; according to some expert who will tell you what to put in your&lt;br/&gt;&amp;gt; software&amp;#34;, but &amp;#34;exactly at the same time, and you only need to know&lt;br/&gt;&amp;gt; which pproposal version bit you&amp;#39;re opposing&amp;#34;.&lt;br/&gt;&lt;br/&gt;(Arguing semantics: You can&amp;#39;t do the split at exactly the same time,&lt;br/&gt;because the split starts with each chain finding a new block, and blocks&lt;br/&gt;are found probabilistically depending on hashrate, so they won&amp;#39;t be found&lt;br/&gt;at the same time. Or, alternatively, the split happens whenever either&lt;br/&gt;client considers the other chain invalid, and always happens at the&lt;br/&gt;&amp;#34;same&amp;#34; time)&lt;br/&gt;&lt;br/&gt;If you want to do things at exactly the same height, you can do that if&lt;br/&gt;the soft fork is activated by speedy trial as well.&lt;br/&gt;&lt;br/&gt;I&amp;#39;d say the same height approach works better on speedy trial than&lt;br/&gt;with BIP8/BIP343, since with speedy trial signalling is only for a&lt;br/&gt;short period, and hence you know well in advance if and when you&amp;#39;ll be&lt;br/&gt;splitting, whereas with an extended signalling period that goes for a&lt;br/&gt;year past the minimum activation height, you may find yourself splitting&lt;br/&gt;at any point in that year with as little as two week&amp;#39;s notice.&lt;br/&gt;&lt;br/&gt;If I were doing a hardfork coin split to avoid following some new soft&lt;br/&gt;forked rules that I think were horrible, I think I&amp;#39;d prefer to do the&lt;br/&gt;split in advance of the softfork -- that way exchanges/wallets/lightning&lt;br/&gt;channels/etc that have to do work to deal with the coinsplit aren&amp;#39;t&lt;br/&gt;distracted by simultaneously having to pay attention to the new softfork.&lt;br/&gt;YMMV of course.&lt;br/&gt;&lt;br/&gt;&amp;gt; Yeah, great example. It doesn&amp;#39;t have to be an &amp;#34;evil change&amp;#34; as such,&lt;br/&gt;&amp;gt; it can just be a &amp;#34;deeply wrong change&amp;#34; or something.&lt;br/&gt;&amp;gt; Or if we were using BIP8 and had the resistance mechanism proposed by&lt;br/&gt;&amp;gt; luke, all we would need to do is change one line and recompile:&lt;br/&gt;&amp;gt; I don&amp;#39;t remember his enumeration constants but, something like...&lt;br/&gt;&amp;gt; - bip8Params.EvilProposalActivationMode = FORCE_ACTIVATION;&lt;br/&gt;&amp;gt; &#43; bip8Params.EvilProposalActivationMode = FORBID_ACTIVATION;&lt;br/&gt;&amp;gt; Say we discover it 3 days before forced activation.&lt;br/&gt;&amp;gt; Well, that would still be much less rushed that the berkeleyDB thing,&lt;br/&gt;&amp;gt; wouldn&amp;#39;t it?&lt;br/&gt;&lt;br/&gt;No, exactly the opposite.&lt;br/&gt;&lt;br/&gt;In order to abort a BIP8 activation, 100% of hashpower and 100% of&lt;br/&gt;node software needs to downgrade from anything that specifies BIP8 with&lt;br/&gt;mandatory activation.&lt;br/&gt;&lt;br/&gt;The &amp;#34;berkelyDB thing&amp;#34; was an accidental hard fork due to the updated&lt;br/&gt;software with leveldb being able to accept larger blocks than the old&lt;br/&gt;bdb-based bitcoind could. &lt;br/&gt;&lt;br/&gt;The result was two chains: one with a large block in it, that could&lt;br/&gt;only be validated by the newer software, and a less work chain with only&lt;br/&gt;smaller chains, that could be validated by both versions of the software;&lt;br/&gt;the problem was ~60% of hashpower was on the larger-block chain, but&lt;br/&gt;many nodes including those with ~40% hashpower. The problem was quickly&lt;br/&gt;mitigated by encouraging a majority of hashpower to downgrade to the&lt;br/&gt;old software, resulting in them rejecting the larger-block chain,&lt;br/&gt;at which point a majority of hashpower was mining the smaller-block&lt;br/&gt;chain, and the smaller-block chain eventually having more work than&lt;br/&gt;the larger-block chain. At that point any newer nodes reorged to the&lt;br/&gt;more-work, smaller-block chain, and everyone was following the same chain.&lt;br/&gt;&lt;br/&gt;What that means is that the operators of *two* pools downgraded their&lt;br/&gt;software, and everything was fixed. That&amp;#39;s a *lot* less work than&lt;br/&gt;everyone who upgraded their node having to downgrade/re-update, and&lt;br/&gt;it was done that way to *avoid* having to rush to get everyone to do&lt;br/&gt;an emergency update of their node software to be compatible with the&lt;br/&gt;larger-block chain.&lt;br/&gt;&lt;br/&gt;See &lt;a href=&#34;https://bitcoin.org/en/alert/2013-03-11-chain-fork&#34;&gt;https://bitcoin.org/en/alert/2013-03-11-chain-fork&lt;/a&gt;&lt;br/&gt;and &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0050.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0050.mediawiki&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On the other hand, that approach only works because it takes advantage&lt;br/&gt;of a lot of hashrate being centralised around a few pools; if we succeed&lt;br/&gt;in making block construction more decentralised, solutions here will&lt;br/&gt;only become harder.&lt;br/&gt;&lt;br/&gt;&amp;gt; If there&amp;#39;s only opposition after it is deployed, whatever the&lt;br/&gt;&amp;gt; activation mechanism, in that particular case, would be irrelevant.&lt;br/&gt;&lt;br/&gt;Once you&amp;#39;ve released software with a softfork activated via BIP8 with&lt;br/&gt;mandatory activation (ie, lot=true), and it has achieved any significant&lt;br/&gt;adoption, the soft fork is already deployed and you need to treat it as&lt;br/&gt;such. If you want to have an easier way of undoing the softfork than&lt;br/&gt;you would have for one that&amp;#39;s already active on the network, you need&lt;br/&gt;a different activation method than BIP8/lot=true.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:06:14&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswerj3fjelsgkf7whrx3fwvrav8jylscrc9qjpq9xy2t9kjm78enszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kesw7lw</id>
    
      <title type="html">📅 Original date posted:2022-03-15 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswerj3fjelsgkf7whrx3fwvrav8jylscrc9qjpq9xy2t9kjm78enszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kesw7lw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyvvfpwa4apwz250xljg7c27pvpg5en6jchdc34xjept4a0elxvucp7pkrc&#39;&gt;nevent1q…pkrc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-15&lt;br/&gt;📝 Original message:On Fri, Mar 11, 2022 at 02:04:29PM &#43;0000, Jorge Timón via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt;  Thirdly, if some users insist on a chain where taproot is&lt;br/&gt;&amp;gt; &amp;gt; &amp;#34;not activated&amp;#34;, they can always softk-fork in their own rule that&lt;br/&gt;&amp;gt; &amp;gt; disallows the version bits that complete the Speedy Trial activation&lt;br/&gt;&amp;gt; &amp;gt; sequence, or alternatively soft-fork in a rule to make spending from (or&lt;br/&gt;&amp;gt; &amp;gt; to) taproot addresses illegal.&lt;br/&gt;&amp;gt; Since it&amp;#39;s about activation in general and not about taproot specifically,&lt;br/&gt;&amp;gt; your third point is the one that applies.&lt;br/&gt;&amp;gt; Users could have coordinated to have &amp;#34;activation x&amp;#34; never activated in&lt;br/&gt;&amp;gt; their chains if they simply make a rule that activating a given proposal&lt;br/&gt;&amp;gt; (with bip8) is forbidden in their chain.&lt;br/&gt;&amp;gt; But coordination requires time.&lt;br/&gt;&lt;br/&gt;People opposed to having taproot transactions in their chain had over&lt;br/&gt;three years to do that coordination before an activation method was merged&lt;br/&gt;[0], and then an additional seven months after the activation method was merged before taproot enforcement began [1].&lt;br/&gt;&lt;br/&gt;[0] 2018-01-23 was the original proposal, 2021-04-15 was when speedy&lt;br/&gt;    trial activation parameters for mainnet and testnet were merged.&lt;br/&gt;[1] 2021-11-14&lt;br/&gt;&lt;br/&gt;For comparison, the UASF activation attempt for segwit took between 4&lt;br/&gt;to 6 months to coordinate, assuming you start counting from either the&lt;br/&gt;&amp;#34;user activated soft fork&amp;#34; concept being raised on bitcoin-dev or the&lt;br/&gt;final params for BIP 148 being merged into the bips repo, and stop&lt;br/&gt;counting when segwit locked in.&lt;br/&gt;&lt;br/&gt;&amp;gt; Please, try to imagine an example for an activation that you wouldn&amp;#39;t like&lt;br/&gt;&amp;gt; yourself. Imagine it gets proposed and you, as a user, want to resist it.&lt;br/&gt;&lt;br/&gt;Sure. There&amp;#39;s more steps than just &amp;#34;fork off onto a minority chain&amp;#34;&lt;br/&gt;though.&lt;br/&gt;&lt;br/&gt; 1) The first and most important step is to explain why you want to&lt;br/&gt;    resist it, either to convince the proposers that there really is&lt;br/&gt;    a problem and they should stand down, or so someone can come up&lt;br/&gt;    with a way of fixing the proposal so you don&amp;#39;t need to resist it.&lt;br/&gt;    Ideally, that&amp;#39;s all that&amp;#39;s needed to resolve the objections. (That&amp;#39;s&lt;br/&gt;    what didn&amp;#39;t happen with opposition to segwit)&lt;br/&gt;&lt;br/&gt; 2) If that somehow doesn&amp;#39;t work, and people are pushing ahead with a&lt;br/&gt;    consensus change despite significant reasonable opposition; the next&lt;br/&gt;    thing to do would be to establish if either side is a paper tiger&lt;br/&gt;    and setup a futures market. That has the extra benefit of giving&lt;br/&gt;    miners some information about which (combination of) rules will be&lt;br/&gt;    most profitable to mine for.&lt;br/&gt;&lt;br/&gt;    Once that&amp;#39;s setup and price discovery happens, one side or the other&lt;br/&gt;    will probably throw in the towel -- there&amp;#39;s not much point have a&lt;br/&gt;    money that other people aren&amp;#39;t interested in using. (And that more&lt;br/&gt;    or less is what happened with 2X)&lt;br/&gt;&lt;br/&gt;    If a futures market like that is going to be setup, I think it&amp;#39;s&lt;br/&gt;    best if it happens before signalling for the soft fork starts --&lt;br/&gt;    the information miners will get from it is useful for figuring out&lt;br/&gt;    how much resources to invest in signalling, eg. I think it might even&lt;br/&gt;    be feasible to set something up even before activation parameters are&lt;br/&gt;    finalised; you need something more than just one-on-one twitter bets&lt;br/&gt;    to get meaningful price discovery, but I think you could probably&lt;br/&gt;    build something based on a reasonably unbiassed oracle declaring an&lt;br/&gt;    outcome, without precisely defined parameters fixed in a BIP.&lt;br/&gt;&lt;br/&gt;    So if acting like reasonable people and talking it through doesn&amp;#39;t&lt;br/&gt;    work, this seems like the next step to me.&lt;br/&gt;&lt;br/&gt; 3) But maybe you try both those and they fail and people start trying&lt;br/&gt;    to activate the soft fork (or perhaps you just weren&amp;#39;t paying&lt;br/&gt;    attention until it was too late, and missed the opportunity).&lt;br/&gt;&lt;br/&gt;    I think the speedy trial approach here is ideal for a last ditch&lt;br/&gt;    &amp;#34;everyone stays on the same chain while avoiding this horrible change&amp;#34;&lt;br/&gt;    attempt. The reason being that it allows everyone to agree to not&lt;br/&gt;    adopt the new rules with only very little cost: all you need is for&lt;br/&gt;    10% of hashpower to not signal over a three month period.&lt;br/&gt;&lt;br/&gt;    That&amp;#39;s cheaper than bip9 (5% over 12 months requires 2x the&lt;br/&gt;    cumulative hashpower), and much cheaper than bip8 which requires&lt;br/&gt;    users to update their software&lt;br/&gt;&lt;br/&gt; 4) At this point, if you were able to prevent activation, hopefully&lt;br/&gt;    that&amp;#39;s enough of a power move that people will take your concerns&lt;br/&gt;    seriously, and you get a second chance at step (1). If that still&lt;br/&gt;    results in an impasse, I&amp;#39;d expect there to be a second, non-speedy&lt;br/&gt;    activation of the soft fork, that either cannot be blocked at all, or&lt;br/&gt;    cannot be blocked without having control of at least 60% of hashpower.&lt;br/&gt;&lt;br/&gt; 5) If you weren&amp;#39;t able to prevent activation (whether or not you&lt;br/&gt;    prevented speedy trial from working), then you should have a lot&lt;br/&gt;    of information:&lt;br/&gt;&lt;br/&gt;      - you weren&amp;#39;t able to convince people there was a problem&lt;br/&gt;&lt;br/&gt;      - you either weren&amp;#39;t in the economic majority and people don&amp;#39;t&lt;br/&gt;        think your concept of bitcoin is more valuable (perhaps they&lt;br/&gt;	don&amp;#39;t even think it&amp;#39;s valuable enough to setup a futures market&lt;br/&gt;	for you)&lt;br/&gt;&lt;br/&gt;      - you can&amp;#39;t get control of even 10% of hashpower for a few months&lt;br/&gt;&lt;br/&gt;    and your only option is to accept defeat or create a new chain.&lt;br/&gt;&lt;br/&gt;    Since your new chain won&amp;#39;t have a hashpower majority, you&amp;#39;ll likely&lt;br/&gt;    have significant problems if you don&amp;#39;t hard fork in a change to&lt;br/&gt;    how proof-of-work works; my guess is you&amp;#39;d either want to switch&lt;br/&gt;    to a different proof-of-work algorithm, or make your chain able&lt;br/&gt;    to be merge-mined against bitcoin, though just following BCH/BSV&amp;#39;s&lt;br/&gt;    example and tweaking the difficulty adjustment to be more dynamic&lt;br/&gt;    could work too.&lt;br/&gt;&lt;br/&gt;    (For comparison, apparently BCH has 0.8% of bitcoin&amp;#39;s hashrate,&lt;br/&gt;    BSV has 0.2%. Meanwhile, Namecoin, RSK and Syscoin, which support&lt;br/&gt;    merge-mining, are apparently at 68%, 42% and 17% respectively)&lt;br/&gt;&lt;br/&gt;    At the point that you&amp;#39;re doing a hard fork, making a clean split is&lt;br/&gt;    straightforward: schedule the hard fork for around the same time as&lt;br/&gt;    the start of enforcement of the soft fork you oppose, work out how&lt;br/&gt;    to make sure you&amp;#39;re on your own p2p network, and figure out how&lt;br/&gt;    exchanges and lightning channels and everything else are going to&lt;br/&gt;    cope with the coin split.&lt;br/&gt;&lt;br/&gt; 6) There&amp;#39;s potentially also the case where a soft fork locks-in&lt;br/&gt;    and later everyone realises the people who were opposing it were&lt;br/&gt;    right all along and the fork is a really bad idea.&lt;br/&gt;&lt;br/&gt;    If everyone agreed that some idea was irredeemably bad -- eg,&lt;br/&gt;    OP_VERIF -- then we could soft fork them out and just forbid&lt;br/&gt;    blocks/transactions that attempt to use them. Or conceivably we could&lt;br/&gt;    do a hardfork and have more options about how to fix the problem.&lt;br/&gt;&lt;br/&gt;    That&amp;#39;s already true for various features that satoshi included and&lt;br/&gt;    that are still available today -- eg the CHECKMULTISIG bug where&lt;br/&gt;    it pops one too many things from the stack, or the timewarp bug,&lt;br/&gt;    or CODESEP/FindAndDelete validation complexity.&lt;br/&gt;&lt;br/&gt;    Those can be complicated to fix though; if people have lost their&lt;br/&gt;    private keys and are sitting on (timelocked?) pre-signed transactions,&lt;br/&gt;    even fixing the problem via a hard fork could cause loss of funds.&lt;br/&gt;&lt;br/&gt;But those are really progressively worse options -- just talking to each&lt;br/&gt;other and solving the problem before it&amp;#39;s a problem is a better approach&lt;br/&gt;than risking money on futures markets; and that&amp;#39;s better than having to&lt;br/&gt;buy hashpower to try to block something that other people want; and that&amp;#39;s&lt;br/&gt;better than forking the chain; and even that&amp;#39;s better than doing things&lt;br/&gt;that might cause irretrievable loss of funds from random other bitcoiners.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:06:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswc6tmlte3kdg8qhk6j8n82fn7usnuwuqwajjh30fvyxgcx3m8wcszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k54kfqg</id>
    
      <title type="html">📅 Original date posted:2022-03-10 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswc6tmlte3kdg8qhk6j8n82fn7usnuwuqwajjh30fvyxgcx3m8wcszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k54kfqg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8kefng2q5rjzlh0xtzgum8k8d7jz8z2s54t2kg24dw6uuemudlng49cvhz&#39;&gt;nevent1q…cvhz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-10&lt;br/&gt;📝 Original message:On Tue, Mar 08, 2022 at 06:54:56PM -0800, Bram Cohen via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; On Mon, Mar 7, 2022 at 5:27 PM Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; One way to match the way bitcoin do things, you could have the &amp;#34;list of&lt;br/&gt;&amp;gt; &amp;gt; extra conditions&amp;#34; encoded explicitly in the transaction via the annex,&lt;br/&gt;&amp;gt; &amp;gt; and then check the extra conditions when the script is executed.&lt;br/&gt;&amp;gt; The conditions are already basically what&amp;#39;s in transactions. I think the&lt;br/&gt;&amp;gt; only thing missing is the assertion about one&amp;#39;s own id, which could be&lt;br/&gt;&amp;gt; added in by, in addition to passing the scriptpubkey the transaction it&amp;#39;s&lt;br/&gt;&amp;gt; part of, also passing in the index of inputs which it itself is.&lt;br/&gt;&lt;br/&gt;To redo the singleton pattern in bitcoin&amp;#39;s context, I think you&amp;#39;d have&lt;br/&gt;to pass in both the full tx you&amp;#39;re spending (to be able to get the&lt;br/&gt;txid of its parent) and the full tx of its parent (to be able to get&lt;br/&gt;the scriptPubKey that your utxo spent) which seems klunky but at least&lt;br/&gt;possible (you&amp;#39;d be able to drop the witness data at least; without that&lt;br/&gt;every tx would be including the entire history of the singleton).&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; A nice side benefit of sticking with the UTXO model is that the soft fork&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; hook can be that all unknown opcodes make the entire thing automatically&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; pass.&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think that works well if you want to allow the spender (the&lt;br/&gt;&amp;gt; &amp;gt; puzzle solution) to be able to use opcodes introduced in a soft-fork&lt;br/&gt;&amp;gt; &amp;gt; (eg, for graftroot-like behaviour)?&lt;br/&gt;&amp;gt; This is already the approach to soft forking in Bitcoin script and I don&amp;#39;t&lt;br/&gt;&amp;gt; see anything wrong with it.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s fine in Bitcoin script, because the scriptPubKey already commits to&lt;br/&gt;all the opcodes that can possibly be used for any particular output. With&lt;br/&gt;a lisp approach, however, you could pass in additional code fragments&lt;br/&gt;to execute. For example, where you currently say:&lt;br/&gt;&lt;br/&gt;  script: [pubkey] CHECKSIG&lt;br/&gt;  witness: [64B signature][0x83]&lt;br/&gt;&lt;br/&gt;(where 0x83 is SINGLE|ANYONECANPAY) you might translate that to:&lt;br/&gt;&lt;br/&gt;  script: (checksig pubkey (bip342-txmsg 3) 2)&lt;br/&gt;  witness: signature 0x83&lt;br/&gt;&lt;br/&gt;where &amp;#34;3&amp;#34; grabs the sighash byte, and &amp;#34;2&amp;#34; grabs the signature. But you&lt;br/&gt;could also translate it to:&lt;br/&gt;&lt;br/&gt;  script: (checksig pubkey (sha256 3 (a 3)) 2)&lt;br/&gt;  witness: signature (bip342-txmsg 0x83)&lt;br/&gt;&lt;br/&gt;where &amp;#34;a 3&amp;#34; takes &amp;#34;(bip342-txmsg 0x83)&amp;#34; then evaluates it, and (sha256&lt;br/&gt;3 (a 3)) makes sure you&amp;#39;ve signed off on both how the message was&lt;br/&gt;constructed as well as what the message was. The advantage there is that&lt;br/&gt;the spender can then create their own signature hashes however they like;&lt;br/&gt;even ones that hadn&amp;#39;t been thought of when the output was created.&lt;br/&gt;&lt;br/&gt;But what if we later softfork in a bip118-txmsg for quick and easy&lt;br/&gt;ANYPREVOUT style-signatures, and want to use that instead of custom&lt;br/&gt;lisp code? You can&amp;#39;t just stick (softfork C (bip118-txmsg 0xc3)) into&lt;br/&gt;the witness, because it will evaluate to nil and you won&amp;#39;t be signing&lt;br/&gt;anything. But you *could* change the script to something like:&lt;br/&gt;&lt;br/&gt;  script: (softfork C (q checksigverify pubkey (a 3) 2))&lt;br/&gt;  witness: signature (bip118-txmsg 0xc3)&lt;br/&gt;&lt;br/&gt;But what happens if the witness instead has:&lt;br/&gt;&lt;br/&gt;  script: (softfork C (q checksigverify pubkey (a 3) 2))&lt;br/&gt;  witness: fake-signature (fakeopcode 0xff)&lt;br/&gt;&lt;br/&gt;If softfork is just doing a best effort for whatever opcodes it knows&lt;br/&gt;about, and otherwise succeeding, then it has to succeed, and your&lt;br/&gt;script/output has become anyone-can-spend.&lt;br/&gt;&lt;br/&gt;On the other hand, if you could tell the softfork op that you only wanted&lt;br/&gt;ops up-to-and-including the 118 softfork, then it could reject fakeopcode&lt;br/&gt;and fail the script, which I think gives the desirable behaviour.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:05:22&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstfl2rgc0vzasrqwg92jufcqpf3ecczklh6uysdk3csa8qsjua50qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kv4ethc</id>
    
      <title type="html">📅 Original date posted:2022-03-07 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstfl2rgc0vzasrqwg92jufcqpf3ecczklh6uysdk3csa8qsjua50qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kv4ethc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqk9p6lpfphsum5qpntxhpfj69m2tkj0fxf4d4kfy48uztuv33pdst0l7yw&#39;&gt;nevent1q…l7yw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-07&lt;br/&gt;📝 Original message:On Sun, Mar 06, 2022 at 10:26:47PM -0800, Bram Cohen via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; After looking into it, I actually think chia lisp [1] gets pretty much all&lt;br/&gt;&amp;gt; &amp;gt; the major design decisions pretty much right. There are obviously a few&lt;br/&gt;&amp;gt; &amp;gt; changes needed given the differences in design between chia and bitcoin:&lt;br/&gt;&amp;gt; Bitcoin uses the UTXO model as opposed to Chia&amp;#39;s Coin Set model. While&lt;br/&gt;&amp;gt; these are close enough that it&amp;#39;s often explained as Chia uses the UTXO&lt;br/&gt;&amp;gt; model but that isn&amp;#39;t technically true. Relevant to the above comment is&lt;br/&gt;&amp;gt; that in the UTXO model transactions get passed to a scriptpubkey and it&lt;br/&gt;&amp;gt; either assert fails or it doesn&amp;#39;t, while in the coin set model each puzzle&lt;br/&gt;&amp;gt; (scriptpubkey) gets run and either assert fails or returns a list of extra&lt;br/&gt;&amp;gt; conditions it has, possibly including timelocks and creating new coins,&lt;br/&gt;&amp;gt; paying fees, and other things.&lt;br/&gt;&lt;br/&gt;One way to match the way bitcoin do things, you could have the &amp;#34;list of&lt;br/&gt;extra conditions&amp;#34; encoded explicitly in the transaction via the annex,&lt;br/&gt;and then check the extra conditions when the script is executed.&lt;br/&gt;&lt;br/&gt;&amp;gt; If you&amp;#39;re doing everything from scratch it&amp;#39;s cleaner to go with the coin&lt;br/&gt;&amp;gt; set model, but retrofitting onto existing Bitcoin it may be best to leave&lt;br/&gt;&amp;gt; the UTXO model intact and compensate by adding a bunch more opcodes which&lt;br/&gt;&amp;gt; are special to parsing Bitcoin transactions. The transaction format itself&lt;br/&gt;&amp;gt; can be mostly left alone but to enable some of the extra tricks (mostly&lt;br/&gt;&amp;gt; implementing capabilities) it&amp;#39;s probably a good idea to make new&lt;br/&gt;&amp;gt; conventions for how a transaction can have advisory information which&lt;br/&gt;&amp;gt; specifies which of the inputs to a transaction is the parent of a specific&lt;br/&gt;&amp;gt; output and also info which is used for communication between the UTXOs in a&lt;br/&gt;&amp;gt; transaction.&lt;br/&gt;&lt;br/&gt;I think the parent/child coin relationship is only interesting when&lt;br/&gt;&amp;#34;unrelated&amp;#34; spends can assert that the child coin is being created -- ie&lt;br/&gt;things along the lines of the &amp;#34;transaction sponsorship&amp;#34; proposal. My&lt;br/&gt;feeling is that complicates the mempool a bit much, so is best left for&lt;br/&gt;later, if done at all.&lt;br/&gt;&lt;br/&gt;(I think the hard part of managing the extra conditions is mostly&lt;br/&gt;in keeping it efficient to manage the mempool and construct the most&lt;br/&gt;profitable blocks/bundles, rather than where the data goes)&lt;br/&gt;&lt;br/&gt;&amp;gt; But one could also make lisp-generated UTXOs be based off transactions&lt;br/&gt;&amp;gt; which look completely trivial and have all their important information be&lt;br/&gt;&amp;gt; stored separately in a new vbytes area. That works but results in a bit of&lt;br/&gt;&amp;gt; a dual identity where some coins have both an old style id and a new style&lt;br/&gt;&amp;gt; id which gunks up what&lt;br/&gt;&lt;br/&gt;We&amp;#39;ve already got a txid and a wtxid, adding more ids seems best avoided&lt;br/&gt;if possible...&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Pretty much all the opcodes in the first section are directly from chia&lt;br/&gt;&amp;gt; &amp;gt; lisp, while all the rest are to complete the &amp;#34;bitcoin&amp;#34; functionality.&lt;br/&gt;&amp;gt; &amp;gt; The last two are extensions that are more food for thought than a real&lt;br/&gt;&amp;gt; &amp;gt; proposal.&lt;br/&gt;&amp;gt; Are you thinking of this as a completely alternative script format or an&lt;br/&gt;&amp;gt; extension to bitcoin script?&lt;br/&gt;&lt;br/&gt;As an alternative to tapscript, so when constructing the merkle tree of&lt;br/&gt;scripts for a taproot address, you could have some of those scripts be&lt;br/&gt;in tapscript as it exists today with OP_CHECKSIG etc, and others could&lt;br/&gt;be in lisp. (You could then have an entirely lisp-based sub-merkle-tree&lt;br/&gt;of lisp fragments via sha256tree or similar of course)&lt;br/&gt;&lt;br/&gt;&amp;gt; They&amp;#39;re radically different approaches and&lt;br/&gt;&amp;gt; it&amp;#39;s hard to see how they mix. Everything in lisp is completely sandboxed,&lt;br/&gt;&amp;gt; and that functionality is important to a lot of things, and it&amp;#39;s really&lt;br/&gt;&amp;gt; normal to be given a reveal of a scriptpubkey and be able to rely on your&lt;br/&gt;&amp;gt; parsing of it.&lt;br/&gt;&lt;br/&gt;The above prevents combining puzzles/solutions from multiple coin spends,&lt;br/&gt;but I don&amp;#39;t think that&amp;#39;s very attractive in bitcoin&amp;#39;s context, the way&lt;br/&gt;it is for chia. I don&amp;#39;t think it loses much else?&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; There&amp;#39;s two ways to think about upgradability here; if someday we want&lt;br/&gt;&amp;gt; &amp;gt; to add new opcodes to the language -- perhaps something to validate zero&lt;br/&gt;&amp;gt; &amp;gt; knowledge proofs or calculate sha3 or use a different ECC curve, or some&lt;br/&gt;&amp;gt; &amp;gt; way to support cross-input signature aggregation, or perhaps it&amp;#39;s just&lt;br/&gt;&amp;gt; &amp;gt; that some snippets are very widely used and we&amp;#39;d like to code them in&lt;br/&gt;&amp;gt; &amp;gt; C&#43;&#43; directly so they validate quicker and don&amp;#39;t use up as much block&lt;br/&gt;&amp;gt; &amp;gt; weight. One approach is to just define a new version of the language&lt;br/&gt;&amp;gt; &amp;gt; via the tapleaf version, defining new opcodes however we like.&lt;br/&gt;&amp;gt; A nice side benefit of sticking with the UTXO model is that the soft fork&lt;br/&gt;&amp;gt; hook can be that all unknown opcodes make the entire thing automatically&lt;br/&gt;&amp;gt; pass.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think that works well if you want to allow the spender (the&lt;br/&gt;puzzle solution) to be able to use opcodes introduced in a soft-fork&lt;br/&gt;(eg, for graftroot-like behaviour)?&lt;br/&gt;&lt;br/&gt;&amp;gt; Chia&amp;#39;s approach to transaction fees is essentially identical to Bitcoin&amp;#39;s&lt;br/&gt;&amp;gt; although a lot fewer things in the ecosystem support fees due to a lack of&lt;br/&gt;&amp;gt; having needed it yet. I don&amp;#39;t think mempool issues have much to do with&lt;br/&gt;&amp;gt; choice of scriptpubkey language. which is mostly about adding in covenants&lt;br/&gt;&amp;gt; and capabilities.&lt;br/&gt;&lt;br/&gt;Having third parties be able to link their spends to yours complicates&lt;br/&gt;mempool behaviour a fair bit (see the discussions on pinning wrt&lt;br/&gt;lightning txs -- and that&amp;#39;s only with direct participants being able to&lt;br/&gt;link transactions). But it&amp;#39;s very much a second-order effect compared&lt;br/&gt;to having fees being a meaningful thing at all. It took, what, six or&lt;br/&gt;seven years for people to start actually using dynamic fees in bitcoin?&lt;br/&gt;&lt;br/&gt;&amp;gt; I previously posted some thoughts about this here:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-December/019722.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-December/019722.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;m pretty skeptical about having a database of large script snippets&lt;br/&gt;that will hopefully be reused in the future.&lt;br/&gt;&lt;br/&gt;On Mon, Mar 07, 2022 at 10:56:38PM &#43;0000, ZmnSCPxj via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; while in the coin set model each puzzle (scriptpubkey) gets run and either assert fails or returns a list of extra conditions it has, possibly including timelocks and creating new coins, paying fees, and other things.&lt;br/&gt;&amp;gt; Does this mean it basically gets recursive covenants?&lt;br/&gt;&lt;br/&gt;In chia the &amp;#34;scriptPubKey&amp;#34; is the hash of a lisp program, and when you&lt;br/&gt;create a new coin, the &amp;#34;scriptPubKey&amp;#34; of the newly generated coin is&lt;br/&gt;also the output of a lisp program. So writing a quine gets you general&lt;br/&gt;recursive covenants in a pretty straight forward way, as I understand it.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;  - serialization seems to be a bit verbose -- 100kB of serialized clvm&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    code from a random block gzips to 60kB; optimising the serialization&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    for small lists, and perhaps also for small literal numbers might be&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    a feasible improvement; though it&amp;#39;s not clear to me how frequently&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    serialization size would be the limiting factor for cost versus&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    execution time or memory usage.&lt;br/&gt;&amp;gt; &amp;gt; A lot of this is because there&amp;#39;s a hook for doing compression at the consensus layer which isn&amp;#39;t being used aggressively yet. That one has the downside that the combined cost of transactions can add up very nonlinearly, but when you have constantly repeated bits of large boilerplate it gets close and there isn&amp;#39;t much of an alternative. That said even with that form of compression maxxed out it&amp;#39;s likely that gzip could still do some compression but that would be better done in the database and in wire protocol formats rather than changing the format which is hashed at the consensus layer.&lt;br/&gt;&amp;gt; How different is this from &amp;#34;jets&amp;#34; as proposed in Simplicity?&lt;br/&gt;&lt;br/&gt;Rather than a &amp;#34;transaction&amp;#34; containing &amp;#34;inputs/outputs&amp;#34;, chia has spend&lt;br/&gt;bundles that spend and create coins; and spend bundles can be merged&lt;br/&gt;together, so that a block only has a single spend bundle. That spend&lt;br/&gt;bundle joins all the puzzles (the programs that, when hashed match&lt;br/&gt;the scriptPubKey) and solutions (scriptSigs) for the coins being spent&lt;br/&gt;together.&lt;br/&gt;&lt;br/&gt;I /think/ the compression hook would be to allow you to have the puzzles&lt;br/&gt;be (re)generated via another lisp program if that was more efficient&lt;br/&gt;than just listing them out. But I assume it would be turtles, err,&lt;br/&gt;lisp all the way down, no special C functions like with jets.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Pretty much all the opcodes in the first section are directly from chia&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; lisp, while all the rest are to complete the &amp;#34;bitcoin&amp;#34; functionality.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; The last two are extensions that are more food for thought than a real&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; proposal.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Are you thinking of this as a completely alternative script format or an extension to bitcoin script? They&amp;#39;re radically different approaches and it&amp;#39;s hard to see how they mix. Everything in lisp is completely sandboxed, and that functionality is important to a lot of things, and it&amp;#39;s really normal to be given a reveal of a scriptpubkey and be able to rely on your parsing of it.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I believe AJ is proposing a completely alternative format to OG Bitcoin SCRIPT.&lt;br/&gt;&amp;gt; Basically, as I understand it, nothing in the design of Tapscript versions prevents us from completely changing the interpretation of Tapscript bytes, and use a completely different language.&lt;br/&gt;&amp;gt; That is, we could designate a new Tapscript version as completely different from OG Bitcoin SCRIPT.&lt;br/&gt;&lt;br/&gt;BIP342 defines tapscript, and it&amp;#39;s selected by the taproot leaf version&lt;br/&gt;0xc0; this hypothetical lispy &amp;#34;btcscript&amp;#34; might be selected via taproot&lt;br/&gt;leaf version 0xc2 or similar (elements&amp;#39; tapscript variant is selected&lt;br/&gt;via version 0xc4).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:05:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstlu3rzrqtehmudmmj2xaq7t9yqrt95xw99stulsw3jk94h644cjczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k03v9ds</id>
    
      <title type="html">📅 Original date posted:2022-03-03 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstlu3rzrqtehmudmmj2xaq7t9yqrt95xw99stulsw3jk94h644cjczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k03v9ds" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp0g3heev3j779l7keva5mamzjpxcesvyh0juntk2pyxg26sg706gv66yn7&#39;&gt;nevent1q…6yn7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-03&lt;br/&gt;📝 Original message:On Sun, Feb 27, 2022 at 04:34:31PM &#43;0000, ZmnSCPxj via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; In reaction to this, AJ Towns mailed me privately about some of his&lt;br/&gt;&amp;gt; thoughts on this insane `OP_EVICT` proposal.&lt;br/&gt;&amp;gt; He observed that we could generalize the `OP_EVICT` opcode by&lt;br/&gt;&amp;gt; decomposing it into smaller parts, including an operation congruent&lt;br/&gt;&amp;gt; to the Scheme/Haskell/Scala `map` operation.&lt;br/&gt;&lt;br/&gt;At much the same time Zman was thinking about OP_FOLD and in exactly the&lt;br/&gt;same context, I was wondering what the simplest possible language that&lt;br/&gt;had some sort of map construction was -- I mean simplest in a &amp;#34;practical&lt;br/&gt;engineering&amp;#34; sense; I think Simplicity already has the Euclidean/Peano&lt;br/&gt;&amp;#34;least axioms&amp;#34; sense covered.&lt;br/&gt;&lt;br/&gt;The thing that&amp;#39;s most appealing to me about bitcoin script as it stands&lt;br/&gt;(beyond &amp;#34;it works&amp;#34;) is that it&amp;#39;s really pretty simple in an engineering&lt;br/&gt;sense: it&amp;#39;s just a &amp;#34;forth&amp;#34; like system, where you put byte strings on a&lt;br/&gt;stack and have a few operators to manipulate them.  The alt-stack, and&lt;br/&gt;supporting &amp;#34;IF&amp;#34; and &amp;#34;CODESEPARATOR&amp;#34; add a little additional complexity,&lt;br/&gt;but really not very much.&lt;br/&gt;&lt;br/&gt;To level-up from that, instead of putting byte strings on a stack, you&lt;br/&gt;could have some other data structure than a stack -- eg one that allows&lt;br/&gt;nesting. Simple ones that come to mind are lists of (lists of) byte&lt;br/&gt;strings, or a binary tree of byte strings [0]. Both those essentially&lt;br/&gt;give you a lisp-like language -- lisp is obviously all about lists,&lt;br/&gt;and a binary tree is just made of things or pairs of things, and pairs&lt;br/&gt;of things are just another way of saying &amp;#34;car&amp;#34; and &amp;#34;cdr&amp;#34;.&lt;br/&gt;&lt;br/&gt;A particular advantage of lisp-like approaches is that they treat code&lt;br/&gt;and data exactly the same -- so if we&amp;#39;re trying to leave the option open&lt;br/&gt;for a transaction to supply some unexpected code on the witness stack,&lt;br/&gt;then lisp handles that really naturally: you were going to include data&lt;br/&gt;on the stack anyway, and code and data are the same, so you don&amp;#39;t have&lt;br/&gt;to do anything special at all. And while I&amp;#39;ve never really coded in&lt;br/&gt;lisp at all, my understanding is that its biggest problems are all about&lt;br/&gt;doing things efficiently at large scales -- but script&amp;#39;s problem space&lt;br/&gt;is for very small scale things, so there&amp;#39;s at least reason to hope that&lt;br/&gt;any problems lisp might have won&amp;#39;t actually show up for this use case.&lt;br/&gt;&lt;br/&gt;So, to me, that seemed like something worth looking into...&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;After looking into it, I actually think chia lisp [1] gets pretty much all&lt;br/&gt;the major design decisions pretty much right. There are obviously a few&lt;br/&gt;changes needed given the differences in design between chia and bitcoin:&lt;br/&gt;&lt;br/&gt; - having secp256k1 signatures (and curve operations), instead of&lt;br/&gt;   BLS12-381 ones&lt;br/&gt;&lt;br/&gt; - adding tx introspection instead of having bundle-oriented CREATE_COIN,&lt;br/&gt;   and CREATE/ASSERT results [10]&lt;br/&gt;&lt;br/&gt;and there are a couple of other things that could maybe be improved&lt;br/&gt;upon:&lt;br/&gt;&lt;br/&gt; - serialization seems to be a bit verbose -- 100kB of serialized clvm&lt;br/&gt;   code from a random block gzips to 60kB; optimising the serialization&lt;br/&gt;   for small lists, and perhaps also for small literal numbers might be&lt;br/&gt;   a feasible improvement; though it&amp;#39;s not clear to me how frequently&lt;br/&gt;   serialization size would be the limiting factor for cost versus&lt;br/&gt;   execution time or memory usage.&lt;br/&gt;&lt;br/&gt; - I don&amp;#39;t think execution costing takes into account how much memory&lt;br/&gt;   is used at any one time, just how much was allocated in total; so&lt;br/&gt;   the equivalent of (OP_DUP OP_DROP OP_DUP OP_DROP ..) only has the&lt;br/&gt;   allocations accounted for, with no discount given for the immediate&lt;br/&gt;   freeing, so it gets treated as having the same cost as (OP_DUP&lt;br/&gt;   OP_DUP ..  OP_DROP OP_DROP ..). Doing it that way would be a worse&lt;br/&gt;   than how bitcoin script is currently costed, but doing better might&lt;br/&gt;   mean locking in an evaluation method at the consensus level. Seems&lt;br/&gt;   worth looking into, at least.&lt;br/&gt;&lt;br/&gt;But otherwise, it seems a pretty good match.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think you&amp;#39;d need about 40 opcodes to match bitcoin script and (roughly)&lt;br/&gt;chia lisp, something like:&lt;br/&gt;&lt;br/&gt;   q                - quote&lt;br/&gt;   a                - apply&lt;br/&gt;   x                - exception / immediately fail (OP_RETURN style)&lt;br/&gt;   i                - if/then/else&lt;br/&gt;   softfork         - upgradability&lt;br/&gt;   not, all, any    - boolean logic&lt;br/&gt;   bitand, bitor, bitxor, bitnot, shift - bitwise logic&lt;br/&gt;   =                - bitwise equality&lt;br/&gt;   &amp;gt; - &#43; * / divmod - (signed, bignum) arithmetic&lt;br/&gt;   ashift           - arithmetic shift (sign extended)&lt;br/&gt;   &amp;gt;s               - string comparison&lt;br/&gt;   strlen, substr, concat - string ops&lt;br/&gt;   f, r, c, l       - list ops (head, tail, make a list, is this a list?)&lt;br/&gt;   sha256           - hashing&lt;br/&gt;&lt;br/&gt;   numequal         - arithmetic equal, equivalent to (= (&#43; a 0) (&#43; b 0))&lt;br/&gt;   ripemd160, hash160, hash256 - more hashing&lt;br/&gt;   bip342-txmsg     - given a sighash byte, construct the bip342 message&lt;br/&gt;   bip340-verify    - given a pubkey, message, and signature bip340 verify it&lt;br/&gt;   tx               - get various information about the tx&lt;br/&gt;   taproot          - get merkle path/internalpubkey/program/annex information&lt;br/&gt;   ecdsa            - same as bip340-verify, except for traditional ecdsa?&lt;br/&gt;   secp256k1-muladd - given (a B C) where B,C are points, calculate a*B&#43;C?&lt;br/&gt;&lt;br/&gt;That compares to about 60 (non-disabled) opcodes in current script.&lt;br/&gt;Pretty much all the opcodes in the first section are directly from chia&lt;br/&gt;lisp, while all the rest are to complete the &amp;#34;bitcoin&amp;#34; functionality.&lt;br/&gt;The last two are extensions that are more food for thought than a real&lt;br/&gt;proposal.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Using a lisp-style approach seems an improvement in general to me.&lt;br/&gt;For example, rather than the streaming-sha256 approach in Elements,&lt;br/&gt;where you could write:&lt;br/&gt;&lt;br/&gt;  &amp;#34;a&amp;#34; SHA256INITIALIZE&lt;br/&gt;  &amp;#34;b&amp;#34; SHA256UPDATE&lt;br/&gt;  &amp;#34;c&amp;#34; SHA256UPDATE&lt;br/&gt;  &amp;#34;d&amp;#34; SHA256FINALIZE&lt;br/&gt;&lt;br/&gt;to get the sha256 of &amp;#34;abcd&amp;#34; without having to CAT them first (important&lt;br/&gt;if they&amp;#39;d potentially overflow the 520B stack item limit), in chia lisp&lt;br/&gt;you write:&lt;br/&gt;&lt;br/&gt;  (sha256 &amp;#34;a&amp;#34; &amp;#34;b&amp;#34; &amp;#34;c&amp;#34; &amp;#34;d&amp;#34;)&lt;br/&gt;&lt;br/&gt;which still has the benefit of streaming the inputs into the function,&lt;br/&gt;but only adds a single opcode, doesn&amp;#39;t involve representing the internal&lt;br/&gt;sha256 midstate on the stack, and generally seems easier to understand,&lt;br/&gt;at least to me.&lt;br/&gt;&lt;br/&gt;As another example, following the traditional functional &amp;#34;tail recursion&lt;br/&gt;instead of for-loops&amp;#34; approach, doing CHECKMULTISIG might become&lt;br/&gt;something like:&lt;br/&gt;&lt;br/&gt;   (defun checksig (sig key)&lt;br/&gt;          bip340-verify (f sig) (bip342-txmsg (r sig)) key)&lt;br/&gt;&lt;br/&gt;   (defun checkmultisig (sigs keys k)&lt;br/&gt;          if (= k 0) &lt;br/&gt;	     1&lt;br/&gt;	     (if (l sigs)&lt;br/&gt;	         (if (checksig (f sigs) (f keys))&lt;br/&gt;	             (checkmultisig (r sigs) (r keys) (- k 1))&lt;br/&gt;		     (checkmultisig sigs (r keys) k)&lt;br/&gt;                 )&lt;br/&gt;		 0&lt;br/&gt;             )&lt;br/&gt;   )&lt;br/&gt;&lt;br/&gt;Here each &amp;#34;sig&amp;#34; is a pair of a 64B bip340 signature and a 1B sighash;&lt;br/&gt;instead of a 65B string combining both, and sigs, keys are lists, and k&lt;br/&gt;is the number of successful signature checks you&amp;#39;re requiring for&lt;br/&gt;success.&lt;br/&gt;&lt;br/&gt;Of course, &amp;#34;defun&amp;#34; and &amp;#34;if&amp;#34; aren&amp;#39;t listed as opcodes above; instead you&lt;br/&gt;have a compiler that gives you nice macros like defun and translates them&lt;br/&gt;into correct uses of the &amp;#34;a&amp;#34; opcode, etc. As I understand it, those sort&lt;br/&gt;of macros and translations are pretty well understood across lisp-like&lt;br/&gt;languages, and, of course, they&amp;#39;re already implemented for chia lisp.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think with the &amp;#34;tx&amp;#34; opcode defined similarly to how Rusty suggested it&lt;br/&gt;[2] you could implement OP_CTV-like behaviours in similar way, and also&lt;br/&gt;replace &amp;#34;bip342-txmsg&amp;#34; with your own code to generate SIGHASH_ANYPREVOUT&lt;br/&gt;or SIGHASH_GROUP style messages to sign. (This would mean also being able&lt;br/&gt;to pull information about the utxo being spent to obtain its amount and&lt;br/&gt;scriptpubkey, which are committed to wit ANYPREVOUT. If it was also able&lt;br/&gt;to obtain the &amp;#34;is_coinbase&amp;#34; flag, that might allow you a more accurate&lt;br/&gt;covenant-based implementation of drivechains...)&lt;br/&gt;&lt;br/&gt;Likewise, with the &amp;#34;taproot&amp;#34; opcode defined in a way that lets you extract&lt;br/&gt;out the internal public key and merkle path, I think you could implement&lt;br/&gt;OP_TLUV and OP_EVICT with a similar recursive approach.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;There&amp;#39;s two ways to think about upgradability here; if someday we want&lt;br/&gt;to add new opcodes to the language -- perhaps something to validate zero&lt;br/&gt;knowledge proofs or calculate sha3 or use a different ECC curve, or some&lt;br/&gt;way to support cross-input signature aggregation, or perhaps it&amp;#39;s just&lt;br/&gt;that some snippets are very widely used and we&amp;#39;d like to code them in&lt;br/&gt;C&#43;&#43; directly so they validate quicker and don&amp;#39;t use up as much block&lt;br/&gt;weight. One approach is to just define a new version of the language&lt;br/&gt;via the tapleaf version, defining new opcodes however we like.&lt;br/&gt;&lt;br/&gt;The other is to use the &amp;#34;softfork&amp;#34; opcode -- chia defines it as:&lt;br/&gt;&lt;br/&gt;  (softfork cost code)&lt;br/&gt;&lt;br/&gt;though I think it would probably be better if it were &lt;br/&gt;&lt;br/&gt;  (softfork cost version code)&lt;br/&gt;&lt;br/&gt;where the idea is that &amp;#34;code&amp;#34; will use the &amp;#34;x&amp;#34; opcode if there&amp;#39;s a&lt;br/&gt;problem, and anyone supporting the &amp;#34;version&amp;#34; softfork can verify that&lt;br/&gt;there aren&amp;#39;t any problems at a cost of &amp;#34;cost&amp;#34;. However, whether you&lt;br/&gt;do or don&amp;#39;t support that softfork, as far as the rest of the script is&lt;br/&gt;concerned, the expression will either fail entirely or evaluate as zero;&lt;br/&gt;so anyone who doesn&amp;#39;t support the softfork can just replace it with zero&lt;br/&gt;and continue on, treating it as if it had costed &amp;#34;cost&amp;#34; units.&lt;br/&gt;&lt;br/&gt;One thing worth noting: &amp;#34;softfork&amp;#34; behaves more like OP_NOP than&lt;br/&gt;tapscript&amp;#39;s OP_SUCCESS -- I think it&amp;#39;s just not possible in general to&lt;br/&gt;have OP_SUCCESS-like behaviour if you&amp;#39;re trying to allow accepting code&lt;br/&gt;from the witness data -- otherwise as soon as you reveal that your script&lt;br/&gt;does accept arbitrary code supplied by the spender, someone could stick&lt;br/&gt;in an OP_SUCCESS code, and remove all the restrictions on spending and&lt;br/&gt;steal your funds.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;To me, it seems like chia lisp is a better answer to the problem here&lt;br/&gt;than the Simplicity language. Simplicity is complicated in a few ways:&lt;br/&gt;&lt;br/&gt; - it defines over 100 jets (plus another 6 for sha3, and another 45 for&lt;br/&gt;   individual libsecp256k1 functions) that need to be implemented&lt;br/&gt;   natively to efficiently track consensus [3]&lt;br/&gt;&lt;br/&gt; - as far as I know, how to soft-fork in new jets isn&amp;#39;t yet well&lt;br/&gt;   established. I think the ideal is that you just write everything in&lt;br/&gt;   raw simplicity, and either the interpreter has a jet and does things&lt;br/&gt;   quickly, or doesn&amp;#39;t, and gets the same result much more slowly [4]. But&lt;br/&gt;   that approach doesn&amp;#39;t seem compatible with maintaining consensus,&lt;br/&gt;   when &amp;#34;slowly&amp;#34; can be slower by more than 6 orders of magnitude [5].&lt;br/&gt;&lt;br/&gt; - to understand what&amp;#39;s going on with a smart contract, you need to&lt;br/&gt;   understand both simplicity (to define the program) and the bit machine&lt;br/&gt;   (to follow how it&amp;#39;s computed), both of which are fairly novel --&lt;br/&gt;   and if nobody&amp;#39;s directly coding in simplicity which seems likely,&lt;br/&gt;   you&amp;#39;re adding a third layer on top of that: you want to understand&lt;br/&gt;   what the programmer asked for (the source), what is included in the&lt;br/&gt;   transaction (the simplicity code) and how that&amp;#39;s executed by consensus&lt;br/&gt;   code (via the bit machine).&lt;br/&gt;&lt;br/&gt;There&amp;#39;s a branch for enabling simplicity on elements/liquid [6]&lt;br/&gt;to see what enabling simplicity might involve in concrete terms; it&lt;br/&gt;just... doesn&amp;#39;t seem at all simple in practice to me. I can&amp;#39;t see how&lt;br/&gt;you&amp;#39;d reasonably translate that simplicity code into a BIP series that&lt;br/&gt;anyone could understand, or how you&amp;#39;d do a thorough review of all the&lt;br/&gt;changes...&lt;br/&gt;&lt;br/&gt;By contrast, chia lisp has fewer opcodes than Simplicity&amp;#39;s jets, has&lt;br/&gt;feasible approaches to low-impact soft forks to increase functionality,&lt;br/&gt;can be used with only two levels of abstraction (lisp with macros and&lt;br/&gt;the opcodes-only vm level) that seem not too bad to understand, and&lt;br/&gt;(in my opinion) doesn&amp;#39;t seem too hard to implement/maintain reasonably.&lt;br/&gt;&lt;br/&gt;On the other hand, Simplicity&amp;#39;s big advantage over *everything* else&lt;br/&gt;is in formal verification. But I&amp;#39;m not really seeing why you couldn&amp;#39;t&lt;br/&gt;preserve that advantage by writing simplicity definitions for the &amp;#34;lisp&amp;#34;&lt;br/&gt;opcodes [7], so that you can &amp;#34;compile&amp;#34; the lisp programs to simplicity,&lt;br/&gt;and then verify them however you like.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;One of the things people sometimes claim about bitcoin as an asset,&lt;br/&gt;is that it&amp;#39;s got both the advantage of having been first to market,&lt;br/&gt;but also that if some altcoin comes along with great new ideas, then&lt;br/&gt;those ideas can just be incorporated into bitcoin too, so bitcoin can&lt;br/&gt;preserve it&amp;#39;s lead even from innovators. Granted, I&amp;#39;ve only really been&lt;br/&gt;looking at chia lisp for a bit over a week, but it really seems to me&lt;br/&gt;like a case where it might be worth putting that philosophy into practice.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;If we were to adopt this, obviously we shouldn&amp;#39;t call it &amp;#34;chia lisp&amp;#34;&lt;br/&gt;anymore, since it wouldn&amp;#39;t work the same in important ways. But since&lt;br/&gt;the program would be encoded as a binary-tree of car/cdr pairs, maybe&lt;br/&gt;we could call it &amp;#34;binary-tree coded script&amp;#34;, or &amp;#34;btc-script&amp;#34; for short...&lt;br/&gt;&lt;br/&gt;PS: related tweets: [8]&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] You could also allow things to be pushed onto the stack that&lt;br/&gt;    (recursively) can push things onto the stack -- the language &amp;#34;Joy&amp;#34;&lt;br/&gt;    takes this approach. It seems to end up equivalent to doing things&lt;br/&gt;    in a list oriented way to me.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://chialisp.com/docs/ref/clvm&#34;&gt;https://chialisp.com/docs/ref/clvm&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019871.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019871.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://raw.githubusercontent.com/ElementsProject/simplicity/pdf/Simplicity-TR.pdf&#34;&gt;https://raw.githubusercontent.com/ElementsProject/simplicity/pdf/Simplicity-TR.pdf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[4] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-November/015244.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-November/015244.html&lt;/a&gt;&lt;br/&gt;    &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-October/015227.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-October/015227.html&lt;/a&gt;&lt;br/&gt;    &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-October/015228.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-October/015228.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[5] &lt;a href=&#34;https://medium.com/blockstream/simplicity-jets-release-803db10fd589&#34;&gt;https://medium.com/blockstream/simplicity-jets-release-803db10fd589&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[6] &lt;a href=&#34;https://github.com/ElementsProject/elements/compare/simplicity&#34;&gt;https://github.com/ElementsProject/elements/compare/simplicity&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[7] At least I think so? chia lisp does multibyte math, that is &amp;#34;&#43;&amp;#34;&lt;br/&gt;    can accept &amp;#34;arbitrary&amp;#34; length bytestrings, which it interprets as&lt;br/&gt;    numbers and adds together; whereas Simplicity requires finite types.&lt;br/&gt;    I think you could decide &amp;#34;a program that only costs X can&amp;#39;t have any&lt;br/&gt;    bytestrings greater than length k*X&amp;#34; and construct a finite type up to&lt;br/&gt;    that length, maybe? So long as you&amp;#39;re only using it for verification,&lt;br/&gt;    maybe that stays feasible? Or perhaps you could arbitrarily limit&lt;br/&gt;    the strings to a max of 520 bytes at a consensus level, and the&lt;br/&gt;    corresponding Simplicity types to 4160 bits and go from there?&lt;br/&gt;&lt;br/&gt;[8] &lt;a href=&#34;https://twitter.com/brian_trollz/status/1499048316956549123&#34;&gt;https://twitter.com/brian_trollz/status/1499048316956549123&lt;/a&gt;&lt;br/&gt;    &lt;a href=&#34;https://twitter.com/jb55/status/1499045998315724801&#34;&gt;https://twitter.com/jb55/status/1499045998315724801&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[9] Oops, out of order footnotes. Anyway...&lt;br/&gt;&lt;br/&gt;[10] [9] The CREATE/ASSERT bundling stuff is interesting; and could be&lt;br/&gt;    used to achieve functionality like the &amp;#34;transaction sponsorship&amp;#34;&lt;br/&gt;    stuff. It doesn&amp;#39;t magically solve the issues with maintaining the&lt;br/&gt;    mempool and using that to speed up block acceptance, though, and&lt;br/&gt;    the chia chain has apparently suffered from mempool-flooding attacks&lt;br/&gt;    recently [11] so I don&amp;#39;t think they&amp;#39;ve solved the broader problem,&lt;br/&gt;    and thus I think it still makes more sense to stick with bitcoin&amp;#39;s&lt;br/&gt;    current model here.&lt;br/&gt;&lt;br/&gt;[11] &lt;a href=&#34;https://thechiaplot.net/2021/11/03/interview-with-the-chia-dust-stormer/&#34;&gt;https://thechiaplot.net/2021/11/03/interview-with-the-chia-dust-stormer/&lt;/a&gt;&lt;br/&gt;     &lt;a href=&#34;https://github.com/Chia-Network/post-mortem/blob/main/post-mortem.md&#34;&gt;https://github.com/Chia-Network/post-mortem/blob/main/post-mortem.md&lt;/a&gt;
    </content>
    <updated>2023-06-08T01:05:11&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx73pt9v3eawxkmnehzh6jy8e022a4x0e6wdmt0jx9aneyltkzj7czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4hdwed</id>
    
      <title type="html">📅 Original date posted:2022-02-26 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx73pt9v3eawxkmnehzh6jy8e022a4x0e6wdmt0jx9aneyltkzj7czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4hdwed" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvvx7d3g6ymgf40lm4wmvl667nu9erlfq9mr9sra55tv2kucrsp2q4qvt9u&#39;&gt;nevent1q…vt9u&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-26&lt;br/&gt;📝 Original message:On Thu, Feb 24, 2022 at 12:03:32PM &#43;0000, ZmnSCPxj via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Logically, if the construct is general enough to form Drivechains, and&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; we rejected Drivechains, we should also reject the general construct.&lt;br/&gt;&amp;gt; &amp;gt; Not providing X because it can only be used for E, may generalise to not&lt;br/&gt;&amp;gt; &amp;gt; providing Y which can also only be used for E, but it doesn&amp;#39;t necessarily&lt;br/&gt;&amp;gt; &amp;gt; generalise to not providing Z which can be used for both G and E.&lt;br/&gt;&amp;gt; Does this not work only if the original objection to merging in BIP-300 was of the form:&lt;br/&gt;&amp;gt; * X implements E.&lt;br/&gt;&amp;gt; * Z implements G and E.&lt;br/&gt;&amp;gt; * Therefore, we should not merge in X and instead should merge in the more general construct Z.&lt;br/&gt;&lt;br/&gt;I&amp;#39;d describe the &amp;#34;original objection&amp;#34; more as &amp;#34;E is not worth doing;&lt;br/&gt;X achieves nothing but E; therefore we should not work on or merge X&amp;#34;.&lt;br/&gt;&lt;br/&gt;Whether we should work on or eventually merge some other construct that&lt;br/&gt;does other things than E, depends on the (relative) merits of those&lt;br/&gt;other things.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think we really need someone who NACKed BIP-300 to speak up.&lt;br/&gt;&lt;br/&gt;Here&amp;#39;s some posts from 2017:&lt;br/&gt;&lt;br/&gt;] I think it&amp;#39;s great that people want to experiment with things like&lt;br/&gt;] drivechains/sidechains and what not, but their security model is very&lt;br/&gt;] distinct from Bitcoin&amp;#39;s and, given the current highly centralized&lt;br/&gt;] mining ecosystem, arguably not very good.  So positioning them as a&lt;br/&gt;] major solution for the Bitcoin project is the wrong way to go. Instead&lt;br/&gt;] we should support people trying cool stuff, at their own risk.&lt;br/&gt;&lt;br/&gt; - &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-July/014726.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-July/014726.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;] Regardless, people are free experiment and adopt such an approach. The&lt;br/&gt;] nice thing about it not being a hardfork is that it does not require&lt;br/&gt;] network-wide consensus to deploy. However, I don&amp;#39;t think they offer a&lt;br/&gt;] security model that should be encouraged, and thus doesn&amp;#39;t have a&lt;br/&gt;] place on a roadmap.&lt;br/&gt;&lt;br/&gt; - &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-July/014729.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-July/014729.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; If my understanding is correct and that the original objection was &amp;#34;Drivechains are bad for reasons R[0], R[1]...&amp;#34;, then:&lt;br/&gt;&amp;gt; * You can have either of these two positions:&lt;br/&gt;&amp;gt;   * R[0], R[1] ... are specious arguments and Drivechains are not bad [...]&lt;br/&gt;&amp;gt;   * R[0], R[1] ... are valid arguments are Drivechains are bad, therefore we should **NOT** merge in a feature that implements Recursive Covenants [...]&lt;br/&gt;&amp;gt; You cannot have it both ways.&lt;br/&gt;&lt;br/&gt;I guess you mean to say that I&amp;#39;ve got to pick one, rather than can&amp;#39;t&lt;br/&gt;pick both. But in any event, I don&amp;#39;t pick either; my view is more along&lt;br/&gt;the lines of:&lt;br/&gt;&lt;br/&gt; * drivechains shouldn&amp;#39;t be used&lt;br/&gt; * it&amp;#39;s okay if other people think drivechains are worth using, and go&lt;br/&gt;   ahead and do so, if they&amp;#39;re not creating a direct burden on everyone&lt;br/&gt;   else&lt;br/&gt;&lt;br/&gt;That&amp;#39;s the same position I hold for other things, like using lightning&lt;br/&gt;on mainnet in January 2018; or giving your bitcoin to an anonymous&lt;br/&gt;custodian so it it can be borrowed via a flash loan on some novel third&lt;br/&gt;party smart contract platform.&lt;br/&gt;&lt;br/&gt;&amp;gt; Admittedly, there may be some set of restrictions that prevent Turing-Completeness from implementing Drivechains, but you have to demonstrate a proof of that set of restrictions existing.&lt;br/&gt;&lt;br/&gt;Like I said; I don&amp;#39;t think the drivechains game theory works without&lt;br/&gt;the implicit threat of miner censorship, and therefore you need a&lt;br/&gt;&amp;#34;from_coinbase&amp;#34; flag as well as covenants. That&amp;#39;s not a big objection,&lt;br/&gt;though. (On the other hand, if I&amp;#39;m wrong and drivechains *do* work&lt;br/&gt;without that threat; then drivechains don&amp;#39;t cause a block size increase,&lt;br/&gt;and can be safely ignored by miners and full node operators, and the&lt;br/&gt;arguments against drivechains are specious; and implementing them purely&lt;br/&gt;via covenants so miners aren&amp;#39;t put in a privileged position seems an&lt;br/&gt;improvement)&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I think it&amp;#39;s pretty reasonable to say:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; a) adding dedicated consensus features for drivechains is a bad idea&lt;br/&gt;&amp;gt; &amp;gt; in the absence of widespread consensus that drivechains are likely&lt;br/&gt;&amp;gt; &amp;gt; to work as designed and be a benefit to bitcoin overall&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; b) if you want to risk your own funds by leaving your coins on an&lt;br/&gt;&amp;gt; &amp;gt; exchange or using lightning or eltoo or tumbling/coinjoin or payment&lt;br/&gt;&amp;gt; &amp;gt; pools or drivechains or being #reckless in some other way, and aren&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; asking for consensus changes, that&amp;#39;s your business&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; *Shrug* I do not really see the distinction here --- in a world with Drivechains, you are free to not put your coins in a Drivechain-backed sidechain, too.&lt;br/&gt;&lt;br/&gt;Well, yes: I&amp;#39;m saying there&amp;#39;s no distinction between putting funds in&lt;br/&gt;drivechains and other #reckless things you might do with your money?&lt;br/&gt;&lt;br/&gt;My opinion is (a) we should be conservative about adding new consensus&lt;br/&gt;features because of the maintenance cost; (b) we should design&lt;br/&gt;consensus/policy in a way to encourage minimising the externality costs&lt;br/&gt;users impose on each other; and (c) we should make it as easy as possible&lt;br/&gt;to use bitcoin safely in general -- but if people *want* to be reckless,&lt;br/&gt;even knowing the consequences, that&amp;#39;s fine.&lt;br/&gt;&lt;br/&gt;&amp;gt; (Admittedly, Drivechains does get into a Mutually Assured Destruction argument, so that may not hold.&lt;br/&gt;&amp;gt; But if Drivechains going into a MAD argument is an objection, then I do not see why covenant-based Drivechains would also not get into the same MAD argument --- and if you want to avoid the MADness, you cannot support recursive covenants, either.&lt;br/&gt;&lt;br/&gt;I think the argument you believe, but aren&amp;#39;t quite actually making,&lt;br/&gt;is along the lines of:&lt;br/&gt;&lt;br/&gt; a) drivechain technology doen&amp;#39;t just potentially harm people who use&lt;br/&gt;    them; it is an existential threat to bitcoin if used by anyone&lt;br/&gt;&lt;br/&gt; b) therefore the ability for anyone to implement them must be prevented&lt;br/&gt;&lt;br/&gt; c) (a) is well known and widely agreed upon by all reasonable&lt;br/&gt;    well-informed people&lt;br/&gt;&lt;br/&gt;(b) is definitely a reasonable consequence of (a), but I don&amp;#39;t agree&lt;br/&gt;with (a).  Drivechains have certainly been criticised as a bad idea,&lt;br/&gt;but there are plenty of bad ideas that don&amp;#39;t need to be outlawed.&lt;br/&gt;&lt;br/&gt;But I think the simplest *method* of preventing drivechains from having&lt;br/&gt;significant adoption is just &amp;#34;users encourage miners to steal funds&lt;br/&gt;deposited into drivechains&amp;#34; (eg, by declining to do a UASF to prevent&lt;br/&gt;such theft), which then obviously discourages people from putting funds&lt;br/&gt;into drivechains. Since that can still be done even if bip300 or an&lt;br/&gt;implementation of drivechains-via-covenants is deployed, I don&amp;#39;t think&lt;br/&gt;drivechains are an existential threat to bitcoin.&lt;br/&gt;&lt;br/&gt;&amp;gt; Remember, 51% attackers can always censor the blockchain, regardless of whether you put the Drivechain commitments into the coinbase, or in an ostensibly-paid-by-somebody-else transaction.)&lt;br/&gt;&lt;br/&gt;I think you could make the analogy between drivechains and covenants a&lt;br/&gt;fair bit stronger in the following way:&lt;br/&gt;&lt;br/&gt;The idea behind drivechains and the liquid sidechain is, in both cases,&lt;br/&gt;that funds can be moved to some other blockchain with its own rules, and&lt;br/&gt;then moved back to the bitcoin blockchain, via the assistance of some&lt;br/&gt;group that will hopefully follow the stated rules of the sidechain. In&lt;br/&gt;liquid&amp;#39;s case it&amp;#39;s a group of semi-known functionaries who are also&lt;br/&gt;directly responsible for transactions appearing on the liquid sidechain,&lt;br/&gt;and it&amp;#39;s done by them signing via multisig. For bip300, it&amp;#39;s bitcoin&lt;br/&gt;miners, and done by putting entries in the coinbase.&lt;br/&gt;&lt;br/&gt;But because just letting any miner alone immediately move funds&lt;br/&gt;would be obviously too risky to consider, bip300 adds additional&lt;br/&gt;restrictions, adding both multisig-like aspects, delays, and the ability&lt;br/&gt;to back-out/correct a theft attempt before it&amp;#39;s final, which provides&lt;br/&gt;the opportunity for honest participants to react to miners attempting to&lt;br/&gt;cheat and hopefully achieve a legitimate outcome instead. Whether that&amp;#39;s&lt;br/&gt;enough is still debatable -- but it&amp;#39;s certainly an improvement to go from&lt;br/&gt;&amp;#34;too risky to consider&amp;#34; to &amp;#34;debatable&amp;#34;.&lt;br/&gt;&lt;br/&gt;But the same incentive can apply to liquid too: it might be good to be&lt;br/&gt;able to have liquid funds encumbered on the bitcoin blockchain in such a&lt;br/&gt;way that it&amp;#39;s even harder for people with liquid&amp;#39;s private keys to cheat&lt;br/&gt;than it currently is -- ie, it would be good to be able to specify more&lt;br/&gt;&amp;#34;vault-like&amp;#34; behaviours for the liquid funds, perhaps in relation to the&lt;br/&gt;&amp;#34;backup recovery keys&amp;#34; [0], eg.&lt;br/&gt;&lt;br/&gt;As a result, while it&amp;#39;s not obvious, I think it shouldn&amp;#39;t be *surprising*&lt;br/&gt;that the same technology that allows &amp;#34;vaults&amp;#34; also enables (something&lt;br/&gt;like) drivechains -- since the goal in both cases is just constraining&lt;br/&gt;how withdrawals work.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://medium.com/blockstream/patching-the-liquid-timelock-issue-b4b2f5f9a973&#34;&gt;https://medium.com/blockstream/patching-the-liquid-timelock-issue-b4b2f5f9a973&lt;/a&gt;
    </content>
    <updated>2023-06-08T01:03:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstcyexlllk59wrvdqfl7ragkdgl9llsm65p3x3ka0kmp8qmsjj6cqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kateffa</id>
    
      <title type="html">📅 Original date posted:2022-02-24 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstcyexlllk59wrvdqfl7ragkdgl9llsm65p3x3ka0kmp8qmsjj6cqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kateffa" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9p00e5fvl7qm76at82nkvslh5rw27q7hlue32dzynkeylsy05glqrq2md5&#39;&gt;nevent1q…2md5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-24&lt;br/&gt;📝 Original message:On Wed, Feb 23, 2022 at 11:28:36AM &#43;0000, ZmnSCPxj via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Subject: Turing-Completeness, And Its Enablement Of Drivechains&lt;br/&gt;&lt;br/&gt;&amp;gt; And we have already rejected Drivechains,&lt;br/&gt;&lt;br/&gt;That seems overly strong to me.&lt;br/&gt;&lt;br/&gt;&amp;gt; for the following reason:&lt;br/&gt;&amp;gt; 1.  Sidechain validators and mainchain miners have a strong incentive to&lt;br/&gt;&amp;gt;     merge their businesses.&lt;br/&gt;&amp;gt; 2.  Mainchain miners end up validating and commiting to sidechain blocks.&lt;br/&gt;&amp;gt; 3.  Ergo, sidechains on Drivechains become a block size increase.&lt;br/&gt;&lt;br/&gt;I think there are two possible claims about drivechains that would make&lt;br/&gt;them unattractive, if true:&lt;br/&gt;&lt;br/&gt; 1) that adding a drivechain is a &amp;#34;block size increase&amp;#34; in the sense&lt;br/&gt;    that every full node and every miner need to do more work when&lt;br/&gt;    validating a block, in order to be sure whether the majority of hash&lt;br/&gt;    rate will consider it valid, or will reject it and refuse to build&lt;br/&gt;    on it because it&amp;#39;s invalid because of some external drivechain rule&lt;br/&gt;&lt;br/&gt; 2) that funds deposited in drivechains will be stolen because&lt;br/&gt;    the majority of hashrate is not enforcing drivechain rules (or that&lt;br/&gt;    deposited funds cannot be withdrawn, but will instead be stuck in&lt;br/&gt;    the drivechain, rather than having a legitimate two-way peg)&lt;br/&gt;&lt;br/&gt;And you could combine those claims, saying that one or the other will&lt;br/&gt;happen (depending on whether more or less than 50% of hashpower is&lt;br/&gt;enforcing drivechain rules), and either is bad, even though you don&amp;#39;t&lt;br/&gt;know which will happen.&lt;br/&gt;&lt;br/&gt;I believe drivechain advocates argue a third outcome is possible where&lt;br/&gt;neither of those claims hold true, where only a minority of hashrates&lt;br/&gt;needs to validate the drivechain rules, but that is still sufficient&lt;br/&gt;to prevent drivechain funds from being stolen.&lt;br/&gt;&lt;br/&gt;One way to &amp;#34;reject&amp;#34; drivechains is simply to embrace the second claim --&lt;br/&gt;that putting money into drivechains isn&amp;#39;t safe, and that miners *should*&lt;br/&gt;claim coins that have been drivehcain encumbered (or that miners&lt;br/&gt;should not assist with withdrawing funds, leaving them trapped in the&lt;br/&gt;drivechain). In some sense this is already the case: bip300 rules aren&amp;#39;t&lt;br/&gt;enforced, so funds committed today via bip300 can likely expect to be&lt;br/&gt;stolen, and likely won&amp;#39;t receive the correct acks, so won&amp;#39;t progress&lt;br/&gt;even if they aren&amp;#39;t stolen.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think a key difference between tx-covenant based drivechains and bip300&lt;br/&gt;drivechains is hashpower endorsement: if 50% of hashpower acks enforcement&lt;br/&gt;of a new drivechain (as required in bip300 for a new drivechain to exist&lt;br/&gt;at all), there&amp;#39;s an implicit threat that any block proposing an incorrect&lt;br/&gt;withdrawal from that blockchain will have their block considered invalid&lt;br/&gt;and get reorged out -- either directly by that hashpower majority, or&lt;br/&gt;indirectly by users conducting a UASF forcing the hashpower majority to&lt;br/&gt;reject those blocks.&lt;br/&gt;&lt;br/&gt;I think removing that implicit threat changes the game theory&lt;br/&gt;substantially: rather than deposited funds being withdrawn due to the&lt;br/&gt;drivechain rules, you&amp;#39;d instead expect them to be withdrawn according to&lt;br/&gt;whoever&amp;#39;s willing to offer the miners the most upfront fees to withdraw&lt;br/&gt;the funds.&lt;br/&gt;&lt;br/&gt;That seems to me to mean you&amp;#39;d frequently expect to end up in a scorched&lt;br/&gt;earth scenario, where someone attempts to steal, then they and the&lt;br/&gt;legitimate owner gets into a bidding war, with the result that most&lt;br/&gt;of the funds end up going to miners in fees. Because of the upfront&lt;br/&gt;payment vs delayed collection of withdrawn funds, maybe it could end up&lt;br/&gt;as a dollar auction, with the two parties competing to lose the least,&lt;br/&gt;but still both losing substantial amounts?&lt;br/&gt;&lt;br/&gt;So I think covenant-based drivechains would be roughly the same as bip300&lt;br/&gt;drivechains, where a majority of hashpower used software implementing&lt;br/&gt;the following rules:&lt;br/&gt;&lt;br/&gt; - always endorse any proposed drivechain&lt;br/&gt; - always accept any payment into a drivechain&lt;br/&gt; - accept bids to ack/nack withdrawals, then ack/nack depending on&lt;br/&gt;   whoever pays the most&lt;br/&gt;&lt;br/&gt;You could probably make covenant-based drivechains a closer match to&lt;br/&gt;bip300 drivechains if a script could determine if an input was from a&lt;br/&gt;(100-block prior) coinbase or not.&lt;br/&gt;&lt;br/&gt;&amp;gt; Logically, if the construct is general enough to form Drivechains, and&lt;br/&gt;&amp;gt; we rejected Drivechains, we should also reject the general construct.&lt;br/&gt;&lt;br/&gt;Not providing X because it can only be used for E, may generalise to not&lt;br/&gt;providing Y which can also only be used for E, but it doesn&amp;#39;t necessarily&lt;br/&gt;generalise to not providing Z which can be used for both G and E.&lt;br/&gt;&lt;br/&gt;I think it&amp;#39;s pretty reasonable to say:&lt;br/&gt;&lt;br/&gt; a) adding dedicated consensus features for drivechains is a bad idea&lt;br/&gt;    in the absence of widespread consensus that drivechains are likely&lt;br/&gt;    to work as designed and be a benefit to bitcoin overall&lt;br/&gt;&lt;br/&gt; b) if you want to risk your own funds by leaving your coins on an&lt;br/&gt;    exchange or using lightning or eltoo or tumbling/coinjoin or payment&lt;br/&gt;    pools or drivechains or being #reckless in some other way, and aren&amp;#39;t&lt;br/&gt;    asking for consensus changes, that&amp;#39;s your business&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:03:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstgd5zvhatsee0z47htyl9m37h45h930sl4h4hrdgp33u8gkgcwsqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2krnmnxg</id>
    
      <title type="html">📅 Original date posted:2022-02-17 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstgd5zvhatsee0z47htyl9m37h45h930sl4h4hrdgp33u8gkgcwsqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2krnmnxg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswcaw7lrh6dn5q9pnhantv3s30nu2xxa7csgm3nnnzkpahy92sfuq3zzah2&#39;&gt;nevent1q…zah2&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-17&lt;br/&gt;📝 Original message:On Fri, Feb 11, 2022 at 12:12:28PM -0600, digital vagabond via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Imagine a covenant design that was&lt;br/&gt;&amp;gt; flexible enough to create an encumbrance like this: a script specifies a&lt;br/&gt;&amp;gt; specific key in a multisig controlled by some authority figure (or a branch&lt;br/&gt;&amp;gt; in the script that would allow unilateral control by such an authority),&lt;br/&gt;&amp;gt; and the conditions of the covenant would perpetually require than any spend&lt;br/&gt;&amp;gt; from the covenant can only be sent to a script involving that key from said&lt;br/&gt;&amp;gt; authority, preventing by consensus any removal of that central authorities&lt;br/&gt;&amp;gt; involvement in control over that UTXO.&lt;br/&gt;&lt;br/&gt;&amp;gt; I know that such a walled garden could easily be constructed now with&lt;br/&gt;&amp;gt; multisig and restrictions on where coins can be withdrawn to from exchanges&lt;br/&gt;&amp;gt; or whatever [...], but I think the important distinction&lt;br/&gt;&amp;gt; between such non-consensus system designed to enforce such restrictions and&lt;br/&gt;&amp;gt; a recursive covenant to accomplish the same is that in the case of a&lt;br/&gt;&amp;gt; multisig/non-consensus based system, exit from that restriction is still&lt;br/&gt;&amp;gt; possible under the consensus rules of the protocol.&lt;br/&gt;&lt;br/&gt;I think that sort of encumberance is already possible: you send bitcoin&lt;br/&gt;to an OP_RETURN address and that is registered on some other system as a&lt;br/&gt;way of &amp;#34;minting&amp;#34; coins there (ie, &amp;#34;proof of burn&amp;#34;) at which point rules&lt;br/&gt;other than bitcoin&amp;#39;s apply. Bitcoin consensus guarantees the value can&amp;#39;t&lt;br/&gt;be extracted back out of the OP_RETURN value.&lt;br/&gt;&lt;br/&gt;I think spacechains effectively takes up this concept for their one-way&lt;br/&gt;peg:&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://bitcoin.stackexchange.com/questions/100537/what-is-spacechain&#34;&gt;https://bitcoin.stackexchange.com/questions/100537/what-is-spacechain&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://medium.com/@RubenSomsen/21-million-bitcoins-to-rule-all-sidechains-the-perpetual-one-way-peg-96cb2f8ac302&#34;&gt;https://medium.com/@RubenSomsen/21-million-bitcoins-to-rule-all-sidechains-the-perpetual-one-way-peg-96cb2f8ac302&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;(I think spacechains requires a covenant construct to track the&lt;br/&gt;single-tx-per-bitcoin-block that commits to the spacechain, but that&amp;#39;s&lt;br/&gt;not directly used for the BTC value that was pegged into the spacechain)&lt;br/&gt;&lt;br/&gt;If we didn&amp;#39;t have OP_RETURN, you could instead pay to a pubkey that&amp;#39;s&lt;br/&gt;constructed from a NUMS point / or a pedersen commitment, that&amp;#39;s (roughly)&lt;br/&gt;guaranteed unspendable, at least until secp256k1 is broken via bitcoin&amp;#39;s&lt;br/&gt;consensus rules (with the obvious disadvantage that nodes then can&amp;#39;t&lt;br/&gt;remove these outputs from the utxo set).&lt;br/&gt;&lt;br/&gt;That was also used for XCP/Counterparty&amp;#39;s ICO in 2014, at about 823 uBTC&lt;br/&gt;per XCP on average (depending on when you got in it was between 666&lt;br/&gt;uBTC/XCP and 1000 uBTC/XCP apparently), falling to a current price of&lt;br/&gt;about 208 uBTC per XCP. It was about 1000 uBTC/XCP until mid 2018 though.&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://counterparty.io/news/why-proof-of-burn/&#34;&gt;https://counterparty.io/news/why-proof-of-burn/&lt;/a&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/CounterpartyXCP/Documentation/blob/master/Basics/FAQ-XCP.md&#34;&gt;https://github.com/CounterpartyXCP/Documentation/blob/master/Basics/FAQ-XCP.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;These seem like they might be bad things for people to actually do&lt;br/&gt;(why would you want to be paid to mine a spacechain in coins that can&lt;br/&gt;only fall in value relative to bitcoin?), and certainly I don&amp;#39;t think&lt;br/&gt;we should do things just to make this easier; but it seems more like a&lt;br/&gt;&amp;#34;here&amp;#39;s why you&amp;#39;re hurting yourself if you do this&amp;#34; thing, rather than a&lt;br/&gt;&amp;#34;we can prevent you from doing it and we will&amp;#34; thing.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:03:30&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswp3amenhgu50muzhelchrh36dv8kfnhh4u4f302xg6g04dje805qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kc6dth3</id>
    
      <title type="html">📅 Original date posted:2022-02-02 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswp3amenhgu50muzhelchrh36dv8kfnhh4u4f302xg6g04dje805qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kc6dth3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw5fvkc4kdema9h4xeu02vu0wpzku92kaft257wl7j5mzszc8e3dqdq83l9&#39;&gt;nevent1q…83l9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-02&lt;br/&gt;📝 Original message:On Tue, Feb 01, 2022 at 10:30:12AM &#43;0100, Bastien TEINTURIER via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; But do you agree that descendants only matter for DoS resistance then,&lt;br/&gt;&amp;gt; not for miner incentives?&lt;br/&gt;&lt;br/&gt;There&amp;#39;s an edge case where you&amp;#39;re replacing tx A with tx X, and X&amp;#39;s fee&lt;br/&gt;rate is higher than A&amp;#39;s, but you&amp;#39;d be obsoleting descendent txs (B, C,&lt;br/&gt;D...) and thus replacing them with unrelated txs (L, M, N...), and the&lt;br/&gt;total feerate/fees of A&#43;B&#43;C&#43;D... is nevertheless higher than X&#43;L&#43;M&#43;N...&lt;br/&gt;&lt;br/&gt;But I think that&amp;#39;s probably unusual (transactions D and L are adjacent&lt;br/&gt;in the mempool, that&amp;#39;s why L is chosen for the block; but somehow&lt;br/&gt;there&amp;#39;s a big drop off in value somewhere between B/C/D and L/M/N),&lt;br/&gt;and at least today, I don&amp;#39;t think miners consider it essential to eke&lt;br/&gt;out every possible sat in fee income.&lt;br/&gt;&lt;br/&gt;(If, as per your example, you&amp;#39;re actually replacing {A,B,C,D} with&lt;br/&gt;{X,Y,Z,W} where X pays higher fees than A and the package in total pays&lt;br/&gt;either the same or higher fees, that&amp;#39;s certainly incentive compatible.&lt;br/&gt;The tricky question is what happens when X arrives on its own and it&lt;br/&gt;might be that no one ever sends a replacement for B,C,D)&lt;br/&gt;&lt;br/&gt;&amp;gt; The two policies I proposed address miner incentives. I think they&amp;#39;re&lt;br/&gt;&amp;gt; insufficient to address DoS issues. But adding a 3rd policy to address&lt;br/&gt;&amp;gt; DoS issues may be a good solution?&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 1. The transaction&amp;#39;s ancestor absolute fees must be X% higher than the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; previous transaction&amp;#39;s ancestor fees&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 2. The transaction&amp;#39;s ancestor feerate must be Y% higher than the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; previous transaction&amp;#39;s ancestor feerate&lt;br/&gt;&lt;br/&gt;Absolute fees only matter if your backlog&amp;#39;s feerate drops off. If you&amp;#39;ve&lt;br/&gt;got 100MB of txs offering 5sat/vb, then exchanging 50kB at 5sat/vb for&lt;br/&gt;1kB at 6sat/vb is still a win: your block gains 1000 sats in fees even&lt;br/&gt;though your mempool loses 245,000 sats in fees.&lt;br/&gt;&lt;br/&gt;But if your backlog&amp;#39;s feerate does drop off, *and* that matters, then&lt;br/&gt;I don&amp;#39;t think you can ignore the impact of the descendent transactions&lt;br/&gt;that you might not get a replacement for.&lt;br/&gt;&lt;br/&gt;I think &amp;#34;Y% higher&amp;#34; rather than just &amp;#34;higher&amp;#34; is only useful for&lt;br/&gt;rate-limiting, not incentive compatibility. (Though maybe it helps&lt;br/&gt;stabilise a greedy algorithm in some cases?)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:03:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf9g87hys9krm3nmvtww2mjprndcqdkqh83shcm4nu8020gdmcg7gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt74cp5</id>
    
      <title type="html">📅 Original date posted:2022-01-31 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf9g87hys9krm3nmvtww2mjprndcqdkqh83shcm4nu8020gdmcg7gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt74cp5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8r2jpqw57uxpf96r0lg6hnc0cl8w46jxc49jkepmawf8ryx048aqh883lr&#39;&gt;nevent1q…83lr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-01-31&lt;br/&gt;📝 Original message:On Mon, Jan 31, 2022 at 04:57:52PM &#43;0100, Bastien TEINTURIER via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; I&amp;#39;d like to propose a different way of looking at descendants that makes&lt;br/&gt;&amp;gt; it easier to design the new rules. The way I understand it, limiting the&lt;br/&gt;&amp;gt; impact on descendant transactions is only important for DoS protection,&lt;br/&gt;&amp;gt; not for incentive compatibility. I would argue that after evictions,&lt;br/&gt;&amp;gt; descendant transactions will be submitted again (because they represent&lt;br/&gt;&amp;gt; transactions that people actually want to make),&lt;br/&gt;&lt;br/&gt;I think that&amp;#39;s backwards: we&amp;#39;re trying to discourage people from wasting&lt;br/&gt;the network&amp;#39;s bandwidth, which they would do by publishing transactions&lt;br/&gt;that will never get confirmed -- if they were to eventually get confirmed&lt;br/&gt;it wouldn&amp;#39;t be a waste of bandwith, after all. But if the original&lt;br/&gt;descendent txs were that sort of spam, then they may well not be&lt;br/&gt;submitted again if the ancestor tx reaches a fee rate that&amp;#39;s actually&lt;br/&gt;likely to confirm.&lt;br/&gt;&lt;br/&gt;I wonder sometimes if it could be sufficient to just have a relay rate&lt;br/&gt;limit and prioritise by ancestor feerate though. Maybe something like:&lt;br/&gt;&lt;br/&gt; - instead of adding txs to each peers setInventoryTxToSend immediately,&lt;br/&gt;   set a mempool flag &amp;#34;relayed=false&amp;#34;&lt;br/&gt;&lt;br/&gt; - on a time delay, add the top N (by fee rate) &amp;#34;relayed=false&amp;#34; txs to&lt;br/&gt;   each peer&amp;#39;s setInventoryTxToSend and mark them as &amp;#34;relayed=true&amp;#34;;&lt;br/&gt;   calculate how much kB those txs were, and do this again after&lt;br/&gt;   SIZE/RATELIMIT seconds&lt;br/&gt;&lt;br/&gt; - don&amp;#39;t include &amp;#34;relayed=false&amp;#34; txs when building blocks?&lt;br/&gt;&lt;br/&gt; - keep high-feerate evicted txs around for a while in case they get&lt;br/&gt;   mined by someone else to improve compact block relay, a la the&lt;br/&gt;   orphan pool?&lt;br/&gt;&lt;br/&gt;That way if the network is busy, any attempt to do low fee rate tx spam&lt;br/&gt;will just cause those txs to sit as relayed=false until they&amp;#39;re replaced&lt;br/&gt;or the network becomes less busy and they&amp;#39;re worth relaying. And your&lt;br/&gt;actual mempool accept policy can just be &amp;#34;is this tx a higher fee rate&lt;br/&gt;than the txs it replaces&amp;#34;...&lt;br/&gt;&lt;br/&gt;&amp;gt; Even if bitcoin core releases a new version with updated RBF rules, as a&lt;br/&gt;&amp;gt; wallet you&amp;#39;ll need to keep using the old rules for a long time if you&lt;br/&gt;&amp;gt; want to be safe.&lt;br/&gt;&lt;br/&gt;All you need is for there to be *a* path that follows the new relay rules&lt;br/&gt;and gets from your node/wallet to perhaps 10% of hashpower, which seems&lt;br/&gt;like something wallet providers could construct relatively quickly?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:03:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9sv6gg7wx05rzcz5epfvk8lxvvjcm30t02hqhawlx5ewr54d6lcqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k2rn7vt</id>
    
      <title type="html">📅 Original date posted:2021-10-14 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9sv6gg7wx05rzcz5epfvk8lxvvjcm30t02hqhawlx5ewr54d6lcqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k2rn7vt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfjlhlgscrv2tnfycky0jl5pj5l8z9p75ehx9e2pwdckvxnv9ulrs6xqn5e&#39;&gt;nevent1q…qn5e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-14&lt;br/&gt;📝 Original message:On Mon, Oct 11, 2021 at 12:12:58PM -0700, Jeremy via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; ... in this post I will argue against frequent soft forks with a single or&lt;br/&gt;&amp;gt; minimal&lt;br/&gt;&amp;gt; &amp;gt; set of features and instead argue for infrequent soft forks with batches&lt;br/&gt;&amp;gt; &amp;gt; of features.&lt;br/&gt;&amp;gt; I think this type of development has been discussed in the past and has been&lt;br/&gt;&amp;gt; rejected.&lt;br/&gt;&lt;br/&gt;&amp;gt; AJ: - improvements: changes might not make everyone better off, but we&lt;br/&gt;&amp;gt;    don&amp;#39;t want changes to screw anyone over either -- pareto&lt;br/&gt;&amp;gt;    improvements in economics, &amp;#34;first, do no harm&amp;#34;, etc. (if we get this&lt;br/&gt;&amp;gt;    right, there&amp;#39;s no need to make compromises and bundle multiple&lt;br/&gt;&amp;gt;    flawed proposals so that everyone&amp;#39;s an equal mix of happy and&lt;br/&gt;&amp;gt;    miserable)&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think your conclusion above matches my opinion, for what it&amp;#39;s&lt;br/&gt;worth.&lt;br/&gt;&lt;br/&gt;If you&amp;#39;ve got two features, A and B, where the game theory is:&lt;br/&gt;&lt;br/&gt; If A happens, I&amp;#39;m &#43;100, You&amp;#39;re -50&lt;br/&gt; If B happens, I&amp;#39;m -50, You&amp;#39;re &#43;100&lt;br/&gt;&lt;br/&gt;then even though A&#43;B is &#43;50, &#43;50, then I do think the answer should&lt;br/&gt;generally be &amp;#34;think harder and come up with better proposals&amp;#34; rather than&lt;br/&gt;&amp;#34;implement A&#43;B as a bundle that makes us both &#43;50&amp;#34;.&lt;br/&gt;&lt;br/&gt;_But_ if the two features are more like:&lt;br/&gt;&lt;br/&gt;  If C happens, I&amp;#39;m &#43;100, You&amp;#39;re &#43;/- 0&lt;br/&gt;  If D happens, I&amp;#39;m &#43;/- 0, You&amp;#39;re &#43;100&lt;br/&gt;&lt;br/&gt;then I don&amp;#39;t have a problem with bundling them together as a single&lt;br/&gt;simultaneous activation of both C and D.&lt;br/&gt;&lt;br/&gt;Also, you can have situations where things are better together,&lt;br/&gt;that is:&lt;br/&gt;&lt;br/&gt;  If E happens, we&amp;#39;re both at &#43;100&lt;br/&gt;  If F happens, we&amp;#39;re both at &#43;50&lt;br/&gt;  If E&#43;F both happen, we&amp;#39;re both at &#43;9000&lt;br/&gt;&lt;br/&gt;In general, I think combining proposals when the combination is better&lt;br/&gt;than the individual proposals were is obviously good; and combining&lt;br/&gt;related proposals into a single activation can be good if it is easier&lt;br/&gt;to think about the ideas as a set. &lt;br/&gt;&lt;br/&gt;It&amp;#39;s only when you&amp;#39;d be rejecting the proposal on its own merits that&lt;br/&gt;I think combining it with others is a bad idea in principle.&lt;br/&gt;&lt;br/&gt;For specific examples, we bundled schnorr, Taproot, MAST, OP_SUCCESSx&lt;br/&gt;and CHECKSIGADD together because they do have synergies like that; we&lt;br/&gt;didn&amp;#39;t bundle ANYPREVOUT and graftroot despite the potential synergies&lt;br/&gt;because those features needed substantially more study.&lt;br/&gt;&lt;br/&gt;The nulldummy soft-fork (bip 147) was deployed concurrently with&lt;br/&gt;the segwit soft-fork (bip 141, 143), but I don&amp;#39;t think there was any&lt;br/&gt;particular synergy or need for those things to be combined, it just&lt;br/&gt;reduced the overhead of two sets of activation signalling to one.&lt;br/&gt;&lt;br/&gt;Note that the implementation code for nulldummy had already been merged&lt;br/&gt;and were applied as relay policy well before activation parameters were&lt;br/&gt;defined (May 2014 via PR#3843 vs Sep 2016 for PR#8636) let alone becoming&lt;br/&gt;an active soft fork.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T01:00:03&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst2gpgzax5468qqc7mppv652w9hv7aezjej5ttn58ev9a7rvwxx4gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k2pguy3</id>
    
      <title type="html">📅 Original date posted:2021-09-08 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst2gpgzax5468qqc7mppv652w9hv7aezjej5ttn58ev9a7rvwxx4gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k2pguy3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdnnslc5rln2u85qh2uw9fzux6t090g0pwa2xmpt5mu4zgdqhcefcnsdc8z&#39;&gt;nevent1q…dc8z&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-09-08&lt;br/&gt;📝 Original message:On Tue, Sep 07, 2021 at 06:07:47PM &#43;0200, 0xB10C via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; The reorg-interval X very much depends on the user&amp;#39;s needs. One could&lt;br/&gt;&amp;gt; argue that there should be, for example, three reorgs per day, each 48&lt;br/&gt;&amp;gt; blocks apart.&lt;br/&gt;&lt;br/&gt;Oh, wow, I think the last suggestion was every 100 blocks (every&lt;br/&gt;~16h40m). Once every ~8h sounds very convenient.&lt;br/&gt;&lt;br/&gt;&amp;gt; Such a short reorg interval allows developers in all time&lt;br/&gt;&amp;gt; zones to be awake during one or two reorgs per day.&lt;br/&gt;&lt;br/&gt;And also for there to reliably be reorgs when they&amp;#39;re not awake, which&lt;br/&gt;might be a useful thing to be able to handle, too :)&lt;br/&gt;&lt;br/&gt;&amp;gt; Developers don&amp;#39;t&lt;br/&gt;&amp;gt; need to wait for, for example, a week until they can test their reorgs&lt;br/&gt;&amp;gt; next. However, too frequent reorgs could hinder other SigNet users.&lt;br/&gt;&lt;br/&gt;Being able to run `bitcoind -signet -signetacceptreorg=0` and never&lt;br/&gt;seeing any reorgs should presumably make this not a problem?&lt;br/&gt;&lt;br/&gt;For people who do see reorgs, having an average of 2 or 3 additional&lt;br/&gt;blocks every 48 blocks is perhaps a 6% increase in storage/traffic.&lt;br/&gt;&lt;br/&gt;&amp;gt; # Scenario 1: Race between two chains&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; For this scenario, at least two nodes and miner scripts need to be&lt;br/&gt;&amp;gt; running. An always-miner A continuously produces blocks and rejects&lt;br/&gt;&amp;gt; blocks with the to-be-reorged version bit flag set. And a race-miner R&lt;br/&gt;&amp;gt; that only mines D blocks at the start of each interval and then waits X&lt;br/&gt;&amp;gt; blocks. A and R both have the same hash rate. Assuming both are well&lt;br/&gt;&amp;gt; connected to the network, it&amp;#39;s random which miner will first mine and&lt;br/&gt;&amp;gt; propagate a block. In the end, the A miner chain will always win the race.&lt;br/&gt;&lt;br/&gt;I think this description is missing that all the blocks R mines have&lt;br/&gt;the to-be-reorged flag set.&lt;br/&gt;&lt;br/&gt;&amp;gt;     3. How deep should the reorgs be on average? Do you want to test&lt;br/&gt;&amp;gt;        deeper reorgs (10&#43; blocks) too?&lt;br/&gt;&lt;br/&gt;Super interested in input on this -- perhaps we should get optech to&lt;br/&gt;send a survey out to their members, or so?&lt;br/&gt;&lt;br/&gt;My feeling is:&lt;br/&gt;&lt;br/&gt; - 1 block reorgs: these are a regular feature on mainnet, everyone&lt;br/&gt;   should cope with them; having them happen multiple times a day to&lt;br/&gt;   make testing easier should be great&lt;br/&gt;&lt;br/&gt; - 2-3 block reorgs: good for testing the &amp;#34;your tx didn&amp;#39;t get enough&lt;br/&gt;   confirms to be credited to your account&amp;#34; case, even though it barely&lt;br/&gt;   ever happens on mainnet&lt;br/&gt;&lt;br/&gt; - 4-6 block reorgs: likely to violate business assumptions, but&lt;br/&gt;   completely technically plausible, especially if there&amp;#39;s an attack&lt;br/&gt;   against the network&lt;br/&gt;&lt;br/&gt; - 7-100 block reorgs: for this to happen on mainnet, it would probably&lt;br/&gt;   mean there was a bug and pools/miners agree the chain has to&lt;br/&gt;   be immediately reverted -- eg, someone discovers and exploits an&lt;br/&gt;   inflation bug, minting themselves free bitcoins and breaking the 21M&lt;br/&gt;   limit (eg, the 51 block reorg in Aug 2010); or someone discovers a&lt;br/&gt;   bug that splits the chain, and the less compatible chain is reverted&lt;br/&gt;   (eg, the 24 block reorg due to the bdb lock limit in Mar 2013);&lt;br/&gt;   or something similar. Obviously the bug would have to have been&lt;br/&gt;   discovered pretty quickly after it was exploited for the reorg to be&lt;br/&gt;   under a day&amp;#39;s worth of blocks.&lt;br/&gt;&lt;br/&gt; - 100-2000&#43; block reorgs: severe bug that wasn&amp;#39;t found quickly, or where&lt;br/&gt;   getting &amp;gt;50% of miners organised took more than a few hours. This will&lt;br/&gt;   start breaking protocol assumptions, like pool payouts, lightning&amp;#39;s&lt;br/&gt;   relative locktimes, or liquid&amp;#39;s peg-in confirmation requirements, and&lt;br/&gt;   result in hundres of MBs of changes to the utxo set&lt;br/&gt;&lt;br/&gt;Maybe it would be good to do reorgs of 15, 150 or 1500 blocks as a&lt;br/&gt;special fire-drill event, perhaps once a month/quarter/year or so,&lt;br/&gt;in some pre-announced window?&lt;br/&gt;&lt;br/&gt;I think sticking to 1-6 block reorgs initially is a fine way to start&lt;br/&gt;though.&lt;br/&gt;&lt;br/&gt;&amp;gt; After enough testing, the default SigNet can start to do periodical&lt;br/&gt;&amp;gt; reorgs, too.&lt;br/&gt;&lt;br/&gt;FWIW, the only thing that concerns me about doing this on the default&lt;br/&gt;signet is making sure that nodes that set -signetacceptreorg=0 don&amp;#39;t&lt;br/&gt;end up partitioning the p2p network due to either rejecting a higher&lt;br/&gt;work chain or rejecting txs due to double-spends across the two chains.&lt;br/&gt;&lt;br/&gt;A quick draft of code for -signetacceptreorg=0 is available at &lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/ajtowns/bitcoin/commits/202108-signetreorg&#34;&gt;https://github.com/ajtowns/bitcoin/commits/202108-signetreorg&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-08T00:58:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8e09xth5tx860267gx69w2nhwtsr427x8qk9uqg6jrkktdc5dzwszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4q0gwq</id>
    
      <title type="html">📅 Original date posted:2021-03-01 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8e09xth5tx860267gx69w2nhwtsr427x8qk9uqg6jrkktdc5dzwszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4q0gwq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspalzuqf9myglag244tff7hek5er484lfugvmju503xj0y4prh9ggyd8dlw&#39;&gt;nevent1q…8dlw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-03-01&lt;br/&gt;📝 Original message:On Sun, Feb 28, 2021 at 07:33:30PM &#43;0000, Luke Dashjr via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; As we saw in 2017 with BIP 9, coordinating activation by miner signal alone, &lt;br/&gt;&amp;gt; despite its potential benefits, also leaves open the door to a miner veto. &lt;br/&gt;&lt;br/&gt;To the contrary, we saw in 2017 that miners could *not* successfully&lt;br/&gt;veto a BIP 9 activation. It was certainly more effort and risk than was&lt;br/&gt;desirable to override the attempted veto, but the attempt at vetoing&lt;br/&gt;nevertheless failed.&lt;br/&gt;&lt;br/&gt;&amp;gt; It wouldn&amp;#39;t be much different than adding back the inflation bug &lt;br/&gt;&amp;gt; (CVE-2018-17144) and trusting miners not to exploit it.&lt;br/&gt;&lt;br/&gt;That is ridiculous FUD.&lt;br/&gt;&lt;br/&gt;&amp;gt; With LOT=False in the picture, however, things can get messy:&lt;br/&gt;&lt;br/&gt;LOT=false is always in the picture if we are talking about a soft-fork:&lt;br/&gt;the defining feature of a soft-fork is that old node software continues&lt;br/&gt;to work, and old node software will be entirely indifferent to whether&lt;br/&gt;activation is signalled or not.&lt;br/&gt;&lt;br/&gt;&amp;gt; some users will &lt;br/&gt;&amp;gt; enforce Taproot(eg) (those running LOT=True), while others will not (those &lt;br/&gt;&amp;gt; with LOT=False)&lt;br/&gt;&lt;br/&gt;If you are following bip8 with lockinontimeout=false, you will enforce&lt;br/&gt;taproot rules if activation occurs, you will simply not reject blocks if&lt;br/&gt;activation does not occur.&lt;br/&gt;&lt;br/&gt;&amp;gt; Users with LOT=True will still get all the safety thereof, &lt;br/&gt;&amp;gt; but those with LOT=False will (in the event of miners deciding to produce a &lt;br/&gt;&amp;gt; chain split) face an unreliable chain, being replaced by the LOT=True chain &lt;br/&gt;&amp;gt; every time it overtakes the LOT=False chain in work.&lt;br/&gt;&lt;br/&gt;This assumes anyone mining the chain where taproot does not activate is&lt;br/&gt;not able to avoid a reorg, despite having majority hashpower (as implied&lt;br/&gt;by the lot=true chain having to overtake them repeatedly). That&amp;#39;s absurd;&lt;br/&gt;avoiding a reorg is trivially achieved via running &amp;#34;invalidateblock&amp;#34;, or&lt;br/&gt;via pool software examining block headers, or via a patch along the lines&lt;br/&gt;of MUST_SIGNAL enforcement, but doing the opposite. For concreteness,&lt;br/&gt;here&amp;#39;s a sketch of such a patch:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://github.com/ajtowns/bitcoin/commit/f195688bd1eff3780f200e7a049e23b30ca4fe2f&#34;&gt;https://github.com/ajtowns/bitcoin/commit/f195688bd1eff3780f200e7a049e23b30ca4fe2f&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; For 2 weeks, users with LOT=False would not have a usable network.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s also ridiculous FUD.&lt;br/&gt;&lt;br/&gt;If it were true, it would mean the activation mechanism was not&lt;br/&gt;acceptable, as non-upgraded nodes would also not have a usable network&lt;br/&gt;for the same reason.&lt;br/&gt;&lt;br/&gt;Fortunately, it&amp;#39;s not true.&lt;br/&gt;&lt;br/&gt;More generally, if miners are willing to lose significant amounts of&lt;br/&gt;money mining orphan blocks, they can do that at any time. If they&amp;#39;re&lt;br/&gt;not inclined to do so, it&amp;#39;s incredibly straightforward for them to avoid&lt;br/&gt;doing so, whatever a minority of other miners might do.&lt;br/&gt;&lt;br/&gt;&amp;gt; The overall risk is maximally reduced by LOT=True being the only deployed &lt;br/&gt;&amp;gt; parameter, and any introduction of LOT=False only increases risk probability &lt;br/&gt;&amp;gt; and severity.&lt;br/&gt;&lt;br/&gt;LOT=false is the default behaviour of everything single piece of node&lt;br/&gt;software out there. That behaviour doesn&amp;#39;t need to be introduced, it&amp;#39;s&lt;br/&gt;already universal.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:29:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyxddhw00ecvp4tss83255cxdcmlg7s3gzxa5y2v8eu0gg3l3xq3gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3dezqn</id>
    
      <title type="html">📅 Original date posted:2021-02-22 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyxddhw00ecvp4tss83255cxdcmlg7s3gzxa5y2v8eu0gg3l3xq3gzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3dezqn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswqn96cz5pj6feqjjxv3525xmuuvza7zg3p23pc67s0tmxyzgx3ncf5dl59&#39;&gt;nevent1q…dl59&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-02-22&lt;br/&gt;📝 Original message:On Mon, Feb 22, 2021 at 09:00:29AM -0500, Matt Corallo wrote:&lt;br/&gt;&amp;gt; I think it should be clear that a UASF-style command line option to allow&lt;br/&gt;&amp;gt; consensus rule changes in the node in the short term, immediately before a fork&lt;br/&gt;&amp;gt; carries some risk of a fork, even if I agree it may not persist over months. We&lt;br/&gt;&amp;gt; can’t simply ignore that.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think a &amp;#34;-set-bip8-lockinontimeout=taproot&amp;#34; option on its own&lt;br/&gt;would be very safe -- if we were sure it was safe, because we were sure&lt;br/&gt;that everyone would eventually set lockinontimeout=true, then we would&lt;br/&gt;set lockinontimeout=true from day one and not need an option. I haven&amp;#39;t&lt;br/&gt;seen/had any good ideas on how to make the option safe, or at least make&lt;br/&gt;it obvious that you shouldn&amp;#39;t be setting it if you don&amp;#39;t really&lt;br/&gt;understand what you&amp;#39;re getting yourself into. [0]&lt;br/&gt;&lt;br/&gt;And that&amp;#39;s even if you assume that the code was perfectly capable of&lt;br/&gt;handling forks in some theoretically optimal way.&lt;br/&gt;&lt;br/&gt;So at least for the time being, I don&amp;#39;t think a config param / command&lt;br/&gt;line option is a good idea for bip8. IMHO, YMMV, IANABDFL etc.&lt;br/&gt;&lt;br/&gt;&amp;gt;     I think the important specific case of this is something like &amp;#34;if a chain&lt;br/&gt;&amp;gt;     where taproot is impossible to activate is temporarily the most work,&lt;br/&gt;&amp;gt;     miners with lockinontimeout=true need to be well connected so they don&amp;#39;t&lt;br/&gt;&amp;gt;     end up competing with each other while they&amp;#39;re catching back up&amp;#34;.&lt;br/&gt;&amp;gt; Between this and your above point, I think we probably agree - there is&lt;br/&gt;&amp;gt; material  technical complexity hiding behind a “change the consensus rules“&lt;br/&gt;&amp;gt; option. Given it’s not a critical feature by any means, putting resources into&lt;br/&gt;&amp;gt; fixing these issues probably isn’t worth it.&lt;br/&gt;&lt;br/&gt;For reference, the &amp;#34;preferentially peer with other UASF nodes&amp;#34; PR for&lt;br/&gt;the BIP148 client was&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://github.com/UASF/bitcoin/pull/24&#34;&gt;https://github.com/UASF/bitcoin/pull/24&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;List discussion was at&lt;br/&gt;&lt;br/&gt;  &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-June/014618.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-June/014618.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I think I&amp;#39;ll add playing around with that and reorgs on a signet to my&lt;br/&gt;todo list to see how it goes in cases other than ones that are (hopefully)&lt;br/&gt;vanishingly unlikely to ever happen in practice.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] In some sense, this is exactly the opposite sentiment compared to&lt;br/&gt;    earonesty&amp;#39;s comment:&lt;br/&gt;&lt;br/&gt;    &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/10900#issuecomment-317333312&#34;&gt;https://github.com/bitcoin/bitcoin/pull/10900#issuecomment-317333312&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;    I mean, I guess could solve the unsafe-now-but-maybe-safe-later&lt;br/&gt;    problem generally with a signature:&lt;br/&gt;&lt;br/&gt;      -authorise-dangerous-options-key=XXXX&lt;br/&gt;      -lockinontimeout=taproot:YYYY&lt;br/&gt;&lt;br/&gt;    where YYYY is a signature of &amp;#34;dangerous:lockinontimeout=taproot&amp;#34; or&lt;br/&gt;    similar by the key XXXX, and XXXX defaults to some (multisig?) key&lt;br/&gt;    controlled by some bitcoin people, who&amp;#39;ll only sign that when&lt;br/&gt;    there&amp;#39;s clear evidence that it will be reasonably safe, and maybe to&lt;br/&gt;    &amp;#34;cert-transparency&amp;#34; or something as well. So that allows having an&lt;br/&gt;    option become available by publishing a signature, without having&lt;br/&gt;    to recompile the code. And it could still be overriden by people who&lt;br/&gt;    know what they&amp;#39;re doing if the default key owners are being weird. And&lt;br/&gt;    maybe the &amp;#34;dangerous&amp;#34; part is enough to prevent people from randomly&lt;br/&gt;    cut-and-pasting it from a website into their bitcoin.conf.&lt;br/&gt;&lt;br/&gt;    I dunno. No bad ideas when brainstorming...
    </content>
    <updated>2023-06-07T20:28:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrtdfpec8yd89eumw5qpjddwdwwss8hay8m7gp2xw53htaew8jkfqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt0tj09</id>
    
      <title type="html">📅 Original date posted:2021-02-22 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrtdfpec8yd89eumw5qpjddwdwwss8hay8m7gp2xw53htaew8jkfqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kt0tj09" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgjeegru46uqv4z9qnatd6zwkqc4qyg6mnlqwtgfgpjxv4ywa954gsxmvtv&#39;&gt;nevent1q…mvtv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-02-22&lt;br/&gt;📝 Original message:On Mon, Feb 22, 2021 at 01:44:55AM -0500, Matt Corallo wrote:&lt;br/&gt;&amp;gt; A node feeding you invalid headers (used to be) cause for a ban [...]&lt;br/&gt;&lt;br/&gt;Headers that are invalid due to MUST_SIGNAL rules are marked as&lt;br/&gt;BLOCK_RECENT_CONSENSUS_CHANGE so don&amp;#39;t directly result in a ban. If you&amp;#39;re&lt;br/&gt;doing headers-first relay, I think that will also prevent hitting the&lt;br/&gt;BLOCK_MISSING_PREV case, which would result in a ban.&lt;br/&gt;&lt;br/&gt;If a lockinontimeout=true node is requesting compact blocks from a&lt;br/&gt;lockinontimeout=false node during a chainsplit in the MUST_SIGNAL phase,&lt;br/&gt;I think that could result in a ban.&lt;br/&gt;&lt;br/&gt;&amp;gt; More importantly, nodes on both sides of the fork need to find each other. &lt;br/&gt;&lt;br/&gt;(If there was going to be an ongoing fork there&amp;#39;d be bigger things to&lt;br/&gt;worry about...)&lt;br/&gt;&lt;br/&gt;I think the important specific case of this is something like &amp;#34;if a chain&lt;br/&gt;where taproot is impossible to activate is temporarily the most work,&lt;br/&gt;miners with lockinontimeout=true need to be well connected so they don&amp;#39;t&lt;br/&gt;end up competing with each other while they&amp;#39;re catching back up&amp;#34;.&lt;br/&gt;&lt;br/&gt;Actually, that same requirement might be more practically for a signet&lt;br/&gt;feature we were thinking about -- namely having &amp;#34;optional reorgs&amp;#34;, ie&lt;br/&gt;every now and then we&amp;#39;d mine 1-6 blocks and then reorg them out; but&lt;br/&gt;also flag the soon-to-be-stale blocks in some way so that if you didn&amp;#39;t&lt;br/&gt;want to have to deal with reorgs you could easily ignore them. Having&lt;br/&gt;it be possible for the &amp;#34;I want to see reorgs!&amp;#34; nodes to be able to find&lt;br/&gt;each other seems like it might be a similar problem (avoiding having the&lt;br/&gt;&amp;#34;don&amp;#39;t-want-reorgs&amp;#34; nodes ban the &amp;#34;want-reorgs&amp;#34; nodes too perhaps).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:28:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstxmleyh00s62kfvu4j3yg8f02w5q3kg04eg6cvwqcx0w5dl6gyaszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kzs7qgh</id>
    
      <title type="html">📅 Original date posted:2021-02-22 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstxmleyh00s62kfvu4j3yg8f02w5q3kg04eg6cvwqcx0w5dl6gyaszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kzs7qgh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgnuejkezqlm9wjwm88f8l58hwma735uzuu5tzmwgxsczdp3g3a0cvqtd2v&#39;&gt;nevent1q…td2v&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-02-22&lt;br/&gt;📝 Original message:On Fri, Feb 19, 2021 at 12:48:00PM -0500, Matt Corallo via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; It was pointed out to me that this discussion is largely moot as the&lt;br/&gt;&amp;gt; software complexity for Bitcoin Core to ship an option like this is likely&lt;br/&gt;&amp;gt; not practical/what people would wish to see.&lt;br/&gt;&amp;gt; Bitcoin Core does not have infrastructure to handle switching consensus&lt;br/&gt;&amp;gt; rules with the same datadir - after running with uasf=true for some time,&lt;br/&gt;&amp;gt; valid blocks will be marked as invalid, &lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is true? With the current proposed bip8 code,&lt;br/&gt;lockinontimeout=true will cause headers to be marked as invalid, and&lt;br/&gt;won&amp;#39;t process the block further. If a node running lockinontimeout=true&lt;br/&gt;accepts the header, then it will apply the same consensus rules as a&lt;br/&gt;lockinontimeout=false node.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think an invalid header will be added to the block index at all,&lt;br/&gt;so a node restart should always cleanly allow it to be reconsidered.&lt;br/&gt;&lt;br/&gt;The test case in&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/19573/commits/bd8517135fc839c3332fea4d9c8373b94c8c9de8&#34;&gt;https://github.com/bitcoin/bitcoin/pull/19573/commits/bd8517135fc839c3332fea4d9c8373b94c8c9de8&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;tests that a node that had rejected a chain due to lockinontimeout=true&lt;br/&gt;will reorg to that chain after being restarted as a byproduct of the way&lt;br/&gt;it tests different cases (the nodes set a new startheight, but retain&lt;br/&gt;their lockinontimeout settings).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;(I think with the current bip8 code, if you switch from&lt;br/&gt;lockinontimeout=false to lockinontimeout=true and the tip of the current&lt;br/&gt;most work chain is after the timeoutheight and did not lockin, then you&lt;br/&gt;will continue following that chain until a taproot-invalid transaction&lt;br/&gt;is inclued, rather than immediately reorging to a shorter chain that&lt;br/&gt;complies with the lockinontimeout=true rules)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:28:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgd327zuqerh3nslen054fvz4lqdgvqux46jw89k5f5uk8yzh7hsszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3lndx0</id>
    
      <title type="html">📅 Original date posted:2020-05-02 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgd327zuqerh3nslen054fvz4lqdgvqux46jw89k5f5uk8yzh7hsszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k3lndx0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswc7p65r8v46ktany8dju33ltu3n0cuzy2hfxpdhzd3vv22vne4cquvqc9e&#39;&gt;nevent1q…qc9e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-02&lt;br/&gt;📝 Original message:On Fri, May 01, 2020 at 08:23:07AM -0400, Russell O&amp;#39;Connor wrote:&lt;br/&gt;&amp;gt; Regarding specifics, I personally think it would be better to keep the&lt;br/&gt;&amp;gt; hashes of the ScriptPubKeys separate from the hashes of the input values.&lt;br/&gt;&lt;br/&gt;I think Andrew&amp;#39;s original suggestion achieves this:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; The obvious way to implement this is to add another hash to the&lt;br/&gt;&amp;gt;&amp;gt; signature message:&lt;br/&gt;&amp;gt;&amp;gt;   sha_scriptPubKeys (32): the SHA256 of the serialization of all&lt;br/&gt;&amp;gt;&amp;gt;   scriptPubKeys of the previous outputs spent by this&lt;br/&gt;&amp;gt;&amp;gt;   transaction.&lt;br/&gt;&lt;br/&gt;presumably with sha_scriptPubKeys&amp;#39; inclusion being conditional on&lt;br/&gt;hash_type not matching ANYONECANPAY.&lt;br/&gt;&lt;br/&gt;We could possibly also make the &amp;#34;scriptPubKey&amp;#34; field dependent on&lt;br/&gt;hash_type matching ANYONECANPAY, making this not cost any more&lt;br/&gt;in serialised bytes per signature.&lt;br/&gt;&lt;br/&gt;This would basically mean we&amp;#39;re committing to each component of the&lt;br/&gt;UTXOs being spent:&lt;br/&gt;&lt;br/&gt;  without ANYONECANPAY:&lt;br/&gt;    sha_prevouts commits to the txid hashes and vout indexes (COutPoint)&lt;br/&gt;    sha_amounts commits to the nValues (Coin.CTxOut.nValue)&lt;br/&gt;    sha_scriptpubkeys commits to the scriptPubKey (Coin.CTxOut.scriptPubKey)&lt;br/&gt;&lt;br/&gt;  with ANYONECANPAY it&amp;#39;s the same but just for this input&amp;#39;s prevout:&lt;br/&gt;    outpoint&lt;br/&gt;    amount&lt;br/&gt;    scriptPubKey&lt;br/&gt;&lt;br/&gt;except that we&amp;#39;d arguably still be missing:&lt;br/&gt;&lt;br/&gt;    is this a coinbase output? (Coin.fCoinBase)&lt;br/&gt;    what was the height of the coin? (Coin.nHeight)&lt;br/&gt;&lt;br/&gt;Maybe committing to the coinbase flag would have some use, but committing&lt;br/&gt;to the height would make it hard to chain unconfirmed spends, so at&lt;br/&gt;least that part doesn&amp;#39;t seem worth adding.&lt;br/&gt;&lt;br/&gt;&amp;gt; I would also (and independently) propose&lt;br/&gt;&amp;gt; separating the hashing of the output values from the output ScriptPubKeys in&lt;br/&gt;&amp;gt; `sha_outputs` so again, applications interested only in summing the values of&lt;br/&gt;&amp;gt; the outputs (for instance to compute fees) do not have to wade through those&lt;br/&gt;&amp;gt; arbitrarily long ScriptPubKeys in the outputs.&lt;br/&gt;&lt;br/&gt;If you didn&amp;#39;t verify the output scriptPubKeys, you would *only* be able&lt;br/&gt;to care about fees since you couldn&amp;#39;t verify where any of the funds went?&lt;br/&gt;And you&amp;#39;d only be able to say fees are &amp;#34;at least x&amp;#34;, since they could be&lt;br/&gt;more if one of the scriptPubKeys turned out to be OP_TRUE eg. That might&lt;br/&gt;almost make sense for a transaction accelerator that&amp;#39;s trying to increase&lt;br/&gt;the fees; but only if you were doing it for someone else&amp;#39;s transaction&lt;br/&gt;(since otherwise you&amp;#39;d care about the output addresses) and only if you&lt;br/&gt;were happy to not receive any change? Seems like a pretty weird use case?&lt;br/&gt;&lt;br/&gt;There&amp;#39;s some prior discussion on this topic at:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;http://www.erisian.com.au/taproot-bip-review/log-2020-03-04.html&#34;&gt;http://www.erisian.com.au/taproot-bip-review/log-2020-03-04.html&lt;/a&gt;&lt;br/&gt;&lt;a href=&#34;http://www.erisian.com.au/taproot-bip-review/log-2020-03-05.html&#34;&gt;http://www.erisian.com.au/taproot-bip-review/log-2020-03-05.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:24:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspul96cpw4x72jwlgkmk6aqm5wcc8zvsde56a7ushs34zheu5ferczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k9cfrh4</id>
    
      <title type="html">📅 Original date posted:2019-06-20 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspul96cpw4x72jwlgkmk6aqm5wcc8zvsde56a7ushs34zheu5ferczyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k9cfrh4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8uqh55288lxv927g4ryncs7rvy8r9kea096rm674tjy0jwkxx4agh2danz&#39;&gt;nevent1q…danz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-06-20&lt;br/&gt;📝 Original message:On Tue, Jun 18, 2019 at 04:57:34PM -0400, Russell O&amp;#39;Connor wrote:&lt;br/&gt;&amp;gt; So with regards to OP_SECURETHEBAG, I am also &amp;#34;not really seeing any reason to&lt;br/&gt;&amp;gt; complicate the spec to ensure the digest is precommitted as part of the&lt;br/&gt;&amp;gt; opcode.&amp;#34;&lt;br/&gt;&lt;br/&gt;Also, I think you can simulate OP_SECURETHEBAG with an ANYPREVOUT&lt;br/&gt;(NOINPUT) sighash (Johnson Lau&amp;#39;s mentioned this before, but not sure if&lt;br/&gt;it&amp;#39;s been spelled out anywhere); ie instead of constructing&lt;br/&gt;&lt;br/&gt;  X = Hash_BagHash( version, locktime, [outputs], [sequences], num_in )&lt;br/&gt;&lt;br/&gt;and having the script be &amp;#34;&amp;lt;X&amp;gt; OP_SECURETHEBAG&amp;#34; you calculate an&lt;br/&gt;ANYPREVOUT sighash for SIGHASH_ANYPREVOUTANYSCRIPT | SIGHASH_ALL:&lt;br/&gt;&lt;br/&gt;  Y = Hash_TapSighash( 0, 0xc1, version, locktime, [outputs], 0,&lt;br/&gt;                       amount, sequence)&lt;br/&gt;&lt;br/&gt;and calculate a signature sig = Schnorr(P,m) for some pubkey P, and&lt;br/&gt;make your script be &amp;#34;&amp;lt;sig&amp;gt; &amp;lt;P&amp;gt; CHECKSIG&amp;#34;.&lt;br/&gt;&lt;br/&gt;That loses the ability to commit to the number of inputs or restrict&lt;br/&gt;the nsequence of other inputs, and requires a bigger script (sig and P&lt;br/&gt;are ~96 bytes instead of X&amp;#39;s 32 bytes), but is otherwise pretty much the&lt;br/&gt;same as far as I can tell. Both scripts are automatically satisfied when&lt;br/&gt;revealed (with the correct set of outputs), and don&amp;#39;t need any additional&lt;br/&gt;witness data.&lt;br/&gt;&lt;br/&gt;If you wanted to construct &amp;#34;X&amp;#34; via script instead of hardcoding a value&lt;br/&gt;because it got you generalised covenants or whatever; I think you could&lt;br/&gt;get the same effect with CAT,LEFT, and RIGHT: you&amp;#39;d construct Y in much&lt;br/&gt;the same way you construct X, but you&amp;#39;d then need to turn that into a&lt;br/&gt;signature. You could do so by using pubkey P=G and nonce R=G, which&lt;br/&gt;means you need to calculate s=1&#43;hash(G,G,Y)*1 -- calculating the hash&lt;br/&gt;part is easy, multiplying it by 1 is easy, and to add 1 you can probably&lt;br/&gt;do something along the lines of:&lt;br/&gt;&lt;br/&gt;    OP_DUP 4 OP_RIGHT 1 OP_ADD OP_SWAP 28 OP_LEFT OP_SWAP OP_CAT&lt;br/&gt;&lt;br/&gt;(ie, take the last 4 bytes, increment it using 4-byte arithmetic,&lt;br/&gt;then cat the first 28 bytes and the result. There&amp;#39;s overflow issues,&lt;br/&gt;but I think they can be worked around either by allowing you to choose&lt;br/&gt;different locktimes, or by more complicated script)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:18:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8zqvgwrk43xzz7le5qlfe8vys0wrkjpcght59tnx0rl5vq6x4y8szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k048vw6</id>
    
      <title type="html">📅 Original date posted:2019-06-05 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8zqvgwrk43xzz7le5qlfe8vys0wrkjpcght59tnx0rl5vq6x4y8szyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k048vw6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxwex7nrgk9ezmkg5qtlr4hk734sae8a655mwdfd6sn50ds5e7vxshk8eac&#39;&gt;nevent1q…8eac&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-06-05&lt;br/&gt;📝 Original message:On Fri, May 31, 2019 at 10:35:45PM -0700, Jeremy via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; OP_CHECKOUTPUTSHASHVERIFY is retracted in favor of OP_SECURETHEBAG*.&lt;br/&gt;&lt;br/&gt;I think you could generalise that slightly and make it fit in&lt;br/&gt;with the existing opcode naming by calling it something like&lt;br/&gt;&amp;#34;OP_CHECKTXDIGESTVERIFY&amp;#34; and pull a 33-byte value from the stack,&lt;br/&gt;consisting of a sha256 hash and a sighash-byte, and adding a new sighash&lt;br/&gt;value corresponding to the set of info you want to include in the hash,&lt;br/&gt;which I think sounds a bit like &amp;#34;SIGHASH_EXACTLY_ONE_INPUT | SIGHASH_ALL&amp;#34;&lt;br/&gt;&lt;br/&gt;FWIW, I&amp;#39;m not really seeing any reason to complicate the spec to ensure&lt;br/&gt;the digest is precommitted as part of the opcode.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:18:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2kuynvra8czqfj7cs7y8c26wemssptfxa2pdgj5tnga8krfnkw4czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kat9crq</id>
    
      <title type="html">📅 Original date posted:2019-02-10 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2kuynvra8czqfj7cs7y8c26wemssptfxa2pdgj5tnga8krfnkw4czyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kat9crq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw46fuev2mnklzngzfu9u0fpkruqt8perqgsm97tg0quv889tk37s4vr8h7&#39;&gt;nevent1q…r8h7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-02-10&lt;br/&gt;📝 Original message:On Sun, Feb 10, 2019 at 12:48:40AM &#43;0800, Johnson Lau wrote:&lt;br/&gt;&amp;gt; In a 3 parties channel, let’s say the balance for A, B, C is 2, 3, 6BTC respectively, there are few ways they could make the settlement tx.&lt;br/&gt;&lt;br/&gt;The way I look at this is:&lt;br/&gt;&lt;br/&gt; * you can have a &amp;#34;channel factory&amp;#34; of 3 or more members (A,B,C,...)&lt;br/&gt; * it&amp;#39;s protected by an n-of-n multisig output&lt;br/&gt; * it contains some combination of:&lt;br/&gt;    - spends directly to members&lt;br/&gt;    - lightning channels between pairs of members&lt;br/&gt;    - channel factories between subgroups of members&lt;br/&gt; * when initially setup, the factory just has direct spends to each&lt;br/&gt;   member matching the amount they contributed to the factory&lt;br/&gt; * whether you create a lightning channel or a sub-factory is the same&lt;br/&gt;   decision as whether you create a lightning channel or a factory&lt;br/&gt;   on-chain, so there&amp;#39;s no combinatorial explosion.&lt;br/&gt;&lt;br/&gt;You can close any channel factory by publishing it (and any higher level&lt;br/&gt;channel factories it was a subgroup of) to the blockchain (at which point&lt;br/&gt;the lower level channel factories and lightning channels remain open),&lt;br/&gt;or you can update a channel factory off-chain by having everyone agree&lt;br/&gt;to a new state -- which is only possible if everyone is online, of course.&lt;br/&gt;&lt;br/&gt;Updates to transactions in a lightning channel in a factory, or updates&lt;br/&gt;to a subfactory, don&amp;#39;t generally involve updating the containing factory&lt;br/&gt;at all, I think.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think there&amp;#39;s much use to having sub-factories -- maybe if you&lt;br/&gt;have a subgroup that&amp;#39;s much more active and wants to change channel&lt;br/&gt;balances between each other more frequently than the least active member&lt;br/&gt;of the main factory is online?&lt;br/&gt;&lt;br/&gt;As far as NOINPUT goes; this impacts channel factories because cheating&lt;br/&gt;could be by any member of the group, so you can&amp;#39;t easily penalise the&lt;br/&gt;cheater. So an eltoo-esque setup where you publish a commitment to the&lt;br/&gt;state that&amp;#39;s spendable only by any later state, and is then redeemed&lt;br/&gt;after a timelock seems workable. In that case closing a factory when&lt;br/&gt;you can&amp;#39;t get all group members to cooperatively close looks like:&lt;br/&gt;&lt;br/&gt;   funding tx: n-of-n multisig&lt;br/&gt;&lt;br/&gt;   state commitment: n-of-n multisig&lt;br/&gt;      spends funding tx or earlier state commitment&lt;br/&gt;      spendable by later state commitment or settlement&lt;br/&gt;&lt;br/&gt;   settlement: n-of-n multisig&lt;br/&gt;      relative timelock&lt;br/&gt;      spends state commitment&lt;br/&gt;      spends to members, channels or sub-factories&lt;br/&gt;&lt;br/&gt;The settlement tx has to spend with a NOINPUT sig, because the state&lt;br/&gt;commitment could have had to spend different things. If it&amp;#39;s a&lt;br/&gt;sub-factory, the funding tx will have been in a factory, so the state&lt;br/&gt;commitment would also have had to be a NOINPUT spend. So tagging&lt;br/&gt;NOINPUT-spendable outputs would mean:&lt;br/&gt;&lt;br/&gt; - tagging state commitment outputs (which will be spent shortly with&lt;br/&gt;   NOINPUT by the settlement tx, so no real loss here)&lt;br/&gt;&lt;br/&gt; - tagging settlement tx outputs if they&amp;#39;re lightning channels or&lt;br/&gt;   sub-factories (which is something of a privacy loss, I think, since&lt;br/&gt;   they could continue off-chain for an indefinite period before being&lt;br/&gt;   spent)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think Johnson&amp;#39;s suggested elsewhere that if you spend an input with a&lt;br/&gt;NOINPUT signature, you should make all the outputs be tagged NOINPUT (as&lt;br/&gt;a &amp;#34;best practice rule&amp;#34;, rather than consensus-enforced or standardness).&lt;br/&gt;That would avoid the privacy loss here, I think, but might be confusing.&lt;br/&gt;&lt;br/&gt;If you wanted to close your factory and send your funds to an external&lt;br/&gt;third-party (a cold-wallet, custodial wallet, or just paying someone&lt;br/&gt;for something), you&amp;#39;d presumably do that via a cooperative close of the&lt;br/&gt;factory, which doesn&amp;#39;t require the state/settlement pair or NOINPUT&lt;br/&gt;spends, so the NOINPUT-in means NOINPUT-tagged-outputs doesn&amp;#39;t cause&lt;br/&gt;a problem for that use case.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;FWIW, I think an interesting way to improve this model might be to *add*&lt;br/&gt;centralisation and trust; so that instead of having the factory have&lt;br/&gt;an n-of-n multisig, have it be protected by k-of-n plus a trusted third&lt;br/&gt;party. If you have the trusted third party check that the only balances&lt;br/&gt;that change in the factory are from the &amp;#34;k&amp;#34; signers, that allows (n-k)&lt;br/&gt;members to be offline at any time, but the remaining members to rebalance&lt;br/&gt;their channels happily. (Theoretically you could do this trustlessly&lt;br/&gt;with covenants, but the spending proofs on chain would be much larger)&lt;br/&gt;&lt;br/&gt;Of course, this allows k-signers plus the trusted party to steal funds.&lt;br/&gt;It might be possible for the trusted party to store audit logs of the&lt;br/&gt;partial signatures from each of the k-signers for each transaction to&lt;br/&gt;provide accountability -- where the lack of such logs implies the&lt;br/&gt;trusted third party was cheating.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; On 9 Feb 2019, at 6:01 PM, Alejandro Ranchal Pedrosa via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Hi all,&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Side note: I was not able to come up with an similar, eltoo-like protocol that works&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; if you can&amp;#39;t predict in advance who will become absent.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; An eltoo-like protocol that works (without going on-chain) if you can&amp;#39;t predict in advance who will become absent would be a childchain. If the off-chain protocol can continue updating in the abscence of other parties, it means that other parties&amp;#39; signatures must not be required when they are not involved in the off-chain state update. If other parties&amp;#39; signatures must not be required, there must be a way of having a common verifiable &amp;#39;last state&amp;#39; to prevent a party to simultaneously &amp;#39;fork&amp;#39; the state with two different parties, and double-spend. A solution for this is a childchain for Bitcoin. An example of this is what is known as a &amp;#39;Broken Factory&amp;#39; attack [1] (&lt;a href=&#34;https://bitcoin.stackexchange.com/questions/77434/how-does-channel-factory-act/81005#81005&#34;&gt;https://bitcoin.stackexchange.com/questions/77434/how-does-channel-factory-act/81005#81005&lt;/a&gt;)&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; If the expectation is that the unresponsive party returns, fungibility is&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; not reduced due to output tagging because the above scheme can be used&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; off-chain until the original channel can be continued.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; I believe that in many cases other parties won&amp;#39;t be able to continue until the unresponsive parties go back online. That might be true in particular scenarios, but generally speaking, the party might have gone unresponsive during a factory-level update (i.e. off-chain closing and opening of channels), while some parties might have given out their signature for the update without receiving a fully signed transaction. In this case they do not even know which channel they have open (the one of the old state that they have fully signed, or the one for the new state that they have given out their signature for). This is known as a &amp;#39;Stale Factory&amp;#39;, and can be exploited by an adversary in a &amp;#39;Stale Factory&amp;#39; attack [1]. Even if they knew which state they are in (i.e. the party went unresponsive but not during a factory-level update), some of them might have run out of funds in some of their channels of the factory, and might want to update, while they will not be willing to wait for a party to go back online (something for which they also have zero guarantees of).&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; An eltoo-like protocol that works (allowing going on-chain) if you can&amp;#39;t in advance who will become absent, then this is precisely why &amp;#39;Transaction Fragments&amp;#39; have been suggested. They allow an eltoo-like protocol even when one cannot predict in advance who will become absent, or malicious (by publishing invalid states), cause the non-absent parties can unite their fragments and create a valid spendable factory-level transaction that effectively kicks out the malicious parties, while leaving the rest of the factory as it was. To the best of my understanding, the eltoo original proposal also allows this though.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Best,&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Alejandro.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; [1]: Scalable Lightning Factories for Bitcoin, &lt;a href=&#34;https://eprint.iacr.org/2018/918.pdf&#34;&gt;https://eprint.iacr.org/2018/918.pdf&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; On 08/02/2019 20:01, Jonas Nick via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Output tagging may result in reduced fungibility in multiparty eltoo channels.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; If one party is unresponsive, the remaining participants want to remove&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; the party from the channel without downtime. This is possible by creating&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; settlement transactions which pay off the unresponsive party and fund a new&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; channel with the remaining participants.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; When the party becomes unresponsive, the channel is closed by broadcasting the&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; update transaction as usual. As soon as that happens the remaining&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; participants can start to update their new channel. Their update signatures&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; must use SIGHASH_NOINPUT. This is because in eltoo the settlement txid is not&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; final (because update tx is not confirmed and may have to rebind to another&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; output). Therefore, the funding output of the new channel must be NOINPUT&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; tagged. Assuming the remaining parties later settle cooperatively, this loss&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; of fungibility would not have happened without output tagging.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; funding output          update output                                    settlement outputs              update output&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; [ A &amp;amp; B &amp;amp; C ] -&amp;gt; ... -&amp;gt; [ (A &amp;amp; B &amp;amp; C &amp;amp; state CLTV) | (As &amp;amp; Bs &amp;amp; Cs) ] -&amp;gt; [ NOINPUT tagged: (A&amp;#39; &amp;amp; B&amp;#39;), -&amp;gt; ...&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;                                                                            C&amp;#39; ]&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; If the expectation is that the unresponsive party returns, fungibility is&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; not reduced due to output tagging because the above scheme can be used&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; off-chain until the original channel can be continued.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Side note: I was not able to come up with an similar, eltoo-like protocol that works&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; if you can&amp;#39;t predict in advance who will become absent.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; On 12/13/18 12:32 PM, Johnson Lau via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; NOINPUT is very powerful, but the tradeoff is the risks of signature replay. While the key holders are expected not to reuse key pair, little could be done to stop payers to reuse an address. Unfortunately, key-pair reuse has been a social and technical norm since the creation of Bitcoin (the first tx made in block 170 reused the previous public key). I don’t see any hope to change this norm any time soon, if possible at all.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; As the people who are designing the layer-1 protocol, we could always blame the payer and/or payee for their stupidity, just like those people laughed at victims of Ethereum dumb contracts (DAO, Parity multisig, etc). The existing bitcoin script language is so restrictive. It disallows many useful smart contracts, but at the same time prevented many dumb contracts. After all, “smart” and “dumb” are non-technical judgement. The DAO contract has always been faithfully executed. It’s dumb only for those invested in the project. For me, it was just a comedy show.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; So NOINPUT brings us more smart contract capacity, and at the same time we are one step closer to dumb contracts. The target is to find a design that exactly enables the smart contracts we want, while minimising the risks of misuse.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; The risk I am trying to mitigate is a payer mistakenly pay to a previous address with the exactly same amount, and the previous UTXO has been spent using NOINPUT. Accidental double payment is not uncommon. Even if the payee was honest and willing to refund, the money might have been spent with a replayed NOINPUT signature. Once people lost a significant amount of money this way, payers (mostly exchanges) may refuse to send money to anything other than P2PKH, native-P2WPKH and native-P2WSH (as the only 3 types without possibility of NOINPUT)&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; The proposed solution is that an output must be “tagged” for it to be spendable with NOINPUT, and the “tag” must be made explicitly by the payer. There are 2 possible ways to do the tagging:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; 1. A certain bit in the tx version must be set&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; 2. A certain bit in the scriptPubKey must be set&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I will analyse the pros and cons later.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Using eltoo as example. The setup utxo is a simple 2-of-2 multisig, and should not be tagged. This makes it indistinguishable from normal 1-of-1 utxo. The trigger tx, which spends the setup utxo, should be tagged, so the update txs could spend the trigger utxo with NOINPUT. Similarly, all update txs should be tagged, so they could be spent by other update txs and settlement tx with NOINPUT. As the final destination, there is no need to tag in the settlement tx.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; In payer’s perspective, tagging means “I believe this address is for one-time-use only” Since we can’t control how other people manage their addresses, we should never do tagging when paying to other people.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I mentioned 2 ways of tagging, and they have pros and cons. First of all, tagging in either way should not complicate the eltoo protocol in anyway, nor bring extra block space overhead.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; A clear advantage of tagging with scriptPubKey is we could tag on a per-output basis. However, scriptPubKey tagging is only possible with native-segwit, not P2SH. That means we have to disallow NOINPUT in P2SH-segwit (Otherwise, *all* P2SH addresses would become “risky” for payers) This should be ok for eltoo, since it has no reason to use P2SH-segwit in intermediate txs, which is more expensive.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Another problem with scriptPubKey tagging is all the existing bech32 implementations will not understand the special tag, and will pay to a tagged address as usual. An upgrade would be needed for them to refuse sending to tagged addresses by default.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; On the other hand, tagging with tx version will also protect P2SH-segwit, and all existing wallets are protected by default. However, it is somewhat a layer violation and you could only tag all or none output in the same tx. Also, as Bitcoin Core has just removed the tx version from the UTXO database, adding it back could be a little bit annoying, but doable.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; There is an extension to the version tagging, which could make NOINPUT even safer. In addition to tagging requirement, NOINPUT will also sign the version of the previous tx. If the wallet always uses a randomised tx version, it makes accidental replay very unlikely. However, that will burn a few more bits in the tx version field.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; While this seems fully compatible with eltoo, is there any other proposals require NOINPUT, and is adversely affected by either way of tagging?&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &amp;gt;&amp;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;&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; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &amp;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;&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;br/&gt;&amp;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;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt;
    </content>
    <updated>2023-06-07T20:16:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxt2qs9hagtsf27ku048tyet3wgpj5tnvv3e0ahyzqmypvm8e5avgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ktxcjmc</id>
    
      <title type="html">📅 Original date posted:2018-12-12 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxt2qs9hagtsf27ku048tyet3wgpj5tnvv3e0ahyzqmypvm8e5avgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2ktxcjmc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyd8v92p67r63tnurdf4g32gh6tn6x3yapczwm9jptrdxk3wlfe3cwh76ja&#39;&gt;nevent1q…76ja&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-12-12&lt;br/&gt;📝 Original message:On Tue, Dec 11, 2018 at 05:50:24PM -0500, Russell O&amp;#39;Connor via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; On Sun, Dec 9, 2018 at 2:13 PM Johnson Lau &amp;lt;jl2012 at xbt.hk&amp;gt; wrote:&lt;br/&gt;&amp;gt;     The current proposal is that a 64-byte signature will be used for the&lt;br/&gt;&amp;gt;     default “signing all” sighash, and 65-byte for other sighash types. The&lt;br/&gt;&amp;gt;     space saved will allow a few more txs in a block, so I think it worths&lt;br/&gt;&amp;gt;     doing. However, this also makes witness weight estimation more difficult in&lt;br/&gt;&amp;gt;     multisig cases.&lt;br/&gt;&lt;br/&gt;This seems strange to me -- why wouldn&amp;#39;t you just assume every signature&lt;br/&gt;is 65 witness bytes, and just be grateful for the prioritisation benefit&lt;br/&gt;if someone chooses a shorter signature? Your error margin is just 0.25&lt;br/&gt;vbytes per signature.&lt;br/&gt;&lt;br/&gt;&amp;gt; I tend to think in opposite terms. Is there a proof that any script can be&lt;br/&gt;&amp;gt; transformed into an equivalent one that avoids witness weight malleability?&lt;br/&gt;&lt;br/&gt;An alternative generalisation: is there a proof that all valid witnesses&lt;br/&gt;will have a weight within some small range?&lt;br/&gt;&lt;br/&gt;&amp;gt; Moreover, even if witness weight malleability is entirely avoidable, it always&lt;br/&gt;&amp;gt; seems to come at a cost.  Taking as an example libwally&amp;#39;s proposed &amp;#34;&lt;br/&gt;&amp;gt; csv_2of3_then_2&amp;#34; Script, it begins with &amp;#34;OP_DEPTH OP_1SUB OP_1SUB&amp;#34;&lt;br/&gt;&lt;br/&gt;(DEPTH 2 NUMNOTEQUAL seems like it would have been more obvious...)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:15:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2lf4emhd449n8m9pztn34raz0sczv8p9n938lu32he0ze2fvcvrszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k5lqnpa</id>
    
      <title type="html">📅 Original date posted:2018-11-23 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2lf4emhd449n8m9pztn34raz0sczv8p9n938lu32he0ze2fvcvrszyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k5lqnpa" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswggx4rqg5rsf7q4q9x7mlmz6d9n606h5dk20k3cruzcply33tkscptx2wj&#39;&gt;nevent1q…x2wj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-23&lt;br/&gt;📝 Original message:On Wed, Nov 21, 2018 at 12:15:44PM &#43;0100, Christian Decker via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; One minor thing that I noticed a while ago and that I meant&lt;br/&gt;&amp;gt; to fix on BIP118 is that `hashSequence` does not need to be blanked for&lt;br/&gt;&amp;gt; eltoo to work (since where it is needed we also use `sighash_single`),&lt;br/&gt;&amp;gt; so I&amp;#39;m tempted to remove that redundant blanking. It may not make a lot&lt;br/&gt;&amp;gt; of difference but it&amp;#39;d limit the ability to change the number of inputs&lt;br/&gt;&amp;gt; to a NOINPUT transaction (this now being the only field that commits to&lt;br/&gt;&amp;gt; the set of inputs).&lt;br/&gt;&lt;br/&gt;Commiting to just the sequence numbers seems really weird to me; it&lt;br/&gt;only really prevents you from adding inputs, since you could still&lt;br/&gt;replace any input that was meant to be there by almost any arbitrary&lt;br/&gt;other transaction...&lt;br/&gt;&lt;br/&gt;I could see this *maybe* making sense if you at least committed to the&lt;br/&gt;values of each input&amp;#39;s outpoint; since that would be an actual constraint?&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think you can commit to anything else about the other inputs:&lt;br/&gt;&lt;br/&gt;   -- txids of the other transactions wouldn&amp;#39;t work if you had other&lt;br/&gt;      NOINPUT txes, and would introduce O(N^2) validation cost if someone&lt;br/&gt;      signed every input with NOINPUT but committed to the txids of&lt;br/&gt;      every other input&lt;br/&gt;&lt;br/&gt;   -- scriptPubKeys wouldn&amp;#39;t really work for eltoo-like constructions&lt;br/&gt;      that want to vary the scripts but apply the same sig, but might&lt;br/&gt;      work sometimes?&lt;br/&gt;&lt;br/&gt;   -- witness scripts for the other inputs could be unknown at your&lt;br/&gt;      signing time, or arbitrarily large and thus a pain to have to send&lt;br/&gt;      to a hardware wallet&lt;br/&gt;&lt;br/&gt;Just treating NOINPUT as a subset of ANYONECANPAY seems simpler to&lt;br/&gt;me though...&lt;br/&gt;&lt;br/&gt;&amp;gt; As for your proposal, I really like the `sighash_scriptmask` proposal,&lt;br/&gt;&amp;gt; and committing to the fees (with the `nofee` escape hatch) also works&lt;br/&gt;&amp;gt; seems also a nice fix. My one concern is that introducing a new opcode&lt;br/&gt;&amp;gt; to mask things in the sighash looks like a similar layering violation as&lt;br/&gt;&amp;gt; `codeseparator` was, but that&amp;#39;s just a minor issue imho.&lt;br/&gt;&lt;br/&gt;I think OP_MASK is okay as far as layering goes, if you just think of it&lt;br/&gt;as a (set of) multibyte &amp;#34;OP_MASKED_PUSH&amp;#34; opcode(s). So when you&lt;br/&gt;pseudocode a script like:&lt;br/&gt;&lt;br/&gt;    &amp;lt;n&amp;gt; OP_CSV OP_DROP &amp;lt;p&amp;gt; OP_CHECKSIG&lt;br/&gt;&lt;br/&gt;and then decide &amp;lt;n&amp;gt; needs to be masked, you rewrite it as:&lt;br/&gt;&lt;br/&gt;    [n] OP_CSV OP_DROP &amp;lt;p&amp;gt; OP_CHECKSIG&lt;br/&gt;&lt;br/&gt;indicating n is masked, and don&amp;#39;t worry about the exact bytes that will&lt;br/&gt;encode the push, anymore than you currently worry about whether it&amp;#39;s&lt;br/&gt;OP_0, OP_1..16, &amp;lt;1..75&amp;gt;&#43;1..75-bytes, PUSHDATA[1,2,3]&#43;n&#43;n-bytes.&lt;br/&gt;&lt;br/&gt;As long as OP_MASK only applies to a PUSH and it&amp;#39;s an error for OP_MASK&lt;br/&gt;not to be immediately followed by that PUSH, I think that all works&lt;br/&gt;out fine.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:15:17&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsra3ytcs0pce9a0uar9vfdqlcfkn2gzz0ahkdqzdkgg7d8qu2ngzgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4el8yc</id>
    
      <title type="html">📅 Original date posted:2018-11-20 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsra3ytcs0pce9a0uar9vfdqlcfkn2gzz0ahkdqzdkgg7d8qu2ngzgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k4el8yc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqqahnnxjay3qs0e6h56y8jymgnsft407mnj8yflyscjkkhkmegqcm3arfv&#39;&gt;nevent1q…arfv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-20&lt;br/&gt;📝 Original message:On Mon, Nov 19, 2018 at 02:37:57PM -0800, Pieter Wuille via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Here is a combined proposal:&lt;br/&gt;&amp;gt; * Three new sighash flags are added: SIGHASH_NOINPUT, SIGHASH_NOFEE,&lt;br/&gt;&amp;gt; and SIGHASH_SCRIPTMASK.&lt;br/&gt;&amp;gt; * A new opcode OP_MASK is added, which acts as a NOP during execution.&lt;br/&gt;&amp;gt; * The sighash is computed like in BIP143, but:&lt;br/&gt;&amp;gt;   * If SIGHASH_SCRIPTMASK is present, for every OP_MASK in scriptCode&lt;br/&gt;&amp;gt; the subsequent opcode/push is removed.&lt;br/&gt;&amp;gt;   * The scriptPubKey being spent is added to the sighash, unless&lt;br/&gt;&amp;gt; SIGHASH_SCRIPTMASK is set.&lt;br/&gt;&amp;gt;   * The transaction fee is added to the sighash, unless SIGHASH_NOFEE is set.&lt;br/&gt;&amp;gt;   * hashPrevouts, hashSequence, and outpoint are set to null when&lt;br/&gt;&amp;gt; SIGHASH_NOINPUT is set (like BIP118, but not for scriptCode).&lt;br/&gt;&lt;br/&gt;Current flags are {ALL, NONE, SINGLE} and ANYONECANPAY, and the BIP143&lt;br/&gt;tx digest consists of the hash of:&lt;br/&gt;&lt;br/&gt;  1 nVersion&lt;br/&gt;  4 outpoint&lt;br/&gt;  5 input scriptCode&lt;br/&gt;  6 input&amp;#39;s outpoint value&lt;br/&gt;  7 input&amp;#39;s nSeq&lt;br/&gt;  9 nLocktime&lt;br/&gt; 10 sighash&lt;br/&gt;&lt;br/&gt;  2 hashPrevOuts (commits to 4,5,6; unless ANYONECANPAY)&lt;br/&gt;  3 hashSequence (commits to 7; only if ALL and not ANYONECANPAY)&lt;br/&gt;  8 hashOutputs&lt;br/&gt;       - NONE: 0&lt;br/&gt;       - SINGLE: {value,scriptPubKey} for corresponding output&lt;br/&gt;       - otherwise: {value,scriptPubKey} for all outputs&lt;br/&gt;&lt;br/&gt;The fee is committed to by hashPrevOuts and hashOutputs, which means&lt;br/&gt;NOFEE is only potentially useful if ANYONECANPAY or NONE or SINGLE is set.&lt;br/&gt;&lt;br/&gt;For NOINPUT, (2),(3),(4) are cleared, and SCRIPTMASK (which munges (5))&lt;br/&gt;is only useful given NOINPUT, since (4) indirectly commits to (5). &lt;br/&gt;&lt;br/&gt;Given this implementation, NOINPUT effectively implies ANYONECANPAY,&lt;br/&gt;I think. (I think that is also true of BIP 118&amp;#39;s NOINPUT spec)&lt;br/&gt;&lt;br/&gt;Does it make sense to treat this as two classes of options, affecting&lt;br/&gt;the input and output side:&lt;br/&gt;&lt;br/&gt;  output: (pick one, using bits 0,1)&lt;br/&gt;    * NONE -- don&amp;#39;t care where the money goes&lt;br/&gt;    * SINGLE -- want this output&lt;br/&gt;    * ALL -- want exactly this set of outputs&lt;br/&gt;&lt;br/&gt;  input: (pick one, using bits 4,5)&lt;br/&gt;    * PARTIALSCRIPT -- spending from some tx with roughly this script (and&lt;br/&gt;                       maybe others; SCRIPTMASK|NOINPUT|ANYONECANPAY)&lt;br/&gt;    * KNOWNSCRIPT -- spending from some tx with exactly this script (and&lt;br/&gt;                     maybe others; NOINPUT|ANYONECANPAY)&lt;br/&gt;    * KNOWNTX -- spending from this tx (and maybe others; ANYONECANPAY)&lt;br/&gt;    * ALL_INPUTS -- spending from exactly these txes&lt;br/&gt;&lt;br/&gt;  combo: (flag, bit 6)&lt;br/&gt;    * NOFEE -- don&amp;#39;t commit to the fee&lt;br/&gt;&lt;br/&gt;I think NONE without NOFEE doesn&amp;#39;t make much sense, and&lt;br/&gt;NOFEE|ALL|ALL_INPUTS would also be pretty weird. Might make sense to&lt;br/&gt;warn/error on signing when asking for those combinations, and maybe even&lt;br/&gt;to fail on validating them.&lt;br/&gt;&lt;br/&gt;(Does it make sense to keep SIGHASH_NONE? I guess SIGHASH_NONE|ALL_INPUTS&lt;br/&gt;could be useful if you just use sigs on one of the other inputs to commit&lt;br/&gt;to a useful output)&lt;br/&gt;&lt;br/&gt;FWIW, OP_MASK seems a bit complicated to me. How would you mask a script&lt;br/&gt;that looks like:&lt;br/&gt;&lt;br/&gt;   OP_MASK IF &amp;lt;p&amp;gt; ENDIF &amp;lt;q&amp;gt; ...&lt;br/&gt;&lt;br/&gt;or:&lt;br/&gt;&lt;br/&gt;   IF OP_MASK ENDIF &amp;lt;p&amp;gt; ...&lt;br/&gt;&lt;br/&gt;I guess if you make the rule be &amp;#34;for every OP_MASK in scriptCode the&lt;br/&gt;*immediately* subsequent opcode/push is removed (if present)&amp;#34; it would&lt;br/&gt;be fine though -- that would make OP_MASK in both the above not have&lt;br/&gt;any effect. (Maybe a more explicit name like &amp;#34;MASK_PUSH_FOR_SIGHASH&amp;#34;&lt;br/&gt;or something might be good?)&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t have a reason why, but committing to the scriptCode feels to me&lt;br/&gt;like it reduces the &amp;#34;hackiness&amp;#34; of NOINPUT a lot.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:15:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxnepxt6w4yswy37jnc3mypeytvf0k67a8yelzqhg3lk7xs9pch3qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8zjl8x</id>
    
      <title type="html">📅 Original date posted:2018-03-14 📝 Original message:On 14 ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxnepxt6w4yswy37jnc3mypeytvf0k67a8yelzqhg3lk7xs9pch3qzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2k8zjl8x" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxtrx2syg7xcdm5c8tle47qcrqfpyeqdw506f4kzd95yxp6hpe3wqsvrvwf&#39;&gt;nevent1q…rvwf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-03-14&lt;br/&gt;📝 Original message:On 14 March 2018 5:46:55 AM GMT-04:00, Kalle Rosenbaum via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;Thank you.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;I can&amp;#39;t really see from your proposal if you had thought of this: A&lt;br/&gt;&amp;gt;soft&lt;br/&gt;&amp;gt;fork can make old nodes accept invalid message signatures as valid. For&lt;br/&gt;&amp;gt;example, a &amp;#34;signer&amp;#34; can use a witness version unknown to the verifier&lt;br/&gt;&amp;gt;to&lt;br/&gt;&amp;gt;fool the verifier. Witness version is detectable (just reject unknown&lt;br/&gt;&amp;gt;witness versions)  but there may be more subtle changes. Segwit was not&lt;br/&gt;&amp;gt;&amp;#34;detectable&amp;#34; in that way, for example.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;This is the reason why I withdrew BIP120. If you have thought about the&lt;br/&gt;&amp;gt;above, I&amp;#39;d be very interested.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;/Kalle&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Sent from my Sinclair ZX81&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Den 14 mars 2018 16:10 skrev &amp;#34;Karl Johan Alm via bitcoin-dev&amp;#34; &amp;lt;&lt;br/&gt;&amp;gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt;:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Hello,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;I am considering writing a replacement for the message signing tools&lt;br/&gt;&amp;gt;that are currently broken for all but the legacy 1xx addresses. The&lt;br/&gt;&amp;gt;approach (suggested by Pieter Wuille) is to do a script based&lt;br/&gt;&amp;gt;approach. This does not seem to require a lot of effort for&lt;br/&gt;&amp;gt;implementing in Bitcoin Core*. Below is my proposal for this system:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;A new structure SignatureProof is added, which is a simple scriptSig &amp;amp;&lt;br/&gt;&amp;gt;witnessProgram container that can be serialized. This is passed out&lt;br/&gt;&amp;gt;from/into the signer/verifier.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;RPC commands:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;sign &amp;lt;address&amp;gt; &amp;lt;message&amp;gt; [&amp;lt;prehashed&amp;gt;=false]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Generates a signature proof for &amp;lt;message&amp;gt; using the same method that&lt;br/&gt;&amp;gt;would be used to spend coins sent to &amp;lt;address&amp;gt;.**&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;verify &amp;lt;address&amp;gt; &amp;lt;message&amp;gt; &amp;lt;proof&amp;gt; [&amp;lt;prehashed&amp;gt;=false]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Deserializes and executes the proof using a custom signature checker&lt;br/&gt;&amp;gt;whose sighash is derived from &amp;lt;message&amp;gt;. Returns true if the check&lt;br/&gt;&amp;gt;succeeds, and false otherwise. The scriptPubKey is derived directly&lt;br/&gt;&amp;gt;from &amp;lt;address&amp;gt;.**&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;Feedback welcome.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;-Kalle.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;(*) Looks like you can simply use VerifyScript with a new signature&lt;br/&gt;&amp;gt;checker class. (h/t Nicolas Dorier)&lt;br/&gt;&amp;gt;(**) If &amp;lt;prehashed&amp;gt; is true, &amp;lt;message&amp;gt; is the sighash, otherwise&lt;br/&gt;&amp;gt;sighash=sha256d(message).&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;&lt;br/&gt;&lt;br/&gt;Wouldn&amp;#39;t it be sufficient for old nodes to check for standardness of the spending script and report non-standard scripts as either invalid outright, or at least highly questionable? That should prevent confusion as long as soft forks are only making nonstandard behaviours invalid.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;-- &lt;br/&gt;Sent from my phone.
    </content>
    <updated>2023-06-07T20:11:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8yx7nlx564c5lkgcewjkmk2ck70mkkvnz5u0x6rv5yuxzdhz9lcqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kxu9hne</id>
    
      <title type="html">📅 Original date posted:2017-09-29 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8yx7nlx564c5lkgcewjkmk2ck70mkkvnz5u0x6rv5yuxzdhz9lcqzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2kxu9hne" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstj27jx7c4xqnvsfjctcu995w2cpy5we9hq5u9q0alp844vnls7eg93jq5z&#39;&gt;nevent1q…jq5z&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-09-29&lt;br/&gt;📝 Original message:On Thu, Sep 28, 2017 at 06:06:29PM -0700, Mark Friedenbach via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; Unlike other proposed fixes to the fee model, this is not trivially&lt;br/&gt;&amp;gt; broken by paying the miner out of band.&lt;br/&gt;&lt;br/&gt;I think CPFP allows this to break: a miner getting paid out of band&lt;br/&gt;would just make the block look like:&lt;br/&gt;&lt;br/&gt;    (1) 100kB of 5s/byte transactions&lt;br/&gt;    (2) 850kB of 35s/byte transactions&lt;br/&gt;    (3) 50kB of 95s/byte transactions, miner paying themselves&lt;br/&gt;&lt;br/&gt;As long as every transaction in (1) has an output spent in (3), that seems&lt;br/&gt;like it would be perfectly legitimate for CPFP. &lt;br/&gt;&lt;br/&gt;I think it would be cheaper overall than the fee refund transactions&lt;br/&gt;as well. People making arrangements with miners directly would have to&lt;br/&gt;pay for block space to cover:&lt;br/&gt;&lt;br/&gt;   out:&lt;br/&gt;     30-40B dest address&lt;br/&gt;     30-40B change address&lt;br/&gt;     10B    cpfp link&lt;br/&gt;   in:&lt;br/&gt;     36B    cpfp txid&lt;br/&gt;&lt;br/&gt;then to actual spend their change:&lt;br/&gt;&lt;br/&gt;   in:&lt;br/&gt;     36B&#43;70B txid&#43;idx &#43; witness for change&lt;br/&gt;&lt;br/&gt;for a total of 142-162B plus 70B witness, as well as some sort of out of&lt;br/&gt;band payment to the miner (paying fees directly to miners via a lightning&lt;br/&gt;channel, comes to mind). &lt;br/&gt;&lt;br/&gt;If I understand your suggestion correctly, it would look like:&lt;br/&gt;&lt;br/&gt;   coinbase:&lt;br/&gt;     30-40B fee overflow payment back to transactor&lt;br/&gt;&lt;br/&gt;   out:&lt;br/&gt;     30-40B dest address&lt;br/&gt;     30-40B change address&lt;br/&gt;     30-40B fee-overflow output marker&lt;br/&gt;&lt;br/&gt;and to spend their change:&lt;br/&gt;&lt;br/&gt;   in:&lt;br/&gt;     36B&#43;70B txid&#43;idx &#43; witness for change&lt;br/&gt;     36B&#43;70B txid&#43;idx &#43; witness for fee overflow&lt;br/&gt;&lt;br/&gt;for a total of 192-232B plus 140B witness; so that&amp;#39;s 40%-50% more block&lt;br/&gt;weight used. The fee overflow would probably be pretty small amounts,&lt;br/&gt;as well, so kind of annoying to actually collect.&lt;br/&gt;&lt;br/&gt;If you end up with two change addresses per tx generally, that also seems&lt;br/&gt;like it might it annoyingly easy to link your transactions together&lt;br/&gt;(unless fees end up getting coinjoined or run through satoshidice or&lt;br/&gt;something). If you end up sending lots of fee overflows to a single&lt;br/&gt;address, that links your txes too of course.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;A miner might be willing to do that in order to charge a two-part tariff:&lt;br/&gt;ie, a very high &amp;#34;subscription&amp;#34; fee that&amp;#39;s paid once a year or similar,&lt;br/&gt;along with very low per-tx fees. The only reason I can think of why&lt;br/&gt;someone would buy a subscription is if the miner&amp;#39;s effectively a monopoly&lt;br/&gt;and submitting transactions via the p2p network isn&amp;#39;t reliable enough;&lt;br/&gt;the whole point of a two-part tariff is to be as expensive as each user&lt;br/&gt;can bear, so it won&amp;#39;t ever be any cheaper.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;FWIW, I think reliability-based-price-discrimination might allow higher&lt;br/&gt;mining revenue via having txes with differing fee rates in the same&lt;br/&gt;block: eg if people are happy to pay 100s/byte for confirmation within&lt;br/&gt;30 minutes, and likewise willing to pay 10s/byte for confirmation within&lt;br/&gt;3 hours, and there aren&amp;#39;t enough transactions of either type to hit the&lt;br/&gt;block size limit, then a monopoly miner / mining cartel would do better&lt;br/&gt;by accepting 100s/byte txes at any time, while accepting 10s/byte txes&lt;br/&gt;in any given block, but only with about a 1-in-7 chance for any given tx.&lt;br/&gt;&lt;br/&gt;Looking at estimatefee.com, there&amp;#39;s currently apparently ~200kB of 82s/B&lt;br/&gt;or more transactions, while to fill a 1MB block you&amp;#39;d have to go all the&lt;br/&gt;way down to 2.1s/B -- so if you have to charge all txes at the marginal&lt;br/&gt;fee rate, that&amp;#39;s 200kB at 82s/B for 0.16 BTC rather than 1MB at 2.1s/B&lt;br/&gt;for 0.021 BTC.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think ideally, it would probably be better to let the block weight&lt;br/&gt;limit adjust to deal with high-frequency components to changes in demand,&lt;br/&gt;and have fee rates adjust more slowly to address the long-term trends&lt;br/&gt;in changes to demand: if fee rates only adjust slowly, then they&amp;#39;re&lt;br/&gt;(by definition) easily predictable and you don&amp;#39;t *have* to have much&lt;br/&gt;concern about getting them wrong. (You&amp;#39;d still need to add the correct&lt;br/&gt;fee at the time you want to publish a pre-signed transaction that was&lt;br/&gt;very old, but CPFP isn&amp;#39;t too bad at that).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj
    </content>
    <updated>2023-06-07T20:06:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq2sdxqgy074faf0u7a7kuywye62f6y865zuarj0sxjyj5u3z62tgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2keuluh4</id>
    
      <title type="html">📅 Original date posted:2017-09-14 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq2sdxqgy074faf0u7a7kuywye62f6y865zuarj0sxjyj5u3z62tgzyrc0akn26k82nayxu35ls7emnxtyjsmr5f5c9wryve79mzktq4p2keuluh4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvt2y06dkppgx2pccf3ue5yldm7v2guk02m6l7hvlhw6m5t4ry06gmv55dh&#39;&gt;nevent1q…55dh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-09-14&lt;br/&gt;📝 Original message:On Tue, Sep 12, 2017 at 09:10:18AM -0700, Simon Liu wrote:&lt;br/&gt;&amp;gt; It would be a good starting point if the current policy could be&lt;br/&gt;&amp;gt; clarified, so everyone is on the same page, and there is no confusion.&lt;br/&gt;&lt;br/&gt;Collecting various commentary from here and reddit, I think current de&lt;br/&gt;facto policy is something like:&lt;br/&gt;&lt;br/&gt; * Vulnerabilities should be reported via security at bitcoincore.org [0]&lt;br/&gt;&lt;br/&gt; * A critical issue (that can be exploited immediately or is already&lt;br/&gt;   being exploited causing large harm) will be dealt with by:&lt;br/&gt;     * a released patch ASAP&lt;br/&gt;     * wide notification of the need to upgrade (or to disable affected&lt;br/&gt;       systems)&lt;br/&gt;     * minimal disclosure of the actual problem, to delay attacks&lt;br/&gt;   [1] [2]&lt;br/&gt;&lt;br/&gt; * A non-critical vulnerability (because it is difficult or expensive to&lt;br/&gt;   exploit) will be dealt with by:&lt;br/&gt;     * patch and review undertaken in the ordinary flow of development&lt;br/&gt;     * backport of a fix or workaround from master to the current&lt;br/&gt;       released version [2]&lt;br/&gt;&lt;br/&gt; * Devs will attempt to ensure that publication of the fix does not&lt;br/&gt;   reveal the nature of the vulnerability by providing the proposed fix&lt;br/&gt;   to experienced devs who have not been informed of the vulnerability,&lt;br/&gt;   telling them that it fixes a vulnerability, and asking them to identify&lt;br/&gt;   the vulnerability. [2]&lt;br/&gt;&lt;br/&gt; * Devs may recommend other bitcoin implementations adopt vulnerability&lt;br/&gt;   fixes prior to the fix being released and widely deployed, if they&lt;br/&gt;   can do so without revealing the vulnerability; eg, if the fix has&lt;br/&gt;   significant performance benefits that would justify its inclusion. [3]&lt;br/&gt;&lt;br/&gt; * Prior to a vulnerability becoming public, devs will generally recommend&lt;br/&gt;   to friendly altcoin devs that they should catch up with fixes. But this&lt;br/&gt;   is only after the fixes are widely deployed in the bitcoin network. [4]&lt;br/&gt;&lt;br/&gt; * Devs will generally not notify altcoin developers who have behaved&lt;br/&gt;   in a hostile manner (eg, using vulnerabilities to attack others, or&lt;br/&gt;   who violate embargoes). [5]&lt;br/&gt;&lt;br/&gt; * Bitcoin devs won&amp;#39;t disclose vulnerability details until &amp;gt;80% of bitcoin&lt;br/&gt;   nodes have deployed the fixes. Vulnerability discovers are encouraged&lt;br/&gt;   and requested to follow the same policy. [1] [6]&lt;br/&gt;&lt;br/&gt;Those seem like pretty good policies to me, for what it&amp;#39;s worth.&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t seen anything that indicates bitcoin devs will *ever* encourage&lt;br/&gt;public disclosure of vulnerabilities (as opposed to tolerating other&lt;br/&gt;people publishing them [6]). So I&amp;#39;m guessing current de facto policy is&lt;br/&gt;more along the lines of:&lt;br/&gt;&lt;br/&gt; * Where possible, Bitcoin devs will never disclose vulnerabilities&lt;br/&gt;   publically while affected code may still be in use (including by&lt;br/&gt;   altcoins).&lt;br/&gt;&lt;br/&gt;rather than something like:&lt;br/&gt;&lt;br/&gt; * Bitcoin devs will disclose vulnerabilities publically after 99% of the&lt;br/&gt;   bitcoin network has upgraded [7], and fixes have been released for&lt;br/&gt;   at least 12 months.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Instinctively, I&amp;#39;d say documenting this policy (or whatever it actually&lt;br/&gt;is) would be good, and having all vulnerabilities get publically released&lt;br/&gt;eventually would also be good; that&amp;#39;s certainly the more &amp;#34;open source&amp;#34;&lt;br/&gt;approach. But arguing the other side:&lt;br/&gt;&lt;br/&gt; - documenting security policy gives attackers a better handle on where&lt;br/&gt;   to find weak points; this may be more harm than there is benefit to&lt;br/&gt;   improving legitimate users&amp;#39; understanding of and confidence in the&lt;br/&gt;   development process&lt;br/&gt;&lt;br/&gt; - the main benefit of public vulnerability disclosure is a better&lt;br/&gt;   working relationship with security researchers and perhaps better&lt;br/&gt;   understanding of what sort of bugs happen in practice in general;&lt;br/&gt;   but if most of your security research is effectively in house [6],&lt;br/&gt;   maybe those benefits aren&amp;#39;t as great as the harm done by revealing&lt;br/&gt;   even old vulnerabilities to attackers&lt;br/&gt;&lt;br/&gt;If the first of those arguments holds, well, hopefully this message has&lt;br/&gt;egregious errors that no one will correct, or it will quickly get lost&lt;br/&gt;in this list&amp;#39;s archives...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;aj&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;http://bitcoincore.org/en/contact&#34;&gt;http://bitcoincore.org/en/contact&lt;/a&gt;&lt;br/&gt;    referenced from .github/ISSUE_TEMPLATE.md in git&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014986.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014986.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014990.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014990.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://www.reddit.com/r/btc/comments/6zf1qo/peter_todd_nicely_pulled_away_attention_from_jjs/dmxcw70/&#34;&gt;https://www.reddit.com/r/btc/comments/6zf1qo/peter_todd_nicely_pulled_away_attention_from_jjs/dmxcw70/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[4] &lt;a href=&#34;https://www.reddit.com/r/btc/comments/6z827o/chris_jeffrey_jj_discloses_bitcoin_attack_vector/dmxdg83/&#34;&gt;https://www.reddit.com/r/btc/comments/6z827o/chris_jeffrey_jj_discloses_bitcoin_attack_vector/dmxdg83/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[5] &lt;a href=&#34;https://www.reddit.com/r/btc/comments/6zb3lp/maxwell_admits_core_sat_on_vulnerability/dmv4y7g/&#34;&gt;https://www.reddit.com/r/btc/comments/6zb3lp/maxwell_admits_core_sat_on_vulnerability/dmv4y7g/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[6] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014991.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014991.html&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;[7] Per &lt;a href=&#34;http://luke.dashjr.org/programs/bitcoin/files/charts/branches.html&#34;&gt;http://luke.dashjr.org/programs/bitcoin/files/charts/branches.html&lt;/a&gt;&lt;br/&gt;    it seems like 1.7% of the network is running known-vulnerable versions&lt;br/&gt;    0.8 and 0.9; but only 0.37% are running 0.10 or 0.11, so that might argue&lt;br/&gt;    revealing any vulnerabilities fixed since 0.12.0 would be fine...&lt;br/&gt;    (bitnodes.21.co doesn&amp;#39;t seem to break down anything earlier than 0.12)
    </content>
    <updated>2023-06-07T20:05:54&#43;02:00</updated>
  </entry>

</feed>