You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This updates the canCall rule in fv/specs/AccessManager.spec to account for the special-case handling of IAccessManaged.setAuthority(address) in AccessManager.canCall.
For the setAuthority selector, the contract bypasses normal function-role management: only the ADMIN_ROLE can perform the call, and the effective delay is the maximum of the caller's admin execution delay and the target's admin delay (getTargetAdminDelay). The formal verification spec did not model this and was out of sync with the implementation.
This is a behavior change introduced in #6388 ("Fix bypassing target admin delay using execute") that the FV spec was not updated for.
Changes:
Special-case the setAuthority(address) selector (0x7a9e5e4b), using ADMIN_ROLE as roleId.
Compute currentDelay as max(memberDelay, targetAdminDelay) for setAuthority, matching Math.max(executionDelay, adminDelay) in the contract.
Promote currentDelay to mathint and adjust the delay assertion accordingly.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3f5f76dc-b0cd-48b1-9164-38264e6d6659
📥 Commits
Reviewing files that changed from the base of the PR and between db06a6e and 863c01e.
📒 Files selected for processing (1)
fv/specs/AccessManager.spec
Walkthrough
Updated the canCall rule to detect setAuthority(address) calls, assign them ADMIN_ROLE(), and compute their delay using the maximum of the caller’s role delay and target admin delay. Non-setAuthority calls retain the existing delay logic. Delayed-call validation now compares to_mathint(delay) with the computed delay.
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
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.
This updates the
canCallrule infv/specs/AccessManager.specto account for the special-case handling ofIAccessManaged.setAuthority(address)inAccessManager.canCall.For the
setAuthorityselector, the contract bypasses normal function-role management: only theADMIN_ROLEcan perform the call, and the effective delay is the maximum of the caller's admin execution delay and the target's admin delay (getTargetAdminDelay). The formal verification spec did not model this and was out of sync with the implementation.This is a behavior change introduced in #6388 ("Fix bypassing target admin delay using execute") that the FV spec was not updated for.
Changes:
setAuthority(address)selector (0x7a9e5e4b), usingADMIN_ROLEasroleId.currentDelayasmax(memberDelay, targetAdminDelay)forsetAuthority, matchingMath.max(executionDelay, adminDelay)in the contract.currentDelaytomathintand adjust the delay assertion accordingly.Spec-only change; no changeset needed.
Link to certora run for the updated specs: https://prover.certora.com/output/71959/8f88b37ebae64e8e829d206bb0c123d7?anonymousKey=53a555805307674afbfb1afea80bf5fa2a0a3378