-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: modify spec to leave arbitrary data params open-ended #170
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.
Thanks for the misc cleanup too!
standard/ERCs/erc-6900.md
Outdated
/// Flags: 1 byte | ||
type ValidationConfig is bytes25; | ||
|
||
type HookConfig is bytes26; | ||
/// A packed representation of a hook function and its associated flags. | ||
/// Consists of the following, left-aligned: | ||
/// Module address: 20 bytes | ||
/// Entity ID: 4 bytes | ||
/// Flags: 1 byte |
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.
I think it's worth putting the flags encoding here, too. We can probably just copy/paste from the corresponding library files.
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.
Sounds good! I didn't want to bloat it but in hindsight, it doesn't really make sense to just say "flags" without specifying which flags?
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.
Done in e328d58
standard/ERCs/erc-6900.md
Outdated
/// @param moduleInstallData Optional data to be decoded and used by the module to setup initial module data | ||
/// for the modular account. | ||
/// @param manifest the manifest describing functions to install. | ||
/// @param moduleInstallData Optional data to be arbitrarily used by the account to handle the initial execution setup. |
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.
What if we phrase it as "Optional data to be used by the account to handle the initial execution setup. Data encoding is implementation-specific." ? I think "arbitrarily use" has really a connotation of being really lax, and we still want to encourage similar-ish use.
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.
Makes sense! Addressing.
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.
Done in 8f719fd
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.
Looks good!
Motivation
Currently, the spec dictates the encoding of certain arbitrary
bytes
andbytes[]
parameters. However, it may be beneficial to leave the encoding schemes up to individual accounts.This clarifies that accounts have the option to require that these parameters be encoded as they see fit, as long as the behaviour specified in the spec is upheld.
Solution
Mostly, this change just removes a few lines of comments from the spec. I also took the liberty to remove some TODOs which are already complete, and add comments explaining the
HookConfig
andValidationConfig
data types.