fix: let recovery veto scheduled admin operations - #676
Open
Akinsuyiphilip wants to merge 2 commits into
Open
Conversation
Align the settlement timelock with the seven-day recovery window and reject scheduled execution while recovery is pending, preventing compromised-admin upgrades and transfers from racing past recovery. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@Akinsuyiphilip 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 #501
Summary
Align the settlement administrative timelock with the recovery window and make
pending recovery an emergency veto over scheduled administrative operations.
Problem
Scheduled upgrades and admin transfers previously became executable after
48 hours, while recovery required seven days before it could be executed. A
compromised administrator could therefore schedule a malicious upgrade or
admin transfer and have it execute before the recovery address had a chance to
intervene.
This defeated recovery's intended role as a safeguard against compromised
administrative credentials.
Changes
seven days.
pending.
Security behavior
Once recovery is initiated, pending scheduled administrative operations cannot
execute, including upgrades and admin transfers. This remains true even if the
operation's nominal execution time has elapsed. The operation can only proceed
after the pending recovery is cancelled; if recovery executes, administrative
state changes accordingly and the stale scheduled operation remains blocked by
the recovery state transition.
The seven-day timelock also ensures that, absent an already-pending recovery,
the recovery window is not longer than the delay before a scheduled operation
can execute.
Testing
Added:
recovery_vetoes_scheduled_operation_before_timelock_expiryValidation performed: