Issue 265/add circle invariants - #371
Merged
Otaiki1 merged 2 commits intoSep 4, 2026
Merged
Conversation
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
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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