`compile --type=sh` produces a descriptor Bitcoin Core rejects
@vadim-anfv がすでに取り組んでいます。
2026年8月7日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- Rust
- スター
- 142
- フォーク
- 99
- 平均マージ
- 8日 1時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bitcoindevkit/bdk-cli のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bitcoindevkit/bdk-cli#332 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
bitcoindevkit/bdk-cli#330 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bitcoindevkit/bdk-cli#318 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
bitcoindevkit/bdk-cli#333 ·
-
bug
bitcoindevkit/bdk-cli#331 · 担当者 1 名 ·
bitcoindevkit/bdk-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
bug core
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW オープンfuzz
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ClickHouse/ClickHouse#122114 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
linebender/vello_svg#90 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100