Skip to content

Lack of TTL protection for non-market governance records#210

Merged
hman38705 merged 2 commits into
solutions-plug:mainfrom
brite-side0:fix/issue-85-gov-ttl-management
Mar 24, 2026
Merged

Lack of TTL protection for non-market governance records#210
hman38705 merged 2 commits into
solutions-plug:mainfrom
brite-side0:fix/issue-85-gov-ttl-management

Conversation

@brite-side0

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Test addition/update
  • CI/CD update

🔗 Related Issues

Closes #(issue number)
Relates to #(issue number)

📝 Changes Made

  • Change 1
  • Change 2
  • Change 3

🧪 Testing

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • All tests passing locally
  • Test coverage maintained/improved

Manual Testing

  • Tested on testnet
  • Tested locally
  • Edge cases tested

Test Results:

[Paste test output or describe manual testing performed]

📸 Screenshots (if applicable)

[Add screenshots for UI changes]

✅ Checklist

Code Quality

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex code
  • No unnecessary console.log or debug code
  • No commented-out code

Documentation

  • Documentation updated (if needed)
  • API documentation updated (if applicable)
  • CHANGELOG.md updated
  • README updated (if needed)

Testing & Quality

  • All tests pass (cargo test)
  • No linting errors (cargo clippy)
  • Code formatted (cargo fmt)
  • No new warnings introduced
  • Gas benchmarks run (if applicable)

Security

  • Security implications considered
  • No sensitive data exposed
  • Input validation added
  • Authorization checks in place

Git

  • Branch is up to date with main
  • Commits are atomic and well-described
  • Commit messages follow convention
  • No merge conflicts

🔍 Reviewer Notes

[Any specific areas you'd like reviewers to focus on]

📊 Performance Impact

  • No performance impact
  • Performance improved
  • Performance impact acceptable (explain below)

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:

  • I have read and followed the CONTRIBUTING.md guidelines
  • My code follows the project's coding standards
  • I have tested my changes thoroughly
  • I am ready for code review

… 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
@drips-wave

drips-wave Bot commented Mar 24, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@hman38705 hman38705 merged commit f345e67 into solutions-plug:main Mar 24, 2026
1 of 12 checks passed
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.

Lack of TTL protection for non-market governance records

2 participants