Skip to content

chore: update deps async-hwi and bdk_esplora - #369

Merged
tvpeter merged 2 commits into
bitcoindevkit:masterfrom
tvpeter:chore/deps-rustsec-advisories
Oct 29, 2026
Merged

tvpeter merged 2 commits into
bitcoindevkit:masterfrom
tvpeter:chore/deps-rustsec-advisories

Conversation

@tvpeter

@tvpeter tvpeter commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Dependency updates (chore: update deps async-hwi and bdk_esplora)

  • Bump async-hwi 0.0.32 to 0.0.35. It moves from reqwest 0.11 to 0.13, which removes h2 0.3 (RUSTSEC-2026-0258), rustls-pemfile (unmaintained, RUSTSEC-2025-0134), hyper 0.14, and copies of rustls 0.21 / webpki-roots 0.25.
  • Set default-features = false on bdk_esplora. The default blocking-https feature pulled in minreq 2 with rustls 0.21 / webpki-roots 0.25, but bdk-cli only uses the async client.
  • Targeted cargo update -p for patch releases:
Crate Version Advisories
quinn-proto 0.11.19 RUSTSEC-2026-0338, 0339, 0340, 0341, 0342
rustls 0.23.46 RUSTSEC-2026-0346, 0347, 0348, 0349
rustls-webpki 0.103.16 RUSTSEC-2026-0382
webpki-roots / webpki-root-certs 1.0.11 RUSTSEC-2026-0381, 0383
zstd-sys 2.1.2 RUSTSEC-2026-0410
tokio 1.54.1 RUSTSEC-2026-0386 (unsound)

**fix test: wait for electrs to reach bitcoind's tip in online tests

bdk_testenv 0.13.1's wait_until_electrum_sees_block returns on the first queued header notification, which can be stale from an earlier mine_blocks call. full_scan could then run before the confirmation blocks were indexed, intermittently failing e.g. test_create_tx_multiple_recipients with a confirmed balance of 0. A local wait_for_electrum_tip helper waits until electrs reports bitcoind's current height. This is fixed upstream in bdk (a98cf7c4) but not released yet; the helper can be removed once it is.

Notes to the reviewers

  • Why a targeted update instead of a full cargo update: a full update also bumps bdk_wallet 3.1 to 3.2, which introduces deprecation warnings.
  • async-hwi 0.0.35 compiles with no code changes.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

- update async-hwi to 0.0.35: moves async-hwi from reqwest 0.11 to 0.13.
That removes h2 0.3 (RUSTSEC-2026-0258), rustls-pemfile
(unmaintained warning RUSTSEC-2025-0134), hyper 0.14, and that copies
of rustls 0.21 and webpki-roots 0.25. It compiles with no code changes.
- bdk_esplora: default-features = false: the default feature,
blocking-https, pulls in minreq 2 with rustls 0.21 and webpki-roots
0.25. bdk-cli only uses the async client (async-https, tokio),
so this was unused code carrying the old TLS stack.
- targetted cargo update -p for quinn-ptoto to 0.11.19, rustls to 0.23.46,
rustls-webpki 0.103.16, webpki-roots 1.0.11, zstd-sys 2.1.2 and tokio
to 1.54.1
bdk_testenv 0.13.1's `wait_until_electrum_sees_block` returns on the
first queued header notification, which can be a stale one left over
from an earlier `mine_blocks` call. A following `full_scan` could then
run before electrs had indexed the confirmation blocks, intermittently
failing tests such as `test_create_tx_multiple_recipients` with a
confirmed balance of 0.

Add a `wait_for_electrum_tip` helper to `tests/common` that reads
bitcoind's current block height and drains header notifications until
electrs reports that height, and use it in place of all calls to
`wait_until_electrum_sees_block` in the electrum and esplora online
tests.

The same bug is fixed upstream in bdk (a98cf7c4) but not yet released;
the helper can be dropped once a new bdk_testenv is published.
@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.08%. Comparing base (3b514f4) to head (d2317d2).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #369   +/-   ##
=======================================
  Coverage   59.08%   59.08%           
=======================================
  Files          25       25           
  Lines        4646     4646           
=======================================
  Hits         2745     2745           
  Misses       1901     1901           
Flag Coverage Δ
rust 59.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tvpeter
tvpeter requested a review from vadim-anfv October 28, 2026 15:26
@bvotteler

Copy link
Copy Markdown

tACK d2317d2

Confirmed the 16 RUSTSEC advisories were addressed between branch point 66d5618 and d2317d2.

I generated an audit diff to confirm, details below.

Cargo audit diff
diff --git a/tmp/before.txt b/tmp/after.txt
index 332860e..2819cd3 100644
--- a/tmp/before.txt
+++ b/tmp/after.txt
@@ -1,26 +1,11 @@
 crypto-bigint vuln RUSTSEC-2026-0387
-h2 vuln RUSTSEC-2026-0258
-quinn-proto vuln RUSTSEC-2026-0338
-quinn-proto vuln RUSTSEC-2026-0339
-quinn-proto vuln RUSTSEC-2026-0340
-quinn-proto vuln RUSTSEC-2026-0341
-quinn-proto vuln RUSTSEC-2026-0342
 rustls vuln RUSTSEC-2026-0346
-rustls vuln RUSTSEC-2026-0346
-rustls vuln RUSTSEC-2026-0347
-rustls vuln RUSTSEC-2026-0348
-rustls vuln RUSTSEC-2026-0349
 rustls vuln RUSTSEC-2026-0349
-rustls-pemfile warn RUSTSEC-2025-0134
 rustls-webpki vuln RUSTSEC-2026-0098
 rustls-webpki vuln RUSTSEC-2026-0099
 rustls-webpki vuln RUSTSEC-2026-0104
 rustls-webpki vuln RUSTSEC-2026-0382
-rustls-webpki vuln RUSTSEC-2026-0382
 serde_cbor warn RUSTSEC-2021-0127
-tokio warn RUSTSEC-2026-0386
-webpki-root-certs vuln RUSTSEC-2026-0383
-webpki-roots vuln RUSTSEC-2026-0381
 webpki-roots vuln RUSTSEC-2026-0381
 zip vuln RUSTSEC-2026-0367
 zip vuln RUSTSEC-2026-0368
@@ -34,4 +19,3 @@ zstd-safe warn RUSTSEC-2026-0401
 zstd-safe warn RUSTSEC-2026-0402
 zstd-safe warn RUSTSEC-2026-0404
 zstd-safe warn RUSTSEC-2026-0406
-zstd-sys vuln RUSTSEC-2026-0410

{before|after}.txt were extracted from cargo audit at their respective commits:

cargo audit -q | awk '
  /^Crate:/   { crate = $2; type = "vuln" }
  /^Warning:/ { type = "warn" }
  /^ID:/      { print crate, type, $2 }
' | sort # > /tmp/{before|after}.txt
---

All tests passed for each of the two commits, also when cherry-picking the test fix in isolation.

With regards to:

fix test: wait for electrs to reach bitcoind's tip in online tests

I was unable to reproduce the intermittently failing tests in online.rs before applying that fix. I tried to by running them several times at commit c5d3230. All runs passed consistently.

If anyone has advice on how to coax some of them into failing, I would appreciate pointers.

@vadim-anfv vadim-anfv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK d2317d2

Ran cargo audit before and after. It does not go green and cannot here: rustls, rustls-webpki and webpki-roots are each in the graph twice, this bumps the modern copy, and the old one still comes through minreq via bitcoincore-rpc and the bitcoind/electrsd harness. Tracked in #308.

I could not reproduce the flake either. At c5d3230, with the two waits in fund_and_sync_wallet printing the notification queue against bitcoind's tip, 15 runs of test_create_tx_multiple_recipients gave one notification each time, always at the tip. Not an objection to the fix. If you have a setup where it does fail, that would be worth having in the thread.

@tvpeter

tvpeter commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you @bvotteler and @vadim-anfv for the reviews. I will setup an envt and see if I can reproduce the failure and share. Since it is non-blocking, I will merge the PR.

Thank you.

@tvpeter
tvpeter merged commit 4dbc3e8 into bitcoindevkit:master Oct 29, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in BDK-CLI Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants