Skip to content

Issue 265/add circle invariants - #371

Merged
Otaiki1 merged 2 commits into
crackedstudio:mainfrom
ositaemmanuel653-netizen:issue-265/add-circle-invariants
Sep 4, 2026
Merged

Issue 265/add circle invariants#371
Otaiki1 merged 2 commits into
crackedstudio:mainfrom
ositaemmanuel653-netizen:issue-265/add-circle-invariants

Conversation

@ositaemmanuel653-netizen

Copy link
Copy Markdown

Closes #265
What changed

Added a shared assert_invariants helper to verify circle pot accounting and contract solvency invariants throughout the test suite. The helper is called after lifecycle, funding, claiming, and cancellation state transitions, and a property-based test exercises random legal fund/claim/cancel sequences to ensure the invariants hold throughout.

Why

Closes #265

These invariants were previously guaranteed by construction but were not explicitly asserted by the existing tests. The new checks ensure that pot accounting cannot drift and that the contract always has enough tokens to cover all live circle pots.

Testing
Circuit tests (cd circuits && npm test)
Contract tests (cd contracts && cargo test)
E2E against testnet (npm run e2e)
App tested manually (cd app && npm run dev)
Docs-only (no code changed)
Screenshots

Developer added 2 commits August 30, 2026 19:59
- Call has_claimed as read-only
- Pre-check per-member nullifier on entering claim step
- Mark ineligible members and disable selection
- Add ineligible flag to Member type
- Update MemberRing/ClaimSection UI
@ositaemmanuel653-netizen

Copy link
Copy Markdown
Author

@Otaiki1

@Otaiki1
Otaiki1 merged commit 97cc18a into crackedstudio:main Sep 4, 2026
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.

Add a Circle invariant-check test asserting pot accounting can never drift

2 participants