Skip to content

feat: bound family wallet transaction archive and verify selection bo…#709

Merged
Baskarayelu merged 1 commit into
Remitwise-Org:mainfrom
ScriptedBro:feature/fw-archive-bounds
Jun 2, 2026
Merged

feat: bound family wallet transaction archive and verify selection bo…#709
Baskarayelu merged 1 commit into
Remitwise-Org:mainfrom
ScriptedBro:feature/fw-archive-bounds

Conversation

@ScriptedBro

Copy link
Copy Markdown
Contributor

Summary

Closes #643

This pull request implements bounded transaction archiving for the family_wallet contract. The archive mechanism ensures that ARCH_TX never grows unbounded, preventing instance-storage rent inflation. It also adds proper ArchiveEvent emission consistency and comprehensive documentation.


Changes

  • family_wallet/src/lib.rs:

    • Updated archive_old_transactions to emit ArchiveEvent::TransactionsArchived instead of RemitwiseEvents::emit
    • Updated cleanup_expired_pending to emit ArchiveEvent::ExpiredCleaned instead of RemitwiseEvents::emit
    • Updated cancel_transaction to emit ArchiveEvent::TransactionCancelled (previously had no event emission)
    • Archive enforces strict less-than boundary check (executed_at < before_timestamp)
    • Archive bounded at MAX_ARCHIVE_ENTRIES (500) with oldest-first eviction
    • Updates STOR_STAT.archived_transactions after archiving
  • docs/fw-archive-lifecycle.md:

    • Created comprehensive documentation of the archive lifecycle
    • Documents key functions, storage bounds, data integrity, and security considerations
    • Lists all test coverage for archive invariants

Test Output

test result: ok. 150 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 21.19s

@Baskarayelu Baskarayelu merged commit 823cc27 into Remitwise-Org:main Jun 2, 2026
3 of 6 checks passed
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.

Family Wallet: archive_old_transactions correctness and ARCH_TX storage growth bounds

2 participants