Lack of TTL protection for non-market governance records#210
Merged
hman38705 merged 2 commits intoMar 24, 2026
Merged
Conversation
… state - Add GOV_TTL_LOW_THRESHOLD (90 days) and GOV_TTL_HIGH_THRESHOLD (180 days) constants to types.rs governance processes can span months so they need much longer TTLs than market data - Add bump_gov_ttl helper in governance.rs; call it after every write to GuardianSet and PendingUpgrade (initialize, add, remove, initiate_upgrade, vote_for_upgrade) - Add bump_gov_ttl helper in admin.rs; call it after every write to Admin, MarketAdmin, FeeAdmin, GuardianAccount - Add bump_gov_ttl in circuit_breaker.rs; call it after every write to CircuitBreakerState (set_state, pause, unpause) - Add bump_config_ttl in fees.rs; call it after set_base_fee - Bump TTL on CreationDeposit writes in markets.rs - Fix stale DataKey::Bet 2-arg reference in markets::count_bets_for_outcome - Add 3 TTL durability tests: PendingUpgrade survives 3 months inactivity, GuardianSet survives 3 months inactivity, voting refreshes TTL
|
@brite-side0 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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 #188 Lack of TTL protection for non-market governance records
Pull Request
📋 Description
Brief description of the changes in this PR.
🎯 Type of Change
🔗 Related Issues
Closes #(issue number)
Relates to #(issue number)
📝 Changes Made
🧪 Testing
Test Coverage
Manual Testing
Test Results:
📸 Screenshots (if applicable)
[Add screenshots for UI changes]
✅ Checklist
Code Quality
Documentation
Testing & Quality
cargo test)cargo clippy)cargo fmt)Security
Git
🔍 Reviewer Notes
[Any specific areas you'd like reviewers to focus on]
📊 Performance Impact
Details:
[Describe any performance implications]
🚀 Deployment Notes
[Any special deployment considerations, migration steps, or configuration changes needed]
📚 Additional Context
[Add any other context about the PR here]
By submitting this PR, I confirm that: