Skip to content

simplicity: minimal simplicity descriptors support - #104

Draft
KyrylR wants to merge 5 commits into
ElementsProject:masterfrom
KyrylR:feature/simplicity-descriptors
Draft

simplicity: minimal simplicity descriptors support#104
KyrylR wants to merge 5 commits into
ElementsProject:masterfrom
KyrylR:feature/simplicity-descriptors

Conversation

@KyrylR

@KyrylR KyrylR commented Aug 23, 2026

Copy link
Copy Markdown

This PR bumps rust-simplicity version to the last one which in result bumps MSRV

Because of the MSRV bumped some formatting/clippy changes were introduced as well

The idea behind is to add minimal working Simplicity descriptors (which in this cases means CMR descs only)

Satisfaction of SImplicity desc was removed entierly because it requires ElementsEnv, so to keep the scope of this PR minimal will tackle the satisfaction of Simplicity desc in follow up PRs if necessary

@delta1 delta1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 2cfd000; tested locally

Nits / follow-up suggestions (non-blocking)

  • Pre-existing bug now dead code (src/simplicity.rs:38-39, 46-47): the and/or parsers set right = Policy::from_tree(&top.args[0]) (should be args[1]). This predates the PR and is now unreachable via descriptors (non-asm leaves are rejected), but the buggy impl_from_tree still exists. Consider fixing or removing the unreachable and/or/thresh/pk arms while restricting scope to CMR-only, to avoid shipping latent-wrong code.
  • lift() still panics (tr.rs:820-821) on a SimplicityLeaf. Reachable via public .lift(). Returning an Error would be more consistent with the PR's move away from panics, but arguably out of scope.

@KyrylR

KyrylR commented Aug 26, 2026

Copy link
Copy Markdown
Author

Nits / follow-up suggestions (non-blocking)
Pre-existing bug now dead code (src/simplicity.rs:38-39, 46-47): the and/or parsers set right = Policy::from_tree(&top.args[0]) (should be args[1]). This predates the PR and is now unreachable via descriptors (non-asm leaves are rejected), but the buggy impl_from_tree still exists. Consider fixing or removing the unreachable and/or/thresh/pk arms while restricting scope to CMR-only, to avoid shipping latent-wrong code.
lift() still panics (tr.rs:820-821) on a SimplicityLeaf. Reachable via public .lift(). Returning an Error would be more consistent with the PR's move away from panics, but arguably out of scope.

Yep, know about those, will address them in later PRs

@KyrylR
KyrylR marked this pull request as draft August 26, 2026 15:21
@KyrylR

KyrylR commented Aug 26, 2026

Copy link
Copy Markdown
Author

Converted to draft because of this: BlockstreamResearch/rust-simplicity#376 (I am relying on assembly here, so I would need to revise logic)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants