mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-20 18:56:17 +00:00
Supported `polkadot-sdk` rev: `2603` ### Changed - Updated `LLVM` from `21.1.8` to LLVM `22.1.4` ### Added - Support for solc v0.8.35. ### Fixed - A constant folding bug causing incorrect translation of a signed remainder edge case. The affected pattern (Solidity % or Yul smod): - SREM over the two constant operands `type(int256).min` and `-1`. - At least one of the two constants needs folding (i.e. not just `type(int256).min % -1`), and is written specifically such that solc doesn't fold but LLVM does, resulting in UB (signed-overflow). - Fix `mulmod` returning out-of-range result for large moduli. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
revive-runner
The revive runner is a helper utility aiding in contract debugging.
Given a PVM contract blob, it will upload, deploy and call that contract using a local, stand-alone un-blockchained pallet revive (which is our execution layer).
This is somewhat similar to the geth evm utility binary.
Installation
The revive-runner does not depend on the compiler itself, hence installing this utility does not depend on LLVM, so no LLVM build is required.
Inside the root revive repository directory, execute:
make install-revive-runner
Which will install the revive-runner using cargo.
Usage
Set the RUST_LOG environment varibale to the trace level to see the full PolkaVM execution trace. For example:
RUST_LOG=trace revive-runner -f mycontract.pvm -c a9059cbb000000000000000000000000f24ff3a9cf04c71dbc94d0b566f7a27b94566cac0000000000000000000000000000000000000000000000000000000000000000