-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Things to decide for phase 2 #702
Comments
I think this looks like a great list to start the discussion! We have already started collecting ideas regarding ewasm here: https://github.com/ewasm/design/issues. I think some of these can be applied to the "Eth1.x" version of ewasm, but definitely don't see any reason they couldn't be applied to Eth2.0. Regarding contract addressing:
We are exploring "contract linking" in its various forms as an alternative to this. That would eliminate "calls" needed to interact with libraries. |
Interesting! Though this still seems like it would not remove the need for blocks with transactions using that library to need to provide a merkle branch of the code to prove execution statelessly. More broadly, I feel like one question that the EWASM team could help a lot by figuring out is, what kind of an interface would EWASM have with respect to the wider system? The simplest possible interface for example would be the ability to run If the interface is settled, then work on everything-outside-the-VM and everything-inside-the-VM could just proceed separately. How far away is the EWASM team from being able to lay down an opinion on this? |
It just struck me that this configuration feels a lot like an operating system with a kernel mode and a user mode--where, in this case, Ewasm contract code is running in user mode and has one or more system calls it can make which switch the context back to "kernel" (EEI) mode. I wonder if we shouldn't take design cues from existing operating system design. @axic, @jakelang and others know way more about this topic than I do. |
I am not sure I understand what these functions would do. Is From my personal perspective I have two goals:
The main reason for 1) is to simplify the points in the system where code validation must occur. While I would wish to create really nice high level abstractions with 2), this may be limited by execution overhead that we must also take into consideration. Did a semi-long write up of a potential async interface here: ewasm/design#185 |
Ewasm is just wasm (it works on any generic wasm engine). It looks like this:
Well the wasm interface is settled (for wasm 1.0). You can do The Ewasm interface is the set of FFI functions ("host functions" in webassembly docs). For Ewasm 1.0, the host functions basically mirror those EVM opcodes that can't be reduced to pure wasm instructions. There's like 32 of them, so the Ewasm 1.0 interface is 32 host functions minus a couple redundancies (e.g. For Ewasm 2.0, the set of FFI/host-functions would depend on how phase 2 works. Personally, I consider the host functions as outside-the-VM (i.e. host functions are a part of the client, not a part of the VM). Then what falls inside-the-VM that can proceed separately? Mainly just making code run faster (optimizing interpreters, making compilers robust) and making sure that code terminates (metering, and reducing the slowdown between metered and unmetered code). |
A relatively minor issue, but learning lessons from Eth 1, how about a mandatory checksum for Eth 2.0 addresses? EIP55 retro-fitted a checksum format to Eth 1, but this is still not fully adopted/enforced. Including a checksum as part of the protocol would be a step forward for user safety. I realise that the Eth 2 address format is not yet specified, this notwithstanding. |
I would argue that Eth2 validator addresses at phase 0 should have mandatory checksums, and the checksum should be verified by the Eth1 deposit contract. |
closing this ancient issue |
What is the above missing?
The text was updated successfully, but these errors were encountered: