diff --git a/Cargo.lock b/Cargo.lock index fac74cbd..6ad58c1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,28 +15,19 @@ dependencies = [ [[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 0.27.3", + "gimli", "memmap2", - "object 0.31.1", + "object", "rustc-demangle", "smallvec", ] -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli 0.28.0", -] - [[package]] name = "adler" version = "1.0.2" @@ -410,12 +401,12 @@ version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.21.0", + "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.1", + "object", "rustc-demangle", ] @@ -550,9 +541,9 @@ dependencies = [ [[package]] name = "bonsai-sdk" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94478e373742b9d1de02e13399633348e5b230dfe6364f65e80056c7df7438c5" +checksum = "296de0c044ff3207f2252415ca3b5789de384e5d9a64185a003416bf11096ceb" dependencies = [ "reqwest", "serde", @@ -1025,12 +1016,32 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "docker-generate" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf673e0848ef09fa4aeeba78e681cf651c0c7d35f76ee38cec8e55bc32fa111" + [[package]] name = "downcast-rs" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "downloader" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05213e96f184578b5f70105d4d0a644a168e99e12d7bea0b200c15d67b5c182" +dependencies = [ + "digest 0.10.7", + "futures", + "rand", + "reqwest", + "thiserror", + "tokio", +] + [[package]] name = "dunce" version = "1.0.4" @@ -1273,9 +1284,9 @@ dependencies = [ [[package]] name = "fallible-iterator" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" @@ -1519,21 +1530,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" dependencies = [ "fallible-iterator", - "indexmap 1.9.3", + "indexmap 2.0.2", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - [[package]] name = "glob" version = "0.3.1" @@ -1552,6 +1557,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "goblin" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27c1b4369c2cd341b5de549380158b105a04c331be5db9110eef7b6d2742134" +dependencies = [ + "log", + "plain", + "scroll", +] + [[package]] name = "group" version = "0.13.0" @@ -2280,24 +2296,15 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "object" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" -dependencies = [ - "flate2", - "memchr", - "ruzstd", -] - [[package]] name = "object" version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ + "flate2", "memchr", + "ruzstd", ] [[package]] @@ -2536,6 +2543,12 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -3013,9 +3026,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede27631e6b2a946a43db812063453c9701d5d2544d82f9abec2cc12574ebb8e" +checksum = "73b008c7506a6acb15f14a87e7e57797fd901cdf2f4eb560a032df4e1fc12790" dependencies = [ "anyhow", "elf", @@ -3027,37 +3040,70 @@ dependencies = [ [[package]] name = "risc0-build" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703b79671cd148f6535e1f78b8a74f665c920493eb6546c516c67ab0bc0bbde1" +checksum = "c44fdc4ad18c946a26dc42ed95ffc1cfa09a18973e68e394b83840724a5ca7ab" dependencies = [ + "anyhow", "cargo_metadata", + "docker-generate", "risc0-binfmt", "risc0-zkp", "risc0-zkvm-platform", "serde", "serde_json", + "tempfile", ] [[package]] name = "risc0-build-kernel" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b88d565a721641f355cb889fee75c12c719dec7b910aa42ecabffa30d99f87" +checksum = "d75c5f1963e9bdb62e06d8a0d00443365fa907d508f813078fc57aec6b381802" dependencies = [ "cc", "directories", - "glob", "hex", "sha2", "tempfile", ] +[[package]] +name = "risc0-circuit-recursion" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924bbd4f27070f04556e10565441fbf64e399763a3f244819f84dc645590bca1" +dependencies = [ + "anyhow", + "bytemuck", + "downloader", + "log", + "rand", + "rayon", + "risc0-circuit-recursion-sys", + "risc0-core", + "risc0-zkp", + "sha2", + "tracing", + "zip", +] + +[[package]] +name = "risc0-circuit-recursion-sys" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2829d93fc661aece4c3274dd02b96e4900774977ff2b34dc2f79e402db13eba7" +dependencies = [ + "glob", + "risc0-build-kernel", + "risc0-core", +] + [[package]] name = "risc0-circuit-rv32im" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e00222152fdc94cacc9b6682b5c0cbe8138f1ee82e80c24a64d9ad2c6d7415" +checksum = "4ac44b6493d73638018d62eccec93f2797795d286c6201e2a79d842a16bbb43f" dependencies = [ "anyhow", "log", @@ -3065,7 +3111,6 @@ dependencies = [ "rayon", "risc0-circuit-rv32im-sys", "risc0-core", - "risc0-sys", "risc0-zkp", "risc0-zkvm-platform", "tracing", @@ -3073,21 +3118,20 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca6ec6b1a7aad859af0009d19946ffdded8e3bd5d9accf893846b6bf996ac08" +checksum = "6100c73814cfb35bee9cb43ad7fc2842a04b312a9b0d6e87ec37d1591816d463" dependencies = [ "glob", "risc0-build-kernel", "risc0-core", - "risc0-sys", ] [[package]] name = "risc0-core" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08605aec93ea22ed83f7f81f42e2d7287a5b0c749d8671f94de9d5994020045c" +checksum = "1f8d9ff7ca4b8a9ecf63e4567dfc5ab73ea4c4c20618cdd36d5c0eb69be80cb2" dependencies = [ "bytemuck", "rand_core", @@ -3095,21 +3139,18 @@ dependencies = [ [[package]] name = "risc0-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6d308c2ebc79e32c100f57722914b3172d2f0d69321703b684ea0c302e4f3a9" +checksum = "c1f002186c64f4e1b196cc06240787eaa472723222628d4d9f330692072227aa" dependencies = [ - "cc", - "glob", "risc0-build-kernel", - "risc0-core", ] [[package]] name = "risc0-zkp" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28166926bb177824939f4e91083198f9f3da8137aeac32361bd34548c0526fa5" +checksum = "d1b8f047ec52f645e5e1c46f69303658f9cca96f0a2dcb78b4e7cadef5c2ac3d" dependencies = [ "anyhow", "blake2", @@ -3134,11 +3175,11 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec972152bcaa1a2967e412e22a84f6e2984a95c701bcc7943ca8ca10126ee0a2" +checksum = "d4b51d8aa8a4b0a350cca2deb9ead841989ed601ca3091e33a8ee8e6f2453048" dependencies = [ - "addr2line 0.20.0", + "addr2line", "anyhow", "bincode", "bonsai-sdk", @@ -3148,37 +3189,44 @@ dependencies = [ "crypto-bigint", "generic-array", "getrandom", - "gimli 0.27.3", + "gimli", + "goblin", "hex", "lazy-regex", - "libm", "log", "num-derive", "num-traits", + "object", "prost", "prost-build", "protobuf-src", - "rand", "rayon", "risc0-binfmt", + "risc0-circuit-recursion", "risc0-circuit-rv32im", "risc0-core", "risc0-zkp", "risc0-zkvm-platform", "rrs-lib", + "rustc-demangle", + "semver 1.0.20", "serde", "sha2", "tempfile", - "thiserror", "tracing", "typetag", ] [[package]] name = "risc0-zkvm-platform" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8524b46783b58b00e9b2a4712e837093c975b23cf25bfaf99e1cf69e9011bf6b" +checksum = "59e9d18c75958239e91213a181e836e28dfbede913e4de66fa36e2ad1d70fcdc" +dependencies = [ + "bytemuck", + "getrandom", + "libm", +] [[package]] name = "rlp" @@ -3370,12 +3418,12 @@ dependencies = [ [[package]] name = "ruzstd" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a15e661f0f9dac21f3494fe5d23a6338c0ac116a2d22c2b63010acd89467ffe" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" dependencies = [ "byteorder", - "thiserror", + "thiserror-core", "twox-hash", ] @@ -3424,6 +3472,26 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "sct" version = "0.7.0" @@ -3887,6 +3955,26 @@ dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "thiserror-impl" version = "1.0.49" @@ -4655,3 +4743,44 @@ dependencies = [ "zeth-lib", "zeth-primitives", ] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "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]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index a1d2b17b..ea47e584 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,8 @@ lto = true opt-level = 3 [workspace.dependencies] -bonsai-sdk = "0.4" +bonsai-sdk = "0.5" hashbrown = { version = "0.14", features = ["inline-more"] } -risc0-build = "0.18" -risc0-zkvm = { version = "0.18", default-features = false } +risc0-build = "0.19" +risc0-zkvm = { version = "0.19", default-features = false } revm = { version = "3.5", default-features = false, features = ["std", "serde", "optional_no_base_fee", "optional_balance_check"] } diff --git a/guests/eth-block/Cargo.lock b/guests/eth-block/Cargo.lock index b5975512..4e8269f7 100644 --- a/guests/eth-block/Cargo.lock +++ b/guests/eth-block/Cargo.lock @@ -550,6 +550,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "ecdsa" version = "0.16.7" @@ -2052,9 +2058,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede27631e6b2a946a43db812063453c9701d5d2544d82f9abec2cc12574ebb8e" +checksum = "73b008c7506a6acb15f14a87e7e57797fd901cdf2f4eb560a032df4e1fc12790" dependencies = [ "anyhow", "elf", @@ -2064,11 +2070,25 @@ dependencies = [ "serde", ] +[[package]] +name = "risc0-circuit-recursion" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924bbd4f27070f04556e10565441fbf64e399763a3f244819f84dc645590bca1" +dependencies = [ + "anyhow", + "bytemuck", + "log", + "risc0-core", + "risc0-zkp", + "tracing", +] + [[package]] name = "risc0-circuit-rv32im" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e00222152fdc94cacc9b6682b5c0cbe8138f1ee82e80c24a64d9ad2c6d7415" +checksum = "4ac44b6493d73638018d62eccec93f2797795d286c6201e2a79d842a16bbb43f" dependencies = [ "anyhow", "log", @@ -2080,9 +2100,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08605aec93ea22ed83f7f81f42e2d7287a5b0c749d8671f94de9d5994020045c" +checksum = "1f8d9ff7ca4b8a9ecf63e4567dfc5ab73ea4c4c20618cdd36d5c0eb69be80cb2" dependencies = [ "bytemuck", "rand_core", @@ -2090,9 +2110,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28166926bb177824939f4e91083198f9f3da8137aeac32361bd34548c0526fa5" +checksum = "d1b8f047ec52f645e5e1c46f69303658f9cca96f0a2dcb78b4e7cadef5c2ac3d" dependencies = [ "anyhow", "blake2", @@ -2111,34 +2131,40 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec972152bcaa1a2967e412e22a84f6e2984a95c701bcc7943ca8ca10126ee0a2" +checksum = "d4b51d8aa8a4b0a350cca2deb9ead841989ed601ca3091e33a8ee8e6f2453048" dependencies = [ "anyhow", "bytemuck", "cfg-if", "getrandom", "hex", - "libm", "log", "num-derive", "num-traits", "risc0-binfmt", + "risc0-circuit-recursion", "risc0-circuit-rv32im", "risc0-core", "risc0-zkp", "risc0-zkvm-platform", + "rrs-lib", + "semver", "serde", - "tempfile", "tracing", ] [[package]] name = "risc0-zkvm-platform" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8524b46783b58b00e9b2a4712e837093c975b23cf25bfaf99e1cf69e9011bf6b" +checksum = "59e9d18c75958239e91213a181e836e28dfbede913e4de66fa36e2ad1d70fcdc" +dependencies = [ + "bytemuck", + "getrandom", + "libm", +] [[package]] name = "rlp" @@ -2162,6 +2188,16 @@ dependencies = [ "syn 1.0.109", ] +[[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 = "ruint" version = "1.10.1" diff --git a/guests/eth-block/Cargo.toml b/guests/eth-block/Cargo.toml index 259aa976..b5310206 100644 --- a/guests/eth-block/Cargo.toml +++ b/guests/eth-block/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] k256 = { version = "=0.13.1", features = ["std", "ecdsa"], default_features = false } -risc0-zkvm = { version = "0.18", default-features = false, features = ['std'] } +risc0-zkvm = { version = "0.19", default-features = false, features = ['std'] } zeth-lib = { path = "../../lib", default-features = false } [patch.crates-io] diff --git a/guests/op-block/Cargo.lock b/guests/op-block/Cargo.lock index 02c66b76..d6586605 100644 --- a/guests/op-block/Cargo.lock +++ b/guests/op-block/Cargo.lock @@ -550,6 +550,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "ecdsa" version = "0.16.7" @@ -2052,9 +2058,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede27631e6b2a946a43db812063453c9701d5d2544d82f9abec2cc12574ebb8e" +checksum = "73b008c7506a6acb15f14a87e7e57797fd901cdf2f4eb560a032df4e1fc12790" dependencies = [ "anyhow", "elf", @@ -2064,11 +2070,25 @@ dependencies = [ "serde", ] +[[package]] +name = "risc0-circuit-recursion" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924bbd4f27070f04556e10565441fbf64e399763a3f244819f84dc645590bca1" +dependencies = [ + "anyhow", + "bytemuck", + "log", + "risc0-core", + "risc0-zkp", + "tracing", +] + [[package]] name = "risc0-circuit-rv32im" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e00222152fdc94cacc9b6682b5c0cbe8138f1ee82e80c24a64d9ad2c6d7415" +checksum = "4ac44b6493d73638018d62eccec93f2797795d286c6201e2a79d842a16bbb43f" dependencies = [ "anyhow", "log", @@ -2080,9 +2100,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08605aec93ea22ed83f7f81f42e2d7287a5b0c749d8671f94de9d5994020045c" +checksum = "1f8d9ff7ca4b8a9ecf63e4567dfc5ab73ea4c4c20618cdd36d5c0eb69be80cb2" dependencies = [ "bytemuck", "rand_core", @@ -2090,9 +2110,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28166926bb177824939f4e91083198f9f3da8137aeac32361bd34548c0526fa5" +checksum = "d1b8f047ec52f645e5e1c46f69303658f9cca96f0a2dcb78b4e7cadef5c2ac3d" dependencies = [ "anyhow", "blake2", @@ -2111,34 +2131,40 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec972152bcaa1a2967e412e22a84f6e2984a95c701bcc7943ca8ca10126ee0a2" +checksum = "d4b51d8aa8a4b0a350cca2deb9ead841989ed601ca3091e33a8ee8e6f2453048" dependencies = [ "anyhow", "bytemuck", "cfg-if", "getrandom", "hex", - "libm", "log", "num-derive", "num-traits", "risc0-binfmt", + "risc0-circuit-recursion", "risc0-circuit-rv32im", "risc0-core", "risc0-zkp", "risc0-zkvm-platform", + "rrs-lib", + "semver", "serde", - "tempfile", "tracing", ] [[package]] name = "risc0-zkvm-platform" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8524b46783b58b00e9b2a4712e837093c975b23cf25bfaf99e1cf69e9011bf6b" +checksum = "59e9d18c75958239e91213a181e836e28dfbede913e4de66fa36e2ad1d70fcdc" +dependencies = [ + "bytemuck", + "getrandom", + "libm", +] [[package]] name = "rlp" @@ -2162,6 +2188,16 @@ dependencies = [ "syn 1.0.109", ] +[[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 = "ruint" version = "1.10.1" diff --git a/guests/op-block/Cargo.toml b/guests/op-block/Cargo.toml index 3cc3496f..2ac84e63 100644 --- a/guests/op-block/Cargo.toml +++ b/guests/op-block/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] k256 = { version = "=0.13.1", features = ["std", "ecdsa"], default_features = false } -risc0-zkvm = { version = "0.18", default-features = false, features = ['std'] } +risc0-zkvm = { version = "0.19", default-features = false, features = ['std'] } zeth-lib = { path = "../../lib", default-features = false } [patch.crates-io] diff --git a/host/src/main.rs b/host/src/main.rs index 2bca2c86..221ca012 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -22,8 +22,7 @@ use clap::Parser; use ethers_core::types::Transaction as EthersTransaction; use log::{error, info}; use risc0_zkvm::{ - serde::{from_slice, to_vec}, - Executor, ExecutorEnv, FileSegmentRef, MemoryImage, Program, Receipt, + serde::to_vec, ExecutorEnv, ExecutorImpl, FileSegmentRef, MemoryImage, Program, Receipt, }; use serde::{Deserialize, Serialize}; use tempfile::tempdir; @@ -70,7 +69,7 @@ struct Args { #[clap(short, long, require_equals = true, num_args = 0..=1, default_missing_value = "20")] /// Runs the verification inside the zkvm executor locally. Accepts a custom maximum /// segment cycle count as a power of 2. [default: 20] - local_exec: Option, + local_exec: Option, #[clap(short, long, default_value_t = false)] /// Whether to submit the proving workload to Bonsai. @@ -276,14 +275,14 @@ where builder .session_limit(None) .segment_limit_po2(segment_limit_po2) - .add_input(&input); + .write_slice(&input); if args.profile { builder.trace_callback(profiler.make_trace_callback()); } let env = builder.build().unwrap(); - let mut exec = Executor::from_elf(env, guest_elf).unwrap(); + let mut exec = ExecutorImpl::from_elf(env, guest_elf).unwrap(); let segment_dir = tempdir().unwrap(); @@ -318,7 +317,7 @@ where ); let expected_hash = init.fini_block.hash(); - let found_hash: BlockHash = from_slice(&session.journal).unwrap(); + let found_hash: BlockHash = session.journal.decode().unwrap(); if found_hash == expected_hash { info!("Block hash (from executor): {}", found_hash); @@ -335,12 +334,13 @@ where // Run in Bonsai (if requested) if bonsai_session_uuid.is_none() && args.submit_to_bonsai { info!("Creating Bonsai client"); - let client = bonsai_sdk::Client::from_env().expect("Could not create Bonsai client"); + let client = bonsai_sdk::Client::from_env(risc0_zkvm::VERSION) + .expect("Could not create Bonsai client"); // create the memoryImg, upload it and return the imageId info!("Uploading memory image"); let img_id = { - let program = Program::load_elf(guest_elf, risc0_zkvm::MEM_SIZE as u32) + let program = Program::load_elf(guest_elf, risc0_zkvm::GUEST_MAX_MEM as u32) .expect("Could not load ELF"); let image = MemoryImage::new(&program, risc0_zkvm::PAGE_SIZE as u32) .expect("Could not create memory image"); @@ -373,7 +373,8 @@ where // Verify receipt from Bonsai (if requested) if let Some(session_uuid) = bonsai_session_uuid { - let client = bonsai_sdk::Client::from_env().expect("Could not create Bonsai client"); + let client = bonsai_sdk::Client::from_env(risc0_zkvm::VERSION) + .expect("Could not create Bonsai client"); let session = bonsai_sdk::SessionId { uuid: session_uuid }; loop { @@ -400,7 +401,7 @@ where .expect("Receipt verification failed"); let expected_hash = init.fini_block.hash(); - let found_hash: BlockHash = from_slice(&receipt.journal).unwrap(); + let found_hash: BlockHash = receipt.journal.decode().unwrap(); if found_hash == expected_hash { info!("Block hash (from Bonsai): {}", found_hash); diff --git a/host/tests/blocks.rs b/host/tests/blocks.rs index 07954126..ba3cf861 100644 --- a/host/tests/blocks.rs +++ b/host/tests/blocks.rs @@ -15,7 +15,7 @@ use std::{path::PathBuf, str::FromStr}; use assert_cmd::Command; -use risc0_zkvm::{serde::to_vec, Executor, ExecutorEnv, FileSegmentRef}; +use risc0_zkvm::{serde::to_vec, ExecutorEnv, ExecutorImpl, FileSegmentRef}; use rstest::rstest; use tempfile::tempdir; use zeth_guests::ETH_BLOCK_ELF; @@ -61,10 +61,10 @@ fn empty_blocks(#[files("testdata/ethereum/*.json.gz")] path: PathBuf) { let env = ExecutorEnv::builder() .session_limit(None) .segment_limit_po2(20) - .add_input(&to_vec(&input).unwrap()) + .write_slice(&to_vec(&input).unwrap()) .build() .unwrap(); - let mut exec = Executor::from_elf(env, ETH_BLOCK_ELF).unwrap(); + let mut exec = ExecutorImpl::from_elf(env, ETH_BLOCK_ELF).unwrap(); // Run Executor let segment_dir = tempdir().unwrap(); let session = exec diff --git a/testing/ef-tests/testguest/Cargo.lock b/testing/ef-tests/testguest/Cargo.lock index a5857d41..af74a053 100644 --- a/testing/ef-tests/testguest/Cargo.lock +++ b/testing/ef-tests/testguest/Cargo.lock @@ -560,23 +560,10 @@ dependencies = [ ] [[package]] -name = "dyn_partial_eq" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07039d197226c4b9a3810c4f165328fb4e715258a4b8584f143d38e9de04301" -dependencies = [ - "dyn_partial_eq_derive", -] - -[[package]] -name = "dyn_partial_eq_derive" -version = "0.1.2" +name = "downcast-rs" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e217c6c1435ebf9b88662354589d339192b8eaf506edd22951e75e045c8e8bd" -dependencies = [ - "quote", - "syn 1.0.109", -] +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "ecdsa" @@ -598,6 +585,12 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +[[package]] +name = "elf" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6e7d85896690fe195447717af8eceae0593ac2196fd42fe88c184e904406ce" + [[package]] name = "elliptic-curve" version = "0.13.5" @@ -661,15 +654,6 @@ 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.2" @@ -1297,12 +1281,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "inventory" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53088c87cf71c9d4f3372a2cb9eea1e7b8a0b1bf8b7f7d23fe5b76dbb07e63b" - [[package]] name = "ipnet" version = "2.8.0" @@ -2059,10 +2037,39 @@ dependencies = [ "digest", ] +[[package]] +name = "risc0-binfmt" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b008c7506a6acb15f14a87e7e57797fd901cdf2f4eb560a032df4e1fc12790" +dependencies = [ + "anyhow", + "elf", + "log", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", +] + +[[package]] +name = "risc0-circuit-recursion" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924bbd4f27070f04556e10565441fbf64e399763a3f244819f84dc645590bca1" +dependencies = [ + "anyhow", + "bytemuck", + "log", + "risc0-core", + "risc0-zkp", + "tracing", +] + [[package]] name = "risc0-circuit-rv32im" -version = "0.16.1" -source = "git+https://github.com/risc0/risc0.git?branch=release-0.16#cbb6ccab08718506a524af999baa6d1386c51cbb" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ac44b6493d73638018d62eccec93f2797795d286c6201e2a79d842a16bbb43f" dependencies = [ "anyhow", "log", @@ -2074,8 +2081,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "0.16.1" -source = "git+https://github.com/risc0/risc0.git?branch=release-0.16#cbb6ccab08718506a524af999baa6d1386c51cbb" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f8d9ff7ca4b8a9ecf63e4567dfc5ab73ea4c4c20618cdd36d5c0eb69be80cb2" dependencies = [ "bytemuck", "rand_core", @@ -2083,8 +2091,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "0.16.1" -source = "git+https://github.com/risc0/risc0.git?branch=release-0.16#cbb6ccab08718506a524af999baa6d1386c51cbb" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1b8f047ec52f645e5e1c46f69303658f9cca96f0a2dcb78b4e7cadef5c2ac3d" dependencies = [ "anyhow", "blake2", @@ -2098,39 +2107,45 @@ dependencies = [ "risc0-zkvm-platform", "serde", "sha2", - "thiserror", "tracing", ] [[package]] name = "risc0-zkvm" -version = "0.16.1" -source = "git+https://github.com/risc0/risc0.git?branch=release-0.16#cbb6ccab08718506a524af999baa6d1386c51cbb" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b51d8aa8a4b0a350cca2deb9ead841989ed601ca3091e33a8ee8e6f2453048" dependencies = [ "anyhow", "bytemuck", "cfg-if", - "dyn_partial_eq", "getrandom", "hex", - "libm", "log", "num-derive", "num-traits", + "risc0-binfmt", + "risc0-circuit-recursion", "risc0-circuit-rv32im", "risc0-core", "risc0-zkp", "risc0-zkvm-platform", + "rrs-lib", + "semver", "serde", - "thiserror", "tracing", - "typetag", ] [[package]] name = "risc0-zkvm-platform" -version = "0.16.1" -source = "git+https://github.com/risc0/risc0.git?branch=release-0.16#cbb6ccab08718506a524af999baa6d1386c51cbb" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e9d18c75958239e91213a181e836e28dfbede913e4de66fa36e2ad1d70fcdc" +dependencies = [ + "bytemuck", + "getrandom", + "libm", +] [[package]] name = "rlp" @@ -2154,6 +2169,16 @@ dependencies = [ "syn 1.0.109", ] +[[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 = "ruint" version = "1.10.1" @@ -2910,30 +2935,6 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" -[[package]] -name = "typetag" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aec6850cc671cd0cfb3ab285465e48a3b927d9de155051c35797446b32f9169f" -dependencies = [ - "erased-serde", - "inventory", - "once_cell", - "serde", - "typetag-impl", -] - -[[package]] -name = "typetag-impl" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c49a6815b4f8379c36f06618bc1b80ca77aaf8a3fd4d8549dca6fdb016000f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.28", -] - [[package]] name = "uint" version = "0.9.5" diff --git a/testing/ef-tests/testguest/Cargo.toml b/testing/ef-tests/testguest/Cargo.toml index 59730a32..96fb8b8e 100644 --- a/testing/ef-tests/testguest/Cargo.toml +++ b/testing/ef-tests/testguest/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] k256 = { version = "=0.13.1", features = ["std", "ecdsa"], default_features = false } -risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-0.16", default-features = false, features = ['std'] } +risc0-zkvm = { version = "0.19", default-features = false, features = ['std'] } zeth-lib = { path = "../../../lib", default-features = false } [patch.crates-io] diff --git a/testing/ef-tests/tests/executor.rs b/testing/ef-tests/tests/executor.rs index 5ee0587b..6d578ef9 100644 --- a/testing/ef-tests/tests/executor.rs +++ b/testing/ef-tests/tests/executor.rs @@ -16,10 +16,7 @@ use std::path::PathBuf; -use risc0_zkvm::{ - serde::{from_slice, to_vec}, - Executor, ExecutorEnv, FileSegmentRef, -}; +use risc0_zkvm::{serde::to_vec, ExecutorEnv, ExecutorImpl, FileSegmentRef}; use rstest::rstest; use tempfile::tempdir; use zeth_primitives::{block::Header, BlockHash}; @@ -29,7 +26,7 @@ use zeth_testeth::{ guests::TEST_GUEST_ELF, }; -const SEGMENT_LIMIT_PO2: usize = 21; +const SEGMENT_LIMIT_PO2: u32 = 21; #[rstest] fn executor( @@ -75,11 +72,11 @@ fn executor( let env = ExecutorEnv::builder() .session_limit(None) .segment_limit_po2(SEGMENT_LIMIT_PO2) - .add_input(&to_vec(&chain_spec).unwrap()) - .add_input(&to_vec(&input).unwrap()) + .write_slice(&to_vec(&chain_spec).unwrap()) + .write_slice(&to_vec(&input).unwrap()) .build() .unwrap(); - let mut exec = Executor::from_elf(env, TEST_GUEST_ELF).unwrap(); + let mut exec = ExecutorImpl::from_elf(env, TEST_GUEST_ELF).unwrap(); let segment_dir = tempdir().unwrap(); let session = exec @@ -89,7 +86,7 @@ fn executor( .unwrap(); println!("Generated {} segments", session.segments.len()); - let found_hash: BlockHash = from_slice(&session.journal).unwrap(); + let found_hash: BlockHash = session.journal.decode().unwrap(); println!("Block hash (from executor): {}", found_hash); assert_eq!(found_hash, expected_header.hash()); }