paritytech / revive

Solidity compiler for PolkaVM
Apache License 2.0
38 stars 5 forks source link

Fix or remove EVMLA #89

Open xermicus opened 1 month ago

xermicus commented 1 month ago

From the ZKSync docs:

EVM legacy assembly is very challenging to translate to LLVM IR, since it obfuscates the control flow of the program and uses a lot of dynamic jumps. Most of the jumps can be translated to static ones by using a static analysis of EVM assembly, but some of jumps are impossible to resolve statically. For example, internal function pointers can be written to memory or storage, and then loaded and called. Recursion is another case we have skipped for now, as there is another stack frame allocated on every iteration, preventing the static analyzer from resolving the jumps.

Both issues are being worked on in our fork of the Solidity compiler, where we are changing the codegen to remove the dynamic jumps and add the necessary metadata.

Their solc fork is in the works for a long time now (months if not years) and this is still the status quo. Also ZKSync is an ETH L2 and since they got away with this so far.

I'd like to set a clear path forward.