Bump LDK dependencies#912
Conversation
|
👋 Thanks for assigning @tnull as a reviewer! |
330fdf0 to
502b8ee
Compare
tnull
left a comment
There was a problem hiding this comment.
Thank you very much for looking into this! Two minor things, otherwise looks good!
| let expected_splice_in_fee_sat = 255; | ||
| let expected_splice_in_fee_sat = 251; | ||
| let expected_splice_in_onchain_cost_sat = 254; | ||
| let expected_splice_in_lightning_balance_sat = 4_000_003; |
There was a problem hiding this comment.
Should we leave a comment here that explains why we don't expect 4_000_000?
There was a problem hiding this comment.
Yeah, and added a TODO to update this when updating BDK wallet.
| (1, channel_id, required), | ||
| (3, counterparty_node_id, required), | ||
| (5, user_channel_id, required), | ||
| (7, abandoned_funding_txo, option), |
There was a problem hiding this comment.
Hmm, dropping this entry is probably fine given it's odd, right? But should we still leave comment here so we never accidentally reuse the type number and fail to deserialize if an LDK Node v0.7 wrote the old field?
The new API computes its splice fee independently of the BDK coin selection it drives, so any surplus BDK reserves on top of LDK's fee flows into the new funding output instead of returning as change. A splice-in therefore deposits slightly more on the channel side than requested. Stop double-counting the 5 WU per foreign input that BDK adds for the empty `script_sig` byte and witness-count varint already in LDK's `satisfaction_weight`. A small residue from BDK's per-component fee rounding still inflates the funding output. Co-Authored-By: Jeffrey Czyz <jkczyz@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
After the LDK splice-builder API change, `FundingTemplate::splice_in` and `splice_out` silently reuse and amend a prior contribution when one is present, rather than starting from scratch. ldk-node has no caller that intentionally exercises that path today, so reject the request explicitly until we design a dedicated RBF entry point. This preserves the pre-upgrade behavior for back-to-back splice attempts on the same channel. Co-Authored-By: Claude <noreply@anthropic.com>
LDK renamed `BestBlock` to `BlockLocator`. Drop the import aliases that anticipated the rename. Co-Authored-By: Claude <noreply@anthropic.com>
LDK renamed `Event::SplicePending` to `Event::SpliceNegotiated` and `Event::SpliceFailed` to `Event::SpliceNegotiationFailed`, reflecting that these events fire at the close of a negotiation round rather than tracking a committed splice tx. Mirror the rename on the LDK Node side. `Event::SpliceNegotiationFailed` no longer carries an `abandoned_funding_txo`: the negotiation can fail before any candidate tx is constructed, so there's nothing meaningful to surface there. Co-Authored-By: Claude <noreply@anthropic.com>
LDK's `lightning-transaction-sync` bumps `electrum-client` to 0.25, so we have to match in lockstep or end up with two incompatible versions in the dependency graph and type mismatches at the LTS boundary. `electrum-client` 0.25 takes a `Duration` for the client timeout and adds an `EstimationMode` argument to `Batch::estimate_fee`. `bdk_electrum` needs the 0.24 line to track the same `electrum-client` major. `electrsd` still uses `electrum-client` 0.24, so tests that touch `electrsd.client` now import `ElectrumApi`/`Client` from electrsd's re-export to stay on its trait version. Co-Authored-By: Claude <noreply@anthropic.com>
`Event::DiscardFunding`'s `outputs` field is now `Vec<ScriptBuf>` instead of `Vec<TxOut>`. Wrap each script in a zero-valued `TxOut` when handing the placeholder transaction to `Wallet::cancel_tx`, which still expects `TxOut`s. Co-Authored-By: Claude <noreply@anthropic.com>
LDK's `ChannelManager::create_inbound_payment`, `create_inbound_payment_for_hash`, and `get_payment_preimage` each grew a trailing `payment_metadata: Option<&[u8]>` argument so the inbound payment can commit to caller-supplied metadata. ldk-node has nothing to attach yet — pass `None`. Co-Authored-By: Claude <noreply@anthropic.com>
LDK dropped the `FundingTxInput` type alias in favor of using `ConfirmedUtxo` directly across the funding API. Switch over our splice coin-selection path that built the input list via `FundingTxInput::new_p2wpkh`. Co-Authored-By: Claude <noreply@anthropic.com>
502b8ee to
5e33d8d
Compare
There's been a growing number of LDK changes that haven't been incorporated into LDK Node yet. This PR bumps the LDK dependencies and accounts for any public API changes. New functionality is not incorporated by this PR nor is any other changes in behavior accounted for.