Atomic reservations and repeatable transfers in an account ledger (#8) #24

Merged
faumaray merged 1 commits from issue/8-account-ledger into main 2026-12-03 08:08:23 +00:00
Owner

Closes #8.

Branch issue/8-account-ledger targeting main. Summary, tests and the documented contracts are in the commit message and the issue comment.

Closes #8. Branch `issue/8-account-ledger` targeting `main`. Summary, tests and the documented contracts are in the commit message and the issue comment.
faumaray added 1 commit 2026-12-03 06:49:25 +00:00
- AccountLedger: caller-keyed accounts (owner, balance, capacity) with
  atomic multi-account reserve, release without ownership change and
  transfer to the destination (next) owner.
- Explicit outcomes for insufficient balance, capacity exhaustion,
  overflow, unknown account/operation, invalid phase and limits.
- Every committed phase is recorded by operation id, so repeated
  requests replay the recorded outcome instead of applying twice;
  failed attempts change nothing and remain retryable.
- State is a plain value: save()/restore() survive a partially completed
  transfer and replay applies exactly once after restore.
- 11 tests: conservation, last-unit contention, atomic multi-key failure,
  cancellation before pickup and during delivery, restore/replay,
  overflow, operation-id conflict, account/operation limits and invalid
  restore state.
faumaray merged commit 6c5c2dcd93 into main 2026-12-03 08:08:23 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#24