-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix SimpleWallet slot allocations (#226)
Fit nonce and owner into the same slot, to save unneeded SLOAD during validation (They used to be in the same slot, and got "unaligned" when added a proxy, since using "Initializeable" uses the first 2 bytes in the storage.
- Loading branch information
1 parent
61f7d28
commit f3b5f79
Showing
2 changed files
with
18 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
== gas estimate of direct calling the account's "execFromEntryPoint" method | ||
the destination is "account.nonce()", which is known to be "hot" address used by this account | ||
it little higher than EOA call: its an exec from entrypoint (or account owner) into account contract, verifying msg.sender and exec to target) | ||
- gas estimate "simple" - 31045 | ||
- gas estimate "big tx 5k" - 127295 | ||
- gas estimate "simple" - 31033 | ||
- gas estimate "big tx 5k" - 127284 | ||
╔════════════════════════════════╤═══════╤═══════════════╤════════════════╤═════════════════════╗ | ||
║ handleOps description │ count │ total gasUsed │ per UserOp gas │ per UserOp overhead ║ | ||
║ │ │ │ (delta for │ (compared to ║ | ||
║ │ │ │ one UserOp) │ account.exec()) ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple │ 1 │ 78018 │ │ ║ | ||
║ simple │ 1 │ 75948 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple - diff from previous │ 2 │ │ 43447 │ 12402 ║ | ||
║ simple - diff from previous │ 2 │ │ 41449 │ 10416 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple │ 10 │ 469609 │ │ ║ | ||
║ simple │ 10 │ 449053 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple - diff from previous │ 11 │ │ 43630 │ 12585 ║ | ||
║ simple - diff from previous │ 11 │ │ 41560 │ 10527 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster │ 1 │ 84303 │ │ ║ | ||
║ simple paymaster │ 1 │ 82245 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster with diff │ 2 │ │ 42490 │ 11445 ║ | ||
║ simple paymaster with diff │ 2 │ │ 40408 │ 9375 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster │ 10 │ 466934 │ │ ║ | ||
║ simple paymaster │ 10 │ 446306 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster with diff │ 11 │ │ 42602 │ 11557 ║ | ||
║ simple paymaster with diff │ 11 │ │ 40604 │ 9571 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx 5k │ 1 │ 179739 │ │ ║ | ||
║ big tx 5k │ 1 │ 177693 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx - diff from previous │ 2 │ │ 144794 │ 17499 ║ | ||
║ big tx - diff from previous │ 2 │ │ 142772 │ 15488 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx 5k │ 10 │ 1488695 │ │ ║ | ||
║ big tx 5k │ 10 │ 1468115 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx - diff from previous │ 11 │ │ 146324 │ 19029 ║ | ||
║ big tx - diff from previous │ 11 │ │ 144290 │ 17006 ║ | ||
╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝ | ||
|
f3b5f79
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 any better