`compile --type=sh` produces a descriptor Bitcoin Core rejects
Maintainer thường phản hồi trong vòng 1 ngày
@vadim-anfv đang làm issue này rồi.
Từ ngày 7/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
bdk-cli compile accepts --type values sh, wsh, sh-wsh and tr. Only sh produces a descriptor Bitcoin Core rejects:
$ A=$(bdk-cli --network bitcoin key generate | jq -r .xprv)
$ B=$(bdk-cli --network bitcoin key generate | jq -r .xprv)
$ D=$(bdk-cli compile "or(pk($A),pk($B))" --type=sh | jq -r .descriptor)
$ bitcoin-cli getdescriptorinfo "$D"
error code: -5
error message:
Miniscript expressions can only be used in wsh or tr.
The same policy with --type=wsh, --type=sh-wsh and --type=tr is accepted.
BIP 379 scopes Miniscript to P2WSH and Tapscript, and excludes P2SH explicitly, spec:
These specifications apply to P2WSH (BIP 141) and Tapscript (BIP 342) scripts [...] P2SH and bare scripts are excluded from this specification.
Core enforces that where it parses the Miniscript expression, src:
if (node) {
if (ctx != ParseScriptContext::P2WSH && ctx != ParseScriptContext::P2TR) {
error = "Miniscript expressions can only be used in wsh or tr.";
return {};
}
bdk-cli can still build the descriptor because rust-miniscript keeps the pre-BIP contexts. BDK also handles it end to end: wallet config --ext-descriptor "$D" followed by new_address derives a P2SH address, and the script itself is consensus-valid. Other descriptor-based wallets may not support this type though - Core rejects it outright, in both getdescriptorinfo and importdescriptors.
@tvpeter how would you like this handled?
- drop
shfrom the accepted--typevalues - keep it, but warn on output and document that it is outside BIP 379 specification
Happy to open the PR once you have picked one.
- Ngôn ngữ chính
- Rust
- Star
- 142
- Fork
- 99
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bitcoindevkit/bdk-cli
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bitcoindevkit/bdk-cli#332 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
bitcoindevkit/bdk-cli#330 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Crate chacha20 0.10.1 is yankedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bitcoindevkit/bdk-cli#318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
bitcoindevkit/bdk-cli#338 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add testable example playbookĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
bitcoindevkit/bdk-cli#333 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của bitcoindevkit/bdk-cli
Issue tương tự
-
area:cli bug good first issue priority:high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
rtk-ai/rtk#4249 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ActivityWatch/activitywatch#1463 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày