Skip to content

policy: allow exact annex padding for simplicity spends #1539

Draft
delta1 wants to merge 3 commits intoElementsProject:masterfrom
delta1:2026-02-annex-policy
Draft

policy: allow exact annex padding for simplicity spends #1539
delta1 wants to merge 3 commits intoElementsProject:masterfrom
delta1:2026-02-annex-policy

Conversation

@delta1
Copy link
Member

@delta1 delta1 commented Mar 13, 2026

Implements BlockstreamResearch/simplicity#290 for Elements standardness policy.

Looking for approach feedback.

90c380f should probably be upstreamed into simplicity itself?

Something concerning to be investigated is that Cost::get_padding in rust-simplicity is returning a padding 3 bytes bigger than this calculation.. presumably an error in that method?

@roconnor-blockstream
Copy link
Contributor

roconnor-blockstream commented Mar 16, 2026

I'll have some more comment later but first and foremost there is no need to amend the Simplicity C code.

Instead there is a minCost parameter that can needs to be passed up through CheckSimplicity. See https://github.com/roconnor-blockstream/bitcoin/pull/1/changes#diff-a0337ffd7259e8c7c9a7786d6dbd420c80abfa1afdb34ebae3261109d9ae3c19R1876-R1886 for an example of this. You will need to pass a minCost of 0 when in consensus mode rather than policy mode.

Have a careful read of the documentation for minCost in execSimplicity.

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