-
Notifications
You must be signed in to change notification settings - Fork 16
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 SignatureValidatorManager contract #109
Conversation
… feature-108-add-signature-validator
Pull Request Test Coverage Report for Build 6638718888
💛 - Coveralls |
03e0dd8
to
a3cfa0a
Compare
…atureValidator, Update natspec doc
Do I understand correctly that it was done to get around the bytecode size limit? |
yes. We need a separate |
Wouldn't we need a separate manager for each module type, then? 😄 |
yes, ideally we do. this is a step towards it. But the reason for
We can possibly have a separate But then all of them will have a separate storage for registry address adding the overhead to make sure that all refer to appropriate registry. In the protocol implementation we already have separate contracts for hooks manager, function handler manager. Which are inherited by |
Actually, chainId can be part of |
881478b
to
751288a
Compare
…sh for default valdiation
751288a
to
b68147f
Compare
Co-authored-by: Nicholas Rodrigues Lordello <[email protected]>
dfb0e0c
to
01928fe
Compare
Fixes #108
Changes in PR:
ISafeProtocolSignatureValidatorManager
,ISafeProtocolSignatureValidator
, andISafeProtocolSignatureValidatorHooks
SignatureValidator
=16
SignatureValidatorHooks
=8
SignatureValidatorManager
supports two validation flows:- default flow which depends on account implementation
- Domain specific flow
Above two flows are differentiated based on 4 bytes of signature selector value
bytes
for signature validationISafeAccount
interface as this is required in the default validation flowTo be addressed:
handle(...)
inSafeProtocolValdiatorManager
be a view function?@akshay-ap Preference: No, because validation hooks could be state changing
@akshay-ap Preference: Yes, because if this is not considered, any signed arbitrary signed message would be approved by the Safe account.
SignatureValidatorManager
inherits RegistryManager, meaning it has its own storage for registry address for looking up listed and non-flagged contracts. This can lead to state drift in Manager's registry address and SignatureValidatorManager's registry address.How to address this? -
a. a contract that updates registry address of both
SignatureValidatorManager
andSafeProtocolManager
in the same transaction to the same address valueb. Both the contract refer to a fixed address that stores the latest registry address (additional gas overhead in every tx, not preferred)
c. No need to handle this for now. Not that critical
Notes about current implementation:
SignatureValidatorManager
.