Skip to content

feat: add NUT-29 batch minting error codes#366

Merged
thesimplekid merged 1 commit into
cashubtc:mainfrom
KvngMikey:nut_29_error_codes
May 13, 2026
Merged

feat: add NUT-29 batch minting error codes#366
thesimplekid merged 1 commit into
cashubtc:mainfrom
KvngMikey:nut_29_error_codes

Conversation

@KvngMikey
Copy link
Copy Markdown
Contributor

@KvngMikey KvngMikey commented Apr 24, 2026

Summary

Adds two error codes for NUT-29 batch minting validation failures that have no existing coverage.

11016 Duplicate quote IDs provided: quote IDs are a distinct entity from proof inputs (11007) and blinded outputs (11008). The NUT-29 spec explicitly mandates uniqueness in validation rule 2 and 29-tests.md has a test vector for this failure path.

11017 Max batch size exceeded: covers the max_batch_size enforcement path. Same family as 11014 (max inputs) and 11015 (max outputs). Identified as missing during CTS NUT-29 implementation.

Both codes follow the 110xx structural validation family numbering.

Changes

  • Updates 29.md validation rules and batch size section to reference the new codes.
  • Updates 29-tests.mdwith expected error code for the duplicate quotes test vector.

Copilot AI review requested due to automatic review settings April 24, 2026 04:28
@github-project-automation github-project-automation Bot moved this to Backlog in nuts Apr 24, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds two new NUT-29 batch minting validation error codes (duplicate quote IDs and max batch size exceeded) and updates the NUT-29 spec + test vectors to reference them.

Changes:

  • Added error codes 11016 (duplicate quote IDs) and 11017 (max batch size exceeded) to the shared error code registry.
  • Updated 29.md to reference the new error codes in request validation and batch size limit documentation.
  • Updated tests/29-tests.md to include the expected error code for the duplicate quote IDs test vector.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/29-tests.md Documents expected error code 11016 for the duplicate quote IDs test vector.
error_codes.md Registers new NUT-29 error codes 11016 and 11017.
29.md References the new error codes in validation rules and batch size limit notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread 29.md Outdated
@thesimplekid thesimplekid merged commit c8f4bb3 into cashubtc:main May 13, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in nuts May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants