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

Backwards-incompatibly changing and/or removing EVM features #250

Closed
vbuterin opened this issue Feb 18, 2021 · 6 comments
Closed

Backwards-incompatibly changing and/or removing EVM features #250

vbuterin opened this issue Feb 18, 2021 · 6 comments

Comments

@vbuterin
Copy link
Collaborator

We have a unique opportunity to make some backwards-incompatible changes to the EVM that could be valuable for Ethereum in the long term. I wrote up a doc with some of the key ones, though there are certainly others (as well as those outside the EVM proper, like for example moving block structure to SSZ and changing the state tree) that are also arguably worth doing. The portion of applications that would need to be rewritten as a result of these changes is quite small, but it is nevertheless nonzero.

It would be good to start talking about this earlier, so that any such changes can be on developers' radar with as long a lead-time as possible.

https://hackmd.io/@HWeNw8hNRimMm2m2GH56Cw/evm_feature_removing

@axic
Copy link
Member

axic commented Feb 18, 2021

I would suggest https://eips.ethereum.org/EIPS/eip-2488 as an addition.

Also hoped to get rid of PC to restrict the opportunity for dynamic jumps, but unfortunately it is in use: chi gas token and optimism.

@vbuterin
Copy link
Collaborator Author

I'd love to deprecate CALLCODE.

Why would we want to restrict dynamic jumps? I would actually even argue the contrary, that we should be trying to deprecate static jumps and make all jumps relative to the current PC, as that makes it easier to move code around, prepend and take pieces of code, etc.

@gcolvin
Copy link

gcolvin commented Feb 19, 2021

Proposals to change EVM control structures take a long time to get right and even longer to (fail to) get consensus on accepting. Unless the merge is at least two years out I wouldn't go there.

@gcolvin
Copy link

gcolvin commented Feb 19, 2021

But to go there slightly - the ideas look very interesting, and worth fleshing out if there really is time. And whether the jump is relative to the PC or the start of the bytecode is I think independent of whether the address is static or dynamic.

@axic
Copy link
Member

axic commented Feb 19, 2021

Why would we want to restrict dynamic jumps? I would actually even argue the contrary, that we should be trying to deprecate static jumps and make all jumps relative to the current PC, as that makes it easier to move code around, prepend and take pieces of code, etc.

I think what you are talking about getting rid of absolute jumps and making everything relative jumps. I think that could make sense, but I would go around it the following way:

  1. Introduce new jump instructions which take relative offsets, such as RJUMP <offset> and RJUMPI <offset> <condition> (R for relative) where offset is a signed value.
  2. Change the specification of the current JUMP <offset> to RJUMP <offset - PC>
  3. Remove PC over time, as it is not needed.

After that we can argue that dynamic jumps would not be needed to accomplish your use case, and everything could be static relative jumps.

@timbeiko
Copy link
Collaborator

timbeiko commented Mar 5, 2021

@vbuterin @axic given we're moving forward with the refunds proposal for consideration for London, I'll close this issue. We can re-open specific ones for other things we want to bring up in ACD as they come up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants