rust-bitcoin / rust-bitcoin/rust-miniscript

Getting error for `SortedMulti` while parsing descriptor

Open
#698 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
426
Forks
200
Avg merge
7d 17h
Merged PRs (30d)
8

Description

While parsing descriptor which uses SortedMulti function as shown ->


  let a=Descriptor::<DescriptorPublicKey>::parse_descriptor(&secp, "sortedmulti(2,03acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe,022f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01)").unwrap();
  
  

I am getting this error->

called `Result::unwrap()` on an `Err` value: Unexpected("sortedmulti(3 args) while parsing Miniscript")
  

After some search -> I found that this error is comming from

https://github.com/rust-bitcoin/rust-miniscript/blob/9e1b3cdf7e38563f4f2e7c2832a994f4c91a5e36/src/miniscript/astelem.rs#L317

  • Well, I guess sortedmulti_a is not yet supported in miniscript?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the descriptor parsing example from the issue and inspect src/miniscript/astelem.rs around line 317, where the reported error originates. Trace how sortedmulti arguments are parsed and compare the accepted forms with the descriptor syntax in the example. Done means the intended SortedMulti form is either supported with coverage or clearly rejected with an accurate diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.