Repository navigation
fix(contracts): a pause ends at pauseDeadline - #3008
Merged
Merged
Conversation
`SunsettingPausable` overrides `paused()` to return false once `block.timestamp > pauseDeadline`, the same comparison `pause()` uses. Every `whenNotPaused` / `whenPaused` gate in CapacityBond, FeeRouter and PaymentPool reads it, so a pause in force at the deadline cannot outlive the sunset. Past the deadline `unpause()` reverts `ExpectedPause`, since the contract already reads unpaused. ADR 009 and ADR 016 state that the sunset also ends a pause in force. Refs #2768 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code coverage overviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-cov
View coverage of the 2 most impacted files.
Solidity / code-coverage/forge
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Gas snapshotNo gas changes vs base. |
…sunset-99b73f # Conflicts: # contracts/.gas-snapshot
1 task
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.
Refs #2768 (§3).
SunsettingPausablegated only entering a pause:pause()reverts afterpauseDeadline, butpaused()had no override, so a pause in force at the deadline held forever.Change
SunsettingPausable.paused()returns false onceblock.timestamp > pauseDeadline(the comparisonpause()already uses). OZ_requireNotPaused/_requirePausedreadpaused(), so everywhenNotPaused/whenPausedgate in CapacityBond, FeeRouter and PaymentPool follows the sunset with no per-contract change.unpause()revertsExpectedPause, because the contract already reads unpaused. The stale storage flag has no effect, so no state is trapped.paused()now readspauseDeadline).Tests (
SunsettingPausable.t.sol)EnforcedPausepaused()is false, thewhenNotPausedcall succeeds, thewhenPausedcall revertsExpectedPauseunpause()after the deadline revertsExpectedPauseand the contract stays unpausedStatus of #2768
§2 is fixed by #2833. §1 (
slashblocked while unbond runs during a pause) concerns slashing, which is retired by #2917 / #2938, so it looks moot; left for a maintainer to confirm before closing the issue.Verification
forge fmt --check && FOUNDRY_PROFILE=ci forge build --sizes --deny warnings && forge test(645 pass)slither . --config-file slither.config.json(exit 0; only the lowtimestampnote, same as_requirePauseWindowOpen)FOUNDRY_PROFILE=ci forge snapshot --snap .gas-snapshotpaused()/pauseDeadline.🤖 Generated with Claude Code