-
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
feat: deferred install gas benchmarks #188
Conversation
Summary by OctaneNew ContractsNo new contracts were added in this PR. Updated Contracts
🔗 Commit Hash: 469cc79 |
OverviewOctane AI analysis has finished. No vulnerabilities were found. Cheers! 🎉🎉🎉 🔗 Commit Hash: 1467bb5 |
Contract sizes: | Contract | Size (B) | Margin (B) |
|------------------------------|----------|------------|
| AccountFactory | 4,169 | 20,407 |
| AllowlistModule | 5,817 | 18,759 |
| ERC20TokenLimitModule | 4,138 | 20,438 |
| ModularAccount | 25,983 | -1,407 |
| SemiModularAccount | 26,487 | -1,911 |
| SingleSignerValidationModule | 3,444 | 21,132 |
| TimeRangeModule | 1,870 | 22,706 |
| TokenReceiverModule | 2,189 | 22,387 | Code coverage:
|
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! Had some comments.
68dffc5
to
50b7c06
Compare
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! Just some small style nits
|
||
import {ValidationConfig, ValidationConfigLib} from "../../src/libraries/ValidationConfigLib.sol"; | ||
import {SingleSignerValidationModule} from "../../src/modules/validation/SingleSignerValidationModule.sol"; | ||
|
||
import {ModuleSignatureUtils} from "../../test/utils/ModuleSignatureUtils.sol"; | ||
import {BenchmarkBase} from "..//BenchmarkBase.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.
nit: forge fmt
likes to randomly insert newlines when sorting imports, could we remove these? The fmt checker passes after removing these lines.
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! Wonder why the formatter does that..
@@ -3,10 +3,12 @@ pragma solidity ^0.8.26; | |||
|
|||
import {PackedUserOperation} from "@eth-infinitism/account-abstraction/interfaces/PackedUserOperation.sol"; | |||
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.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.
also here
import {PackedUserOperation} from "@eth-infinitism/account-abstraction/interfaces/PackedUserOperation.sol"; | ||
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; | ||
|
||
import {ModuleEntity, ModuleEntityLib} from "../../src/libraries/ModuleEntityLib.sol"; | ||
import {ValidationConfig, ValidationConfigLib} from "../../src/libraries/ValidationConfigLib.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.
and here
Co-authored-by: Adam Egyed <[email protected]>
1467bb5
to
e5850ff
Compare
Motivation
Installing deferred validations will likely be a fairly high volume action. Benchmarking gas use for a simple case deferred validation grants us insights into gas consumption for this pretty common action.
Solution
Simply copy and lightly modify the standard test file (
DeferredValidation.t.sol
) internal functions for deferred validation into the base benchmark gas contract (ModularAccountBenchmarkBase.sol
.Then, add the gas tests for deferred validation for both the standard MA and the SMA with bytecode.