From 14ec2af877e6df96f7b065a8c691a426f5b5f705 Mon Sep 17 00:00:00 2001 From: smtmfft Date: Fri, 12 Apr 2024 07:45:20 +0000 Subject: [PATCH 1/2] update risc0 dependency to 0.21.0 to run bonsai --- Cargo.lock | 111 ++++++++++++++++++++++++--------- Cargo.toml | 7 ++- host/Cargo.toml | 1 + host/src/execution.rs | 44 +++++++------ host/src/main.rs | 2 + provers/risc0/guest/Cargo.lock | 51 +++++++++------ provers/risc0/guest/Cargo.toml | 2 +- provers/risc0/src/lib.rs | 55 ++++++---------- provers/risc0/src/snarks.rs | 3 +- 9 files changed, 165 insertions(+), 111 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1cb3b3d8..81f8b2ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -997,11 +997,12 @@ dependencies = [ [[package]] name = "bonsai-sdk" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f0a6b186dce8b2f945bd3ecc5d35a36280400200ed57878c7c3f2aeb01632e" +checksum = "9e0f26687ed447c77b1a40a3665bf88e8327b6de65a74f521544bd225982f589" dependencies = [ "reqwest 0.11.27", + "risc0-groth16", "serde", "thiserror", "tokio", @@ -1744,6 +1745,29 @@ dependencies = [ "syn 2.0.57", ] +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -2505,6 +2529,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f58b778a5761513caf593693f8951c97a5b610841e754788400f32102eefdff1" +[[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.28" @@ -4048,6 +4078,7 @@ dependencies = [ "cap", "cfg-if", "clap 4.5.4", + "env_logger", "ethers-core", "flate2", "hashbrown 0.14.3", @@ -4465,9 +4496,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d263c6370d7714d2a634b6d88deb3871d0fad1f9486a9da6d48139c1ac85b26" +checksum = "2ae2939426c60756f910352184716a3538748208c9e11ade4a507db3b2757157" dependencies = [ "anyhow", "elf", @@ -4479,9 +4510,9 @@ dependencies = [ [[package]] name = "risc0-build" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a636849a58335ebece68161006a53d5590a6698092c3ca8e8a40a7c0aa8a20fb" +checksum = "d7a6a0138c9ae1d82eaa2ab6047535481a17641ba6c354890770bf94fbef8049" dependencies = [ "anyhow", "cargo-platform", @@ -4497,9 +4528,9 @@ dependencies = [ [[package]] name = "risc0-build-kernel" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa4cd0e10797e933d0e2056e24e5b15cc0bb324d5dfd44e145048a0029f7af5" +checksum = "cc02fece98f870221c25c22241e5f226fb3a9230df9cdeab170907440a97f41b" dependencies = [ "cc", "directories", @@ -4510,9 +4541,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9835069929a0e7b6b4b34e6a83f08aaa9d34b30023b9ccaf96ddbe20404eba" +checksum = "a43cade35f73ad81ba974fe1d5e1513331f87052af8377b26b00a838f39c6920" dependencies = [ "anyhow", "bytemuck", @@ -4532,9 +4563,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion-sys" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12fa422928ccae0ca6d39a3bdb784e417c65813f004b258f2113609095358ba" +checksum = "6ad2b82cbb0e0cc22182f00287f513daea3ea8a5cc0b709d8afdd9d9180fb89a" dependencies = [ "glob", "risc0-build-kernel", @@ -4543,9 +4574,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb1caa759ab74d08779e062fcf98f5bd34397dfde572516a52369f0ec46db650" +checksum = "31440989146b342a7d37c15079c9568c69b7f988f3b789f422c7d4ed76526ddb" dependencies = [ "anyhow", "cust", @@ -4561,9 +4592,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im-sys" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a88e4b25e30eeb49adab83fe014110bec18e69dd63a47a5f36b00ac48fe373" +checksum = "634d60a79888ec9416dbd3c88bac9b630b05e513c466b7acd64b7641eed48749" dependencies = [ "glob", "risc0-build-kernel", @@ -4572,14 +4603,37 @@ dependencies = [ [[package]] name = "risc0-core" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be79c89bcd18886b376073e3da22f8b7963247a42dce7b49cf3d09853f51641e" +checksum = "02e0cbd09d03c23b572b66cd96a56143adb22bf895aca89c1a153ccebedaa0b4" dependencies = [ "bytemuck", "rand_core", ] +[[package]] +name = "risc0-groth16" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da1e9b8dae3f9c3862b6278b2812989a2f5a537975e5bd6a687f07cf1df68a36" +dependencies = [ + "anyhow", + "ark-bn254", + "ark-groth16", + "ark-serialize 0.4.2", + "bytemuck", + "hex", + "num-bigint 0.4.4", + "num-derive", + "num-traits", + "risc0-core", + "risc0-zkp", + "serde", + "serde_json", + "tempfile", + "tracing", +] + [[package]] name = "risc0-prover" version = "0.1.0" @@ -4618,9 +4672,9 @@ dependencies = [ [[package]] name = "risc0-sys" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c40caeacec542a0187e44203dd90501edcecf194cad648d590f6b2b0e4e4e5b" +checksum = "61168816f4921e3cf1c9ff98792a7aa58d3e6c2dc5072bd7666690310e99fea1" dependencies = [ "cc", "cust", @@ -4630,9 +4684,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e20a57e04840a5afadebb5d232546245f4fd8bd0e774bd69bf4bf25f8ab90c04" +checksum = "b96b035f744ecaaa7e9809c699bc85cf669cbab6f297f141d918e9b4c8098b79" dependencies = [ "anyhow", "blake2", @@ -4658,15 +4712,12 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922588cb4b884b3951316a65581ccdfd1174af93c54093190878366812073329" +checksum = "2a1275834c86176efc122a172c2b5f271a8a5d792de7efbc47dfbecaaaff9432" dependencies = [ "addr2line", "anyhow", - "ark-bn254", - "ark-groth16", - "ark-serialize 0.4.2", "bincode", "bonsai-sdk", "bytemuck", @@ -4678,7 +4729,6 @@ dependencies = [ "hex", "human-repr", "lazy-regex", - "num-bigint 0.4.4", "num-derive", "num-traits", "prost", @@ -4689,6 +4739,7 @@ dependencies = [ "risc0-circuit-recursion", "risc0-circuit-rv32im", "risc0-core", + "risc0-groth16", "risc0-zkp", "risc0-zkvm-platform", "rrs-lib 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4703,9 +4754,9 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5819c0c3bfd8f20b1226c9d4ca1f342eb3d8385e71211a9383a879643d1dde" +checksum = "03b6378c9e407be18a1560ed030fd87fb6056293c56263efac46c507ae97e0d7" dependencies = [ "bytemuck", "getrandom", diff --git a/Cargo.toml b/Cargo.toml index 716e783b..45c38663 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,9 +38,9 @@ revm = { git = "https://github.com/taikoxyz/revm.git", branch = "fix-ecrecover", ] } # risc zero -risc0-zkvm = { version = "0.20.1", features = ["prove", "getrandom"]} -bonsai-sdk = { version = "0.6.0", features = ["async"]} -risc0-build = { version = "0.20.1" } +risc0-zkvm = { version = "0.21.0", features = ["prove", "getrandom"]} +bonsai-sdk = { version = "0.7.0", features = ["async"]} +risc0-build = { version = "0.21.0" } # SP1 sp1-core = { git = "https://github.com/succinctlabs/sp1.git", rev = "cb43fd74b24fad8ed24a4885499159de3680c89f" } @@ -108,6 +108,7 @@ cfg-if = "1.0.0" libflate = { version = "2.0.0" } sha3 = { version = "0.10", default-features = false } log = { version = "0.4" } +env_logger = { version = "0.11.3" } typetag = { version = "0.2.15" } hex = { version = "0.4.3" } thiserror-no-std = "2.0.2" diff --git a/host/Cargo.toml b/host/Cargo.toml index 0ba6630b..0b998396 100644 --- a/host/Cargo.toml +++ b/host/Cargo.toml @@ -41,6 +41,7 @@ serde_json = { workspace = true } tokio = { workspace = true } hyper = { workspace = true } hashbrown = { workspace = true } +env_logger = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } tracing-appender = { workspace = true } diff --git a/host/src/execution.rs b/host/src/execution.rs index 658ec02d..cdf8b193 100644 --- a/host/src/execution.rs +++ b/host/src/execution.rs @@ -37,42 +37,40 @@ pub async fn execute( // 2. Test run the block memory::reset_stats(); - let build_result = TaikoStrategy::build_from(&input); - let output = match &build_result { + match TaikoStrategy::build_from(&input) { Ok((header, _mpt_node)) => { info!("Verifying final state using provider data ..."); info!("Final block hash derived successfully. {}", header.hash()); info!("Final block header derived successfully. {:?}", header); - let pi = D::instance_hash(assemble_protocol_instance(&input, header)?); + let pi = D::instance_hash(assemble_protocol_instance(&input, &header)?); // Make sure the blockhash from the node matches the one from the builder assert_eq!(header.hash().0, input.block_hash, "block hash unexpected"); - GuestOutput::Success(( + let output = GuestOutput::Success(( WrappedHeader { header: header.clone(), }, pi, - )) + )); + memory::print_stats("Guest program peak memory used: "); + + // Prove + memory::reset_stats(); + let measurement = Measurement::start("Generating proof...", false); + let res = D::run(input.clone(), output, config) + .await + .map(|proof| (input, proof)) + .map_err(|e| HostError::GuestError(e.to_string())); + measurement.stop_with("=> Proof generated"); + memory::print_stats("Prover peak memory used: "); + + total_proving_time.stop_with("====> Complete proof generated"); + res } - Err(_) => { + Err(e) => { warn!("Proving bad block construction!"); - GuestOutput::Failure + Err(HostError::GuestError(e.to_string())) } - }; - memory::print_stats("Guest program peak memory used: "); - - // Prove - memory::reset_stats(); - let measurement = Measurement::start("Generating proof...", false); - let res = D::run(input.clone(), output, config) - .await - .map(|proof| (input, proof)) - .map_err(|e| HostError::GuestError(e.to_string())); - measurement.stop_with("=> Proof generated"); - memory::print_stats("Prover peak memory used: "); - - total_proving_time.stop_with("====> Complete proof generated"); - - res + } } /// prepare input data for provers diff --git a/host/src/main.rs b/host/src/main.rs index 83fc2559..ed0231b2 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -36,6 +36,7 @@ use tracing_appender::{ rolling::{Builder, Rotation}, }; use tracing_subscriber::FmtSubscriber; +use env_logger; #[global_allocator] static ALLOCATOR: Cap = Cap::new(alloc::System, usize::max_value()); @@ -74,6 +75,7 @@ pub struct Opt { #[tokio::main] async fn main() -> Result<()> { + env_logger::init(); let opt = Opt::from_args(); let config = get_config(None).unwrap(); println!("Start config:\n{:#?}", config); diff --git a/provers/risc0/guest/Cargo.lock b/provers/risc0/guest/Cargo.lock index 042cafae..095b2ca2 100644 --- a/provers/risc0/guest/Cargo.lock +++ b/provers/risc0/guest/Cargo.lock @@ -1875,9 +1875,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d263c6370d7714d2a634b6d88deb3871d0fad1f9486a9da6d48139c1ac85b26" +checksum = "2ae2939426c60756f910352184716a3538748208c9e11ade4a507db3b2757157" dependencies = [ "anyhow", "elf", @@ -1889,9 +1889,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9835069929a0e7b6b4b34e6a83f08aaa9d34b30023b9ccaf96ddbe20404eba" +checksum = "a43cade35f73ad81ba974fe1d5e1513331f87052af8377b26b00a838f39c6920" dependencies = [ "anyhow", "bytemuck", @@ -1903,9 +1903,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb1caa759ab74d08779e062fcf98f5bd34397dfde572516a52369f0ec46db650" +checksum = "31440989146b342a7d37c15079c9568c69b7f988f3b789f422c7d4ed76526ddb" dependencies = [ "anyhow", "risc0-core", @@ -1916,14 +1916,32 @@ dependencies = [ [[package]] name = "risc0-core" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be79c89bcd18886b376073e3da22f8b7963247a42dce7b49cf3d09853f51641e" +checksum = "02e0cbd09d03c23b572b66cd96a56143adb22bf895aca89c1a153ccebedaa0b4" dependencies = [ "bytemuck", "rand_core", ] +[[package]] +name = "risc0-groth16" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da1e9b8dae3f9c3862b6278b2812989a2f5a537975e5bd6a687f07cf1df68a36" +dependencies = [ + "anyhow", + "ark-bn254", + "ark-groth16", + "ark-serialize 0.4.2", + "hex", + "num-bigint", + "num-derive", + "num-traits", + "risc0-zkp", + "serde", +] + [[package]] name = "risc0-methods" version = "0.1.0" @@ -1935,9 +1953,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e20a57e04840a5afadebb5d232546245f4fd8bd0e774bd69bf4bf25f8ab90c04" +checksum = "b96b035f744ecaaa7e9809c699bc85cf669cbab6f297f141d918e9b4c8098b79" dependencies = [ "anyhow", "blake2", @@ -1955,25 +1973,22 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922588cb4b884b3951316a65581ccdfd1174af93c54093190878366812073329" +checksum = "2a1275834c86176efc122a172c2b5f271a8a5d792de7efbc47dfbecaaaff9432" dependencies = [ "anyhow", - "ark-bn254", - "ark-groth16", - "ark-serialize 0.4.2", "bytemuck", "cfg-if", "getrandom", "hex", - "num-bigint", "num-derive", "num-traits", "risc0-binfmt", "risc0-circuit-recursion", "risc0-circuit-rv32im", "risc0-core", + "risc0-groth16", "risc0-zkp", "risc0-zkvm-platform", "rrs-lib", @@ -1985,9 +2000,9 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5819c0c3bfd8f20b1226c9d4ca1f342eb3d8385e71211a9383a879643d1dde" +checksum = "03b6378c9e407be18a1560ed030fd87fb6056293c56263efac46c507ae97e0d7" dependencies = [ "bytemuck", "getrandom", diff --git a/provers/risc0/guest/Cargo.toml b/provers/risc0/guest/Cargo.toml index a7bc5a33..6f5013ec 100644 --- a/provers/risc0/guest/Cargo.toml +++ b/provers/risc0/guest/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] raiko-primitives = { path = "../../../primitives" } raiko-lib = { path = "../../../lib", features = ["std"] } -risc0-zkvm = { version = "0.20.1", default-features = false, features = ['std', "getrandom"] } +risc0-zkvm = { version = "0.21.0", default-features = false, features = ['std', "getrandom"] } [patch.crates-io] # use optimized risc0 circuit diff --git a/provers/risc0/src/lib.rs b/provers/risc0/src/lib.rs index 93aaf26d..2a85c75c 100644 --- a/provers/risc0/src/lib.rs +++ b/provers/risc0/src/lib.rs @@ -22,7 +22,7 @@ use risc0_zkvm::{ compute_image_id, is_dev_mode, serde::to_vec, sha::{Digest, Digestible}, - Assumption, ExecutorEnv, ExecutorImpl, FileSegmentRef, Receipt, Segment, SegmentRef, + Assumption, ExecutorEnv, ExecutorImpl, Receipt, }; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_with::serde_as; @@ -44,7 +44,7 @@ pub struct Risc0Param { #[derive(Clone, Serialize, Deserialize)] pub struct Risc0Response { - pub journal: String, + pub proof: String, } pub struct Risc0Prover; @@ -88,7 +88,7 @@ impl Prover for Risc0Prover { .map_err(|err| format!("Failed to verify SNARK: {:?}", err))?; } - to_proof(Ok(Risc0Response { journal })) + to_proof(Ok(Risc0Response { proof: journal })) } fn instance_hash(pi: ProtocolInstance) -> B256 { @@ -112,7 +112,7 @@ pub async fn stark2snark( ); // Load cached receipt if found if let Ok(Some(cached_data)) = load_receipt(&receipt_label) { - info!("Loaded locally cached receipt"); + info!("Loaded locally cached snark receipt {:?}", receipt_label); return Ok(cached_data); } // Otherwise compute on Bonsai @@ -262,24 +262,30 @@ pub async fn maybe_prove { + break (receipt_uuid, receipt, false); + } + Err(err) => { + warn!("Failed to prove on Bonsai: {:?}", err); + std::thread::sleep(std::time::Duration::from_secs(15)); + } } } } else { // run prover + info!("start running local prover"); ( Default::default(), prove_locally( @@ -293,8 +299,8 @@ pub async fn maybe_prove anyhow::Result { - unimplemented!() - } -} - pub fn load_receipt( file_name: &String, ) -> anyhow::Result> { diff --git a/provers/risc0/src/snarks.rs b/provers/risc0/src/snarks.rs index a2c6d15e..0937cdaa 100644 --- a/provers/risc0/src/snarks.rs +++ b/provers/risc0/src/snarks.rs @@ -16,7 +16,8 @@ use std::{str::FromStr, sync::Arc}; use alloy_primitives::U256; use alloy_sol_types::{sol, SolValue}; -use bonsai_sdk::alpha::responses::{Groth16Seal, SnarkReceipt}; +use risc0_zkvm::Groth16Seal; +use bonsai_sdk::alpha::responses::SnarkReceipt; use ethers_contract::abigen; use ethers_core::types::H160; use ethers_providers::{Http, Provider, RetryClient}; From 4c0e4a91f6f24f7824906c2faf28f8e0f257bd7b Mon Sep 17 00:00:00 2001 From: smtmfft Date: Fri, 12 Apr 2024 11:37:31 +0000 Subject: [PATCH 2/2] fix fmt --- host/src/execution.rs | 2 +- host/src/main.rs | 2 +- provers/risc0/src/lib.rs | 3 ++- provers/risc0/src/snarks.rs | 6 ++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/host/src/execution.rs b/host/src/execution.rs index cdf8b193..67c9fb11 100644 --- a/host/src/execution.rs +++ b/host/src/execution.rs @@ -62,7 +62,7 @@ pub async fn execute( .map_err(|e| HostError::GuestError(e.to_string())); measurement.stop_with("=> Proof generated"); memory::print_stats("Prover peak memory used: "); - + total_proving_time.stop_with("====> Complete proof generated"); res } diff --git a/host/src/main.rs b/host/src/main.rs index ed0231b2..96097555 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -27,6 +27,7 @@ use std::{alloc, fmt::Debug, fs::File, io::BufReader, path::PathBuf}; use anyhow::Result; use cap::Cap; +use env_logger; use serde::{Deserialize, Serialize}; use serde_json::Value; use server::serve; @@ -36,7 +37,6 @@ use tracing_appender::{ rolling::{Builder, Rotation}, }; use tracing_subscriber::FmtSubscriber; -use env_logger; #[global_allocator] static ALLOCATOR: Cap = Cap::new(alloc::System, usize::max_value()); diff --git a/provers/risc0/src/lib.rs b/provers/risc0/src/lib.rs index 2a85c75c..80aceb31 100644 --- a/provers/risc0/src/lib.rs +++ b/provers/risc0/src/lib.rs @@ -273,7 +273,8 @@ pub async fn maybe_prove { break (receipt_uuid, receipt, false); } diff --git a/provers/risc0/src/snarks.rs b/provers/risc0/src/snarks.rs index 0937cdaa..78da4f62 100644 --- a/provers/risc0/src/snarks.rs +++ b/provers/risc0/src/snarks.rs @@ -16,12 +16,14 @@ use std::{str::FromStr, sync::Arc}; use alloy_primitives::U256; use alloy_sol_types::{sol, SolValue}; -use risc0_zkvm::Groth16Seal; use bonsai_sdk::alpha::responses::SnarkReceipt; use ethers_contract::abigen; use ethers_core::types::H160; use ethers_providers::{Http, Provider, RetryClient}; -use risc0_zkvm::sha::{Digest, Digestible}; +use risc0_zkvm::{ + sha::{Digest, Digestible}, + Groth16Seal, +}; use tracing::{error as tracing_err, info as tracing_info}; sol!(