feat: x/pot — Compliant PoS with token ownership requirements#45
Open
feat: x/pot — Compliant PoS with token ownership requirements#45
Conversation
New module that gates validator voting power on x/tokenization credential token ownership. Supports both x/staking and PoA backends via abstracted ValidatorSetKeeper interface. Features: - Binary credential gate: has token = full power, no token = disabled - Dual backend: StakingAdapter (x/staking+x/slashing) and PoAAdapter - Respects slashing: won't unjail tombstoned or still-jailed validators - CacheContext for atomic EndBlocker state changes - Per-disable/enable inner CacheContext preventing partial state corruption - Self-healing proto/JSON params migration - Registered invariant for compliance-jailed set consistency - CLI: tx pot update-params, query pot params - Proto-generated types (params, genesis, tx, query) - Governance-controlled params (10s voting period for testing) - Safety: never jails all validators, comprehensive error handling Tested: - 10 unit tests (params, queue, EndBlocker logic) - Full E2E: create credentials, enable via governance, revoke credential, verify compliance-jailing, verify chain continues - Two rounds of security review (15 findings found and fixed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
x/potmodule that adds a compliance gate on top of x/stakingstaked_multiplier(compliant PoS),equal(democratic with slashing),credential_weighted(weighted by token balance)Backlog
Implements autopilot backlog #0155
Test plan
🤖 Generated with Claude Code