Skip to content

fix(contracts): a pause ends at pauseDeadline - #3008

Merged
alpergundogdu merged 2 commits into
mainfrom
claude/2768-pause-sunset-99b73f
Nov 27, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
claude/2768-pause-sunset-99b73f

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Refs #2768 (§3).

SunsettingPausable gated only entering a pause: pause() reverts after pauseDeadline, but paused() had no override, so a pause in force at the deadline held forever.

Change

  • SunsettingPausable.paused() returns false once block.timestamp > pauseDeadline (the comparison pause() already uses). OZ _requireNotPaused / _requirePaused read paused(), so every whenNotPaused / whenPaused gate in CapacityBond, FeeRouter and PaymentPool follows the sunset with no per-contract change.
  • Past the deadline unpause() reverts ExpectedPause, because the contract already reads unpaused. The stale storage flag has no effect, so no state is trapped.
  • NatSpec, ADR 009 § Emergency Multisig and ADR 016 § Emergency Multisig state that the sunset also ends a pause in force.
  • Gas snapshot regenerated (paused() now reads pauseDeadline).

Tests (SunsettingPausable.t.sol)

  • pause one second before the deadline: still paused at the deadline, gated call reverts EnforcedPause
  • warp past the deadline: paused() is false, the whenNotPaused call succeeds, the whenPaused call reverts ExpectedPause
  • unpause() after the deadline reverts ExpectedPause and the contract stays unpaused

Status of #2768

§2 is fixed by #2833. §1 (slash blocked 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 low timestamp note, same as _requirePauseWindowOpen)
  • FOUNDRY_PROFILE=ci forge snapshot --snap .gas-snapshot
  • No Rust binding or e2e reads paused() / pauseDeadline.

🤖 Generated with Claude Code

`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]>
@github-code-quality

github-code-quality Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Rust, Solidity

Rust / code-coverage/cargo-llvm-cov

main 4c4801f claude/2768-pause-su... c8c6843 +/-
78% 78% 0%
View coverage of the 2 most impacted files.
File main 4c4801f claude/2768-pause-su... c8c6843 +/-
crates/node/src...s/client/mod.rs 89% 89% 0%
crates/e2e/src/ports.rs 84% 85% +1%

Solidity / code-coverage/forge

main f1706d8 claude/2768-pause-su... c8c6843 +/-
93% 93% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 26, 2026 18:08 UTC

@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

…sunset-99b73f

# Conflicts:
#	contracts/.gas-snapshot
@alpergundogdu
alpergundogdu merged commit 3750aff into main Nov 27, 2026
36 checks passed
@alpergundogdu
alpergundogdu deleted the claude/2768-pause-sunset-99b73f branch November 27, 2026 10:05
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.

1 participant