diff --git a/.gitmodules b/.gitmodules index 6d2556e..5d43824 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "crates/mipsevm/bindings/optimism"] - path = crates/mipsevm/bindings/optimism +[submodule "crates/fpvm/bindings/optimism"] + path = crates/fpvm/bindings/optimism url = https://github.com/ethereum-optimism/optimism diff --git a/Cargo.lock b/Cargo.lock index 5497b8e..5103e8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,18 +58,15 @@ dependencies = [ "derive_more", "hex-literal", "itoa", - "proptest", - "rand", "ruint", - "serde", "tiny-keccak", ] [[package]] name = "alloy-primitives" -version = "0.6.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b6fb2b432ff223d513db7f908937f63c252bee0af9b82bfd25b0a5dd1eb0d8" +checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" dependencies = [ "alloy-rlp", "bytes", @@ -111,12 +108,26 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.6.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0b5ab0cb07c21adf9d72e988b34e8200ce648c2bba8d009183bb1c50fb1216" +checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" +dependencies = [ + "alloy-sol-macro-input", "const-hex", - "dunce", "heck", "indexmap", "proc-macro-error", @@ -127,13 +138,28 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", +] + [[package]] name = "alloy-sol-types" -version = "0.6.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c08f62ded7ce03513bfb60ef5cad4fff5d4f67eac6feb4df80426b7b9ffb06e" +checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" dependencies = [ - "alloy-primitives 0.6.2", + "alloy-primitives 0.7.7", "alloy-sol-macro", "const-hex", "serde", @@ -195,9 +221,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "ark-ff" @@ -390,7 +416,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.48", "which", @@ -413,7 +439,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.48", "which", @@ -528,9 +554,9 @@ dependencies = [ name = "cannon" version = "0.1.0" dependencies = [ - "alloy-primitives 0.6.2", + "alloy-primitives 0.7.7", "anyhow", - "cannon-mipsevm", + "cannon-fpvm", "command-fds", "flate2", "preimage-oracle", @@ -542,10 +568,10 @@ dependencies = [ ] [[package]] -name = "cannon-mipsevm" +name = "cannon-fpvm" version = "0.1.0" dependencies = [ - "alloy-primitives 0.6.2", + "alloy-primitives 0.7.7", "alloy-sol-types", "anyhow", "criterion", @@ -557,7 +583,7 @@ dependencies = [ "proptest", "rand", "revm", - "rustc-hash", + "rustc-hash 2.0.0", "serde", "serde_json", "tracing", @@ -568,10 +594,10 @@ dependencies = [ name = "cannon-rs" version = "0.1.0" dependencies = [ - "alloy-primitives 0.4.2", + "alloy-primitives 0.7.7", "anyhow", "cannon", - "cannon-mipsevm", + "cannon-fpvm", "clap", "serde", "serde_json", @@ -646,9 +672,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.0" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -656,9 +682,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.0" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -668,9 +694,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ "heck", "proc-macro2", @@ -1123,9 +1149,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1257,7 +1283,6 @@ dependencies = [ "elliptic-curve", "once_cell", "sha2", - "signature", ] [[package]] @@ -1698,7 +1723,7 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" name = "preimage-oracle" version = "0.1.0" dependencies = [ - "alloy-primitives 0.6.2", + "alloy-primitives 0.7.7", "anyhow", "os_pipe", "rand", @@ -2012,9 +2037,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.11.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -2036,9 +2061,9 @@ dependencies = [ [[package]] name = "ruint-macro" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-demangle" @@ -2052,6 +2077,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -2180,18 +2211,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.196" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -2200,9 +2231,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -2386,9 +2417,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.6.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63bef2e2c735acbc06874eca3a8506f02a3c4700e6e748afc92cc2e4220e8a03" +checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" dependencies = [ "paste", "proc-macro2", @@ -2474,9 +2505,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.36.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -2493,9 +2524,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 2c23e32..f202d47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,17 +8,17 @@ authors = ["clabby"] [workspace.dependencies] # types -alloy-primitives = "0.6.2" +alloy-primitives = "0.7.7" # ser -serde = { version = "1.0.196", features = ["derive"] } -serde_json = "1.0.113" +serde = { version = "1.0.204", features = ["derive"] } +serde_json = "1.0.120" # runtime -tokio = { version = "1.36.0", features = ["full"] } +tokio = { version = "1.38.0", features = ["full"] } # misc -anyhow = "1.0.79" +anyhow = "1.0.86" [profile.release] opt-level = 3 diff --git a/README.md b/README.md index 4738642..62a1ce8 100644 --- a/README.md +++ b/README.md @@ -34,18 +34,20 @@ Subsequently, it is compiled to MIPS to be ran on top of Cannon on-chain to prov native implementation of the MIPS thread context that mirrors the on-chain version, which enables the [op-challenger][op-challenger] to generate state commitments for an `op-program` execution trace and participate in dispute games. -*TL;DR:* -* It's Rust code -* ...that was [originally Go code][cannon] -* ...that runs an EVM -* ...emulating a MIPS machine -* ...running [compiled Go code][op-program] -* ...that runs an EVM +_TL;DR:_ + +- It's Rust code +- ...that was [originally Go code][cannon] +- ...that runs an EVM +- ...emulating a MIPS machine +- ...running [compiled Go code][op-program] +- ...that runs an EVM ## Overview -* [`cannon-mipsevm`](./crates/mipsevm) - Contains the native implementation of the MIPS thread context emulator. -* [`preimage-oracle`](./crates/preimage) - Rust bindings for interacting as client or sever over the Pre-image Oracle ABI. -* [`cannon-contracts`](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts-bedrock/src/cannon) - [*in OP monorepo*] Contains the Solidity implementation of the MIPS thread context and the Preimage Oracle. + +- [`cannon-fpvm`](./crates/fpvm) - Contains the native implementation of the MIPS thread context emulator. +- [`preimage-oracle`](./crates/preimage) - Rust bindings for interacting as client or sever over the Pre-image Oracle ABI. +- [`cannon-contracts`](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts-bedrock/src/cannon) - [*in OP monorepo*] Contains the Solidity implementation of the MIPS thread context and the Preimage Oracle. ## Credits @@ -54,27 +56,28 @@ credits for the original idea and reference implementation of this concept go to ## Benchmarks -### `cannon-mipsevm` benchmarks +### `cannon-fpvm` benchmarks The below benchmark was ran on a 2021 Macbook Pro with an M1 Max and 32 GB of unified memory on commit [`71b68d5`](https://github.com/anton-rs/cannon-rs/pull/17/commits/71b68d52fb858cfc544c1430b482aeaef460552e). -| Benchmark Name | `cannon` mean (Reference) | `cannon-rs` mean | -|----------------------------|---------------------------|---------------------| -| Memory Merkle Root (25MB) | 736.94 ms | 29.58 µs (-99%) | -| Memory Merkle Root (50MB) | 1.54s | 7.25 ms (-99%) | -| Memory Merkle Root (100MB) | 3.34s | 273.76 ms (-91.8%) | -| Memory Merkle Root (200MB) | 6.30s | 1.65s (-73.81%) | +| Benchmark Name | `cannon` mean (Reference) | `cannon-rs` mean | +| -------------------------- | ------------------------- | ------------------ | +| Memory Merkle Root (25MB) | 736.94 ms | 29.58 µs (-99%) | +| Memory Merkle Root (50MB) | 1.54s | 7.25 ms (-99%) | +| Memory Merkle Root (100MB) | 3.34s | 273.76 ms (-91.8%) | +| Memory Merkle Root (200MB) | 6.30s | 1.65s (-73.81%) | -*todo - execution benchmarks* +_todo - execution benchmarks_ ## Contributing To get started, a few dependencies are required: -* [Rust toolchain][rustup] - * Recommended: [`cargo-nextest`][nextest] -* [Go toolchain][golang] -* [binutils][binutils] + +- [Rust toolchain][rustup] + - Recommended: [`cargo-nextest`][nextest] +- [Go toolchain][golang] +- [binutils][binutils] ### Testing @@ -104,8 +107,9 @@ Rustdocs are available by running `cargo doc --open` after cloning the repo. ### Specification The specification for both Cannon and the preimage oracle can be found in the [Optimism monorepo][monorepo]. -* [Cannon specification][cannon-specs] -* [Preimage oracle specification][fpp-specs] + +- [Cannon specification][cannon-specs] +- [Preimage oracle specification][fpp-specs] ## Docker diff --git a/bin/Cargo.toml b/bin/Cargo.toml index 299181b..6a8906f 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -7,18 +7,20 @@ version.workspace = true authors.workspace = true [dependencies] +# workspace +anyhow.workspace = true +alloy-primitives.workspace = true +serde.workspace = true +serde_json.workspace = true + # External -anyhow = "1.0.75" -clap = { version = "4.4.3", features = ["derive"] } -alloy-primitives = "0.4.0" +clap = { version = "4.5.9", features = ["derive"] } tracing = "0.1.37" tracing-subscriber = "0.3.17" -serde = { version = "1.0.188", features = ["derive"] } -serde_json = "1.0.107" # Local cannon = { path = "../crates/cannon" } -cannon-mipsevm = { path = "../crates/mipsevm" } +cannon-fpvm = { path = "../crates/fpvm" } [[bin]] name = "cannon" diff --git a/bin/src/subcommands/load_elf.rs b/bin/src/subcommands/load_elf.rs index cd173a1..77f3f74 100644 --- a/bin/src/subcommands/load_elf.rs +++ b/bin/src/subcommands/load_elf.rs @@ -4,7 +4,7 @@ use super::CannonSubcommandDispatcher; use alloy_primitives::B256; use anyhow::Result; use cannon::gz::compress_bytes; -use cannon_mipsevm::{load_elf, patch_go, patch_stack, StateWitnessHasher}; +use cannon_fpvm::{load_elf, patch_go, patch_stack, StateWitnessHasher}; use clap::Args; use std::{ fmt::Display, diff --git a/bin/src/subcommands/witness.rs b/bin/src/subcommands/witness.rs index 0a8af6f..b4e32d3 100644 --- a/bin/src/subcommands/witness.rs +++ b/bin/src/subcommands/witness.rs @@ -4,7 +4,7 @@ use super::CannonSubcommandDispatcher; use alloy_primitives::B256; use anyhow::Result; use cannon::gz::decompress_bytes; -use cannon_mipsevm::{State, StateWitnessHasher}; +use cannon_fpvm::{State, StateWitnessHasher}; use clap::Args; use std::{fs, path::PathBuf}; diff --git a/crates/cannon/Cargo.toml b/crates/cannon/Cargo.toml index 5bcb2e5..c092105 100644 --- a/crates/cannon/Cargo.toml +++ b/crates/cannon/Cargo.toml @@ -15,7 +15,7 @@ serde_json.workspace = true tokio.workspace = true # local -cannon-mipsevm = { path = "../mipsevm" } +cannon-fpvm = { path = "../fpvm" } preimage-oracle = { path = "../preimage" } # misc diff --git a/crates/cannon/README.md b/crates/cannon/README.md index 8aa8bee..2ed8507 100644 --- a/crates/cannon/README.md +++ b/crates/cannon/README.md @@ -1,6 +1,6 @@ # `cannon` -The cannon crate provides a high-level interface to run the Cannon kernel, which consists of the [MIPS32 emulator][mipsevm] +The cannon crate provides a high-level interface to run the Cannon kernel, which consists of the [MIPS32 emulator][fpvm] as well as the [preimage oracle server][preimage-oracle]. The interaction between these two processes is fully synchronous. While the emulator is running, the preimage oracle @@ -8,25 +8,25 @@ server is blocked on waiting for hints and preimage requests from the emulator. is working, the emulator is blocked on waiting for the preimage oracle server to respond. ```text -┌───────┐ ┌───────────────┐ -│mipsevm│ │preimage-server│ -└───┬───┘ └───────┬───────┘ - │ │ - │ Hint │ - │──────────────>│ - │ │ - │ Ack hint │ - │<──────────────│ - │ │ - │ Get Preimage │ - │──────────────>│ - │ │ - │Return preimage│ - │<──────────────│ -┌───┴───┐ ┌───────┴───────┐ -│mipsevm│ │preimage-server│ -└───────┘ └───────────────┘ +┌──────┐ ┌───────────────┐ +│ fpvm │ │preimage-server│ +└───┬──┘ └───────┬───────┘ + │ │ + │ Hint │ + │─────────────>│ + │ │ + │ Ack hint │ + │<─────────────│ + │ │ + │ Get Preimage │ + │─────────────>│ + │ │ + │ Ret preimage │ + │<─────────────│ +┌───┴──┐ ┌───────┴───────┐ +│ fpvm │ │preimage-server│ +└──────┘ └───────────────┘ ``` -[mipsevm]: ../mipsevm +[fpvm]: ../fpvm [preimage-oracle]: ../preimage-oracle diff --git a/crates/cannon/src/builder.rs b/crates/cannon/src/builder.rs index 8f07b9c..3169776 100644 --- a/crates/cannon/src/builder.rs +++ b/crates/cannon/src/builder.rs @@ -2,7 +2,7 @@ use crate::{gz, ChildWithFds, Kernel, ProcessPreimageOracle}; use anyhow::{anyhow, Result}; -use cannon_mipsevm::{InstrumentedState, State}; +use cannon_fpvm::{InstrumentedState, State}; use std::{ fs::{self, File}, io::{self, BufReader, Read, Stderr, Stdout}, diff --git a/crates/cannon/src/kernel.rs b/crates/cannon/src/kernel.rs index ed13d1c..1b421fe 100644 --- a/crates/cannon/src/kernel.rs +++ b/crates/cannon/src/kernel.rs @@ -2,7 +2,7 @@ use crate::{gz::compress_bytes, types::Proof, ChildWithFds}; use anyhow::{anyhow, Result}; -use cannon_mipsevm::{InstrumentedState, PreimageOracle, StateWitnessHasher}; +use cannon_fpvm::{InstrumentedState, PreimageOracle, StateWitnessHasher}; use std::{ fs::File, io::{BufWriter, Write}, diff --git a/crates/cannon/src/proc_oracle.rs b/crates/cannon/src/proc_oracle.rs index 6b683ac..b54cc32 100644 --- a/crates/cannon/src/proc_oracle.rs +++ b/crates/cannon/src/proc_oracle.rs @@ -1,7 +1,7 @@ //! This module contains the [PreimageServer] struct and its associated methods. use anyhow::Result; -use cannon_mipsevm::PreimageOracle; +use cannon_fpvm::PreimageOracle; use command_fds::{CommandFdExt, FdMapping}; use preimage_oracle::{Hint, HintWriter, Hinter, Oracle, OracleClient, RawKey, ReadWritePair}; use std::{ @@ -12,8 +12,8 @@ use std::{ }; /// The [ProcessPreimageOracle] struct represents a preimage oracle process that communicates with -/// the mipsevm via a few special file descriptors. This process is responsible for preparing and -/// sending the results of preimage requests to the mipsevm process. +/// the fault proof VM via a few special file descriptors. This process is responsible for preparing +/// and sending the results of preimage requests to the FPVM process. pub struct ProcessPreimageOracle { /// The preimage oracle client pub preimage_client: OracleClient, @@ -41,7 +41,7 @@ impl ProcessPreimageOracle { let mut command = Command::new(cmd); let command = { // Grab the file descriptors for the hint and preimage channels - // that the server will use to communicate with the mipsevm + // that the server will use to communicate with the FPVM let fds = [ server_io[0].reader().as_raw_fd(), server_io[0].writer().as_raw_fd(), diff --git a/crates/cannon/src/types.rs b/crates/cannon/src/types.rs index 24731fd..e420877 100644 --- a/crates/cannon/src/types.rs +++ b/crates/cannon/src/types.rs @@ -1,6 +1,6 @@ //! This module contains the types for the `cannon` interface. -use cannon_mipsevm::StateWitness; +use cannon_fpvm::StateWitness; use preimage_oracle::ReadWritePair; use serde::{Deserialize, Serialize}; use std::process::Child; @@ -12,7 +12,7 @@ pub struct Proof { pub step: u64, pub pre: [u8; 32], pub post: [u8; 32], - #[serde(with = "cannon_mipsevm::ser::state_witness_hex")] + #[serde(with = "cannon_fpvm::ser::state_witness_hex")] pub state_data: StateWitness, pub proof_data: Vec, pub step_input: Vec, diff --git a/crates/mipsevm/Cargo.toml b/crates/fpvm/Cargo.toml similarity index 88% rename from crates/mipsevm/Cargo.toml rename to crates/fpvm/Cargo.toml index a126169..5d65abe 100644 --- a/crates/mipsevm/Cargo.toml +++ b/crates/fpvm/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "cannon-mipsevm" -description = "An implementation of the MIPSEVM for Cannon" +name = "cannon-fpvm" +description = "An implementation of the Cannon Fault Proof VM" edition = "2021" version.workspace = true @@ -17,7 +17,7 @@ anyhow.workspace = true preimage-oracle = { path = "../preimage" } # types -alloy-sol-types = "0.6.2" +alloy-sol-types = "0.7.7" # misc once_cell = "1.19.0" @@ -26,7 +26,7 @@ revm = { version = "3.5.0", features = ["no_gas_measuring"] } tracing = { version = "0.1.40", optional = true } # hashing -rustc-hash = "1.1.0" +rustc-hash = "2.0.0" xkcp-rs = { git = "https://github.com/DaniPopes/xkcp-rs", rev = "40447a5" } keccak256-aarch64-simd = { git = "https://github.com/clabby/keccak256-aarch64", rev = "5c4c8f8", optional = true } diff --git a/crates/mipsevm/README.md b/crates/fpvm/README.md similarity index 99% rename from crates/mipsevm/README.md rename to crates/fpvm/README.md index c96208c..fe2752c 100644 --- a/crates/mipsevm/README.md +++ b/crates/fpvm/README.md @@ -1,4 +1,4 @@ -# `cannon-mipsevm` +# `cannon-fpvm` Supported 55 instructions: | Category | Instruction | Description | diff --git a/crates/mipsevm/benches/execution.rs b/crates/fpvm/benches/execution.rs similarity index 98% rename from crates/mipsevm/benches/execution.rs rename to crates/fpvm/benches/execution.rs index b93ebaa..6d1a421 100644 --- a/crates/mipsevm/benches/execution.rs +++ b/crates/fpvm/benches/execution.rs @@ -1,4 +1,4 @@ -use cannon_mipsevm::{ +use cannon_fpvm::{ load_elf, patch_go, patch_stack, test_utils::{ClaimTestOracle, StaticOracle}, InstrumentedState, PreimageOracle, diff --git a/crates/mipsevm/benches/memory.rs b/crates/fpvm/benches/memory.rs similarity index 98% rename from crates/mipsevm/benches/memory.rs rename to crates/fpvm/benches/memory.rs index be6ef23..1eedf40 100644 --- a/crates/mipsevm/benches/memory.rs +++ b/crates/fpvm/benches/memory.rs @@ -1,4 +1,4 @@ -use cannon_mipsevm::Memory; +use cannon_fpvm::Memory; use criterion::{criterion_group, criterion_main, Criterion}; use pprof::criterion::{Output, PProfProfiler}; use rand::RngCore; diff --git a/crates/mipsevm/bindings/README.md b/crates/fpvm/bindings/README.md similarity index 77% rename from crates/mipsevm/bindings/README.md rename to crates/fpvm/bindings/README.md index 6eb3fc5..240bea0 100644 --- a/crates/mipsevm/bindings/README.md +++ b/crates/fpvm/bindings/README.md @@ -1,12 +1,13 @@ # `cannon-contract-bindings` -This folder contains the compiled bytecode of the Cannon contracts for deployment on the MIPSEVM. +This folder contains the compiled bytecode of the Cannon contracts for deployment on the Cannon FPVM. ## Regenerating Bindings Dependencies: -* [`forge`][foundry] -* [`jq`][jq] + +- [`forge`][foundry] +- [`jq`][jq] ```sh ./bindings.sh diff --git a/crates/mipsevm/bindings/bindings.sh b/crates/fpvm/bindings/bindings.sh similarity index 100% rename from crates/mipsevm/bindings/bindings.sh rename to crates/fpvm/bindings/bindings.sh diff --git a/crates/mipsevm/bindings/mips_creation.bin b/crates/fpvm/bindings/mips_creation.bin similarity index 100% rename from crates/mipsevm/bindings/mips_creation.bin rename to crates/fpvm/bindings/mips_creation.bin diff --git a/crates/fpvm/bindings/optimism b/crates/fpvm/bindings/optimism new file mode 160000 index 0000000..f8143c8 --- /dev/null +++ b/crates/fpvm/bindings/optimism @@ -0,0 +1 @@ +Subproject commit f8143c8cbc4cc0c83922c53f17a1e47280673485 diff --git a/crates/mipsevm/bindings/preimage_oracle_deployed.bin b/crates/fpvm/bindings/preimage_oracle_deployed.bin similarity index 100% rename from crates/mipsevm/bindings/preimage_oracle_deployed.bin rename to crates/fpvm/bindings/preimage_oracle_deployed.bin diff --git a/crates/mipsevm/open_mips_tests/LICENSE b/crates/fpvm/open_mips_tests/LICENSE similarity index 100% rename from crates/mipsevm/open_mips_tests/LICENSE rename to crates/fpvm/open_mips_tests/LICENSE diff --git a/crates/mipsevm/open_mips_tests/README.md b/crates/fpvm/open_mips_tests/README.md similarity index 100% rename from crates/mipsevm/open_mips_tests/README.md rename to crates/fpvm/open_mips_tests/README.md diff --git a/crates/mipsevm/open_mips_tests/maketests.py b/crates/fpvm/open_mips_tests/maketests.py similarity index 100% rename from crates/mipsevm/open_mips_tests/maketests.py rename to crates/fpvm/open_mips_tests/maketests.py diff --git a/crates/mipsevm/open_mips_tests/test/add.asm b/crates/fpvm/open_mips_tests/test/add.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/add.asm rename to crates/fpvm/open_mips_tests/test/add.asm diff --git a/crates/mipsevm/open_mips_tests/test/addi.asm b/crates/fpvm/open_mips_tests/test/addi.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/addi.asm rename to crates/fpvm/open_mips_tests/test/addi.asm diff --git a/crates/mipsevm/open_mips_tests/test/addiu.asm b/crates/fpvm/open_mips_tests/test/addiu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/addiu.asm rename to crates/fpvm/open_mips_tests/test/addiu.asm diff --git a/crates/mipsevm/open_mips_tests/test/addu.asm b/crates/fpvm/open_mips_tests/test/addu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/addu.asm rename to crates/fpvm/open_mips_tests/test/addu.asm diff --git a/crates/mipsevm/open_mips_tests/test/and.asm b/crates/fpvm/open_mips_tests/test/and.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/and.asm rename to crates/fpvm/open_mips_tests/test/and.asm diff --git a/crates/mipsevm/open_mips_tests/test/andi.asm b/crates/fpvm/open_mips_tests/test/andi.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/andi.asm rename to crates/fpvm/open_mips_tests/test/andi.asm diff --git a/crates/mipsevm/open_mips_tests/test/beq.asm b/crates/fpvm/open_mips_tests/test/beq.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/beq.asm rename to crates/fpvm/open_mips_tests/test/beq.asm diff --git a/crates/mipsevm/open_mips_tests/test/bgez.asm b/crates/fpvm/open_mips_tests/test/bgez.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bgez.asm rename to crates/fpvm/open_mips_tests/test/bgez.asm diff --git a/crates/mipsevm/open_mips_tests/test/bgtz.asm b/crates/fpvm/open_mips_tests/test/bgtz.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bgtz.asm rename to crates/fpvm/open_mips_tests/test/bgtz.asm diff --git a/crates/mipsevm/open_mips_tests/test/bin/add.bin b/crates/fpvm/open_mips_tests/test/bin/add.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/add.bin rename to crates/fpvm/open_mips_tests/test/bin/add.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/addi.bin b/crates/fpvm/open_mips_tests/test/bin/addi.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/addi.bin rename to crates/fpvm/open_mips_tests/test/bin/addi.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/addiu.bin b/crates/fpvm/open_mips_tests/test/bin/addiu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/addiu.bin rename to crates/fpvm/open_mips_tests/test/bin/addiu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/addu.bin b/crates/fpvm/open_mips_tests/test/bin/addu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/addu.bin rename to crates/fpvm/open_mips_tests/test/bin/addu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/and.bin b/crates/fpvm/open_mips_tests/test/bin/and.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/and.bin rename to crates/fpvm/open_mips_tests/test/bin/and.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/andi.bin b/crates/fpvm/open_mips_tests/test/bin/andi.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/andi.bin rename to crates/fpvm/open_mips_tests/test/bin/andi.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/beq.bin b/crates/fpvm/open_mips_tests/test/bin/beq.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/beq.bin rename to crates/fpvm/open_mips_tests/test/bin/beq.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/bgez.bin b/crates/fpvm/open_mips_tests/test/bin/bgez.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/bgez.bin rename to crates/fpvm/open_mips_tests/test/bin/bgez.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/bgtz.bin b/crates/fpvm/open_mips_tests/test/bin/bgtz.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/bgtz.bin rename to crates/fpvm/open_mips_tests/test/bin/bgtz.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/blez.bin b/crates/fpvm/open_mips_tests/test/bin/blez.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/blez.bin rename to crates/fpvm/open_mips_tests/test/bin/blez.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/bltz.bin b/crates/fpvm/open_mips_tests/test/bin/bltz.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/bltz.bin rename to crates/fpvm/open_mips_tests/test/bin/bltz.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/bne.bin b/crates/fpvm/open_mips_tests/test/bin/bne.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/bne.bin rename to crates/fpvm/open_mips_tests/test/bin/bne.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/brk.bin b/crates/fpvm/open_mips_tests/test/bin/brk.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/brk.bin rename to crates/fpvm/open_mips_tests/test/bin/brk.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/clo.bin b/crates/fpvm/open_mips_tests/test/bin/clo.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/clo.bin rename to crates/fpvm/open_mips_tests/test/bin/clo.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/clone.bin b/crates/fpvm/open_mips_tests/test/bin/clone.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/clone.bin rename to crates/fpvm/open_mips_tests/test/bin/clone.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/clz.bin b/crates/fpvm/open_mips_tests/test/bin/clz.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/clz.bin rename to crates/fpvm/open_mips_tests/test/bin/clz.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/div.bin b/crates/fpvm/open_mips_tests/test/bin/div.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/div.bin rename to crates/fpvm/open_mips_tests/test/bin/div.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/divu.bin b/crates/fpvm/open_mips_tests/test/bin/divu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/divu.bin rename to crates/fpvm/open_mips_tests/test/bin/divu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/exit_group.bin b/crates/fpvm/open_mips_tests/test/bin/exit_group.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/exit_group.bin rename to crates/fpvm/open_mips_tests/test/bin/exit_group.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/fcntl.bin b/crates/fpvm/open_mips_tests/test/bin/fcntl.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/fcntl.bin rename to crates/fpvm/open_mips_tests/test/bin/fcntl.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/j.bin b/crates/fpvm/open_mips_tests/test/bin/j.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/j.bin rename to crates/fpvm/open_mips_tests/test/bin/j.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/jal.bin b/crates/fpvm/open_mips_tests/test/bin/jal.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/jal.bin rename to crates/fpvm/open_mips_tests/test/bin/jal.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/jalr.bin b/crates/fpvm/open_mips_tests/test/bin/jalr.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/jalr.bin rename to crates/fpvm/open_mips_tests/test/bin/jalr.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/jr.bin b/crates/fpvm/open_mips_tests/test/bin/jr.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/jr.bin rename to crates/fpvm/open_mips_tests/test/bin/jr.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lb.bin b/crates/fpvm/open_mips_tests/test/bin/lb.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lb.bin rename to crates/fpvm/open_mips_tests/test/bin/lb.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lbu.bin b/crates/fpvm/open_mips_tests/test/bin/lbu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lbu.bin rename to crates/fpvm/open_mips_tests/test/bin/lbu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lh.bin b/crates/fpvm/open_mips_tests/test/bin/lh.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lh.bin rename to crates/fpvm/open_mips_tests/test/bin/lh.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lhu.bin b/crates/fpvm/open_mips_tests/test/bin/lhu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lhu.bin rename to crates/fpvm/open_mips_tests/test/bin/lhu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lui.bin b/crates/fpvm/open_mips_tests/test/bin/lui.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lui.bin rename to crates/fpvm/open_mips_tests/test/bin/lui.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lw.bin b/crates/fpvm/open_mips_tests/test/bin/lw.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lw.bin rename to crates/fpvm/open_mips_tests/test/bin/lw.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lwl.bin b/crates/fpvm/open_mips_tests/test/bin/lwl.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lwl.bin rename to crates/fpvm/open_mips_tests/test/bin/lwl.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/lwr.bin b/crates/fpvm/open_mips_tests/test/bin/lwr.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/lwr.bin rename to crates/fpvm/open_mips_tests/test/bin/lwr.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/mfthi.bin b/crates/fpvm/open_mips_tests/test/bin/mfthi.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/mfthi.bin rename to crates/fpvm/open_mips_tests/test/bin/mfthi.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/mftlo.bin b/crates/fpvm/open_mips_tests/test/bin/mftlo.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/mftlo.bin rename to crates/fpvm/open_mips_tests/test/bin/mftlo.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/mmap.bin b/crates/fpvm/open_mips_tests/test/bin/mmap.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/mmap.bin rename to crates/fpvm/open_mips_tests/test/bin/mmap.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/movn.bin b/crates/fpvm/open_mips_tests/test/bin/movn.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/movn.bin rename to crates/fpvm/open_mips_tests/test/bin/movn.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/movz.bin b/crates/fpvm/open_mips_tests/test/bin/movz.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/movz.bin rename to crates/fpvm/open_mips_tests/test/bin/movz.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/mul.bin b/crates/fpvm/open_mips_tests/test/bin/mul.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/mul.bin rename to crates/fpvm/open_mips_tests/test/bin/mul.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/mult.bin b/crates/fpvm/open_mips_tests/test/bin/mult.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/mult.bin rename to crates/fpvm/open_mips_tests/test/bin/mult.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/multu.bin b/crates/fpvm/open_mips_tests/test/bin/multu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/multu.bin rename to crates/fpvm/open_mips_tests/test/bin/multu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/nor.bin b/crates/fpvm/open_mips_tests/test/bin/nor.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/nor.bin rename to crates/fpvm/open_mips_tests/test/bin/nor.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/oracle.bin b/crates/fpvm/open_mips_tests/test/bin/oracle.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/oracle.bin rename to crates/fpvm/open_mips_tests/test/bin/oracle.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/oracle_unaligned_read.bin b/crates/fpvm/open_mips_tests/test/bin/oracle_unaligned_read.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/oracle_unaligned_read.bin rename to crates/fpvm/open_mips_tests/test/bin/oracle_unaligned_read.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/oracle_unaligned_write.bin b/crates/fpvm/open_mips_tests/test/bin/oracle_unaligned_write.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/oracle_unaligned_write.bin rename to crates/fpvm/open_mips_tests/test/bin/oracle_unaligned_write.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/ori.bin b/crates/fpvm/open_mips_tests/test/bin/ori.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/ori.bin rename to crates/fpvm/open_mips_tests/test/bin/ori.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sb.bin b/crates/fpvm/open_mips_tests/test/bin/sb.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sb.bin rename to crates/fpvm/open_mips_tests/test/bin/sb.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sh.bin b/crates/fpvm/open_mips_tests/test/bin/sh.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sh.bin rename to crates/fpvm/open_mips_tests/test/bin/sh.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sll.bin b/crates/fpvm/open_mips_tests/test/bin/sll.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sll.bin rename to crates/fpvm/open_mips_tests/test/bin/sll.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sllv.bin b/crates/fpvm/open_mips_tests/test/bin/sllv.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sllv.bin rename to crates/fpvm/open_mips_tests/test/bin/sllv.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/slt.bin b/crates/fpvm/open_mips_tests/test/bin/slt.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/slt.bin rename to crates/fpvm/open_mips_tests/test/bin/slt.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/slti.bin b/crates/fpvm/open_mips_tests/test/bin/slti.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/slti.bin rename to crates/fpvm/open_mips_tests/test/bin/slti.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sltiu.bin b/crates/fpvm/open_mips_tests/test/bin/sltiu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sltiu.bin rename to crates/fpvm/open_mips_tests/test/bin/sltiu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sltu.bin b/crates/fpvm/open_mips_tests/test/bin/sltu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sltu.bin rename to crates/fpvm/open_mips_tests/test/bin/sltu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sra.bin b/crates/fpvm/open_mips_tests/test/bin/sra.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sra.bin rename to crates/fpvm/open_mips_tests/test/bin/sra.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/srav.bin b/crates/fpvm/open_mips_tests/test/bin/srav.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/srav.bin rename to crates/fpvm/open_mips_tests/test/bin/srav.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/srl.bin b/crates/fpvm/open_mips_tests/test/bin/srl.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/srl.bin rename to crates/fpvm/open_mips_tests/test/bin/srl.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/srlv.bin b/crates/fpvm/open_mips_tests/test/bin/srlv.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/srlv.bin rename to crates/fpvm/open_mips_tests/test/bin/srlv.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/sub.bin b/crates/fpvm/open_mips_tests/test/bin/sub.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/sub.bin rename to crates/fpvm/open_mips_tests/test/bin/sub.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/subu.bin b/crates/fpvm/open_mips_tests/test/bin/subu.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/subu.bin rename to crates/fpvm/open_mips_tests/test/bin/subu.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/swl.bin b/crates/fpvm/open_mips_tests/test/bin/swl.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/swl.bin rename to crates/fpvm/open_mips_tests/test/bin/swl.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/swr.bin b/crates/fpvm/open_mips_tests/test/bin/swr.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/swr.bin rename to crates/fpvm/open_mips_tests/test/bin/swr.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/xor.bin b/crates/fpvm/open_mips_tests/test/bin/xor.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/xor.bin rename to crates/fpvm/open_mips_tests/test/bin/xor.bin diff --git a/crates/mipsevm/open_mips_tests/test/bin/xori.bin b/crates/fpvm/open_mips_tests/test/bin/xori.bin similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bin/xori.bin rename to crates/fpvm/open_mips_tests/test/bin/xori.bin diff --git a/crates/mipsevm/open_mips_tests/test/blez.asm b/crates/fpvm/open_mips_tests/test/blez.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/blez.asm rename to crates/fpvm/open_mips_tests/test/blez.asm diff --git a/crates/mipsevm/open_mips_tests/test/bltz.asm b/crates/fpvm/open_mips_tests/test/bltz.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bltz.asm rename to crates/fpvm/open_mips_tests/test/bltz.asm diff --git a/crates/mipsevm/open_mips_tests/test/bne.asm b/crates/fpvm/open_mips_tests/test/bne.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/bne.asm rename to crates/fpvm/open_mips_tests/test/bne.asm diff --git a/crates/mipsevm/open_mips_tests/test/brk.asm b/crates/fpvm/open_mips_tests/test/brk.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/brk.asm rename to crates/fpvm/open_mips_tests/test/brk.asm diff --git a/crates/mipsevm/open_mips_tests/test/clo.asm b/crates/fpvm/open_mips_tests/test/clo.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/clo.asm rename to crates/fpvm/open_mips_tests/test/clo.asm diff --git a/crates/mipsevm/open_mips_tests/test/clone.asm b/crates/fpvm/open_mips_tests/test/clone.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/clone.asm rename to crates/fpvm/open_mips_tests/test/clone.asm diff --git a/crates/mipsevm/open_mips_tests/test/clz.asm b/crates/fpvm/open_mips_tests/test/clz.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/clz.asm rename to crates/fpvm/open_mips_tests/test/clz.asm diff --git a/crates/mipsevm/open_mips_tests/test/div.asm b/crates/fpvm/open_mips_tests/test/div.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/div.asm rename to crates/fpvm/open_mips_tests/test/div.asm diff --git a/crates/mipsevm/open_mips_tests/test/divu.asm b/crates/fpvm/open_mips_tests/test/divu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/divu.asm rename to crates/fpvm/open_mips_tests/test/divu.asm diff --git a/crates/mipsevm/open_mips_tests/test/exit_group.asm b/crates/fpvm/open_mips_tests/test/exit_group.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/exit_group.asm rename to crates/fpvm/open_mips_tests/test/exit_group.asm diff --git a/crates/mipsevm/open_mips_tests/test/fcntl.asm b/crates/fpvm/open_mips_tests/test/fcntl.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/fcntl.asm rename to crates/fpvm/open_mips_tests/test/fcntl.asm diff --git a/crates/mipsevm/open_mips_tests/test/j.asm b/crates/fpvm/open_mips_tests/test/j.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/j.asm rename to crates/fpvm/open_mips_tests/test/j.asm diff --git a/crates/mipsevm/open_mips_tests/test/jal.asm b/crates/fpvm/open_mips_tests/test/jal.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/jal.asm rename to crates/fpvm/open_mips_tests/test/jal.asm diff --git a/crates/mipsevm/open_mips_tests/test/jalr.asm b/crates/fpvm/open_mips_tests/test/jalr.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/jalr.asm rename to crates/fpvm/open_mips_tests/test/jalr.asm diff --git a/crates/mipsevm/open_mips_tests/test/jr.asm b/crates/fpvm/open_mips_tests/test/jr.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/jr.asm rename to crates/fpvm/open_mips_tests/test/jr.asm diff --git a/crates/mipsevm/open_mips_tests/test/lb.asm b/crates/fpvm/open_mips_tests/test/lb.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lb.asm rename to crates/fpvm/open_mips_tests/test/lb.asm diff --git a/crates/mipsevm/open_mips_tests/test/lbu.asm b/crates/fpvm/open_mips_tests/test/lbu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lbu.asm rename to crates/fpvm/open_mips_tests/test/lbu.asm diff --git a/crates/mipsevm/open_mips_tests/test/lh.asm b/crates/fpvm/open_mips_tests/test/lh.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lh.asm rename to crates/fpvm/open_mips_tests/test/lh.asm diff --git a/crates/mipsevm/open_mips_tests/test/lhu.asm b/crates/fpvm/open_mips_tests/test/lhu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lhu.asm rename to crates/fpvm/open_mips_tests/test/lhu.asm diff --git a/crates/mipsevm/open_mips_tests/test/lui.asm b/crates/fpvm/open_mips_tests/test/lui.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lui.asm rename to crates/fpvm/open_mips_tests/test/lui.asm diff --git a/crates/mipsevm/open_mips_tests/test/lw.asm b/crates/fpvm/open_mips_tests/test/lw.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lw.asm rename to crates/fpvm/open_mips_tests/test/lw.asm diff --git a/crates/mipsevm/open_mips_tests/test/lwl.asm b/crates/fpvm/open_mips_tests/test/lwl.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lwl.asm rename to crates/fpvm/open_mips_tests/test/lwl.asm diff --git a/crates/mipsevm/open_mips_tests/test/lwr.asm b/crates/fpvm/open_mips_tests/test/lwr.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/lwr.asm rename to crates/fpvm/open_mips_tests/test/lwr.asm diff --git a/crates/mipsevm/open_mips_tests/test/mfthi.asm b/crates/fpvm/open_mips_tests/test/mfthi.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/mfthi.asm rename to crates/fpvm/open_mips_tests/test/mfthi.asm diff --git a/crates/mipsevm/open_mips_tests/test/mftlo.asm b/crates/fpvm/open_mips_tests/test/mftlo.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/mftlo.asm rename to crates/fpvm/open_mips_tests/test/mftlo.asm diff --git a/crates/mipsevm/open_mips_tests/test/mmap.asm b/crates/fpvm/open_mips_tests/test/mmap.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/mmap.asm rename to crates/fpvm/open_mips_tests/test/mmap.asm diff --git a/crates/mipsevm/open_mips_tests/test/movn.asm b/crates/fpvm/open_mips_tests/test/movn.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/movn.asm rename to crates/fpvm/open_mips_tests/test/movn.asm diff --git a/crates/mipsevm/open_mips_tests/test/movz.asm b/crates/fpvm/open_mips_tests/test/movz.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/movz.asm rename to crates/fpvm/open_mips_tests/test/movz.asm diff --git a/crates/mipsevm/open_mips_tests/test/mul.asm b/crates/fpvm/open_mips_tests/test/mul.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/mul.asm rename to crates/fpvm/open_mips_tests/test/mul.asm diff --git a/crates/mipsevm/open_mips_tests/test/mult.asm b/crates/fpvm/open_mips_tests/test/mult.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/mult.asm rename to crates/fpvm/open_mips_tests/test/mult.asm diff --git a/crates/mipsevm/open_mips_tests/test/multu.asm b/crates/fpvm/open_mips_tests/test/multu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/multu.asm rename to crates/fpvm/open_mips_tests/test/multu.asm diff --git a/crates/mipsevm/open_mips_tests/test/nor.asm b/crates/fpvm/open_mips_tests/test/nor.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/nor.asm rename to crates/fpvm/open_mips_tests/test/nor.asm diff --git a/crates/mipsevm/open_mips_tests/test/oracle.asm b/crates/fpvm/open_mips_tests/test/oracle.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/oracle.asm rename to crates/fpvm/open_mips_tests/test/oracle.asm diff --git a/crates/mipsevm/open_mips_tests/test/oracle_unaligned_read.asm b/crates/fpvm/open_mips_tests/test/oracle_unaligned_read.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/oracle_unaligned_read.asm rename to crates/fpvm/open_mips_tests/test/oracle_unaligned_read.asm diff --git a/crates/mipsevm/open_mips_tests/test/oracle_unaligned_write.asm b/crates/fpvm/open_mips_tests/test/oracle_unaligned_write.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/oracle_unaligned_write.asm rename to crates/fpvm/open_mips_tests/test/oracle_unaligned_write.asm diff --git a/crates/mipsevm/open_mips_tests/test/ori.asm b/crates/fpvm/open_mips_tests/test/ori.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/ori.asm rename to crates/fpvm/open_mips_tests/test/ori.asm diff --git a/crates/mipsevm/open_mips_tests/test/sb.asm b/crates/fpvm/open_mips_tests/test/sb.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sb.asm rename to crates/fpvm/open_mips_tests/test/sb.asm diff --git a/crates/mipsevm/open_mips_tests/test/sh.asm b/crates/fpvm/open_mips_tests/test/sh.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sh.asm rename to crates/fpvm/open_mips_tests/test/sh.asm diff --git a/crates/mipsevm/open_mips_tests/test/sll.asm b/crates/fpvm/open_mips_tests/test/sll.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sll.asm rename to crates/fpvm/open_mips_tests/test/sll.asm diff --git a/crates/mipsevm/open_mips_tests/test/sllv.asm b/crates/fpvm/open_mips_tests/test/sllv.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sllv.asm rename to crates/fpvm/open_mips_tests/test/sllv.asm diff --git a/crates/mipsevm/open_mips_tests/test/slt.asm b/crates/fpvm/open_mips_tests/test/slt.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/slt.asm rename to crates/fpvm/open_mips_tests/test/slt.asm diff --git a/crates/mipsevm/open_mips_tests/test/slti.asm b/crates/fpvm/open_mips_tests/test/slti.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/slti.asm rename to crates/fpvm/open_mips_tests/test/slti.asm diff --git a/crates/mipsevm/open_mips_tests/test/sltiu.asm b/crates/fpvm/open_mips_tests/test/sltiu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sltiu.asm rename to crates/fpvm/open_mips_tests/test/sltiu.asm diff --git a/crates/mipsevm/open_mips_tests/test/sltu.asm b/crates/fpvm/open_mips_tests/test/sltu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sltu.asm rename to crates/fpvm/open_mips_tests/test/sltu.asm diff --git a/crates/mipsevm/open_mips_tests/test/sra.asm b/crates/fpvm/open_mips_tests/test/sra.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sra.asm rename to crates/fpvm/open_mips_tests/test/sra.asm diff --git a/crates/mipsevm/open_mips_tests/test/srav.asm b/crates/fpvm/open_mips_tests/test/srav.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/srav.asm rename to crates/fpvm/open_mips_tests/test/srav.asm diff --git a/crates/mipsevm/open_mips_tests/test/srl.asm b/crates/fpvm/open_mips_tests/test/srl.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/srl.asm rename to crates/fpvm/open_mips_tests/test/srl.asm diff --git a/crates/mipsevm/open_mips_tests/test/srlv.asm b/crates/fpvm/open_mips_tests/test/srlv.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/srlv.asm rename to crates/fpvm/open_mips_tests/test/srlv.asm diff --git a/crates/mipsevm/open_mips_tests/test/sub.asm b/crates/fpvm/open_mips_tests/test/sub.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/sub.asm rename to crates/fpvm/open_mips_tests/test/sub.asm diff --git a/crates/mipsevm/open_mips_tests/test/subu.asm b/crates/fpvm/open_mips_tests/test/subu.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/subu.asm rename to crates/fpvm/open_mips_tests/test/subu.asm diff --git a/crates/mipsevm/open_mips_tests/test/swl.asm b/crates/fpvm/open_mips_tests/test/swl.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/swl.asm rename to crates/fpvm/open_mips_tests/test/swl.asm diff --git a/crates/mipsevm/open_mips_tests/test/swr.asm b/crates/fpvm/open_mips_tests/test/swr.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/swr.asm rename to crates/fpvm/open_mips_tests/test/swr.asm diff --git a/crates/mipsevm/open_mips_tests/test/xor.asm b/crates/fpvm/open_mips_tests/test/xor.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/xor.asm rename to crates/fpvm/open_mips_tests/test/xor.asm diff --git a/crates/mipsevm/open_mips_tests/test/xori.asm b/crates/fpvm/open_mips_tests/test/xori.asm similarity index 100% rename from crates/mipsevm/open_mips_tests/test/xori.asm rename to crates/fpvm/open_mips_tests/test/xori.asm diff --git a/crates/mipsevm/src/lib.rs b/crates/fpvm/src/lib.rs similarity index 100% rename from crates/mipsevm/src/lib.rs rename to crates/fpvm/src/lib.rs diff --git a/crates/mipsevm/src/memory.rs b/crates/fpvm/src/memory.rs similarity index 100% rename from crates/mipsevm/src/memory.rs rename to crates/fpvm/src/memory.rs diff --git a/crates/mipsevm/src/mips/instrumented.rs b/crates/fpvm/src/mips/instrumented.rs similarity index 100% rename from crates/mipsevm/src/mips/instrumented.rs rename to crates/fpvm/src/mips/instrumented.rs diff --git a/crates/mipsevm/src/mips/mips_vm.rs b/crates/fpvm/src/mips/mips_vm.rs similarity index 100% rename from crates/mipsevm/src/mips/mips_vm.rs rename to crates/fpvm/src/mips/mips_vm.rs diff --git a/crates/mipsevm/src/mips/mod.rs b/crates/fpvm/src/mips/mod.rs similarity index 100% rename from crates/mipsevm/src/mips/mod.rs rename to crates/fpvm/src/mips/mod.rs diff --git a/crates/mipsevm/src/page.rs b/crates/fpvm/src/page.rs similarity index 100% rename from crates/mipsevm/src/page.rs rename to crates/fpvm/src/page.rs diff --git a/crates/mipsevm/src/patch.rs b/crates/fpvm/src/patch.rs similarity index 99% rename from crates/mipsevm/src/patch.rs rename to crates/fpvm/src/patch.rs index f142a57..fbf3e1f 100644 --- a/crates/mipsevm/src/patch.rs +++ b/crates/fpvm/src/patch.rs @@ -96,7 +96,7 @@ pub fn load_elf(raw: &[u8]) -> Result { Ok(state) } -/// Patch a Go ELF file to work with mipsevm. +/// Patch a Go ELF file to work with the Cannon FPVM. /// /// ### Takes /// - `elf`: The ELF file to patch diff --git a/crates/mipsevm/src/ser.rs b/crates/fpvm/src/ser.rs similarity index 96% rename from crates/mipsevm/src/ser.rs rename to crates/fpvm/src/ser.rs index af3f918..1098d28 100644 --- a/crates/mipsevm/src/ser.rs +++ b/crates/fpvm/src/ser.rs @@ -1,4 +1,4 @@ -//! Serialization utilities for the `cannon-mipsevm` crate. +//! Serialization utilities for the `cannon-fpvm` crate. /// Generates a hex string serialization module for a fixed-size byte array. macro_rules! fixed_hex_ser { diff --git a/crates/mipsevm/src/state.rs b/crates/fpvm/src/state.rs similarity index 100% rename from crates/mipsevm/src/state.rs rename to crates/fpvm/src/state.rs diff --git a/crates/mipsevm/src/test_utils/evm.rs b/crates/fpvm/src/test_utils/evm.rs similarity index 100% rename from crates/mipsevm/src/test_utils/evm.rs rename to crates/fpvm/src/test_utils/evm.rs diff --git a/crates/mipsevm/src/test_utils/mod.rs b/crates/fpvm/src/test_utils/mod.rs similarity index 100% rename from crates/mipsevm/src/test_utils/mod.rs rename to crates/fpvm/src/test_utils/mod.rs diff --git a/crates/mipsevm/src/traces.rs b/crates/fpvm/src/traces.rs similarity index 100% rename from crates/mipsevm/src/traces.rs rename to crates/fpvm/src/traces.rs diff --git a/crates/mipsevm/src/traits.rs b/crates/fpvm/src/traits.rs similarity index 100% rename from crates/mipsevm/src/traits.rs rename to crates/fpvm/src/traits.rs diff --git a/crates/mipsevm/src/types.rs b/crates/fpvm/src/types.rs similarity index 100% rename from crates/mipsevm/src/types.rs rename to crates/fpvm/src/types.rs diff --git a/crates/mipsevm/src/utils.rs b/crates/fpvm/src/utils.rs similarity index 100% rename from crates/mipsevm/src/utils.rs rename to crates/fpvm/src/utils.rs diff --git a/crates/mipsevm/src/witness.rs b/crates/fpvm/src/witness.rs similarity index 91% rename from crates/mipsevm/src/witness.rs rename to crates/fpvm/src/witness.rs index 53344f8..5d8acc7 100644 --- a/crates/mipsevm/src/witness.rs +++ b/crates/fpvm/src/witness.rs @@ -75,14 +75,14 @@ impl StepWitness { match KeyType::from(preimage_key[0]) { KeyType::_Illegal => { - crate::error!(target: "mipsevm::step_witness", "Illegal key type"); + crate::error!(target: "fpvm::step_witness", "Illegal key type"); None } KeyType::Local => { let preimage_value = &self.preimage_value.clone()?; if preimage_value.len() > 32 + 8 { - crate::error!(target: "mipsevm::step_witness", "Local preimage value exceeds maximum size of 32 bytes with key 0x{:x}", B256::from(self.preimage_key?)); + crate::error!(target: "fpvm::step_witness", "Local preimage value exceeds maximum size of 32 bytes with key 0x{:x}", B256::from(self.preimage_key?)); return None; } @@ -102,7 +102,7 @@ impl StepWitness { KeyType::GlobalKeccak => { let call = loadKeccak256PreimagePartCall { _0: U256::from(self.preimage_offset?), - _1: self.preimage_value.clone()?[8..].to_vec(), + _1: self.preimage_value.clone()?[8..].to_vec().into(), }; Some(call.abi_encode().into()) @@ -116,8 +116,8 @@ impl StepWitness { /// - The ABI encoded input to the MIPS step function. pub fn encode_step_input(&self) -> Bytes { let call = stepCall { - _0: self.state.to_vec(), - _1: self.mem_proof.to_vec(), + _0: self.state.to_vec().into(), + _1: self.mem_proof.to_vec().into(), }; call.abi_encode().into() diff --git a/crates/mipsevm/bindings/optimism b/crates/mipsevm/bindings/optimism deleted file mode 160000 index a7ff5a8..0000000 --- a/crates/mipsevm/bindings/optimism +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a7ff5a811612fa338d0a6d6dd72dc2ec9badef6d diff --git a/crates/preimage/README.md b/crates/preimage/README.md index 9ad17f4..4a70180 100644 --- a/crates/preimage/README.md +++ b/crates/preimage/README.md @@ -5,7 +5,7 @@ The `preimage-oracle` crate offers bindings to interact as client or sever over Read more about the Preimage Oracle in the OP Stack [specs][specs]. See the OP Stack's [op-program][op-program] and [Cannon client examples](../../example) for client-side usage. -See [`mipsevm`](../mipsevm) for server-side usage. +See [`cannon-fpvm`](../fpvm) for server-side usage. [specs]: https://github.com/ethereum-optimism/optimism/blob/6c7f366a55febbb119aa0b02d73f008c1c909900/specs/fault-proof.md [op-program]: https://github.com/ethereum-optimism/optimism/tree/develop/op-program