fix(SuperchainConfig): extend() must check paused() to prevent re-activating expired pauses - #392
Open
Sertug17 wants to merge 1 commit into
Open
Conversation
…ctivating expired pauses extend() was checking pauseTimestamps[id] == 0 which only catches the never-paused case. An expired pause (timestamp != 0, paused() == false) bypassed this check, allowing the guardian to re-activate it without the required unpause -> pause cycle (Stage 1 Decentralization requirement). Fix: use paused() which returns false for both unpaused and expired. Fixes base#391
Collaborator
🟡 Heimdall Review Status
|
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.
Fixes #391
Problem
extend()checkedpauseTimestamps[_identifier] == 0to detect "not paused", but this only catches the never-paused case. An expired pause haspauseTimestamps != 0whilepaused()returnsfalse, so it silently passed the check and got its timestamp reset — effectively re-pausing the system without the requiredunpause() → pause()cycle.This bypasses the Stage 1 Decentralization requirement explicitly documented in
pause():Fix
paused()returnsfalsefor both never-paused (timestamp == 0) and expired (timestamp != 0 but past PAUSE_EXPIRY), making it the correct guard.Missing test (to be added)