xermicus 4f0a109771 update README.md
Signed-off-by: xermicus <cyrill@parity.io>
2024-05-24 21:50:12 +02:00
2024-05-24 20:27:28 +02:00
2024-03-12 12:06:02 +01:00
2024-03-12 12:06:02 +01:00
2024-05-10 10:54:01 +02:00
2024-05-24 21:50:12 +02:00

CI

revive

YUL and EVM assembly recompiler to LLVM, targetting RISC-V on PolkaVM.

Frontend and code generator are based of ZKSync zksolc.

Status

This is experimental software in active development and not ready just yet for production usage.

Discussion around the development is hosted on the Polkadot Forum.

Installation

TL;DR installing the resolc Solidity frontend executable:

bash build-llvm.sh
export PATH=${PWD}/llvm18.0/bin:$PATH
make install-bin
resolc --version

LLVM

revive requires a build of LLVM 18.1.4 or later including compiler-rt. Use the provided build-llvm.sh build script to compile a compatible LLVM build locally in $PWD/llvm18.0 (don't forget to add that to $PATH afterwards).

Development

Please consult the Makefile targets to learn how to run tests and benchmarks.

Design overview

revive uses solc, the Ethereum Solidity compiler, as the Solidity frontend to process smart contracts written in Solidity. The YUL IR code (or legacy EVM assembly as a fallback for older solc versions) emitted by solc is then translated to LLVM IR, targetting a runtime similar to Polkadots contracts pallet.

TODO

  • Efficient implementations of byte swaps, memset, memmove, mulmod and the like
  • Migrate the mock runtime to the on-chain implementation when its avaialbe
  • Use PolkaVM allocator for heap space
  • Exercice schlau and possibly smart-bench benchmark cases
  • Tests currently rely on the binary being in $PATH, which is very annoying and requires cargo install all the times
  • Define how to do deployments
  • Calling conventions for calling other contracts
  • Runtime environment isn't fully figured out; implement all EVM builtins
  • Iron out leftovers from the ZKVM target
    • Use of exceptions
    • Change long calls (contract calls)
    • Check all alignments, attributes etc. if they still make sense with our target
    • Custom extensions related to zk VM
    • Active Pointer: Redundant to calldata forwarding in pallet contracts. Mainly used here however we could offer a similar optimization.
  • Add a lot more test cases
  • Debug information
  • Look for and implement further optimizations
  • Differential testing against EVM
  • Switch to LLVM 18 which has RV{32,64}E targets upstream
  • Minimize scope of "stdlib"
  • Document differences from EVM
  • Audit for bugs and correctness
  • Rebranding
  • Remove support for vyper
S
Description
No description provided
Readme 26 MiB
Languages
Rust 87.9%
Solidity 5.8%
JavaScript 2.3%
Python 0.9%
C 0.9%
Other 2.1%