-
Notifications
You must be signed in to change notification settings - Fork 742
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
validUntil
andvalidAfter
are not used. However, when users attempt to set these parameters,PackedUserOperation
lacks dedicated fields for transaction validity. This forces users to embedvalidUntil
andvalidAfter
within thePackedUserOperation.signature
field. 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
validUntil
andvalidAfter
is 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
validUntil
andvalidAfter
, would no longer use theuserOpHash
provided by EntryPoint. Instead, they would use a customuserOpHash
derived from a modifiedPackedUserOperation
structure: -
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
PackedUserOperation
definition to include dedicated fields such asuint48 validUntil
anduint48 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.)
Metadata
Metadata
Assignees
Labels
No labels