Skip to content

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

Merged
greatest0fallt1me merged 14 commits into
CalloraOrg:mainfrom
GBOYEE:task/max-batch
Jun 29, 2026
Merged

test(vault): enforce max-batch-size boundary (Fix #565)#594
greatest0fallt1me merged 14 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
@greatest0fallt1me greatest0fallt1me merged commit 6f5cdc7 into CalloraOrg:main Jun 29, 2026
3 of 6 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jun 29, 2026
4 tasks
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

2 participants