Skip to content

fix(#868,#869,#883,#866): overflow guard, rollback typo, concurrency invariant, self-payment check#998

Open
devonahi wants to merge 1 commit into
Gildado:mainfrom
devonahi:main
Open

fix(#868,#869,#883,#866): overflow guard, rollback typo, concurrency invariant, self-payment check#998
devonahi wants to merge 1 commit into
Gildado:mainfrom
devonahi:main

Conversation

@devonahi

@devonahi devonahi commented Jun 30, 2026

Copy link
Copy Markdown

Summary

Closes #868 bulk_payment: Verified execute_batch_partial already uses checked_add for i128 accumulation; added test asserting overflow returns AmountOverflow (error #7) instead of panicking or wrapping.
Closes #869 bulk_payment: Fixed misspelled event topic "rollbck""rollback" in both execute_batch_partial and execute_partial_with_refund. Updated all test assertions matching on the symbol.
Closes #883 milestone_escrow: Added explicit concurrency model doc comment explaining Soroban's single-threaded execution. Added invariant check in release_milestone() that re-derives remaining balance from total_amount - released_amount before transfer, preventing double-spend under future cross-contract changes. Added sequential release test verifying balances never go negative.
Closes #866 asset_path_payment: Added SelfPayment error variant and early rejection when from == to in initiate_path_payment. Added unit test asserting the rejection.

Files Changed

  • contracts/bulk_payment/src/lib.rs — "rollbck" → "rollback" (2 sites)
  • contracts/bulk_payment/src/test.rs — updated test names/assertions + overflow test
  • contracts/milestone_escrow/src/lib.rs — concurrency docs + invariant check
  • contracts/milestone_escrow/src/test.rs — sequential release test
  • contracts/asset_path_payment/src/lib.rsSelfPayment error + from == to guard
  • contracts/asset_path_payment/src/test.rs — self-payment rejection test

… rollback typo, concurrency invariant, self-payment guard

- Gildado#868: Add overflow test for execute_batch_partial (checked_add already present)
- Gildado#869: Fix misspelled event topic 'rollbck' → 'rollback' in bulk_payment
- Gildado#883: Add invariant re-deriving remaining balance from milestone state before
  transfer in release_milestone(); add concurrency model documentation
- Gildado#866: Reject self-payments (from == to) in asset_path_payment with clear error
@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@devonahi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment