Skip to content

Commit

Permalink
Reorder '_callValidateUserOp' parameters for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Feb 23, 2025
1 parent 68719eb commit 8488a1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
9 changes: 7 additions & 2 deletions contracts/core/EntryPoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuardT
? 0
: requiredPrefund - bal;
}
validationData = _callValidateUserOp(op, opInfo, missingAccountFunds, opIndex);
validationData = _callValidateUserOp(opIndex, op, opInfo, missingAccountFunds);
if (paymaster == address(0)) {
DepositInfo storage senderInfo = deposits[sender];
uint256 deposit = senderInfo.deposit;
Expand All @@ -521,7 +521,12 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuardT

// call sender.validateUserOp()
// handle wrong output size with FailedOp
function _callValidateUserOp(PackedUserOperation calldata op, UserOpInfo memory opInfo, uint256 missingAccountFunds, uint256 opIndex)
function _callValidateUserOp(
uint256 opIndex,
PackedUserOperation calldata op,
UserOpInfo memory opInfo,
uint256 missingAccountFunds
)
internal virtual returns (uint256 validationData) {
uint256 saveFreePtr = getFreePtr();
bytes memory callData = abi.encodeCall(IAccount.validateUserOp, (op, opInfo.userOpHash, missingAccountFunds));
Expand Down
22 changes: 11 additions & 11 deletions reports/gas-checker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,32 @@
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple - diff from previous │ 2 │ │ 41528 │ 12529 ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple │ 10 │ 451398 │ │ ║
║ simple │ 10 │ 451410 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple - diff from previous │ 11 │ │ 4152812529
║ simple - diff from previous │ 11 │ │ 4160012601
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster │ 1 │ 83336 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster with diff │ 2 │ │ 4017211173
║ simple paymaster with diff │ 2 │ │ 4018411185
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster │ 10 │ 445191 │ │ ║
║ simple paymaster │ 10 │ 445167 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ simple paymaster with diff │ 11 │ │ 4021511216
║ simple paymaster with diff │ 11 │ │ 4025111252
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx 5k │ 1 │ 167156 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx - diff from previous │ 2 │ │ 130794 │ 16354 ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx 5k │ 10 │ 1344260 │ │ ║
║ big tx 5k │ 10 │ 1344212 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ big tx - diff from previous │ 11 │ │ 13079316353
║ big tx - diff from previous │ 11 │ │ 13078116341
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp │ 1 │ 84716 │ │ ║
║ paymaster+postOp │ 1 │ 84728 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp with diff │ 2 │ │ 4160012601
║ paymaster+postOp with diff │ 2 │ │ 4158812589
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp │ 10 │ 459152 │ │ ║
║ paymaster+postOp │ 10 │ 459176 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ paymaster+postOp with diff │ 11 │ │ 4164812649
║ paymaster+postOp with diff │ 11 │ │ 4158812589
╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝

0 comments on commit 8488a1a

Please sign in to comment.