Repository navigation
refacto(parallelizer): split togglePause into pause and unpause - #25
Merged
FabienCoutant merged 3 commits intoMay 27, 2026
Merged
FabienCoutant merged 3 commits into
FabienCoutant merged 3 commits into
Conversation
added 3 commits
May 27, 2026 14:10
The audit/eip3009-hotfix-fees branch grew the Storage struct (Surplus fields) past the point where Yul can route stack variables through EVM stack slots in a few code paths, surfacing as "Variable size is 1 too deep in the stack" during compilation. Disabling via_ir at the default profile sidesteps the issue across the whole compilation graph. The dev and ci profiles already had via_ir = false, so this only changes the unprofiled forge invocation (the one CI and most local runs use).
- SECONDS_PER_YEAR (= 365 days) replaces the hardcoded 31_536_000 literal in Savings.estimatedAPY(). - AlreadyPaused / NotPaused errors enable explicit pause/unpause flows that revert on no-op governance calls instead of silently toggling.
Mirrors the Savings refactor from this branch on the per-collateral governance pause exposed by SettersGuardian. The `togglePause(collateral, action)` entry point flipped the live flag without checking the current state, so a misclicked governance call could silently invert the pause status of a critical action — the only audit signal was the emitted event. Changes: - LibSetters: new `pause(collateral, action)` and `unpause(collateral, action)` internals share a private `_setPauseState` helper. Both revert with `AlreadyPaused` / `NotPaused` on no-op transitions; the existing `PauseToggled` event is preserved for backward compatibility with indexers. - SettersGuardian: replaces the external `togglePause` with `pause` and `unpause`. - ISettersGuardian: interface updated accordingly. - DiamondInitializer / Test config: previous `togglePause` calls enabled mint/burn/redeem at deploy time, so they map cleanly to `unpause` (set the live flag from 0 to 1). - Selector wiring: `tests/utils/ConfigAccessManager.sol` and `scripts/SetParallelizerRoles.s.sol` updated to register both new selectors under the guardian role. - Generated dummy diamond implementations regenerated with the new signatures. - Tests updated to use the new API. The two no-op double-toggles in Redeem.t.sol that relied on legacy toggle semantics are kept as a pause+unpause sequence so they're now explicit about being a no-op.
FabienCoutant
merged commit May 27, 2026
a1204e1
into
feat/savings-donation-and-pause-refactor
4 checks passed
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.
Scope
Feature branch to be aggregated into
feat/savings-donation-and-pause-refactor(the code intended for audit).Changes
refacto(parallelizer): split the Parallelizer'stogglePause(collateral, ActionType)into explicitpause/unpause.refacto(utils): add theSECONDS_PER_YEARconstant and theAlreadyPaused/NotPausederrors.chore(foundry): defaultvia_ir = false.Tests
forge buildOK, Setters suite green (99 tests) on the branch rebased ontodev.🤖 Generated with Claude Code