-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Add Governor signature nonces #4378
Add Governor signature nonces #4378
Conversation
🦋 Changeset detectedLatest commit: 2ae0a13 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
To remove the initcode size warning that is causing the upgradeable tests to fail, we have to update the 'contracts-exposed/**/*': {
'code-size': 'off',
+ 'initcode-size': 'off',
}, |
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
@SocketSecurity ignore hardhat-ignore-warnings@0.2.9 |
CI is failing because the storage layout became incompatible by the addition of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very small comments about formating.
What I'm worried about is not the code, its the "breaking the voteBySig" without params.
The params part I don't really worry about, but the the without params might be breaking tally. Do we have info on that ?
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
We asked to Tally yesterday and they don't seem to have any major concerns 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments and side notes.
@@ -519,17 +523,23 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive | |||
function castVoteBySig( | |||
uint256 proposalId, | |||
uint8 support, | |||
address voter, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is changing the ERC-165 ids, i.e. removing the previously supported interfaces (correctly) and adding new ones. However, we've discussed before that ERC-165 is not a good fit for this contract so we should really think whether we want to continue using it and particularly adding new interfaces.
No need to change anything on this PR, but it is an unsolved question we need to address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is relevant to #4360
uint8 v, | ||
bytes32 r, | ||
bytes32 s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we are changing the signature of the castVoteBySig
functions, what do you think about changing these arguments to bytes signature
and using the opportunity to add EIP-1271 compatibility?
I don't think we should do this here so it's not a blocker for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also aligns really well with the addition of the voter
argument, which is needed for EIP-1271.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to what we discussed, I'll add the signature changes and 1271 compatibility in a follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
+1 to frangio idea of changing the signature type and enabling ERC1271 in a followup PR.
Co-authored-by: Francisco <fg@frang.io>
Co-authored-by: Ernesto García <ernestognw@gmail.com> Co-authored-by: Francisco <fg@frang.io>
Co-authored-by: Ernesto García <ernestognw@gmail.com> Co-authored-by: Francisco <fg@frang.io>
Co-authored-by: Francisco <fg@frang.io>
…OpenZeppelin#4346) Co-authored-by: Francisco <fg@frang.io>
Fixes LIB-895
This PR adds
nonce
andvoter
arguments to governor vote casting signatures with the following objectives:PR Checklist
npx changeset add
)