Skip to content

Revise Simplicity descriptors #108

Open

Description

@KyrylR

After recent years of updates to rust-simplicity and SimplicityHL, imo, it is not feasible to get Simplicity descriptors with policies back to life from the get-go, so instead we can take an iterative approach

First pack of changes that I would propose:

  • Replace Simplicity policy leaves with sim{asm(CMR)} and do not accept sim{POLICY} syntax anymore (for the time being)
  • Add descriptor::SimplicityLeaf<Pk> (Pk here is for future iteration for programs like P2PK, multisigs (?))
  • Re-export the simplicity-lang crate
  • Sanity check and lifting for Simplicity will fail with the error

Activity

  1. apoelstra commented on Sep 29, 2026

    @apoelstra
    Member

    Yeah, concept ACK removing Simplicity policies for now (but leaving asm which can be used for testing and to keep the two libraries integrated).

    For descriptor::SimplicityLeaf<Pk> I'd prefer this be an alternate Tapleaf type rather than a top-level descriptor type. We may need to remove Simplicity, rebase this whole library (or at least the Taproot stuff) on a recent rust-miniscript, and then restore Simplicity to do this.

  2. KyrylR commented on Sep 29, 2026

    @KyrylR
    ContributorAuthor

    Is rust-miniscript ready? (I mean, is there any pending work that could impact Simplicity descriptors?)

  3. apoelstra commented on Sep 29, 2026

    @apoelstra
    Member

    Yeah :/ we're in the middle of a pretty significant refactor of how we validate various "sanity" rules, and in the middle of a long-term project to remove recursion from the library, and we have 100+ LLM-reported issues to sift through.

    Having said this, I suggest:

    1. We update to miniscript 13.1, the latest release.
    2. We replace our expression.rs module with calls to the rust-miniscript expression module which was designed with this library in mind and hopefully should just drop into place, and give us much saner Taproot parsing logic. (Its API will change in Miniscript 14 to handle validationparams, but we'll deal with that when it's released, which will be several months at least).
    3. We then copy the Taproot module from rust-miniscript master.
    4. Then we add the Simplicity branch

    We can defer doing a wholesale rust-miniscript update, probably until we're past the rust-bitcoin 1.0 hump.

  4. KyrylR commented on Sep 30, 2026

    @KyrylR
    ContributorAuthor

    Cool, thx

  5. KyrylR commented on Oct 1, 2026

    @KyrylR
    ContributorAuthor
  6. KyrylR commented on Oct 14, 2026

    @KyrylR
    ContributorAuthor

    @apoelstra I have a question regarding the rust-miniscript's planning functionality:

    1. AssetProvider and Assets to describe signing capabilities.

      https://github.com/rust-bitcoin/rust-miniscript/blob/746bba5698a9ba34af0dc5bbfc6a05c167cf8a58/src/plan.rs#L45

      https://github.com/rust-bitcoin/rust-miniscript/blob/746bba5698a9ba34af0dc5bbfc6a05c167cf8a58/src/plan.rs#L510

    2. Witness placeholders and templates.

      https://github.com/rust-bitcoin/rust-miniscript/blob/746bba5698a9ba34af0dc5bbfc6a05c167cf8a58/src/miniscript/satisfy/mod.rs#L577

      https://github.com/rust-bitcoin/rust-miniscript/blob/746bba5698a9ba34af0dc5bbfc6a05c167cf8a58/src/miniscript/satisfy/mod.rs#L873

    3. Tr::plan_satisfaction and Tr::plan_satisfaction_mall.

      https://github.com/rust-bitcoin/rust-miniscript/blob/746bba5698a9ba34af0dc5bbfc6a05c167cf8a58/src/descriptor/tr/mod.rs#L318-L331

    4. Template completion using a Satisfier.

      https://github.com/rust-bitcoin/rust-miniscript/blob/746bba5698a9ba34af0dc5bbfc6a05c167cf8a58/src/miniscript/satisfy/mod.rs#L1152

    The upstream Taproot module depends on that planning infrastructure. Its concrete get_satisfaction also builds a template and completes it.

    So, should the step We then copy the Taproot module from rust-miniscript master. include those?

  7. apoelstra commented on Oct 14, 2026

    @apoelstra
    Member

    Oof. Yeah, I think we'll have to port all the planning infrastructure over to get Taproot stuff. (And I really think we have no choice about pulling the Taproot stuff over; our old API is nearly unusable and also buggy.)

    I wonder if we should back up and instead attempt to "forward port" our existing covenant and simplicity stuff to rust-miniscript master, then setup a cronjob like with secp256k1-zkp to continually pull in upstream changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions