Skip to content

Commit

Permalink
Merge d3ad25e into 8915c39
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat authored Nov 12, 2024
2 parents 8915c39 + d3ad25e commit ef746aa
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions EIPS/eip-7701.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ The contract that has a role in an Account Abstraction transaction, either as a
has to contain all necessary sections marked with one of the following `entry_point_role` markers:

```
role_sender_execution = 0x00000000
role_sender_deployment = 0x00000001
role_sender_validation = 0x00000002
role_paymaster_validation = 0x00000003
role_paymaster_post_tx = 0x00000004
role_none = 0x0000
role_sender_execution = 0x0001
role_sender_deployment = 0x0002
role_sender_validation = 0x00003
role_paymaster_validation = 0x0004
role_paymaster_post_tx = 0x0005
```

This section is equivalent to a code section.
Expand All @@ -109,6 +110,15 @@ If it is the first code section of a contract, it can act as an entry point duri
Only a single section per role is allowed in a contract.
This rule is validated during contract creation.

### Context variable for the `entry_point_role` value

During the execution of the `Sender`, `Paymaster` or a `Deployer` code as defined by the `AA_TX_TYPE` transaction,
the global `entry_point_role` variable is set to the corresponding role.
The `entry_point_role` remains set through an uninterrupted chain of `DELEGATECALL`/`EXTDELEGATECALL` calls.

The default value for `entry_point_role` is `role_none`. Call frames initiated with any opcodes other than
`DELEGATECALL`/`EXTDELEGATECALL` run with the default role.

### Execution entry point for Account Abstraction transaction type participant entity (Sender, Paymaster and Deployer)

During a regular contract code execution, its behaviour is defined as follows by EIP-3540:
Expand All @@ -118,10 +128,16 @@ Execution starts at the first byte of code section 0, and pc is set to 0
```

However, if a contract is referenced in an `AA_TX_TYPE` transaction as a `Sender`, `Paymaster` or a `Deployer`,
execution starts at the first byte of code section with the `entry_point_role` marker corresponding to the current step,
execution starts at the first byte of code section with the current `entry_point_role` variable value,
and `pc` is set to `0`.

If the specified contract does not contain such a section, or is not an EOF contract, the transaction is not valid.
If the specified contract does not contain such a section, or is not an EOF contract,
execution starts at code section 0, and pc is set to 0.

The transaction is considered invalid if it never reached a code section corresponding to the current `entry_point_role`
in any contract called through an uninterrupted chain of `DELEGATECALL`/`EXTDELEGATECALL` calls.

The transaction is considered invalid if it reached such a code section but did not perform [TBD: EXPLICIT ACCEPTANCE](#acceptance).

The `target_section_flags` parameter is added to provide signaling into the EVM so that EOF can perform some additional
validations as part of EOF code validation.
Expand Down

0 comments on commit ef746aa

Please sign in to comment.