Skip to content

DRAFT fix(descriptor): reject hardened public derivation paths - #1079

Open
reez wants to merge 1 commit into
bitcoindevkit:masterfrom
reez:hardenedderiv
Open

reez wants to merge 1 commit into
bitcoindevkit:masterfrom
reez:hardenedderiv

Conversation

@reez

@reez reez commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Description

Prevents Descriptor::derive_address from panicking on hardened public-key derivation paths or hardened wildcards. These cases now return the existing HardenedDerivationXpub error.

Notes to the reviewers

So kinda 2 things to do/watch:

  • Miniscript release: rust-miniscript#913 is merged on master but still needs a release-12.x backport and patch release? Once released we can update bdk-ffi’s lockfile to resolve the fixed version. (A new bdk_wallet release is not required for a compatible 12.x patch necessarily?) Keep the local guard until then.
  • Descriptor ID: bdk_chain::DescriptorExt::descriptor_id still unwraps at_derivation_index(0), so these descriptors remain panicable there even after Miniscript returns an error. I might need to follow up upstream there. And changing bdk-ffi’s existing infallible signature would be breaking.

Documentation

Changelog

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing
  • I've added exactly one changelog:* label
  • I've linked the relevant upstream docs or specs above

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez reez changed the title fix(descriptor): reject hardened public derivation paths DRAFT fix(descriptor): reject hardened public derivation paths Aug 12, 2026
@reez
reez marked this pull request as ready for review August 12, 2026 21:19

@ItoroD ItoroD 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.

LGTM
Are we tracking the rust-miniscript patch ?

ACK 03a71ea

@reez

reez commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM Are we tracking the rust-miniscript patch ?

ACK 03a71ea

do you mean an open issue like #1082 or something else?

@ItoroD

ItoroD commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

LGTM Are we tracking the rust-miniscript patch ?
ACK 03a71ea

do you mean an open issue like #1082 or something else?

Yes! Perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants