Skip to content

fuzz: add paused-mid-batch scenario test (closes #92) - #151

Merged
nanaf6203-bit merged 3 commits into
StellarTips:mainfrom
Degentle12:feat/issue-92-paused-mid-batch
Jul 30, 2026
Merged

fuzz: add paused-mid-batch scenario test (closes #92)#151
nanaf6203-bit merged 3 commits into
StellarTips:mainfrom
Degentle12:feat/issue-92-paused-mid-batch

Conversation

@Degentle12

Copy link
Copy Markdown
Contributor

Summary

Closes #92 — Fuzz: paused-mid-batch scenarios.

Changes

  • Added SimpleRng — a deterministic SplitMix64 PRNG for reproducible fuzz seeds.
  • Added test_paused_mid_batch_no_state_corruption proptest — randomly interleaves admin pause/unpause with tips to two creators and withdraws.
  • Tracks expected balances and cumulative fees, verifying final invariants:
    • Internal balances match on-chain state
    • Contract balance = sum of creator internal balances
    • Fee recipient holds all forwarded fees
  • Tips succeed only when unpaused and fail only when paused.

Files

  • src/fuzz.rs: +138 lines

Testing

cargo test test_paused_mid_batch

10,000 proptest cases.

@Degentle12
Degentle12 force-pushed the feat/issue-92-paused-mid-batch branch from f8956dc to 41a2e38 Compare July 30, 2026 10:10
@nanaf6203-bit
nanaf6203-bit merged commit 3c0e651 into StellarTips:main Jul 30, 2026
12 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.

Fuzz: paused-mid-batch scenarios

2 participants