Repository navigation
Bump LDK to v0.3.0-rc4 - #1231
benthecarman wants to merge 1 commit into
Conversation
|
👋 Thanks for assigning @tnull as a reviewer! |
|
CI failure should be fixed by https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5575 |
3770094 to
249f6bc
Compare
tnull
left a comment
There was a problem hiding this comment.
Looks good I think, but can't move forward with this as v0.3-rc4 is broken.
|
It's on your merged commit that fixes |
tnull
left a comment
There was a problem hiding this comment.
Claude review:
Findings
- High: zero-conf splices silently stop being zero-conf (src/config.rs:849, and everywhere UserConfig is built).
- rc4 adds inbound_splice_min_depth and outbound_splice_min_depth, both defaulting to 6, and no longer derives splice depth from the channel's minimum_depth.
- The PR fills in the defaults, so splices on channels with trusted_peers_0conf or LSP-trusted peers now need 6 confirmations before splice_locked. On rc3 they locked immediately.
- Existing channels are affected too, since persisted configs without the new fields read as 6.
- superseded_zero_conf_splice_round_keeps_its_payment_at_close (tests/integration_tests_rust.rs:4383) expects ChannelReady right after the splice with no blocks mined, so I expect it to time out. I could not confirm this from CI: the run on this head has one failure (build (macos-latest,
beta)) and many cancelled jobs, and I can't read the logs.- The PR should either set the knobs to 0 where ldk-node treats the peer as 0conf-trusted, or state the behaviour change in the changelog and fix the test. Setting either knob to 0 disables splice RBF on that channel.
- Low: update_channel_config will reset the new knobs (src/config.rs:840-851). From for LdkChannelConfig now uses ..LdkChannelConfig::default(), so any config round-trip resets the splice depths to 6. This is harmless today, but becomes a bug as soon as finding 1 is fixed by
setting non-default values.- Low: no test for the new LSPS2 delay cap (src/liquidity/service/lsps2.rs:496-503).
- The logic looks right: it caps the correct handshake limit, does the min in u32 as LDK's docs ask, and has a sensible fallback for old persisted events.
- It is a behaviour change, because the service never enforced max_client_to_self_delay before. A service configured below the client's delay (144 for LDK clients) will now reject every JIT open, with the usual silent failure and the HTLC held until timeout.
- Every integration test uses 1024, so neither the accept nor the reject path is exercised.
- Nit: the commit message and PR description are slightly off. "Tip of the 0.3 branch" is stale: the branch is now at 3ed13ee3, which adds the re-gating of inbound v2 channel opens and a rustfmt bump. The tag is v0.3-rc4, not v0.3.0-rc4.
Pin every LDK crate to commit 3ed13ee3 on the 0.3 branch, i.e., the v0.3-rc4 tag plus the fix for the Esplora build of lightning-transaction-sync and the re-gating of inbound v2 channel opens. LSPS2 OpenChannel events now carry the client to_self_delay limit agreed upon in the selected opening fee parameters, which the service must enforce itself. We now cap the channel's their_to_self_delay handshake limit accordingly, falling back to our configured limit for events persisted before the field existed. LDK's ChannelConfig gained inbound and outbound splice minimum-depth knobs, which default to six confirmations and no longer follow the channel's own minimum depth. We adopt that default, so splices on zero-conf channels are no longer zero-conf. The test for superseded zero-conf splice rounds, which can no longer occur, is replaced by one covering the new behavior, and the test for a second splice on a zero-conf channel now waits for each splice to confirm. As we don't expose the knobs, our ChannelConfig is applied as a partial update so that it doesn't reset them. LDK now bounds the RBF adjustment of a prior splice contribution by the bump's own maximum feerate rather than the prior round's, so a bump above the prior maximum is paid from the existing inputs where they suffice. The tests relying on such a bump to pull in a new coin now size the first round so its inputs cannot pay the bump. bitcoin-payment-instructions is moved to a fork commit pinned to the same LDK revision so both resolve to a single copy of LDK. Developed with assistance from Claude Code.
81878f8 to
6d99f4d
Compare
| /// the bump is paid by adding less to the channel, or, if that would leave less than dust to | ||
| /// add, the splice is rebuilt from all confirmed funds, including any confirmed since. |
There was a problem hiding this comment.
The CHANGELOG entry for #1168 still says "A bump past the splice's maximum feerate rebuilds it from all confirmed funds". With 5297 that only happens when adding less would leave less than dust, so it probably wants the same update as this doc.
Bumps LDK to v0.3.0-rc4, pinned to
3ed13ee3on the0.3branch: the v0.3-rc4 tag plus the Esplora build fix (lightningdevkit/rust-lightning#5575) and the re-gating of inbound v2 channel opens.OpenChannelnow carriesmax_client_to_self_delay, which we enforce by cappingtheir_to_self_delayon the channel we open.ChannelConfigis now applied as a partial update so it doesn't reset the knobs.