Skip to content

Discourage unsigned / uncommitted annexes #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2025-std-unstructured-annex
Choose a base branch
from

Conversation

joshdoman
Copy link

I've been thinking about the possibility of witness malleability if the annex becomes standard. As it stands, any script path spend that lacks a CHECKSIG can have an arbitrary amount of data placed in the annex by a third party.

A simple solution would be to make unsigned annexes non-standard. I implemented this by adding a m_annex_committed field to ScriptExecutionData, which is only set to true if CheckSchnorrSignature executes successfully and an annex is present. I called this variable m_annex_committed rather than m_annex_signed in case there is a future opcode that commits to the annex explicitly.

@petertodd Do you think this is a good idea, if the annex is made standard? I'm not sure how common non-CHECKSIG scripts are today, but I imagine they could become more common if opcodes like CTV or CSFS are adopted in the future.

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.

1 participant