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

Fix or remove EVMLA #89

Open
xermicus opened this issue Oct 15, 2024 · 2 comments
Open

Fix or remove EVMLA #89

xermicus opened this issue Oct 15, 2024 · 2 comments

Comments

@xermicus
Copy link
Member

xermicus commented Oct 15, 2024

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.

  • It is not entirely clear what the use case is for this? YUL is available and considered stable enough for years.
  • If we ultimately need it we can either
    • Declare it as experimental and accept the current status quo
    • Properly fix it on our own
    • Possibly work around this by just resolving those jumps dynamically at runtime?
    • Direct people to the matter-labs solc fork, assuming it is still general enough
    • Upstream the ML fixes? Why do they not upstream this?
@xermicus xermicus added this to the Initial release milestone Oct 25, 2024
@xermicus
Copy link
Member Author

Apparently uniswap v3 is so old that it is still built against Solidity 0.7.

@athei
Copy link
Member

athei commented Dec 19, 2024

It is not clear if we have to support it. Uniswapv4 exists and supports Solidity 0.8.

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

2 participants