-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
change of tx.origin for account abstraction #637
Comments
Some context; the Allcoredevs-discussion starts around here: https://gitter.im/ethereum/AllCoreDevs?at=5923f82000efc2bb3e966db1. |
I come at this from a different perspective, I think. That of off-chain, after-the-fact forensic analysis or accounting. I don't really understand the issue, but to the extent that this abstraction makes it more difficult to distinguish between contract and external accounts in the data it makes analyzing the data more difficult. There are certain optimizations one can make if one knows an account is external (for example, there's no need to search if the account participated in an 'internal' transaction' as initiator). My comment is the ability to distinguish between external and contract accounts is beneficial to off-chain, after-the-fact analysis tools. |
In a way external accounts and contract based accounts are similar, in the sense that both require a signature. Your contact account still needs some kind of signature passed into the verifier account. Just thew which signature it is is more flexible than before. The signer account knows which signatures it will allow to work through it, and additional this contract can contain a lot more then just the signature verification. |
Why not use Is there some reason why losing information is a good thing? |
I don't entirely understand the tradeoffs but, in terms of usefulness, every situation I thought |
@frozeman Could you edit the OP to have EDIT: Compare to |
I personally have never used |
There are some misconceptions here and on Reddit. , I'll call them Regarding backward compatibility.
And I don't see that either way makes any difference for off-chain analysis. |
@tjayrush I don't see how having this opcode or not will affect that; can you elaborate?
Because I, and others, have never seen a use-case for |
@Arachnid I wasn't really saying this would or would not make it more difficult to distinguish contracts from non-contracts. I was just saying that if it does make distinguishing them off-chain more difficult (i.e. by doing a |
@frozeman I'm also not convinced of the need to keep I think the identity usecase in the linked gitter convo is not that good of an example since IMO best practices is not to link identities directly to keys (which can/will be lost) but instead to contract addresses or other non-key identifiers (which allows for key rotation etc). So I'm also in favor of deprecating tx.origin. I also think that the "origin" word introduces some preconceptions. tx.origin is defined as the hash of the pubkey that signed the transaction. If this signature is supposed to convey some authorization then IMO this is something that should be explicitly passed in with the transaction data and/or function parameters. If the signature is passed in that way it doesn't matter who is actually "sending" the transaction. |
Maybe I don't explain correctly, but the identity/verifier can have key rotation, as it decides which keys to accept. |
@tjayrush This sounds like an objection to the account abstraction change, rather than to the tx.origin change. |
@frozeman I am trying to catch up why |
Most contract creators rely on standard |
The reasoning behind... I never have used it or I don't know how to use it correctly, doesn't mean something is useless or that no one knows how to use it correctly. Passing Breaking backwards compatibility out of personal taste in a blockchain full of contracts using Stop believing that |
This collision isn't possible as of recently: https://eips.ethereum.org/EIPS/eip-3607 |
This is exactly what I am trying to say, some programmers thought of this before EIP-3607 was proposed and used |
In case you missed it, this issue is from 2017, long before any of the things you mentioned. We (core devs and security community) have been telling people to not use tx.origin checks for a very long time, but unfortunately no one listens. 😢 |
I must insist that my opinion is that changing the behavior of In other topics... I wish anyone that reads this comment a ¡happy new year! 😄 |
Closing this issue for housekeeping purposes. People are welcome to continue discussing in this thread, but for additional visibility an EIP should be created or the conversation should be migrated to https://ethereum-magicians.org/ |
This is a an ERC concerning the account abstraction proposed by @vbuterin and currently as a PR for review here: #208
The reason for this ERC is to gather community feedback concerning a change of
tx.origin
for transactions from0xFFFFF...
Abstract
Initially #86 proposed a changes where transaction can happen from a un-owned account named
0xFFFFFF..
. The reasoning is that this allows for custom signature schemes, as well as 0 gas transactions, where the verifier contract pays for the gas.This feature comes with the fact that
tx.origin
or the ORIGIN opcode will point to0xFFFFF..
.My proposal is to make
tx.origin
point to thetx.origin+1
for those type of transactions, to prevent the loss of the knowledge of the origin of a transaction.tx.origin+1
will be the contract verifying the signature coming from the0xFFFFF...
account, where everybody can send a transaction from.Those verifier contracts, could also implement much more features, like representing a identity with verified properties about the identity holder etc.
Discussion and Problems
There is a short discussion here: #208 (comment), which i recommend to read, as well as a length discussion in the AllCoreDevs Gitter channel.
The two sides are:
tx.origin+1
removes the ability to know from where transactions originated, which might be useful in some cases.While allowing automatically verification of identity properties, if the verifier contract, is more than just a signature verifier. This can have all kind of benefits for KYC etc.
I would like to invite the community to bring use cases where pointing
tx.origin
to the verifier contract, rather than the0xFFFF...
address. Or examples why that is not useful.Suggested solution for 2.
One solution for the middle men problem, would be to send the actual call data along with the signature, so that the receiving contract can verify the calldata - know that it was not manipulated, and execute it. While still be able to check the
tx.origin
identity/verifier contract for properties a user needs to fullfill (e.g. user is human, has good reputation, etc.)Request
Please lets discuss the use of
tx.origin
and its usefulness, so that we either get rid of it completely, or movetx.origin+1
for transactions originating from0xFFFF..
. As we are doing the Metropolis hard fork changes now, it its crucial to get to an agreement now, rather than later, and eventually require a second hard fork to solve this issue.The text was updated successfully, but these errors were encountered: