6 ms·
Having worked with Ethereum, especially the low level bytecode, one of the changes I'm most excited for that I don't see mentioned a lot is the addition of eWAS
by siraben 6y ago
Having worked with Ethereum, especially the low level bytecode, one of the changes I'm most excited for that I don't see mentioned a lot is the addition of eWASM support for nodes. There's many problems with the two dominant smart contract languages Solidity and Vyper, for instance bloated codegen that had to be patched otherwise complex contracts size could not be deployed[0], or more theoretical concerns such as soundness, semantics and correctness. Part of the problem is because of no coherent shared intermediate representation and developers writing backends from scratch, and lots of reinventing of the wheel[1]. There's an ongoing project[2] to create an LLVM backend for EVM but the stack based nature is at odds with LLVM IR's bias towards register-based architectures. (EVM doesn't even have a separate stack for return addresses to implement subroutines cleanly!)
The switch to eWASM would greatly improve security, efficiency and perhaps allow a diversity of languages to be used on Ethereum. It should be a matter of exposing the appropriate primitives to call other contracts, generate log events, write to the store and so on.
[0] For instance, see a PR that reduces codegen from 55K to 1.6K bytes on an innocuous contract https://github.com/vyperlang/vyper/pull/1488 https://github.com/vyperlang/vyper/pull/1488
[1] I'm guilty of it too; https://github.com/ActorForth/evm-assembler/blob/master/docs/evm-assembler-talk.pdf https://github.com/ActorForth/evm-assembler/blob/master/docs...
[2] https://github.com/etclabscore/evm_llvm https://github.com/etclabscore/evm_llvm
- hobofan 6y agoI guess it's not mentioned a lot as it's still ~2 years away in Phase 2, AFAIK.
- DennisP 6y agoFwiw there is a proposal to add a return stack to the EVM: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2315.md https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2315.m... Your evm-assembler looks pretty interesting. It's crossed my mind before to write an evm Forth, just for fun, and the lack of a return stack so far has dissuaded me.
- nonveumann 6y agoIt's more than a proposal at this point, it's been accepted into the next network upgrade, Berlin, and has been implemented in all major clients for a while now.
- DennisP 6y agoThat's fantastic, thanks!
- dmihal 6y agoWhat's the current status of eWASM? Seems like there's discussion of scrapping the whole phase 2 "execution environments" and just allowing heterogenous execution on rollups.
- xrd 6y agoI've done a small bit of dabbling on solidity. Is there a place to get started on this new proposal? Or still too raw for the less experienced? I'll check your links but in case they don't cover that question.
- int_19h 6y agoLooking close enough at Solidity was what turned me off the Ethereum ecosystem back in the day: https://news.ycombinator.com/item?id=14810008 https://news.ycombinator.com/item?id=14810008 eWASM does look interesting, though!