Skip to content

fix(aztec-nr): clarify fragmented balance error - #25286

Open
loglapa wants to merge 1 commit into
AztecProtocol:nextfrom
loglapa:fix/24984-balance-fragmentation-error
Open

fix(aztec-nr): clarify fragmented balance error#25286
loglapa wants to merge 1 commit into
AztecProtocol:nextfrom
loglapa:fix/24984-balance-fragmentation-error

Conversation

@loglapa

@loglapa loglapa commented Aug 21, 2026

Copy link
Copy Markdown

Closes #24984.

Summary

Clarify the BalanceSet::sub assertion when the selected notes do not cover the requested amount. The previous Balance too low message was also emitted when the total balance was sufficient but too fragmented to fit within the note-read limit.

The new message names both possible causes without hard-coding the current note limit, so it remains accurate if the protocol constant changes. The subtraction behavior is unchanged.

Testing

Using the repository-built nargo 1.0.0-beta.26 artifact in the ARM64 aztecprotocol/build:3.0 container:

  • nargo fmt --check --package balance_set
  • nargo check --package balance_set --deny-warnings
  • nargo test --package balance_set (package currently contains no test functions; compilation succeeds)

@loglapa
loglapa marked this pull request as ready for review August 23, 2026 08:04
@loglapa
loglapa requested a review from nventuro as a code owner August 23, 2026 08:04
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.

[BUG] Misleading "Balance too low" in BalanceSet::sub — actually a note-fragmentation limit

1 participant