* AA-159 prevent recursive call into handleOps
* added BeforeExecution event
without this event, all events in validation are attributed to the first UserOperation.
We can't attribute them to specific UseROp (unless there is exactly one) - but at least not always assign the to the first.
* Inconsistent userOpHash
As reported in #237, userOpHash might be manipulated by a caller.
While this is not a security vulnerability of any other account, it does
cause inconsistency in the output of external tools such as block explorers.
It might also cause applications that rely on the userOpHash uniqueness to fail
* use UserOp.hash()
* PR comments
Change the base for "gascheck"
This is not a change in the contracts, but in the scripts to calculate the gas usage.
The default sample call now calls entryPoint() in the account, which returns a constant (entrypoint) instead of a variable (nonce)
The 2000 extra gas overhead seen results/gas-checker.txt in gas is actually a fix of a mistake: previously, accessing the "nonce" field was attributed to the "exec" call (because we called "nonce()"). Now it is rightfully attributed to the validation, not execution.
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.
The "paymaster" parameter is not needed in FailedOp:
- reason code starts with "AA3x" to signify this is an error about a
paymaster
- the paymaster address can be extracted from the UserOperation itself.
- FailedOp can be caused by other entities too, such as factory (for
errors starting with "AA1x" or account itself ("AA2x")
* validateUserOp no longer receives an "aggregator" parameter.
* instead, validateUserOp returns "validationData" which includes aggregator, validAfter, validFrom
* helpers packValidationData, unpackValidationData can be used to pack and unpack this structure.
* removed IAggregatedAccount interface, as getAggregator is no longer needed.
* moved all validateSignatures calls to the beginning of the handleAggregatedOps, before any mutable calls of wallets or paymasters
* AA-128 L-09: document getBlsPublicKey
remove confusing reference to non-existent (and non-standard) method
getAggregationInfo()
give "getBlsPublicKey" as an example.
add missing require message.
Note that account's addDeposit() now calls the paymaster's depositTo()
explicitly, instead of relying on the EntryPoint's receive() fallback
method.