Skip to content

Property-based fuzz tests for all Stellar Soroban contracts #5

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, test, drips, help-wanted
Tier: M (2–4 days)
Type: test

Context

Today every Stellar contract has unit tests, but no property-based / fuzz coverage. Stealth address payments are arithmetic-heavy and have many edge cases (empty payloads, oversized data, malformed addresses) — exactly the kind of thing where property tests pay off.

This issue adds a proptest-based test layer that lives alongside the existing unit tests.

Scope

Add proptest (or quickcheck if preferred — pick one and justify) as a dev-dependency in each of the four Stellar crates:

  • stealth-announcer
  • stealth-registry
  • stealth-sender
  • wraith-names

For each contract, write at least 5 properties that should always hold:

Examples

  • announcer: For any (scheme_id, stealth_address, ephemeral_pub_key, metadata) where lengths are valid, announce() emits exactly one event with those fields verbatim.
  • registry: register_keys then stealth_meta_address_of for the same (registrant, scheme_id) round-trips bit-for-bit.
  • sender: batch_send of N transfers either fully succeeds (announcement count == N) or fully fails (announcement count == 0). Never partial.
  • wraith-names: Any 3–32-char lowercase alphanumeric name registered, then resolve()'d, returns the exact meta-address passed in. Any name outside that grammar panics.

Coverage requirement

Run with proptest! cases ≥ 1024 by default; ≥ 16384 in CI nightly job. Report any flaky tests; we'd rather find non-determinism now than in production.

Acceptance criteria

  • proptest dev-dependency added to all four Stellar crates.
  • tests/properties.rs in each crate with at least 5 properties.
  • CI nightly job that runs with the larger case count, alongside the existing test job.
  • README section "Property tests" explaining how to add new ones.
  • Any bugs surfaced by the new tests are filed as separate issues.

Resources

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdripsFunded via Drips Networkhelp wantedExtra attention is neededstellarTouches Stellar / Soroban codetestTest coverage / harness

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions