Skip to content

Commit

Permalink
AA-222 add delegateAndRevert helper, to simulate code execution from …
Browse files Browse the repository at this point in the history
…entryPoint. (eth-infinitism#365)

Minimal "static" call from EntryPoint to simulate special cases. Equivalent to the EntryPointSimulations in purpose, but doesn't require stateOverride.
Executes code on behalf of entryPoint using delegateCall, and revert with the result
  • Loading branch information
drortirosh committed Jan 7, 2024
1 parent 38d8a15 commit 4063d81
Showing 1 changed file with 14 additions and 30 deletions.
44 changes: 14 additions & 30 deletions reports/gas-checker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,38 @@
the destination is "account.entryPoint()", 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" │ 28979
║ gas estimate "simple" │ 29014
╟──────────────────────────┼────────╢
║ gas estimate "big tx 5k" │ 125224
║ gas estimate "big tx 5k" │ 125260
╚══════════════════════════╧════════╝

╔════════════════════════════════╤═══════╤═══════════════╤════════════════╤═════════════════════╗
║ handleOps description │ count │ total gasUsed │ per UserOp gas │ per UserOp overhead ║
║ │ │ │ (delta for │ (compared to ║
║ │ │ │ one UserOp) │ account.exec()) ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple │ 1 │ 81570 │ │ ║
║ simple │ 1 │ 81930 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple - diff from previous │ 2 │ │ 4384214863
║ simple - diff from previous │ 2 │ │ 4418715173
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple │ 10 │ 476227 │ │ ║
║ simple │ 10 │ 479742 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple - diff from previous │ 11 │ │ 4387314894
║ simple - diff from previous │ 11 │ │ 4424715233
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster │ 1 │ 87750 │ │ ║
║ simple paymaster │ 1 │ 88187 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster with diff │ 2 │ │ 4271613737
║ simple paymaster with diff │ 2 │ │ 4311414100
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster │ 10 │ 472423 │ │ ║
║ simple paymaster │ 10 │ 476706 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster with diff │ 11 │ │ 4278113802
║ simple paymaster with diff │ 11 │ │ 4317314159
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx 5k │ 1 │ 182627 │ │ ║
║ big tx 5k │ 1 │ 182987 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx - diff from previous │ 2 │ │ 14434119117
║ big tx - diff from previous │ 2 │ │ 14469819438
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx 5k │ 10 │ 1481819 │ │ ║
║ big tx 5k │ 10 │ 1485386 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx - diff from previous │ 11 │ │ 144445 │ 19221 ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp │ 1 │ 89483 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp with diff │ 2 │ │ 44463 │ 15484 ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp │ 10 │ 489783 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp with diff │ 11 │ │ 44508 │ 15529 ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ token paymaster │ 1 │ 147976 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ token paymaster with diff │ 2 │ │ 72659 │ 43680 ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ token paymaster │ 10 │ 802242 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ token paymaster with diff │ 11 │ │ 72727 │ 43748 ║
║ big tx - diff from previous │ 11 │ │ 144759 │ 19499 ║
╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝

0 comments on commit 4063d81

Please sign in to comment.