Skip to content

Testing: Property/invariant tests for contract accounting (proptest) #801

Description

@joelpeace48-cell

Context

Financial invariants (sum of balances == credited - redeemed; reserve >= outstanding liabilities;
no negative balances) should be proven across randomized op sequences, not just example tests.

Scope

  • proptest/quickcheck sequences of credit/claim/redeem/withdraw/fund and assert invariants after each.
  • Shrinking to minimal failing sequences; run in CI.

Acceptance criteria

  • Invariants hold across thousands of randomized sequences; failures shrink to a minimal repro.

Verification

  • CI runs the proptest suite; a seeded accounting bug is caught and shrunk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: smart-contractSoroban Rust contractsdifficulty: hardLarger or subtle changesrustPull requests that update rust codetestingTests and test tooling

    Type

    No type

    Fields

    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