Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`compile --type=sh` produces a descriptor Bitcoin Core rejects

Abierto
#313 2 comentarios 0 reacciones 1 asignado Ver en GitHub

@vadim-anfv ya está trabajando en esto.

Desde el 7/8/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

discussion

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?

  1. drop sh from the accepted --type values
  2. 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.

Lenguaje dominante
Rust
Estrellas
142
Forks
99
Merge medio
8 d 1 h
PR fusionados (30 d)
1

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bitcoindevkit/bdk-cli

Todos los issues de bitcoindevkit/bdk-cli

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.