From cbaca0d13c481a6375de4b2359a2746007495895 Mon Sep 17 00:00:00 2001 From: capossele Date: Fri, 26 Jan 2024 22:26:41 +0000 Subject: [PATCH] bump to rc4 --- .github/workflows/test.yml | 4 +-- Cargo.lock | 55 +++++++++++++++++--------------------- Cargo.toml | 8 +++--- lib/risc0 | 2 +- methods/guest/Cargo.lock | 35 ++++++++++-------------- methods/guest/Cargo.toml | 2 +- relay/src/lib.rs | 8 +++--- 7 files changed, 50 insertions(+), 64 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93bfd289..452970be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: version: "1.4" - name: Cargo binstall cargo-risczero - run: cargo binstall -y --force cargo-risczero@0.20.0-rc.3 + run: cargo binstall -y --force cargo-risczero@0.20.0-rc.4 - name: risczero toolchain install run: cargo risczero install @@ -86,7 +86,7 @@ jobs: version: "1.4" - name: Cargo binstall cargo-risczero - run: cargo binstall -y --force cargo-risczero@0.20.0-rc.3 + run: cargo binstall -y --force cargo-risczero@0.20.0-rc.4 - name: risczero toolchain install run: cargo risczero install diff --git a/Cargo.lock b/Cargo.lock index 2fca81ef..852c16c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -713,9 +713,9 @@ dependencies = [ [[package]] name = "bonsai-ethereum-contracts" -version = "0.6.0-rc.3" +version = "0.6.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad9640ccd20adae9c6a7593392c223dff18320c3532873bac1824ce17d63321" +checksum = "04aba101b38e0841bb625571c11c8732c04668c0547ca73a9be3b63491470d3c" dependencies = [ "anyhow", "ethers", @@ -723,9 +723,9 @@ dependencies = [ [[package]] name = "bonsai-ethereum-relay" -version = "0.6.0-rc.3" +version = "0.6.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1351c34d52cbfcf42248ace35dab57da603b53053e235b0838fdac687811296" +checksum = "1a6f45d7c21adb6b0fad80ee4ac7ff708dd934d5e31bbfc63699932ce6b6e8de" dependencies = [ "anyhow", "async-trait", @@ -781,9 +781,9 @@ dependencies = [ [[package]] name = "bonsai-rest-api-mock" -version = "0.6.0-rc.3" +version = "0.6.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46fe9a8d20d14090c4a4c96413c894cb4bdd35b715d6769c161d96bab6a7bda" +checksum = "2957c88e68fe07903758d7986ffea9053812c458fdef897316e68993aa680d88" dependencies = [ "anyhow", "axum", @@ -801,9 +801,9 @@ dependencies = [ [[package]] name = "bonsai-sdk" -version = "0.6.0-rc.3" +version = "0.6.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0186d8850ad1d53286eba36a338357bef35d0dbb4ce83e3bab159e43620ab686" +checksum = "729ab449d9b17e5eed737a16ba2e87b0650046e0e13bca433711c54428509474" dependencies = [ "reqwest", "serde", @@ -2271,12 +2271,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "human-repr" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58b778a5761513caf593693f8951c97a5b610841e754788400f32102eefdff1" - [[package]] name = "humantime" version = "2.1.0" @@ -3506,9 +3500,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36d1805bd1ad2b5b9c6e8513810768d9de976683938f90dda142c4721230c644" +checksum = "b584e52f03de81fc93eaa421dd1565d97d99b5603f5ea072266c52c7c71c46a6" dependencies = [ "anyhow", "elf", @@ -3520,9 +3514,9 @@ dependencies = [ [[package]] name = "risc0-build" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277d192ea9e469117c0f99b33be5acf5f5f34610f7b58a222022c30178c605a4" +checksum = "2609fa54936cf8510533c045cf2a98ce852284228326ffc7b9ebdd8a73312006" dependencies = [ "anyhow", "cargo-platform", @@ -3538,9 +3532,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17513c8e87155dbfe108cb6b4795ffd2daecfa391798f1d8573c4bdecb16c947" +checksum = "850d1cac31350963894d474f7dbebbd0303b80bf1ffc52b610ff7e7cfbde9236" dependencies = [ "anyhow", "bytemuck", @@ -3552,9 +3546,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f8919f96f980c40105a4e1460795abb3c7e0f8caea4713a12da258d94ea12d" +checksum = "fa7377570b36b718e6b89a0d5c454822f3f3867d05293017f37976a2d1bd16a4" dependencies = [ "anyhow", "risc0-core", @@ -3565,9 +3559,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6023c0820c52e2829ae7780ade0ba5816b6dd5dd172c6973bf76a0802dc8f3bc" +checksum = "a694c3024ec62d47d53207b2f30462bfb50852e77a0663368456801568f8a7e5" dependencies = [ "bytemuck", "rand_core", @@ -3575,9 +3569,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dceae2b472760fbf9e2435ded5981a7ddcd36b6af3ec021b1670405b00b0c5b" +checksum = "d8773239bc644f0d44f5197ff35f438ff392391270ff660f4581981ff9c4282b" dependencies = [ "anyhow", "blake2", @@ -3595,9 +3589,9 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6138aa5ce729fe0bf7d86f9e64d12e78a01758a6d3bee197e5a66e1a6bbe9f" +checksum = "0dbfd7bab847ab6d1c59830ba51384c09e37a22426f6e3e313748ca8492ed246" dependencies = [ "anyhow", "ark-bn254", @@ -3610,7 +3604,6 @@ dependencies = [ "cfg-if", "getrandom", "hex", - "human-repr", "num-bigint", "num-derive", "num-traits", @@ -3632,9 +3625,9 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600ace62adbbb99d52642d539816569239b080dc496414f1cd04ed2faecc6203" +checksum = "a8f9bf85f03f5f5e24b9eae1100adcc035c5c8aaffea00490d704b426f37f9b3" dependencies = [ "bytemuck", "getrandom", diff --git a/Cargo.toml b/Cargo.toml index 8fca8717..691c2c38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,11 +3,11 @@ members = ["methods", "relay"] resolver = "2" [workspace.dependencies] -bonsai-ethereum-relay = { version = "0.6.0-rc.3" } -bonsai-sdk = { version = "0.6.0-rc.3" } +bonsai-ethereum-relay = { version = "0.6.0-rc.4" } +bonsai-sdk = { version = "0.6.0-rc.4" } methods = { path = "./methods", package = "bonsai-starter-methods" } -risc0-build = { version = "0.20.0-rc.3" } -risc0-zkvm = { version = "0.20.0-rc.3", default-features = false } +risc0-build = { version = "0.20.0-rc.4" } +risc0-zkvm = { version = "0.20.0-rc.4", default-features = false } # Always optimize; building and running the guest takes much longer without optimization. [profile.dev] diff --git a/lib/risc0 b/lib/risc0 index f2e9dbeb..60a40ec3 160000 --- a/lib/risc0 +++ b/lib/risc0 @@ -1 +1 @@ -Subproject commit f2e9dbebd0a74c2eaf9a52ee727710016421b430 +Subproject commit 60a40ec3ade46841f49e921a8997df4a559981b4 diff --git a/methods/guest/Cargo.lock b/methods/guest/Cargo.lock index 5cb81816..36b582ef 100644 --- a/methods/guest/Cargo.lock +++ b/methods/guest/Cargo.lock @@ -400,12 +400,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "human-repr" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58b778a5761513caf593693f8951c97a5b610841e754788400f32102eefdff1" - [[package]] name = "itertools" version = "0.10.5" @@ -568,9 +562,9 @@ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" [[package]] name = "risc0-binfmt" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36d1805bd1ad2b5b9c6e8513810768d9de976683938f90dda142c4721230c644" +checksum = "b584e52f03de81fc93eaa421dd1565d97d99b5603f5ea072266c52c7c71c46a6" dependencies = [ "anyhow", "elf", @@ -582,9 +576,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17513c8e87155dbfe108cb6b4795ffd2daecfa391798f1d8573c4bdecb16c947" +checksum = "850d1cac31350963894d474f7dbebbd0303b80bf1ffc52b610ff7e7cfbde9236" dependencies = [ "anyhow", "bytemuck", @@ -596,9 +590,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f8919f96f980c40105a4e1460795abb3c7e0f8caea4713a12da258d94ea12d" +checksum = "fa7377570b36b718e6b89a0d5c454822f3f3867d05293017f37976a2d1bd16a4" dependencies = [ "anyhow", "risc0-core", @@ -609,9 +603,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6023c0820c52e2829ae7780ade0ba5816b6dd5dd172c6973bf76a0802dc8f3bc" +checksum = "a694c3024ec62d47d53207b2f30462bfb50852e77a0663368456801568f8a7e5" dependencies = [ "bytemuck", "rand_core", @@ -619,9 +613,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dceae2b472760fbf9e2435ded5981a7ddcd36b6af3ec021b1670405b00b0c5b" +checksum = "d8773239bc644f0d44f5197ff35f438ff392391270ff660f4581981ff9c4282b" dependencies = [ "anyhow", "blake2", @@ -639,9 +633,9 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6138aa5ce729fe0bf7d86f9e64d12e78a01758a6d3bee197e5a66e1a6bbe9f" +checksum = "0dbfd7bab847ab6d1c59830ba51384c09e37a22426f6e3e313748ca8492ed246" dependencies = [ "anyhow", "ark-bn254", @@ -651,7 +645,6 @@ dependencies = [ "cfg-if", "getrandom", "hex", - "human-repr", "num-bigint", "num-derive", "num-traits", @@ -670,9 +663,9 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "0.20.0-rc.3" +version = "0.20.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600ace62adbbb99d52642d539816569239b080dc496414f1cd04ed2faecc6203" +checksum = "a8f9bf85f03f5f5e24b9eae1100adcc035c5c8aaffea00490d704b426f37f9b3" dependencies = [ "bytemuck", "getrandom", diff --git a/methods/guest/Cargo.toml b/methods/guest/Cargo.toml index bbba2e95..1e8b4e2b 100644 --- a/methods/guest/Cargo.toml +++ b/methods/guest/Cargo.toml @@ -11,7 +11,7 @@ path = "src/bin/fibonacci.rs" ethabi = { version = "18.0", default-features = false } # Directly import radium to silence warning about unused patch. See https://github.com/risc0/risc0/issues/549 radium = "=0.7.1" -risc0-zkvm = { version = "0.20.0-rc.3", default-features = false, features = ["std"] } +risc0-zkvm = { version = "0.20.0-rc.4", default-features = false, features = ["std"] } [patch.crates-io] radium = { git = "https://github.com/bitvecto-rs/radium", rev = "723bed5abd75994ee4b7221b8b12c9f4e77ce408" } diff --git a/relay/src/lib.rs b/relay/src/lib.rs index ce562523..677eb6db 100644 --- a/relay/src/lib.rs +++ b/relay/src/lib.rs @@ -17,7 +17,7 @@ use std::time::Duration; use anyhow::{anyhow, bail, Context, Result}; use bonsai_sdk::alpha::{responses::SnarkReceipt, Client}; use risc0_build::GuestListEntry; -use risc0_zkvm::{compute_image_id, default_prover, ExecutorEnv, Receipt}; +use risc0_zkvm::{compute_image_id, default_executor, ExecutorEnv, Receipt}; pub const POLL_INTERVAL_SEC: u64 = 4; @@ -34,10 +34,10 @@ pub fn execute_locally(elf: &[u8], input: Vec) -> Result { .write_slice(&input) .build() .context("Failed to build ExecutorEnv")?; - let prover = default_prover(); - let receipt = prover.prove(env, elf).context("Execution failed")?; + let exec = default_executor(); + let session_info = exec.execute(env, elf).context("Execution failed")?; Ok(Output::Execution { - journal: receipt.journal.bytes, + journal: session_info.journal.bytes, }) }