Skip to content

chore(deps): bump rust-dependencies and migrate signing to rust-bitcoin for bdk_wallet 3.2 - #50

Merged
storopoli merged 3 commits into
mainfrom
dependabot/cargo/rust-dependencies-ec111857c2
Oct 26, 2026
Merged

storopoli merged 3 commits into
mainfrom
dependabot/cargo/rust-dependencies-ec111857c2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Bumps the rust-dependencies group and migrates Bitcoin signing off the APIs that bdk_wallet 3.2 deprecates.

Package From To
alloy 2.4.2 2.5.0
bdk_wallet 3.1.0 3.2.0
config 0.15.25 0.15.27
tokio 1.53.1 1.54.1
zeroize 1.9.0 1.9.1

bdk_wallet 3.2 signing migration

bdk_wallet 3.2 phases out the wallet as a key store. It deprecates Wallet::sign, LoadParams::extract_keys, Wallet::policies and TxBuilder::policy_path, and clippy runs with -D warnings, so the bump failed CI. This PR follows the upstream guidance:

  • Seed::bitcoin_wallet gives BDK only the public descriptors. The new Seed::bitcoin_signer returns the master Xpriv, and the send, drain and deposit commands pass it in.
  • sign_psbt signs with bitcoin::Psbt::sign and wallet.secp_ctx(), then finalizes with Wallet::finalize_psbt and the default SignOptions. These are the same finalizer and options that Wallet::sign used.
  • Recovery wallets are watch-only. Their reclaim keymap is held in miniscript's KeyMapWrapper. The reclaim spend uses TxBuilder::set_condition with the CSV condition from extract_policy(..).get_condition(path [1]), so descriptors loaded from the recovery file keep their own delay.
  • transfer and drain now assert that the PSBT finalized. Before, an unsigned transaction would only have failed at broadcast.

The bdk_wallet floor in Cargo.toml is now 3.2.0 because set_condition is new in that release.

RUSTSEC advisories

cargo audit reported 5 new vulnerabilities, published Oct 19–23. Four are fixed by lockfile-only updates:

  • rustls-webpki 0.103.15 → 0.103.16: RUSTSEC-2026-0382
  • webpki-roots 1.0.9 → 1.0.11: RUSTSEC-2026-0381
  • webpki-root-certs 1.0.9 → 1.0.11: RUSTSEC-2026-0383
  • ctutils 0.4.2 → 0.4.6: RUSTSEC-2026-0385

crypto-bigint 0.5.5 (RUSTSEC-2026-0387) is still open. It comes from elliptic-curve 0.13 through k256 and alloy-signer. The fix is only in 0.7.6+, which is semver-incompatible, so a lockfile bump can't clear it. #51 ignores it in .cargo/audit.toml, with the reasoning, and applies the same four bumps to main. The cargo-audit check here stays red until #51 lands. A test merge of the two is clean.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency update
  • Security fix

Notes to Reviewers

  • Existing wallet databases still load. BDK has always persisted only the public descriptor and compares descriptor_id() on load. loads_wallets_created_from_private_descriptors creates a wallet from the old xprv descriptors and loads it with the new parameters.
  • BDK's finalizer doesn't verify signatures. seed_signer_signs_seed_wallet_spends checks the Schnorr signature that Seed::bitcoin_signer produces for a Seed::bitcoin_wallet spend.
  • In the regtest test deposit_request_tx_parses_in_asm_and_can_be_reclaimed, Bitcoin Core now accepts the deposit (key path, Xpriv) and the timelocked reclaim (script path, KeyMapWrapper plus set_condition), both signed through Psbt::sign.

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

Bumps the rust-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [alloy](https://github.com/alloy-rs/alloy) | `2.4.2` | `2.5.0` |
| [bdk_wallet](https://github.com/bitcoindevkit/bdk_wallet) | `3.1.0` | `3.2.0` |
| [config](https://github.com/rust-cli/config-rs) | `0.15.25` | `0.15.27` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.53.1` | `1.53.2` |
| [zeroize](https://github.com/RustCrypto/utils) | `1.9.0` | `1.9.1` |


Updates `alloy` from 2.4.2 to 2.5.0
- [Release notes](https://github.com/alloy-rs/alloy/releases)
- [Changelog](https://github.com/alloy-rs/alloy/blob/main/CHANGELOG.md)
- [Commits](alloy-rs/alloy@v2.4.2...v2.5.0)

Updates `bdk_wallet` from 3.1.0 to 3.2.0
- [Release notes](https://github.com/bitcoindevkit/bdk_wallet/releases)
- [Changelog](https://github.com/bitcoindevkit/bdk_wallet/blob/v3.2.0/CHANGELOG.md)
- [Commits](bitcoindevkit/bdk_wallet@v3.1.0...v3.2.0)

Updates `config` from 0.15.25 to 0.15.27
- [Changelog](https://github.com/rust-cli/config-rs/blob/main/CHANGELOG.md)
- [Commits](rust-cli/config-rs@v0.15.25...v0.15.27)

Updates `tokio` from 1.53.1 to 1.53.2
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.53.1...tokio-1.53.2)

Updates `zeroize` from 1.9.0 to 1.9.1
- [Commits](RustCrypto/utils@zeroize-v1.9.0...zeroize-v1.9.1)

---
updated-dependencies:
- dependency-name: alloy
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: bdk_wallet
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: config
  dependency-version: 0.15.27
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: tokio
  dependency-version: 1.53.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: zeroize
  dependency-version: 1.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot requested a review from storopoli as a code owner October 26, 2026 00:17
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Oct 26, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T09:35:30.253232Z 49c0ec8 New commits
🔒 Security Review ✅ Completed 2026-10-26T09:36:18.399636Z 49c0ec8 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

… 3.2

bdk_wallet 3.2 deprecates the wallet as a key store: `Wallet::sign`,
`LoadParams::extract_keys`, `Wallet::policies` and
`TxBuilder::policy_path`. CI builds with `-D warnings`, so these broke
clippy.

Keys now stay with the caller. `Seed::bitcoin_wallet` hands BDK only the
public descriptors and `Seed::bitcoin_signer` returns the master `Xpriv`.
BDK has always persisted just the public descriptor, so wallets created
from the old xprv descriptors still load.

`sign_psbt` signs with `bitcoin::Psbt::sign` and finalizes with
`Wallet::finalize_psbt`. Recovery wallets keep their reclaim keymap in a
`KeyMapWrapper` and build the reclaim spend with `set_condition`, taking
the CSV condition from the descriptor's policy.
… advisories

Lockfile-only updates:

- `rustls-webpki` 0.103.15 -> 0.103.16: RUSTSEC-2026-0382
- `webpki-roots` 1.0.9 -> 1.0.11: RUSTSEC-2026-0381
- `webpki-root-certs` 1.0.9 -> 1.0.11: RUSTSEC-2026-0383
- `ctutils` 0.4.2 -> 0.4.6: RUSTSEC-2026-0385
@storopoli
storopoli requested a review from prajwolrg as a code owner October 26, 2026 09:33
@storopoli storopoli changed the title chore(deps)(deps): bump the rust-dependencies group with 5 updates chore(deps): bump rust-dependencies and migrate signing to rust-bitcoin for bdk_wallet 3.2 Oct 26, 2026

@storopoli storopoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK 49c0ec8

@storopoli
storopoli added this pull request to the merge queue Oct 26, 2026
storopoli added a commit that referenced this pull request Oct 26, 2026
…t RUSTSEC-2026-0387 (#51)

## Description

`cargo audit` now fails on `main`. Five advisories published since its
last run on 2026-10-19 hit the current lockfile. This PR clears all
five, so the security workflow passes without waiting on #50.

Four have fixed releases, so this bumps them in the lockfile:

| Crate | From | To | Advisory |
| --- | --- | --- | --- |
| `rustls-webpki` | 0.103.15 | 0.103.16 | RUSTSEC-2026-0382 |
| `webpki-roots` | 1.0.9 | 1.0.11 | RUSTSEC-2026-0381 |
| `webpki-root-certs` | 1.0.9 | 1.0.11 | RUSTSEC-2026-0383 |
| `ctutils` | 0.4.2 | 0.4.6 | RUSTSEC-2026-0385 |

`crypto-bigint` 0.5.5 (RUSTSEC-2026-0387) can't be fixed from here. The
fix exists only in `crypto-bigint` 0.7.6. The latest `alloy-signer`
(2.5.0) and `alloy-primitives` (1.7.3) still require
`k256`/`elliptic-curve` 0.13, which pin `crypto-bigint` 0.5. This PR
adds `.cargo/audit.toml` with the advisory ignored. The comment there
records how the crate gets in, what it exposes and when to remove the
entry.

What it exposes: `k256` 0.13 does its scalar arithmetic with
`crypto-bigint`. EVM signing through the `PrivateKeySigner` from
`Seed::get_alpen_wallet` therefore runs the private key through the
affected subtraction code. An attacker would need to watch timing or
microarchitectural state on the user's machine while the CLI signs.
Bitcoin signing uses libsecp256k1 and doesn't touch `crypto-bigint`.

Upstream, `alloy-rs/alloy#4445` tracks the advisory.
`alloy-rs/core#1147` moves `alloy-primitives` to `k256` 0.14, but
`alloy-signer` needs the same bump before the entry can go.

### Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature/Enhancement (non-breaking change which adds
functionality or enhances an existing one)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update
- [ ] Refactor
- [ ] New or updated tests
- [x] Dependency update
- [x] Security fix

## Notes to Reviewers

- #50 has the same four bumps. Here they were redone on `main`'s
lockfile with `cargo update --precise`, which leaves out the
`windows-sys` churn from dependabot's resolution in #50. A test merge of
this branch into #50 is clean, and the result differs from #50 only by
`.cargo/audit.toml`, so either PR can land first.
- Run locally against the current advisory DB, `cargo audit` passes on
this branch and on the merge with #50.
- `cargo audit -D warnings` (`continue-on-error` in CI) still lists the
existing unmaintained-crate warnings and the informational tokio
RUSTSEC-2026-0386. #50's tokio bump to 1.54.1 clears the tokio one.

## Checklist

- [x] I have performed a self-review of my code.
- [x] I have commented my code where necessary.
- [x] I have updated the documentation if needed.
- [x] My changes do not introduce new warnings.
- [ ] I have added tests that prove my changes are effective or that my
feature works.
- [ ] New and existing tests pass with my changes.

## Related Issues

Related to #50.
Merged via the queue into main with commit 76feb58 Oct 26, 2026
15 of 16 checks passed
@storopoli
storopoli deleted the dependabot/cargo/rust-dependencies-ec111857c2 branch October 26, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant