[33.0-beta0] | ScriptBuf Tag Types + Rust Miniscript Integration

Open
#5,915 1 comment 3 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust
Domain
cryptography

Research direction

Start with rust-miniscript's src/descriptor/bare.rs and compare its ScriptBuf use with rust-bitcoin's primitives/src/script/mod.rs and primitives/src/script/tag.rs. Read the linked MuSig FFI context to understand the 33.0-beta0 constraint and determine how the bare descriptor output should represent both ScriptSig and WitnessScript uses. Done means an agreed ScriptBuf tagging approach that supports this integration without misrepresenting the script's valid contexts.

Written by the indexing model from the issue text.

Description

Problem

Currently I am attempting a refactor of rust-miniscript library to enable BIP-0390 musig descriptor support.

Schnorr Pk agg is not a part of rust-bitcoin 31.x FFI bindings in libsecp256k1 this leads to a problem. Updating to version 33.0-beta0 which supports these bindings uses a new tagged version of ScriptBuf which is hard to refactor into locations like this ... RustMsiniscript Bare

Where the above function does not fit the model of any of the available tags this is because the above function should return a script buffer that can be used either as a ScriptSig element or a WitnessScript which each have their own tags but not a mixed tag that represent multiple locations for use.

Example.
https://github.com/rust-bitcoin/rust-bitcoin/blob/4f84103e6a04e93f26122e2e7e272f6ce3f378e1/primitives/src/script/mod.rs#L56-L65

https://github.com/rust-bitcoin/rust-bitcoin/blob/4f84103e6a04e93f26122e2e7e272f6ce3f378e1/primitives/src/script/tag.rs#L9-L39

Thanks in advance,
PortlandHODL

Dominant language
Rust
Stars
2.7k
Forks
1.1k
Avg merge
3d 8h
Merged PRs (30d)
41

Getting set up

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.

More from rust-bitcoin/rust-bitcoin

All issues in rust-bitcoin/rust-bitcoin

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.