-
Notifications
You must be signed in to change notification settings - Fork 808
Open
Description
Subject: Issue with EntryPoint v0.8 Regarding validUntil/validAfter and EIP-712
EntryPoint v0.8 introduces many improvements, but it also presents an issue that compromises the elegance of the overall process:
- Version 0.8 incorporates EIP-712 (via AA-508), which is beneficial for signature security.
- AA-508 functions well when
validUntilandvalidAfterare not used. However, when users attempt to set these parameters,PackedUserOperationlacks dedicated fields for transaction validity. This forces users to embedvalidUntilandvalidAfterwithin thePackedUserOperation.signaturefield. To ensure the legitimacy of these user-set values, they must also be included in the raw data signed for thePackedUserOperation, thereby negating the optimization benefits of AA-508.
Proposed Solutions:
-
No Action:
- If setting
validUntilandvalidAfteris considered an extremely rare requirement, this issue could be left unresolved. (Personally, I disagree with this assumption, as I believe allowing users to set a default transaction validity period enhances security.)
- If setting
-
Delegate to Wallet Teams for Resolution:
- Wallets, when needing
validUntilandvalidAfter, would no longer use theuserOpHashprovided by EntryPoint. Instead, they would use a customuserOpHashderived from a modifiedPackedUserOperationstructure: -
struct PackedUserOperation { address sender; uint256 nonce; bytes initCode; bytes callData; bytes32 accountGasLimits; uint256 preVerificationGas; bytes32 gasFees; bytes paymasterAndData; uint48 validUntil; // <---- new uint48 validAfter; // <---- new }
- This is the update our wallet application plans to implement during its migration to v0.8 (ref).
- Wallets, when needing
-
Resolve in EntryPoint v0.9:
- EntryPoint could modify the
PackedUserOperationdefinition to include dedicated fields such asuint48 validUntilanduint48 validAfter, or a combineduint96 validTimeRange. While this would indeed increase on-chain calldata size, I believe the enhanced elegance and security of the protocol would justify this additional data.
- EntryPoint could modify the
*(Of course, any custom data can be set via custom callData, but this approach is not user-friendly — users won’t be able to intuitively see the validTimeRange when signing via TypedData.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels