Repository navigation
Bump BDK wallet dependency to 3.2 - #1182
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
2acfbd1 to
32f0c52
Compare
tankyleo
left a comment
There was a problem hiding this comment.
I also note that we currently include unconfirmed outputs from TRUC transactions in BalanceDetails::spendable_onchain_balance_sats, even though our onchain wallet currently never spends them. I think this is OK since we don't expect our onchain funds to be transaction outputs of V3 transactions.
32f0c52 to
12778df
Compare
Our wallet needs per-input finalization results to distinguish unfinished foreign inputs from failures to finalize its own inputs. Raise the minimum BDK Wallet version to 3.2, which provides these results alongside fixes for TRUC input selection and changeset merging. Co-Authored-By: HAL 9000
ab00f78 to
465bf51
Compare
465bf51 to
56612fd
Compare
|
Let me know if I can squash |
|
Thanks yes please squash, this diff can help reduce flakiness in the diff --git a/src/chain/electrum.rs b/src/chain/electrum.rs
index 24b9b1a9..00155771 100644
--- a/src/chain/electrum.rs
+++ b/src/chain/electrum.rs
@@ -971,7 +971,7 @@ mod tests {
// unblock it until every request was fully written and flushed (excluding the
// version handshake).
let nudge = serde_json::json!({"jsonrpc": "2.0", "method": "test.nudge", "params": []});
- let deadline = std::time::Instant::now() + Duration::from_secs(10);
+ let deadline = std::time::Instant::now() + Duration::from_secs(30);
while client.calls_made().unwrap() - 1 < REQUEST_COUNT {
assert!(std::time::Instant::now() < deadline, "requests weren't all sent");
writeln!(reader.get_mut(), "{nudge}").unwrap();
@@ -1016,7 +1016,7 @@ mod tests {
for _ in 0..REQUEST_COUNT {
let failed_as_expected = finished_receiver
- .recv_timeout(Duration::from_secs(5))
+ .recv_timeout(Duration::from_secs(60))
.expect("clean EOF must wake every concurrent Electrum request");
assert!(failed_as_expected);
} |
BDK's wallet-owned signing APIs are deprecated, but our signing paths still need their witness-UTXO policy, sighash checks, low-R signatures, and input finalization. Use caller-owned signers for both keychains to preserve these signing options while dropping the deprecated APIs. Keep signing available after reload, and cover witness-only signing from both keychains. Refs lightningdevkit#654 Co-Authored-By: HAL 9000
Concurrent requests sharing an Electrum connection can remain blocked when the active reader sees a clean EOF. This can keep blocking Tokio workers alive through node shutdown. electrum-client 0.25.1 fixed this, and we already require a release that includes the fix. Cover the failure at the LDK Node boundary so dependency updates cannot reintroduce the hang. Fixes lightningdevkit#1007 Refs lightningdevkit#1055 (cherry picked from commit aff6ce0) Co-Authored-By: HAL 9000
Mixed wallet and LDK transactions could be returned with unsigned wallet inputs because the aggregate signing result also accounts for unfinished foreign inputs. Require BDK to finalize every recognized wallet input while allowing inputs without a wallet descriptor to remain unfinished. Cover both signing paths with tests that exercise missing wallet signers. Co-Authored-By: HAL 9000
The maximum funding estimate relies on BDK's input selection. The BDK 3.2 TRUC filtering change needs coverage at this boundary. Check that unconfirmed v2 change remains usable, while v3 outputs only increase the available funding amount after confirmation. Co-Authored-By: HAL 9000
56612fd to
4611c67
Compare
Squashed and included. |
Closes #654
Closes #1055
We bump
bdk_walletdependency, migrate to the updated signing API, and finally add some regression tests for the Electrum EOF fix that shipped inelectrum-client.