News for hackers. Stuff that matters.
Re:Ethereum 2.0 launches by siraben on Tuesday December 01, 2020 @03:18PM (#25269373)
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

[1] I'm guilty of it too; https://github.com/ActorForth/evm-assembler/blob/master/docs...

[2] https://github.com/etclabscore/evm_llvm

Re:Ethereum 2.0 launches by DennisP on Tuesday December 01, 2020 @03:46PM (#25269668)
Fwiw there is a proposal to add a return stack to the EVM:

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.

Re:Ethereum 2.0 launches by nonveumann on Tuesday December 01, 2020 @06:11PM (#25271297)
It'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.
Re:Ethereum 2.0 launches by DennisP on Tuesday December 01, 2020 @07:18PM (#25271820)
That's fantastic, thanks!
Re:Ethereum 2.0 launches by int_19h on Tuesday December 01, 2020 @07:25PM (#25271874)
Looking close enough at Solidity was what turned me off the Ethereum ecosystem back in the day: https://news.ycombinator.com/item?id=14810008

eWASM does look interesting, though!

Re:Ethereum 2.0 launches by xrd on Tuesday December 01, 2020 @05:43PM (#25271046)
I'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.
Re:Ethereum 2.0 launches by hobofan on Tuesday December 01, 2020 @03:35PM (#25269542)
I guess it's not mentioned a lot as it's still ~2 years away in Phase 2, AFAIK.
Re:Ethereum 2.0 launches by dmihal on Tuesday December 01, 2020 @04:14PM (#25269974)
What'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.