Skip to content

fix: prevent redundant upgrade governance collisions#300

Merged
hman38705 merged 3 commits into
solutions-plug:mainfrom
dreamgene:fix/150-prevent-upgrade-governance-collisions
Mar 26, 2026
Merged

fix: prevent redundant upgrade governance collisions#300
hman38705 merged 3 commits into
solutions-plug:mainfrom
dreamgene:fix/150-prevent-upgrade-governance-collisions

Conversation

@dreamgene

Copy link
Copy Markdown
Contributor

Closes #150

Summary

  • block re-initiating the same WASM hash while that hash is already the pending upgrade
  • add a 7-day cooldown for hashes that were rejected when the timelock elapsed without enough votes to execute
  • clear the cooldown entry if that same hash is eventually executed successfully

Testing

  • cargo fmt --all
  • cargo test -p predict-iq (currently blocked by unrelated pre-existing compile failures in other modules, including duplicate contract exports in lib.rs and mismatched types/imports in bets.rs, fees.rs, and voting.rs)

Notes

  • this change preserves the current single global pending-upgrade model: different hashes are still blocked while any upgrade is pending
  • rejection is recorded when execute_upgrade is attempted after timelock but fails majority requirements

@drips-wave

drips-wave Bot commented Mar 26, 2026

Copy link
Copy Markdown

@dreamgene 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 8ea74a6 into solutions-plug:main Mar 26, 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.

Prevent Redundant Upgrade Governance Collisions

2 participants