mirror of
https://github.com/getwax/zk-account-abstraction.git
synced 2026-01-09 20:47:58 -05:00
AA-140 N-09: Stake size inconsistency [core] (#209)
* AA-140 N-09: Stake size inconsistency [core] --------- Co-authored-by: shahafn <shahaflol@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ abstract contract StakeManager is IStakeManager {
|
||||
require(_unstakeDelaySec >= info.unstakeDelaySec, "cannot decrease unstake time");
|
||||
uint256 stake = info.stake + msg.value;
|
||||
require(stake > 0, "no stake specified");
|
||||
require(stake < type(uint112).max, "stake overflow");
|
||||
require(stake <= type(uint112).max, "stake overflow");
|
||||
deposits[msg.sender] = DepositInfo(
|
||||
info.deposit,
|
||||
true,
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
== 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" - 31033
|
||||
- gas estimate "simple" - 31045
|
||||
- gas estimate "big tx 5k" - 127295
|
||||
╔════════════════════════════════╤═══════╤═══════════════╤════════════════╤═════════════════════╗
|
||||
║ handleOps description │ count │ total gasUsed │ per UserOp gas │ per UserOp overhead ║
|
||||
║ │ │ │ (delta for │ (compared to ║
|
||||
║ │ │ │ one UserOp) │ account.exec()) ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple │ 1 │ 78087 │ │ ║
|
||||
║ simple │ 1 │ 78111 │ │ ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple - diff from previous │ 2 │ │ 43549 │ 12516 ║
|
||||
║ simple - diff from previous │ 2 │ │ 43573 │ 12528 ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple │ 10 │ 470485 │ │ ║
|
||||
║ simple │ 10 │ 470509 │ │ ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple - diff from previous │ 11 │ │ 43720 │ 12687 ║
|
||||
║ simple - diff from previous │ 11 │ │ 43732 │ 12687 ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple paymaster │ 1 │ 84411 │ │ ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple paymaster with diff │ 2 │ │ 42598 │ 11565 ║
|
||||
║ simple paymaster with diff │ 2 │ │ 42550 │ 11505 ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple paymaster │ 10 │ 467918 │ │ ║
|
||||
║ simple paymaster │ 10 │ 467966 │ │ ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ simple paymaster with diff │ 11 │ │ 42770 │ 11737 ║
|
||||
║ simple paymaster with diff │ 11 │ │ 42758 │ 11713 ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ big tx 5k │ 1 │ 179846 │ │ ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
@@ -30,6 +30,6 @@
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ big tx 5k │ 10 │ 1489653 │ │ ║
|
||||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
|
||||
║ big tx - diff from previous │ 11 │ │ 146391 │ 19096 ║
|
||||
║ big tx - diff from previous │ 11 │ │ 146379 │ 19084 ║
|
||||
╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝
|
||||
|
||||
|
||||
Reference in New Issue
Block a user