Skip to content

test(vault): enforce max-batch-size boundary (Fix #565)#594

Open
GBOYEE wants to merge 13 commits into
CalloraOrg:mainfrom
GBOYEE:task/max-batch
Open

test(vault): enforce max-batch-size boundary (Fix #565)#594
GBOYEE wants to merge 13 commits into
CalloraOrg:mainfrom
GBOYEE:task/max-batch

Conversation

@GBOYEE

@GBOYEE GBOYEE commented Jun 28, 2026

Copy link
Copy Markdown

Summary

  • Vault already enforces MAX_BATCH_SIZE = 50 in batch_deduct() (line 974 in lib.rs)
  • Settlement already enforces MAX_BATCH_SIZE = 50 in batch_receive_payment() (line 400 in lib.rs)
  • Added focused boundary test: batch of exactly 50 succeeds, 51 is rejected with VaultError::BatchTooLarge
  • Added constant verification test

Closes #565

root added 13 commits June 28, 2026 21:40
- Replace inline type definitions with proper mod declarations
- Add missing mod declarations: admin, errors, limits, pagination, timelock, types
- Add pub use re-exports for SettlementError, PendingDeveloperMigration, types
- Remove duplicate get_storage_ttl functions (incompatible with SDK v22)
- Fix event structs: add token field to PaymentReceivedEvent and BalanceCreditedEvent
- Fix get_ttl() calls (not available in SDK v22)
- Fix SettlementError::OverDraft variant in errors.rs
- Fix test files: add missing token arg to receive_payment and cursor calls
- Fix test_invariant.rs: &(*env).clone() borrow issue

# Conflicts:
#	contracts/settlement/src/errors.rs
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.

Add per-tx max-batch-size enforcement

1 participant