-
Notifications
You must be signed in to change notification settings - Fork 34
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: correctly check hooks length in installValidation #243
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.
What's the reason we don't need to enforce this for (non-validation associated) execution hooks again?
We don't have a length field tracking it anywhere, so we don't know how long the existing set of hooks is when we're adding to it. |
fa803f7
to
771b232
Compare
8c8d350
to
e441f28
Compare
771b232
to
b29be70
Compare
Summary by OctaneNew ContractsNo new contracts were added in this PR. Updated Contracts
🔗 Commit Hash: b29be70 |
Contract sizes: | Contract | Size (B) | Margin (B) |
|-------------------------------|----------|------------|
| AccountFactory | 4,814 | 19,762 |
| AllowlistModule | 9,230 | 15,346 |
| ECDSAValidationModule | 3,646 | 20,930 |
-| ModularAccount | 25,574 | -998 |
+| ModularAccount | 25,655 | -1,079 |
| NativeTokenLimitModule | 4,714 | 19,862 |
| PaymasterGuardModule | 1,797 | 22,779 |
-| SemiModularAccountBytecode | 27,562 | -2,986 |
-| SemiModularAccountStorageOnly | 28,080 | -3,504 |
+| SemiModularAccountBytecode | 27,553 | -2,977 |
+| SemiModularAccountStorageOnly | 28,071 | -3,495 |
| TimeRangeModule | 2,000 | 22,576 |
| WebauthnValidationModule | 7,854 | 16,722 | Code coverage:
|
Motivation
We don't actually ever revert with the custom error for exceeding the max hook count because the check addition would overflow before that. The custom error is preferred for visibility into the issue.
Solution
Correctly detect exceeding the length and revert.