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.
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.
|
@benthecarman Mind rebasing this to be on latest LDK 0.3 branch commit? |
Pin every LDK crate to commit faf1e513 on the 0.3 branch, i.e., the v0.3-rc4 tag plus the backports since, including the fix for the Esplora build of lightning-transaction-sync. LDK now only provides its Electrum sync client when built with the buggy_electrum_sync cfg flag, as the transaction-based Electrum protocol doesn't give the guarantees Lightning needs. We gate our Electrum chain source behind the same flag and drop chain-electrum from the default and uniffi-default features. CI keeps building and testing it by passing the flag. 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. LSPS2 payment_forwarded also takes the forward's inbound HTLCs so replayed events aren't counted twice towards the opening fee. 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. Accepting an inbound channel now requires passing back the OpenChannelRequest's inbound_channel_request_counter. LDK refuses to sign messages that serialize as signed gossip, so Node::sign_message now returns a Result, failing with MessageSigningFailed. Paying a BOLT11 invoice for another network now fails with InvalidNetwork. 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.
6d99f4d to
507f968
Compare
rustls 0.23.48 deprecates the ring CryptoProvider as it lacks post-quantum key exchange, which fails our CI builds that deny warnings. There is no non-deprecated ring provider to switch to, and moving to aws-lc-rs would mean a new dependency, so allow the deprecation where we install the default provider. Developed with assistance from Claude Code.
Bumps LDK to v0.3.0-rc4, pinned to
faf1e513, the current tip of the0.3branch (rc4 plus the backports since).ElectrumSyncClientwith--cfg buggy_electrum_sync. Our Electrum chain source is gated behind the same flag, andchain-electrumis dropped fromdefaultanduniffi-default. CI passes the flag so Electrum stays tested.OpenChannelnow carriesmax_client_to_self_delay, which we enforce by cappingtheir_to_self_delayon the channel we open.payment_forwardednow gets the inbound HTLCs.ChannelConfigis applied as a partial update so it doesn't reset the knobs.inbound_channel_request_counter.Node::sign_messagenow returns aResult(newMessageSigningFailed), since LDK refuses to sign messages that look like gossip.