Skip to content

Tighten nut-11 spending conditions#358

Open
robwoodgate wants to merge 5 commits into
cashubtc:mainfrom
robwoodgate:nut11-malformed
Open

Tighten nut-11 spending conditions#358
robwoodgate wants to merge 5 commits into
cashubtc:mainfrom
robwoodgate:nut11-malformed

Conversation

@robwoodgate
Copy link
Copy Markdown
Contributor

@robwoodgate robwoodgate commented Apr 1, 2026

This PR removes ambiguity by tightening the spending conditions to specifically reject malformed P2PK secrets.

@github-project-automation github-project-automation Bot moved this to Backlog in nuts Apr 1, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Comment thread 11.md
Comment thread 11.md Outdated
Copy link
Copy Markdown
Contributor

@KvngMikey KvngMikey left a comment

Choose a reason for hiding this comment

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

lgtm

Comment thread 11.md Outdated
@robwoodgate
Copy link
Copy Markdown
Contributor Author

@thesimplekid @callebtc - we have merged implementations across the core repos.
Can we consider merging, unless any other wording tweaks required?

Comment thread 11.md
- `refund: <hex_str>` are additional public keys that can provide signatures after `locktime` (_allows multiple entries_)
- `n_sigs_refund: <int>` specifies the minimum number of [Refund Multisig](#refund-multisig) public keys providing valid signatures after `locktime` expires

Each of the above tags may appear exactly **ONCE** in a P2PK secret. If a tag appears more than once, the P2PK secret is malformed and the Proof **MUST** be rejected as unspendable.
Copy link
Copy Markdown
Contributor

@a1denvalu3 a1denvalu3 Apr 17, 2026

Choose a reason for hiding this comment

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

As per discussion, we could enforce split handling on the mint and wallet sides.

  1. The mint could treat malformed NUT-11 as anyone-can-spend
  2. The wallets could reject malformed NUT-11.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What change in wording would work for you?

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants