Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AccessManager.execute/schedule more conservative when delay is 0 #4644

Merged
merged 5 commits into from
Oct 2, 2023

Conversation

frangio
Copy link
Contributor

@frangio frangio commented Oct 2, 2023

This PR makes the schedule function revert when the caller does not have an enforced delay. Note that this doesn't prevent a situation where a caller is able to schedule a call but later has their delay removed. To make that case more consistent with the normal schedule/execute case, this PR also makes schedule consume an available schedule even when the caller doesn't have a currently enforced delay, and correctly return the corresponding nonce which is important for GovernorTimelockAccess.

Cherry picked from #4613, where tests were adjusted.

(cherry picked from commit 42e8a1a)
@frangio frangio requested review from Amxx and ernestognw October 2, 2023 13:35
@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2023

🦋 Changeset detected

Latest commit: 1872a4e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Amxx
Amxx previously approved these changes Oct 2, 2023
Copy link
Collaborator

@Amxx Amxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ernestognw
ernestognw previously approved these changes Oct 2, 2023
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM + minor comment

@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's major, isn't a patch although we're in pre-release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, wasn't sure what to choose. In theory this is a breaking change, that's why I chose major. I don't think it will make any difference to the release process.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok make sense, also make sure it'll be picked up by the changeset versioning, which I think it will

@frangio frangio enabled auto-merge (squash) October 2, 2023 18:47
ernestognw
ernestognw previously approved these changes Oct 2, 2023
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@frangio
Copy link
Contributor Author

frangio commented Oct 2, 2023

The skip wasn't correctly written.

This was referenced Sep 10, 2024
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.

3 participants