-
Notifications
You must be signed in to change notification settings - Fork 351
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
fix: signature utils #1015
base: slashing-magnitudes-fixes
Are you sure you want to change the base?
fix: signature utils #1015
Conversation
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.
Can we sanity check that the domain separator of the DM/RC/AVSD is based on the proxy and not the implementation
Oops, forgot that. Will do. |
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.
Comments regarding version number
@@ -0,0 +1,20 @@ | |||
#!/bin/bash |
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 should be handled via Zeus, we should coordinate with Justin to add this as a parameter that the deploy scripts can use
@@ -139,4 +139,8 @@ contract AVSDirectory is | |||
keccak256(abi.encode(OPERATOR_AVS_REGISTRATION_TYPEHASH, operator, avs, salt, expiry)) | |||
); | |||
} | |||
|
|||
function version() public pure override(ISignatureUtils, SignatureUtils) returns (string memory) { | |||
return "1.0.3"; |
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.
Why not set version as a constructor parameter so Zeus scripts can handle it?
@@ -1011,4 +1011,8 @@ contract DelegationManager is | |||
) | |||
); | |||
} | |||
|
|||
function version() public pure override(ISignatureUtils, SignatureUtils) returns (string memory) { | |||
return "1.0.3"; |
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.
Per EIP-712 spec, version is simply the major version number (not minor + patch). We should follow this and keep it "1" on all environments.
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator
string version the current major version of the signing domain. Signatures from different versions are not compatible.
@@ -6,6 +6,7 @@ import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; | |||
|
|||
import "src/contracts/core/RewardsCoordinator.sol"; | |||
import "src/contracts/strategies/StrategyBase.sol"; | |||
import "src/contracts/mixins/SignatureUtils.sol"; |
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.
Extra import?
Changes:
Dynamic Domain Separator:
SignatureUtils.domainSeparator()
is now recomputed for each signature verification. This eliminates the need for storing initial values in storage or as immutables, which is important for beacon proxy support.Version Bump Command: Introduced
make bump-version VERSION=2
, which automatically updates the version function's return values.