v0.7.0
版本发布时间: 2024-02-23 01:47:34
eth-infinitism/account-abstraction最新发布版本:v0.7.0(2024-02-23 01:47:34)
ERC-4337 Version 0.7.0
Contract changes:
- Simulation functions removed from deployed EntryPoint. The simulation methods are meant for off-chain usage, and always revert on-chain. They’re meant to be used only by bundlers. Due to their limited usability, we moved them to a different contract and allowed bundlers to use different methods (e.g. state overrides parameter in eth_call) to simulate the transactions.
-
Added
delegateAndRevert()
helper in EntryPoint to accommodate nodes without state overrides in eth_call and eth_estimateGas This allows validation and gas estimation on networks without “state overrides” parameter - Added ERC-165 "supportsInterface" to the EntryPoint.
- Added a sample TokenPaymaster.
- Added a 10% penalty charge for unused execution gas limit. This change is meant to prevent apps from putting transactions with unnecessarily high gas limits, thereby causing the bundler to pack fewer operations into a bundle, losing potential gain. See a more detailed discussion here.
- Removed paymaster’s second call to postOp. The second call to paymaster’s postOp function was deprecated as it wasn’t necessary anymore, and now officially removed. Now postOp() is called just once. If it reverts, the account’s callData also reverts, but the paymaster still pays for the cost of the execution.
- Added validatePaymasterUserOp and postOp gas limits. These gas limits help both the client to better estimate gas for the user operation, and prevent potential security issues.
- Added “gasPrice” parameter to paymaster’s postOp This parameter simplifies the work for a token paymaster, to calculate the charge in different currencies..
- Separated offchain UserOperation and packed UserOperation onchain struct. To save calldata when calling without a paymaster and to accommodate the new gas limits added to the onchain struct, we decoupled onchain representation of a UserOperation from the offchain one, similar to the initial eth_sendTransaction rpc request and the eventual encoded transaction that’s put onchain. This also aligns the structure of ERC-4337 and the future native EIP-7560
- Removed deprecated DepositPaymaster.
- Removed obsolete gnosis safe modules implementation as it was added here.
-
Added a new optional account contract api method
executeUserOp()
. This addition allows the account to get the full user operation on execution, instead of the original execution, where the account is called directly with the user operation calldata, without having access to the UserOperation metadata during execution phase. - Minor bug fixes
- EntryPoint better OOG revert handling in userOp execution.
- Various small fixes in the sample contracts
- Minor gas optimizations
ERC changes:
-
Separated validation rules into its own separate doc, instead of having a section in the EIP, clearly marking each validation rule <RULE_TYPE>-<RULE_NUMBER>. where RULE_TYPE is one of: OP - opcode rules COD - code rules STO - storage rules SREP - staked entity reputation rules UREP - unstaked entity reputation rules EREP - entity-specific reputation rules ALT - alternative mempools rules
-
Validation rules changes from 0.6.0: OP-013 Banning unassigned opcodes to prevent future vulnerabilities via new opcodes. OP-051 Allow calling
EXTCODESIZE ISZERO
to allow callingdepositTo()
. OP-054 Forbidding calls to EntryPoint besidesdepositTo()
. STO-033 Allowing staked entity reading storage on non-entity contracts. This relaxation simplifies and extends the usability of paymasters. EREP-020 Staked factory is accountable for account breaking validation rules. UREP-* Unstaked reputation rules. These rules prevent unstaked paymasters from invalidating many user operations at once. ALT-* Alt mempools/canonical mempool interactions rules. OP-070 Transient storage rules.