Skip to content

feat(mint): advertise the maximum request array length - #1115

Merged
a1denvalu3 merged 2 commits into
cashubtc:mainfrom
robwoodgate:feat/nut06-max-request-length
Sep 1, 2026
Merged

feat(mint): advertise the maximum request array length#1115
a1denvalu3 merged 2 commits into
cashubtc:mainfrom
robwoodgate:feat/nut06-max-request-length

Conversation

@robwoodgate

@robwoodgate robwoodgate commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Implements cashubtc/nuts#425.

Adds the optional NUT-06 max_array_length to /v1/info so wallets can size their batches up front instead of discovering the cap by getting an error partway through a request.

The value is the existing mint_max_request_length setting, which already bounds every request array, so this only surfaces what the mint enforces today.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.43%. Comparing base (89b98bd) to head (65a9ddd).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1115      +/-   ##
==========================================
- Coverage   74.49%   74.43%   -0.07%     
==========================================
  Files         115      113       -2     
  Lines       13160    12756     -404     
==========================================
- Hits         9804     9495     -309     
+ Misses       3356     3261      -95     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Nothing tells a wallet how long an array in a request may be, so it finds
out by getting an error partway through one it has already built. Serve the
existing mint_max_request_length setting as the NUT-06 max_request_length
field.
@robwoodgate
robwoodgate force-pushed the feat/nut06-max-request-length branch from f5d358b to 917bd11 Compare August 13, 2026 21:00

@callebtc callebtc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ACK waiting for NUT

Follows the NUT-06 field rename. The old name reads like a cap on the
request body in bytes. The mint_max_request_length setting is unchanged.
@robwoodgate

Copy link
Copy Markdown
Contributor Author

EDIT: Updated NUT-06 key name to: max_array_length following NUT feedback

@a1denvalu3

Copy link
Copy Markdown
Collaborator

ACK. NUT change is merged therefore merging.

@a1denvalu3
a1denvalu3 merged commit 33cc52e into cashubtc:main Sep 1, 2026
24 of 25 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in nutshell Sep 1, 2026
@robwoodgate
robwoodgate deleted the feat/nut06-max-request-length branch September 1, 2026 10:31
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.

3 participants