Skip to content

Commit 841f644

Browse files
Gustavojfebitschmidty
authored andcommitted
News309: notable code summaries
1 parent 596ec59 commit 841f644

File tree

5 files changed

+97
-27
lines changed

5 files changed

+97
-27
lines changed

_posts/en/newsletters/2024-06-28-newsletter.md

+85-27
Original file line numberDiff line numberDiff line change
@@ -143,33 +143,83 @@ Proposals (BIPs)][bips repo], [Lightning BOLTs][bolts repo],
143143
[Lightning BLIPs][blips repo], [Bitcoin Inquisition][bitcoin inquisition
144144
repo], and [BINANAs][binana repo]._
145145

146-
- [Bitcoin Core #29575][] net_processing: make any misbehavior trigger immediate discouragement
147-
148-
- [Bitcoin Core #28984][] Cluster size 2 package rbf
149-
150-
- [Core Lightning #7388][] no longer allow creation of old
151-
(experimental-only!) non-zero-fee anchor channels. [...] We still
152-
support existing ones, though we were the only implementation which
153-
ever did, and only in experimental mode, so we should be able to
154-
upgrade them and avoid a forced close, with a bit of engineering...
155-
156-
Harding notes: there's a lot of updates in this PR. I think we've
157-
discussed most of them in the past, so a quick mention for them is
158-
fine but what I think is really worth announcing in this item are the
159-
changes in commit
160-
https://github.com/ElementsProject/lightning/pull/7388/commits/27a846a133832b6629231440b72f085c096e28d5
161-
162-
- [LND #8734][] routing: cancelable payment loop
163-
164-
- [LDK #3127][] Implement non-strict forwarding
165-
166-
- [Rust Bitcoin #2794][]
167-
168-
- [BDK #1395][] Remove `rand` dependency from `bdk`
169-
170-
- [BIPs #1620][] and [#1622][bips #1622] BIP-352: handle invalid privkey / pubkey sums for sending / scanning, add changelog / BIP-352: generate `input_hash` after summing up keys (simplification)
171-
172-
- [BOLTs #869][] BOLT 2: quiescence protocol (feature 34/35) option_quiesce
146+
- [Bitcoin Core #29575][] simplifies the peer misbehavior scoring system to only
147+
use two increments: 100 points (results in immediate disconnection and
148+
discouragement) and 0 points (allowed behavior). Most types of misbehaviors
149+
are avoidable and have been bumped to a score of 100, while two
150+
behaviors that honest and correctly functioning nodes might perform
151+
under certain circumstances have been reduced to 0. This PR also
152+
removes the heuristic that only considers P2P `headers` messages
153+
containing a maximum of eight block headers as a possible [BIP130][]
154+
announcement of a new block. Bitcoin Core now treats all `headers`
155+
messages that don't connect to a block tree known by the node as
156+
potential new block announcements and requests any missing blocks.
157+
158+
- [Bitcoin Core #28984][] adds support for a limited version of
159+
[replace-by-fee][topic rbf] for [packages][topic package relay]
160+
with clusters of size two (one parent, one child), including
161+
Topologically Restricted Until Confirmation ([TRUC][topic v3 transaction
162+
relay]) transactions (aka v3 transactions). These clusters can only replace an
163+
existing cluster of the same size or smaller. See [Newsletter #296][news296
164+
packagerbf] for related context.
165+
166+
- [Core Lightning #7388][] removes the ability to create non-zero-fee
167+
[anchor-style][topic anchor outputs] channels to conform to changes in
168+
the BOLT specification made in 2021 (see [Newsletter #165][news165
169+
anchors]), while maintaining support for existing channels. Core
170+
Lightning was the only implementation fully add this, and only in
171+
experimental mode, before it was discovered to be insecure (see
172+
[Newsletter #115][news115 anchors]) and replaced with zero-fee anchor
173+
channels. Other updates include rejecting `encrypted_recipient_data`
174+
containing both `scid` and `node`, parsing LaTeX formatting added to
175+
the onion specification,
176+
and other BOLT specification changes mentioned in Newsletters [#259][news259
177+
bolts] and [#305][news305 bolts].
178+
179+
- [LND #8734][] improves the payment route estimation abort process when a user
180+
interrupts the `lncli estimateroutefee` RPC command by making the payment loop
181+
aware of the client's streaming context. Previously, interrupting this command
182+
would cause the server to continue [payment probing][topic payment probes]
183+
routes unnecessarily. See Newsletter [#293][news293 routefee] for a previous
184+
reference to this command.
185+
186+
- [LDK #3127][] implements non-strict forwarding to improve payment reliability,
187+
as specified in [BOLT4][], allowing [HTLCs][topic htlc] to be forwarded to a
188+
peer through channels other than the one specified by `short_channel_id` in
189+
the onion message. Channels with the least amount of outbound liquidity that
190+
can pass the HTLC are selected to maximize the probability of success for
191+
subsequent HTLCs.
192+
193+
- [Rust Bitcoin #2794][] implements the enforcement of the redeem script size
194+
limit of 520 bytes for P2SH and of the witness script size limit of 10,000
195+
bytes for P2WSH by adding fallible constructors to `ScriptHash` and
196+
`WScriptHash`.
197+
198+
- [BDK #1395][] removes the `rand` dependency in both explicit and implicit
199+
usage, replacing it with `rand-core` to simplify dependencies, avoid the added
200+
complexity of `thread_rng` and `getrandom`, and provide greater flexibility by
201+
allowing users to pass their own Random Number Generators (RNGs).
202+
203+
- [BIPs #1620][] and [BIPs #1622][] add changes to [BIP352][]
204+
specification of [silent payments][topic silent payments].
205+
Discussions in the PR implementing silent payments in the `secp256k1` library
206+
recommend adding corner-case handling to [BIP352][], specifically to handle
207+
invalid private/public key sums for sending and scanning: fail if private key
208+
sum is zero (for sender), and fail if public key sum is point at infinity (for
209+
receiver). In #1622, BIP352 is changed to calculate `input_hash`
210+
after key aggregation, not before, to reduce redundancy and make the process
211+
clearer for both sender and receiver.
212+
213+
- [BOLTs #869][] introduces a new channel quiescence protocol on BOLT2, which
214+
aims to make [protocol upgrades][topic channel commitment upgrades]
215+
and major changes to payment channels safer and
216+
more efficient by ensuring a stable channel state during the process. The
217+
protocol introduces a new message type, `stfu` (SomeThing Fundamental is
218+
Underway), which can only be sent if the `option_quiesce` has been negotiated.
219+
Upon sending `stfu`, the sender stops all update messages. The receiver should
220+
then stop sending updates and respond with `stfu` if possible, so that the
221+
channel becomes completely quiescent. See Newsletters [#152][news152
222+
quiescence] and [#262][news262 quiescence].
173223

174224
{% assign four_days_after_posting = page.date | date: "%s" | plus: 345600 | date: "%Y-%m-%d 14:30" %}
175225
{% include snippets/recap-ad.md when=four_days_after_posting %}
@@ -179,3 +229,11 @@ repo], and [BINANAs][binana repo]._
179229
[pickhardt feasible1]: https://delvingbitcoin.org/t/estimating-likelihood-for-lightning-payments-to-be-in-feasible/973
180230
[pickhardt feasible2]: https://delvingbitcoin.org/t/estimating-likelihood-for-lightning-payments-to-be-in-feasible/973/4
181231
[lnd v0.18.1-beta]: https://github.com/lightningnetwork/lnd/releases/tag/v0.18.1-beta
232+
[news296 packagerbf]: /en/newsletters/2024/04/03/#bitcoin-core-29242
233+
[news259 bolts]: /en/newsletters/2024/05/31/#bolts-1092
234+
[news305 bolts]:/en/newsletters/2023/07/12/#ln-specification-clean-up-proposed
235+
[news293 routefee]: /en/newsletters/2024/03/13/#lnd-8136
236+
[news152 quiescence]: /en/newsletters/2021/06/09/#c-lightning-4532
237+
[news262 quiescence]:/en/newsletters/2023/08/02/#eclair-2680
238+
[news115 anchors]: /en/newsletters/2020/09/16/#stealing-onchain-fees-from-ln-htlcs
239+
[news165 anchors]: /en/newsletters/2021/09/08/#bolts-824

_topics/en/channel-commitment-upgrades.md

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ optech_mentions:
3838
- title: Analysis of multiple proposals for upgrading LN channels
3939
url: /en/newsletters/2024/05/24/#upgrading-existing-ln-channels
4040

41+
- title: "BOLTs #869 introduces a new channel quiescence protocol, in part for channel upgrades"
42+
url: /en/newsletters/2024/06/28/#bolts-869
43+
4144
## Optional. Same format as "primary_sources" above
4245
see_also:
4346
- title: Anchor outputs

_topics/en/package-relay.md

+3
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ optech_mentions:
124124
- title: "Bitcoin Core #30000 indexes orphan txes by wtxid, removing a problem with orphan-based package relay"
125125
url: /en/newsletters/2024/05/24/#bitcoin-core-30000
126126

127+
- title: "Bitcoin Core #28984 adds support for a limited version of package replace-by-fee"
128+
url: /en/newsletters/2024/06/28/#bitcoin-core-28984
129+
127130
## Optional. Same format as "primary_sources" above
128131
see_also:
129132
- title: CPFP fee bumping

_topics/en/replace-by-fee.md

+3
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ optech_mentions:
186186
- title: "Question about the size of transactions that opt-in to RBF, opt-out of RBF, and replacements"
187187
url: /en/newsletters/2024/04/24/#are-replacement-transactions-larger-in-size-than-their-predecessors-and-than-non-rbf-transactions
188188

189+
- title: "Bitcoin Core #28984 adds support for a limited version of package replace-by-fee"
190+
url: /en/newsletters/2024/06/28/#bitcoin-core-28984
191+
189192
## Optional. Same format as "primary_sources" above
190193
see_also:
191194
- title: Transaction pinning

_topics/en/silent-payments.md

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ optech_mentions:
6565
- title: "Continued discussion about using PSBTs with silent payments"
6666
url: /en/newsletters/2024/06/21/#continued-discussion-of-psbts-for-silent-payments
6767

68+
- title: "BIPs #1620 and #1622 make minor updates to the BIP352 specification of silent payments"
69+
url: /en/newsletters/2024/06/28/#bips-1620
70+
6871
## Optional. Same format as "primary_sources" above
6972
see_also:
7073
- title: Output linking

0 commit comments

Comments
 (0)