Skip to content

Commit

Permalink
Update EIP-7702: Proxy the storage of a delegation to its unique dele…
Browse files Browse the repository at this point in the history
…terminstic address
  • Loading branch information
g11tech committed Jul 26, 2024
1 parent 5d0d207 commit 9dda35f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions EIPS/eip-7702.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ One consideration when signing a code pointer is what code might that address po

An alternative to adding chain ID could be to sign over the code the address points to. This seems to have the benefit of both minimizing the on-chain size of auth tuples while retaining specificity of the actual code running in the account. One unfortunate issue of this format though is that it imposes a database lookup to determine the signer of each auth tuple. This imposition itself seems to create enough complexity in transaction propagation that it is decided to avoid and simply sign over address directly.

#### Delegation Storage

Considering that the delegation from one contract to another contract can cause conflict and corruption of the storage with broken contract in the least and a compromized 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 proixed and accessed/written at `keccak256(authority||address)[0:20]`. This way, if the contract is delegated back to a previous `address`, EVM will be able to _re-attach_ its old storage.

#### In-protocol revocation

Unlike previous versions of this EIP and EIPs similar, the delegation designation can be revoked at anytime signing and sending a EIP-7702 authorization to a new target with the account's current nonce. Without such action, a delegation will remain valid in perpetuity.
Expand Down

0 comments on commit 9dda35f

Please sign in to comment.