From a0f9761d9b35b18b2302041ffdc4e793cd1303ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Sat, 12 Oct 2024 00:58:29 +0300 Subject: [PATCH 01/11] WIP Implement boundless host --- .cargo/config.toml | 3 + Cargo.lock | 2381 ++++++++++++++--- Cargo.toml | 13 +- .../provers/risc0/guest-bitcoin/Cargo.lock | 156 +- .../provers/risc0/guest-mock/Cargo.lock | 156 +- crates/fullnode/Cargo.toml | 2 +- crates/prover/Cargo.toml | 2 +- crates/risc0-boundless/Cargo.toml | 50 + crates/risc0-boundless/src/host.rs | 501 ++++ crates/risc0-boundless/src/lib.rs | 56 + crates/sequencer/Cargo.toml | 2 +- 11 files changed, 2955 insertions(+), 367 deletions(-) create mode 100644 .cargo/config.toml create mode 100644 crates/risc0-boundless/Cargo.toml create mode 100644 crates/risc0-boundless/src/host.rs create mode 100644 crates/risc0-boundless/src/lib.rs diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..29051dcda --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,3 @@ +# while the boundless repo is private, using the SSH URL and `net.git-fetch-with-cli = true` is required +[net] +git-fetch-with-cli = true diff --git a/Cargo.lock b/Cargo.lock index 7f1cc2ff9..14d450827 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,6 +34,21 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aggregation-set" +version = "0.1.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-sol-types 0.8.7", + "anyhow", + "guest-aggregation-set", + "hex", + "risc0-binfmt", + "risc0-zkvm", + "serde", +] + [[package]] name = "ahash" version = "0.8.11" @@ -83,16 +98,57 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4a4aaae80afd4be443a6aecd92a6b255dcdd000f97996928efb33d8a71e100" dependencies = [ - "alloy-consensus", - "alloy-core", - "alloy-eips", - "alloy-provider", - "alloy-rpc-client", + "alloy-consensus 0.2.1", + "alloy-core 0.7.7", + "alloy-eips 0.2.1", + "alloy-provider 0.2.1", + "alloy-rpc-client 0.2.1", "alloy-rpc-types", - "alloy-signer", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", + "alloy-signer 0.2.1", + "alloy-signer-local 0.2.1", + "alloy-transport 0.2.1", + "alloy-transport-http 0.2.1", +] + +[[package]] +name = "alloy" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-contract 0.3.6", + "alloy-core 0.8.7", + "alloy-eips 0.3.6", + "alloy-genesis 0.3.6", + "alloy-network 0.3.6", + "alloy-node-bindings", + "alloy-provider 0.3.6", + "alloy-rpc-client 0.3.6", + "alloy-serde 0.3.6", + "alloy-signer 0.3.6", + "alloy-signer-local 0.3.6", + "alloy-transport 0.3.6", + "alloy-transport-http 0.3.6", +] + +[[package]] +name = "alloy" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-contract 0.4.2", + "alloy-core 0.8.7", + "alloy-eips 0.4.2", + "alloy-genesis 0.4.2", + "alloy-network 0.4.2", + "alloy-provider 0.4.2", + "alloy-rpc-client 0.4.2", + "alloy-serde 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", ] [[package]] @@ -113,21 +169,143 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04c309895995eaa4bfcc345f5515a39c7df9447798645cc8bf462b6c5bf1dc96" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.2.1", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-consensus" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-primitives 0.8.7", + "alloy-rlp", + "alloy-serde 0.3.6", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-consensus" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" +dependencies = [ + "alloy-eips 0.4.2", + "alloy-primitives 0.8.7", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.4.2", + "auto_impl", "c-kzg", + "derive_more 1.0.0", "serde", ] +[[package]] +name = "alloy-contract" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi 0.8.7", + "alloy-network 0.3.6", + "alloy-network-primitives 0.3.6", + "alloy-primitives 0.8.7", + "alloy-provider 0.3.6", + "alloy-rpc-types-eth 0.3.6", + "alloy-sol-types 0.8.7", + "alloy-transport 0.3.6", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-contract" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi 0.8.7", + "alloy-network 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-primitives 0.8.7", + "alloy-provider 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-sol-types 0.8.7", + "alloy-transport 0.4.2", + "futures", + "futures-util", + "thiserror", +] + [[package]] name = "alloy-core" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "529fc6310dc1126c8de51c376cbc59c79c7f662bd742be7dc67055d5421a81b4" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", +] + +[[package]] +name = "alloy-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeb750349efda145ca6aada68d0336067f7f364d7d44ef09e2cf000b040c5e99" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi 0.8.7", + "alloy-primitives 0.8.7", + "alloy-rlp", + "alloy-sol-types 0.8.7", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f95d76a38cae906fd394a5afb0736aaceee5432efe76addfd71048e623e208af" +dependencies = [ + "alloy-json-abi 0.8.7", + "alloy-primitives 0.8.7", + "alloy-sol-type-parser 0.8.7", + "alloy-sol-types 0.8.7", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.13", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-rlp", + "serde", ] [[package]] @@ -136,25 +314,83 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9431c99a3b3fe606ede4b3d4043bdfbcb780c45b8d8d226c3804e2b75cfbe68" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.2.1", "c-kzg", - "derive_more", + "derive_more 0.99.17", "k256", "once_cell", "serde", "sha2", ] +[[package]] +name = "alloy-eips" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives 0.8.7", + "alloy-rlp", + "alloy-serde 0.3.6", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2", +] + +[[package]] +name = "alloy-eips" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives 0.8.7", + "alloy-rlp", + "alloy-serde 0.4.2", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2", +] + [[package]] name = "alloy-genesis" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79614dfe86144328da11098edcc7bc1a3f25ad8d3134a9eb9e857e06f0d9840d" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.7.7", + "alloy-serde 0.2.1", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-serde 0.3.6", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-serde 0.4.2", "serde", ] @@ -164,9 +400,21 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c66eec1acdd96b39b995b8f5ee5239bc0c871d62c527ae1ac9fd1d7fecd455" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-sol-type-parser 0.8.7", "serde", + "serde_json", ] [[package]] @@ -175,8 +423,36 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57e2865c4c3bb4cdad3f0d9ec1ab5c0c657ba69a375651bd35e32fb6c180ccc2" dependencies = [ - "alloy-primitives", - "alloy-sol-types", + "alloy-primitives 0.7.7", + "alloy-sol-types 0.7.7", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-sol-types 0.8.7", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-sol-types 0.8.7", "serde", "serde_json", "thiserror", @@ -189,15 +465,57 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e701fc87ef9a3139154b0b4ccb935b565d27ffd9de020fe541bf2dec5ae4ede" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network-primitives", - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", - "alloy-sol-types", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-json-rpc 0.2.1", + "alloy-network-primitives 0.2.1", + "alloy-primitives 0.7.7", + "alloy-rpc-types-eth 0.2.1", + "alloy-serde 0.2.1", + "alloy-signer 0.2.1", + "alloy-sol-types 0.7.7", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-network" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-json-rpc 0.3.6", + "alloy-network-primitives 0.3.6", + "alloy-primitives 0.8.7", + "alloy-rpc-types-eth 0.3.6", + "alloy-serde 0.3.6", + "alloy-signer 0.3.6", + "alloy-sol-types 0.8.7", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-network" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-primitives 0.8.7", + "alloy-rpc-types-eth 0.4.2", + "alloy-serde 0.4.2", + "alloy-signer 0.4.2", + "alloy-sol-types 0.8.7", "async-trait", "auto_impl", "futures-utils-wasm", @@ -210,11 +528,53 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec9d5a0f9170b10988b6774498a022845e13eda94318440d17709d50687f67f9" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.7.7", + "alloy-serde 0.2.1", "serde", ] +[[package]] +name = "alloy-network-primitives" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-primitives 0.8.7", + "alloy-serde 0.3.6", + "serde", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-primitives 0.8.7", + "alloy-serde 0.4.2", + "serde", +] + +[[package]] +name = "alloy-node-bindings" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5988a227293f949525f0a1b3e1ef728d2ef24afa96bad2b7788c6c9617fa3eec" +dependencies = [ + "alloy-genesis 0.3.6", + "alloy-primitives 0.8.7", + "k256", + "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", +] + [[package]] name = "alloy-primitives" version = "0.7.7" @@ -225,7 +585,7 @@ dependencies = [ "bytes", "cfg-if", "const-hex", - "derive_more", + "derive_more 0.99.17", "getrandom 0.2.15", "hex-literal", "itoa", @@ -238,6 +598,34 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-primitives" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb848c43f6b06ae3de2e4a67496cbbabd78ae87db0f1248934f15d76192c6a" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 1.0.0", + "foldhash", + "hashbrown 0.15.0", + "hex-literal", + "indexmap 2.6.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash 2.0.0", + "serde", + "sha3", + "tiny-keccak", +] + [[package]] name = "alloy-provider" version = "0.2.1" @@ -245,16 +633,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9c0ab10b93de601a6396fc7ff2ea10d3b28c46f079338fa562107ebf9857c8" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", - "alloy-network-primitives", - "alloy-primitives", - "alloy-rpc-client", - "alloy-rpc-types-eth", - "alloy-transport", - "alloy-transport-http", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-json-rpc 0.2.1", + "alloy-network 0.2.1", + "alloy-network-primitives 0.2.1", + "alloy-primitives 0.7.7", + "alloy-rpc-client 0.2.1", + "alloy-rpc-types-eth 0.2.1", + "alloy-transport 0.2.1", + "alloy-transport-http 0.2.1", "async-stream", "async-trait", "auto_impl", @@ -270,6 +658,77 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-provider" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927f708dd457ed63420400ee5f06945df9632d5d101851952056840426a10dc5" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-json-rpc 0.3.6", + "alloy-network 0.3.6", + "alloy-network-primitives 0.3.6", + "alloy-node-bindings", + "alloy-primitives 0.8.7", + "alloy-rpc-client 0.3.6", + "alloy-rpc-types-anvil 0.3.6", + "alloy-rpc-types-eth 0.3.6", + "alloy-signer-local 0.3.6", + "alloy-transport 0.3.6", + "alloy-transport-http 0.3.6", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 6.0.1", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-provider" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-primitives 0.8.7", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 6.0.1", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", +] + [[package]] name = "alloy-rlp" version = "0.3.8" @@ -298,9 +757,9 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b38e3ffdb285df5d9f60cb988d336d9b8e3505acb78750c3bc60336a7af41d3" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "alloy-transport-http", + "alloy-json-rpc 0.2.1", + "alloy-transport 0.2.1", + "alloy-transport-http 0.2.1", "futures", "hyper-util", "pin-project", @@ -308,7 +767,50 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d82952dca71173813d4e5733e2c986d8b04aea9e0f3b0a576664c232ad050a5" +dependencies = [ + "alloy-json-rpc 0.3.6", + "alloy-transport 0.3.6", + "alloy-transport-http 0.3.6", + "futures", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" +dependencies = [ + "alloy-json-rpc 0.4.2", + "alloy-primitives 0.8.7", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "futures", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", "tracing", "url", ] @@ -320,9 +822,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c31a3750b8f5a350d17354e46a52b0f2f19ec5f2006d816935af599dedc521" dependencies = [ "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.2.1", "alloy-rpc-types-trace", - "alloy-serde", + "alloy-serde 0.2.1", "serde", ] @@ -332,8 +834,8 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbfb8b2c2eea8acd5580c9804a1ee58038938b16efb24eec09c3005f65b0e4ad" dependencies = [ - "alloy-genesis", - "alloy-primitives", + "alloy-genesis 0.2.1", + "alloy-primitives 0.7.7", "serde", "serde_json", ] @@ -344,8 +846,19 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52ab6509cd38b2e8c8da726e0f61c1e314a81df06a38d37ddec8bced3f8d25ed" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.7.7", + "alloy-serde 0.2.1", + "serde", +] + +[[package]] +name = "alloy-rpc-types-anvil" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25cb45ad7c0930dd62eecf164d2afe4c3d2dd2c82af85680ad1f118e1e5cb83" +dependencies = [ + "alloy-primitives 0.8.7", + "alloy-serde 0.3.6", "serde", ] @@ -355,8 +868,8 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8a24bcff4f9691d7a4971b43e5da46aa7b4ce22ed7789796612dc1eed220983" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "alloy-rpc-types-engine", "serde", "serde_with", @@ -369,12 +882,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff63f51b2fb2f547df5218527fd0653afb1947bf7fead5b3ce58c75d170b30f7" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.2.1", + "alloy-serde 0.2.1", "jsonrpsee-types", "jsonwebtoken", "rand 0.8.5", @@ -388,13 +901,13 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81e18424d962d7700a882fe423714bd5b9dde74c7a7589d4255ea64068773aef" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-network-primitives", - "alloy-primitives", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-network-primitives 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-serde", - "alloy-sol-types", + "alloy-serde 0.2.1", + "alloy-sol-types 0.7.7", "itertools 0.13.0", "jsonrpsee-types", "serde", @@ -402,15 +915,55 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-rpc-types-eth" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-network-primitives 0.3.6", + "alloy-primitives 0.8.7", + "alloy-rlp", + "alloy-serde 0.3.6", + "alloy-sol-types 0.8.7", + "cfg-if", + "derive_more 1.0.0", + "hashbrown 0.14.5", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-primitives 0.8.7", + "alloy-rlp", + "alloy-serde 0.4.2", + "alloy-sol-types 0.8.7", + "derive_more 1.0.0", + "itertools 0.13.0", + "serde", + "serde_json", +] + [[package]] name = "alloy-rpc-types-mev" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a0593a17b4b009598eb3e8380e298c53bd5581f3f37d85a38e6a34881c90ea1" dependencies = [ - "alloy-eips", - "alloy-primitives", - "alloy-serde", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", + "alloy-serde 0.2.1", "serde", "serde_json", ] @@ -421,9 +974,9 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a86eeb49ea0cc79f249faa1d35c20541bb1c317a59b5962cb07b1890355b0064" dependencies = [ - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-primitives 0.7.7", + "alloy-rpc-types-eth 0.2.1", + "alloy-serde 0.2.1", "serde", "serde_json", "thiserror", @@ -435,9 +988,9 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2342fed8175642b15a37a51f8729b05b2469281fbeb816f0ccbb0087e2dd74a" dependencies = [ - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-primitives 0.7.7", + "alloy-rpc-types-eth 0.2.1", + "alloy-serde 0.2.1", "serde", ] @@ -447,7 +1000,29 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33feda6a53e6079895aed1d08dcb98a1377b000d80d16370fbbdb8155d547ef" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" +dependencies = [ + "alloy-primitives 0.8.7", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" +dependencies = [ + "alloy-primitives 0.8.7", "serde", "serde_json", ] @@ -458,10 +1033,38 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740a25b92e849ed7b0fa013951fe2f64be9af1ad5abe805037b44fb7770c5c47" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", + "async-trait", + "auto_impl", + "elliptic-curve 0.13.8", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" +dependencies = [ + "alloy-primitives 0.8.7", + "async-trait", + "auto_impl", + "elliptic-curve 0.13.8", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" +dependencies = [ + "alloy-primitives 0.8.7", "async-trait", "auto_impl", - "elliptic-curve", + "elliptic-curve 0.13.8", "k256", "thiserror", ] @@ -472,10 +1075,26 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b0707d4f63e4356a110b30ef3add8732ab6d181dd7be4607bf79b8777105cee" dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", + "alloy-consensus 0.2.1", + "alloy-network 0.2.1", + "alloy-primitives 0.7.7", + "alloy-signer 0.2.1", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-network 0.3.6", + "alloy-primitives 0.8.7", + "alloy-signer 0.3.6", "async-trait", "k256", "rand 0.8.5", @@ -488,30 +1107,63 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" dependencies = [ - "alloy-sol-macro-expander", - "alloy-sol-macro-input", + "alloy-sol-macro-expander 0.7.7", + "alloy-sol-macro-input 0.7.7", "proc-macro-error", "proc-macro2", "quote", "syn 2.0.72", ] +[[package]] +name = "alloy-sol-macro" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "661c516eb1fa3294cc7f2fb8955b3b609d639c282ac81a4eedb14d3046db503a" +dependencies = [ + "alloy-sol-macro-expander 0.8.7", + "alloy-sol-macro-input 0.8.7", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "alloy-sol-macro-expander" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" dependencies = [ - "alloy-json-abi", - "alloy-sol-macro-input", + "alloy-json-abi 0.7.7", + "alloy-sol-macro-input 0.7.7", "const-hex", "heck 0.5.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "proc-macro-error", "proc-macro2", "quote", "syn 2.0.72", - "syn-solidity", + "syn-solidity 0.7.7", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecbabb8fc3d75a0c2cea5215be22e7a267e3efde835b0f2a8922f5e3f5d47683" +dependencies = [ + "alloy-json-abi 0.8.7", + "alloy-sol-macro-input 0.8.7", + "const-hex", + "heck 0.5.0", + "indexmap 2.6.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.72", + "syn-solidity 0.8.7", "tiny-keccak", ] @@ -521,7 +1173,24 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.7.7", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.72", + "syn-solidity 0.7.7", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16517f2af03064485150d89746b8ffdcdbc9b6eeb3d536fb66efd7c2846fbc75" +dependencies = [ + "alloy-json-abi 0.8.7", "const-hex", "dunce", "heck 0.5.0", @@ -529,7 +1198,7 @@ dependencies = [ "quote", "serde_json", "syn 2.0.72", - "syn-solidity", + "syn-solidity 0.8.7", ] [[package]] @@ -542,51 +1211,142 @@ dependencies = [ "winnow 0.6.13", ] +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07ebb0c1674ff8cbb08378d7c2e0e27919d2a2dae07ad3bca26174deda8d389" +dependencies = [ + "serde", + "winnow 0.6.13", +] + [[package]] name = "alloy-sol-types" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-macro 0.7.7", "const-hex", "serde", ] [[package]] -name = "alloy-transport" -version = "0.2.1" +name = "alloy-sol-types" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e448d879903624863f608c552d10efb0e0905ddbee98b0049412799911eb062" +dependencies = [ + "alloy-json-abi 0.8.7", + "alloy-primitives 0.8.7", + "alloy-sol-macro 0.8.7", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d0590afbdacf2f8cca49d025a2466f3b6584a016a8b28f532f29f8da1007bae" +dependencies = [ + "alloy-json-rpc 0.2.1", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33616b2edf7454302a1d48084db185e52c309f73f6c10be99b0fe39354b3f1e9" +dependencies = [ + "alloy-json-rpc 0.3.6", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" +dependencies = [ + "alloy-json-rpc 0.4.2", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2437d145d80ea1aecde8574d2058cceb8b3c9cba05f6aea8e67907c660d46698" +dependencies = [ + "alloy-json-rpc 0.2.1", + "alloy-transport 0.2.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "serde_json", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0590afbdacf2f8cca49d025a2466f3b6584a016a8b28f532f29f8da1007bae" +checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" dependencies = [ - "alloy-json-rpc", - "base64 0.22.1", - "futures-util", - "futures-utils-wasm", - "serde", + "alloy-json-rpc 0.3.6", + "alloy-transport 0.3.6", + "reqwest 0.12.5", "serde_json", - "thiserror", - "tokio", - "tower", + "tower 0.5.1", "tracing", "url", ] [[package]] name = "alloy-transport-http" -version = "0.2.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2437d145d80ea1aecde8574d2058cceb8b3c9cba05f6aea8e67907c660d46698" +checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "http-body-util", - "hyper 1.4.1", - "hyper-util", + "alloy-json-rpc 0.4.2", + "alloy-transport 0.4.2", + "reqwest 0.12.5", "serde_json", - "tower", + "tower 0.5.1", "tracing", "url", ] @@ -597,9 +1357,9 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03704f265cbbb943b117ecb5055fd46e8f41e7dc8a58b1aed20bcd40ace38c15" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", - "derive_more", + "derive_more 0.99.17", "hashbrown 0.14.5", "nybbles", "serde", @@ -1034,6 +1794,274 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "aws-credential-types" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + +[[package]] +name = "aws-runtime" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a10d5c055aa540164d9561a0e2e74ad30f0dcf7393c3a92f6733ddf9c5762468" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http-body 0.4.6", + "once_cell", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-s3" +version = "1.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2f2a62020f3e06f9b352b2a23547f6e1d110b6bf1e18a6b588ae36114eaf6e2" +dependencies = [ + "ahash", + "aws-credential-types", + "aws-runtime", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-checksums", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "bytes", + "fastrand", + "hex", + "hmac", + "http 0.2.12", + "http-body 0.4.6", + "lru", + "once_cell", + "percent-encoding", + "regex-lite", + "sha2", + "tracing", + "url", +] + +[[package]] +name = "aws-sigv4" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc8db6904450bafe7473c6ca9123f88cc11089e41a025408f992db4e22d3be68" +dependencies = [ + "aws-credential-types", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "crypto-bigint 0.5.5", + "form_urlencoded", + "hex", + "hmac", + "http 0.2.12", + "http 1.1.0", + "once_cell", + "p256", + "percent-encoding", + "ring", + "sha2", + "subtle", + "time", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-async" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-checksums" +version = "0.60.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598b1689d001c4d4dc3cb386adb07d37786783aee3ac4b324bcadac116bf3d23" +dependencies = [ + "aws-smithy-http", + "aws-smithy-types", + "bytes", + "crc32c", + "crc32fast", + "hex", + "http 0.2.12", + "http-body 0.4.6", + "md-5", + "pin-project-lite", + "sha1", + "sha2", + "tracing", +] + +[[package]] +name = "aws-smithy-eventstream" +version = "0.60.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cef7d0a272725f87e51ba2bf89f8c21e4df61b9e49ae1ac367a6d69916ef7c90" +dependencies = [ + "aws-smithy-types", + "bytes", + "crc32fast", +] + +[[package]] +name = "aws-smithy-http" +version = "0.60.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" +dependencies = [ + "aws-smithy-eventstream", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http-body 0.4.6", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.60.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" +dependencies = [ + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a065c0fe6fdbdf9f11817eb68582b2ab4aff9e9c39e986ae48f7ec576c6322db" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "http-body 1.0.0", + "httparse", + "hyper 0.14.29", + "hyper-rustls 0.24.2", + "once_cell", + "pin-project-lite", + "pin-utils", + "rustls 0.21.12", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e086682a53d3aa241192aa110fa8dfce98f2f5ac2ead0de84d41582c7e8fdb96" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.1.0", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147100a7bea70fa20ef224a6bad700358305f5dc0f84649c53769761395b355b" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.1.0", + "http-body 0.4.6", + "http-body 1.0.0", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.60.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab0b0166827aa700d3dc519f72f8b3a91c35d0b8d042dc5d643a91e6f80648fc" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "rustc_version 0.4.0", + "tracing", +] + [[package]] name = "backoff" version = "0.4.0" @@ -1063,6 +2091,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + [[package]] name = "base16ct" version = "0.2.0" @@ -1100,6 +2134,16 @@ dependencies = [ "byteorder", ] +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "base64ct" version = "1.6.0" @@ -1352,6 +2396,12 @@ dependencies = [ "constant_time_eq", ] +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + [[package]] name = "block-buffer" version = "0.10.4" @@ -1367,8 +2417,8 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" dependencies = [ - "ff", - "group", + "ff 0.13.0", + "group 0.13.0", "pairing", "rand_core 0.6.4", "subtle", @@ -1444,6 +2494,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bonsai-sdk" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94032d3eece78099780ba07605d8ba6943e47ee152f76d73f1682e2f40cf889c" +dependencies = [ + "duplicate", + "maybe-async", + "reqwest 0.12.5", + "serde", + "thiserror", + "tokio", +] + [[package]] name = "borsh" version = "1.5.1" @@ -1469,6 +2533,44 @@ dependencies = [ "syn_derive", ] +[[package]] +name = "boundless-market" +version = "0.1.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +dependencies = [ + "aggregation-set", + "alloy 0.3.6", + "alloy-primitives 0.8.7", + "alloy-sol-types 0.8.7", + "anyhow", + "async-trait", + "aws-sdk-s3", + "bincode", + "bonsai-sdk 1.1.2", + "bytemuck", + "clap", + "dotenvy", + "futures-util", + "guest-assessor", + "guest-util", + "hex", + "rand 0.8.5", + "reqwest 0.12.5", + "risc0-ethereum-contracts", + "risc0-zkvm", + "serde", + "serde_json", + "serde_yaml", + "sha2", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber 0.3.18", + "url", + "uuid", +] + [[package]] name = "brotli" version = "6.0.0" @@ -1537,6 +2639,16 @@ dependencies = [ "serde", ] +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "bzip2-sys" version = "0.1.11+1.0.8" @@ -1602,13 +2714,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.99" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -1650,7 +2762,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1684,10 +2796,10 @@ dependencies = [ name = "citrea" version = "0.5.0-rc.1" dependencies = [ - "alloy", - "alloy-primitives", + "alloy 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-sol-types", + "alloy-sol-types 0.7.7", "anyhow", "async-trait", "bincode", @@ -1797,12 +2909,12 @@ dependencies = [ name = "citrea-evm" version = "0.5.0-rc.1" dependencies = [ - "alloy", - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy 0.2.1", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-sol-types", + "alloy-sol-types 0.7.7", "anyhow", "bcs", "borsh", @@ -1874,7 +2986,7 @@ dependencies = [ "tempfile", "tokio", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] @@ -1882,7 +2994,7 @@ dependencies = [ name = "citrea-primitives" version = "0.5.0-rc.1" dependencies = [ - "alloy-eips", + "alloy-eips 0.2.1", "anyhow", "reth-primitives", "serde", @@ -1926,7 +3038,7 @@ dependencies = [ "tempfile", "tokio", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] @@ -1954,12 +3066,38 @@ dependencies = [ "anyhow", "backoff", "bincode", - "bonsai-sdk", + "bonsai-sdk 0.9.0", + "borsh", + "bytemuck", + "hex", + "once_cell", + "parking_lot", + "risc0-circuit-rv32im", + "risc0-zkp", + "risc0-zkvm", + "risc0-zkvm-platform", + "serde", + "sov-db", + "sov-risc0-adapter", + "sov-rollup-interface 0.5.0-rc.1", + "tracing", +] + +[[package]] +name = "citrea-risc0-boundless-adapter" +version = "0.5.0-rc.1" +dependencies = [ + "alloy 0.3.6", + "anyhow", + "backoff", + "bincode", "borsh", + "boundless-market", "bytemuck", "hex", "once_cell", "parking_lot", + "reqwest 0.12.5", "risc0-circuit-rv32im", "risc0-zkp", "risc0-zkvm", @@ -1968,7 +3106,9 @@ dependencies = [ "sov-db", "sov-risc0-adapter", "sov-rollup-interface 0.5.0-rc.1", + "tokio", "tracing", + "url", ] [[package]] @@ -1976,7 +3116,7 @@ name = "citrea-sequencer" version = "0.5.0-rc.1" dependencies = [ "alloy-rlp", - "alloy-sol-types", + "alloy-sol-types 0.7.7", "anyhow", "async-trait", "backoff", @@ -2019,7 +3159,7 @@ dependencies = [ "tempfile", "tokio", "tokio-util", - "tower", + "tower 0.4.13", "tower-http", "tracing", ] @@ -2175,6 +3315,17 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "cpp_demangle" version = "0.4.3" @@ -2208,6 +3359,15 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +[[package]] +name = "crc32c" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" +dependencies = [ + "rustc_version 0.4.0", +] + [[package]] name = "crc32fast" version = "1.4.2" @@ -2315,6 +3475,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-bigint" version = "0.5.5" @@ -2358,7 +3530,7 @@ source = "git+https://github.com/risc0/curve25519-dalek?tag=curve25519-4.1.2-ris dependencies = [ "cfg-if", "cpufeatures", - "crypto-bigint", + "crypto-bigint 0.5.5", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", @@ -2485,6 +3657,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "der" version = "0.7.9" @@ -2551,6 +3733,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", + "unicode-xid", +] + [[package]] name = "digest" version = "0.9.0" @@ -2619,6 +3822,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf673e0848ef09fa4aeeba78e681cf651c0c7d35f76ee38cec8e55bc32fa111" +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "downcast-rs" version = "1.2.1" @@ -2667,18 +3876,30 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d4f78a40b1ec35bf8cafdaaf607ba2f773c366b0b3bda48937cacd7a8d5134" +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + [[package]] name = "ecdsa" version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der", + "der 0.7.9", "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", + "elliptic-curve 0.13.8", + "rfc6979 0.4.0", + "signature 2.2.0", + "spki 0.7.3", ] [[package]] @@ -2687,9 +3908,9 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8", + "pkcs8 0.10.2", "serde", - "signature", + "signature 2.2.0", ] [[package]] @@ -2718,21 +3939,41 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", + "generic-array", + "group 0.12.1", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle", + "zeroize", +] + [[package]] name = "elliptic-curve" version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct", - "crypto-bigint", + "base16ct 0.2.0", + "crypto-bigint 0.5.5", "digest 0.10.7", - "ff", + "ff 0.13.0", "generic-array", - "group", - "pkcs8", + "group 0.13.0", + "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -2852,9 +4093,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fastrlp" @@ -2867,6 +4108,16 @@ dependencies = [ "bytes", ] +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "ff" version = "0.13.0" @@ -2930,6 +4181,54 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -3147,17 +4446,57 @@ dependencies = [ "web-sys", ] +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff", + "ff 0.13.0", "rand_core 0.6.4", "subtle", ] +[[package]] +name = "guest-aggregation-set" +version = "0.1.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +dependencies = [ + "risc0-build", + "risc0-build-ethereum", +] + +[[package]] +name = "guest-assessor" +version = "0.1.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +dependencies = [ + "hex", + "risc0-build", + "risc0-build-ethereum", +] + +[[package]] +name = "guest-util" +version = "0.1.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +dependencies = [ + "hex", + "risc0-build", + "risc0-build-ethereum", +] + [[package]] name = "h2" version = "0.3.26" @@ -3170,7 +4509,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -3189,7 +4528,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -3232,6 +4571,16 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "foldhash", + "serde", +] + [[package]] name = "hashlink" version = "0.9.1" @@ -3460,7 +4809,9 @@ dependencies = [ "futures-util", "http 0.2.12", "hyper 0.14.29", + "log", "rustls 0.21.12", + "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", ] @@ -3484,6 +4835,22 @@ dependencies = [ "webpki-roots 0.26.2", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.5" @@ -3499,7 +4866,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", + "tower 0.4.13", "tower-service", "tracing", ] @@ -3554,7 +4921,7 @@ dependencies = [ "bytes", "hex", "informalsystems-pbjson", - "prost", + "prost 0.12.6", "ripemd", "serde", "sha2", @@ -3755,12 +5122,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -4040,7 +5407,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.4.13", "tracing", "url", ] @@ -4081,7 +5448,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] @@ -4142,8 +5509,8 @@ version = "0.13.3" source = "git+https://github.com/risc0/RustCrypto-elliptic-curves?tag=k256/v0.13.3-risczero.0#d4f457a04410397cbb652a67c168b6cd6e9757c4" dependencies = [ "cfg-if", - "ecdsa", - "elliptic-curve", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", "once_cell", "sha2", ] @@ -4222,9 +5589,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" @@ -4233,7 +5600,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4359,6 +5726,15 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + [[package]] name = "markdown" version = "1.0.0-alpha.17" @@ -4398,6 +5774,16 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.7.4" @@ -4413,6 +5799,21 @@ dependencies = [ "libc", ] +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types 0.5.0", + "log", + "objc", + "paste", +] + [[package]] name = "metrics" version = "0.23.0" @@ -4514,16 +5915,35 @@ dependencies = [ "thiserror", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndarray" -version = "0.15.6" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" +checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" dependencies = [ "matrixmultiply", "num-complex", "num-integer", "num-traits", + "portable-atomic", + "portable-atomic-util", "rawpointer", "rayon", ] @@ -4711,6 +6131,15 @@ dependencies = [ "smallvec", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + [[package]] name = "object" version = "0.35.0" @@ -4743,11 +6172,49 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +[[package]] +name = "openssl" +version = "0.10.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] [[package]] name = "option-ext" @@ -4755,12 +6222,29 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2", +] + [[package]] name = "page_size" version = "0.6.0" @@ -4777,7 +6261,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "group", + "group 0.13.0", ] [[package]] @@ -4827,7 +6311,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4908,14 +6392,24 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", +] + [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", - "spki", + "der 0.7.9", + "spki 0.7.3", ] [[package]] @@ -4964,6 +6458,15 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +[[package]] +name = "portable-atomic-util" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcdd8420072e66d54a407b3316991fe946ce3ab1083a7f575b2463866624704d" +dependencies = [ + "portable-atomic", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -5020,6 +6523,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "proc-macro2" version = "1.0.85" @@ -5081,7 +6606,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.6", +] + +[[package]] +name = "prost" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +dependencies = [ + "bytes", + "prost-derive 0.13.3", ] [[package]] @@ -5097,6 +6632,33 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.72", +] + +[[package]] +name = "puffin" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9dae7b05c02ec1a6bc9bcf20d8bc64a7dcbf57934107902a872014899b741f" +dependencies = [ + "anyhow", + "byteorder", + "cfg-if", + "itertools 0.10.5", + "once_cell", + "parking_lot", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -5188,6 +6750,7 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", + "serde", ] [[package]] @@ -5324,6 +6887,12 @@ dependencies = [ "regex-syntax 0.8.4", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -5385,6 +6954,7 @@ checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-channel", "futures-core", "futures-util", @@ -5394,11 +6964,14 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-rustls 0.27.2", + "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", + "mime_guess", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -5410,7 +6983,9 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", + "system-configuration", "tokio", + "tokio-native-tls", "tokio-rustls 0.26.0", "tokio-util", "tower-service", @@ -5441,7 +7016,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "auto_impl", - "derive_more", + "derive_more 0.99.17", "metrics", "parking_lot", "pin-project", @@ -5463,12 +7038,12 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-chains", - "alloy-eips", - "alloy-genesis", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-genesis 0.2.1", + "alloy-primitives 0.7.7", "alloy-trie", "auto_impl", - "derive_more", + "derive_more 0.99.17", "once_cell", "reth-ethereum-forks", "reth-network-peers", @@ -5482,10 +7057,10 @@ name = "reth-codecs" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-genesis", - "alloy-primitives", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-genesis 0.2.1", + "alloy-primitives 0.7.7", "alloy-trie", "bytes", "modular-bitfield", @@ -5530,7 +7105,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "bytes", - "derive_more", + "derive_more 0.99.17", "eyre", "metrics", "page_size", @@ -5560,7 +7135,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "bytes", - "derive_more", + "derive_more 0.99.17", "metrics", "modular-bitfield", "parity-scale-codec", @@ -5593,10 +7168,10 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-chains", - "alloy-genesis", + "alloy-genesis 0.2.1", "alloy-rlp", "bytes", - "derive_more", + "derive_more 0.99.17", "reth-chainspec", "reth-codecs-derive", "reth-primitives", @@ -5609,7 +7184,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-chains", - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", "auto_impl", "crc", @@ -5625,7 +7200,7 @@ name = "reth-evm" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-eips", + "alloy-eips 0.2.1", "auto_impl", "futures-util", "reth-chainspec", @@ -5643,8 +7218,8 @@ name = "reth-execution-errors" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", "nybbles", "reth-consensus", @@ -5683,8 +7258,8 @@ dependencies = [ "bitflags 2.6.0", "byteorder", "dashmap 6.0.1", - "derive_more", - "indexmap 2.2.6", + "derive_more 0.99.17", + "indexmap 2.6.0", "parking_lot", "reth-mdbx-sys", "thiserror", @@ -5726,7 +7301,7 @@ name = "reth-net-banlist" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", ] [[package]] @@ -5734,10 +7309,10 @@ name = "reth-network-api" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rpc-types-admin", "auto_impl", - "derive_more", + "derive_more 0.99.17", "enr", "futures", "reth-eth-wire-types", @@ -5774,7 +7349,7 @@ name = "reth-network-peers" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", "enr", "serde_with", @@ -5803,7 +7378,7 @@ dependencies = [ "anyhow", "bincode", "cuckoofilter", - "derive_more", + "derive_more 0.99.17", "lz4_flex", "memmap2", "ph", @@ -5820,13 +7395,13 @@ name = "reth-primitives" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-eips", - "alloy-genesis", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-genesis 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", "bytes", "c-kzg", - "derive_more", + "derive_more 0.99.17", "k256", "modular-bitfield", "once_cell", @@ -5849,14 +7424,14 @@ name = "reth-primitives-traits" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-genesis", - "alloy-primitives", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-genesis 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", "byteorder", "bytes", - "derive_more", + "derive_more 0.99.17", "modular-bitfield", "reth-codecs", "revm-primitives", @@ -5907,9 +7482,9 @@ name = "reth-prune-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "bytes", - "derive_more", + "derive_more 0.99.17", "modular-bitfield", "reth-codecs", "serde", @@ -5921,7 +7496,7 @@ name = "reth-revm" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-eips", + "alloy-eips 0.2.1", "reth-chainspec", "reth-consensus-common", "reth-execution-errors", @@ -5937,8 +7512,8 @@ name = "reth-rpc-eth-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-sol-types", - "derive_more", + "alloy-sol-types 0.7.7", + "derive_more 0.99.17", "futures", "jsonrpsee-core", "jsonrpsee-types", @@ -5975,7 +7550,7 @@ name = "reth-rpc-server-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "jsonrpsee-core", "jsonrpsee-types", "reth-errors", @@ -5991,16 +7566,16 @@ name = "reth-rpc-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rpc-types", "alloy-rpc-types-admin", - "alloy-rpc-types-anvil", + "alloy-rpc-types-anvil 0.2.1", "alloy-rpc-types-beacon", "alloy-rpc-types-engine", "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde", + "alloy-serde 0.2.1", "jsonrpsee-types", ] @@ -6021,7 +7596,7 @@ name = "reth-stages-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "bytes", "modular-bitfield", "reth-codecs", @@ -6034,8 +7609,8 @@ name = "reth-static-file-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", - "derive_more", + "alloy-primitives 0.7.7", + "derive_more 0.99.17", "serde", "strum", ] @@ -6148,7 +7723,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a dependencies = [ "alloy-rlp", "auto_impl", - "derive_more", + "derive_more 0.99.17", "itertools 0.13.0", "metrics", "rayon", @@ -6167,13 +7742,13 @@ name = "reth-trie-common" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus", - "alloy-genesis", - "alloy-primitives", + "alloy-consensus 0.2.1", + "alloy-genesis 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", "alloy-trie", "bytes", - "derive_more", + "derive_more 0.99.17", "itertools 0.13.0", "nybbles", "reth-codecs", @@ -6189,7 +7764,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a dependencies = [ "alloy-rlp", "auto_impl", - "derive_more", + "derive_more 0.99.17", "itertools 0.13.0", "metrics", "rayon", @@ -6227,9 +7802,9 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54a785dafff303a335980e317669c4e9800cdd5dd2830c6880c3247022761e88" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rpc-types", - "alloy-sol-types", + "alloy-sol-types 0.7.7", "anstyle", "colorchoice", "revm", @@ -6272,14 +7847,14 @@ version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc4311037ee093ec50ec734e1424fcb3e12d535c6cef683b75d1c064639630c" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "auto_impl", "bitflags 2.6.0", "bitvec", "c-kzg", "cfg-if", - "derive_more", + "derive_more 0.99.17", "dyn-clone", "enumn", "hashbrown 0.14.5", @@ -6289,6 +7864,17 @@ dependencies = [ "serde", ] +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -6332,11 +7918,12 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4003dd96f2e323dfef431b21a2aaddee1c6791fc32dea8eb2bff1b438bf5caf6" +checksum = "543230f7117ce0e6b92b4797fbb3da722575973258cc38a48e28af8d3cf3a26d" dependencies = [ "anyhow", + "borsh", "elf", "risc0-zkp", "risc0-zkvm-platform", @@ -6346,14 +7933,15 @@ dependencies = [ [[package]] name = "risc0-build" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452836a801f4c304c567f88855184f941d778d971cb94bee25b72d4255b56f09" +checksum = "c328bea983ffed4cf3721c92b06fa5076cc38c9e326e1488a9ae792e67a054c7" dependencies = [ "anyhow", "cargo_metadata", "dirs", "docker-generate", + "hex", "risc0-binfmt", "risc0-zkp", "risc0-zkvm-platform", @@ -6362,11 +7950,23 @@ dependencies = [ "tempfile", ] +[[package]] +name = "risc0-build-ethereum" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d8e8421d119e7cdab2b3be263cd28835d5671705553c03f33476cdafd93dc8b" +dependencies = [ + "anyhow", + "hex", + "risc0-build", + "risc0-zkp", +] + [[package]] name = "risc0-build-kernel" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b372eeb78564f262aaa72270a87b94646821e09aa198606ff1e5487943a62b" +checksum = "b186137d4b2b16f7fd017491032e888c56f55ba539812453adc7d3639eaf0113" dependencies = [ "cc", "directories", @@ -6380,21 +7980,24 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c4154d2fbbde5af02a1c35c90340c2749044f5d5cd7834251b616ffa28d467" +checksum = "436c762db677faf2cd616c55a69012d6b4f46c426b7d553c1b3d717e0c7e9438" dependencies = [ "anyhow", "bytemuck", + "cfg-if", "downloader", "hex", - "nvtx", + "lazy-regex", + "metal", "rand 0.8.5", "rayon", "risc0-circuit-recursion-sys", "risc0-core", "risc0-sys", "risc0-zkp", + "serde", "sha2", "tracing", "zip", @@ -6402,9 +8005,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion-sys" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23995e726c28db57626a05f34f80bf223e23e8c4b53a5aa4afb4eaabc4bba923" +checksum = "e632f0cba360b49ab69755b49eca1e6c33bd2302d5eec5693f4b3202e6cb3334" dependencies = [ "glob", "risc0-build-kernel", @@ -6414,18 +8017,18 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce836e7c553e63cbd807d15925ba5dd641a80cdee7d123619eaa60bb555ab014" +checksum = "21f81638d4349eb5a816f3fd6ea12b314007572fc63d45cdb83891bed64e2a2a" dependencies = [ "anyhow", "bytemuck", "cfg-if", "crossbeam", - "crypto-bigint", + "crypto-bigint 0.5.5", "derive-debug", "lazy-regex", - "nvtx", + "metal", "rand 0.8.5", "rayon", "risc0-binfmt", @@ -6441,9 +8044,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im-sys" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07a69a3cb11175f7eeb2f07a7189f0baddb43233a6e7ed552724b1c7c7566152" +checksum = "b3eea90914f44cd1227a23b40c2c9d12bee9923a3a7566ef0e6b5b3f3a85db9e" dependencies = [ "glob", "risc0-build-kernel", @@ -6453,19 +8056,32 @@ dependencies = [ [[package]] name = "risc0-core" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "047cc26c68c092d664ded7488dcac0462d9e31190e1598a7820fe4246d313583" +checksum = "1714b8968a5e4583a15018dc2ae95878c76f4cdbc643268a34670fde5b08252a" dependencies = [ "bytemuck", + "nvtx", + "puffin", "rand_core 0.6.4", ] +[[package]] +name = "risc0-ethereum-contracts" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34d3c29a2b54e010b0a7f7efb22a80ed18400845449cb4b5fdac3948d7f1e69c" +dependencies = [ + "alloy 0.4.2", + "anyhow", + "risc0-zkvm", +] + [[package]] name = "risc0-groth16" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3309c7acaf46ed3d21df3841185afd8ea4aab9fb63dbd1974694dfdae276970" +checksum = "e5f11beecdcabeac264fb868e0b5db22c7e2db5fa2ce68fd482d8ab9ffb88e5d" dependencies = [ "anyhow", "ark-bn254", @@ -6487,9 +8103,9 @@ dependencies = [ [[package]] name = "risc0-sys" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d1b6905a01d72dc9e90a668879b847f4132af4778525480288c8fe90401325" +checksum = "2a3afe2e8e95cec6317a75bb6eb13519f643e22c53c67a22a31c355117b7c447" dependencies = [ "cc", "risc0-build-kernel", @@ -6497,20 +8113,21 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae55272541351a2391e5051519b33bfdf41f5648216827cc2cb94a49b6937380" +checksum = "285aa3993827b4a646d70e68240e138f71574680a02d2e97ad30b1db80efda80" dependencies = [ "anyhow", "blake2", + "borsh", "bytemuck", "cfg-if", "digest 0.10.7", - "ff", + "ff 0.13.0", "hex", "hex-literal", + "metal", "ndarray", - "nvtx", "parking_lot", "paste", "rand 0.8.5", @@ -6526,26 +8143,26 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f234694d9dabc1172cf418b7a3ba65447caad15b994f450e9941d2a7cc89e045" +checksum = "614fad8046130321e3be9ca3a36d9edad6ff4c538549ae191ec4d82576bb3893" dependencies = [ "addr2line", "anyhow", "bincode", - "bonsai-sdk", + "bonsai-sdk 1.1.2", + "borsh", "bytemuck", "bytes", - "cfg-if", "elf", "getrandom 0.2.15", "hex", "lazy-regex", - "nvtx", - "prost", + "prost 0.13.3", "rand 0.8.5", "rayon", "risc0-binfmt", + "risc0-build", "risc0-circuit-recursion", "risc0-circuit-rv32im", "risc0-core", @@ -6557,6 +8174,7 @@ dependencies = [ "semver 1.0.23", "serde", "sha2", + "stability", "tempfile", "tracing", "typetag", @@ -6564,13 +8182,14 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16735dab52ae8bf0dc30df78fce901b674f469dfd7b5f5dfddd54caea22f14d5" +checksum = "b6acf0b0d7a55578f892e0460ed1f2ca06d0380e32440531d80ca82530d41272" dependencies = [ "bytemuck", "getrandom 0.2.15", "libm", + "stability", ] [[package]] @@ -6744,9 +8363,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -6782,6 +8401,18 @@ dependencies = [ "zeroize", ] +[[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 1.0.4", + "schannel", + "security-framework", +] + [[package]] name = "rustls-native-certs" version = "0.7.0" @@ -6832,7 +8463,7 @@ dependencies = [ "log", "once_cell", "rustls 0.23.10", - "rustls-native-certs", + "rustls-native-certs 0.7.0", "rustls-platform-verifier-android", "rustls-webpki 0.102.4", "security-framework", @@ -6893,7 +8524,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5174a470eeb535a721ae9fdd6e291c2411a906b96592182d05217591d5c5cf7b" dependencies = [ "byteorder", - "derive_more", + "derive_more 0.99.17", "twox-hash", ] @@ -6972,16 +8603,30 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct 0.1.1", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + [[package]] name = "sec1" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct", - "der", + "base16ct 0.2.0", + "der 0.7.9", "generic-array", - "pkcs8", + "pkcs8 0.10.2", "subtle", "zeroize", ] @@ -7125,7 +8770,7 @@ version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", "memchr", "ryu", @@ -7174,7 +8819,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -7200,7 +8845,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -7278,6 +8923,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "signature" version = "2.2.0" @@ -7566,7 +9221,7 @@ dependencies = [ "bincode", "borsh", "clap", - "derive_more", + "derive_more 0.99.17", "ed25519-dalek", "hex", "jmt", @@ -7598,7 +9253,7 @@ dependencies = [ "arbitrary", "bech32 0.9.1", "borsh", - "derive_more", + "derive_more 0.99.17", "digest 0.10.7", "hex", "jmt", @@ -7893,7 +9548,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "tower", + "tower 0.5.1", "tracing", ] @@ -7961,6 +9616,16 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der 0.6.1", +] + [[package]] name = "spki" version = "0.7.3" @@ -7968,7 +9633,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der", + "der 0.7.9", +] + +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote", + "syn 2.0.72", ] [[package]] @@ -8074,6 +9749,18 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "syn-solidity" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20e7b52ad118b2153644eea95c6fc740b6c1555b2344fdab763fc9de4075f665" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "syn_derive" version = "0.1.8" @@ -8152,14 +9839,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -8334,6 +10022,16 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.24.1" @@ -8410,7 +10108,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "toml_datetime", "winnow 0.5.40", ] @@ -8421,7 +10119,7 @@ version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", @@ -8449,6 +10147,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "hdrhistogram", + "indexmap 2.6.0", + "pin-project-lite", + "slab", + "sync_wrapper 0.1.2", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-http" version = "0.5.2" @@ -8473,7 +10191,7 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-util", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -8482,15 +10200,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -8738,6 +10456,12 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -8806,6 +10530,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "wait-timeout" version = "0.2.0" @@ -9000,7 +10730,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -9009,7 +10739,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -9027,7 +10757,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -9047,18 +10786,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -9069,9 +10808,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -9081,9 +10820,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -9093,15 +10832,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -9111,9 +10850,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -9123,9 +10862,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -9135,9 +10874,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -9147,9 +10886,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -9225,6 +10964,12 @@ dependencies = [ "tap", ] +[[package]] +name = "xmlparser" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" + [[package]] name = "yoke" version = "0.7.4" @@ -9343,7 +11088,7 @@ dependencies = [ "crossbeam-utils", "displaydoc", "flate2", - "indexmap 2.2.6", + "indexmap 2.6.0", "memchr", "thiserror", "zopfli", diff --git a/Cargo.toml b/Cargo.toml index ed4c64a3b..6d919d5e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ members = [ "crates/ethereum-rpc", "crates/fullnode", "crates/risc0-bonsai", + "crates/risc0-boundless", "crates/sequencer", "crates/sequencer-client", "crates/soft-confirmation-rule-enforcer", @@ -121,11 +122,11 @@ tokio-util = { version = "0.7.12", features = ["rt"] } num_cpus = "1.0" # Risc0 dependencies -risc0-zkvm = { version = "1.0.5", default-features = false } -risc0-zkvm-platform = { version = "1.0.5" } -risc0-zkp = { version = "1.0.5" } -risc0-circuit-rv32im = { version = "1.0.5" } -risc0-build = { version = "1.0.5" } +risc0-zkvm = { version = "1.1.2", default-features = false } +risc0-zkvm-platform = { version = "1.1.2" } +risc0-zkp = { version = "1.1.2" } +risc0-circuit-rv32im = { version = "1.1.2" } +risc0-build = { version = "1.1.2" } bonsai-sdk = { version = "0.9.0" } # EVM dependencies @@ -163,7 +164,7 @@ ed25519-dalek = { version = "2", default-features = false, features = ["serde", secp256k1 = { version = "0.29.0", default-features = false, features = ["global-context", "recovery"] } tower-http = { version = "0.5.0", features = ["full"] } -tower = { version = "0.4.13", features = ["full"] } +tower = { version = "0.5.1", features = ["full"] } hyper = { version = "1.4.0" } [patch.'https://github.com/eigerco/celestia-node-rs.git'] diff --git a/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock b/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock index c02c3d7b0..02b058aa8 100644 --- a/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock +++ b/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock @@ -662,6 +662,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.6.0" @@ -706,6 +712,12 @@ dependencies = [ "constant_time_eq", ] +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + [[package]] name = "block-buffer" version = "0.10.4" @@ -945,6 +957,33 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "cpufeatures" version = "0.2.12" @@ -1268,6 +1307,33 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "funty" version = "2.0.0" @@ -1665,12 +1731,36 @@ version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + [[package]] name = "mirai-annotations" version = "1.12.0" @@ -1826,6 +1916,15 @@ dependencies = [ "smallvec", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + [[package]] name = "once_cell" version = "1.19.0" @@ -1979,7 +2078,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand", @@ -2266,7 +2365,7 @@ dependencies = [ "alloy-eips", "alloy-primitives", "auto_impl", - "bitflags", + "bitflags 2.6.0", "bitvec", "c-kzg", "cfg-if", @@ -2299,11 +2398,12 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4003dd96f2e323dfef431b21a2aaddee1c6791fc32dea8eb2bff1b438bf5caf6" +checksum = "543230f7117ce0e6b92b4797fbb3da722575973258cc38a48e28af8d3cf3a26d" dependencies = [ "anyhow", + "borsh", "elf", "risc0-zkp", "risc0-zkvm-platform", @@ -2313,13 +2413,14 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c4154d2fbbde5af02a1c35c90340c2749044f5d5cd7834251b616ffa28d467" +checksum = "436c762db677faf2cd616c55a69012d6b4f46c426b7d553c1b3d717e0c7e9438" dependencies = [ "anyhow", "bytemuck", "hex", + "metal", "risc0-core", "risc0-zkp", "tracing", @@ -2327,11 +2428,12 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce836e7c553e63cbd807d15925ba5dd641a80cdee7d123619eaa60bb555ab014" +checksum = "21f81638d4349eb5a816f3fd6ea12b314007572fc63d45cdb83891bed64e2a2a" dependencies = [ "anyhow", + "metal", "risc0-binfmt", "risc0-core", "risc0-zkp", @@ -2342,9 +2444,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "047cc26c68c092d664ded7488dcac0462d9e31190e1598a7820fe4246d313583" +checksum = "1714b8968a5e4583a15018dc2ae95878c76f4cdbc643268a34670fde5b08252a" dependencies = [ "bytemuck", "rand_core", @@ -2352,9 +2454,9 @@ dependencies = [ [[package]] name = "risc0-groth16" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3309c7acaf46ed3d21df3841185afd8ea4aab9fb63dbd1974694dfdae276970" +checksum = "e5f11beecdcabeac264fb868e0b5db22c7e2db5fa2ce68fd482d8ab9ffb88e5d" dependencies = [ "anyhow", "ark-bn254", @@ -2372,17 +2474,19 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae55272541351a2391e5051519b33bfdf41f5648216827cc2cb94a49b6937380" +checksum = "285aa3993827b4a646d70e68240e138f71574680a02d2e97ad30b1db80efda80" dependencies = [ "anyhow", "blake2", + "borsh", "bytemuck", "cfg-if", "digest 0.10.7", "hex", "hex-literal", + "metal", "paste", "rand_core", "risc0-core", @@ -2394,13 +2498,13 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f234694d9dabc1172cf418b7a3ba65447caad15b994f450e9941d2a7cc89e045" +checksum = "614fad8046130321e3be9ca3a36d9edad6ff4c538549ae191ec4d82576bb3893" dependencies = [ "anyhow", + "borsh", "bytemuck", - "cfg-if", "getrandom", "hex", "risc0-binfmt", @@ -2414,18 +2518,20 @@ dependencies = [ "semver 1.0.23", "serde", "sha2", + "stability", "tracing", ] [[package]] name = "risc0-zkvm-platform" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16735dab52ae8bf0dc30df78fce901b674f469dfd7b5f5dfddd54caea22f14d5" +checksum = "b6acf0b0d7a55578f892e0460ed1f2ca06d0380e32440531d80ca82530d41272" dependencies = [ "bytemuck", "getrandom", "libm", + "stability", ] [[package]] @@ -2533,7 +2639,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2940,6 +3046,16 @@ dependencies = [ "der", ] +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote", + "syn 2.0.66", +] + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/bin/citrea/provers/risc0/guest-mock/Cargo.lock b/bin/citrea/provers/risc0/guest-mock/Cargo.lock index 67789b37c..aafe8e6c2 100644 --- a/bin/citrea/provers/risc0/guest-mock/Cargo.lock +++ b/bin/citrea/provers/risc0/guest-mock/Cargo.lock @@ -574,6 +574,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.6.0" @@ -618,6 +624,12 @@ dependencies = [ "constant_time_eq", ] +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + [[package]] name = "block-buffer" version = "0.10.4" @@ -840,6 +852,33 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "cpufeatures" version = "0.2.12" @@ -1163,6 +1202,33 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "funty" version = "2.0.0" @@ -1456,12 +1522,36 @@ version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + [[package]] name = "mirai-annotations" version = "1.12.0" @@ -1617,6 +1707,15 @@ dependencies = [ "smallvec", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + [[package]] name = "once_cell" version = "1.19.0" @@ -1764,7 +1863,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand", @@ -2051,7 +2150,7 @@ dependencies = [ "alloy-eips", "alloy-primitives", "auto_impl", - "bitflags", + "bitflags 2.6.0", "bitvec", "c-kzg", "cfg-if", @@ -2084,11 +2183,12 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4003dd96f2e323dfef431b21a2aaddee1c6791fc32dea8eb2bff1b438bf5caf6" +checksum = "543230f7117ce0e6b92b4797fbb3da722575973258cc38a48e28af8d3cf3a26d" dependencies = [ "anyhow", + "borsh", "elf", "risc0-zkp", "risc0-zkvm-platform", @@ -2098,13 +2198,14 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c4154d2fbbde5af02a1c35c90340c2749044f5d5cd7834251b616ffa28d467" +checksum = "436c762db677faf2cd616c55a69012d6b4f46c426b7d553c1b3d717e0c7e9438" dependencies = [ "anyhow", "bytemuck", "hex", + "metal", "risc0-core", "risc0-zkp", "tracing", @@ -2112,11 +2213,12 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce836e7c553e63cbd807d15925ba5dd641a80cdee7d123619eaa60bb555ab014" +checksum = "21f81638d4349eb5a816f3fd6ea12b314007572fc63d45cdb83891bed64e2a2a" dependencies = [ "anyhow", + "metal", "risc0-binfmt", "risc0-core", "risc0-zkp", @@ -2127,9 +2229,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "047cc26c68c092d664ded7488dcac0462d9e31190e1598a7820fe4246d313583" +checksum = "1714b8968a5e4583a15018dc2ae95878c76f4cdbc643268a34670fde5b08252a" dependencies = [ "bytemuck", "rand_core", @@ -2137,9 +2239,9 @@ dependencies = [ [[package]] name = "risc0-groth16" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3309c7acaf46ed3d21df3841185afd8ea4aab9fb63dbd1974694dfdae276970" +checksum = "e5f11beecdcabeac264fb868e0b5db22c7e2db5fa2ce68fd482d8ab9ffb88e5d" dependencies = [ "anyhow", "ark-bn254", @@ -2157,17 +2259,19 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae55272541351a2391e5051519b33bfdf41f5648216827cc2cb94a49b6937380" +checksum = "285aa3993827b4a646d70e68240e138f71574680a02d2e97ad30b1db80efda80" dependencies = [ "anyhow", "blake2", + "borsh", "bytemuck", "cfg-if", "digest 0.10.7", "hex", "hex-literal", + "metal", "paste", "rand_core", "risc0-core", @@ -2179,13 +2283,13 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f234694d9dabc1172cf418b7a3ba65447caad15b994f450e9941d2a7cc89e045" +checksum = "614fad8046130321e3be9ca3a36d9edad6ff4c538549ae191ec4d82576bb3893" dependencies = [ "anyhow", + "borsh", "bytemuck", - "cfg-if", "getrandom", "hex", "risc0-binfmt", @@ -2199,18 +2303,20 @@ dependencies = [ "semver 1.0.23", "serde", "sha2", + "stability", "tracing", ] [[package]] name = "risc0-zkvm-platform" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16735dab52ae8bf0dc30df78fce901b674f469dfd7b5f5dfddd54caea22f14d5" +checksum = "b6acf0b0d7a55578f892e0460ed1f2ca06d0380e32440531d80ca82530d41272" dependencies = [ "bytemuck", "getrandom", "libm", + "stability", ] [[package]] @@ -2318,7 +2424,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2743,6 +2849,16 @@ dependencies = [ "der", ] +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote", + "syn 2.0.66", +] + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/crates/fullnode/Cargo.toml b/crates/fullnode/Cargo.toml index 5e81ac479..ad891f0f9 100644 --- a/crates/fullnode/Cargo.toml +++ b/crates/fullnode/Cargo.toml @@ -36,7 +36,7 @@ serde = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true } tokio-util = { workspace = true } -tower = { workspace = true } +tower = { version = "0.4.13", features = ["full"] } tracing = { workspace = true } [dev-dependencies] diff --git a/crates/prover/Cargo.toml b/crates/prover/Cargo.toml index 39bbe5b5b..1472957d7 100644 --- a/crates/prover/Cargo.toml +++ b/crates/prover/Cargo.toml @@ -41,7 +41,7 @@ rs_merkle = { workspace = true } serde = { workspace = true } tokio = { workspace = true } tokio-util = { workspace = true } -tower = { workspace = true } +tower = { version = "0.4.13", features = ["full"] } tracing = { workspace = true } [dev-dependencies] diff --git a/crates/risc0-boundless/Cargo.toml b/crates/risc0-boundless/Cargo.toml new file mode 100644 index 000000000..f5e6e6b97 --- /dev/null +++ b/crates/risc0-boundless/Cargo.toml @@ -0,0 +1,50 @@ +[package] +name = "citrea-risc0-boundless-adapter" +version = { workspace = true } +authors = { workspace = true } +edition = { workspace = true } +homepage = { workspace = true } +license = { workspace = true } +readme = "README.md" +repository = { workspace = true } +description = "An adapter allowing Citrea to connect with Risc0 Boundless Prover Network" + +[dependencies] +alloy = { version = "0.3" } +anyhow = { workspace = true } +backoff = { workspace = true } +bincode = { workspace = true } +borsh = { workspace = true } +bytemuck = "1.13.1" +hex = { workspace = true } +once_cell = { version = "1.19.0", optional = true } +parking_lot = { version = "0.12.1", optional = true } +reqwest = { workspace = true } +risc0-circuit-rv32im = { workspace = true, optional = true } +risc0-zkp = { workspace = true, optional = true } +risc0-zkvm = { workspace = true, default-features = false, features = ["std"] } +risc0-zkvm-platform = { workspace = true } +serde = { workspace = true } +sov-db = { path = "../sovereign-sdk/full-node/db/sov-db" } +# we are going to use its guest +sov-risc0-adapter = { path = "../sovereign-sdk/adapters/risc0", optional = true } +sov-rollup-interface = { path = "../sovereign-sdk/rollup-interface" } +tokio = { workspace = true } +tracing = { workspace = true } +url = "2.5" + +# # boundless monorepo dependencies. +# aggregation-set = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } +# guest-assessor = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } +boundless-market = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } +# broker = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } + +[features] +default = [] +native = [ + "risc0-zkvm/prove", + "dep:risc0-zkp", + "dep:risc0-circuit-rv32im", + "sov-risc0-adapter/native", +] +bench = ["once_cell", "parking_lot", "native"] diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs new file mode 100644 index 000000000..d688396b7 --- /dev/null +++ b/crates/risc0-boundless/src/host.rs @@ -0,0 +1,501 @@ +//! This module implements the [`ZkvmHost`] trait for the RISC0 VM. +use std::sync::mpsc::{self, Sender}; +use std::sync::Arc; +use std::thread; +use std::time::Duration; + +use alloy::network::Ethereum; +use alloy::primitives::aliases::{U192, U96}; +use alloy::primitives::utils::parse_ether; +use alloy::primitives::{Address, Bytes, U256}; +use alloy::providers::fillers::{ + BlobGasFiller, ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller, WalletFiller, +}; +use alloy::providers::network::EthereumWallet; +use alloy::providers::{Identity, Provider, ProviderBuilder, RootProvider}; +use alloy::signers::k256::ecdsa::SigningKey; +use alloy::signers::local::{LocalSigner, PrivateKeySigner}; +use alloy::transports::http::Http; +use alloy::transports::Transport; +use anyhow::anyhow; +use backoff::exponential::ExponentialBackoffBuilder; +use backoff::{retry as retry_backoff, SystemClock}; +use borsh::{BorshDeserialize, BorshSerialize}; +use boundless_market::contracts::{Input, Offer, Predicate, ProvingRequest, Requirements}; +use boundless_market::sdk::client::{self, Client}; +use boundless_market::storage::{ + storage_provider_from_env, BuiltinStorageProvider, BuiltinStorageProviderError, StorageProvider, +}; +use reqwest::Client as HttpClient; +use risc0_zkvm::sha::{Digest, Digestible}; +use risc0_zkvm::{ + compute_image_id, default_executor, stark_to_snark, ExecutorEnv, ExecutorImpl, Groth16Receipt, + InnerReceipt, Journal, Receipt, +}; +use sov_db::ledger_db::{LedgerDB, ProvingServiceLedgerOps}; +use sov_risc0_adapter::guest::Risc0Guest; +use sov_rollup_interface::zk::{Proof, Zkvm, ZkvmHost}; +use tracing::{debug, error, info, instrument, trace, warn}; +use url::Url; + +type ProviderWallet = FillProvider< + JoinFill< + JoinFill< + Identity, + JoinFill>>, + >, + WalletFiller, + >, + RootProvider>, + Http, + Ethereum, +>; + +#[derive(Clone)] +enum BoundlessRequest { + UploadImg { + elf: Vec, + notify: Sender, + }, + UploadInput { + input: Vec, + notify: Sender, + }, + SubmitReq { + proving_request: ProvingRequest, + notify: Sender, + }, + WaitForReqFulfillment { + request_id: U256, + check_interval: std::time::Duration, + timeout: Option, + notify: Sender<(Bytes, Bytes)>, + }, +} + +#[derive(Clone)] +struct BoundlessClient { + queue: std::sync::mpsc::Sender, + _join_handle: Arc>, +} + +impl BoundlessClient { + async fn create_client( + requestor_private_key: PrivateKeySigner, + rpc_url: Url, + proof_market_address: Address, + set_verifier_address: Address, + ) -> Result, ProviderWallet, BuiltinStorageProvider>, anyhow::Error> + { + let client = Client::from_parts( + requestor_private_key, + rpc_url, + proof_market_address, + set_verifier_address, + ) + .await + .map_err(|e| anyhow!(e))?; + Ok(client) + } + + async fn from_parts( + client: Client, ProviderWallet, BuiltinStorageProvider>, + ) -> Self { + macro_rules! unwrap_boundless_response { + ($response:expr, $queue_loop:lifetime) => ( + match $response.await { + Ok(r) => r, + Err(e) => { + use ::boundless_market::sdk::client::ClientError::*; + match e { + // TODO fix continue loop types + StorageProviderError(s) => { + warn!(%s, "Boundless Storage Provider Error"); + std::thread::sleep(Duration::from_secs(10)); + continue $queue_loop + } + // Should this be a transient error? + MarketError(e) => { + error!(?e, "Boundless Market Error"); + std::thread::sleep(Duration::from_secs(5)); + continue $queue_loop + } + Error(e) => { + error!(?e, "Boundless Error"); + std::thread::sleep(Duration::from_secs(5)); + continue $queue_loop + } + e => { + error!(?e, "Got unrecoverable error from Boundless"); + panic!("Boundless API error: {}", e); + } + } + } + } + ); + } + let (queue, rx) = std::sync::mpsc::channel(); + let join_handle = tokio::spawn(async move { + let mut last_request: Option = None; + 'queue: loop { + let request = if let Some(last_request) = last_request.clone() { + debug!("Retrying last request after reconnection"); + last_request + } else { + trace!("Waiting for a new request"); + let req: BoundlessRequest = rx.recv().expect("bonsai client sender is dead"); + // Save request for retries + last_request = Some(req.clone()); + req + }; + match request { + BoundlessRequest::UploadImg { elf, notify } => { + let res = client.upload_image(&elf); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::UploadInput { input, notify } => { + debug!("Boundless: upload_input"); + let res = client.upload_input(&input); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::SubmitReq { + proving_request, + notify, + } => { + debug!("Boundless: submit_req"); + let res = client.submit_request(&proving_request); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::WaitForReqFulfillment { + request_id, + check_interval, + timeout, + notify, + } => { + debug!("Boundless: wait_for_req_fulfillment"); + let res = client.wait_for_request_fulfillment( + request_id, + check_interval, + timeout, + ); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + }; + // We arrive here only on a successful response + last_request = None; + } + }); + let _join_handle = Arc::new(join_handle); + + Self { + queue, + _join_handle, + } + } + + #[instrument(level = "trace", skip(self), ret)] + fn upload_img(&self, elf: Vec) -> String { + let (notify, rx) = mpsc::channel(); + self.queue + .send(BoundlessRequest::UploadImg { elf, notify }) + .expect("Bonsai processing queue is dead"); + rx.recv().unwrap() + } + + #[instrument(level = "trace", skip_all, ret)] + fn upload_input(&self, input: Vec) -> String { + let (notify, rx) = mpsc::channel(); + self.queue + .send(BoundlessRequest::UploadInput { input, notify }) + .expect("Bonsai processing queue is dead"); + rx.recv().unwrap() + } + + #[instrument(level = "trace", skip_all, ret)] + fn submit_request(&self, proving_request: ProvingRequest) -> U256 { + let (notify, rx) = mpsc::channel(); + self.queue + .send(BoundlessRequest::SubmitReq { + proving_request, + notify, + }) + .expect("Bonsai processing queue is dead"); + rx.recv().unwrap() + } + + #[instrument(level = "trace", skip_all, ret)] + fn wait_for_request_fulfillment( + &self, + request_id: U256, + check_interval: std::time::Duration, + timeout: Option, + ) -> (Bytes, Bytes) { + let (notify, rx) = mpsc::channel(); + self.queue + .send(BoundlessRequest::WaitForReqFulfillment { + request_id, + check_interval, + timeout, + notify, + }) + .expect("Bonsai processing queue is dead"); + rx.recv().unwrap() + } +} + +/// A [`Risc0BoundlessHost`] stores a binary to execute in the Risc0 VM and prove in the Risc0 Boundless Network. +#[derive(Clone)] +pub struct Risc0BoundlessHost<'a> { + elf: &'a [u8], + env: Vec, + image_id: Digest, + image_url: String, + client: BoundlessClient, + last_input_url: Option, + ledger_db: LedgerDB, + proof_market_address: Address, + set_verifier_address: Address, +} + +impl<'a> Risc0BoundlessHost<'a> { + /// Create a new Risc0Host to prove the given binary. + pub async fn new( + elf: &'a [u8], + ledger_db: LedgerDB, + requestor_private_key: PrivateKeySigner, + rpc_url: Url, + proof_market_address: Address, + set_verifier_address: Address, + ) -> Self { + /// Creates a storage provider based on the environment variables. + /// + /// If the environment variable `RISC0_DEV_MODE` is set, a temporary file storage provider is used. + /// Otherwise, the following environment variables are checked in order: + /// - `PINATA_JWT`, `PINATA_API_URL`, `IPFS_GATEWAY_URL`: Pinata storage provider; + /// - `S3_ACCESS`, `S3_SECRET`, `S3_BUCKET`, `S3_URL`, `AWS_REGION`: S3 storage provider. + let boundless_client: Client< + Http, + ProviderWallet, + BuiltinStorageProvider, + > = BoundlessClient::create_client( + requestor_private_key, + rpc_url, + proof_market_address, + set_verifier_address, + ) + .await + .expect("Failed to create boundless client"); + + let client = BoundlessClient::from_parts(boundless_client.clone()).await; + + let image_id = compute_image_id(elf).unwrap(); + + tracing::trace!("Calculated image id: {:?}", image_id.as_words()); + + let image_url = client.upload_img(elf.to_vec()); + tracing::info!("Uploaded image to {}", image_url); + + Self { + elf, + env: Default::default(), + image_id, + image_url, + client, + last_input_url: None, + ledger_db, + proof_market_address, + set_verifier_address, + } + } + + fn upload_input_to_boundless(&mut self, input: &[u8]) { + let client = self.client.clone(); + + // Retry backoff + let input_url = client.upload_input(input.to_vec()); + tracing::info!("Uploaded input to {}", input_url); + + self.last_input_url = Some(input_url); + } +} + +impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { + type Guest = Risc0Guest; + + fn add_hint(&mut self, item: T) { + // For running in "execute" mode. + + let buf = borsh::to_vec(&item).expect("Risc0 hint serialization is infallible"); + + // write buf + self.env.extend_from_slice(&buf); + info!("Added hint to guest with size {}", buf.len()); + + self.upload_input_to_boundless(&buf); + } + + fn simulate_with_hints(&mut self) -> Self::Guest { + Risc0Guest::with_hints(std::mem::take(&mut self.env)) + } + + fn run(&mut self, with_proof: bool) -> Result { + if !with_proof { + let env = sov_risc0_adapter::host::add_benchmarking_callbacks(ExecutorEnv::builder()) + .write_slice(&self.env) + .build() + .unwrap(); + let mut executor = ExecutorImpl::from_elf(env, self.elf)?; + + let session = executor.run()?; + // don't delete useful while benchmarking + // println!( + // "user cycles: {}\ntotal cycles: {}\nsegments: {}", + // session.user_cycles, + // session.total_cycles, + // session.segments.len() + // ); + let data = bincode::serialize(&session.journal.expect("Journal shouldn't be empty"))?; + + Ok(Proof::PublicInput(data)) + } else { + let input_url = self + .last_input_url + .clone() + .take() + .ok_or(anyhow!("No input URL"))?; + // Dry run the ECHO ELF with the input to get the journal and cycle count. + // This can be useful to estimate the cost of the proving request. + // It can also be useful to ensure the guest can be executed correctly and we do not send into + // the market unprovable proving requests. If you have a different mechanism to get the expected + // journal and set a price, you can skip this step. + let env = ExecutorEnv::builder().write_slice(&self.env).build()?; + let session_info = default_executor().execute(env, self.elf)?; + let mcycles_count = session_info + .segments + .iter() + .map(|segment| 1 << segment.po2) + .sum::() + .div_ceil(1_000_000); + let journal = session_info.journal; + + // Create a proving request with the image, input, requirements and offer. + // The ELF (i.e. image) is specified by the image URL. + // The input can be specified by a URL, as in this example, or can be posted on chain by using + // the `with_inline` method with the input bytes. + // The requirements are the IMAGE_ID and the digest of the journal. In this way, the market can + // verify that the proof is correct by checking both the committed image id and digest of the + // journal. The offer specifies the price range and the timeout for the request. + // Additionally, the offer can also specify: + // - the bidding start time: the block number when the bidding starts; + // - the ramp up period: the number of blocks before the price start increasing until reaches + // the maxPrice, starting from the the bidding start; + // - the lockin price: the price at which the request can be locked in by a prover, if the + // request is not fulfilled before the timeout, the prover can be slashed. + let request = ProvingRequest::default() + .with_image_url(&self.image_url) + .with_input(Input::url(&input_url)) + .with_requirements(Requirements::new( + self.image_id, + Predicate::digest_match(journal.digest()), + )) + .with_offer( + Offer::default() + // The market uses a reverse Dutch auction mechanism to match requests with provers. + // Each request has a price range that a prover can bid on. One way to set the price + // is to choose a desired (min and max) price per million cycles and multiply it + // by the number of cycles. Alternatively, you can use the `with_min_price` and + // `with_max_price` methods to set the price directly. + // TODO: Work on pricing + .with_min_price_per_mcycle( + U96::from::(parse_ether("0.001")?.try_into()?), + mcycles_count, + ) + // NOTE: If your offer is not being accepted, try increasing the max price. + .with_max_price_per_mcycle( + U96::from::(parse_ether("0.002")?.try_into()?), + mcycles_count, + ) + // The timeout is the maximum number of blocks the request can stay + // unfulfilled in the market before it expires. If a prover locks in + // the request and does not fulfill it before the timeout, the prover can be + // slashed. + .with_timeout(1000), + ); + // Send the request and wait for it to be completed. + let request_id = self.client.submit_request(request); + tracing::info!("Request {} submitted", request_id); + + // Wait for the request to be fulfilled by the market. The market will return the journal and + // seal. + tracing::info!("Waiting for request {} to be fulfilled", request_id); + let (journal, seal) = self.client.wait_for_request_fulfillment( + request_id, + Duration::from_secs(5), // check every 5 seconds + None, // no timeout + ); + tracing::info!("Request {} fulfilled", request_id); + // TODO: Convert to proof and submit + } + } + + fn extract_output( + proof: &Proof, + ) -> Result, Self::Error> { + let journal = match proof { + Proof::PublicInput(journal) => { + let journal: Journal = bincode::deserialize(journal)?; + journal + } + Proof::Full(data) => { + let receipt: Receipt = bincode::deserialize(data)?; + receipt.journal + } + }; + Ok(BorshDeserialize::try_from_slice(&journal.bytes)?) + } + + fn recover_proving_sessions(&self) -> Result, anyhow::Error> { + unimplemented!() + } +} + +impl<'host> Zkvm for Risc0BoundlessHost<'host> { + type CodeCommitment = Digest; + + type Error = anyhow::Error; + + fn verify( + serialized_proof: &[u8], + code_commitment: &Self::CodeCommitment, + ) -> Result, Self::Error> { + let receipt: Receipt = bincode::deserialize(serialized_proof)?; + + #[allow(clippy::clone_on_copy)] + receipt.verify(code_commitment.clone())?; + + Ok(receipt.journal.bytes) + } + + fn verify_and_extract_output( + serialized_proof: &[u8], + code_commitment: &Self::CodeCommitment, + ) -> Result, Self::Error> { + let receipt: Receipt = bincode::deserialize(serialized_proof)?; + + #[allow(clippy::clone_on_copy)] + receipt.verify(code_commitment.clone())?; + + Ok(BorshDeserialize::deserialize( + &mut receipt.journal.bytes.as_slice(), + )?) + } +} + +#[test] +fn test_a() { + assert!(true) +} diff --git a/crates/risc0-boundless/src/lib.rs b/crates/risc0-boundless/src/lib.rs new file mode 100644 index 000000000..18b5beee7 --- /dev/null +++ b/crates/risc0-boundless/src/lib.rs @@ -0,0 +1,56 @@ +pub use risc0_zkvm::sha::Digest; +use serde::{Deserialize, Serialize}; +use sov_rollup_interface::zk::Matches; + +#[cfg(feature = "native")] +pub mod host; + +/// Uniquely identifies a Risc0 binary. Roughly equivalent to +/// the hash of the ELF file. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Risc0MethodId([u32; 8]); + +impl Risc0MethodId { + /// Create a new `Risc0MethodId` from a slice of u32s. + pub fn new(data: [u32; 8]) -> Self { + Self(data) + } + + /// Returns a reference to the `Risc0MethodId` as a slice of u32s. + pub fn as_words(&self) -> &[u32] { + &self.0 + } +} + +impl Matches for Risc0MethodId { + fn matches(&self, other: &Self) -> bool { + self.0 == other.0 + } +} + +impl Matches for Risc0MethodId { + fn matches(&self, other: &Digest) -> bool { + self.0 == other.as_words() + } +} + +impl Matches<[u32; 8]> for Risc0MethodId { + fn matches(&self, other: &[u32; 8]) -> bool { + &self.0 == other + } +} + +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/sequencer/Cargo.toml b/crates/sequencer/Cargo.toml index 1ed1b5472..bd8f79429 100644 --- a/crates/sequencer/Cargo.toml +++ b/crates/sequencer/Cargo.toml @@ -32,7 +32,7 @@ serde = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true } tokio-util = { workspace = true } -tower = { workspace = true } +tower = { version = "0.4.13", features = ["full"] } tower-http = { workspace = true } tracing = { workspace = true } From 86064b23ea867372cef66b10c7aa4ff8120ec4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Mon, 14 Oct 2024 12:52:49 +0300 Subject: [PATCH 02/11] Implement slashing --- crates/risc0-boundless/src/host.rs | 193 +++++++++++++++++------------ 1 file changed, 117 insertions(+), 76 deletions(-) diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index d688396b7..ced99eeb5 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -1,4 +1,5 @@ //! This module implements the [`ZkvmHost`] trait for the RISC0 VM. +use core::panic; use std::sync::mpsc::{self, Sender}; use std::sync::Arc; use std::thread; @@ -24,7 +25,8 @@ use borsh::{BorshDeserialize, BorshSerialize}; use boundless_market::contracts::{Input, Offer, Predicate, ProvingRequest, Requirements}; use boundless_market::sdk::client::{self, Client}; use boundless_market::storage::{ - storage_provider_from_env, BuiltinStorageProvider, BuiltinStorageProviderError, StorageProvider, + storage_provider_from_env, BuiltinStorageProvider, BuiltinStorageProviderError, + StorageProvider, TempFileStorageProviderError, }; use reqwest::Client as HttpClient; use risc0_zkvm::sha::{Digest, Digestible}; @@ -69,7 +71,11 @@ enum BoundlessRequest { request_id: U256, check_interval: std::time::Duration, timeout: Option, - notify: Sender<(Bytes, Bytes)>, + notify: Sender>, + }, + Slash { + request_id: U256, + notify: Sender<()>, }, } @@ -80,26 +86,11 @@ struct BoundlessClient { } impl BoundlessClient { - async fn create_client( + async fn from_parts( requestor_private_key: PrivateKeySigner, rpc_url: Url, proof_market_address: Address, set_verifier_address: Address, - ) -> Result, ProviderWallet, BuiltinStorageProvider>, anyhow::Error> - { - let client = Client::from_parts( - requestor_private_key, - rpc_url, - proof_market_address, - set_verifier_address, - ) - .await - .map_err(|e| anyhow!(e))?; - Ok(client) - } - - async fn from_parts( - client: Client, ProviderWallet, BuiltinStorageProvider>, ) -> Self { macro_rules! unwrap_boundless_response { ($response:expr, $queue_loop:lifetime) => ( @@ -137,56 +128,86 @@ impl BoundlessClient { let (queue, rx) = std::sync::mpsc::channel(); let join_handle = tokio::spawn(async move { let mut last_request: Option = None; - 'queue: loop { - let request = if let Some(last_request) = last_request.clone() { - debug!("Retrying last request after reconnection"); - last_request - } else { - trace!("Waiting for a new request"); - let req: BoundlessRequest = rx.recv().expect("bonsai client sender is dead"); - // Save request for retries - last_request = Some(req.clone()); - req - }; - match request { - BoundlessRequest::UploadImg { elf, notify } => { - let res = client.upload_image(&elf); - let res = unwrap_boundless_response!(res, 'queue); - let _ = notify.send(res); + 'client: loop { + debug!("Boundless client loop"); + let client = match Client::from_parts( + requestor_private_key, + rpc_url, + proof_market_address, + set_verifier_address, + ) + .await + { + Ok(client) => client, + Err(client::ClientError::StorageProviderError( + BuiltinStorageProviderError::File(_), + )) + | Err(client::ClientError::StorageProviderError( + BuiltinStorageProviderError::NoProvider, + )) => { + panic!("Failed to create boundless client: no storage provider or temp file storage provider error"); } - BoundlessRequest::UploadInput { input, notify } => { - debug!("Boundless: upload_input"); - let res = client.upload_input(&input); - let res = unwrap_boundless_response!(res, 'queue); - let _ = notify.send(res); - } - BoundlessRequest::SubmitReq { - proving_request, - notify, - } => { - debug!("Boundless: submit_req"); - let res = client.submit_request(&proving_request); - let res = unwrap_boundless_response!(res, 'queue); - let _ = notify.send(res); + Err(e) => { + error!(?e, "Failed to create boundless client"); + continue 'client; } - BoundlessRequest::WaitForReqFulfillment { - request_id, - check_interval, - timeout, - notify, - } => { - debug!("Boundless: wait_for_req_fulfillment"); - let res = client.wait_for_request_fulfillment( + }; + 'queue: loop { + let request = if let Some(last_request) = last_request.clone() { + debug!("Retrying last request after reconnection"); + last_request + } else { + trace!("Waiting for a new request"); + let req: BoundlessRequest = + rx.recv().expect("bonsai client sender is dead"); + // Save request for retries + last_request = Some(req.clone()); + req + }; + match request { + BoundlessRequest::UploadImg { elf, notify } => { + let res = client.upload_image(&elf); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::UploadInput { input, notify } => { + debug!("Boundless: upload_input"); + let res = client.upload_input(&input); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::SubmitReq { + proving_request, + notify, + } => { + debug!("Boundless: submit_req"); + let res = client.submit_request(&proving_request); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::WaitForReqFulfillment { request_id, check_interval, timeout, - ); - let res = unwrap_boundless_response!(res, 'queue); - let _ = notify.send(res); - } - }; - // We arrive here only on a successful response - last_request = None; + notify, + } => { + debug!("Boundless: wait_for_req_fulfillment"); + let res = client + .wait_for_request_fulfillment(request_id, check_interval, timeout) + .await; + // There is no need to retry this request as this already has a retry mechanism inside + let _ = notify.send(res); + } + BoundlessRequest::Slash { request_id, notify } => { + debug!("Boundless: slash"); + let res = client.proof_market.slash(request_id); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + }; + // We arrive here only on a successful response + last_request = None; + } } }); let _join_handle = Arc::new(join_handle); @@ -233,7 +254,7 @@ impl BoundlessClient { request_id: U256, check_interval: std::time::Duration, timeout: Option, - ) -> (Bytes, Bytes) { + ) -> Result<(Bytes, Bytes), client::ClientError> { let (notify, rx) = mpsc::channel(); self.queue .send(BoundlessRequest::WaitForReqFulfillment { @@ -245,6 +266,15 @@ impl BoundlessClient { .expect("Bonsai processing queue is dead"); rx.recv().unwrap() } + + #[instrument(level = "trace", skip_all, ret)] + fn slash(&self, request_id: U256) -> () { + let (notify, rx) = mpsc::channel(); + self.queue + .send(BoundlessRequest::Slash { request_id, notify }) + .expect("Bonsai processing queue is dead"); + rx.recv().unwrap() + } } /// A [`Risc0BoundlessHost`] stores a binary to execute in the Risc0 VM and prove in the Risc0 Boundless Network. @@ -277,20 +307,13 @@ impl<'a> Risc0BoundlessHost<'a> { /// Otherwise, the following environment variables are checked in order: /// - `PINATA_JWT`, `PINATA_API_URL`, `IPFS_GATEWAY_URL`: Pinata storage provider; /// - `S3_ACCESS`, `S3_SECRET`, `S3_BUCKET`, `S3_URL`, `AWS_REGION`: S3 storage provider. - let boundless_client: Client< - Http, - ProviderWallet, - BuiltinStorageProvider, - > = BoundlessClient::create_client( + let client = BoundlessClient::from_parts( requestor_private_key, rpc_url, proof_market_address, set_verifier_address, ) - .await - .expect("Failed to create boundless client"); - - let client = BoundlessClient::from_parts(boundless_client.clone()).await; + .await; let image_id = compute_image_id(elf).unwrap(); @@ -432,13 +455,31 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { // Wait for the request to be fulfilled by the market. The market will return the journal and // seal. tracing::info!("Waiting for request {} to be fulfilled", request_id); - let (journal, seal) = self.client.wait_for_request_fulfillment( + let (journal, seal) = match self.client.wait_for_request_fulfillment( request_id, Duration::from_secs(5), // check every 5 seconds None, // no timeout - ); - tracing::info!("Request {} fulfilled", request_id); + ) { + Ok((journal, seal)) => { + tracing::info!("Request {} fulfilled", request_id); + (journal, seal) + } + Err(e) => { + tracing::error!("Request {} failed: {:?}", request_id, e); + // Slash operator and retry + self.client.slash(request_id); + // TODO: Retry mechanism, maybe a retry trait with: + // - max retries + // - backoff strategy + // - retry condition : sp1, risc0bonsai, risc0 boundless, risc0 local, sp1 local everything will have different retry conditions, for every host we will have a retry condition + // - retry action : sp1, risc0bonsai, risc0 boundless, risc0 local, sp1 local everything will have different retry actions, for every host we will have a retry action + // - retry error : sp1, risc0bonsai, risc0 boundless, risc0 local, sp1 local everything will have different retry errors, for every host we will have a retry error + return Err(anyhow!("Request {} failed: {:?}", request_id, e)); + } + }; + // TODO: Convert to proof and submit + Ok(Proof::PublicInput(vec![0u8; 32])) } } From 497d5cfdf4bc428634489718b294c3a820cf24e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Mon, 14 Oct 2024 16:44:00 +0300 Subject: [PATCH 03/11] WIP convert to snark proof --- crates/risc0-boundless/src/host.rs | 70 +++++++++++++++++++----------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index ced99eeb5..a2e55ac00 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -22,7 +22,9 @@ use anyhow::anyhow; use backoff::exponential::ExponentialBackoffBuilder; use backoff::{retry as retry_backoff, SystemClock}; use borsh::{BorshDeserialize, BorshSerialize}; +use boundless_market::contracts::proof_market::MarketError; use boundless_market::contracts::{Input, Offer, Predicate, ProvingRequest, Requirements}; +use boundless_market::sdk::client::ClientError::{self, *}; use boundless_market::sdk::client::{self, Client}; use boundless_market::storage::{ storage_provider_from_env, BuiltinStorageProvider, BuiltinStorageProviderError, @@ -32,7 +34,7 @@ use reqwest::Client as HttpClient; use risc0_zkvm::sha::{Digest, Digestible}; use risc0_zkvm::{ compute_image_id, default_executor, stark_to_snark, ExecutorEnv, ExecutorImpl, Groth16Receipt, - InnerReceipt, Journal, Receipt, + InnerReceipt, Journal, MaybePruned, Receipt, ReceiptClaim, }; use sov_db::ledger_db::{LedgerDB, ProvingServiceLedgerOps}; use sov_risc0_adapter::guest::Risc0Guest; @@ -71,11 +73,11 @@ enum BoundlessRequest { request_id: U256, check_interval: std::time::Duration, timeout: Option, - notify: Sender>, + notify: Sender>, }, Slash { request_id: U256, - notify: Sender<()>, + notify: Sender>, }, } @@ -97,26 +99,25 @@ impl BoundlessClient { match $response.await { Ok(r) => r, Err(e) => { - use ::boundless_market::sdk::client::ClientError::*; + use ::boundless_market::sdk::client::ClientError; match e { - // TODO fix continue loop types - StorageProviderError(s) => { - warn!(%s, "Boundless Storage Provider Error"); - std::thread::sleep(Duration::from_secs(10)); - continue $queue_loop - } - // Should this be a transient error? - MarketError(e) => { + // Match against the ClientError enum variants + ClientError::MarketError(e) => { error!(?e, "Boundless Market Error"); std::thread::sleep(Duration::from_secs(5)); continue $queue_loop } - Error(e) => { + ClientError::StorageProviderError(s) => { + warn!(%s, "Boundless Storage Provider Error"); + std::thread::sleep(Duration::from_secs(10)); + continue $queue_loop + } + ClientError::Error(e) => { error!(?e, "Boundless Error"); std::thread::sleep(Duration::from_secs(5)); continue $queue_loop } - e => { + _ => { error!(?e, "Got unrecoverable error from Boundless"); panic!("Boundless API error: {}", e); } @@ -131,18 +132,18 @@ impl BoundlessClient { 'client: loop { debug!("Boundless client loop"); let client = match Client::from_parts( - requestor_private_key, - rpc_url, + requestor_private_key.clone(), + rpc_url.clone(), proof_market_address, set_verifier_address, ) .await { Ok(client) => client, - Err(client::ClientError::StorageProviderError( - BuiltinStorageProviderError::File(_), - )) - | Err(client::ClientError::StorageProviderError( + Err(ClientError::StorageProviderError(BuiltinStorageProviderError::File( + _, + ))) + | Err(ClientError::StorageProviderError( BuiltinStorageProviderError::NoProvider, )) => { panic!("Failed to create boundless client: no storage provider or temp file storage provider error"); @@ -200,8 +201,11 @@ impl BoundlessClient { } BoundlessRequest::Slash { request_id, notify } => { debug!("Boundless: slash"); - let res = client.proof_market.slash(request_id); - let res = unwrap_boundless_response!(res, 'queue); + let res = client + .proof_market + .slash(request_id) + .await + .map_err(|e| ClientError::MarketError(e)); let _ = notify.send(res); } }; @@ -268,7 +272,7 @@ impl BoundlessClient { } #[instrument(level = "trace", skip_all, ret)] - fn slash(&self, request_id: U256) -> () { + fn slash(&self, request_id: U256) -> Result { let (notify, rx) = mpsc::channel(); self.queue .send(BoundlessRequest::Slash { request_id, notify }) @@ -467,7 +471,8 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { Err(e) => { tracing::error!("Request {} failed: {:?}", request_id, e); // Slash operator and retry - self.client.slash(request_id); + // TODO: Handle error + let _ = self.client.slash(request_id); // TODO: Retry mechanism, maybe a retry trait with: // - max retries // - backoff strategy @@ -478,8 +483,21 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { } }; - // TODO: Convert to proof and submit - Ok(Proof::PublicInput(vec![0u8; 32])) + let claim = ReceiptClaim::ok(self.image_id, journal.clone().to_vec()); + + let inner = InnerReceipt::Groth16(Groth16Receipt::new( + seal.clone().to_vec(), + MaybePruned::Value(claim), + risc0_zkvm::Groth16ReceiptVerifierParameters::default().digest(), + )); + + let full_snark_receipt = Receipt::new(inner, journal.to_vec()); + + tracing::info!("Full snark proof!: {full_snark_receipt:?}"); + + let full_serialized_snark_receipt = bincode::serialize(&full_snark_receipt)?; + + Ok(Proof::Full(full_serialized_snark_receipt)) } } From 0e86369d369d825822e2aeb9e59fa8c4a0154657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Mon, 14 Oct 2024 16:49:58 +0300 Subject: [PATCH 04/11] Update prover timeout and min price per million cycle --- crates/risc0-boundless/src/host.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index a2e55ac00..1d065a097 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -438,7 +438,7 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { // `with_max_price` methods to set the price directly. // TODO: Work on pricing .with_min_price_per_mcycle( - U96::from::(parse_ether("0.001")?.try_into()?), + U96::from::(parse_ether("0.0001")?.try_into()?), mcycles_count, ) // NOTE: If your offer is not being accepted, try increasing the max price. @@ -450,7 +450,7 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { // unfulfilled in the market before it expires. If a prover locks in // the request and does not fulfill it before the timeout, the prover can be // slashed. - .with_timeout(1000), + .with_timeout(2000), ); // Send the request and wait for it to be completed. let request_id = self.client.submit_request(request); From 2869164f44bc1d45b2a40167516d552e60c01d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Tue, 15 Oct 2024 10:14:58 +0300 Subject: [PATCH 05/11] WIP update bitcoin rollup --- Cargo.lock | 300 +++--------------- Cargo.toml | 11 +- bin/citrea/Cargo.toml | 2 + .../provers/risc0/guest-mock/Cargo.lock | 245 ++++++++++---- bin/citrea/src/rollup/bitcoin.rs | 69 +++- crates/risc0-boundless/Cargo.toml | 2 +- 6 files changed, 312 insertions(+), 317 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14d450827..5fa3548fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,24 +92,6 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -[[package]] -name = "alloy" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f4a4aaae80afd4be443a6aecd92a6b255dcdd000f97996928efb33d8a71e100" -dependencies = [ - "alloy-consensus 0.2.1", - "alloy-core 0.7.7", - "alloy-eips 0.2.1", - "alloy-provider 0.2.1", - "alloy-rpc-client 0.2.1", - "alloy-rpc-types", - "alloy-signer 0.2.1", - "alloy-signer-local 0.2.1", - "alloy-transport 0.2.1", - "alloy-transport-http 0.2.1", -] - [[package]] name = "alloy" version = "0.3.6" @@ -118,16 +100,17 @@ checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" dependencies = [ "alloy-consensus 0.3.6", "alloy-contract 0.3.6", - "alloy-core 0.8.7", + "alloy-core", "alloy-eips 0.3.6", "alloy-genesis 0.3.6", "alloy-network 0.3.6", "alloy-node-bindings", "alloy-provider 0.3.6", "alloy-rpc-client 0.3.6", + "alloy-rpc-types 0.3.6", "alloy-serde 0.3.6", "alloy-signer 0.3.6", - "alloy-signer-local 0.3.6", + "alloy-signer-local", "alloy-transport 0.3.6", "alloy-transport-http 0.3.6", ] @@ -140,7 +123,7 @@ checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" dependencies = [ "alloy-consensus 0.4.2", "alloy-contract 0.4.2", - "alloy-core 0.8.7", + "alloy-core", "alloy-eips 0.4.2", "alloy-genesis 0.4.2", "alloy-network 0.4.2", @@ -214,7 +197,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.7", + "alloy-json-abi", "alloy-network 0.3.6", "alloy-network-primitives 0.3.6", "alloy-primitives 0.8.7", @@ -234,7 +217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.7", + "alloy-json-abi", "alloy-network 0.4.2", "alloy-network-primitives 0.4.2", "alloy-primitives 0.8.7", @@ -247,15 +230,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-core" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529fc6310dc1126c8de51c376cbc59c79c7f662bd742be7dc67055d5421a81b4" -dependencies = [ - "alloy-primitives 0.7.7", -] - [[package]] name = "alloy-core" version = "0.8.7" @@ -263,7 +237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeb750349efda145ca6aada68d0336067f7f364d7d44ef09e2cf000b040c5e99" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.7", + "alloy-json-abi", "alloy-primitives 0.8.7", "alloy-rlp", "alloy-sol-types 0.8.7", @@ -275,9 +249,9 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f95d76a38cae906fd394a5afb0736aaceee5432efe76addfd71048e623e208af" dependencies = [ - "alloy-json-abi 0.8.7", + "alloy-json-abi", "alloy-primitives 0.8.7", - "alloy-sol-type-parser 0.8.7", + "alloy-sol-type-parser", "alloy-sol-types 0.8.7", "const-hex", "itoa", @@ -394,17 +368,6 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-json-abi" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" -dependencies = [ - "alloy-primitives 0.7.7", - "alloy-sol-type-parser 0.7.7", - "serde", -] - [[package]] name = "alloy-json-abi" version = "0.8.7" @@ -412,23 +375,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c66eec1acdd96b39b995b8f5ee5239bc0c871d62c527ae1ac9fd1d7fecd455" dependencies = [ "alloy-primitives 0.8.7", - "alloy-sol-type-parser 0.8.7", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-json-rpc" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e2865c4c3bb4cdad3f0d9ec1ab5c0c657ba69a375651bd35e32fb6c180ccc2" -dependencies = [ - "alloy-primitives 0.7.7", - "alloy-sol-types 0.7.7", + "alloy-sol-type-parser", "serde", "serde_json", - "thiserror", - "tracing", ] [[package]] @@ -459,27 +408,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "alloy-network" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e701fc87ef9a3139154b0b4ccb935b565d27ffd9de020fe541bf2dec5ae4ede" -dependencies = [ - "alloy-consensus 0.2.1", - "alloy-eips 0.2.1", - "alloy-json-rpc 0.2.1", - "alloy-network-primitives 0.2.1", - "alloy-primitives 0.7.7", - "alloy-rpc-types-eth 0.2.1", - "alloy-serde 0.2.1", - "alloy-signer 0.2.1", - "alloy-sol-types 0.7.7", - "async-trait", - "auto_impl", - "futures-utils-wasm", - "thiserror", -] - [[package]] name = "alloy-network" version = "0.3.6" @@ -610,6 +538,7 @@ dependencies = [ "const-hex", "derive_more 1.0.0", "foldhash", + "getrandom 0.2.15", "hashbrown 0.15.0", "hex-literal", "indexmap 2.6.0", @@ -626,38 +555,6 @@ dependencies = [ "tiny-keccak", ] -[[package]] -name = "alloy-provider" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9c0ab10b93de601a6396fc7ff2ea10d3b28c46f079338fa562107ebf9857c8" -dependencies = [ - "alloy-chains", - "alloy-consensus 0.2.1", - "alloy-eips 0.2.1", - "alloy-json-rpc 0.2.1", - "alloy-network 0.2.1", - "alloy-network-primitives 0.2.1", - "alloy-primitives 0.7.7", - "alloy-rpc-client 0.2.1", - "alloy-rpc-types-eth 0.2.1", - "alloy-transport 0.2.1", - "alloy-transport-http 0.2.1", - "async-stream", - "async-trait", - "auto_impl", - "dashmap 5.5.3", - "futures", - "futures-utils-wasm", - "lru", - "pin-project", - "serde", - "serde_json", - "tokio", - "tracing", - "url", -] - [[package]] name = "alloy-provider" version = "0.3.6" @@ -675,13 +572,13 @@ dependencies = [ "alloy-rpc-client 0.3.6", "alloy-rpc-types-anvil 0.3.6", "alloy-rpc-types-eth 0.3.6", - "alloy-signer-local 0.3.6", + "alloy-signer-local", "alloy-transport 0.3.6", "alloy-transport-http 0.3.6", "async-stream", "async-trait", "auto_impl", - "dashmap 6.0.1", + "dashmap", "futures", "futures-utils-wasm", "lru", @@ -715,7 +612,7 @@ dependencies = [ "async-stream", "async-trait", "auto_impl", - "dashmap 6.0.1", + "dashmap", "futures", "futures-utils-wasm", "lru", @@ -751,27 +648,6 @@ dependencies = [ "syn 2.0.72", ] -[[package]] -name = "alloy-rpc-client" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b38e3ffdb285df5d9f60cb988d336d9b8e3505acb78750c3bc60336a7af41d3" -dependencies = [ - "alloy-json-rpc 0.2.1", - "alloy-transport 0.2.1", - "alloy-transport-http 0.2.1", - "futures", - "hyper-util", - "pin-project", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower 0.4.13", - "tracing", - "url", -] - [[package]] name = "alloy-rpc-client" version = "0.3.6" @@ -828,6 +704,17 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-rpc-types" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" +dependencies = [ + "alloy-rpc-types-eth 0.3.6", + "alloy-serde 0.3.6", + "serde", +] + [[package]] name = "alloy-rpc-types-admin" version = "0.2.1" @@ -1027,20 +914,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-signer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740a25b92e849ed7b0fa013951fe2f64be9af1ad5abe805037b44fb7770c5c47" -dependencies = [ - "alloy-primitives 0.7.7", - "async-trait", - "auto_impl", - "elliptic-curve 0.13.8", - "k256", - "thiserror", -] - [[package]] name = "alloy-signer" version = "0.3.6" @@ -1069,22 +942,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-signer-local" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b0707d4f63e4356a110b30ef3add8732ab6d181dd7be4607bf79b8777105cee" -dependencies = [ - "alloy-consensus 0.2.1", - "alloy-network 0.2.1", - "alloy-primitives 0.7.7", - "alloy-signer 0.2.1", - "async-trait", - "k256", - "rand 0.8.5", - "thiserror", -] - [[package]] name = "alloy-signer-local" version = "0.3.6" @@ -1135,7 +992,6 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" dependencies = [ - "alloy-json-abi 0.7.7", "alloy-sol-macro-input 0.7.7", "const-hex", "heck 0.5.0", @@ -1154,7 +1010,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ecbabb8fc3d75a0c2cea5215be22e7a267e3efde835b0f2a8922f5e3f5d47683" dependencies = [ - "alloy-json-abi 0.8.7", + "alloy-json-abi", "alloy-sol-macro-input 0.8.7", "const-hex", "heck 0.5.0", @@ -1173,13 +1029,11 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" dependencies = [ - "alloy-json-abi 0.7.7", "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", - "serde_json", "syn 2.0.72", "syn-solidity 0.7.7", ] @@ -1190,7 +1044,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16517f2af03064485150d89746b8ffdcdbc9b6eeb3d536fb66efd7c2846fbc75" dependencies = [ - "alloy-json-abi 0.8.7", + "alloy-json-abi", "const-hex", "dunce", "heck 0.5.0", @@ -1201,16 +1055,6 @@ dependencies = [ "syn-solidity 0.8.7", ] -[[package]] -name = "alloy-sol-type-parser" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbcba3ca07cf7975f15d871b721fb18031eec8bce51103907f6dcce00b255d98" -dependencies = [ - "serde", - "winnow 0.6.13", -] - [[package]] name = "alloy-sol-type-parser" version = "0.8.7" @@ -1227,7 +1071,6 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" dependencies = [ - "alloy-json-abi 0.7.7", "alloy-primitives 0.7.7", "alloy-sol-macro 0.7.7", "const-hex", @@ -1240,32 +1083,13 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e448d879903624863f608c552d10efb0e0905ddbee98b0049412799911eb062" dependencies = [ - "alloy-json-abi 0.8.7", + "alloy-json-abi", "alloy-primitives 0.8.7", "alloy-sol-macro 0.8.7", "const-hex", "serde", ] -[[package]] -name = "alloy-transport" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0590afbdacf2f8cca49d025a2466f3b6584a016a8b28f532f29f8da1007bae" -dependencies = [ - "alloy-json-rpc 0.2.1", - "base64 0.22.1", - "futures-util", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower 0.4.13", - "tracing", - "url", -] - [[package]] name = "alloy-transport" version = "0.3.6" @@ -1304,23 +1128,6 @@ dependencies = [ "url", ] -[[package]] -name = "alloy-transport-http" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2437d145d80ea1aecde8574d2058cceb8b3c9cba05f6aea8e67907c660d46698" -dependencies = [ - "alloy-json-rpc 0.2.1", - "alloy-transport 0.2.1", - "http-body-util", - "hyper 1.4.1", - "hyper-util", - "serde_json", - "tower 0.4.13", - "tracing", - "url", -] - [[package]] name = "alloy-transport-http" version = "0.3.6" @@ -1329,6 +1136,9 @@ checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" dependencies = [ "alloy-json-rpc 0.3.6", "alloy-transport 0.3.6", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "reqwest 0.12.5", "serde_json", "tower 0.5.1", @@ -2796,10 +2606,10 @@ dependencies = [ name = "citrea" version = "0.5.0-rc.1" dependencies = [ - "alloy 0.2.1", - "alloy-primitives 0.7.7", + "alloy 0.3.6", + "alloy-primitives 0.8.7", "alloy-rlp", - "alloy-sol-types 0.7.7", + "alloy-sol-types 0.8.7", "anyhow", "async-trait", "bincode", @@ -2814,6 +2624,7 @@ dependencies = [ "citrea-primitives", "citrea-prover", "citrea-risc0-bonsai-adapter", + "citrea-risc0-boundless-adapter", "citrea-sequencer", "citrea-stf", "clap", @@ -2852,6 +2663,7 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber 0.3.18", + "url", ] [[package]] @@ -2909,12 +2721,12 @@ dependencies = [ name = "citrea-evm" version = "0.5.0-rc.1" dependencies = [ - "alloy 0.2.1", - "alloy-consensus 0.2.1", - "alloy-eips 0.2.1", - "alloy-primitives 0.7.7", + "alloy 0.3.6", + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-primitives 0.8.7", "alloy-rlp", - "alloy-sol-types 0.7.7", + "alloy-sol-types 0.8.7", "anyhow", "bcs", "borsh", @@ -2994,7 +2806,7 @@ dependencies = [ name = "citrea-primitives" version = "0.5.0-rc.1" dependencies = [ - "alloy-eips 0.2.1", + "alloy-eips 0.3.6", "anyhow", "reth-primitives", "serde", @@ -3116,7 +2928,7 @@ name = "citrea-sequencer" version = "0.5.0-rc.1" dependencies = [ "alloy-rlp", - "alloy-sol-types 0.7.7", + "alloy-sol-types 0.8.7", "anyhow", "async-trait", "backoff", @@ -3586,19 +3398,6 @@ dependencies = [ "syn 2.0.72", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "dashmap" version = "6.0.1" @@ -7257,7 +7056,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a dependencies = [ "bitflags 2.6.0", "byteorder", - "dashmap 6.0.1", + "dashmap", "derive_more 0.99.17", "indexmap 2.6.0", "parking_lot", @@ -7446,7 +7245,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a dependencies = [ "alloy-rpc-types-engine", "auto_impl", - "dashmap 6.0.1", + "dashmap", "itertools 0.13.0", "metrics", "parking_lot", @@ -7567,7 +7366,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-primitives 0.7.7", - "alloy-rpc-types", + "alloy-rpc-types 0.2.1", "alloy-rpc-types-admin", "alloy-rpc-types-anvil 0.2.1", "alloy-rpc-types-beacon", @@ -7585,7 +7384,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-rlp", - "alloy-rpc-types", + "alloy-rpc-types 0.2.1", "reth-primitives", "reth-rpc-types", "reth-trie-common", @@ -7803,7 +7602,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54a785dafff303a335980e317669c4e9800cdd5dd2830c6880c3247022761e88" dependencies = [ "alloy-primitives 0.7.7", - "alloy-rpc-types", + "alloy-rpc-types 0.2.1", "alloy-sol-types 0.7.7", "anstyle", "colorchoice", @@ -8326,6 +8125,9 @@ name = "rustc-hash" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +dependencies = [ + "rand 0.8.5", +] [[package]] name = "rustc-hex" diff --git a/Cargo.toml b/Cargo.toml index 6d919d5e4..3286c08c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -119,6 +119,7 @@ schemars = { version = "0.8.16", features = ["derive"] } tempfile = "3.8" tokio = { version = "1.39", features = ["full"] } tokio-util = { version = "0.7.12", features = ["rt"] } +url = { version = "2.5" } num_cpus = "1.0" # Risc0 dependencies @@ -154,11 +155,11 @@ revm = { version = "12.1", features = ["serde"], default-features = false } revm-primitives = { version = "8", default-features = false } alloy-trie = { version = "0.3.8", default-features = false } alloy-rlp = { version = "0.3.8", default-features = false } -alloy-primitives = { version = "0.7.7", default-features = false } -alloy-sol-types = { version = "0.7.7", default-features = false, features = ["json"] } -alloy = { version = "0.2.1", default-features = false } -alloy-eips = { version = "0.2.1", default-features = false } -alloy-consensus = { version = "0.2.1", default-features = false } +alloy-primitives = { version = "0.8", default-features = false } +alloy-sol-types = { version = "0.8", default-features = false, features = ["json"] } +alloy = { version = "0.3", default-features = false } +alloy-eips = { version = "0.3", default-features = false } +alloy-consensus = { version = "0.3", default-features = false } ed25519-dalek = { version = "2", default-features = false, features = ["serde", "fast"] } secp256k1 = { version = "0.29.0", default-features = false, features = ["global-context", "recovery"] } diff --git a/bin/citrea/Cargo.toml b/bin/citrea/Cargo.toml index 7959bcd4a..007d1e7bb 100644 --- a/bin/citrea/Cargo.toml +++ b/bin/citrea/Cargo.toml @@ -20,6 +20,7 @@ citrea-primitives = { path = "../../crates/primitives" } citrea-prover = { path = "../../crates/prover" } citrea-risc0 = { package = "risc0", path = "./provers/risc0" } citrea-risc0-bonsai-adapter = { path = "../../crates/risc0-bonsai", features = ["native"] } +citrea-risc0-boundless-adapter = { path = "../../crates/risc0-boundless", features = ["native"] } citrea-sequencer = { path = "../../crates/sequencer" } citrea-stf = { path = "../../crates/citrea-stf", features = ["native"] } ethereum-rpc = { path = "../../crates/ethereum-rpc" } @@ -76,6 +77,7 @@ serde_json = { workspace = true } sha2 = { workspace = true } tempfile = { workspace = true } tokio = { workspace = true } +url = { workspace = true } revm = { workspace = true } diff --git a/bin/citrea/provers/risc0/guest-mock/Cargo.lock b/bin/citrea/provers/risc0/guest-mock/Cargo.lock index aafe8e6c2..b475ef48c 100644 --- a/bin/citrea/provers/risc0/guest-mock/Cargo.lock +++ b/bin/citrea/provers/risc0/guest-mock/Cargo.lock @@ -37,20 +37,51 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04c309895995eaa4bfcc345f5515a39c7df9447798645cc8bf462b6c5bf1dc96" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", "alloy-serde", "serde", ] +[[package]] +name = "alloy-consensus" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-primitives 0.8.8", + "alloy-rlp", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives 0.8.8", + "alloy-rlp", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives 0.8.8", + "alloy-rlp", +] + [[package]] name = "alloy-eips" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9431c99a3b3fe606ede4b3d4043bdfbcb780c45b8d8d226c3804e2b75cfbe68" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", "alloy-serde", "c-kzg", @@ -60,24 +91,37 @@ dependencies = [ "sha2", ] +[[package]] +name = "alloy-eips" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives 0.8.8", + "alloy-rlp", + "sha2", +] + [[package]] name = "alloy-genesis" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79614dfe86144328da11098edcc7bc1a3f25ad8d3134a9eb9e857e06f0d9840d" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-serde", "serde", ] [[package]] name = "alloy-json-abi" -version = "0.7.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" +checksum = "d46eb5871592c216d39192499c95a99f7175cb94104f88c307e6dc960676d9f1" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.8", "alloy-sol-type-parser", "serde", ] @@ -92,7 +136,7 @@ dependencies = [ "bytes", "cfg-if", "const-hex", - "derive_more", + "derive_more 0.99.17", "getrandom", "hex-literal", "itoa", @@ -105,6 +149,30 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-primitives" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f35429a652765189c1c5092870d8360ee7b7769b09b06d89ebaefd34676446" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 1.0.0", + "getrandom", + "hashbrown 0.15.0", + "hex-literal", + "indexmap", + "itoa", + "paste", + "rand", + "ruint", + "rustc-hash", + "serde", + "tiny-keccak", +] + [[package]] name = "alloy-rlp" version = "0.3.5" @@ -133,20 +201,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33feda6a53e6079895aed1d08dcb98a1377b000d80d16370fbbdb8155d547ef" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "serde", "serde_json", ] [[package]] name = "alloy-sol-macro" -version = "0.7.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" +checksum = "3b2395336745358cc47207442127c47c63801a7065ecc0aa928da844f8bb5576" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.66", @@ -154,16 +222,16 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.7.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" +checksum = "9ed5047c9a241df94327879c2b0729155b58b941eae7805a7ada2e19436e6b39" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck", "indexmap", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.66", @@ -173,9 +241,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" +checksum = "5dee02a81f529c415082235129f0df8b8e60aa1601b9c9298ffe54d75f57210b" dependencies = [ "alloy-json-abi", "const-hex", @@ -190,9 +258,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.7.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbcba3ca07cf7975f15d871b721fb18031eec8bce51103907f6dcce00b255d98" +checksum = "f631f0bd9a9d79619b27c91b6b1ab2c4ef4e606a65192369a1ee05d40dcf81cc" dependencies = [ "serde", "winnow 0.6.13", @@ -200,12 +268,12 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.7.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +checksum = "c2841af22d99e2c0f82a78fe107b6481be3dd20b89bfb067290092794734343a" dependencies = [ "alloy-json-abi", - "alloy-primitives", + "alloy-primitives 0.8.8", "alloy-sol-macro", "const-hex", ] @@ -216,9 +284,9 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03704f265cbbb943b117ecb5055fd46e8f41e7dc8a58b1aed20bcd40ace38c15" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", - "derive_more", + "derive_more 0.99.17", "hashbrown 0.14.5", "nybbles", "serde", @@ -766,9 +834,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" name = "citrea-evm" version = "0.5.0-rc.1" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-primitives 0.8.8", "alloy-sol-types", "anyhow", "borsh", @@ -786,7 +854,7 @@ dependencies = [ name = "citrea-primitives" version = "0.5.0-rc.1" dependencies = [ - "alloy-eips", + "alloy-eips 0.3.6", "anyhow", "reth-primitives", "sov-rollup-interface", @@ -1017,6 +1085,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "unicode-xid", +] + [[package]] name = "digest" version = "0.9.0" @@ -1202,6 +1291,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.5.0" @@ -1294,6 +1389,16 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "foldhash", + "serde", +] + [[package]] name = "heck" version = "0.5.0" @@ -1371,12 +1476,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", + "serde", ] [[package]] @@ -1831,7 +1937,6 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", "version_check", ] @@ -1846,6 +1951,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "proc-macro2" version = "1.0.85" @@ -1928,6 +2055,7 @@ dependencies = [ "libc", "rand_chacha", "rand_core", + "serde", ] [[package]] @@ -1989,10 +2117,10 @@ name = "reth-codecs" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", "alloy-genesis", - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-trie", "bytes", "modular-bitfield", @@ -2017,7 +2145,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-chains", - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", "auto_impl", "crc", @@ -2033,12 +2161,12 @@ name = "reth-primitives" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-eips", + "alloy-eips 0.2.1", "alloy-genesis", - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", "bytes", - "derive_more", + "derive_more 0.99.17", "k256", "once_cell", "rayon", @@ -2055,14 +2183,14 @@ name = "reth-primitives-traits" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", "alloy-genesis", - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", "byteorder", "bytes", - "derive_more", + "derive_more 0.99.17", "modular-bitfield", "reth-codecs", "revm-primitives", @@ -2075,8 +2203,8 @@ name = "reth-static-file-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives", - "derive_more", + "alloy-primitives 0.7.7", + "derive_more 0.99.17", "serde", "strum", ] @@ -2086,13 +2214,13 @@ name = "reth-trie-common" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.2.1", "alloy-genesis", - "alloy-primitives", + "alloy-primitives 0.7.7", "alloy-rlp", "alloy-trie", "bytes", - "derive_more", + "derive_more 0.99.17", "itertools 0.13.0", "nybbles", "reth-codecs", @@ -2147,8 +2275,8 @@ version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc4311037ee093ec50ec734e1424fcb3e12d535c6cef683b75d1c064639630c" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "auto_impl", "bitflags 2.6.0", "bitvec", @@ -2393,6 +2521,9 @@ name = "rustc-hash" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +dependencies = [ + "rand", +] [[package]] name = "rustc-hex" @@ -2698,7 +2829,7 @@ dependencies = [ "anyhow", "bech32", "borsh", - "derive_more", + "derive_more 0.99.17", "ed25519-dalek", "hex", "jmt", @@ -2718,7 +2849,7 @@ dependencies = [ "anyhow", "bech32", "borsh", - "derive_more", + "derive_more 0.99.17", "digest 0.10.7", "hex", "jmt", @@ -2930,9 +3061,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" +checksum = "ebfc1bfd06acc78f16d8fd3ef846bc222ee7002468d10a7dce8d703d6eab89a3" dependencies = [ "paste", "proc-macro2", @@ -3129,6 +3260,12 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unsafe-libyaml" version = "0.2.11" diff --git a/bin/citrea/src/rollup/bitcoin.rs b/bin/citrea/src/rollup/bitcoin.rs index 63555ba81..3dee1a59b 100644 --- a/bin/citrea/src/rollup/bitcoin.rs +++ b/bin/citrea/src/rollup/bitcoin.rs @@ -1,6 +1,9 @@ use std::collections::HashMap; +use std::str::FromStr; use std::sync::Arc; +use alloy::primitives::Address as AlloyAddress; +use alloy::signers::local::PrivateKeySigner; use async_trait::async_trait; use bitcoin_da::service::{BitcoinService, BitcoinServiceConfig, TxidWrapper}; use bitcoin_da::spec::{BitcoinSpec, RollupParams}; @@ -9,11 +12,13 @@ use citrea_common::rpc::register_healthcheck_rpc; use citrea_common::{FullNodeConfig, ProverConfig}; use citrea_primitives::{REVEAL_BATCH_PROOF_PREFIX, REVEAL_LIGHT_CLIENT_PREFIX}; use citrea_prover::prover_service::ParallelProverService; -use citrea_risc0_bonsai_adapter::host::Risc0BonsaiHost; -use citrea_risc0_bonsai_adapter::Digest; +// use citrea_risc0_bonsai_adapter::host::Risc0BonsaiHost; +// use citrea_risc0_bonsai_adapter::Digest; +use citrea_risc0_boundless_adapter::host::Risc0BoundlessHost; +use citrea_risc0_boundless_adapter::Digest; use citrea_stf::genesis_config::StorageConfig; use citrea_stf::runtime::Runtime; -use sov_db::ledger_db::LedgerDB; +use sov_db::ledger_db::{self, LedgerDB}; use sov_modules_api::default_context::{DefaultContext, ZkDefaultContext}; use sov_modules_api::{Address, Spec}; use sov_modules_rollup_blueprint::RollupBlueprint; @@ -27,6 +32,7 @@ use sov_state::{DefaultStorageSpec, Storage, ZkStorage}; use tokio::sync::broadcast; use tokio::sync::mpsc::unbounded_channel; use tracing::instrument; +use url::Url; use crate::CitreaRollupBlueprint; @@ -40,7 +46,7 @@ impl RollupBlueprint for BitcoinRollup { type DaService = BitcoinService; type DaSpec = BitcoinSpec; type DaConfig = BitcoinServiceConfig; - type Vm = Risc0BonsaiHost<'static>; + type Vm = Risc0BoundlessHost<'static>; type ZkContext = ZkDefaultContext; type NativeContext = DefaultContext; @@ -153,6 +159,40 @@ impl RollupBlueprint for BitcoinRollup { Ok(service) } + // // Bonsai + // #[instrument(level = "trace", skip_all)] + // async fn create_prover_service( + // &self, + // prover_config: ProverConfig, + // _rollup_config: &FullNodeConfig, + // _da_service: &Arc, + // ledger_db: LedgerDB, + // ) -> Self::ProverService { + // let vm = Risc0BonsaiHost::new( + // citrea_risc0::BITCOIN_DA_ELF, + // std::env::var("BONSAI_API_URL").unwrap_or("".to_string()), + // std::env::var("BONSAI_API_KEY").unwrap_or("".to_string()), + // ledger_db.clone(), + // ); + // let zk_stf = StfBlueprint::new(); + // let zk_storage = ZkStorage::new(); + + // let da_verifier = BitcoinVerifier::new(RollupParams { + // reveal_light_client_prefix: REVEAL_LIGHT_CLIENT_PREFIX.to_vec(), + // reveal_batch_prover_prefix: REVEAL_BATCH_PROOF_PREFIX.to_vec(), + // }); + + // ParallelProverService::new_with_default_workers( + // vm, + // zk_stf, + // da_verifier, + // prover_config, + // zk_storage, + // ledger_db, + // ) + // .expect("Should be able to instantiate prover service") + // } + #[instrument(level = "trace", skip_all)] async fn create_prover_service( &self, @@ -161,12 +201,20 @@ impl RollupBlueprint for BitcoinRollup { _da_service: &Arc, ledger_db: LedgerDB, ) -> Self::ProverService { - let vm = Risc0BonsaiHost::new( + let requestor_private_key: String = std::env::var("REQUESTOR_PRIVATE_KEY") + .expect("REQUESTOR_PRIVATE_KEY not set") + .parse() + .expect("Invalid REQUESTOR_PRIVATE_KEY"); + let pk = PrivateKeySigner::from_str(&requestor_private_key).unwrap(); + let vm = Risc0BoundlessHost::new( citrea_risc0::BITCOIN_DA_ELF, - std::env::var("BONSAI_API_URL").unwrap_or("".to_string()), - std::env::var("BONSAI_API_KEY").unwrap_or("".to_string()), ledger_db.clone(), - ); + pk, + Url::parse("https://sepolia.drpc.org").unwrap(), + AlloyAddress::from_str("0xb3e579794B6ce24bC7233713289790d9bBEB656c").unwrap(), + AlloyAddress::from_str("0x6860e6cC6E4705309b3e946947706b4a346422DB").unwrap(), + ) + .await; let zk_stf = StfBlueprint::new(); let zk_storage = ZkStorage::new(); @@ -186,3 +234,8 @@ impl RollupBlueprint for BitcoinRollup { .expect("Should be able to instantiate prover service") } } + +#[test] +fn test_a() { + Address::from_str("0xb3e579794B6ce24bC7233713289790d9bBEB656c").unwrap(); +} diff --git a/crates/risc0-boundless/Cargo.toml b/crates/risc0-boundless/Cargo.toml index f5e6e6b97..360207f8d 100644 --- a/crates/risc0-boundless/Cargo.toml +++ b/crates/risc0-boundless/Cargo.toml @@ -31,7 +31,7 @@ sov-risc0-adapter = { path = "../sovereign-sdk/adapters/risc0", optional = true sov-rollup-interface = { path = "../sovereign-sdk/rollup-interface" } tokio = { workspace = true } tracing = { workspace = true } -url = "2.5" +url = { workspace = true } # # boundless monorepo dependencies. # aggregation-set = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } From f0b51a620368c12f5c0105abac10320d4082e3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Fri, 18 Oct 2024 11:14:40 +0300 Subject: [PATCH 06/11] Remove unused imports and types --- crates/risc0-boundless/src/host.rs | 38 ++++-------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index 1d065a097..d21d88745 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -5,36 +5,21 @@ use std::sync::Arc; use std::thread; use std::time::Duration; -use alloy::network::Ethereum; -use alloy::primitives::aliases::{U192, U96}; +use alloy::primitives::aliases::U96; use alloy::primitives::utils::parse_ether; use alloy::primitives::{Address, Bytes, U256}; -use alloy::providers::fillers::{ - BlobGasFiller, ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller, WalletFiller, -}; -use alloy::providers::network::EthereumWallet; -use alloy::providers::{Identity, Provider, ProviderBuilder, RootProvider}; -use alloy::signers::k256::ecdsa::SigningKey; -use alloy::signers::local::{LocalSigner, PrivateKeySigner}; -use alloy::transports::http::Http; -use alloy::transports::Transport; +use alloy::signers::local::PrivateKeySigner; use anyhow::anyhow; -use backoff::exponential::ExponentialBackoffBuilder; -use backoff::{retry as retry_backoff, SystemClock}; use borsh::{BorshDeserialize, BorshSerialize}; use boundless_market::contracts::proof_market::MarketError; use boundless_market::contracts::{Input, Offer, Predicate, ProvingRequest, Requirements}; use boundless_market::sdk::client::ClientError::{self, *}; use boundless_market::sdk::client::{self, Client}; -use boundless_market::storage::{ - storage_provider_from_env, BuiltinStorageProvider, BuiltinStorageProviderError, - StorageProvider, TempFileStorageProviderError, -}; -use reqwest::Client as HttpClient; +use boundless_market::storage::{BuiltinStorageProviderError, StorageProvider}; use risc0_zkvm::sha::{Digest, Digestible}; use risc0_zkvm::{ - compute_image_id, default_executor, stark_to_snark, ExecutorEnv, ExecutorImpl, Groth16Receipt, - InnerReceipt, Journal, MaybePruned, Receipt, ReceiptClaim, + compute_image_id, default_executor, ExecutorEnv, ExecutorImpl, Groth16Receipt, InnerReceipt, + Journal, MaybePruned, Receipt, ReceiptClaim, }; use sov_db::ledger_db::{LedgerDB, ProvingServiceLedgerOps}; use sov_risc0_adapter::guest::Risc0Guest; @@ -42,19 +27,6 @@ use sov_rollup_interface::zk::{Proof, Zkvm, ZkvmHost}; use tracing::{debug, error, info, instrument, trace, warn}; use url::Url; -type ProviderWallet = FillProvider< - JoinFill< - JoinFill< - Identity, - JoinFill>>, - >, - WalletFiller, - >, - RootProvider>, - Http, - Ethereum, ->; - #[derive(Clone)] enum BoundlessRequest { UploadImg { From 3283d99c0afec36dc37ac2fbc53e0f03375d0cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Fri, 18 Oct 2024 12:36:45 +0300 Subject: [PATCH 07/11] Update dependencies only in boundless crate --- Cargo.lock | 307 ++++++++++++++---- Cargo.toml | 12 +- bin/citrea/Cargo.toml | 5 +- .../provers/risc0/guest-mock/Cargo.lock | 233 +++---------- bin/citrea/src/rollup/bitcoin.rs | 18 +- crates/risc0-boundless/Cargo.toml | 1 + crates/risc0-boundless/src/host.rs | 64 ++-- 7 files changed, 346 insertions(+), 294 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5fa3548fb..dee13347c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,6 +92,24 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "alloy" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4a4aaae80afd4be443a6aecd92a6b255dcdd000f97996928efb33d8a71e100" +dependencies = [ + "alloy-consensus 0.2.1", + "alloy-core 0.7.7", + "alloy-eips 0.2.1", + "alloy-provider 0.2.1", + "alloy-rpc-client 0.2.1", + "alloy-rpc-types", + "alloy-signer 0.2.1", + "alloy-signer-local 0.2.1", + "alloy-transport 0.2.1", + "alloy-transport-http 0.2.1", +] + [[package]] name = "alloy" version = "0.3.6" @@ -100,17 +118,16 @@ checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" dependencies = [ "alloy-consensus 0.3.6", "alloy-contract 0.3.6", - "alloy-core", + "alloy-core 0.8.7", "alloy-eips 0.3.6", "alloy-genesis 0.3.6", "alloy-network 0.3.6", "alloy-node-bindings", "alloy-provider 0.3.6", "alloy-rpc-client 0.3.6", - "alloy-rpc-types 0.3.6", "alloy-serde 0.3.6", "alloy-signer 0.3.6", - "alloy-signer-local", + "alloy-signer-local 0.3.6", "alloy-transport 0.3.6", "alloy-transport-http 0.3.6", ] @@ -123,7 +140,7 @@ checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" dependencies = [ "alloy-consensus 0.4.2", "alloy-contract 0.4.2", - "alloy-core", + "alloy-core 0.8.7", "alloy-eips 0.4.2", "alloy-genesis 0.4.2", "alloy-network 0.4.2", @@ -197,7 +214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi", + "alloy-json-abi 0.8.7", "alloy-network 0.3.6", "alloy-network-primitives 0.3.6", "alloy-primitives 0.8.7", @@ -217,7 +234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi", + "alloy-json-abi 0.8.7", "alloy-network 0.4.2", "alloy-network-primitives 0.4.2", "alloy-primitives 0.8.7", @@ -230,6 +247,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-core" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "529fc6310dc1126c8de51c376cbc59c79c7f662bd742be7dc67055d5421a81b4" +dependencies = [ + "alloy-primitives 0.7.7", +] + [[package]] name = "alloy-core" version = "0.8.7" @@ -237,7 +263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeb750349efda145ca6aada68d0336067f7f364d7d44ef09e2cf000b040c5e99" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi", + "alloy-json-abi 0.8.7", "alloy-primitives 0.8.7", "alloy-rlp", "alloy-sol-types 0.8.7", @@ -249,9 +275,9 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f95d76a38cae906fd394a5afb0736aaceee5432efe76addfd71048e623e208af" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.8.7", "alloy-primitives 0.8.7", - "alloy-sol-type-parser", + "alloy-sol-type-parser 0.8.7", "alloy-sol-types 0.8.7", "const-hex", "itoa", @@ -368,6 +394,17 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-json-abi" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", + "serde", +] + [[package]] name = "alloy-json-abi" version = "0.8.7" @@ -375,9 +412,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c66eec1acdd96b39b995b8f5ee5239bc0c871d62c527ae1ac9fd1d7fecd455" dependencies = [ "alloy-primitives 0.8.7", - "alloy-sol-type-parser", + "alloy-sol-type-parser 0.8.7", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e2865c4c3bb4cdad3f0d9ec1ab5c0c657ba69a375651bd35e32fb6c180ccc2" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-sol-types 0.7.7", "serde", "serde_json", + "thiserror", + "tracing", ] [[package]] @@ -408,6 +459,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-network" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e701fc87ef9a3139154b0b4ccb935b565d27ffd9de020fe541bf2dec5ae4ede" +dependencies = [ + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-json-rpc 0.2.1", + "alloy-network-primitives 0.2.1", + "alloy-primitives 0.7.7", + "alloy-rpc-types-eth 0.2.1", + "alloy-serde 0.2.1", + "alloy-signer 0.2.1", + "alloy-sol-types 0.7.7", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + [[package]] name = "alloy-network" version = "0.3.6" @@ -538,7 +610,6 @@ dependencies = [ "const-hex", "derive_more 1.0.0", "foldhash", - "getrandom 0.2.15", "hashbrown 0.15.0", "hex-literal", "indexmap 2.6.0", @@ -555,6 +626,38 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-provider" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9c0ab10b93de601a6396fc7ff2ea10d3b28c46f079338fa562107ebf9857c8" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-json-rpc 0.2.1", + "alloy-network 0.2.1", + "alloy-network-primitives 0.2.1", + "alloy-primitives 0.7.7", + "alloy-rpc-client 0.2.1", + "alloy-rpc-types-eth 0.2.1", + "alloy-transport 0.2.1", + "alloy-transport-http 0.2.1", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 5.5.3", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "serde", + "serde_json", + "tokio", + "tracing", + "url", +] + [[package]] name = "alloy-provider" version = "0.3.6" @@ -572,13 +675,13 @@ dependencies = [ "alloy-rpc-client 0.3.6", "alloy-rpc-types-anvil 0.3.6", "alloy-rpc-types-eth 0.3.6", - "alloy-signer-local", + "alloy-signer-local 0.3.6", "alloy-transport 0.3.6", "alloy-transport-http 0.3.6", "async-stream", "async-trait", "auto_impl", - "dashmap", + "dashmap 6.0.1", "futures", "futures-utils-wasm", "lru", @@ -612,7 +715,7 @@ dependencies = [ "async-stream", "async-trait", "auto_impl", - "dashmap", + "dashmap 6.0.1", "futures", "futures-utils-wasm", "lru", @@ -648,6 +751,27 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "alloy-rpc-client" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b38e3ffdb285df5d9f60cb988d336d9b8e3505acb78750c3bc60336a7af41d3" +dependencies = [ + "alloy-json-rpc 0.2.1", + "alloy-transport 0.2.1", + "alloy-transport-http 0.2.1", + "futures", + "hyper-util", + "pin-project", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-rpc-client" version = "0.3.6" @@ -704,17 +828,6 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-rpc-types" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" -dependencies = [ - "alloy-rpc-types-eth 0.3.6", - "alloy-serde 0.3.6", - "serde", -] - [[package]] name = "alloy-rpc-types-admin" version = "0.2.1" @@ -914,6 +1027,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-signer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740a25b92e849ed7b0fa013951fe2f64be9af1ad5abe805037b44fb7770c5c47" +dependencies = [ + "alloy-primitives 0.7.7", + "async-trait", + "auto_impl", + "elliptic-curve 0.13.8", + "k256", + "thiserror", +] + [[package]] name = "alloy-signer" version = "0.3.6" @@ -942,6 +1069,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-signer-local" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b0707d4f63e4356a110b30ef3add8732ab6d181dd7be4607bf79b8777105cee" +dependencies = [ + "alloy-consensus 0.2.1", + "alloy-network 0.2.1", + "alloy-primitives 0.7.7", + "alloy-signer 0.2.1", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + [[package]] name = "alloy-signer-local" version = "0.3.6" @@ -992,6 +1135,7 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" dependencies = [ + "alloy-json-abi 0.7.7", "alloy-sol-macro-input 0.7.7", "const-hex", "heck 0.5.0", @@ -1010,7 +1154,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ecbabb8fc3d75a0c2cea5215be22e7a267e3efde835b0f2a8922f5e3f5d47683" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.8.7", "alloy-sol-macro-input 0.8.7", "const-hex", "heck 0.5.0", @@ -1029,11 +1173,13 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" dependencies = [ + "alloy-json-abi 0.7.7", "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", + "serde_json", "syn 2.0.72", "syn-solidity 0.7.7", ] @@ -1044,7 +1190,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16517f2af03064485150d89746b8ffdcdbc9b6eeb3d536fb66efd7c2846fbc75" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.8.7", "const-hex", "dunce", "heck 0.5.0", @@ -1055,6 +1201,16 @@ dependencies = [ "syn-solidity 0.8.7", ] +[[package]] +name = "alloy-sol-type-parser" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbcba3ca07cf7975f15d871b721fb18031eec8bce51103907f6dcce00b255d98" +dependencies = [ + "serde", + "winnow 0.6.13", +] + [[package]] name = "alloy-sol-type-parser" version = "0.8.7" @@ -1071,6 +1227,7 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" dependencies = [ + "alloy-json-abi 0.7.7", "alloy-primitives 0.7.7", "alloy-sol-macro 0.7.7", "const-hex", @@ -1083,13 +1240,32 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e448d879903624863f608c552d10efb0e0905ddbee98b0049412799911eb062" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.8.7", "alloy-primitives 0.8.7", "alloy-sol-macro 0.8.7", "const-hex", "serde", ] +[[package]] +name = "alloy-transport" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d0590afbdacf2f8cca49d025a2466f3b6584a016a8b28f532f29f8da1007bae" +dependencies = [ + "alloy-json-rpc 0.2.1", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-transport" version = "0.3.6" @@ -1128,6 +1304,23 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-transport-http" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2437d145d80ea1aecde8574d2058cceb8b3c9cba05f6aea8e67907c660d46698" +dependencies = [ + "alloy-json-rpc 0.2.1", + "alloy-transport 0.2.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "serde_json", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-transport-http" version = "0.3.6" @@ -1136,9 +1329,6 @@ checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" dependencies = [ "alloy-json-rpc 0.3.6", "alloy-transport 0.3.6", - "http-body-util", - "hyper 1.4.1", - "hyper-util", "reqwest 0.12.5", "serde_json", "tower 0.5.1", @@ -2606,10 +2796,10 @@ dependencies = [ name = "citrea" version = "0.5.0-rc.1" dependencies = [ - "alloy 0.3.6", - "alloy-primitives 0.8.7", + "alloy 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.7.7", "anyhow", "async-trait", "bincode", @@ -2721,12 +2911,12 @@ dependencies = [ name = "citrea-evm" version = "0.5.0-rc.1" dependencies = [ - "alloy 0.3.6", - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-primitives 0.8.7", + "alloy 0.2.1", + "alloy-consensus 0.2.1", + "alloy-eips 0.2.1", + "alloy-primitives 0.7.7", "alloy-rlp", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.7.7", "anyhow", "bcs", "borsh", @@ -2806,7 +2996,7 @@ dependencies = [ name = "citrea-primitives" version = "0.5.0-rc.1" dependencies = [ - "alloy-eips 0.3.6", + "alloy-eips 0.2.1", "anyhow", "reth-primitives", "serde", @@ -2900,6 +3090,7 @@ name = "citrea-risc0-boundless-adapter" version = "0.5.0-rc.1" dependencies = [ "alloy 0.3.6", + "alloy-primitives 0.8.7", "anyhow", "backoff", "bincode", @@ -2928,7 +3119,7 @@ name = "citrea-sequencer" version = "0.5.0-rc.1" dependencies = [ "alloy-rlp", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.7.7", "anyhow", "async-trait", "backoff", @@ -3398,6 +3589,19 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "dashmap" version = "6.0.1" @@ -7056,7 +7260,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a dependencies = [ "bitflags 2.6.0", "byteorder", - "dashmap", + "dashmap 6.0.1", "derive_more 0.99.17", "indexmap 2.6.0", "parking_lot", @@ -7245,7 +7449,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a dependencies = [ "alloy-rpc-types-engine", "auto_impl", - "dashmap", + "dashmap 6.0.1", "itertools 0.13.0", "metrics", "parking_lot", @@ -7366,7 +7570,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-primitives 0.7.7", - "alloy-rpc-types 0.2.1", + "alloy-rpc-types", "alloy-rpc-types-admin", "alloy-rpc-types-anvil 0.2.1", "alloy-rpc-types-beacon", @@ -7384,7 +7588,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-rlp", - "alloy-rpc-types 0.2.1", + "alloy-rpc-types", "reth-primitives", "reth-rpc-types", "reth-trie-common", @@ -7602,7 +7806,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54a785dafff303a335980e317669c4e9800cdd5dd2830c6880c3247022761e88" dependencies = [ "alloy-primitives 0.7.7", - "alloy-rpc-types 0.2.1", + "alloy-rpc-types", "alloy-sol-types 0.7.7", "anstyle", "colorchoice", @@ -8125,9 +8329,6 @@ name = "rustc-hash" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" -dependencies = [ - "rand 0.8.5", -] [[package]] name = "rustc-hex" @@ -9350,7 +9551,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "tower 0.5.1", + "tower 0.4.13", "tracing", ] @@ -9957,16 +10158,10 @@ checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ "futures-core", "futures-util", - "hdrhistogram", - "indexmap 2.6.0", "pin-project-lite", - "slab", "sync_wrapper 0.1.2", - "tokio", - "tokio-util", "tower-layer", "tower-service", - "tracing", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3286c08c2..80d3bb97b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -155,17 +155,17 @@ revm = { version = "12.1", features = ["serde"], default-features = false } revm-primitives = { version = "8", default-features = false } alloy-trie = { version = "0.3.8", default-features = false } alloy-rlp = { version = "0.3.8", default-features = false } -alloy-primitives = { version = "0.8", default-features = false } -alloy-sol-types = { version = "0.8", default-features = false, features = ["json"] } -alloy = { version = "0.3", default-features = false } -alloy-eips = { version = "0.3", default-features = false } -alloy-consensus = { version = "0.3", default-features = false } +alloy-primitives = { version = "0.7.7", default-features = false } +alloy-sol-types = { version = "0.7.7", default-features = false, features = ["json"] } +alloy = { version = "0.2.1", default-features = false } +alloy-eips = { version = "0.2.1", default-features = false } +alloy-consensus = { version = "0.2.1", default-features = false } ed25519-dalek = { version = "2", default-features = false, features = ["serde", "fast"] } secp256k1 = { version = "0.29.0", default-features = false, features = ["global-context", "recovery"] } tower-http = { version = "0.5.0", features = ["full"] } -tower = { version = "0.5.1", features = ["full"] } +tower = { version = "0.4.13", features = ["full"] } hyper = { version = "1.4.0" } [patch.'https://github.com/eigerco/celestia-node-rs.git'] diff --git a/bin/citrea/Cargo.toml b/bin/citrea/Cargo.toml index 007d1e7bb..924eb51f3 100644 --- a/bin/citrea/Cargo.toml +++ b/bin/citrea/Cargo.toml @@ -40,6 +40,7 @@ sov-state = { path = "../../crates/sovereign-sdk/module-system/sov-state", featu sov-stf-runner = { path = "../../crates/sovereign-sdk/full-node/sov-stf-runner", features = ["native"] } # 3rd-party deps +alloy = { workspace = true, features = ["hyper", "consensus", "rpc-types-eth", "provider-http", "signers", "signer-local"] } alloy-primitives = { workspace = true } alloy-sol-types = { workspace = true } anyhow = { workspace = true } @@ -58,6 +59,7 @@ serde_json = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +url = { workspace = true } [dev-dependencies] citrea-evm = { path = "../../crates/evm", features = ["native"] } @@ -65,7 +67,7 @@ sov-mock-da = { path = "../../crates/sovereign-sdk/adapters/mock-da", default-fe sov-prover-storage-manager = { path = "../../crates/sovereign-sdk/full-node/sov-prover-storage-manager", features = ["test-utils"] } sov-rollup-interface = { path = "../../crates/sovereign-sdk/rollup-interface", features = ["fuzzing"] } -alloy = { workspace = true, features = ["hyper", "consensus", "rpc-types-eth", "provider-http", "signers", "signer-local"] } +# alloy = { workspace = true, features = ["hyper", "consensus", "rpc-types-eth", "provider-http", "signers", "signer-local"] } alloy-rlp = { workspace = true } bincode = { workspace = true } borsh = { workspace = true } @@ -77,7 +79,6 @@ serde_json = { workspace = true } sha2 = { workspace = true } tempfile = { workspace = true } tokio = { workspace = true } -url = { workspace = true } revm = { workspace = true } diff --git a/bin/citrea/provers/risc0/guest-mock/Cargo.lock b/bin/citrea/provers/risc0/guest-mock/Cargo.lock index b475ef48c..97655fcdb 100644 --- a/bin/citrea/provers/risc0/guest-mock/Cargo.lock +++ b/bin/citrea/provers/risc0/guest-mock/Cargo.lock @@ -37,51 +37,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04c309895995eaa4bfcc345f5515a39c7df9447798645cc8bf462b6c5bf1dc96" dependencies = [ - "alloy-eips 0.2.1", - "alloy-primitives 0.7.7", + "alloy-eips", + "alloy-primitives", "alloy-rlp", "alloy-serde", "serde", ] -[[package]] -name = "alloy-consensus" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" -dependencies = [ - "alloy-eips 0.3.6", - "alloy-primitives 0.8.8", - "alloy-rlp", -] - -[[package]] -name = "alloy-eip2930" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" -dependencies = [ - "alloy-primitives 0.8.8", - "alloy-rlp", -] - -[[package]] -name = "alloy-eip7702" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" -dependencies = [ - "alloy-primitives 0.8.8", - "alloy-rlp", -] - [[package]] name = "alloy-eips" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9431c99a3b3fe606ede4b3d4043bdfbcb780c45b8d8d226c3804e2b75cfbe68" dependencies = [ - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-rlp", "alloy-serde", "c-kzg", @@ -91,37 +60,24 @@ dependencies = [ "sha2", ] -[[package]] -name = "alloy-eips" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives 0.8.8", - "alloy-rlp", - "sha2", -] - [[package]] name = "alloy-genesis" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79614dfe86144328da11098edcc7bc1a3f25ad8d3134a9eb9e857e06f0d9840d" dependencies = [ - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-serde", "serde", ] [[package]] name = "alloy-json-abi" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d46eb5871592c216d39192499c95a99f7175cb94104f88c307e6dc960676d9f1" +checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" dependencies = [ - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-sol-type-parser", "serde", ] @@ -136,7 +92,7 @@ dependencies = [ "bytes", "cfg-if", "const-hex", - "derive_more 0.99.17", + "derive_more", "getrandom", "hex-literal", "itoa", @@ -149,30 +105,6 @@ dependencies = [ "tiny-keccak", ] -[[package]] -name = "alloy-primitives" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f35429a652765189c1c5092870d8360ee7b7769b09b06d89ebaefd34676446" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if", - "const-hex", - "derive_more 1.0.0", - "getrandom", - "hashbrown 0.15.0", - "hex-literal", - "indexmap", - "itoa", - "paste", - "rand", - "ruint", - "rustc-hash", - "serde", - "tiny-keccak", -] - [[package]] name = "alloy-rlp" version = "0.3.5" @@ -201,20 +133,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33feda6a53e6079895aed1d08dcb98a1377b000d80d16370fbbdb8155d547ef" dependencies = [ - "alloy-primitives 0.7.7", + "alloy-primitives", "serde", "serde_json", ] [[package]] name = "alloy-sol-macro" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2395336745358cc47207442127c47c63801a7065ecc0aa928da844f8bb5576" +checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", - "proc-macro-error2", + "proc-macro-error", "proc-macro2", "quote", "syn 2.0.66", @@ -222,16 +154,16 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed5047c9a241df94327879c2b0729155b58b941eae7805a7ada2e19436e6b39" +checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck", "indexmap", - "proc-macro-error2", + "proc-macro-error", "proc-macro2", "quote", "syn 2.0.66", @@ -241,9 +173,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dee02a81f529c415082235129f0df8b8e60aa1601b9c9298ffe54d75f57210b" +checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" dependencies = [ "alloy-json-abi", "const-hex", @@ -258,9 +190,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f631f0bd9a9d79619b27c91b6b1ab2c4ef4e606a65192369a1ee05d40dcf81cc" +checksum = "cbcba3ca07cf7975f15d871b721fb18031eec8bce51103907f6dcce00b255d98" dependencies = [ "serde", "winnow 0.6.13", @@ -268,12 +200,12 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2841af22d99e2c0f82a78fe107b6481be3dd20b89bfb067290092794734343a" +checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" dependencies = [ "alloy-json-abi", - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-sol-macro", "const-hex", ] @@ -284,9 +216,9 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03704f265cbbb943b117ecb5055fd46e8f41e7dc8a58b1aed20bcd40ace38c15" dependencies = [ - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-rlp", - "derive_more 0.99.17", + "derive_more", "hashbrown 0.14.5", "nybbles", "serde", @@ -834,9 +766,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" name = "citrea-evm" version = "0.5.0-rc.1" dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-primitives 0.8.8", + "alloy-consensus", + "alloy-eips", + "alloy-primitives", "alloy-sol-types", "anyhow", "borsh", @@ -854,7 +786,7 @@ dependencies = [ name = "citrea-primitives" version = "0.5.0-rc.1" dependencies = [ - "alloy-eips 0.3.6", + "alloy-eips", "anyhow", "reth-primitives", "sov-rollup-interface", @@ -1085,27 +1017,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", - "unicode-xid", -] - [[package]] name = "digest" version = "0.9.0" @@ -1291,12 +1202,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" - [[package]] name = "foreign-types" version = "0.5.0" @@ -1394,10 +1299,6 @@ name = "hashbrown" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" -dependencies = [ - "foldhash", - "serde", -] [[package]] name = "heck" @@ -1482,7 +1383,6 @@ checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown 0.15.0", - "serde", ] [[package]] @@ -1937,6 +1837,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", + "syn 1.0.109", "version_check", ] @@ -1951,28 +1852,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "proc-macro2" version = "1.0.85" @@ -2055,7 +1934,6 @@ dependencies = [ "libc", "rand_chacha", "rand_core", - "serde", ] [[package]] @@ -2117,10 +1995,10 @@ name = "reth-codecs" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus 0.2.1", - "alloy-eips 0.2.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-trie", "bytes", "modular-bitfield", @@ -2145,7 +2023,7 @@ version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ "alloy-chains", - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-rlp", "auto_impl", "crc", @@ -2161,12 +2039,12 @@ name = "reth-primitives" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-eips 0.2.1", + "alloy-eips", "alloy-genesis", - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-rlp", "bytes", - "derive_more 0.99.17", + "derive_more", "k256", "once_cell", "rayon", @@ -2183,14 +2061,14 @@ name = "reth-primitives-traits" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus 0.2.1", - "alloy-eips 0.2.1", + "alloy-consensus", + "alloy-eips", "alloy-genesis", - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-rlp", "byteorder", "bytes", - "derive_more 0.99.17", + "derive_more", "modular-bitfield", "reth-codecs", "revm-primitives", @@ -2203,8 +2081,8 @@ name = "reth-static-file-types" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-primitives 0.7.7", - "derive_more 0.99.17", + "alloy-primitives", + "derive_more", "serde", "strum", ] @@ -2214,13 +2092,13 @@ name = "reth-trie-common" version = "1.0.4" source = "git+https://github.com/paradigmxyz/reth?rev=a206eb3690e5a51d3c797fed2a6ed722e36863eb#a206eb3690e5a51d3c797fed2a6ed722e36863eb" dependencies = [ - "alloy-consensus 0.2.1", + "alloy-consensus", "alloy-genesis", - "alloy-primitives 0.7.7", + "alloy-primitives", "alloy-rlp", "alloy-trie", "bytes", - "derive_more 0.99.17", + "derive_more", "itertools 0.13.0", "nybbles", "reth-codecs", @@ -2275,8 +2153,8 @@ version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc4311037ee093ec50ec734e1424fcb3e12d535c6cef683b75d1c064639630c" dependencies = [ - "alloy-eips 0.2.1", - "alloy-primitives 0.7.7", + "alloy-eips", + "alloy-primitives", "auto_impl", "bitflags 2.6.0", "bitvec", @@ -2521,9 +2399,6 @@ name = "rustc-hash" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" -dependencies = [ - "rand", -] [[package]] name = "rustc-hex" @@ -2829,7 +2704,7 @@ dependencies = [ "anyhow", "bech32", "borsh", - "derive_more 0.99.17", + "derive_more", "ed25519-dalek", "hex", "jmt", @@ -2849,7 +2724,7 @@ dependencies = [ "anyhow", "bech32", "borsh", - "derive_more 0.99.17", + "derive_more", "digest 0.10.7", "hex", "jmt", @@ -3061,9 +2936,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfc1bfd06acc78f16d8fd3ef846bc222ee7002468d10a7dce8d703d6eab89a3" +checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" dependencies = [ "paste", "proc-macro2", @@ -3260,12 +3135,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - [[package]] name = "unsafe-libyaml" version = "0.2.11" diff --git a/bin/citrea/src/rollup/bitcoin.rs b/bin/citrea/src/rollup/bitcoin.rs index 3dee1a59b..a7bc199cd 100644 --- a/bin/citrea/src/rollup/bitcoin.rs +++ b/bin/citrea/src/rollup/bitcoin.rs @@ -1,9 +1,6 @@ use std::collections::HashMap; -use std::str::FromStr; use std::sync::Arc; -use alloy::primitives::Address as AlloyAddress; -use alloy::signers::local::PrivateKeySigner; use async_trait::async_trait; use bitcoin_da::service::{BitcoinService, BitcoinServiceConfig, TxidWrapper}; use bitcoin_da::spec::{BitcoinSpec, RollupParams}; @@ -18,7 +15,7 @@ use citrea_risc0_boundless_adapter::host::Risc0BoundlessHost; use citrea_risc0_boundless_adapter::Digest; use citrea_stf::genesis_config::StorageConfig; use citrea_stf::runtime::Runtime; -use sov_db::ledger_db::{self, LedgerDB}; +use sov_db::ledger_db::LedgerDB; use sov_modules_api::default_context::{DefaultContext, ZkDefaultContext}; use sov_modules_api::{Address, Spec}; use sov_modules_rollup_blueprint::RollupBlueprint; @@ -205,14 +202,14 @@ impl RollupBlueprint for BitcoinRollup { .expect("REQUESTOR_PRIVATE_KEY not set") .parse() .expect("Invalid REQUESTOR_PRIVATE_KEY"); - let pk = PrivateKeySigner::from_str(&requestor_private_key).unwrap(); + let vm = Risc0BoundlessHost::new( citrea_risc0::BITCOIN_DA_ELF, ledger_db.clone(), - pk, + requestor_private_key, Url::parse("https://sepolia.drpc.org").unwrap(), - AlloyAddress::from_str("0xb3e579794B6ce24bC7233713289790d9bBEB656c").unwrap(), - AlloyAddress::from_str("0x6860e6cC6E4705309b3e946947706b4a346422DB").unwrap(), + "0xb3e579794B6ce24bC7233713289790d9bBEB656c".to_string(), + "0x6860e6cC6E4705309b3e946947706b4a346422DB".to_string(), ) .await; let zk_stf = StfBlueprint::new(); @@ -234,8 +231,3 @@ impl RollupBlueprint for BitcoinRollup { .expect("Should be able to instantiate prover service") } } - -#[test] -fn test_a() { - Address::from_str("0xb3e579794B6ce24bC7233713289790d9bBEB656c").unwrap(); -} diff --git a/crates/risc0-boundless/Cargo.toml b/crates/risc0-boundless/Cargo.toml index 360207f8d..a406b05b5 100644 --- a/crates/risc0-boundless/Cargo.toml +++ b/crates/risc0-boundless/Cargo.toml @@ -11,6 +11,7 @@ description = "An adapter allowing Citrea to connect with Risc0 Boundless Prover [dependencies] alloy = { version = "0.3" } +alloy-primitives = { version = "0.8.7" } anyhow = { workspace = true } backoff = { workspace = true } bincode = { workspace = true } diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index d21d88745..90eafb760 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -1,29 +1,29 @@ //! This module implements the [`ZkvmHost`] trait for the RISC0 VM. use core::panic; +use std::str::FromStr; use std::sync::mpsc::{self, Sender}; use std::sync::Arc; -use std::thread; -use std::time::Duration; -use alloy::primitives::aliases::U96; -use alloy::primitives::utils::parse_ether; -use alloy::primitives::{Address, Bytes, U256}; +use alloy::hex::FromHex; use alloy::signers::local::PrivateKeySigner; +use alloy_primitives::aliases::U96; +use alloy_primitives::utils::parse_ether; +use alloy_primitives::{Address, Bytes, U256}; use anyhow::anyhow; use borsh::{BorshDeserialize, BorshSerialize}; -use boundless_market::contracts::proof_market::MarketError; use boundless_market::contracts::{Input, Offer, Predicate, ProvingRequest, Requirements}; -use boundless_market::sdk::client::ClientError::{self, *}; +use boundless_market::sdk::client::ClientError::{self}; use boundless_market::sdk::client::{self, Client}; -use boundless_market::storage::{BuiltinStorageProviderError, StorageProvider}; +use boundless_market::storage::BuiltinStorageProviderError; use risc0_zkvm::sha::{Digest, Digestible}; use risc0_zkvm::{ compute_image_id, default_executor, ExecutorEnv, ExecutorImpl, Groth16Receipt, InnerReceipt, Journal, MaybePruned, Receipt, ReceiptClaim, }; -use sov_db::ledger_db::{LedgerDB, ProvingServiceLedgerOps}; +use sov_db::ledger_db::LedgerDB; use sov_risc0_adapter::guest::Risc0Guest; use sov_rollup_interface::zk::{Proof, Zkvm, ZkvmHost}; +use tokio::time::{sleep, Duration}; use tracing::{debug, error, info, instrument, trace, warn}; use url::Url; @@ -76,17 +76,17 @@ impl BoundlessClient { // Match against the ClientError enum variants ClientError::MarketError(e) => { error!(?e, "Boundless Market Error"); - std::thread::sleep(Duration::from_secs(5)); + sleep(Duration::from_secs(5)).await; continue $queue_loop } ClientError::StorageProviderError(s) => { warn!(%s, "Boundless Storage Provider Error"); - std::thread::sleep(Duration::from_secs(10)); + sleep(Duration::from_secs(10)).await; continue $queue_loop } ClientError::Error(e) => { error!(?e, "Boundless Error"); - std::thread::sleep(Duration::from_secs(5)); + sleep(Duration::from_secs(5)).await; continue $queue_loop } _ => { @@ -177,7 +177,7 @@ impl BoundlessClient { .proof_market .slash(request_id) .await - .map_err(|e| ClientError::MarketError(e)); + .map_err(ClientError::MarketError); let _ = notify.send(res); } }; @@ -272,24 +272,23 @@ impl<'a> Risc0BoundlessHost<'a> { pub async fn new( elf: &'a [u8], ledger_db: LedgerDB, - requestor_private_key: PrivateKeySigner, + requestor_private_key: String, rpc_url: Url, - proof_market_address: Address, - set_verifier_address: Address, + proof_market_address: String, + set_verifier_address: String, ) -> Self { - /// Creates a storage provider based on the environment variables. - /// - /// If the environment variable `RISC0_DEV_MODE` is set, a temporary file storage provider is used. - /// Otherwise, the following environment variables are checked in order: - /// - `PINATA_JWT`, `PINATA_API_URL`, `IPFS_GATEWAY_URL`: Pinata storage provider; - /// - `S3_ACCESS`, `S3_SECRET`, `S3_BUCKET`, `S3_URL`, `AWS_REGION`: S3 storage provider. - let client = BoundlessClient::from_parts( - requestor_private_key, - rpc_url, - proof_market_address, - set_verifier_address, - ) - .await; + // Creates a storage provider based on the environment variables. + // + // If the environment variable `RISC0_DEV_MODE` is set, a temporary file storage provider is used. + // Otherwise, the following environment variables are checked in order: + // - `PINATA_JWT`, `PINATA_API_URL`, `IPFS_GATEWAY_URL`: Pinata storage provider; + // - `S3_ACCESS`, `S3_SECRET`, `S3_BUCKET`, `S3_URL`, `AWS_REGION`: S3 storage provider. + let proof_market_address = Address::from_hex(proof_market_address).unwrap(); + let set_verifier_address = Address::from_hex(set_verifier_address).unwrap(); + let pk = PrivateKeySigner::from_str(&requestor_private_key).unwrap(); + let client = + BoundlessClient::from_parts(pk, rpc_url, proof_market_address, set_verifier_address) + .await; let image_id = compute_image_id(elf).unwrap(); @@ -396,7 +395,7 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { // request is not fulfilled before the timeout, the prover can be slashed. let request = ProvingRequest::default() .with_image_url(&self.image_url) - .with_input(Input::url(&input_url)) + .with_input(Input::url(input_url)) .with_requirements(Requirements::new( self.image_id, Predicate::digest_match(journal.digest()), @@ -525,8 +524,3 @@ impl<'host> Zkvm for Risc0BoundlessHost<'host> { )?) } } - -#[test] -fn test_a() { - assert!(true) -} From afd1ccd76ee6ac9ad304d98bc01ca1409d2ea9c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Fri, 18 Oct 2024 15:17:27 +0300 Subject: [PATCH 08/11] Update tower for boundless crate --- Cargo.lock | 200 +++++++++++++++-------------- Cargo.toml | 2 +- bin/citrea/tests/e2e/mod.rs | 4 +- crates/risc0-boundless/src/host.rs | 9 ++ 4 files changed, 115 insertions(+), 100 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dee13347c..f2b784d99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,8 +39,8 @@ name = "aggregation-set" version = "0.1.0" source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" dependencies = [ - "alloy-primitives 0.8.7", - "alloy-sol-types 0.8.7", + "alloy-primitives 0.8.8", + "alloy-sol-types 0.8.8", "anyhow", "guest-aggregation-set", "hex", @@ -118,7 +118,7 @@ checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" dependencies = [ "alloy-consensus 0.3.6", "alloy-contract 0.3.6", - "alloy-core 0.8.7", + "alloy-core 0.8.8", "alloy-eips 0.3.6", "alloy-genesis 0.3.6", "alloy-network 0.3.6", @@ -140,7 +140,7 @@ checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" dependencies = [ "alloy-consensus 0.4.2", "alloy-contract 0.4.2", - "alloy-core 0.8.7", + "alloy-core 0.8.8", "alloy-eips 0.4.2", "alloy-genesis 0.4.2", "alloy-network 0.4.2", @@ -184,7 +184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" dependencies = [ "alloy-eips 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "alloy-serde 0.3.6", "c-kzg", @@ -198,7 +198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" dependencies = [ "alloy-eips 0.4.2", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "alloy-serde 0.4.2", "auto_impl", @@ -214,13 +214,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.7", + "alloy-json-abi 0.8.8", "alloy-network 0.3.6", "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-provider 0.3.6", "alloy-rpc-types-eth 0.3.6", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.8.8", "alloy-transport 0.3.6", "futures", "futures-util", @@ -234,13 +234,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.7", + "alloy-json-abi 0.8.8", "alloy-network 0.4.2", "alloy-network-primitives 0.4.2", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-provider 0.4.2", "alloy-rpc-types-eth 0.4.2", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.8.8", "alloy-transport 0.4.2", "futures", "futures-util", @@ -258,27 +258,27 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb750349efda145ca6aada68d0336067f7f364d7d44ef09e2cf000b040c5e99" +checksum = "a54c7158ea4a394bef220d82d8fdd412fb9b1ca2d6024db539070b7bc01b6401" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.7", - "alloy-primitives 0.8.7", + "alloy-json-abi 0.8.8", + "alloy-primitives 0.8.8", "alloy-rlp", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.8.8", ] [[package]] name = "alloy-dyn-abi" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95d76a38cae906fd394a5afb0736aaceee5432efe76addfd71048e623e208af" +checksum = "e6228abfc751a29cde117b0879b805a3e0b3b641358f063272c83ca459a56886" dependencies = [ - "alloy-json-abi 0.8.7", - "alloy-primitives 0.8.7", - "alloy-sol-type-parser 0.8.7", - "alloy-sol-types 0.8.7", + "alloy-json-abi 0.8.8", + "alloy-primitives 0.8.8", + "alloy-sol-type-parser 0.8.8", + "alloy-sol-types 0.8.8", "const-hex", "itoa", "serde", @@ -292,7 +292,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "serde", ] @@ -303,7 +303,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "serde", ] @@ -333,7 +333,7 @@ checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "alloy-serde 0.3.6", "c-kzg", @@ -351,7 +351,7 @@ checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "alloy-serde 0.4.2", "c-kzg", @@ -378,7 +378,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-serde 0.3.6", "serde", ] @@ -389,7 +389,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-serde 0.4.2", "serde", ] @@ -407,12 +407,12 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c66eec1acdd96b39b995b8f5ee5239bc0c871d62c527ae1ac9fd1d7fecd455" +checksum = "d46eb5871592c216d39192499c95a99f7175cb94104f88c307e6dc960676d9f1" dependencies = [ - "alloy-primitives 0.8.7", - "alloy-sol-type-parser 0.8.7", + "alloy-primitives 0.8.8", + "alloy-sol-type-parser 0.8.8", "serde", "serde_json", ] @@ -437,8 +437,8 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" dependencies = [ - "alloy-primitives 0.8.7", - "alloy-sol-types 0.8.7", + "alloy-primitives 0.8.8", + "alloy-sol-types 0.8.8", "serde", "serde_json", "thiserror", @@ -451,8 +451,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" dependencies = [ - "alloy-primitives 0.8.7", - "alloy-sol-types 0.8.7", + "alloy-primitives 0.8.8", + "alloy-sol-types 0.8.8", "serde", "serde_json", "thiserror", @@ -490,11 +490,11 @@ dependencies = [ "alloy-eips 0.3.6", "alloy-json-rpc 0.3.6", "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rpc-types-eth 0.3.6", "alloy-serde 0.3.6", "alloy-signer 0.3.6", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.8.8", "async-trait", "auto_impl", "futures-utils-wasm", @@ -511,11 +511,11 @@ dependencies = [ "alloy-eips 0.4.2", "alloy-json-rpc 0.4.2", "alloy-network-primitives 0.4.2", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rpc-types-eth 0.4.2", "alloy-serde 0.4.2", "alloy-signer 0.4.2", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.8.8", "async-trait", "auto_impl", "futures-utils-wasm", @@ -540,7 +540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" dependencies = [ "alloy-eips 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-serde 0.3.6", "serde", ] @@ -553,7 +553,7 @@ checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" dependencies = [ "alloy-consensus 0.4.2", "alloy-eips 0.4.2", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-serde 0.4.2", "serde", ] @@ -565,7 +565,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5988a227293f949525f0a1b3e1ef728d2ef24afa96bad2b7788c6c9617fa3eec" dependencies = [ "alloy-genesis 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "k256", "rand 0.8.5", "serde_json", @@ -600,9 +600,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb848c43f6b06ae3de2e4a67496cbbabd78ae87db0f1248934f15d76192c6a" +checksum = "38f35429a652765189c1c5092870d8360ee7b7769b09b06d89ebaefd34676446" dependencies = [ "alloy-rlp", "bytes", @@ -671,7 +671,7 @@ dependencies = [ "alloy-network 0.3.6", "alloy-network-primitives 0.3.6", "alloy-node-bindings", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rpc-client 0.3.6", "alloy-rpc-types-anvil 0.3.6", "alloy-rpc-types-eth 0.3.6", @@ -707,7 +707,7 @@ dependencies = [ "alloy-json-rpc 0.4.2", "alloy-network 0.4.2", "alloy-network-primitives 0.4.2", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rpc-client 0.4.2", "alloy-rpc-types-eth 0.4.2", "alloy-transport 0.4.2", @@ -800,7 +800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" dependencies = [ "alloy-json-rpc 0.4.2", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-transport 0.4.2", "alloy-transport-http 0.4.2", "futures", @@ -857,7 +857,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25cb45ad7c0930dd62eecf164d2afe4c3d2dd2c82af85680ad1f118e1e5cb83" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-serde 0.3.6", "serde", ] @@ -924,10 +924,10 @@ dependencies = [ "alloy-consensus 0.3.6", "alloy-eips 0.3.6", "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "alloy-serde 0.3.6", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.8.8", "cfg-if", "derive_more 1.0.0", "hashbrown 0.14.5", @@ -945,10 +945,10 @@ dependencies = [ "alloy-consensus 0.4.2", "alloy-eips 0.4.2", "alloy-network-primitives 0.4.2", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-rlp", "alloy-serde 0.4.2", - "alloy-sol-types 0.8.7", + "alloy-sol-types 0.8.8", "derive_more 1.0.0", "itertools 0.13.0", "serde", @@ -1011,7 +1011,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "serde", "serde_json", ] @@ -1022,7 +1022,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "serde", "serde_json", ] @@ -1047,7 +1047,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "async-trait", "auto_impl", "elliptic-curve 0.13.8", @@ -1061,7 +1061,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" dependencies = [ - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "async-trait", "auto_impl", "elliptic-curve 0.13.8", @@ -1093,7 +1093,7 @@ checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" dependencies = [ "alloy-consensus 0.3.6", "alloy-network 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "alloy-signer 0.3.6", "async-trait", "k256", @@ -1117,12 +1117,12 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "661c516eb1fa3294cc7f2fb8955b3b609d639c282ac81a4eedb14d3046db503a" +checksum = "3b2395336745358cc47207442127c47c63801a7065ecc0aa928da844f8bb5576" dependencies = [ - "alloy-sol-macro-expander 0.8.7", - "alloy-sol-macro-input 0.8.7", + "alloy-sol-macro-expander 0.8.8", + "alloy-sol-macro-input 0.8.8", "proc-macro-error2", "proc-macro2", "quote", @@ -1150,12 +1150,12 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecbabb8fc3d75a0c2cea5215be22e7a267e3efde835b0f2a8922f5e3f5d47683" +checksum = "9ed5047c9a241df94327879c2b0729155b58b941eae7805a7ada2e19436e6b39" dependencies = [ - "alloy-json-abi 0.8.7", - "alloy-sol-macro-input 0.8.7", + "alloy-json-abi 0.8.8", + "alloy-sol-macro-input 0.8.8", "const-hex", "heck 0.5.0", "indexmap 2.6.0", @@ -1163,7 +1163,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.72", - "syn-solidity 0.8.7", + "syn-solidity 0.8.8", "tiny-keccak", ] @@ -1186,11 +1186,11 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16517f2af03064485150d89746b8ffdcdbc9b6eeb3d536fb66efd7c2846fbc75" +checksum = "5dee02a81f529c415082235129f0df8b8e60aa1601b9c9298ffe54d75f57210b" dependencies = [ - "alloy-json-abi 0.8.7", + "alloy-json-abi 0.8.8", "const-hex", "dunce", "heck 0.5.0", @@ -1198,7 +1198,7 @@ dependencies = [ "quote", "serde_json", "syn 2.0.72", - "syn-solidity 0.8.7", + "syn-solidity 0.8.8", ] [[package]] @@ -1213,9 +1213,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07ebb0c1674ff8cbb08378d7c2e0e27919d2a2dae07ad3bca26174deda8d389" +checksum = "f631f0bd9a9d79619b27c91b6b1ab2c4ef4e606a65192369a1ee05d40dcf81cc" dependencies = [ "serde", "winnow 0.6.13", @@ -1236,13 +1236,13 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e448d879903624863f608c552d10efb0e0905ddbee98b0049412799911eb062" +checksum = "c2841af22d99e2c0f82a78fe107b6481be3dd20b89bfb067290092794734343a" dependencies = [ - "alloy-json-abi 0.8.7", - "alloy-primitives 0.8.7", - "alloy-sol-macro 0.8.7", + "alloy-json-abi 0.8.8", + "alloy-primitives 0.8.8", + "alloy-sol-macro 0.8.8", "const-hex", "serde", ] @@ -1834,9 +1834,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.54.0" +version = "1.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f2a62020f3e06f9b352b2a23547f6e1d110b6bf1e18a6b588ae36114eaf6e2" +checksum = "8888c238bf93c77c5df8274b3999fd7fc1bb3fb658616f40dfde9e4fcd9efd94" dependencies = [ "ahash", "aws-credential-types", @@ -2540,8 +2540,8 @@ source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec56 dependencies = [ "aggregation-set", "alloy 0.3.6", - "alloy-primitives 0.8.7", - "alloy-sol-types 0.8.7", + "alloy-primitives 0.8.8", + "alloy-sol-types 0.8.8", "anyhow", "async-trait", "aws-sdk-s3", @@ -2714,9 +2714,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.28" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" +checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" dependencies = [ "jobserver", "libc", @@ -3090,7 +3090,7 @@ name = "citrea-risc0-boundless-adapter" version = "0.5.0-rc.1" dependencies = [ "alloy 0.3.6", - "alloy-primitives 0.8.7", + "alloy-primitives 0.8.8", "anyhow", "backoff", "bincode", @@ -5592,9 +5592,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" @@ -6177,9 +6177,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -6209,9 +6209,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -6463,9 +6463,9 @@ checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "portable-atomic-util" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdd8420072e66d54a407b3316991fe946ce3ab1083a7f575b2463866624704d" +checksum = "90a7d5beecc52a491b54d6dd05c7a45ba1801666a5baad9fdbfc6fef8d2d206c" dependencies = [ "portable-atomic", ] @@ -9551,7 +9551,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "tower 0.4.13", + "tower 0.5.1", "tracing", ] @@ -9754,9 +9754,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e7b52ad118b2153644eea95c6fc740b6c1555b2344fdab763fc9de4075f665" +checksum = "ebfc1bfd06acc78f16d8fd3ef846bc222ee7002468d10a7dce8d703d6eab89a3" dependencies = [ "paste", "proc-macro2", @@ -10158,10 +10158,16 @@ checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ "futures-core", "futures-util", + "hdrhistogram", + "indexmap 2.6.0", "pin-project-lite", + "slab", "sync_wrapper 0.1.2", + "tokio", + "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 80d3bb97b..d623ff968 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -165,7 +165,7 @@ ed25519-dalek = { version = "2", default-features = false, features = ["serde", secp256k1 = { version = "0.29.0", default-features = false, features = ["global-context", "recovery"] } tower-http = { version = "0.5.0", features = ["full"] } -tower = { version = "0.4.13", features = ["full"] } +tower = { version = "0.5.1", features = ["full"] } hyper = { version = "1.4.0" } [patch.'https://github.com/eigerco/celestia-node-rs.git'] diff --git a/bin/citrea/tests/e2e/mod.rs b/bin/citrea/tests/e2e/mod.rs index 82a971a87..85e8bfb00 100644 --- a/bin/citrea/tests/e2e/mod.rs +++ b/bin/citrea/tests/e2e/mod.rs @@ -54,7 +54,7 @@ impl Default for TestConfig { #[tokio::test(flavor = "multi_thread")] async fn test_all_flow() { - // citrea::initialize_logging(tracing::Level::DEBUG); + citrea::initialize_logging(tracing::Level::DEBUG); let storage_dir = tempdir_with_children(&["DA", "sequencer", "prover", "full-node"]); let da_db_dir = storage_dir.path().join("DA").to_path_buf(); @@ -91,7 +91,7 @@ async fn test_all_flow() { prover_node_port_tx, GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig { - proving_mode: sov_stf_runner::ProverGuestRunConfig::Execute, + proving_mode: sov_stf_runner::ProverGuestRunConfig::Prove, proof_sampling_number: 0, enable_recovery: true, }), diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index 90eafb760..dd37aed9b 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -524,3 +524,12 @@ impl<'host> Zkvm for Risc0BoundlessHost<'host> { )?) } } + +#[test] +fn test_priv_key() { + let str = ""; + + let pk = PrivateKeySigner::from_str(str).unwrap(); + + println!("{:?}", pk); +} From b6d9951b680b9307d953c2f9ed20b4921225c568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Mon, 21 Oct 2024 15:48:56 +0300 Subject: [PATCH 09/11] Implement working boundless adapter --- bin/citrea/src/rollup/bitcoin.rs | 105 ++++++++++++++-------------- bin/citrea/src/rollup/mock.rs | 41 +++++++++++ bin/citrea/tests/e2e/mod.rs | 2 +- crates/risc0-boundless/src/host.rs | 107 ++++++++++++++++------------- 4 files changed, 157 insertions(+), 98 deletions(-) diff --git a/bin/citrea/src/rollup/bitcoin.rs b/bin/citrea/src/rollup/bitcoin.rs index a7bc199cd..e91b8127c 100644 --- a/bin/citrea/src/rollup/bitcoin.rs +++ b/bin/citrea/src/rollup/bitcoin.rs @@ -9,10 +9,8 @@ use citrea_common::rpc::register_healthcheck_rpc; use citrea_common::{FullNodeConfig, ProverConfig}; use citrea_primitives::{REVEAL_BATCH_PROOF_PREFIX, REVEAL_LIGHT_CLIENT_PREFIX}; use citrea_prover::prover_service::ParallelProverService; -// use citrea_risc0_bonsai_adapter::host::Risc0BonsaiHost; -// use citrea_risc0_bonsai_adapter::Digest; -use citrea_risc0_boundless_adapter::host::Risc0BoundlessHost; -use citrea_risc0_boundless_adapter::Digest; +use citrea_risc0_bonsai_adapter::host::Risc0BonsaiHost; +use citrea_risc0_bonsai_adapter::Digest; use citrea_stf::genesis_config::StorageConfig; use citrea_stf::runtime::Runtime; use sov_db::ledger_db::LedgerDB; @@ -43,7 +41,7 @@ impl RollupBlueprint for BitcoinRollup { type DaService = BitcoinService; type DaSpec = BitcoinSpec; type DaConfig = BitcoinServiceConfig; - type Vm = Risc0BoundlessHost<'static>; + type Vm = Risc0BonsaiHost<'static>; type ZkContext = ZkDefaultContext; type NativeContext = DefaultContext; @@ -156,40 +154,7 @@ impl RollupBlueprint for BitcoinRollup { Ok(service) } - // // Bonsai - // #[instrument(level = "trace", skip_all)] - // async fn create_prover_service( - // &self, - // prover_config: ProverConfig, - // _rollup_config: &FullNodeConfig, - // _da_service: &Arc, - // ledger_db: LedgerDB, - // ) -> Self::ProverService { - // let vm = Risc0BonsaiHost::new( - // citrea_risc0::BITCOIN_DA_ELF, - // std::env::var("BONSAI_API_URL").unwrap_or("".to_string()), - // std::env::var("BONSAI_API_KEY").unwrap_or("".to_string()), - // ledger_db.clone(), - // ); - // let zk_stf = StfBlueprint::new(); - // let zk_storage = ZkStorage::new(); - - // let da_verifier = BitcoinVerifier::new(RollupParams { - // reveal_light_client_prefix: REVEAL_LIGHT_CLIENT_PREFIX.to_vec(), - // reveal_batch_prover_prefix: REVEAL_BATCH_PROOF_PREFIX.to_vec(), - // }); - - // ParallelProverService::new_with_default_workers( - // vm, - // zk_stf, - // da_verifier, - // prover_config, - // zk_storage, - // ledger_db, - // ) - // .expect("Should be able to instantiate prover service") - // } - + // Bonsai #[instrument(level = "trace", skip_all)] async fn create_prover_service( &self, @@ -198,20 +163,12 @@ impl RollupBlueprint for BitcoinRollup { _da_service: &Arc, ledger_db: LedgerDB, ) -> Self::ProverService { - let requestor_private_key: String = std::env::var("REQUESTOR_PRIVATE_KEY") - .expect("REQUESTOR_PRIVATE_KEY not set") - .parse() - .expect("Invalid REQUESTOR_PRIVATE_KEY"); - - let vm = Risc0BoundlessHost::new( + let vm = Risc0BonsaiHost::new( citrea_risc0::BITCOIN_DA_ELF, + std::env::var("BONSAI_API_URL").unwrap_or("".to_string()), + std::env::var("BONSAI_API_KEY").unwrap_or("".to_string()), ledger_db.clone(), - requestor_private_key, - Url::parse("https://sepolia.drpc.org").unwrap(), - "0xb3e579794B6ce24bC7233713289790d9bBEB656c".to_string(), - "0x6860e6cC6E4705309b3e946947706b4a346422DB".to_string(), - ) - .await; + ); let zk_stf = StfBlueprint::new(); let zk_storage = ZkStorage::new(); @@ -230,4 +187,50 @@ impl RollupBlueprint for BitcoinRollup { ) .expect("Should be able to instantiate prover service") } + + // #[instrument(level = "trace", skip_all)] + // async fn create_prover_service( + // &self, + // prover_config: ProverConfig, + // _rollup_config: &FullNodeConfig, + // _da_service: &Arc, + // ledger_db: LedgerDB, + // ) -> Self::ProverService { + // let private_key_str = env::var("private_key").context("private_key not set")?; + // let rpc_url_str = env::var("RPC_URL").context("RPC_URL not set")?; + // let proof_market_address_str = + // env::var("PROOF_MARKET_ADDRESS").context("PROOF_MARKET_ADDRESS not set")?; + // let set_verifier_address_str = + // env::var("SET_VERIFIER_ADDRESS").context("SET_VERIFIER_ADDRESS not set")?; + // // ALSO SET THESE ENV VARIABLES + // // PINATA_JWT + // // PINATA_API_URL + // // IPFS_GATEWAY_URL + // let vm = Risc0BoundlessHost::new( + // citrea_risc0::BITCOIN_DA_ELF, + // ledger_db.clone(), + // private_key_str, + // Url::parse(rpc_url_str).unwrap(), + // proof_market_address_str, + // set_verifier_address_str, + // ) + // .await; + // let zk_stf = StfBlueprint::new(); + // let zk_storage = ZkStorage::new(); + + // let da_verifier = BitcoinVerifier::new(RollupParams { + // reveal_light_client_prefix: REVEAL_LIGHT_CLIENT_PREFIX.to_vec(), + // reveal_batch_prover_prefix: REVEAL_BATCH_PROOF_PREFIX.to_vec(), + // }); + + // ParallelProverService::new_with_default_workers( + // vm, + // zk_stf, + // da_verifier, + // prover_config, + // zk_storage, + // ledger_db, + // ) + // .expect("Should be able to instantiate prover service") + // } } diff --git a/bin/citrea/src/rollup/mock.rs b/bin/citrea/src/rollup/mock.rs index 756ed35de..051408e05 100644 --- a/bin/citrea/src/rollup/mock.rs +++ b/bin/citrea/src/rollup/mock.rs @@ -103,6 +103,47 @@ impl RollupBlueprint for MockDemoRollup { ))) } + // async fn create_prover_service( + // &self, + // prover_config: ProverConfig, + // _rollup_config: &FullNodeConfig, + // _da_service: &Arc, + // ledger_db: LedgerDB, + // ) -> Self::ProverService { + // let private_key_str = env::var("private_key").context("private_key not set")?; + // let rpc_url_str = env::var("RPC_URL").context("RPC_URL not set")?; + // let proof_market_address_str = + // env::var("PROOF_MARKET_ADDRESS").context("PROOF_MARKET_ADDRESS not set")?; + // let set_verifier_address_str = + // env::var("SET_VERIFIER_ADDRESS").context("SET_VERIFIER_ADDRESS not set")?; + // // ALSO SET THESE ENV VARIABLES + // // PINATA_JWT + // // PINATA_API_URL + // // IPFS_GATEWAY_URL + // let vm = Risc0BoundlessHost::new( + // citrea_risc0::MOCK_DA_ELF, + // ledger_db.clone(), + // private_key_str, + // Url::parse(rpc_url_str).unwrap(), + // proof_market_address_str, + // set_verifier_address_str, + // ) + // .await; + // let zk_stf = StfBlueprint::new(); + // let zk_storage = ZkStorage::new(); + + // let da_verifier = Default::default(); + // ParallelProverService::new_with_default_workers( + // vm, + // zk_stf, + // da_verifier, + // prover_config, + // zk_storage, + // ledger_db, + // ) + // .expect("Should be able to instantiate prover service") + // } + async fn create_prover_service( &self, prover_config: ProverConfig, diff --git a/bin/citrea/tests/e2e/mod.rs b/bin/citrea/tests/e2e/mod.rs index 85e8bfb00..1da29ec6a 100644 --- a/bin/citrea/tests/e2e/mod.rs +++ b/bin/citrea/tests/e2e/mod.rs @@ -91,7 +91,7 @@ async fn test_all_flow() { prover_node_port_tx, GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig { - proving_mode: sov_stf_runner::ProverGuestRunConfig::Prove, + proving_mode: sov_stf_runner::ProverGuestRunConfig::Execute, proof_sampling_number: 0, enable_recovery: true, }), diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index dd37aed9b..7016e6169 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -1,7 +1,7 @@ //! This module implements the [`ZkvmHost`] trait for the RISC0 VM. use core::panic; +use std::env; use std::str::FromStr; -use std::sync::mpsc::{self, Sender}; use std::sync::Arc; use alloy::hex::FromHex; @@ -23,39 +23,41 @@ use risc0_zkvm::{ use sov_db::ledger_db::LedgerDB; use sov_risc0_adapter::guest::Risc0Guest; use sov_rollup_interface::zk::{Proof, Zkvm, ZkvmHost}; +use tokio::sync::mpsc::{self, unbounded_channel, UnboundedSender}; use tokio::time::{sleep, Duration}; use tracing::{debug, error, info, instrument, trace, warn}; use url::Url; +// TODO: Remove blocking wrapper once the boundless client has blocking api #[derive(Clone)] enum BoundlessRequest { UploadImg { elf: Vec, - notify: Sender, + notify: UnboundedSender, }, UploadInput { input: Vec, - notify: Sender, + notify: UnboundedSender, }, SubmitReq { proving_request: ProvingRequest, - notify: Sender, + notify: UnboundedSender, }, WaitForReqFulfillment { request_id: U256, check_interval: std::time::Duration, timeout: Option, - notify: Sender>, + notify: UnboundedSender>, }, Slash { request_id: U256, - notify: Sender>, + notify: UnboundedSender>, }, } #[derive(Clone)] struct BoundlessClient { - queue: std::sync::mpsc::Sender, + queue: tokio::sync::mpsc::UnboundedSender, _join_handle: Arc>, } @@ -98,41 +100,27 @@ impl BoundlessClient { } ); } - let (queue, rx) = std::sync::mpsc::channel(); + let (queue, mut rx) = tokio::sync::mpsc::unbounded_channel(); let join_handle = tokio::spawn(async move { let mut last_request: Option = None; 'client: loop { debug!("Boundless client loop"); - let client = match Client::from_parts( + let client = Client::from_parts( requestor_private_key.clone(), rpc_url.clone(), proof_market_address, set_verifier_address, ) .await - { - Ok(client) => client, - Err(ClientError::StorageProviderError(BuiltinStorageProviderError::File( - _, - ))) - | Err(ClientError::StorageProviderError( - BuiltinStorageProviderError::NoProvider, - )) => { - panic!("Failed to create boundless client: no storage provider or temp file storage provider error"); - } - Err(e) => { - error!(?e, "Failed to create boundless client"); - continue 'client; - } - }; + .unwrap(); + 'queue: loop { let request = if let Some(last_request) = last_request.clone() { debug!("Retrying last request after reconnection"); last_request } else { trace!("Waiting for a new request"); - let req: BoundlessRequest = - rx.recv().expect("bonsai client sender is dead"); + let req: BoundlessRequest = rx.recv().await.unwrap(); // Save request for retries last_request = Some(req.clone()); req @@ -196,32 +184,32 @@ impl BoundlessClient { #[instrument(level = "trace", skip(self), ret)] fn upload_img(&self, elf: Vec) -> String { - let (notify, rx) = mpsc::channel(); + let (notify, mut rx) = mpsc::unbounded_channel(); self.queue .send(BoundlessRequest::UploadImg { elf, notify }) - .expect("Bonsai processing queue is dead"); - rx.recv().unwrap() + .unwrap(); + tokio::task::block_in_place(|| rx.blocking_recv().unwrap()) } #[instrument(level = "trace", skip_all, ret)] fn upload_input(&self, input: Vec) -> String { - let (notify, rx) = mpsc::channel(); + let (notify, mut rx) = mpsc::unbounded_channel(); self.queue .send(BoundlessRequest::UploadInput { input, notify }) .expect("Bonsai processing queue is dead"); - rx.recv().unwrap() + tokio::task::block_in_place(|| rx.blocking_recv().unwrap()) } #[instrument(level = "trace", skip_all, ret)] fn submit_request(&self, proving_request: ProvingRequest) -> U256 { - let (notify, rx) = mpsc::channel(); + let (notify, mut rx) = mpsc::unbounded_channel(); self.queue .send(BoundlessRequest::SubmitReq { proving_request, notify, }) .expect("Bonsai processing queue is dead"); - rx.recv().unwrap() + tokio::task::block_in_place(|| rx.blocking_recv().unwrap()) } #[instrument(level = "trace", skip_all, ret)] @@ -231,7 +219,7 @@ impl BoundlessClient { check_interval: std::time::Duration, timeout: Option, ) -> Result<(Bytes, Bytes), client::ClientError> { - let (notify, rx) = mpsc::channel(); + let (notify, mut rx) = mpsc::unbounded_channel(); self.queue .send(BoundlessRequest::WaitForReqFulfillment { request_id, @@ -240,16 +228,15 @@ impl BoundlessClient { notify, }) .expect("Bonsai processing queue is dead"); - rx.recv().unwrap() + tokio::task::block_in_place(|| rx.blocking_recv().unwrap()) } - #[instrument(level = "trace", skip_all, ret)] fn slash(&self, request_id: U256) -> Result { - let (notify, rx) = mpsc::channel(); + let (notify, mut rx) = mpsc::unbounded_channel(); self.queue .send(BoundlessRequest::Slash { request_id, notify }) .expect("Bonsai processing queue is dead"); - rx.recv().unwrap() + tokio::task::block_in_place(|| rx.blocking_recv().unwrap()) } } @@ -290,7 +277,7 @@ impl<'a> Risc0BoundlessHost<'a> { BoundlessClient::from_parts(pk, rpc_url, proof_market_address, set_verifier_address) .await; - let image_id = compute_image_id(elf).unwrap(); + let image_id = compute_image_id(elf).expect("Should have been able to compute image id"); tracing::trace!("Calculated image id: {:?}", image_id.as_words()); @@ -525,11 +512,39 @@ impl<'host> Zkvm for Risc0BoundlessHost<'host> { } } -#[test] -fn test_priv_key() { - let str = ""; - - let pk = PrivateKeySigner::from_str(str).unwrap(); - - println!("{:?}", pk); +#[tokio::test] +async fn test_cli_running() { + let proof_market_address_str = match env::var("PROOF_MARKET_ADDRESS") { + Ok(val) => val, + // If the environment variable is not set, the test will be skipped. + Err(_) => return, + }; + + let private_key_str = env::var("private_key").context("private_key not set")?; + let private_key = + PrivateKeySigner::from_str(&private_key_str).context("Invalid private_key")?; + let rpc_url_str = env::var("RPC_URL").context("RPC_URL not set")?; + let rpc_url = Url::parse(&rpc_url_str).context("Invalid RPC_URL")?; + let proof_market_address_str = + env::var("PROOF_MARKET_ADDRESS").context("PROOF_MARKET_ADDRESS not set")?; + let proof_market_address = + Address::from_str(&proof_market_address_str).context("Invalid PROOF_MARKET_ADDRESS")?; + let set_verifier_address_str = + env::var("SET_VERIFIER_ADDRESS").context("SET_VERIFIER_ADDRESS not set")?; + let set_verifier_address = + Address::from_str(&set_verifier_address_str).context("Invalid SET_VERIFIER_ADDRESS")?; + + // ALSO SET THESE ENV VARIABLES + // PINATA_JWT + // PINATA_API_URL + // IPFS_GATEWAY_URL + + let client = Client::from_parts( + private_key, + rpc_url, + proof_market_address, + set_verifier_address, + ) + .await + .unwrap(); } From c343249f9a91ed59cc901bdb772cf5bb365c7bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Mon, 21 Oct 2024 17:33:26 +0300 Subject: [PATCH 10/11] Lint --- bin/citrea/src/rollup/bitcoin.rs | 1 - crates/risc0-boundless/src/host.rs | 167 ++++++++++++++--------------- 2 files changed, 78 insertions(+), 90 deletions(-) diff --git a/bin/citrea/src/rollup/bitcoin.rs b/bin/citrea/src/rollup/bitcoin.rs index e91b8127c..8067f7d1a 100644 --- a/bin/citrea/src/rollup/bitcoin.rs +++ b/bin/citrea/src/rollup/bitcoin.rs @@ -27,7 +27,6 @@ use sov_state::{DefaultStorageSpec, Storage, ZkStorage}; use tokio::sync::broadcast; use tokio::sync::mpsc::unbounded_channel; use tracing::instrument; -use url::Url; use crate::CitreaRollupBlueprint; diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index 7016e6169..49dbb5cad 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -1,6 +1,5 @@ //! This module implements the [`ZkvmHost`] trait for the RISC0 VM. use core::panic; -use std::env; use std::str::FromStr; use std::sync::Arc; @@ -14,7 +13,6 @@ use borsh::{BorshDeserialize, BorshSerialize}; use boundless_market::contracts::{Input, Offer, Predicate, ProvingRequest, Requirements}; use boundless_market::sdk::client::ClientError::{self}; use boundless_market::sdk::client::{self, Client}; -use boundless_market::storage::BuiltinStorageProviderError; use risc0_zkvm::sha::{Digest, Digestible}; use risc0_zkvm::{ compute_image_id, default_executor, ExecutorEnv, ExecutorImpl, Groth16Receipt, InnerReceipt, @@ -23,7 +21,7 @@ use risc0_zkvm::{ use sov_db::ledger_db::LedgerDB; use sov_risc0_adapter::guest::Risc0Guest; use sov_rollup_interface::zk::{Proof, Zkvm, ZkvmHost}; -use tokio::sync::mpsc::{self, unbounded_channel, UnboundedSender}; +use tokio::sync::mpsc::{self, UnboundedSender}; use tokio::time::{sleep, Duration}; use tracing::{debug, error, info, instrument, trace, warn}; use url::Url; @@ -103,75 +101,73 @@ impl BoundlessClient { let (queue, mut rx) = tokio::sync::mpsc::unbounded_channel(); let join_handle = tokio::spawn(async move { let mut last_request: Option = None; - 'client: loop { - debug!("Boundless client loop"); - let client = Client::from_parts( - requestor_private_key.clone(), - rpc_url.clone(), - proof_market_address, - set_verifier_address, - ) - .await - .unwrap(); + debug!("Boundless client loop"); + let client = Client::from_parts( + requestor_private_key.clone(), + rpc_url.clone(), + proof_market_address, + set_verifier_address, + ) + .await + .unwrap(); - 'queue: loop { - let request = if let Some(last_request) = last_request.clone() { - debug!("Retrying last request after reconnection"); - last_request - } else { - trace!("Waiting for a new request"); - let req: BoundlessRequest = rx.recv().await.unwrap(); - // Save request for retries - last_request = Some(req.clone()); - req - }; - match request { - BoundlessRequest::UploadImg { elf, notify } => { - let res = client.upload_image(&elf); - let res = unwrap_boundless_response!(res, 'queue); - let _ = notify.send(res); - } - BoundlessRequest::UploadInput { input, notify } => { - debug!("Boundless: upload_input"); - let res = client.upload_input(&input); - let res = unwrap_boundless_response!(res, 'queue); - let _ = notify.send(res); - } - BoundlessRequest::SubmitReq { - proving_request, - notify, - } => { - debug!("Boundless: submit_req"); - let res = client.submit_request(&proving_request); - let res = unwrap_boundless_response!(res, 'queue); - let _ = notify.send(res); - } - BoundlessRequest::WaitForReqFulfillment { - request_id, - check_interval, - timeout, - notify, - } => { - debug!("Boundless: wait_for_req_fulfillment"); - let res = client - .wait_for_request_fulfillment(request_id, check_interval, timeout) - .await; - // There is no need to retry this request as this already has a retry mechanism inside - let _ = notify.send(res); - } - BoundlessRequest::Slash { request_id, notify } => { - debug!("Boundless: slash"); - let res = client - .proof_market - .slash(request_id) - .await - .map_err(ClientError::MarketError); - let _ = notify.send(res); - } - }; - // We arrive here only on a successful response - last_request = None; - } + 'queue: loop { + let request = if let Some(last_request) = last_request.clone() { + debug!("Retrying last request after reconnection"); + last_request + } else { + trace!("Waiting for a new request"); + let req: BoundlessRequest = rx.recv().await.unwrap(); + // Save request for retries + last_request = Some(req.clone()); + req + }; + match request { + BoundlessRequest::UploadImg { elf, notify } => { + let res = client.upload_image(&elf); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::UploadInput { input, notify } => { + debug!("Boundless: upload_input"); + let res = client.upload_input(&input); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::SubmitReq { + proving_request, + notify, + } => { + debug!("Boundless: submit_req"); + let res = client.submit_request(&proving_request); + let res = unwrap_boundless_response!(res, 'queue); + let _ = notify.send(res); + } + BoundlessRequest::WaitForReqFulfillment { + request_id, + check_interval, + timeout, + notify, + } => { + debug!("Boundless: wait_for_req_fulfillment"); + let res = client + .wait_for_request_fulfillment(request_id, check_interval, timeout) + .await; + // There is no need to retry this request as this already has a retry mechanism inside + let _ = notify.send(res); + } + BoundlessRequest::Slash { request_id, notify } => { + debug!("Boundless: slash"); + let res = client + .proof_market + .slash(request_id) + .await + .map_err(ClientError::MarketError); + let _ = notify.send(res); + } + }; + // We arrive here only on a successful response + last_request = None; } }); let _join_handle = Arc::new(join_handle); @@ -249,9 +245,7 @@ pub struct Risc0BoundlessHost<'a> { image_url: String, client: BoundlessClient, last_input_url: Option, - ledger_db: LedgerDB, - proof_market_address: Address, - set_verifier_address: Address, + _ledger_db: LedgerDB, } impl<'a> Risc0BoundlessHost<'a> { @@ -291,9 +285,7 @@ impl<'a> Risc0BoundlessHost<'a> { image_url, client, last_input_url: None, - ledger_db, - proof_market_address, - set_verifier_address, + _ledger_db: ledger_db, } } @@ -514,32 +506,29 @@ impl<'host> Zkvm for Risc0BoundlessHost<'host> { #[tokio::test] async fn test_cli_running() { - let proof_market_address_str = match env::var("PROOF_MARKET_ADDRESS") { + let proof_market_address_str = match std::env::var("PROOF_MARKET_ADDRESS") { Ok(val) => val, // If the environment variable is not set, the test will be skipped. Err(_) => return, }; - let private_key_str = env::var("private_key").context("private_key not set")?; - let private_key = - PrivateKeySigner::from_str(&private_key_str).context("Invalid private_key")?; - let rpc_url_str = env::var("RPC_URL").context("RPC_URL not set")?; - let rpc_url = Url::parse(&rpc_url_str).context("Invalid RPC_URL")?; - let proof_market_address_str = - env::var("PROOF_MARKET_ADDRESS").context("PROOF_MARKET_ADDRESS not set")?; + let private_key_str = std::env::var("private_key").expect("private_key not set"); + let private_key = PrivateKeySigner::from_str(&private_key_str).expect("Invalid private_key"); + let rpc_url_str = std::env::var("RPC_URL").expect("RPC_URL not set"); + let rpc_url = Url::parse(&rpc_url_str).expect("Invalid RPC_URL"); let proof_market_address = - Address::from_str(&proof_market_address_str).context("Invalid PROOF_MARKET_ADDRESS")?; + Address::from_str(&proof_market_address_str).expect("Invalid PROOF_MARKET_ADDRESS"); let set_verifier_address_str = - env::var("SET_VERIFIER_ADDRESS").context("SET_VERIFIER_ADDRESS not set")?; + std::env::var("SET_VERIFIER_ADDRESS").expect("SET_VERIFIER_ADDRESS not set"); let set_verifier_address = - Address::from_str(&set_verifier_address_str).context("Invalid SET_VERIFIER_ADDRESS")?; + Address::from_str(&set_verifier_address_str).expect("Invalid SET_VERIFIER_ADDRESS"); // ALSO SET THESE ENV VARIABLES // PINATA_JWT // PINATA_API_URL // IPFS_GATEWAY_URL - let client = Client::from_parts( + let _ = Client::from_parts( private_key, rpc_url, proof_market_address, From 757ba97cbb891d6a54bd97fdc918b884a1cf4676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erce=20Can=20Bekt=C3=BCre?= Date: Thu, 24 Oct 2024 14:20:52 +0300 Subject: [PATCH 11/11] Implement set inclusion receipt verifier --- Cargo.lock | 44 ++++++++++++-------- crates/risc0-boundless/Cargo.toml | 10 +++-- crates/risc0-boundless/src/host.rs | 64 ++++++++++++++++++++++++++++-- 3 files changed, 95 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index da653c2d7..0b1dd4127 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,13 +36,13 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aggregation-set" -version = "0.1.0" -source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +version = "0.2.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?branch=main#14a3c1fcb6a62730ddfced57f0dc8d8edc18cda7" dependencies = [ "alloy-primitives 0.8.9", "alloy-sol-types 0.8.9", "anyhow", - "guest-aggregation-set", + "guest-set-builder", "hex", "risc0-binfmt", "risc0-zkvm", @@ -2521,8 +2521,8 @@ dependencies = [ [[package]] name = "boundless-market" -version = "0.1.0" -source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +version = "0.2.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?branch=main#14a3c1fcb6a62730ddfced57f0dc8d8edc18cda7" dependencies = [ "aggregation-set", "alloy 0.3.6", @@ -2540,9 +2540,8 @@ dependencies = [ "guest-assessor", "guest-util", "hex", - "rand 0.8.5", "reqwest 0.12.5", - "risc0-ethereum-contracts", + "risc0-ethereum-contracts 1.1.4", "risc0-zkvm", "serde", "serde_json", @@ -3072,8 +3071,10 @@ dependencies = [ name = "citrea-risc0-boundless-adapter" version = "0.5.0-rc.1" dependencies = [ + "aggregation-set", "alloy 0.3.6", "alloy-primitives 0.8.9", + "alloy-sol-types 0.8.9", "anyhow", "backoff", "bincode", @@ -3085,6 +3086,7 @@ dependencies = [ "parking_lot", "reqwest 0.12.5", "risc0-circuit-rv32im", + "risc0-ethereum-contracts 1.1.0", "risc0-zkp", "risc0-zkvm", "risc0-zkvm-platform", @@ -4456,28 +4458,28 @@ dependencies = [ ] [[package]] -name = "guest-aggregation-set" -version = "0.1.0" -source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +name = "guest-assessor" +version = "0.2.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?branch=main#14a3c1fcb6a62730ddfced57f0dc8d8edc18cda7" dependencies = [ + "hex", "risc0-build", "risc0-build-ethereum", ] [[package]] -name = "guest-assessor" -version = "0.1.0" -source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +name = "guest-set-builder" +version = "0.2.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?branch=main#14a3c1fcb6a62730ddfced57f0dc8d8edc18cda7" dependencies = [ - "hex", "risc0-build", "risc0-build-ethereum", ] [[package]] name = "guest-util" -version = "0.1.0" -source = "git+ssh://git@github.com/boundless-xyz/boundless.git?tag=v0.1.0#58ec568535a91e91418fdf7eb8183fb7caa07a46" +version = "0.2.0" +source = "git+ssh://git@github.com/boundless-xyz/boundless.git?branch=main#14a3c1fcb6a62730ddfced57f0dc8d8edc18cda7" dependencies = [ "hex", "risc0-build", @@ -8053,6 +8055,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "risc0-ethereum-contracts" +version = "1.1.0" +source = "git+https://github.com/risc0/risc0-ethereum/?tag=v1.1.0#8498f7a13a2ab6e02bfd3700cf1be5cd2926f4e4" +dependencies = [ + "alloy 0.3.6", + "anyhow", + "risc0-zkvm", +] + [[package]] name = "risc0-ethereum-contracts" version = "1.1.4" diff --git a/crates/risc0-boundless/Cargo.toml b/crates/risc0-boundless/Cargo.toml index a406b05b5..4d28d9798 100644 --- a/crates/risc0-boundless/Cargo.toml +++ b/crates/risc0-boundless/Cargo.toml @@ -11,7 +11,8 @@ description = "An adapter allowing Citrea to connect with Risc0 Boundless Prover [dependencies] alloy = { version = "0.3" } -alloy-primitives = { version = "0.8.7" } +alloy-primitives = { version = "0.8" } +alloy-sol-types = { version = "0.8", features = ["json"] } anyhow = { workspace = true } backoff = { workspace = true } bincode = { workspace = true } @@ -35,11 +36,14 @@ tracing = { workspace = true } url = { workspace = true } # # boundless monorepo dependencies. -# aggregation-set = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } +aggregation-set = { git = "ssh://git@github.com/boundless-xyz/boundless.git", branch = "main"} # guest-assessor = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } -boundless-market = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } +boundless-market = { git = "ssh://git@github.com/boundless-xyz/boundless.git", branch = "main" } # broker = { git = "ssh://git@github.com/boundless-xyz/boundless.git", tag = "v0.1.0" } +# For IRisc0Verifier contract +risc0-ethereum-contracts = { git = "https://github.com/risc0/risc0-ethereum/", tag = "v1.1.0" } + [features] default = [] native = [ diff --git a/crates/risc0-boundless/src/host.rs b/crates/risc0-boundless/src/host.rs index 49dbb5cad..0f74b93f5 100644 --- a/crates/risc0-boundless/src/host.rs +++ b/crates/risc0-boundless/src/host.rs @@ -1,18 +1,22 @@ //! This module implements the [`ZkvmHost`] trait for the RISC0 VM. use core::panic; +use std::future::Future; use std::str::FromStr; use std::sync::Arc; use alloy::hex::FromHex; +use alloy::network::{Ethereum, EthereumWallet}; +use alloy::providers::{Provider, ProviderBuilder}; use alloy::signers::local::PrivateKeySigner; use alloy_primitives::aliases::U96; use alloy_primitives::utils::parse_ether; -use alloy_primitives::{Address, Bytes, U256}; +use alloy_primitives::{Address, Bytes, B256, U256}; use anyhow::anyhow; use borsh::{BorshDeserialize, BorshSerialize}; use boundless_market::contracts::{Input, Offer, Predicate, ProvingRequest, Requirements}; use boundless_market::sdk::client::ClientError::{self}; use boundless_market::sdk::client::{self, Client}; +use risc0_ethereum_contracts::IRiscZeroVerifier; use risc0_zkvm::sha::{Digest, Digestible}; use risc0_zkvm::{ compute_image_id, default_executor, ExecutorEnv, ExecutorImpl, Groth16Receipt, InnerReceipt, @@ -22,6 +26,7 @@ use sov_db::ledger_db::LedgerDB; use sov_risc0_adapter::guest::Risc0Guest; use sov_rollup_interface::zk::{Proof, Zkvm, ZkvmHost}; use tokio::sync::mpsc::{self, UnboundedSender}; +use tokio::task::block_in_place; use tokio::time::{sleep, Duration}; use tracing::{debug, error, info, instrument, trace, warn}; use url::Url; @@ -53,6 +58,18 @@ enum BoundlessRequest { }, } +/// Sda +pub fn block_on(fut: impl Future) -> T { + // Handle case if we're already in an tokio runtime. + if let Ok(handle) = tokio::runtime::Handle::try_current() { + block_in_place(|| handle.block_on(fut)) + } else { + // Otherwise create a new runtime. + let rt = tokio::runtime::Runtime::new().expect("Failed to create a new runtime"); + rt.block_on(fut) + } +} + #[derive(Clone)] struct BoundlessClient { queue: tokio::sync::mpsc::UnboundedSender, @@ -416,6 +433,8 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { ) { Ok((journal, seal)) => { tracing::info!("Request {} fulfilled", request_id); + println!("Journal: {:?}", journal); + println!("Seal: {:?}", seal); (journal, seal) } Err(e) => { @@ -433,6 +452,9 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { } }; + // The exact result of the fulfillment is the ABI-encoded seal (i.e. proof) of the SetInclusionReceipt. + // The most straightforward way to verify it is to send it as the seal parameter to the IRiscZeroVerifier.verify function at the SetVerifier address. + let claim = ReceiptClaim::ok(self.image_id, journal.clone().to_vec()); let inner = InnerReceipt::Groth16(Groth16Receipt::new( @@ -472,6 +494,13 @@ impl<'a> ZkvmHost for Risc0BoundlessHost<'a> { } } +// sol!( +// #[allow(missing_docs)] +// #[sol(rpc)] +// IRisc0Verifier, +// "/Users/erce/Desktop/Chainway/boundless/contracts/out/IRiscZeroSetVerifier.sol/IRiscZeroSetVerifier.json" +// ); + impl<'host> Zkvm for Risc0BoundlessHost<'host> { type CodeCommitment = Digest; @@ -482,9 +511,36 @@ impl<'host> Zkvm for Risc0BoundlessHost<'host> { code_commitment: &Self::CodeCommitment, ) -> Result, Self::Error> { let receipt: Receipt = bincode::deserialize(serialized_proof)?; - - #[allow(clippy::clone_on_copy)] - receipt.verify(code_commitment.clone())?; + // let journal_digest = receipt.journal.digest(); + let journal_digest = + <[u8; 32]>::from(Journal::new(receipt.journal.clone().bytes).digest()).into(); + + let seal = receipt.inner.groth16().unwrap().seal.clone(); + + let private_key_str = std::env::var("private_key").expect("private_key not set"); + let private_key = + PrivateKeySigner::from_str(&private_key_str).expect("Invalid private_key"); + + let set_verifier_address_str = + std::env::var("SET_VERIFIER_ADDRESS").expect("SET_VERIFIER_ADDRESS not set"); + let set_verifier_address = + Address::from_str(&set_verifier_address_str).expect("Invalid SET_VERIFIER_ADDRESS"); + + let wallet = EthereumWallet::from(private_key.clone()); + let rpc_url_str = std::env::var("RPC_URL").expect("RPC_URL not set"); + let rpc_url = Url::parse(&rpc_url_str).expect("Invalid RPC_URL"); + + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(wallet) + .on_http(rpc_url); + + let r0_verifier = IRiscZeroVerifier::new(set_verifier_address, provider); + r0_verifier.verify( + seal.into(), + B256::from_slice(code_commitment.as_bytes()), + journal_digest, + ); Ok(receipt.journal.bytes) }