Skip to content

policy: allow exact annex padding for simplicity spends #1539

Open
delta1 wants to merge 2 commits intoElementsProject:masterfrom
delta1:2026-02-annex-policy
Open

policy: allow exact annex padding for simplicity spends #1539
delta1 wants to merge 2 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.

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.

@delta1 delta1 force-pushed the 2026-02-annex-policy branch from 4a9b55e to 4cdb88c Compare March 25, 2026 13:11
@delta1 delta1 force-pushed the 2026-02-annex-policy branch from 4cdb88c to 1918260 Compare March 25, 2026 13:26
@delta1 delta1 marked this pull request as ready for review March 25, 2026 13:26
@delta1
Copy link
Member Author

delta1 commented Mar 25, 2026

Thanks @roconnor-blockstream updated

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