shelmesky / omo

Run your VM with proofing of every step

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OMO

A bytecode level program emulator with per-step state proof. It can be used to generate challenge proof of optimistic rollup, and maybe other scenarios in blockchain which need program state proof.

The core idea is derived from cannon and qiling.

Development Setup

To cross compile crates to mips or other targets. You need:

Get Started

The project contains two crates:

  • ./omo is the main entrypoint of the omo emulator.
  • ./rust-mips-example is an example crate. it is configured to build into a linux mips binary, which can be run by omo.

First, we need to compile the rust-mips-example:

cd ./rust-mips-example
cross build --target mips-unknown-linux-musl --release -v
# the compiled mips binary will be ./target/mips-unknown-linux-musl/release/rust-mips-example
file target/mips-unknown-linux-musl/release/rust-mips-example

then we use the omo to run this target/mips-unknown-linux-musl/release/rust-mips-example

cd ./omo
cargo run -- --config config.toml.example --env E1=a --env E2=b ../rust-mips-example/target/mips-unknown-linux-musl/release/rust-mips-example E1 E2

it will output:

Run ../rust-mips-example/target/mips-unknown-linux-musl/release/rust-mips-example
E1=a
E2=b

Supported Archs

Arch: MIPS32 at present, will support more.

Executable File Format: ELF 32-bit MSB executable at present.

OS: Linux.

Other resources

License

Apache License 2.0

About

Run your VM with proofing of every step

License:Apache License 2.0


Languages

Language:Rust 57.3%Language:Move 42.7%