|
| 1 | +--- |
| 2 | +title: 'Bitcoin Optech Newsletter #126' |
| 3 | +permalink: /en/newsletters/2020/12/02/ |
| 4 | +name: 2020-12-02-newsletter |
| 5 | +slug: 2020-12-02-newsletter |
| 6 | +type: newsletter |
| 7 | +layout: newsletter |
| 8 | +lang: en |
| 9 | +--- |
| 10 | +This week's newsletter describes a proposal for using fidelity bonds on |
| 11 | +LN to prevent denial of service attacks, summarizes a PR to address a |
| 12 | +fee siphoning attack that could affect LN channels using anchor outputs, |
| 13 | +and links to a proposed specification for miniscript. Also included are |
| 14 | +our regular sections with releases, release candidates, and recent code |
| 15 | +changes in popular Bitcoin infrastructure software. |
| 16 | + |
| 17 | +## Action items |
| 18 | + |
| 19 | +*None this week.* |
| 20 | + |
| 21 | +## News |
| 22 | + |
| 23 | +- **Fidelity bonds for LN routing:** Gleb Naumenko and Antoine Riard |
| 24 | + [posted][gnar post] a to the Lightning-Dev mailing list to use *stake |
| 25 | + certificates* (another name for fidelity bonds) to prevent a type of |
| 26 | + channel jamming attack [first described in 2015][russell loop]. |
| 27 | + These are attacks where a malicious user sends a payment to themselves |
| 28 | + or a confederate through a series of channels and then delays either |
| 29 | + accepting or rejecting the payment. Until the payment eventually |
| 30 | + times out, each channel used to route the payment is unable to use |
| 31 | + those funds to route other user's payments. Since a route may cross |
| 32 | + more than a dozen channels, that means every bitcoin controlled by the |
| 33 | + attacker can prevent more than a dozen bitcoins belonging to honest |
| 34 | + nodes from being used for honest routing. <!-- "more than a dozen" is conservative, I |
| 35 | + think 25 is the actual max: |
| 36 | + http://gnusha.org/lightning-dev/2020-11-30.log 04:42 --> |
| 37 | + |
| 38 | + Previously proposed solutions for this problem (and related |
| 39 | + problems) mostly involved upfront fees, see Newsletters |
| 40 | + [#72][news72 upfront], [#86][news86 upfront], [#119][news119 |
| 41 | + upfront], [#120][news120 upfront], and [#122][news122 upfront]. |
| 42 | + This week, Naumenko and Riard proposed that each payment include |
| 43 | + proof that its spender controlled some amount of bitcoin. Each |
| 44 | + routing node could then publicly announce its policy on how much |
| 45 | + value it would route given a proof of a certain stake value. For |
| 46 | + example, Alice's node could announce that it would route payments up |
| 47 | + to 0.01 BTC from anyone who could prove they controlled at least |
| 48 | + 1.00 BTC. This would allow someone to route a payment through |
| 49 | + Alice's node but limit how much of her capital they could tie up. |
| 50 | + |
| 51 | + The mailing list post does note that a significant amount of work |
| 52 | + would need to be done to implement the idea, including the |
| 53 | + development of a privacy-preserving cryptographic proof. Discussion |
| 54 | + of the idea is still ongoing as of this writing. |
| 55 | + |
| 56 | +- **Proposed intermediate solution for LN `SIGHASH_SINGLE` fee theft:** |
| 57 | + as described in [Newsletter #115][news115 siphoning], a recent update |
| 58 | + to the LN specification that has not yet been widely deployed makes it |
| 59 | + possible for an attacker to steal a portion of the bitcoins allocated |
| 60 | + to paying onchain fees for LN payments (HTLCs). This is a consequence |
| 61 | + of spending HTLCs with signatures using the [sighash flag][] |
| 62 | + `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY`. |
| 63 | + |
| 64 | + The preferred solution to that problem is to simply not include any |
| 65 | + fees in HTLCs, eliminating the ability to steal fees and making the |
| 66 | + party who wants to claim the HTLC responsible for paying any |
| 67 | + necessary fees. However, this requires an additional change to the |
| 68 | + LN specification which all implementations of [anchor outputs][topic |
| 69 | + anchor outputs] would need to adopt. In the meantime, Johan Halseth |
| 70 | + [posted][halseth post] to the Lightning-Dev mailing list this week |
| 71 | + about a [PR][LND #4795] he opened to LND that will only accept a |
| 72 | + payment if the maximum amount of fees a peer can steal from that |
| 73 | + payment (and all previously accepted pending payments) is less than the |
| 74 | + *channel reserve*---the minimum amount that must be kept in each |
| 75 | + side of a channel to serve as a penalty in case an old state is |
| 76 | + broadcast. This doesn't eliminate the problem but it does |
| 77 | + significantly limit the maximum loss possible. A downside is that |
| 78 | + channels with only small amounts of value (and thus small reserves) |
| 79 | + will be limited to only forwarding a small number of HTLCs |
| 80 | + simultaneously. Halseth's PR attempts to mitigate this by not |
| 81 | + requesting feerate increases above 10 sat/vbyte, keeping HTLC fees |
| 82 | + low so that the fees from several HTLCs are less likely to exceed |
| 83 | + reserves. |
| 84 | + |
| 85 | +- **Formal specification of miniscript:** Dmitry Petukhov |
| 86 | + [published][petukhov post] a [formal specification][miniscript spec] |
| 87 | + of [miniscipt][topic miniscript] based on the documentation written by |
| 88 | + other developers. This could help with testing implementations or in |
| 89 | + extending miniscript in the future. |
| 90 | + |
| 91 | +## Releases and release candidates |
| 92 | + |
| 93 | +*New releases and release candidates for popular Bitcoin infrastructure |
| 94 | +projects. Please consider upgrading to new releases or helping to test |
| 95 | +release candidates.* |
| 96 | + |
| 97 | +- [HWI 1.2.1][] is a maintenance release that provides compatibility |
| 98 | + with a recent version of Ledger's firmware and improves compatibility |
| 99 | + with the BitBox02. |
| 100 | + |
| 101 | +- [Rust-Lightning 0.0.12][] is a release that updates several APIs to |
| 102 | + make them easier to use and adds "beta status" C/C++ bindings (see |
| 103 | + [Newsletter #115][news115 rl bindings]). |
| 104 | + |
| 105 | +- [Bitcoin Core 0.21.0rc2][Bitcoin Core 0.21.0] is a release candidate |
| 106 | + for the next major version of this full node implementation and its |
| 107 | + associated wallet and other software. |
| 108 | + |
| 109 | +## Notable code and documentation changes |
| 110 | + |
| 111 | +*Notable changes this week in [Bitcoin Core][bitcoin core repo], |
| 112 | +[C-Lightning][c-lightning repo], [Eclair][eclair repo], [LND][lnd repo], |
| 113 | +[Rust-Lightning][rust-lightning repo], [libsecp256k1][libsecp256k1 repo], |
| 114 | +[Hardware Wallet Interface (HWI)][hwi repo], [Bitcoin Improvement Proposals |
| 115 | +(BIPs)][bips repo], and [Lightning BOLTs][bolts repo].* |
| 116 | + |
| 117 | +- [LND #4752][] invoices: force MPP payload inclusion for non-keysend payments FIXME:adamjonas |
| 118 | + |
| 119 | +<!-- FIXME: harding to update topics --> |
| 120 | +{% include references.md %} |
| 121 | +{% include linkers/issues.md issues="4752,4795" %} |
| 122 | +[hwi 1.2.1]: https://github.com/bitcoin-core/HWI/releases/tag/1.2.1 |
| 123 | +[rust-lightning 0.0.12]: https://github.com/rust-bitcoin/rust-lightning/releases/tag/v0.0.12 |
| 124 | +[bitcoin core 0.21.0]: https://bitcoincore.org/bin/bitcoin-core-0.21.0/ |
| 125 | +[gnar post]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-November/002884.html |
| 126 | +[russell loop]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html |
| 127 | +[news115 siphoning]: /en/newsletters/2020/09/16/#stealing-onchain-fees-from-ln-htlcs |
| 128 | +[sighash flag]: https://btcinformation.org/en/developer-guide#signature-hash-types |
| 129 | +[halseth post]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-November/002882.html |
| 130 | +[petukhov post]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-November/018281.html |
| 131 | +[miniscript spec]: https://github.com/dgpv/miniscript-alloy-spec |
| 132 | +[news115 rl bindings]: /en/newsletters/2020/09/16/#rust-lightning-618 |
| 133 | +[news72 upfront]: /en/newsletters/2019/11/13/#ln-up-front-payments |
| 134 | +[news86 upfront]: /en/newsletters/2020/02/26/#reverse-up-front-payments |
| 135 | +[news119 upfront]: /en/newsletters/2020/10/14/#ln-upfront-payments |
| 136 | +[news120 upfront]: /en/newsletters/2020/10/21/#more-ln-upfront-fees-discussion |
| 137 | +[news122 upfront]: /en/newsletters/2020/11/04/#bi-directional-upfront-fees-for-ln |
0 commit comments