Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP: Alias ORIGIN to SENDER #8283

Merged
merged 6 commits into from
Mar 12, 2024
Merged

Add EIP: Alias ORIGIN to SENDER #8283

merged 6 commits into from
Mar 12, 2024

Conversation

cyrusadkisson
Copy link
Contributor

This has been part of the discussion around account abstraction.

@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels Mar 2, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Mar 2, 2024

✅ All reviewers have approved.

@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Mar 2, 2024
@eth-bot eth-bot changed the title Add EIP to alias ORIGIN to SENDER Add EIP: Alias ORIGIN to SENDER Mar 2, 2024
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Mar 3, 2024
@@ -0,0 +1,73 @@
---
eip: TBD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eip: TBD
eip: 7645

Assigning next sequential EIP/ERC/RIP number.
Numbering changed to sequential from 7500.

Please also update the filename.

Copy link

github-actions bot commented Mar 4, 2024

The commit 9c861d5 (as a parent of e11aac3) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Mar 4, 2024

## Abstract

This EIP proposes aliasing the ORIGIN opcode to the SENDER opcode within the Ethereum Virtual Machine (EVM). The purpose of this change is to move Ethereum closer to enabling account abstraction by harmonizing the treatment of externally owned accounts (EOAs) and smart contracts and to address the security concerns associated with the use of ORIGIN that have and will continue to surface in all or most account abstraction proposals.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This EIP proposes aliasing the ORIGIN opcode to the SENDER opcode within the Ethereum Virtual Machine (EVM). The purpose of this change is to move Ethereum closer to enabling account abstraction by harmonizing the treatment of externally owned accounts (EOAs) and smart contracts and to address the security concerns associated with the use of ORIGIN that have and will continue to surface in all or most account abstraction proposals.
This EIP proposes aliasing the `ORIGIN` opcode to the `SENDER` opcode within the Ethereum Virtual Machine (EVM). The purpose of this change is to move Ethereum closer to enabling account abstraction by harmonizing the treatment of externally owned accounts (EOAs) and smart contracts and to address the security concerns associated with the use of `ORIGIN` that have and will continue to surface in all or most account abstraction proposals.

Add backticks to the rest of your proposal too please.


For instance, if an [ERC-4337](./eip-4337.md) bundler has tokens or other authority in a smart contract determined by ORIGIN, any of the transactions it bundles can hijack this authority since ORIGIN remains the bundler address throughout each child transaction.

More apropos in the current context of EVM evolution, the differentiation between the ORIGIN and SENDER opcodes presents a challenge for all account abstraction efforts, such as those outlined in [EIP-7377](./eip-7377.md) and [EIP-3074](./eip-3074.md), because any move towards account abstraction must address the ORIGIN opcode's role, either by modifying or completely bypassing it. Without addressing this, the ORIGIN opcode stands as a barrier to the evolution of Ethereum's account model towards greater flexibility and functionality.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up, linking to non-final proposals will prevent yours from advancing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove the references to 7377 and 3074, but why is EIP-4337 still "draft" if it's in use today?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's up to the authors of ERC-4337.


Transaction Validation: Transactions MUST be validated as before, with no changes to the transaction structure or processing logic beyond the EVM opcode behavior specified above.

Compatibility: Smart contracts relying on the ORIGIN opcode for obtaining the transaction initiator's address MUST be reviewed to ensure they function correctly under the new definition and worked-around or avoided if this EIP introduces breaking changes.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this section to the Backwards Compatibility section. This standard can't really change behaviour of already deployed contracts.


Compatibility: Smart contracts relying on the ORIGIN opcode for obtaining the transaction initiator's address MUST be reviewed to ensure they function correctly under the new definition and worked-around or avoided if this EIP introduces breaking changes.

Implementers are encouraged to provide feedback on this specification and report any potential issues encountered during the implementation or testing phases.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal should be written as if they are already final. Assuming this proposal is accepted, this line won't make sense 10 years from now.

Comment on lines +43 to +50
The rationale behind aliasing ORIGIN to SENDER is to:

Facilitate Account Abstraction: Elegantly nullify a universal barrier to account abstraction, enabling more flexible and powerful account models in Ethereum.

Enhance Security: Eliminate the security vulnerabilities associated with differentiating between the original transaction initiator and the immediate caller.

Clean up tech debt and simplify the EVM Model: Reduce the complexity of the EVM's transaction and execution model by removing an outdated and deprecated feature, making future changes easier and safer.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads as Motivation, not Rationale. The Rationale section should explain technical choices made in the EIP.

Copy link
Contributor

@mattstam mattstam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all the existing documentation around tx.origin is considered, I think it becomes quite clear that this change is not needed. I have yet to see a resource that does not explicitly state tx.origin should generally not be used.

We should not assume account abstraction ever goes to 100% usage (and it is far from it now). And since that's the case, tx.origin still does have niche use-cases, like checking which address paid for the transaction.

In other words, I think this change would cause more confusion than it solves.

@SamWilsn
Copy link
Contributor

SamWilsn commented Mar 9, 2024

@mattstam please leave technical comments like this one on the discussion thread. Pull request comments tend to get lost when the pull request gets merged.

@eth-bot eth-bot enabled auto-merge (squash) March 12, 2024 21:33
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit ebe466f into ethereum:master Mar 12, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants