Skip to content

Commit

Permalink
apply feedback and clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Jul 26, 2024
1 parent 5fa6848 commit 26c1a70
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion EIPS/eip-7702.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,14 @@ An alternative to adding chain ID could be to sign over the code the address poi

Considering that the delegation from one contract to another contract may cause conflicts and corrupt the storage with a broken contract at the least and a compromised contract at the worst, it is prudent to separate the storage of each delegation in deterministic way.

To this effect, the delegated EOA's storage should be proxied and accessed or written at `keccak256(authority||address)[0:20]`. With this method, if the contract is delegated back to a previous `address`, the EVM will be able to _re-attach_ its old storage.
To this effect, the delegated EOA's storage keys should be proxied (accessed or written) at `keccak256(key||address)`. So essentially we use this key modification for `SLOAD` and `SSTORE` operations for the delegated EOA's orignal key but still writing into EOA storage.

With this method:

* if EOA is delegated to a new address, it (essentially) starts with clean storage
* if the contract is delegated back to a previous `address`, the EVM will be able to _re-attach_ its old storage.

Again for the purpose of [EIP-158](../eip-158.md) cleanup, this storage should be considered attached to the EOA address.

#### In-protocol revocation

Expand Down

0 comments on commit 26c1a70

Please sign in to comment.