Skip to content

Extend fuzz testing beyond the relay contract (escrow, threshold_window) #5

Description

@Meshmulla

Summary

We already fuzz the relay contract (soroban/tests/relay_contract_fuzz.rs), which is great — but the other critical contracts have no fuzz coverage. Extending fuzzing to escrow and threshold logic would surface edge cases (overflow, unexpected state transitions, boundary inputs) that unit tests miss.

What we'd like

  • Add fuzz targets for at least escrow_contract and threshold_window
  • Focus on invariants: balances never go negative, state transitions are always valid, no panics on arbitrary input
  • Wire the fuzz targets so they can run in CI for a bounded number of iterations

Where to look

  • soroban/tests/relay_contract_fuzz.rs — the existing pattern to follow
  • soroban/src/escrow_contract.rs, soroban/src/threshold_window.rs — targets
  • soroban/test_snapshots/ — how snapshots are used, so fuzz runs stay deterministic where needed

Acceptance criteria

  • Fuzz targets exist for escrow and threshold contracts
  • Each asserts clear invariants (no negative balances, no invalid transitions, no panics)
  • A short CI job runs them for a capped iteration count
  • Any bugs found are filed as separate issues

Notes

Mirror the structure of the relay fuzz test so contributors have a consistent template.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions