-
Notifications
You must be signed in to change notification settings - Fork 1
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
EIP-1702: Generalized Account Versioning Scheme #2
Comments
The format of this proposal is missing a few suggested paragraphs from the [eip-X.md](the https://github.com/ethereum/EIPs/blob/master/eip-X.md) template. Please go over that and add the paragraphs here possible. |
If I understand Alternative Design correctly, it's only init code that has prefix, but not the deployed code. Maybe it's worth to clarify this.
This sentence is not quite clear. Does it mean that it's determined by the |
Yes. I used |
A note regarding upgradable contract and account versioning (posted on Gitter as well) -- my current conclusion is that upgradable contracts are not affected at all by EIP-1702 variant 1 (or variant 2)!
|
Just did another update to EIP-1702 -- I'm making the version of the execution frame always the same as the account code's version. That is, when fetching code from an account in state, we always fetch the version field of that account together, and "associate" the version with the code. This should be easier to implement (we just need to change all definition of |
Is it possible to remove the variants that are not to be implemented? |
Previously we also discussed (most regarding state rent) of how we should order additional account RLP fields. Now I'm thinking, maybe we can just use 1702's I added this to 1702 spec. Note that this will not require any change for current 1702 implementations, but I think it may help us implement things like state rent in the future. |
You removed Alternative Design, but it's still mentioned in Rationale. |
I've been implementing this in aleth (ethereum/aleth#5640), and one edge case to be aware of is creating with empty init code (both with creation transaction and CREATE/CREATE2). When init code is empty, creation ends with a new account with empty code and nonce = 1. I've decided to leave it with version 0 in this case, regardless of parent's version and |
Another nit for the spec: maybe it's worth pointing out in |
Fixed in ethereum#2152. Thanks!
@gumb0 What do you think if in this case, we keep the version of the account to still be the parent account version? I feel this may be more consistent:
I have small worries that people may still want to apply EVM features to version |
I think I don't mind either way, it's either slight confusion of having empty code accounts with different versions, or slight confusion of family of contracts not always producing their version. Version 0 takes less space to store account, but I guess it shouldn't be significant difference here, as it's a rare case anyway. It might become important to always produce strictly the same version, if at some point your idea about parsing additional fields based on version field is implemented. |
Yeah agreed. I think it won't make much difference in storage size as it's only a corner case.
I think this may be a good reason to keep empty-code account (note it's not empty account!) of the parent account's version. Consider if we implement state rent via some additional fields with versions, then by using this scheme we can make sure those new empty-code account are garbage collected. However, if we set empty-code account to version zero, then this won't work.
I don't think this is actually a bad thing. In the contrary, for some EIPs this is strictly needed. Consider EIP-2027, where we keep a contract size counter as an additional field in the account -- the code executor must support contract size counter (by slightly changing behavior of SSTORE) to make the spec work. It's nearly impossible to completely separate them out. So if it's okay for you, maybe let's keep the current behavior (empty-code account has the same version of parent account)! |
EIP-1702 Account Versioning is a bad idea at this time and it should not be in Istanbul. a) The only relevant motivation is preparing for emergency last minute hard forks. If eWASM launches in 2030, it will be better to deploy this dependency at that time. This reminds me back in 2013 when we were made our wedding gift registry at Bed Bath and Beyond. The salesperson was trying to sell us a mixer. We told him we don't make cakes. Then he said "well you plan to have kids right? so when your kids go to school you can make cakes for the rest of the class." We said "okay so we get married next year, have a kid and they're in first grade in the year 2021 and then I'll be thinking 'wow I wish a had a vintage 2013 model mixer'". |
A minor comment wrt the extension for Contract Creation Transaction scheme is that it would be nice to make the |
@MrChico it's there
|
@gumb0 Sorry, my comment was referring to the extension for creating transactions. I have updated it for clarification |
Hi @sorpaas I read this a long time ago, and once more today. I thought this time I would ask some questions.
Thanks! |
Discussion thread for account versioning:
The text was updated successfully, but these errors were encountered: