test: expand offline descriptor test coverage to include all BIP descriptor constructors
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 84/100
Rechercherichtung
Beginne mit tests/test_offline_descriptor.py und dem bestehenden test_descriptor_bip86-Test, um seinem fixed-mnemonic- und full-descriptor-string-Muster zu folgen. Füge Abdeckung für die aufgeführten BIP44-, BIP49-, BIP84-, BIP86-, new_wsh_sortedmulti- und new_sh_sortedmulti-Konstruktoren hinzu und führe anschließend die Offline-Descriptor-Tests aus; fertig ist es, wenn alle erwarteten Descriptor-Strings und Prüfsummen ohne Netzwerkzugriff erfolgreich sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What is missing
tests/test_offline_descriptor.py currently contains a single test:
test_descriptor_bip86 — tests Descriptor.new_bip86() for the external keychain only
bdkpython exposes 8 BIP descriptor template constructors (from bdk_wallet::template)
across 4 standards, each with a private key variant (DescriptorSecretKey) and a
watch-only public key variant (DescriptorPublicKey), plus 3 miniscript multisig
constructors. None of the following have test coverage today:
| Constructor | Standard | Script type | Tested? |
|---|---|---|---|
Descriptor.new_bip44() |
BIP44 | pkh(...) |
No |
Descriptor.new_bip44_public() |
BIP44 | pkh(...) |
No |
Descriptor.new_bip49() |
BIP49 | sh(wpkh(...)) |
No |
Descriptor.new_bip49_public() |
BIP49 | sh(wpkh(...)) |
No |
Descriptor.new_bip84() |
BIP84 | wpkh(...) |
No |
Descriptor.new_bip84_public() |
BIP84 | wpkh(...) |
No |
Descriptor.new_bip86() internal |
BIP86 | tr(...) |
No |
Descriptor.new_bip86_public() |
BIP86 | tr(...) |
No |
Descriptor.new_wsh_sortedmulti() |
miniscript | wsh(sortedmulti(...)) |
No |
Descriptor.new_sh_sortedmulti() |
miniscript | sh(sortedmulti(...)) |
No |
Descriptor.new_sh_wsh_sortedmulti() |
miniscript | sh(wsh(sortedmulti(...))) |
No |
What I propose to add
13 new tests in tests/test_offline_descriptor.py covering:
- BIP44 — external keychain, internal keychain, and watch-only (
new_bip44_public) variant - BIP49 — external keychain, internal keychain, and watch-only (
new_bip49_public) variant - BIP84 — external keychain, internal keychain, and watch-only (
new_bip84_public) variant - BIP86 — internal keychain and watch-only (
new_bip86_public) variant (external already exists) - Multisig —
new_wsh_sortedmultiandnew_sh_sortedmulti2-of-3
I am intentionally leaving new_sh_wsh_sortedmulti out of this PR to keep the scope
focused, and can follow up with a separate issue if the maintainers consider it worthwhile.
All tests will be:
- Fully offline — no network access required
- Deterministic — fixed test mnemonic so expected outputs are independently verifiable
with any compatible BIP32/BIP44/BIP49/BIP84/BIP86 implementation - Following the same pattern as the existing test: fixed mnemonic → derive key → assert full descriptor string including checksum
Why this matters
Descriptor construction is the first thing every bdkpython user does — it is required
to create a Wallet. Without test coverage for these constructors, a regression in the
FFI layer (e.g. wrong derivation path, wrong script type, wrong network prefix, wrong
checksum) would go undetected until a user reports it in production.
Each test pins the full descriptor output string to a known-correct value, which means
any future change to the FFI type conversion or the bdk_wallet::template behavior
that silently produces wrong output will immediately fail CI.
This is a pure Python addition — no changes to the Rust layer.
Checklist before I open a PR
- Maintainer confirms this contribution is welcome
- I will follow the existing file structure in
tests/test_offline_descriptor.py - I will verify all expected values against the fixed mnemonic before submitting
- Vorherrschende Sprache
- Python
- Sterne
- 11
- Forks
- 12
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus bitcoindevkit/bdk-python
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
bitcoindevkit/bdk-python#31 · 3 Kommentare ·
Alle Issues in bitcoindevkit/bdk-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
NousResearch/hermes-agent#133181 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[oblt-aw][security] SEC-022 — findings (2026-10-05)Evtl. vergeben @elastic-vault-github-plugin-prod hat das heute übernommen. Offenoblt-aw/ai/fix-ready oblt-aw/detector/security oblt-aw/triage/security-secrets
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
elastic/oblt-aw#2304 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
huggingface/huggingface_hub#5083 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
deepset-ai/haystack#13107 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: index worker dies on LOG_LEVEL=info / empty / numeric before it can report a missing bootstrapEvtl. vergeben @sxh313 hat das heute übernommen. Offentriage/confirmed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
agentscope-ai/agentscope#3130 ·
Maintainer antworten meist innerhalb von 1 Tag