diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index be0ffbca4..838df3b5b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,14 +71,15 @@ jobs: - uses: rui314/setup-mold@v1 - name: Install Rust run: rustup show + - name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code + run: cargo install cargo-risczero + - name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain + run: cargo risczero install - uses: Swatinem/rust-cache@v2 with: cache-provider: "buildjet" shared-key: cargo-check save-if: ${{ github.ref == 'refs/heads/nightly' }} - workspaces: | - . - examples/demo-prover - name: Run lint run: | if ! make lint ; then @@ -94,6 +95,8 @@ jobs: needs: check runs-on: buildjet-4vcpu-ubuntu-2204 timeout-minutes: 60 + env: + CI_SKIP_GUEST_BUILD: "1" steps: - uses: actions/checkout@v3 - uses: rui314/setup-mold@v1 @@ -106,15 +109,14 @@ jobs: cache-provider: "buildjet" shared-key: cargo-check save-if: ${{ github.ref == 'refs/heads/nightly' }} - workspaces: | - . - examples/demo-prover # intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4 - name: cargo hack run: make check-features test: runs-on: buildjet-4vcpu-ubuntu-2204 timeout-minutes: 60 + env: + CI_SKIP_GUEST_BUILD: "1" steps: - uses: actions/checkout@v3 - uses: rui314/setup-mold@v1 @@ -127,9 +129,6 @@ jobs: cache-provider: "buildjet" shared-key: cargo-build save-if: ${{ github.ref == 'refs/heads/nightly' }} - workspaces: | - . - examples/demo-prover - run: cargo nextest run --workspace --all-features # `cargo-nextest` does not support doctests (yet?), so we have to run them # separately. @@ -150,9 +149,6 @@ jobs: cache-provider: "buildjet" shared-key: cargo-build save-if: ${{ github.ref == 'refs/heads/nightly' }} - workspaces: | - . - examples/demo-prover - name: start celestia local working-directory: ./examples/demo-rollup run: make start @@ -196,44 +192,11 @@ jobs: done echo "demo-rollup took too long to process transaction; exiting" exit 1 - # TODO: Temporary before migration to RiscZero 0.15: - # https://github.com/Sovereign-Labs/sovereign-sdk/issues/338. - # After that demo-prover should be integrated into workspace. - # Note that `demo-prover` has (at the time of writing) a different `dev` - # profile from the rest of the codebase, so caches can't be shared. - check-demo-prover: - name: check demo prover - runs-on: buildjet-4vcpu-ubuntu-2204 - timeout-minutes: 90 - steps: - - uses: actions/checkout@v3 - - uses: rui314/setup-mold@v1 - - name: Install Rust - run: rustup show - - name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code - run: cargo install cargo-risczero - - name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain - run: cargo risczero install - - uses: Swatinem/rust-cache@v2 - with: - cache-provider: "buildjet" - save-if: ${{ github.ref == 'refs/heads/nightly' }} - workspaces: | - . - examples/demo-prover - - name: Run cargo check - working-directory: examples/demo-prover - run: cargo check - - name: Run cargo fmt check - run: | - cd examples/demo-prover; - if ! cargo fmt --check ; then - echo "Formatting errors detected, please run 'cargo fmt' to fix it"; - exit 1 - fi coverage: runs-on: buildjet-8vcpu-ubuntu-2204 timeout-minutes: 90 + env: + CI_SKIP_GUEST_BUILD: "1" steps: - uses: actions/checkout@v3 with: @@ -249,9 +212,6 @@ jobs: with: cache-provider: "buildjet" save-if: ${{ github.ref == 'refs/heads/nightly' }} - workspaces: | - . - examples/demo-prover - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' run: cargo generate-lockfile @@ -274,6 +234,7 @@ jobs: timeout-minutes: 90 env: RUSTDOCFLAGS: "-D warnings" + CI_SKIP_GUEST_BUILD: "1" steps: - uses: actions/checkout@v3 # Not sure installing `mold` is actually needed, but it's what the @@ -287,9 +248,6 @@ jobs: cache-provider: "buildjet" shared-key: cargo-doc save-if: ${{ github.ref == 'refs/heads/nightly' }} - workspaces: | - . - examples/demo-prover # The docs' artifact tends to become quite large with all the # dependencies, so we don't include them. - run: cargo doc --no-deps --all-features diff --git a/Cargo.lock b/Cargo.lock index e3827ca67..f61676d3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,6 +196,12 @@ dependencies = [ "derive_arbitrary", ] +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + [[package]] name = "ark-ff" version = "0.3.0" @@ -923,6 +929,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_metadata" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.18", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cast" version = "0.3.0" @@ -962,8 +982,10 @@ checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", + "js-sys", "num-traits", "serde", + "wasm-bindgen", "windows-targets", ] @@ -1604,6 +1626,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "destructure_traitobject" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c877555693c14d2f84191cfd3ad8582790fc52b5e2274b40b59cf5f5cea25c7" + [[package]] name = "diff" version = "0.1.13" @@ -1863,6 +1891,19 @@ dependencies = [ "syn 2.0.37", ] +[[package]] +name = "env_logger" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -2065,7 +2106,7 @@ checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" dependencies = [ "arrayvec", "bytes", - "cargo_metadata", + "cargo_metadata 0.15.4", "chrono", "elliptic-curve", "ethabi", @@ -2841,6 +2882,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "0.14.27" @@ -3530,6 +3577,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.4.7" @@ -3557,6 +3610,41 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +dependencies = [ + "serde", +] + +[[package]] +name = "log-mdc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" + +[[package]] +name = "log4rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36ca1786d9e79b8193a68d480a0907b612f109537115c6ff655a3a1967533fd" +dependencies = [ + "anyhow", + "arc-swap", + "chrono", + "derivative", + "fnv", + "humantime", + "libc", + "log", + "log-mdc", + "parking_lot 0.12.1", + "serde", + "serde-value", + "serde_json", + "serde_yaml", + "thiserror", + "thread-id", + "typemap-ors", + "winapi", +] [[package]] name = "lz4-sys" @@ -3620,6 +3708,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "methods" +version = "0.2.0" +dependencies = [ + "risc0-build", +] + [[package]] name = "metrics" version = "0.20.1" @@ -4083,6 +4178,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordered-float" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +dependencies = [ + "num-traits", +] + [[package]] name = "overload" version = "0.1.1" @@ -5472,6 +5576,20 @@ dependencies = [ "serde", ] +[[package]] +name = "risc0-build" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703b79671cd148f6535e1f78b8a74f665c920493eb6546c516c67ab0bc0bbde1" +dependencies = [ + "cargo_metadata 0.17.0", + "risc0-binfmt", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "serde_json", +] + [[package]] name = "risc0-build-kernel" version = "0.18.0" @@ -6033,6 +6151,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.12" @@ -6146,6 +6274,18 @@ dependencies = [ "syn 2.0.37", ] +[[package]] +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap 1.9.3", + "ryu", + "serde", + "yaml-rust", +] + [[package]] name = "sha-1" version = "0.9.8" @@ -6524,6 +6664,43 @@ dependencies = [ "tokio", ] +[[package]] +name = "sov-demo-prover-host" +version = "0.2.0" +dependencies = [ + "anyhow", + "bincode", + "borsh", + "const-rollup-config", + "demo-stf", + "env_logger", + "hex", + "jsonrpsee", + "log", + "log4rs", + "methods", + "once_cell", + "parking_lot 0.11.2", + "prettytable-rs", + "regex", + "risc0-zkvm", + "serde", + "serde_json", + "sha2 0.10.7", + "sov-celestia-adapter", + "sov-demo-rollup", + "sov-modules-api", + "sov-risc0-adapter", + "sov-rollup-interface", + "sov-state", + "sov-stf-runner", + "sov-zk-cycle-macros", + "tempfile", + "tokio", + "tracing", + "tracing-subscriber", +] + [[package]] name = "sov-demo-rollup" version = "0.2.0" @@ -7267,6 +7444,17 @@ dependencies = [ "syn 2.0.37", ] +[[package]] +name = "thread-id" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79474f573561cdc4871a0de34a51c92f7f5a56039113fbb5b9c9f96bdb756669" +dependencies = [ + "libc", + "redox_syscall 0.2.16", + "winapi", +] + [[package]] name = "thread_local" version = "1.1.7" @@ -7673,6 +7861,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typemap-ors" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68c24b707f02dd18f1e4ccceb9d49f2058c2fb86384ef9972592904d7a28867" +dependencies = [ + "unsafe-any-ors", +] + [[package]] name = "typenum" version = "1.17.0" @@ -7772,6 +7969,15 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unsafe-any-ors" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a303d30665362d9680d7d91d78b23f5f899504d4f08b3c4cf08d055d87c0ad" +dependencies = [ + "destructure_traitobject", +] + [[package]] name = "untrusted" version = "0.7.1" @@ -8199,6 +8405,15 @@ dependencies = [ "tap", ] +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "yansi" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index f1c3014ec..49cc2bf46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ members = [ "examples/demo-simple-stf", "examples/demo-rollup", "examples/demo-nft-module", + "examples/demo-prover", "full-node/db/sov-db", "full-node/sov-sequencer", @@ -40,9 +41,6 @@ members = [ "module-system/module-implementations/examples/sov-accessory-state", "module-system/module-implementations/integration-tests", ] -exclude = [ - "examples/demo-prover", -] [workspace.package] version = "0.2.0" diff --git a/Makefile b/Makefile index 2532bee5a..fb78edad4 100644 --- a/Makefile +++ b/Makefile @@ -22,16 +22,16 @@ install-dev-tools: ## Installs all necessary cargo helpers cargo install flaky-finder cargo install cargo-nextest --locked -lint: ## cargo check and clippy +lint: ## cargo check and clippy. Skip clippy on guest code since it's not supported by risc0 ## fmt first, because it's the cheapest cargo fmt --all --check cargo check --all-targets --all-features - cargo clippy --all-targets --all-features + CI_SKIP_GUEST_BUILD=1 cargo clippy --all-targets --all-features -lint-fix: ## cargo fmt, fix and clippy +lint-fix: ## cargo fmt, fix and clippy. Skip clippy on guest code since it's not supported by risc0 cargo fmt --all cargo fix --allow-dirty - cargo clippy --fix --allow-dirty + CI_SKIP_GUEST_BUILD=1 cargo clippy --fix --allow-dirty check-features: ## Checks that project compiles with all combinations of features. default is not needed because we never check `cfg(default)`, we only use it as an alias. cargo hack check --workspace --feature-powerset --exclude-features default diff --git a/adapters/risc0/src/host.rs b/adapters/risc0/src/host.rs index 4f8f0cd71..83b2e56fe 100644 --- a/adapters/risc0/src/host.rs +++ b/adapters/risc0/src/host.rs @@ -69,6 +69,15 @@ impl<'a> ZkvmHost for Risc0Host<'a> { fn simulate_with_hints(&mut self) -> Self::Guest { Risc0Guest::with_hints(std::mem::take(&mut self.env.lock().unwrap())) } + + fn run(&mut self, with_proof: bool) -> Result<(), anyhow::Error> { + if with_proof { + self.run()?; + } else { + self.run_without_proving()?; + } + Ok(()) + } } impl<'host> Zkvm for Risc0Host<'host> { diff --git a/examples/demo-prover/Cargo.toml b/examples/demo-prover/Cargo.toml index 680a8f8b8..3011a5414 100644 --- a/examples/demo-prover/Cargo.toml +++ b/examples/demo-prover/Cargo.toml @@ -1,34 +1,54 @@ -[workspace] -members = [ - "methods", - "host", -] +[package] +name = "sov-demo-prover-host" +version = "0.2.0" +edition = "2021" +publish = false +license = "MIT OR Apache-2.0" resolver = "2" -[workspace.dependencies] -anyhow = "1.0.68" -borsh = { version = "0.10.3", features = ["rc", "bytes"] } -bincode = "1.3.3" -hex = "0.4.3" -jsonrpsee = "0.16.2" -serde = { version = "1.0.137", features = ["derive", "rc"] } -serde_json = { version = "1.0" } -sha2 = "0.10.6" -risc0-zkvm = { version = "0.18" } -risc0-build = { version = "0.18" } -tokio = { version = "1", features = ["full"] } -tempfile = "3.6.0" +[dependencies] +anyhow = { workspace = true } +borsh = { workspace = true } +bincode = { workspace = true } +hex = { workspace = true } +jsonrpsee = { workspace = true, features = ["http-client", "server"] } +risc0-zkvm = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +sha2 = { workspace = true } +tokio = { workspace = true } +tracing = "0.1.37" +tracing-subscriber = "0.3.16" -# Always optimize; building and running the guest takes much longer without optimization. -[profile.dev] -opt-level = 3 +sov-celestia-adapter = { path = "../../adapters/celestia", features = ["native", "bench"] } +sov-demo-rollup = { path = "../demo-rollup" } +demo-stf = { path = "../demo-stf", optional = true } +sov-rollup-interface = { path = "../../rollup-interface" } +sov-risc0-adapter = { path = "../../adapters/risc0", features = ["native"] } +const-rollup-config = { path = "../const-rollup-config" } +sov-modules-api = { path = "../../module-system/sov-modules-api", features = ["native"] } +sov-state = { path = "../../module-system/sov-state", features = ["native"] } +sov-zk-cycle-macros = { path = "../../utils/zk-cycle-macros", optional = true } +sov-stf-runner = { path = "../../full-node/sov-stf-runner" } -[profile.dev.build-override] -opt-level = 3 +methods = { path = "./methods" } -[profile.release] -debug = 1 -lto = true -[profile.release.build-override] -opt-level = 3 +[dev-dependencies] +tempfile = { workspace = true } +once_cell = "1.7.2" +parking_lot = "0.11.1" +prettytable-rs = "^0.10" +env_logger = "0.10.0" +log = "0.4" +log4rs = "1.0" +regex = "1.5" + +[[bench]] +name = "prover_bench" +harness = false +required-features = ["bench"] + +[features] +bench = ["sov-risc0-adapter/bench", "sov-zk-cycle-macros/bench", "methods/bench", "demo-stf"] +experimental = ["sov-demo-rollup/experimental"] diff --git a/examples/demo-prover/host/benches/README.md b/examples/demo-prover/benches/README.md similarity index 100% rename from examples/demo-prover/host/benches/README.md rename to examples/demo-prover/benches/README.md diff --git a/examples/demo-prover/host/benches/blocks.hex b/examples/demo-prover/benches/blocks.hex similarity index 100% rename from examples/demo-prover/host/benches/blocks.hex rename to examples/demo-prover/benches/blocks.hex diff --git a/examples/demo-prover/host/benches/prover_bench.rs b/examples/demo-prover/benches/prover_bench.rs similarity index 94% rename from examples/demo-prover/host/benches/prover_bench.rs rename to examples/demo-prover/benches/prover_bench.rs index ffb388d4a..2a0bbc030 100644 --- a/examples/demo-prover/host/benches/prover_bench.rs +++ b/examples/demo-prover/benches/prover_bench.rs @@ -17,7 +17,7 @@ use sov_celestia_adapter::types::{FilteredCelestiaBlock, NamespaceId}; use sov_celestia_adapter::verifier::address::CelestiaAddress; use sov_celestia_adapter::verifier::{CelestiaSpec, RollupParams}; use sov_celestia_adapter::CelestiaService; -use sov_modules_api::PrivateKey; +use sov_modules_api::{PrivateKey, SlotData}; use sov_risc0_adapter::host::Risc0Host; use sov_rollup_interface::services::da::DaService; use sov_rollup_interface::stf::StateTransitionFunction; @@ -106,10 +106,7 @@ fn print_cycle_averages(metric_map: HashMap) { .map(|(k, (sum, count))| { ( k.clone(), - ( - ((*sum as f64) / (*count as f64)).round() as u64, - count.clone(), - ), + (((*sum as f64) / (*count as f64)).round() as u64, *count), ) }) .collect(); @@ -139,7 +136,7 @@ fn chain_stats(num_blocks: usize, num_blocks_with_txns: usize, num_txns: usize, #[tokio::main] async fn main() -> Result<(), anyhow::Error> { - if let Some(rollup_trace) = env::var("ROLLUP_TRACE").ok() { + if let Ok(rollup_trace) = env::var("ROLLUP_TRACE") { if let Err(e) = log4rs::init_config(get_config(&rollup_trace)) { eprintln!("Error initializing logger: {:?}", e); } @@ -178,6 +175,8 @@ async fn main() -> Result<(), anyhow::Error> { sequencer_private_key.default_address(), sequencer_da_address.as_ref().to_vec(), &sequencer_private_key, + #[cfg(feature = "experimental")] + Default::default(), ); println!("Starting from empty storage, initialization chain"); app.stf.init_chain(genesis_config); @@ -211,7 +210,7 @@ async fn main() -> Result<(), anyhow::Error> { let _header_hash = hex::encode(filtered_block.header.header.hash()); host.add_hint(&filtered_block.header); let (mut blob_txs, inclusion_proof, completeness_proof) = da_service - .extract_relevant_txs_with_proof(&filtered_block) + .extract_relevant_txs_with_proof(filtered_block) .await; host.add_hint(&inclusion_proof); @@ -222,7 +221,12 @@ async fn main() -> Result<(), anyhow::Error> { num_blobs += blob_txs.len(); } - let result = demo.apply_slot(Default::default(), filtered_block, &mut blob_txs); + let result = demo.apply_slot( + Default::default(), + &filtered_block.header, + &filtered_block.validity_condition(), + &mut blob_txs, + ); for r in result.batch_receipts { let num_tx = r.tx_receipts.len(); num_total_transactions += num_tx; diff --git a/examples/demo-prover/host/benches/rollup_config.toml b/examples/demo-prover/benches/rollup_config.toml similarity index 100% rename from examples/demo-prover/host/benches/rollup_config.toml rename to examples/demo-prover/benches/rollup_config.toml diff --git a/examples/demo-prover/host/Cargo.toml b/examples/demo-prover/host/Cargo.toml deleted file mode 100644 index 892412307..000000000 --- a/examples/demo-prover/host/Cargo.toml +++ /dev/null @@ -1,50 +0,0 @@ -[package] -name = "sov-demo-prover-host" -version = "0.2.0" -edition = "2021" -publish = false -resolver = "2" - -[dependencies] -anyhow = { workspace = true } -borsh = { workspace = true } -bincode = { workspace = true } -hex = { workspace = true } -jsonrpsee = { workspace = true, features = ["http-client", "server"] } -risc0-zkvm = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -sha2 = { workspace = true } -tokio = { workspace = true } -tracing = "0.1.37" -tracing-subscriber = "0.3.16" - -sov-celestia-adapter = { path = "../../../adapters/celestia", features = ["native", "bench"] } -demo-stf = { path = "../../demo-stf", features = ["native"] } -sov-rollup-interface = { path = "../../../rollup-interface" } -sov-risc0-adapter = { path = "../../../adapters/risc0", features = ["native"] } -const-rollup-config = { path = "../../const-rollup-config" } -sov-modules-api = { path = "../../../module-system/sov-modules-api", features = ["native"] } -sov-state = { path = "../../../module-system/sov-state", features = ["native"] } -sov-zk-cycle-macros = { path = "../../../utils/zk-cycle-macros", optional = true } -sov-stf-runner = { path = "../../../full-node/sov-stf-runner" } - -methods = { path = "../methods" } - - -[dev-dependencies] -tempfile = { workspace = true } -once_cell = "1.7.2" -parking_lot = "0.11.1" -prettytable-rs = "^0.10" -env_logger = "0.10.0" -log = "0.4" -log4rs = "1.0" -regex = "1.5" - -[[bench]] -name = "prover_bench" -harness = false - -[features] -bench = ["sov-risc0-adapter/bench", "sov-zk-cycle-macros/bench", "methods/bench"] diff --git a/examples/demo-prover/host/src/main.rs b/examples/demo-prover/host/src/main.rs deleted file mode 100644 index 8ef7bb9fd..000000000 --- a/examples/demo-prover/host/src/main.rs +++ /dev/null @@ -1,156 +0,0 @@ -use std::env; -use std::str::FromStr; - -use anyhow::Context; -use const_rollup_config::{ROLLUP_NAMESPACE_RAW, SEQUENCER_DA_ADDRESS}; -use demo_stf::app::{App, DefaultPrivateKey}; -use demo_stf::genesis_config::create_demo_genesis_config; -use methods::{ROLLUP_ELF, ROLLUP_ID}; -use sov_celestia_adapter::types::NamespaceId; -use sov_celestia_adapter::verifier::address::CelestiaAddress; -use sov_celestia_adapter::verifier::{CelestiaSpec, RollupParams}; -use sov_celestia_adapter::{CelestiaService, DaServiceConfig}; -use sov_modules_api::{PrivateKey, SlotData}; -use sov_risc0_adapter::host::{Risc0Host, Risc0Verifier}; -use sov_rollup_interface::services::da::DaService; -use sov_rollup_interface::stf::StateTransitionFunction; -use sov_rollup_interface::zk::ZkvmHost; -use sov_state::Storage; -use sov_stf_runner::{from_toml_path, RollupConfig}; -use tracing::{info, Level}; - -// The rollup stores its data in the namespace b"sov-test" on Celestia -const ROLLUP_NAMESPACE: NamespaceId = NamespaceId(ROLLUP_NAMESPACE_RAW); - -#[tokio::main] -async fn main() -> Result<(), anyhow::Error> { - // If SKIP_PROVER is set, this means that we still compile and generate the riscV ELF - // We execute the code inside the riscV but we don't prove it. This saves a significant amount of time - // The primary benefit of doing this is to make sure we produce valid code that can run inside the - // riscV virtual machine. Since proving is something we offload entirely to risc0, ensuring that - // we produce valid riscV code and that it can execute is very useful. - let skip_prover = env::var("SKIP_PROVER").is_ok(); - // Initializing logging - let subscriber = tracing_subscriber::fmt() - .with_max_level(Level::INFO) - .finish(); - tracing::subscriber::set_global_default(subscriber) - .map_err(|_err| eprintln!("Unable to set global default subscriber")) - .expect("Cannot fail to set subscriber"); - - // Same rollup_config.toml as used for the demo_rollup - // When running from the demo-prover folder, the first argument can be pointed to ../demo-rollup/rollup_config.toml - let rollup_config_path = env::args() - .nth(1) - .unwrap_or_else(|| "rollup_config.toml".to_string()); - let rollup_config: RollupConfig = - from_toml_path(&rollup_config_path).context("Failed to read rollup configuration")?; - - // New Celestia DA service to fetch blocks from the DA node (light client / docker / mock DA) - let da_service = CelestiaService::new( - rollup_config.da.clone(), - RollupParams { - namespace: ROLLUP_NAMESPACE, - }, - ) - .await; - - // This is the private key of the sequencer on the rollup itself (NOT the DA layer. The DA layer address would be SEQUENCER_DA_ADDRESS) - let sequencer_private_key = DefaultPrivateKey::generate(); - - let mut app: App = App::new(rollup_config.storage.clone()); - - let is_storage_empty = app.get_storage().is_empty(); - - // If storage is empty, we're starting from scratch, so we need to initialize - if is_storage_empty { - let sequencer_da_address = CelestiaAddress::from_str(SEQUENCER_DA_ADDRESS).unwrap(); - let genesis_config = create_demo_genesis_config( - 100000000, - sequencer_private_key.default_address(), - sequencer_da_address.as_ref().to_vec(), - &sequencer_private_key, - ); - info!("Starting from empty storage, initialization chain"); - app.stf.init_chain(genesis_config); - } - - let mut prev_state_root = app - .get_storage() - .get_state_root(&Default::default()) - .expect("The storage needs to have a state root"); - - // We start from the height in rollup_config. When running with docker, this is usually height 1 - for height in rollup_config.runner.start_height.. { - // We initialize a new VM with the rollup ELF. - // ROLLUP_ELF points to the riscV ELF code generated by the risc0 infrastructure - // Risc0Host::new carries out the process of compiling the code in methods/guest/src/bin/rollup.rs - // and generating the ELF file. (The risc0 code builds a new toolchain to enable compiling to a riscV llvm backend) - let mut host = Risc0Host::new(ROLLUP_ELF); - // This function is used to communicate to the rollup.rs code running inside the VM - // The reads need to be in order of the writes - // prev_state_root is the root after applying the block at height-1 - // This is necessary since we're proving that the current state root for the current height is - // result of applying the block against state with root prev_state_root - host.add_hint(prev_state_root); - info!( - "Requesting data for height {} and prev_state_root 0x{}", - height, - hex::encode(prev_state_root) - ); - let filtered_block = da_service.get_finalized_at(height).await?; - let header_hash = hex::encode(filtered_block.header.header.hash()); - host.add_hint(&filtered_block.header); - // When we get a block from DA, we also need to provide proofs of completeness and correctness - // https://github.com/Sovereign-Labs/sovereign-sdk/blob/nightly/rollup-interface/specs/interfaces/da.md#type-inclusionmultiproof - let (mut blobs, inclusion_proof, completeness_proof) = da_service - .extract_relevant_txs_with_proof(&filtered_block) - .await; - - info!( - "Extracted {} relevant blobs at height {} header 0x{}", - blobs.len(), - height, - header_hash, - ); - - // The above proofs of correctness and completeness need to passed to the prover - host.add_hint(&inclusion_proof); - host.add_hint(&completeness_proof); - - let result = app.stf.apply_slot( - Default::default(), - filtered_block.header(), - &filtered_block.validity_condition(), - &mut blobs, - ); - - // The extracted blobs need to be passed to the prover after execution. - // (Without executing, the host couldn't prune any data that turned out to be irrelevant to the guest) - host.add_hint(&blobs); - - // Witness contains the merkle paths to the state root so that the code inside the VM - // can access state values (Witness can also contain other hints and proofs) - host.add_hint(&result.witness); - - // Run the actual prover to generate a receipt that can then be verified - if !skip_prover { - info!("Starting proving..."); - let receipt = host.run().expect("Prover should run successfully"); - info!("Start verifying.."); - receipt.verify(ROLLUP_ID).expect("Receipt should be valid"); - } else { - // This runs the riscV code inside the VM without actually generating the proofs - // This is useful for testing if rollup code actually executes properly - let _receipt = host - .run_without_proving() - .expect("Prover should run successfully"); - } - - // Set the value of prev_state_root to the current one in preparation for the next block - prev_state_root = result.state_root.0; - info!("Completed proving and verifying block {height}"); - } - - Ok(()) -} diff --git a/examples/demo-prover/methods/Cargo.toml b/examples/demo-prover/methods/Cargo.toml index 5af21fa85..166071cad 100644 --- a/examples/demo-prover/methods/Cargo.toml +++ b/examples/demo-prover/methods/Cargo.toml @@ -3,6 +3,8 @@ name = "methods" version = "0.2.0" edition = "2021" resolver = "2" +license = "MIT OR Apache-2.0" +publish = false [build-dependencies] risc0-build = { workspace = true } diff --git a/examples/demo-prover/methods/build.rs b/examples/demo-prover/methods/build.rs index 906f58a44..15d8003f1 100644 --- a/examples/demo-prover/methods/build.rs +++ b/examples/demo-prover/methods/build.rs @@ -1,8 +1,17 @@ use std::collections::HashMap; fn main() { - let guest_pkg_to_options = get_guest_options(); - risc0_build::embed_methods_with_options(guest_pkg_to_options); + if std::env::var("CI_SKIP_GUEST_BUILD").is_ok() { + println!("Skipping guest build for CI run"); + let out_dir = std::env::var_os("OUT_DIR").unwrap(); + let out_dir = std::path::Path::new(&out_dir); + let methods_path = out_dir.join("methods.rs"); + std::fs::write(methods_path, "pub const ROLLUP_ELF: &[u8] = &[];") + .expect("Failed to write mock rollup elf"); + } else { + let guest_pkg_to_options = get_guest_options(); + risc0_build::embed_methods_with_options(guest_pkg_to_options); + } } #[cfg(not(feature = "bench"))] diff --git a/examples/demo-prover/Cargo.lock b/examples/demo-prover/methods/guest/Cargo.lock similarity index 50% rename from examples/demo-prover/Cargo.lock rename to examples/demo-prover/methods/guest/Cargo.lock index 5f6311972..38b34e802 100644 --- a/examples/demo-prover/Cargo.lock +++ b/examples/demo-prover/methods/guest/Cargo.lock @@ -2,30 +2,13 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addchain" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "cpp_demangle", - "fallible-iterator", "gimli", - "memmap2", - "object", - "rustc-demangle", - "smallvec", ] [[package]] @@ -34,6 +17,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + [[package]] name = "ahash" version = "0.8.3" @@ -47,113 +41,28 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is-terminal", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" - -[[package]] -name = "anstyle-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "anstyle-wincon" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" -dependencies = [ - "anstyle", - "windows-sys", -] - [[package]] name = "anyhow" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" - -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "async-lock" -version = "2.8.0" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener", -] +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "async-trait" -version = "0.1.71" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -162,20 +71,11 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "autotools" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8da1805e028a172334c3b680f93e71126f2327622faef2ec3d893c0a4ad77" -dependencies = [ - "cc", -] - [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -194,9 +94,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -220,15 +120,6 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" -[[package]] -name = "beef" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" -dependencies = [ - "serde", -] - [[package]] name = "bincode" version = "1.3.3" @@ -238,27 +129,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease 0.2.10", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.29", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -267,21 +137,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" - -[[package]] -name = "bitvec" -version = "1.0.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "blake2" @@ -310,17 +168,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bonsai-sdk" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94478e373742b9d1de02e13399633348e5b230dfe6364f65e80056c7df7438c5" -dependencies = [ - "reqwest", - "serde", - "thiserror", -] - [[package]] name = "borsh" version = "0.10.3" @@ -340,7 +187,7 @@ checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", - "proc-macro-crate 0.1.5", + "proc-macro-crate", "proc-macro2", "syn 1.0.109", ] @@ -367,40 +214,30 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bstr" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -411,73 +248,40 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] [[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" +name = "bzip2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ - "cc", + "bzip2-sys", "libc", - "pkg-config", -] - -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" -dependencies = [ - "serde", ] [[package]] -name = "cargo_metadata" -version = "0.17.0" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", + "cc", + "libc", + "pkg-config", ] [[package]] name = "cc" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" +version = "1.0.79" +source = "git+https://github.com/rust-lang/cc-rs?rev=e5bbdfa#e5bbdfa1fa468c028cb38fee6c35a3cf2e5a2736" dependencies = [ "jobserver", - "libc", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", ] [[package]] @@ -487,88 +291,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "time 0.1.45", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "4.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0827b011f6f8ab38590295339817b0d26f344aa4932c3ced71b45b0c54b4a9" -dependencies = [ - "clap_builder", - "clap_derive", - "once_cell", -] - -[[package]] -name = "clap_builder" -version = "4.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9441b403be87be858db6a23edb493e7f694761acdc3343d5a0fcaafd304cbc9e" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.3.12" +name = "cipher" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.29", + "crypto-common", + "inout", ] -[[package]] -name = "clap_lex" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "const-rollup-config" version = "0.2.0" +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "convert_case" version = "0.4.0" @@ -591,15 +338,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" -[[package]] -name = "cpp_demangle" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" -dependencies = [ - "cfg-if", -] - [[package]] name = "cpufeatures" version = "0.2.9" @@ -618,40 +356,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -661,16 +365,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crypto-bigint" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" -dependencies = [ - "rand_core", - "subtle", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -681,32 +375,11 @@ dependencies = [ "typenum", ] -[[package]] -name = "csv" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" -dependencies = [ - "memchr", -] - [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588" dependencies = [ "cfg-if", "cpufeatures", @@ -716,7 +389,6 @@ dependencies = [ "platforms", "rustc_version", "subtle", - "zeroize", ] [[package]] @@ -727,7 +399,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -749,50 +421,37 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", "const-rollup-config", "hex", - "jsonrpsee 0.18.2", "serde", - "serde_json", "sov-accounts", "sov-bank", "sov-blob-storage", "sov-chain-state", - "sov-cli", "sov-modules-api", "sov-modules-stf-template", "sov-rollup-interface", - "sov-sequencer", "sov-sequencer-registry", "sov-state", - "sov-stf-runner", "sov-value-setter", - "tokio", - "toml 0.8.0", "tracing", ] [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] [[package]] -name = "derivative" -version = "2.2.0" +name = "deranged" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" [[package]] name = "derive_more" @@ -807,12 +466,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "destructure_traitobject" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c877555693c14d2f84191cfd3ad8582790fc52b5e2274b40b59cf5f5cea25c7" - [[package]] name = "digest" version = "0.9.0" @@ -843,16 +496,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -866,36 +509,31 @@ dependencies = [ ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "downloader" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "d05213e96f184578b5f70105d4d0a644a168e99e12d7bea0b200c15d67b5c182" dependencies = [ - "libc", - "redox_users", - "winapi", + "futures", + "rand", + "reqwest", + "thiserror", + "tokio", ] -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "ed25519" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8", - "serde", "signature", ] @@ -920,17 +558,14 @@ checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core", - "serde", - "sha2 0.10.7", - "zeroize", + "sha2 0.10.6", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elf" @@ -938,54 +573,26 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2b183d6ce6ca4cf30e3db37abf5b52568b5f9015c97d9fbdd7026aa5dcdd758" -[[package]] -name = "encode_unicode" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] -[[package]] -name = "env_logger" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "erased-serde" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da96524cc884f6558f1769b6c46686af2fe8e8b4cd253bd5a3cdba8181b8e070" -dependencies = [ - "serde", -] - [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1002,12 +609,6 @@ dependencies = [ "libc", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "eyre" version = "0.6.8" @@ -1018,55 +619,17 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - [[package]] name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "bitvec", - "byteorder", - "ff_derive", - "rand_core", - "subtle", -] - -[[package]] -name = "ff_derive" -version = "0.13.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" -dependencies = [ - "addchain", - "cfg-if", - "num-bigint", - "num-integer", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" [[package]] name = "fixedbitset" @@ -1076,9 +639,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -1124,12 +687,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.28" @@ -1186,7 +743,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -1201,16 +758,6 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" -[[package]] -name = "futures-timer" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" -dependencies = [ - "gloo-timers", - "send_wrapper", -] - [[package]] name = "futures-util" version = "0.3.28" @@ -1247,88 +794,20 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "gimli" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" -dependencies = [ - "fallible-iterator", - "stable_deref_trait", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "globset" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1391ab1f92ffcc08911957149833e682aa3fe252b9f45f966d2ef972274c97df" -dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", -] - -[[package]] -name = "gloo-net" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "gloo-utils", - "js-sys", - "pin-project", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "gloo-utils" -version = "0.1.7" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" -dependencies = [ - "js-sys", - "serde", - "serde_json", - "wasm-bindgen", - "web-sys", -] +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1391,6 +870,24 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys", +] + [[package]] name = "http" version = "0.2.9" @@ -1421,15 +918,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - -[[package]] -name = "humantime" -version = "2.1.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" @@ -1448,45 +939,13 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.8", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", - "webpki-roots 0.22.6", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" -dependencies = [ - "futures-util", - "http", - "hyper", - "log", - "rustls 0.21.5", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -1500,43 +959,20 @@ dependencies = [ "tokio-native-tls", ] -[[package]] -name = "iana-time-zone" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - [[package]] name = "ics23" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9e8f569c5cc88e08b8d076dc207e0748aa1f52d4b84910ec919c8f2bed6ea7" +checksum = "442d4bab37956e76f739c864f246c825d87c0bb7f9afa65660c57833c91bf6d4" dependencies = [ "anyhow", "bytes", "hex", - "pbjson", - "prost 0.11.9", + "informalsystems-pbjson", + "prost", "ripemd", "serde", - "sha2 0.10.7", + "sha2 0.10.6", "sha3", ] @@ -1577,29 +1013,22 @@ dependencies = [ ] [[package]] -name = "instant" -version = "0.1.12" +name = "informalsystems-pbjson" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "b4eecd90f87bea412eac91c6ef94f6b1e390128290898cbe14f2b926787ae1fb" dependencies = [ - "cfg-if", + "base64 0.13.1", + "serde", ] [[package]] -name = "inventory" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b1d6b4b9fb75fc419bdef998b689df5080a32931cb3395b86202046b56a9ea" - -[[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "hermit-abi", - "libc", - "windows-sys", + "generic-array", ] [[package]] @@ -1608,17 +1037,6 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix 0.38.4", - "windows-sys", -] - [[package]] name = "itertools" version = "0.10.5" @@ -1651,7 +1069,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "serde", - "sha2 0.10.7", + "sha2 0.10.6", "thiserror", "tracing", ] @@ -1675,466 +1093,49 @@ dependencies = [ ] [[package]] -name = "jsonrpsee" -version = "0.16.2" +name = "keccak" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ - "jsonrpsee-core 0.16.2", - "jsonrpsee-http-client 0.16.2", - "jsonrpsee-server 0.16.2", - "jsonrpsee-types 0.16.2", + "cpufeatures", ] [[package]] -name = "jsonrpsee" -version = "0.18.2" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1822d18e4384a5e79d94dc9e4d1239cfa9fad24e55b44d2efeff5b394c9fece4" -dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core 0.18.2", - "jsonrpsee-http-client 0.18.2", - "jsonrpsee-proc-macros", - "jsonrpsee-server 0.18.2", - "jsonrpsee-types 0.18.2", - "jsonrpsee-wasm-client", - "jsonrpsee-ws-client", - "tracing", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "jsonrpsee-client-transport" -version = "0.18.2" +name = "libc" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11aa5766d5c430b89cb26a99b88f3245eb91534be8126102cea9e45ee3891b22" -dependencies = [ - "futures-channel", - "futures-util", - "gloo-net", - "http", - "jsonrpsee-core 0.18.2", - "pin-project", - "rustls-native-certs", - "soketto", - "thiserror", - "tokio", - "tokio-rustls 0.24.1", - "tokio-util", - "tracing", - "webpki-roots 0.23.1", -] +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] -name = "jsonrpsee-core" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" -dependencies = [ - "anyhow", - "arrayvec", - "async-trait", - "beef", - "futures-channel", - "futures-util", - "globset", - "hyper", - "jsonrpsee-types 0.16.2", - "parking_lot 0.12.1", - "rand", - "rustc-hash", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c6832a55f662b5a6ecc844db24b8b9c387453f923de863062c60ce33d62b81" -dependencies = [ - "anyhow", - "async-lock", - "async-trait", - "beef", - "futures-timer", - "futures-util", - "globset", - "hyper", - "jsonrpsee-types 0.18.2", - "parking_lot 0.12.1", - "rand", - "rustc-hash", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "wasm-bindgen-futures", -] - -[[package]] -name = "jsonrpsee-http-client" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" -dependencies = [ - "async-trait", - "hyper", - "hyper-rustls 0.23.2", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-http-client" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1705c65069729e3dccff6fd91ee431d5d31cabcf00ce68a62a2c6435ac713af9" -dependencies = [ - "async-trait", - "hyper", - "hyper-rustls 0.24.1", - "jsonrpsee-core 0.18.2", - "jsonrpsee-types 0.18.2", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "tracing", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6027ac0b197ce9543097d02a290f550ce1d9432bf301524b013053c0b75cc94" -dependencies = [ - "heck", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "jsonrpsee-server" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" -dependencies = [ - "futures-channel", - "futures-util", - "http", - "hyper", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", - "serde", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", -] - -[[package]] -name = "jsonrpsee-server" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f06661d1a6b6e5b85469dc9c29acfbb9b3bb613797a6fd10a3ebb8a70754057" -dependencies = [ - "futures-util", - "hyper", - "jsonrpsee-core 0.18.2", - "jsonrpsee-types 0.18.2", - "serde", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5bf6c75ce2a4217421154adfc65a24d2b46e77286e59bba5d9fa6544ccc8f4" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "jsonrpsee-wasm-client" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e6ea7c6d862e60f8baebd946c037b70c6808a4e4e31e792a4029184e3ce13a" -dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core 0.18.2", - "jsonrpsee-types 0.18.2", -] - -[[package]] -name = "jsonrpsee-ws-client" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64b2589680ba1ad7863f279cd2d5083c1dc0a7c0ea959d22924553050f8ab9f" -dependencies = [ - "http", - "jsonrpsee-client-transport", - "jsonrpsee-core 0.18.2", - "jsonrpsee-types 0.18.2", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy-regex" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff63c423c68ea6814b7da9e88ce585f793c87ddd9e78f646970891769c8235d4" -dependencies = [ - "lazy-regex-proc_macros", - "once_cell", - "regex", -] - -[[package]] -name = "lazy-regex-proc_macros" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8edfc11b8f56ce85e207e62ea21557cfa09bb24a8f6b04ae181b086ff8611c22" -dependencies = [ - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "libm" -version = "0.2.7" +name = "libm" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" -[[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "lz4-sys", - "zstd-sys", -] - -[[package]] -name = "libz-sys" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "log" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" -dependencies = [ - "serde", -] - -[[package]] -name = "log-mdc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" - -[[package]] -name = "log4rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36ca1786d9e79b8193a68d480a0907b612f109537115c6ff655a3a1967533fd" -dependencies = [ - "anyhow", - "arc-swap", - "chrono", - "derivative", - "fnv", - "humantime", - "libc", - "log", - "log-mdc", - "parking_lot 0.12.1", - "serde", - "serde-value", - "serde_json", - "serde_yaml", - "thiserror", - "thread-id", - "typemap-ors", - "winapi", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "matrixmultiply" -version = "0.3.7" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" -dependencies = [ - "autocfg", - "rawpointer", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memmap2" -version = "0.5.10" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "methods" -version = "0.2.0" -dependencies = [ - "risc0-build", -] +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "mime" @@ -2142,12 +1143,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2164,7 +1159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys", ] @@ -2198,20 +1193,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "ndarray" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" -dependencies = [ - "matrixmultiply", - "num-complex", - "num-integer", - "num-traits", - "rawpointer", - "rayon", -] - [[package]] name = "nmt-rs" version = "0.1.0" @@ -2220,47 +1201,7 @@ dependencies = [ "borsh", "bytes", "serde", - "sha2 0.10.7", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" -dependencies = [ - "num-traits", + "sha2 0.10.6", ] [[package]] @@ -2282,24 +1223,14 @@ checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", + "syn 2.0.37", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -2316,13 +1247,11 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ - "flate2", "memchr", - "ruzstd", ] [[package]] @@ -2339,11 +1268,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -2360,7 +1289,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -2371,9 +1300,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -2388,131 +1317,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] -name = "ordered-float" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" -dependencies = [ - "num-traits", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" +name = "password-hash" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets", + "base64ct", + "rand_core", + "subtle", ] [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbjson" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048f9ac93c1eab514f9470c4bc8d97ca2a0a236b84f45cc19d69a59fc11467f6" -dependencies = [ - "base64 0.13.1", - "serde", -] - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] -name = "petgraph" -version = "0.6.3" +name = "pbkdf2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "fixedbitset", - "indexmap 1.9.3", + "digest 0.10.7", + "hmac", + "password-hash", + "sha2 0.10.6", ] [[package]] -name = "pin-project" -version = "1.1.2" +name = "percent-encoding" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" -dependencies = [ - "pin-project-internal", -] +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] -name = "pin-project-internal" -version = "1.1.2" +name = "petgraph" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", + "fixedbitset", + "indexmap 2.0.0", ] [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2538,9 +1391,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "3.0.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" [[package]] name = "ppv-lite86" @@ -2558,30 +1411,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prettyplease" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92139198957b410250d43fad93e630d956499a625c527eda65175c8680f83387" -dependencies = [ - "proc-macro2", - "syn 2.0.29", -] - -[[package]] -name = "prettytable-rs" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" -dependencies = [ - "csv", - "encode_unicode", - "is-terminal", - "lazy_static", - "term", - "unicode-width", -] - [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -2591,39 +1420,15 @@ dependencies = [ "toml 0.5.11", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.14", -] - [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] -[[package]] -name = "prometheus" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" -dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "memchr", - "parking_lot 0.12.1", - "thiserror", -] - [[package]] name = "prost" version = "0.11.9" @@ -2631,17 +1436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive 0.11.9", -] - -[[package]] -name = "prost" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8473a65b88506c106c28ae905ca4a2b83a2993640467a41bb3080627ddfd2c" -dependencies = [ - "bytes", - "prost-derive 0.12.0", + "prost-derive", ] [[package]] @@ -2657,37 +1452,15 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease 0.1.25", - "prost 0.11.9", - "prost-types 0.11.9", + "prettyplease", + "prost", + "prost-types", "regex", "syn 1.0.109", "tempfile", "which", ] -[[package]] -name = "prost-build" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d3e647e9eb04ddfef78dfee2d5b3fefdf94821c84b710a3d8ebc89ede8b164" -dependencies = [ - "bytes", - "heck", - "itertools", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease 0.2.10", - "prost 0.12.0", - "prost-types 0.12.0", - "regex", - "syn 2.0.29", - "tempfile", - "which", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -2701,52 +1474,24 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prost-derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56075c27b20ae524d00f247b8a4dc333e5784f889fe63099f8e626bc8d73486c" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 2.0.29", -] - [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost 0.11.9", -] - -[[package]] -name = "prost-types" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cebe0a918c97f86c217b0f76fd754e966f8b9f41595095cf7d74cb4e59d730f6" -dependencies = [ - "prost 0.12.0", + "prost", ] [[package]] name = "quote" -version = "1.0.31" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.8.5" @@ -2777,34 +1522,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "rayon" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - [[package]] name = "redox_syscall" version = "0.2.16" @@ -2836,9 +1553,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", @@ -2848,9 +1565,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.3" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -2859,17 +1576,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -2900,21 +1617,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi", -] - [[package]] name = "ripemd" version = "0.1.3" @@ -2938,34 +1640,6 @@ dependencies = [ "serde", ] -[[package]] -name = "risc0-build" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703b79671cd148f6535e1f78b8a74f665c920493eb6546c516c67ab0bc0bbde1" -dependencies = [ - "cargo_metadata", - "risc0-binfmt", - "risc0-zkp", - "risc0-zkvm-platform", - "serde", - "serde_json", -] - -[[package]] -name = "risc0-build-kernel" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b88d565a721641f355cb889fee75c12c719dec7b910aa42ecabffa30d99f87" -dependencies = [ - "cc", - "directories", - "glob", - "hex", - "sha2 0.10.7", - "tempfile", -] - [[package]] name = "risc0-circuit-rv32im" version = "0.18.0" @@ -2974,28 +1648,12 @@ checksum = "68e00222152fdc94cacc9b6682b5c0cbe8138f1ee82e80c24a64d9ad2c6d7415" dependencies = [ "anyhow", "log", - "rand", - "rayon", - "risc0-circuit-rv32im-sys", "risc0-core", - "risc0-sys", "risc0-zkp", "risc0-zkvm-platform", "tracing", ] -[[package]] -name = "risc0-circuit-rv32im-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca6ec6b1a7aad859af0009d19946ffdded8e3bd5d9accf893846b6bf996ac08" -dependencies = [ - "glob", - "risc0-build-kernel", - "risc0-core", - "risc0-sys", -] - [[package]] name = "risc0-core" version = "0.18.0" @@ -3006,18 +1664,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "risc0-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6d308c2ebc79e32c100f57722914b3172d2f0d69321703b684ea0c302e4f3a9" -dependencies = [ - "cc", - "glob", - "risc0-build-kernel", - "risc0-core", -] - [[package]] name = "risc0-zkp" version = "0.18.0" @@ -3028,217 +1674,74 @@ dependencies = [ "blake2", "bytemuck", "digest 0.10.7", - "ff", "hex", - "lazy_static", "log", - "ndarray", "paste", - "rand", "rand_core", - "rayon", "risc0-core", - "risc0-sys", "risc0-zkvm-platform", "serde", - "sha2 0.10.7", - "tracing", -] - -[[package]] -name = "risc0-zkvm" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec972152bcaa1a2967e412e22a84f6e2984a95c701bcc7943ca8ca10126ee0a2" -dependencies = [ - "addr2line", - "anyhow", - "bincode", - "bonsai-sdk", - "bytemuck", - "bytes", - "cfg-if", - "crypto-bigint", - "generic-array", - "getrandom", - "hex", - "lazy-regex", - "libm", - "log", - "num-derive 0.4.0", - "num-traits", - "prost 0.12.0", - "prost-build 0.12.0", - "rand", - "rayon", - "risc0-binfmt", - "risc0-circuit-rv32im", - "risc0-core", - "risc0-zkp", - "risc0-zkvm-platform", - "rrs-lib", - "serde", - "sha2 0.10.7", - "tempfile", - "thiserror", - "tracing", - "typetag", -] - -[[package]] -name = "risc0-zkvm-platform" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8524b46783b58b00e9b2a4712e837093c975b23cf25bfaf99e1cf69e9011bf6b" - -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "rrs-lib" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4382d3af3a4ebdae7f64ba6edd9114fff92c89808004c4943b393377a25d001" -dependencies = [ - "downcast-rs", - "paste", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys", -] - -[[package]] -name = "rustix" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" -dependencies = [ - "bitflags 2.3.3", - "errno", - "libc", - "linux-raw-sys 0.4.3", - "windows-sys", -] - -[[package]] -name = "rustls" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" -dependencies = [ - "log", - "ring", - "sct", - "webpki", + "sha2 0.10.6", + "tracing", ] [[package]] -name = "rustls" -version = "0.21.5" +name = "risc0-zkvm" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +checksum = "ec972152bcaa1a2967e412e22a84f6e2984a95c701bcc7943ca8ca10126ee0a2" dependencies = [ + "anyhow", + "bytemuck", + "cfg-if", + "getrandom", + "hex", + "libm", "log", - "ring", - "rustls-webpki 0.101.2", - "sct", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", + "num-derive 0.4.0", + "num-traits", + "risc0-binfmt", + "risc0-circuit-rv32im", + "risc0-core", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "tempfile", + "tracing", ] [[package]] -name = "rustls-pemfile" -version = "1.0.3" +name = "risc0-zkvm-platform" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" -dependencies = [ - "base64 0.21.2", -] +checksum = "8524b46783b58b00e9b2a4712e837093c975b23cf25bfaf99e1cf69e9011bf6b" [[package]] -name = "rustls-webpki" -version = "0.100.2" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" -dependencies = [ - "ring", - "untrusted", -] +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] -name = "rustls-webpki" -version = "0.101.2" +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "ring", - "untrusted", + "semver", ] [[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ruzstd" -version = "0.3.1" +name = "rustix" +version = "0.38.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a15e661f0f9dac21f3494fe5d23a6338c0ac116a2d22c2b63010acd89467ffe" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" dependencies = [ - "byteorder", - "thiserror", - "twox-hash", + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", ] [[package]] @@ -3258,9 +1761,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "schemars_derive", @@ -3270,9 +1773,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -3280,27 +1783,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -3311,9 +1798,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -3324,15 +1811,6 @@ name = "semver" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" -dependencies = [ - "serde", -] - -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" @@ -3343,16 +1821,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float", - "serde", -] - [[package]] name = "serde_bytes" version = "0.11.12" @@ -3370,7 +1838,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -3386,9 +1854,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.103" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -3397,13 +1865,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d89a8107374290037607734c0b73a85db7ed80cae314b3c5791f192a496e731" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -3428,28 +1896,14 @@ dependencies = [ ] [[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - -[[package]] -name = "sha-1" -version = "0.9.8" +name = "sha1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest 0.10.7", ] [[package]] @@ -3467,9 +1921,8 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +version = "0.10.6" +source = "git+https://github.com/risc0/RustCrypto-hashes?tag=sha2/v0.10.6-risc0#e75cafd9f55da196061f6fadf8bc8a86778192b7" dependencies = [ "cfg-if", "cpufeatures", @@ -3486,30 +1939,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - [[package]] name = "signature" version = "2.1.0" @@ -3518,19 +1947,13 @@ checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" - [[package]] name = "socket2" version = "0.4.9" @@ -3542,19 +1965,13 @@ dependencies = [ ] [[package]] -name = "soketto" -version = "0.7.1" +name = "socket2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ - "base64 0.13.1", - "bytes", - "futures", - "http", - "httparse", - "log", - "rand", - "sha-1", + "libc", + "windows-sys", ] [[package]] @@ -3563,11 +1980,6 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee 0.18.2", - "schemars", - "serde", - "serde_json", "sov-modules-api", "sov-state", "thiserror", @@ -3579,12 +1991,7 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", "hex", - "jsonrpsee 0.18.2", - "schemars", - "serde", - "serde_json", "sov-modules-api", "sov-rollup-interface", "sov-state", @@ -3599,10 +2006,6 @@ dependencies = [ "bincode", "borsh", "hex", - "jsonrpsee 0.18.2", - "schemars", - "serde", - "serde_json", "sov-chain-state", "sov-modules-api", "sov-sequencer-registry", @@ -3616,27 +2019,24 @@ version = "0.2.0" dependencies = [ "anyhow", "async-trait", - "base64 0.21.2", + "base64 0.21.4", "bech32", "borsh", "hex", "hex-literal", - "jsonrpsee 0.18.2", "nmt-rs", - "prost 0.11.9", - "prost-build 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-build", + "prost-types", "risc0-zkvm", "risc0-zkvm-platform", "serde", - "serde_json", - "sha2 0.10.7", + "sha2 0.10.6", "sov-rollup-interface", "sov-zk-cycle-macros", "tendermint", "tendermint-proto", "thiserror", - "tokio", "tracing", ] @@ -3646,81 +2046,37 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "jsonrpsee 0.18.2", "serde", - "serde_json", "sov-modules-api", "sov-rollup-interface", "sov-state", ] [[package]] -name = "sov-cli" -version = "0.2.0" -dependencies = [ - "anyhow", - "borsh", - "directories", - "hex", - "jsonrpsee 0.18.2", - "serde", - "serde_json", - "sov-accounts", - "sov-bank", - "sov-modules-api", - "tokio", -] - -[[package]] -name = "sov-db" -version = "0.2.0" -dependencies = [ - "anyhow", - "bincode", - "borsh", - "byteorder", - "jmt", - "rocksdb", - "serde", - "sov-rollup-interface", - "sov-schema-db", - "tokio", -] - -[[package]] -name = "sov-demo-prover-host" +name = "sov-demo-prover-guest" version = "0.2.0" dependencies = [ "anyhow", - "bincode", "borsh", "const-rollup-config", "demo-stf", - "env_logger", - "hex", - "jsonrpsee 0.16.2", - "log", - "log4rs", - "methods", - "once_cell", - "parking_lot 0.11.2", - "prettytable-rs", - "regex", + "directories", + "downloader", "risc0-zkvm", + "risc0-zkvm-platform", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.6", + "sha3", "sov-celestia-adapter", "sov-modules-api", + "sov-modules-stf-template", "sov-risc0-adapter", "sov-rollup-interface", + "sov-sequencer-registry", "sov-state", - "sov-stf-runner", - "sov-zk-cycle-macros", "tempfile", - "tokio", - "tracing", - "tracing-subscriber", + "zip", ] [[package]] @@ -3737,20 +2093,18 @@ dependencies = [ "anyhow", "bech32", "borsh", - "clap", "derive_more", "ed25519-dalek", - "hex", - "jsonrpsee 0.18.2", - "rand", - "schemars", + "jmt", + "risc0-zkvm", + "risc0-zkvm-platform", "serde", - "serde_json", - "sha2 0.10.7", + "sha2 0.10.6", + "sov-first-read-last-write-cache", "sov-modules-macros", "sov-rollup-interface", - "sov-sequencer", "sov-state", + "sov-zk-cycle-macros", "thiserror", ] @@ -3760,7 +2114,6 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "jsonrpsee 0.18.2", "proc-macro2", "quote", "schemars", @@ -3776,10 +2129,14 @@ dependencies = [ "borsh", "hex", "jmt", + "risc0-zkvm", + "risc0-zkvm-platform", "serde", "sov-modules-api", "sov-rollup-interface", "sov-state", + "sov-zk-cycle-macros", + "sov-zk-cycle-utils", "thiserror", "tracing", ] @@ -3791,10 +2148,6 @@ dependencies = [ "anyhow", "bincode", "bytemuck", - "once_cell", - "parking_lot 0.12.1", - "risc0-circuit-rv32im", - "risc0-zkp", "risc0-zkvm", "risc0-zkvm-platform", "serde", @@ -3814,34 +2167,7 @@ dependencies = [ "digest 0.10.7", "hex", "serde", - "sha2 0.10.7", - "thiserror", - "tokio", -] - -[[package]] -name = "sov-schema-db" -version = "0.2.0" -dependencies = [ - "anyhow", - "once_cell", - "prometheus", - "rocksdb", "thiserror", - "tracing", -] - -[[package]] -name = "sov-sequencer" -version = "0.2.0" -dependencies = [ - "anyhow", - "borsh", - "hex", - "jsonrpsee 0.18.2", - "serde", - "sov-rollup-interface", - "tracing", ] [[package]] @@ -3850,14 +2176,13 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee 0.18.2", - "schemars", - "serde", - "serde_json", + "risc0-zkvm", + "risc0-zkvm-platform", "sov-bank", "sov-modules-api", "sov-state", + "sov-zk-cycle-macros", + "sov-zk-cycle-utils", ] [[package]] @@ -3869,48 +2194,23 @@ dependencies = [ "borsh", "hex", "jmt", + "risc0-zkvm", + "risc0-zkvm-platform", "serde", "serde_json", - "sha2 0.10.7", - "sov-db", + "sha2 0.10.6", "sov-first-read-last-write-cache", "sov-rollup-interface", + "sov-zk-cycle-macros", "thiserror", ] -[[package]] -name = "sov-stf-runner" -version = "0.2.0" -dependencies = [ - "anyhow", - "borsh", - "futures", - "hex", - "jsonrpsee 0.18.2", - "serde", - "serde_json", - "sov-celestia-adapter", - "sov-db", - "sov-modules-api", - "sov-rollup-interface", - "sov-state", - "tokio", - "toml 0.8.0", - "tracing", - "tracing-subscriber", -] - [[package]] name = "sov-value-setter" version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee 0.18.2", - "schemars", - "serde", - "serde_json", "sov-modules-api", "sov-state", "thiserror", @@ -3931,16 +2231,9 @@ dependencies = [ name = "sov-zk-cycle-utils" version = "0.2.0" dependencies = [ - "bytes", "risc0-zkvm", - "risc0-zkvm-platform", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + "risc0-zkvm-platform", +] [[package]] name = "spki" @@ -3952,24 +2245,6 @@ dependencies = [ "der", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "subtle" version = "2.5.0" @@ -4004,32 +2279,25 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.23", + "rustix", "windows-sys", ] @@ -4047,18 +2315,18 @@ dependencies = [ "futures", "num-traits", "once_cell", - "prost 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-types", "serde", "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.7", + "sha2 0.10.6", "signature", "subtle", "subtle-encoding", "tendermint-proto", - "time 0.3.23", + "time", "zeroize", ] @@ -4072,92 +2340,41 @@ dependencies = [ "flex-error", "num-derive 0.3.3", "num-traits", - "prost 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-types", "serde", "serde_bytes", "subtle-encoding", - "time 0.3.23", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", + "time", ] [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", -] - -[[package]] -name = "thread-id" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee93aa2b8331c0fec9091548843f2c90019571814057da3b783f9de09349d73" -dependencies = [ - "libc", - "redox_syscall 0.2.16", - "winapi", -] - -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "syn 2.0.37", ] [[package]] name = "time" -version = "0.3.23" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ + "deranged", "serde", "time-core", "time-macros", @@ -4171,9 +2388,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -4195,35 +2412,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot 0.12.1", "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", + "socket2 0.5.4", "windows-sys", ] -[[package]] -name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - [[package]] name = "tokio-native-tls" version = "0.3.1" @@ -4234,38 +2436,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.5", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.8" @@ -4274,7 +2444,6 @@ checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", - "futures-io", "futures-sink", "pin-project-lite", "tokio", @@ -4299,7 +2468,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.0", + "toml_edit", ] [[package]] @@ -4311,17 +2480,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" -dependencies = [ - "indexmap 2.0.0", - "toml_datetime", - "winnow", -] - [[package]] name = "toml_edit" version = "0.20.0" @@ -4335,27 +2493,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" version = "0.3.2" @@ -4369,7 +2506,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4383,7 +2519,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -4393,32 +2529,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" -dependencies = [ - "nu-ansi-term", - "sharded-slab", - "smallvec", - "thread_local", - "tracing-core", - "tracing-log", ] [[package]] @@ -4427,54 +2537,11 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] - -[[package]] -name = "typemap-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68c24b707f02dd18f1e4ccceb9d49f2058c2fb86384ef9972592904d7a28867" -dependencies = [ - "unsafe-any-ors", -] - [[package]] name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "typetag" -version = "0.2.10" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66aafcfb982bf1f9a28755ac6bcbdcd4631ff516cb038fa61299201ebb4364" -dependencies = [ - "erased-serde", - "inventory", - "once_cell", - "serde", - "typetag-impl", -] - -[[package]] -name = "typetag-impl" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d836cd032f71d90cbaa3c1f85ce84266af23659766d8c0b1c4c6524a0fb4c36f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" @@ -4484,9 +2551,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -4497,50 +2564,17 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "unsafe-any-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a303d30665362d9680d7d91d78b23f5f899504d4f08b3c4cf08d055d87c0ad" -dependencies = [ - "destructure_traitobject", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - [[package]] name = "vcpkg" version = "0.2.15" @@ -4562,12 +2596,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4595,7 +2623,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -4629,7 +2657,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4650,43 +2678,16 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.2", -] - [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix", ] [[package]] @@ -4705,30 +2706,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -4740,9 +2723,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -4755,100 +2738,122 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.0" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys", ] [[package]] -name = "wyz" -version = "0.5.1" +name = "zeroize" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ - "tap", + "zeroize_derive", ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "linked-hash-map", + "proc-macro2", + "quote", + "syn 2.0.37", ] [[package]] -name = "zeroize" -version = "1.6.0" +name = "zip" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "zeroize_derive", + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", ] [[package]] -name = "zeroize_derive" -version = "1.4.2" +name = "zstd" +version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", ] [[package]] diff --git a/examples/demo-prover/host/rollup_config.toml b/examples/demo-prover/rollup_config.toml similarity index 100% rename from examples/demo-prover/host/rollup_config.toml rename to examples/demo-prover/rollup_config.toml diff --git a/examples/demo-prover/src/main.rs b/examples/demo-prover/src/main.rs new file mode 100644 index 000000000..07e401a3c --- /dev/null +++ b/examples/demo-prover/src/main.rs @@ -0,0 +1,42 @@ +use std::env; + +use methods::ROLLUP_ELF; +use sov_demo_rollup::{new_rollup_with_celestia_da, DemoProverConfig}; +use sov_risc0_adapter::host::Risc0Host; +use tracing::Level; + +#[tokio::main] +async fn main() -> Result<(), anyhow::Error> { + // If SKIP_PROVER is set, this means that we still compile and generate the riscV ELF + // We execute the code inside the riscV but we don't prove it. This saves a significant amount of time + // The primary benefit of doing this is to make sure we produce valid code that can run inside the + // riscV virtual machine. Since proving is something we offload entirely to risc0, ensuring that + // we produce valid riscV code and that it can execute is very useful. + let prover_config = if env::var("SKIP_PROVER").is_ok() { + DemoProverConfig::Execute + } else { + DemoProverConfig::Prove + }; + // Initializing logging + let subscriber = tracing_subscriber::fmt() + .with_max_level(Level::INFO) + .finish(); + tracing::subscriber::set_global_default(subscriber) + .map_err(|_err| eprintln!("Unable to set global default subscriber")) + .expect("Cannot fail to set subscriber"); + + // Same rollup_config.toml as used for the demo_rollup + // When running from the demo-prover folder, the first argument can be pointed to ../demo-rollup/rollup_config.toml + let rollup_config_path = env::args() + .nth(1) + .unwrap_or_else(|| "rollup_config.toml".to_string()); + println!("Read rollup config"); + + let prover = Risc0Host::new(ROLLUP_ELF); + + let rollup = + new_rollup_with_celestia_da(&rollup_config_path, Some((prover, prover_config))).await?; + rollup.run().await?; + + Ok(()) +} diff --git a/examples/demo-rollup/src/lib.rs b/examples/demo-rollup/src/lib.rs index 9c05d4b66..fa494587b 100644 --- a/examples/demo-rollup/src/lib.rs +++ b/examples/demo-rollup/src/lib.rs @@ -9,7 +9,7 @@ use demo_stf::genesis_config::create_demo_genesis_config; use demo_stf::runtime::GenesisConfig; pub use rollup::{ new_rollup_with_celestia_da, new_rollup_with_mock_da, new_rollup_with_mock_da_from_config, - Rollup, + DemoProverConfig, Rollup, }; use sov_celestia_adapter::types::NamespaceId; use sov_cli::wallet_state::PrivateKeyAndAddress; diff --git a/examples/demo-rollup/src/rollup.rs b/examples/demo-rollup/src/rollup.rs index 79280982a..6e32f9500 100644 --- a/examples/demo-rollup/src/rollup.rs +++ b/examples/demo-rollup/src/rollup.rs @@ -25,7 +25,9 @@ use sov_rollup_interface::services::da::DaService; use sov_rollup_interface::zk::ZkvmHost; use sov_state::storage::Storage; use sov_stf_runner::verifier::StateTransitionVerifier; -use sov_stf_runner::{from_toml_path, RollupConfig, RunnerConfig, StateTransitionRunner}; +use sov_stf_runner::{ + from_toml_path, ProofGenConfig, Prover, RollupConfig, RunnerConfig, StateTransitionRunner, +}; use tokio::sync::oneshot; use tracing::debug; @@ -37,6 +39,8 @@ use crate::{get_genesis_config, initialize_ledger, ROLLUP_NAMESPACE}; #[cfg(feature = "experimental")] const TX_SIGNER_PRIV_KEY_PATH: &str = "../test-data/keys/tx_signer_private_key.json"; +type ZkStf = AppTemplate>; + /// Dependencies needed to run the rollup. pub struct Rollup { /// Implementation of the STF. @@ -52,9 +56,34 @@ pub struct Rollup { #[cfg(feature = "experimental")] /// Configuration for the Ethereum RPC. pub eth_rpc_config: EthRpcConfig, - /// Verifier for the rollup. + /// Prover for the rollup. #[allow(clippy::type_complexity)] - pub verifier: Option<(Vm, AppVerifier)>, + pub prover: Option, Da, Vm>>, +} + +pub fn configure_prover( + vm: Vm, + cfg: DemoProverConfig, + da_verifier: Da::Verifier, +) -> Prover, Da, Vm> { + let config = match cfg { + DemoProverConfig::Simulate => { + ProofGenConfig::Simulate(AppVerifier::new(create_zk_app_template(), da_verifier)) + } + DemoProverConfig::Execute => ProofGenConfig::Execute, + DemoProverConfig::Prove => ProofGenConfig::Prover, + }; + Prover { vm, config } +} + +/// The possible configurations of the demo prover +pub enum DemoProverConfig { + /// Run the rollup verification logic inside the current process + Simulate, + /// Run the rollup verifier in a zkvm executor + Execute, + /// Run the rollup verifier and create a SNARK of execution + Prove, } /// A verifier for the demo rollup @@ -72,7 +101,7 @@ pub type AppVerifier = StateTransitionVerifier< /// Creates celestia based rollup. pub async fn new_rollup_with_celestia_da( rollup_config_path: &str, - prover: Option, + prover: Option<(Vm, DemoProverConfig)>, ) -> Result, anyhow::Error> { debug!( "Starting demo celestia rollup with config {}", @@ -101,15 +130,13 @@ pub async fn new_rollup_with_celestia_da( #[cfg(feature = "experimental")] eth_signer.signers(), ); - let verifier = prover.map(|p| { - ( - p, - AppVerifier::new( - create_zk_app_template(), - CelestiaVerifier { - rollup_namespace: ROLLUP_NAMESPACE, - }, - ), + let prover = prover.map(|(vm, config)| { + configure_prover( + vm, + config, + CelestiaVerifier { + rollup_namespace: ROLLUP_NAMESPACE, + }, ) }); @@ -125,14 +152,14 @@ pub async fn new_rollup_with_celestia_da( sov_tx_signer_priv_key: read_sov_tx_signer_priv_key()?, eth_signer, }, - verifier, + prover, }) } /// Creates MockDa based rollup. pub fn new_rollup_with_mock_da( rollup_config_path: &str, - prover: Option, + prover: Option<(Vm, DemoProverConfig)>, ) -> Result, anyhow::Error> { debug!("Starting mock rollup with config {}", rollup_config_path); @@ -145,7 +172,7 @@ pub fn new_rollup_with_mock_da( /// Creates MockDa based rollup. pub fn new_rollup_with_mock_da_from_config( rollup_config: RollupConfig, - prover: Option, + prover: Option<(Vm, DemoProverConfig)>, ) -> Result, anyhow::Error> { let ledger_db = initialize_ledger(&rollup_config.storage.path); let sequencer_da_address = MockAddress::from([0u8; 32]); @@ -160,12 +187,7 @@ pub fn new_rollup_with_mock_da_from_config( eth_signer.signers(), ); - let verifier = prover.map(|p| { - ( - p, - AppVerifier::new(create_zk_app_template(), Default::default()), - ) - }); + let prover = prover.map(|(vm, config)| configure_prover(vm, config, Default::default())); Ok(Rollup { app, da_service, @@ -178,8 +200,7 @@ pub fn new_rollup_with_mock_da_from_config( sov_tx_signer_priv_key: read_sov_tx_signer_priv_key()?, eth_signer, }, - // TODO: add verifier - verifier, + prover, }) } @@ -235,11 +256,11 @@ impl + Clone> Rollup self.app.stf, storage.is_empty(), self.genesis_config, - self.verifier, + self.prover, )?; runner.start_rpc_server(methods, channel).await; - runner.run().await?; + runner.run_in_process().await?; Ok(()) } diff --git a/examples/demo-rollup/tests/test_helpers.rs b/examples/demo-rollup/tests/test_helpers.rs index d340efd77..812489199 100644 --- a/examples/demo-rollup/tests/test_helpers.rs +++ b/examples/demo-rollup/tests/test_helpers.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use sov_demo_rollup::new_rollup_with_mock_da_from_config; +use sov_demo_rollup::{new_rollup_with_mock_da_from_config, DemoProverConfig}; use sov_rollup_interface::mocks::MockDaConfig; use sov_rollup_interface::zk::ZkvmHost; use sov_stf_runner::{RollupConfig, RpcConfig, RunnerConfig, StorageConfig}; @@ -26,6 +26,7 @@ pub async fn start_rollup( }, da: MockDaConfig {}, }; + let prover = prover.map(|vm| (vm, DemoProverConfig::Simulate)); let rollup = new_rollup_with_mock_da_from_config(rollup_config, prover).expect("Rollup config is valid"); rollup diff --git a/full-node/sov-stf-runner/src/runner.rs b/full-node/sov-stf-runner/src/runner.rs index c722bd5e3..5e77d6caa 100644 --- a/full-node/sov-stf-runner/src/runner.rs +++ b/full-node/sov-stf-runner/src/runner.rs @@ -31,8 +31,32 @@ where ledger_db: LedgerDB, state_root: StateRoot, listen_address: SocketAddr, - #[allow(clippy::type_complexity)] - verifier: Option<(Vm, StateTransitionVerifier)>, + prover: Option>, +} + +/// Represents the possible modes of execution for a zkvm program +pub enum ProofGenConfig +where + ST: StateTransitionFunction, +{ + /// The simulator runs the rollup verifier logic without even emulating the zkvm + Simulate(StateTransitionVerifier), + /// The executor runs the rollup verification logic in the zkvm, but does not actually + /// produce a zk proof + Execute, + /// The prover runs the rollup verification logic in the zkvm and produces a zk proof + Prover, +} + +/// A prover for the demo rollup. Consists of a VM and a config +pub struct Prover +where + ST: StateTransitionFunction, +{ + /// The Zkvm Host to use + pub vm: Vm, + /// The prover configuration + pub config: ProofGenConfig, } impl StateTransitionRunner @@ -50,8 +74,7 @@ where Witness: Default, Root: Clone, { - /// Creates a new `StateTransitionRunner` runner. - #[allow(clippy::type_complexity)] + /// Creates a new `StateTransitionRunner`. pub fn new( runner_config: RunnerConfig, da_service: Da, @@ -59,7 +82,7 @@ where mut app: ST, should_init_chain: bool, genesis_config: InitialState, - verifier: Option<(Vm, StateTransitionVerifier)>, + prover: Option>, ) -> Result { let rpc_config = runner_config.rpc_config; @@ -90,7 +113,7 @@ where ledger_db, state_root: prev_state_root, listen_address, - verifier, + prover, }) } @@ -119,7 +142,7 @@ where } /// Runs the rollup. - pub async fn run(&mut self) -> Result<(), anyhow::Error> { + pub async fn run_in_process(&mut self) -> Result<(), anyhow::Error> { for height in self.start_height.. { debug!("Requesting data for height {}", height,); @@ -151,7 +174,7 @@ where for receipt in slot_result.batch_receipts { data_to_commit.add_batch(receipt); } - if let Some((host, verifier)) = self.verifier.as_mut() { + if let Some(Prover { vm, config }) = self.prover.as_mut() { let (inclusion_proof, completeness_proof) = self .da_service .get_extraction_proof(&filtered_block, &blobs) @@ -166,13 +189,17 @@ where blobs, state_transition_witness: slot_result.witness, }; - host.add_hint(transition_data); - - verifier - .run_block(host.simulate_with_hints()) - .map_err(|e| { - anyhow::anyhow!("Guest execution must succeed but failed with {:?}", e) - })?; + vm.add_hint(transition_data); + + match config { + ProofGenConfig::Simulate(verifier) => { + verifier.run_block(vm.simulate_with_hints()).map_err(|e| { + anyhow::anyhow!("Guest execution must succeed but failed with {:?}", e) + })?; + } + ProofGenConfig::Execute => vm.run(false)?, + ProofGenConfig::Prover => vm.run(true)?, + } } let next_state_root = slot_result.state_root; diff --git a/rollup-interface/src/state_machine/zk/mod.rs b/rollup-interface/src/state_machine/zk/mod.rs index fa9289210..fd35b460b 100644 --- a/rollup-interface/src/state_machine/zk/mod.rs +++ b/rollup-interface/src/state_machine/zk/mod.rs @@ -23,8 +23,18 @@ pub trait ZkvmHost: Zkvm { /// Give the guest a piece of advice non-deterministically fn add_hint(&self, item: T); - /// Simulate running the guest using the provided hints + /// Simulate running the guest using the provided hints. + /// + /// Provides a simulated version of the guest which can be + /// accessed in the current process. fn simulate_with_hints(&mut self) -> Self::Guest; + + /// Run the guest in the true zk environment using the provided hints. + /// + /// This runs the guest binary compiled for the ZKVM target, optionally + /// creating a SNARK of correct execution. Running the true guest binary comes + /// with some mild performance overhead and is not as easy to debug as [`simulate_with_hints`](ZkvmHost::simulate_with_hints). + fn run(&mut self, with_proof: bool) -> Result<(), anyhow::Error>; } /// A Zk proof system capable of proving and verifying arbitrary Rust code diff --git a/utils/zk-cycle-utils/README.md b/utils/zk-cycle-utils/README.md index 8a426efdc..9db64bbfc 100644 --- a/utils/zk-cycle-utils/README.md +++ b/utils/zk-cycle-utils/README.md @@ -1,22 +1,28 @@ ## Tracer -* The tracer binary makes use of goblin, capstone and rustc-demangle to disassemble the riscV ELF and build a symbol table -* The execution trace for the rollup ELF is generated by running the `demo-prover` with the `ROLLUP_TRACE` environment variable set to the desired path + +- The tracer binary makes use of goblin, capstone and rustc-demangle to disassemble the riscV ELF and build a symbol table +- The execution trace for the rollup ELF is generated by running the `demo-prover` with the `ROLLUP_TRACE` environment variable set to the desired path + ```bash cd examples/demo-prover/host ROLLUP_TRACE=rollup.trace cargo bench --bench prover_bench --features bench ``` -* `rollup.trace` now contains the program counter values for the run of the demo-prover (how many ever blocks, blobs and transactions we configured it for) -* The corresponding ELF used for the trace is found at + +- `rollup.trace` now contains the program counter values for the run of the demo-prover (how many ever blocks, blobs and transactions we configured it for) +- The corresponding ELF used for the trace is found at + ```bash $ file target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup: ELF 32-bit LSB executable, UCB RISC-V, soft-float ABI, version 1 (SYSV), statically linked, with debug_info, not stripped ``` -* Both the above files are passed as input to the tracer + +- Both the above files are passed as input to the tracer + ```bash -% cargo run -- --rollup-elf ../../../examples/demo-prover/target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup --rollup-trace ../../../examples/demo-prover/host/rollup.trace +% cargo run -- --rollup-elf ../../../examples/demo-prover/target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup --rollup-trace ../../../examples/demo-prover/rollup.trace Finished dev [unoptimized + debuginfo] target(s) in 0.11s Running `target/debug/tracer --rollup-elf ../../../examples/demo-prover/target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup --rollup-trace ../../../examples/demo-prover/rollup.trace` - [00:01:04] [########################################] 16154861/16154861 (0s) + [00:01:04] [########################################] 16154861/16154861 (0s) Total instructions in trace: 16154861 @@ -46,8 +52,10 @@ Total instructions in trace: 16154861 . +--------------------------------------------------------------------------------------------+-------------------+ ``` -* The tracer also generates a pure count of instructions without considering the stack -* There are other options that can be passed which are self documented in the cli + +- The tracer also generates a pure count of instructions without considering the stack +- There are other options that can be passed which are self documented in the cli + ```bash Usage: tracer [OPTIONS] --rollup-elf --rollup-trace @@ -61,4 +69,4 @@ Options: -h, --help Print help -V, --version Print version -``` \ No newline at end of file +```