feat(r/sys/validators/v3): draft Phase B automated validator freeze#5887
Draft
moul wants to merge 1 commit into
Draft
feat(r/sys/validators/v3): draft Phase B automated validator freeze#5887moul wants to merge 1 commit into
moul wants to merge 1 commit into
Conversation
Adds autofreeze.gno — an automated freeze path driven by registered off-chain monitors, building on the manual freeze mechanism from Phase A. Key additions: - AutoFreezeValidator: called by any registered monitor; guarded by four on-chain invariants (power floor 80%, auto-frozen cap 12%, protected set, auto-expiry after ~1 day) - ExpireAutoFrozen: anyone can sweep expired auto-frozen entries and restore them to the effective valset - RegisterMonitor / DeregisterMonitor: GovDAO manages the monitor set - AddProtected / RemoveProtected: GovDAO manages the protected validator set - autofreeze_test.gno: unit tests for state helpers and invariant arithmetic - Render extended with monitor list and auto-frozen validator table The monitor is untrusted for safety: every invariant is enforced on-chain. A compromised monitor's worst case is bounded and time-limited.
Collaborator
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):No automated checks match this pull request. ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
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
Phase B of the validator freeze mechanism. Builds on Phase A (#5886) by adding an automated freeze path driven by registered off-chain monitors.
What's added
AutoFreezeValidator(cur, addr, reason, evidence)— callable by any registered monitor. Enforces four on-chain invariants before applying the freeze.ExpireAutoFrozen(cur)— sweeps auto-frozen entries whose TTL has elapsed and restores them to the effective valset. Callable by anyone.RegisterMonitor / DeregisterMonitor— GovDAO manages the monitor set.AddProtected / RemoveProtected— GovDAO manages a protected validator set that monitors cannot touch.autofreeze_test.gno— unit tests for state helpers and invariant arithmetic.Renderextended with monitor list and auto-frozen validator table.On-chain safety invariants (the monitor is untrusted)
A compromised monitor's worst case is bounded and time-limited by these invariants.
Open questions
Files changed
examples/gno.land/r/sys/validators/v3/autofreeze.gno— new, Phase B implementationexamples/gno.land/r/sys/validators/v3/autofreeze_test.gno— new, unit testsexamples/gno.land/r/sys/validators/v3/validators.gno—Renderextended