Skip to content

Add snapshot docs, concurrent streams test, cumulative fee rounding d… - #1129

Merged
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
Mikey-222:mikey/snapshots-and-tests
Jul 29, 2026
Merged

Add snapshot docs, concurrent streams test, cumulative fee rounding d…#1129
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
Mikey-222:mikey/snapshots-and-tests

Conversation

@Mikey-222

Copy link
Copy Markdown
Contributor

closes #1108
closes #1105
closes #1107
closes #1106

  • Add test_snapshots/README.md explaining snapshot purpose, regeneration command (SOROBAN_TEST_SNAPSHOTS=1 cargo test), and PR diff workflow
  • Link to it from contracts/stream_contract/README.md
  • Add test_concurrent_streams_same_tuple_independent_state: verifies two streams with identical (sender, recipient, token) maintain independent withdrawn_amount and deposited_amount
  • Add test_cumulative_fee_rounding_drift: 200 small sequential top-ups, asserts cumulative fee drift stays within tolerance (rounds down, favouring user)
  • Note: update_fee_config MAX_FEE_RATE_BPS rejection already tested at test_update_fee_config_rejects_invalid_fee_rate (line 171)

Description

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test addition or update

Related Issues

Closes #

Changes Made

Testing

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Test Steps

Breaking Changes

Breaking Changes:

Migration Guide:

Screenshots/Demo

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have checked for breaking changes and documented them if applicable

Additional Notes

…rift test

- Add test_snapshots/README.md explaining snapshot purpose, regeneration
  command (SOROBAN_TEST_SNAPSHOTS=1 cargo test), and PR diff workflow
- Link to it from contracts/stream_contract/README.md
- Add test_concurrent_streams_same_tuple_independent_state: verifies two
  streams with identical (sender, recipient, token) maintain independent
  withdrawn_amount and deposited_amount
- Add test_cumulative_fee_rounding_drift: 200 small sequential top-ups,
  asserts cumulative fee drift stays within tolerance (rounds down,
  favouring user)
- Note: update_fee_config MAX_FEE_RATE_BPS rejection already tested at
  test_update_fee_config_rejects_invalid_fee_rate (line 171)
@ogazboiz
ogazboiz merged commit 9613618 into LabsCrypt:main Jul 29, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment