From 9e4c2559f7425567d27bb15c3a97b9c3f5154fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Fri, 29 Nov 2024 18:52:16 -0300 Subject: [PATCH 01/20] add bench crate and fetch blocks and accounts from rpc --- Cargo.lock | 15 + Cargo.toml | 1 + crates/l2/prover/bench/Cargo.lock | 4974 ++++++++++++++++++++++++++++ crates/l2/prover/bench/Cargo.toml | 18 + crates/l2/prover/bench/src/lib.rs | 102 + crates/l2/prover/bench/src/main.rs | 21 + 6 files changed, 5131 insertions(+) create mode 100644 crates/l2/prover/bench/Cargo.lock create mode 100644 crates/l2/prover/bench/Cargo.toml create mode 100644 crates/l2/prover/bench/src/lib.rs create mode 100644 crates/l2/prover/bench/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 2c2656561..282945a6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -874,6 +874,20 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bench" +version = "0.1.0" +dependencies = [ + "clap 4.5.21", + "ethrex-core", + "ethrex-rlp", + "hex", + "reqwest", + "serde", + "serde_json", + "tokio", +] + [[package]] name = "bincode" version = "1.3.3" @@ -2154,6 +2168,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", + "zkvm_interface", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 68e03158b..c89df2dac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ members = [ "crates/vm/levm/bench/revm_comparison", "crates/l2/", "crates/l2/prover", + "crates/l2/prover/bench", "crates/l2/contracts", "crates/l2/sdk", "cmd/loc", diff --git a/crates/l2/prover/bench/Cargo.lock b/crates/l2/prover/bench/Cargo.lock new file mode 100644 index 000000000..588727974 --- /dev/null +++ b/crates/l2/prover/bench/Cargo.lock @@ -0,0 +1,4974 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addchain" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" + +[[package]] +name = "alloy-chains" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c5c520273946ecf715c0010b4e3503d7eba9893cd9ce6b7fff5654c4a3c470" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "num_enum", + "serde", + "strum", +] + +[[package]] +name = "alloy-consensus" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "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", + "alloy-rlp", + "k256", + "serde", +] + +[[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", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "derive_more", + "once_cell", + "serde", + "sha2", +] + +[[package]] +name = "alloy-genesis" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac4b22b3e51cac09fd2adfcc73b55f447b4df669f983c13f7894ec82b607c63f" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror 1.0.69", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "foldhash", + "getrandom", + "hashbrown 0.15.2", + "hex-literal", + "indexmap 2.6.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[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", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[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", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[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", + "alloy-serde", + "serde", +] + +[[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", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "cfg-if", + "derive_more", + "hashbrown 0.14.5", + "itertools 0.13.0", + "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", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror 1.0.69", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bfd7853b65a2b4f49629ec975fee274faf6dff15ab8894c620943398ef283c0" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82ec42f342d9a9261699f8078e57a7a4fda8aaa73c1a212ed3987080e6a9cd13" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap 2.6.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.89", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2c50e6a62ee2b4f7ab3c6d0366e5770a21cad426e109c2f40335a1b3aff3df" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro2", + "quote", + "syn 2.0.89", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac17c6e89a50fb4a758012e4b409d9a0ba575228e69b539fe37d7a1bd507ca4a" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9dc0fffe397aa17628160e16b89f704098bf3c9d74d5d369ebc239575936de5" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33616b2edf7454302a1d48084db185e52c309f73f6c10be99b0fe39354b3f1e9" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-trie" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a46c9c4fdccda7982e7928904bd85fe235a0404ee3d7e197fff13d61eac8b4f" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "derive_more", + "hashbrown 0.14.5", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "aurora-engine-modexp" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5" +dependencies = [ + "hex", + "num", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bench" +version = "0.1.0" +dependencies = [ + "clap", + "reqwest", + "rsp-client-executor", + "rsp-host-executor", + "tokio", +] + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "serde", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blst" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "bytemuck" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "cc" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets", +] + +[[package]] +name = "clap" +version = "4.5.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "clap_lex" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "const-hex" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +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 = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.89", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "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 = [ + "convert_case", + "proc-macro2", + "quote", + "syn 2.0.89", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enr" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "972070166c68827e64bd1ebc8159dd8e32d9bc2da7ebe8f20b61308f7974ad30" +dependencies = [ + "alloy-rlp", + "base64 0.21.7", + "bytes", + "hex", + "log", + "rand", + "sha3", + "zeroize", +] + +[[package]] +name = "enumn" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "byteorder", + "ff_derive", + "rand_core", + "subtle", +] + +[[package]] +name = "ff_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" +dependencies = [ + "addchain", + "cfg-if", + "num-bigint 0.3.3", + "num-integer", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +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", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.6.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "hyper" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[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", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "js-sys" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb15147158e79fd8b8afd0252522769c4f48725460b37338544d8379d94fc8f9" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "kzg-rs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850eb19206463a61bede4f7b7e6b21731807137619044b1f3c287ebcfe2b3b0" +dependencies = [ + "ff", + "hex", + "sha2", + "sp1_bls12_381", + "spin", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.167" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" + +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.2", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[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 = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "nybbles" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23" +dependencies = [ + "alloy-rlp", + "const-hex", + "proptest", + "serde", + "smallvec", +] + +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "op-alloy-consensus" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21aad1fbf80d2bcd7406880efc7ba109365f44bbb72896758ddcbfa46bf1592c" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "derive_more", + "serde", + "spin", +] + +[[package]] +name = "op-alloy-rpc-types" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e281fbfc2198b7c0c16457d6524f83d192662bc9f3df70f24c3038d4521616df" +dependencies = [ + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "cfg-if", + "hashbrown 0.14.5", + "op-alloy-consensus", + "serde", + "serde_json", +] + +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "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.89", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group", +] + +[[package]] +name = "parity-scale-codec" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be4817d39f3272f69c59fe05d0535ae6456c2dc2fa1ba02910296c7e0a5c590" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +dependencies = [ + "memchr", + "thiserror 1.0.69", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[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.89", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.3", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.3", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.12.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "windows-registry", +] + +[[package]] +name = "reth-blockchain-tree-api" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-consensus", + "reth-execution-errors", + "reth-primitives", + "reth-storage-errors", + "thiserror 1.0.69", +] + +[[package]] +name = "reth-chainspec" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-chains", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-trie", + "auto_impl", + "derive_more", + "once_cell", + "op-alloy-rpc-types", + "reth-ethereum-forks", + "reth-network-peers", + "reth-primitives-traits", + "reth-trie-common", + "serde", + "serde_json", +] + +[[package]] +name = "reth-codecs" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-trie", + "bytes", + "modular-bitfield", + "reth-codecs-derive", + "serde", +] + +[[package]] +name = "reth-codecs-derive" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "reth-consensus" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "auto_impl", + "derive_more", + "reth-primitives", +] + +[[package]] +name = "reth-consensus-common" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus", + "reth-primitives", +] + +[[package]] +name = "reth-db-models" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "bytes", + "modular-bitfield", + "reth-codecs", + "reth-primitives", + "serde", +] + +[[package]] +name = "reth-errors" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-blockchain-tree-api", + "reth-consensus", + "reth-execution-errors", + "reth-fs-util", + "reth-storage-errors", + "thiserror 1.0.69", +] + +[[package]] +name = "reth-ethereum-consensus" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-primitives", + "tracing", +] + +[[package]] +name = "reth-ethereum-forks" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-chains", + "alloy-primitives", + "alloy-rlp", + "auto_impl", + "crc", + "dyn-clone", + "once_cell", + "rustc-hash", + "serde", + "thiserror-no-std", +] + +[[package]] +name = "reth-evm" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-eips", + "auto_impl", + "futures-util", + "reth-chainspec", + "reth-execution-errors", + "reth-execution-types", + "reth-primitives", + "reth-prune-types", + "reth-storage-errors", + "revm", + "revm-primitives", +] + +[[package]] +name = "reth-evm-ethereum" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-eips", + "alloy-sol-types", + "reth-chainspec", + "reth-ethereum-consensus", + "reth-ethereum-forks", + "reth-evm", + "reth-execution-types", + "reth-primitives", + "reth-prune-types", + "reth-revm", + "revm-primitives", +] + +[[package]] +name = "reth-evm-optimism" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-ethereum-forks", + "reth-evm", + "reth-execution-errors", + "reth-execution-types", + "reth-optimism-consensus", + "reth-primitives", + "reth-prune-types", + "reth-revm", + "revm", + "revm-primitives", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "reth-execution-errors" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "derive_more", + "nybbles", + "reth-consensus", + "reth-prune-types", + "reth-storage-errors", + "revm-primitives", +] + +[[package]] +name = "reth-execution-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-execution-errors", + "reth-primitives", + "reth-trie", + "revm", +] + +[[package]] +name = "reth-fs-util" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "reth-network-peers" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "enr", + "serde_with", + "thiserror 1.0.69", + "url", +] + +[[package]] +name = "reth-optimism-chainspec" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-chains", + "alloy-primitives", + "derive_more", + "once_cell", + "reth-chainspec", + "reth-ethereum-forks", + "reth-primitives-traits", + "serde_json", +] + +[[package]] +name = "reth-optimism-consensus" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-primitives", + "tracing", +] + +[[package]] +name = "reth-primitives" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types", + "alloy-serde", + "bytes", + "derive_more", + "k256", + "once_cell", + "op-alloy-rpc-types", + "rayon", + "reth-chainspec", + "reth-ethereum-forks", + "reth-optimism-chainspec", + "reth-primitives-traits", + "reth-static-file-types", + "reth-trie-common", + "revm-primitives", + "secp256k1", + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "reth-primitives-traits" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-eth", + "byteorder", + "bytes", + "derive_more", + "modular-bitfield", + "reth-codecs", + "revm-primitives", + "roaring", + "serde", +] + +[[package]] +name = "reth-prune-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives", + "bytes", + "derive_more", + "modular-bitfield", + "reth-codecs", + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "reth-revm" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus-common", + "reth-execution-errors", + "reth-primitives", + "reth-prune-types", + "reth-storage-api", + "reth-storage-errors", + "revm", +] + +[[package]] +name = "reth-stages-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives", + "bytes", + "modular-bitfield", + "reth-codecs", + "reth-trie-common", + "serde", +] + +[[package]] +name = "reth-static-file-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives", + "derive_more", + "serde", + "strum", +] + +[[package]] +name = "reth-storage-api" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "auto_impl", + "reth-chainspec", + "reth-db-models", + "reth-execution-types", + "reth-primitives", + "reth-prune-types", + "reth-stages-types", + "reth-storage-errors", + "reth-trie", +] + +[[package]] +name = "reth-storage-errors" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-rlp", + "derive_more", + "reth-fs-util", + "reth-primitives", +] + +[[package]] +name = "reth-trie" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-rlp", + "auto_impl", + "derive_more", + "itertools 0.13.0", + "rayon", + "reth-execution-errors", + "reth-primitives", + "reth-stages-types", + "reth-storage-errors", + "reth-trie-common", + "revm", + "tracing", +] + +[[package]] +name = "reth-trie-common" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-trie", + "bytes", + "derive_more", + "itertools 0.13.0", + "nybbles", + "reth-codecs", + "reth-primitives-traits", + "revm-primitives", + "serde", +] + +[[package]] +name = "revm" +version = "14.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f719e28cc6fdd086f8bc481429e587740d20ad89729cec3f5f5dd7b655474df" +dependencies = [ + "auto_impl", + "cfg-if", + "dyn-clone", + "revm-interpreter", + "revm-precompile", + "serde", + "serde_json", +] + +[[package]] +name = "revm-interpreter" +version = "10.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "959ecbc36802de6126852479844737f20194cf8e6718e0c30697d306a2cca916" +dependencies = [ + "revm-primitives", + "serde", +] + +[[package]] +name = "revm-precompile" +version = "11.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e25f604cb9db593ca3013be8c00f310d6790ccb1b7d8fbbdd4660ec8888043a" +dependencies = [ + "aurora-engine-modexp", + "c-kzg", + "cfg-if", + "k256", + "kzg-rs", + "once_cell", + "p256", + "revm-primitives", + "ripemd", + "secp256k1", + "sha2", + "substrate-bn", +] + +[[package]] +name = "revm-primitives" +version = "9.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a6bff9dbde3370a5ac9555104117f7e6039b3cc76e8d5d9d01899088beca2a" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "auto_impl", + "bitflags", + "bitvec", + "c-kzg", + "cfg-if", + "dyn-clone", + "enumn", + "hashbrown 0.14.5", + "hex", + "kzg-rs", + "serde", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "roaring" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81dc953b2244ddd5e7860cb0bb2a790494b898ef321d4aff8e260efab60cc88" +dependencies = [ + "bytemuck", + "byteorder", +] + +[[package]] +name = "rsp-client-executor" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp#c01149568a2ed4d3e766756e8b847c870a0b1e4e" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "eyre", + "futures", + "itertools 0.13.0", + "reth-chainspec", + "reth-errors", + "reth-ethereum-consensus", + "reth-evm", + "reth-evm-ethereum", + "reth-evm-optimism", + "reth-execution-types", + "reth-optimism-consensus", + "reth-primitives", + "reth-revm", + "reth-storage-errors", + "reth-trie", + "revm", + "revm-primitives", + "rsp-mpt", + "rsp-primitives", + "rsp-witness-db", + "serde", + "serde_json", + "tokio", + "url", +] + +[[package]] +name = "rsp-host-executor" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp#c01149568a2ed4d3e766756e8b847c870a0b1e4e" +dependencies = [ + "alloy-primitives", + "alloy-provider", + "alloy-rlp", + "alloy-rpc-types", + "alloy-transport", + "eyre", + "futures", + "itertools 0.13.0", + "reth-chainspec", + "reth-codecs", + "reth-errors", + "reth-execution-types", + "reth-primitives", + "reth-storage-errors", + "reth-trie", + "revm", + "revm-primitives", + "rsp-client-executor", + "rsp-mpt", + "rsp-primitives", + "rsp-rpc-db", + "rsp-witness-db", + "serde", + "serde_json", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "rsp-mpt" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp#c01149568a2ed4d3e766756e8b847c870a0b1e4e" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types", + "anyhow", + "eyre", + "itertools 0.13.0", + "reth-execution-types", + "reth-primitives", + "reth-trie", + "revm", + "revm-primitives", + "rlp", + "rsp-primitives", + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "rsp-primitives" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp#c01149568a2ed4d3e766756e8b847c870a0b1e4e" +dependencies = [ + "alloy-rpc-types", + "eyre", + "reth-chainspec", + "reth-optimism-chainspec", + "reth-primitives", + "reth-revm", + "reth-trie", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "rsp-rpc-db" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp#c01149568a2ed4d3e766756e8b847c870a0b1e4e" +dependencies = [ + "alloy-provider", + "alloy-rlp", + "alloy-rpc-types", + "alloy-transport", + "futures", + "rayon", + "reth-primitives", + "reth-revm", + "reth-storage-errors", + "reth-trie", + "revm-primitives", + "rsp-primitives", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "rsp-witness-db" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp#c01149568a2ed4d3e766756e8b847c870a0b1e4e" +dependencies = [ + "reth-primitives", + "reth-storage-errors", + "revm-primitives", + "rsp-primitives", + "serde", +] + +[[package]] +name = "ruint" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.6", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +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" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.23", +] + +[[package]] +name = "rustix" +version = "0.38.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +dependencies = [ + "web-time", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scale-info" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" +dependencies = [ + "rand", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "semver-parser" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.215" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.215" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "serde_json" +version = "1.0.133" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +dependencies = [ + "indexmap 2.6.0", + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.6.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "sp1-lib" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bea7811abd2d3a991007fcb284f41152840b8388c171288d0c52c6793956609c" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "hex", + "serde", + "snowbridge-amcl", +] + +[[package]] +name = "sp1_bls12_381" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a27c4b8901334dc09099dd82f80a72ddfc76b0046f4b342584c808f1931bed5a" +dependencies = [ + "cfg-if", + "ff", + "group", + "pairing", + "rand_core", + "sp1-lib", + "subtle", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.89", +] + +[[package]] +name = "substrate-bn" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c" +dependencies = [ + "byteorder", + "crunchy", + "lazy_static", + "rand", + "rustc-hex", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0523f59468a2696391f2a772edc089342aacd53c3caa2ac3264e598edf119b" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "thiserror-impl-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "thiserror-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +dependencies = [ + "thiserror-impl-no-std", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.41.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[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.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap 2.6.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d3b25c3ea1126a2ad5f4f9068483c2af1e64168f847abe863a526b8dbfe00b" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52857d4c32e496dc6537646b5b117081e71fd2ff06de792e3577a150627db283" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.89", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951fe82312ed48443ac78b66fa43eded9999f738f6022e67aead7b708659e49a" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "920b0ffe069571ebbfc9ddc0b36ba305ef65577c94b06262ed793716a1afd981" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf59002391099644be3524e23b781fa43d2be0c5aa0719a18c0731b9d195cab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5047c5392700766601942795a436d7d2599af60dcc3cc1248c9120bfb0827b0" + +[[package]] +name = "web-sys" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476364ff87d0ae6bfb661053a9104ab312542658c3d8f963b7ace80b6f9b26b9" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] diff --git a/crates/l2/prover/bench/Cargo.toml b/crates/l2/prover/bench/Cargo.toml new file mode 100644 index 000000000..bc32ccdaf --- /dev/null +++ b/crates/l2/prover/bench/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "bench" +version = "0.1.0" +edition = "2021" + +[dependencies] +ethrex-core.workspace = true +ethrex-rlp.workspace = true + +#rsp-host-executor = { git = "https://github.com/succinctlabs/rsp" } +#rsp-client-executor = { git = "https://github.com/succinctlabs/rsp" } + +tokio = { version = "1.21", default-features = false, features = ["full"] } +reqwest = { version = "0.12.9", features = ["json"] } +clap = { version = "4.5.21", features = ["derive"] } +serde.workspace = true +hex.workspace = true +serde_json.workspace = true diff --git a/crates/l2/prover/bench/src/lib.rs b/crates/l2/prover/bench/src/lib.rs new file mode 100644 index 000000000..5674e4803 --- /dev/null +++ b/crates/l2/prover/bench/src/lib.rs @@ -0,0 +1,102 @@ +use ethrex_core::{ + types::{AccountState, Block}, + Address, +}; +use ethrex_rlp::decode::RLPDecode; + +use serde::Deserialize; +use serde_json::json; + +#[derive(Deserialize)] +struct BlockResponse { + result: String, +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct AccountProofResponse { + balance: String, + code_hash: String, + nonce: String, + storage_hash: String, +} + +pub async fn get_block(rpc_url: String, block_number: usize) -> Result { + let client = reqwest::Client::new(); + + let block_number = format!("0x{block_number:x}"); + let request = &json!({ + "id": 1, + "jsonrpc": "2.0", + "method": "debug_getRawBlock", + "params": [block_number] + }); + + let response = client + .post(rpc_url) + .json(request) + .send() + .await + .map_err(|err| err.to_string())?; + + let hex_encoded_block = response + .json::() + .await + .map_err(|err| err.to_string())?; + let encoded_block = hex::decode(hex_encoded_block.result.trim_start_matches("0x")) + .map_err(|err| err.to_string())?; + + Ok(Block::decode_unfinished(&encoded_block) + .map_err(|err| err.to_string())? + .0) +} + +pub async fn get_account( + rpc_url: String, + block_number: usize, + address: Address, +) -> Result { + let client = reqwest::Client::new(); + + let block_number = format!("0x{block_number:x}"); + let address = format!("0x{address:x}"); + + let request = &json!( + { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getProof", + "params":[address, [], block_number] + } + ); + let response = client + .post(rpc_url) + .json(request) + .send() + .await + .map_err(|err| err.to_string())?; + + let account_proof = response + .json::() + .await + .map_err(|err| err.to_string())?; + + Ok(AccountState { + nonce: account_proof + .nonce + .parse() + .map_err(|_| "failed to parse nonce".to_string())?, + balance: account_proof + .balance + .parse() + .map_err(|_| "failed to parse balance".to_string())?, + storage_root: account_proof + .storage_hash + .parse() + .map_err(|_| "failed to parse storage root".to_string())?, + code_hash: account_proof + .code_hash + .parse() + .map_err(|_| "failed to parse code hash".to_string())?, + }) +} diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs new file mode 100644 index 000000000..19bef0bb3 --- /dev/null +++ b/crates/l2/prover/bench/src/main.rs @@ -0,0 +1,21 @@ +use bench::get_block; +use clap::Parser; + +#[derive(Parser, Debug)] +struct Args { + #[arg(short, long)] + rpc_url: String, + #[arg(short, long)] + block_number: usize, +} + +#[tokio::main] +async fn main() { + let args = Args::parse(); + + let block = get_block(args.rpc_url, args.block_number) + .await + .expect("failed"); + + println!("Succesfully fetched block {}", block.hash()); +} From 456103a2c0e8437eb5572294efe433f34747fe81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 2 Dec 2024 13:16:12 -0300 Subject: [PATCH 02/20] fix get_account() --- crates/l2/prover/bench/src/lib.rs | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/crates/l2/prover/bench/src/lib.rs b/crates/l2/prover/bench/src/lib.rs index 5674e4803..965b29873 100644 --- a/crates/l2/prover/bench/src/lib.rs +++ b/crates/l2/prover/bench/src/lib.rs @@ -52,7 +52,7 @@ pub async fn get_block(rpc_url: String, block_number: usize) -> Result Result { @@ -76,15 +76,28 @@ pub async fn get_account( .await .map_err(|err| err.to_string())?; - let account_proof = response - .json::() + #[derive(Deserialize)] + #[serde(rename_all = "camelCase")] + struct AccountProof { + balance: String, + code_hash: String, + nonce: String, + storage_hash: String, + } + + let account_proof: AccountProof = response + .json::() .await - .map_err(|err| err.to_string())?; + .map_err(|err| err.to_string()) + .and_then(|json| { + json.get("result") + .cloned() + .ok_or("failed to get result from response".to_string()) + }) + .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string()))?; Ok(AccountState { - nonce: account_proof - .nonce - .parse() + nonce: u64::from_str_radix(account_proof.nonce.trim_start_matches("0x"), 16) .map_err(|_| "failed to parse nonce".to_string())?, balance: account_proof .balance From 11f35ac194b20bbca635fed37cfa405a06fcd3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 2 Dec 2024 13:16:34 -0300 Subject: [PATCH 03/20] fix get_block() --- crates/l2/prover/bench/src/lib.rs | 42 +++++++++++++------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/crates/l2/prover/bench/src/lib.rs b/crates/l2/prover/bench/src/lib.rs index 965b29873..c4565f1be 100644 --- a/crates/l2/prover/bench/src/lib.rs +++ b/crates/l2/prover/bench/src/lib.rs @@ -7,21 +7,7 @@ use ethrex_rlp::decode::RLPDecode; use serde::Deserialize; use serde_json::json; -#[derive(Deserialize)] -struct BlockResponse { - result: String, -} - -#[derive(Deserialize)] -#[serde(rename_all = "camelCase")] -struct AccountProofResponse { - balance: String, - code_hash: String, - nonce: String, - storage_hash: String, -} - -pub async fn get_block(rpc_url: String, block_number: usize) -> Result { +pub async fn get_block(rpc_url: &str, block_number: usize) -> Result { let client = reqwest::Client::new(); let block_number = format!("0x{block_number:x}"); @@ -39,16 +25,24 @@ pub async fn get_block(rpc_url: String, block_number: usize) -> Result() + response + .json::() .await - .map_err(|err| err.to_string())?; - let encoded_block = hex::decode(hex_encoded_block.result.trim_start_matches("0x")) - .map_err(|err| err.to_string())?; - - Ok(Block::decode_unfinished(&encoded_block) - .map_err(|err| err.to_string())? - .0) + .map_err(|err| err.to_string()) + .and_then(|json| { + json.get("result") + .cloned() + .ok_or("failed to get result from response".to_string()) + }) + .and_then(|result| serde_json::from_value::(result).map_err(|err| err.to_string())) + .and_then(|hex_encoded_block| { + hex::decode(hex_encoded_block.trim_start_matches("0x")).map_err(|err| err.to_string()) + }) + .and_then(|encoded_block| { + Block::decode_unfinished(&encoded_block) + .map_err(|err| err.to_string()) + .map(|decoded| decoded.0) + }) } pub async fn get_account( From 446e4c98556791f0d08acf1aa82d3113e7acc543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 2 Dec 2024 13:18:17 -0300 Subject: [PATCH 04/20] add test --- crates/l2/prover/bench/src/lib.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/crates/l2/prover/bench/src/lib.rs b/crates/l2/prover/bench/src/lib.rs index c4565f1be..06ff34e27 100644 --- a/crates/l2/prover/bench/src/lib.rs +++ b/crates/l2/prover/bench/src/lib.rs @@ -107,3 +107,32 @@ pub async fn get_account( .map_err(|_| "failed to parse code hash".to_string())?, }) } + +#[cfg(test)] +mod test { + use ethrex_core::Address; + + use crate::{get_account, get_block}; + + const BLOCK_NUMBER: usize = 21315830; + const RPC_URL: &str = ""; + const VITALIK_ADDR: &str = "d8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; + + #[ignore = "Needs to manually set RPC_URL"] + #[tokio::test] + async fn get_block_works() { + get_block(RPC_URL, BLOCK_NUMBER).await.unwrap(); + } + + #[ignore = "Needs to manually set RPC_URL"] + #[tokio::test] + async fn get_account_works() { + get_account( + RPC_URL, + BLOCK_NUMBER, + Address::from_slice(&hex::decode(VITALIK_ADDR).unwrap()), + ) + .await + .unwrap(); + } +} From d8076ef7b7ac3b9b50f65209438de0203a2d008e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 2 Dec 2024 18:39:43 -0300 Subject: [PATCH 05/20] add touched_state mod, refactored rpc functions --- Cargo.lock | 5 ++ crates/l2/prover/bench/Cargo.toml | 16 ++++ crates/l2/prover/bench/src/lib.rs | 139 +---------------------------- crates/l2/prover/bench/src/main.rs | 36 ++++++-- crates/l2/prover/bench/src/rpc.rs | 138 ++++++++++++++++++++++++++++ crates/vm/execution_db.rs | 107 ++++++++++++++++++++++ 6 files changed, 298 insertions(+), 143 deletions(-) create mode 100644 crates/l2/prover/bench/src/rpc.rs diff --git a/Cargo.lock b/Cargo.lock index 282945a6e..219883f08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -881,8 +881,13 @@ dependencies = [ "clap 4.5.21", "ethrex-core", "ethrex-rlp", + "ethrex-vm", + "futures-util", "hex", "reqwest", + "revm 14.0.3", + "revm-inspectors", + "revm-primitives 10.0.0", "serde", "serde_json", "tokio", diff --git a/crates/l2/prover/bench/Cargo.toml b/crates/l2/prover/bench/Cargo.toml index bc32ccdaf..74307e3ad 100644 --- a/crates/l2/prover/bench/Cargo.toml +++ b/crates/l2/prover/bench/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] ethrex-core.workspace = true ethrex-rlp.workspace = true +ethrex-vm.workspace = true #rsp-host-executor = { git = "https://github.com/succinctlabs/rsp" } #rsp-client-executor = { git = "https://github.com/succinctlabs/rsp" } @@ -16,3 +17,18 @@ clap = { version = "4.5.21", features = ["derive"] } serde.workspace = true hex.workspace = true serde_json.workspace = true + +revm = { version = "14.0.3", features = [ + "serde", + "std", + "serde-json", + "optional_no_base_fee", + "optional_block_gas_limit", +], default-features = false } + +# These dependencies must be kept up to date with the corresponding revm version, otherwise errors may pop up because of trait implementation mismatches +revm-inspectors = { version = "0.8.1" } +revm-primitives = { version = "10.0.0", features = [ + "std", +], default-features = false } +futures-util = "0.3.31" diff --git a/crates/l2/prover/bench/src/lib.rs b/crates/l2/prover/bench/src/lib.rs index 06ff34e27..06a3fd023 100644 --- a/crates/l2/prover/bench/src/lib.rs +++ b/crates/l2/prover/bench/src/lib.rs @@ -1,138 +1 @@ -use ethrex_core::{ - types::{AccountState, Block}, - Address, -}; -use ethrex_rlp::decode::RLPDecode; - -use serde::Deserialize; -use serde_json::json; - -pub async fn get_block(rpc_url: &str, block_number: usize) -> Result { - let client = reqwest::Client::new(); - - let block_number = format!("0x{block_number:x}"); - let request = &json!({ - "id": 1, - "jsonrpc": "2.0", - "method": "debug_getRawBlock", - "params": [block_number] - }); - - let response = client - .post(rpc_url) - .json(request) - .send() - .await - .map_err(|err| err.to_string())?; - - response - .json::() - .await - .map_err(|err| err.to_string()) - .and_then(|json| { - json.get("result") - .cloned() - .ok_or("failed to get result from response".to_string()) - }) - .and_then(|result| serde_json::from_value::(result).map_err(|err| err.to_string())) - .and_then(|hex_encoded_block| { - hex::decode(hex_encoded_block.trim_start_matches("0x")).map_err(|err| err.to_string()) - }) - .and_then(|encoded_block| { - Block::decode_unfinished(&encoded_block) - .map_err(|err| err.to_string()) - .map(|decoded| decoded.0) - }) -} - -pub async fn get_account( - rpc_url: &str, - block_number: usize, - address: Address, -) -> Result { - let client = reqwest::Client::new(); - - let block_number = format!("0x{block_number:x}"); - let address = format!("0x{address:x}"); - - let request = &json!( - { - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getProof", - "params":[address, [], block_number] - } - ); - let response = client - .post(rpc_url) - .json(request) - .send() - .await - .map_err(|err| err.to_string())?; - - #[derive(Deserialize)] - #[serde(rename_all = "camelCase")] - struct AccountProof { - balance: String, - code_hash: String, - nonce: String, - storage_hash: String, - } - - let account_proof: AccountProof = response - .json::() - .await - .map_err(|err| err.to_string()) - .and_then(|json| { - json.get("result") - .cloned() - .ok_or("failed to get result from response".to_string()) - }) - .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string()))?; - - Ok(AccountState { - nonce: u64::from_str_radix(account_proof.nonce.trim_start_matches("0x"), 16) - .map_err(|_| "failed to parse nonce".to_string())?, - balance: account_proof - .balance - .parse() - .map_err(|_| "failed to parse balance".to_string())?, - storage_root: account_proof - .storage_hash - .parse() - .map_err(|_| "failed to parse storage root".to_string())?, - code_hash: account_proof - .code_hash - .parse() - .map_err(|_| "failed to parse code hash".to_string())?, - }) -} - -#[cfg(test)] -mod test { - use ethrex_core::Address; - - use crate::{get_account, get_block}; - - const BLOCK_NUMBER: usize = 21315830; - const RPC_URL: &str = ""; - const VITALIK_ADDR: &str = "d8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; - - #[ignore = "Needs to manually set RPC_URL"] - #[tokio::test] - async fn get_block_works() { - get_block(RPC_URL, BLOCK_NUMBER).await.unwrap(); - } - - #[ignore = "Needs to manually set RPC_URL"] - #[tokio::test] - async fn get_account_works() { - get_account( - RPC_URL, - BLOCK_NUMBER, - Address::from_slice(&hex::decode(VITALIK_ADDR).unwrap()), - ) - .await - .unwrap(); - } -} +pub mod rpc; diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index 19bef0bb3..23a964089 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -1,5 +1,10 @@ -use bench::get_block; +use bench::rpc::{get_account, get_block}; use clap::Parser; +use ethrex_vm::{execution_db::touched_state::get_touched_state, SpecId}; +use futures_util::future::join_all; + +const MAINNET_CHAIN_ID: u64 = 0x1; +const MAINNET_SPEC_ID: SpecId = SpecId::CANCUN; #[derive(Parser, Debug)] struct Args { @@ -11,11 +16,32 @@ struct Args { #[tokio::main] async fn main() { - let args = Args::parse(); + let Args { + rpc_url, + block_number, + } = Args::parse(); - let block = get_block(args.rpc_url, args.block_number) + // fetch block + let block = get_block(&rpc_url, &block_number) .await - .expect("failed"); + .expect("failed to fetch block"); + + // get all accounts and storage keys touched during execution of block + let touched_state = get_touched_state(&block, MAINNET_CHAIN_ID, MAINNET_SPEC_ID) + .expect("failed to get touched state"); + + // fetch all accounts and storage touched + let _accounts = join_all( + touched_state + .iter() + .map(|(address, _)| get_account(&rpc_url, &block_number, address)), + ) + .await + .into_iter() + .collect::, String>>() + .expect("failed to fetch accounts"); + // TODO: storage - println!("Succesfully fetched block {}", block.hash()); + // 4. create prover program input and execute. Measure time. + // 5. invoke rsp and execute too. Save in cache } diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs new file mode 100644 index 000000000..8f1fe27c6 --- /dev/null +++ b/crates/l2/prover/bench/src/rpc.rs @@ -0,0 +1,138 @@ +use ethrex_core::{ + types::{AccountState, Block}, + Address, +}; +use ethrex_rlp::decode::RLPDecode; + +use serde::Deserialize; +use serde_json::json; + +pub async fn get_block(rpc_url: &str, block_number: &usize) -> Result { + let client = reqwest::Client::new(); + + let block_number = format!("0x{block_number:x}"); + let request = &json!({ + "id": 1, + "jsonrpc": "2.0", + "method": "debug_getRawBlock", + "params": [block_number] + }); + + let response = client + .post(rpc_url) + .json(request) + .send() + .await + .map_err(|err| err.to_string())?; + + response + .json::() + .await + .map_err(|err| err.to_string()) + .and_then(|json| { + json.get("result") + .cloned() + .ok_or("failed to get result from response".to_string()) + }) + .and_then(|result| serde_json::from_value::(result).map_err(|err| err.to_string())) + .and_then(|hex_encoded_block| { + hex::decode(hex_encoded_block.trim_start_matches("0x")).map_err(|err| err.to_string()) + }) + .and_then(|encoded_block| { + Block::decode_unfinished(&encoded_block) + .map_err(|err| err.to_string()) + .map(|decoded| decoded.0) + }) +} + +pub async fn get_account( + rpc_url: &str, + block_number: &usize, + address: &Address, +) -> Result { + let client = reqwest::Client::new(); + + let block_number = format!("0x{block_number:x}"); + let address = format!("0x{address:x}"); + + let request = &json!( + { + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getProof", + "params":[address, [], block_number] + } + ); + let response = client + .post(rpc_url) + .json(request) + .send() + .await + .map_err(|err| err.to_string())?; + + #[derive(Deserialize)] + #[serde(rename_all = "camelCase")] + struct AccountProof { + balance: String, + code_hash: String, + nonce: String, + storage_hash: String, + } + + let account_proof: AccountProof = response + .json::() + .await + .map_err(|err| err.to_string()) + .and_then(|json| { + json.get("result") + .cloned() + .ok_or("failed to get result from response".to_string()) + }) + .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string()))?; + + Ok(AccountState { + nonce: u64::from_str_radix(account_proof.nonce.trim_start_matches("0x"), 16) + .map_err(|_| "failed to parse nonce".to_string())?, + balance: account_proof + .balance + .parse() + .map_err(|_| "failed to parse balance".to_string())?, + storage_root: account_proof + .storage_hash + .parse() + .map_err(|_| "failed to parse storage root".to_string())?, + code_hash: account_proof + .code_hash + .parse() + .map_err(|_| "failed to parse code hash".to_string())?, + }) +} + +#[cfg(test)] +mod test { + use ethrex_core::Address; + + use super::*; + + const BLOCK_NUMBER: usize = 21315830; + const RPC_URL: &str = ""; + const VITALIK_ADDR: &str = "d8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; + + #[ignore = "needs to manually set rpc url in constant"] + #[tokio::test] + async fn get_block_works() { + get_block(RPC_URL, &BLOCK_NUMBER).await.unwrap(); + } + + #[ignore = "needs to manually set rpc url in constant"] + #[tokio::test] + async fn get_account_works() { + get_account( + RPC_URL, + &BLOCK_NUMBER, + &Address::from_slice(&hex::decode(VITALIK_ADDR).unwrap()), + ) + .await + .unwrap(); + } +} diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index a7a81040d..32f05ff1f 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -234,3 +234,110 @@ impl DatabaseRef for ExecutionDB { .ok_or(ExecutionDBError::BlockHashNotFound(number)) } } + +pub mod touched_state { + use ethrex_core::{types::Block, Address, U256}; + use revm::{inspectors::TracerEip3155, DatabaseCommit, DatabaseRef, Evm}; + use revm_primitives::{ + Account as RevmAccount, Address as RevmAddress, EVMError, SpecId, U256 as RevmU256, + }; + + use crate::{block_env, tx_env}; + + type TouchedStateDBError = (); + + /// Dummy DB for storing touched account addresses and storage keys while executing a block. + #[derive(Default)] + struct TouchedStateDB { + touched_state: Vec<(RevmAddress, Vec)>, + } + + #[allow(unused_variables)] + impl DatabaseRef for TouchedStateDB { + type Error = TouchedStateDBError; + + fn basic_ref( + &self, + address: RevmAddress, + ) -> Result, Self::Error> { + Ok(Some(Default::default())) + } + fn storage_ref( + &self, + address: RevmAddress, + index: RevmU256, + ) -> Result { + Ok(Default::default()) + } + fn block_hash_ref(&self, number: u64) -> Result { + Ok(Default::default()) + } + fn code_by_hash_ref( + &self, + code_hash: revm_primitives::B256, + ) -> Result { + Ok(Default::default()) + } + } + + impl DatabaseCommit for TouchedStateDB { + fn commit(&mut self, changes: revm_primitives::HashMap) { + for (address, account) in changes { + if !account.is_touched() { + continue; + } + self.touched_state + .push((address, account.storage.keys().cloned().collect())); + } + } + } + + /// Get all touched account addresses and storage keys during the execution of a block. + /// + /// Generally used for building an [super::ExecutionDB]. + pub fn get_touched_state( + block: &Block, + chain_id: u64, + spec_id: SpecId, + ) -> Result)>, EVMError> { + let block_env = block_env(&block.header); + let mut db = TouchedStateDB::default(); + + for transaction in &block.body.transactions { + let tx_env = tx_env(transaction); + + // execute tx + let evm_builder = Evm::builder() + .with_block_env(block_env.clone()) + .with_tx_env(tx_env) + .modify_cfg_env(|cfg| cfg.chain_id = chain_id) + .with_spec_id(spec_id) + .with_external_context( + TracerEip3155::new(Box::new(std::io::stderr())).without_summary(), + ); + let mut evm = evm_builder.with_ref_db(&mut db).build(); + evm.transact_commit()?; + } + + let mut touched_state: Vec<(Address, Vec)> = db + .touched_state + .into_iter() + .map(|(address, storage_keys)| { + ( + Address::from_slice(address.as_slice()), + storage_keys + .into_iter() + .map(|key| U256::from_big_endian(&key.to_be_bytes_vec())) + .collect(), + ) + }) + .collect(); + + // add withdrawal accounts + if let Some(ref withdrawals) = block.body.withdrawals { + touched_state.extend(withdrawals.iter().map(|w| (w.address, Vec::new()))) + } + + Ok(touched_state) + } +} From 80a1dd2425431c3da894f26dd6522e767ee085f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 3 Dec 2024 12:23:28 -0300 Subject: [PATCH 06/20] disable checks --- crates/vm/Cargo.toml | 1 + crates/vm/execution_db.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/vm/Cargo.toml b/crates/vm/Cargo.toml index a9892ef84..be2cb1aa9 100644 --- a/crates/vm/Cargo.toml +++ b/crates/vm/Cargo.toml @@ -15,6 +15,7 @@ revm = { version = "14.0.3", features = [ "serde-json", "optional_no_base_fee", "optional_block_gas_limit", + "optional_balance_check", ], default-features = false } # These dependencies must be kept up to date with the corresponding revm version, otherwise errors may pop up because of trait implementation mismatches diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index 32f05ff1f..bc882e150 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -304,13 +304,20 @@ pub mod touched_state { let mut db = TouchedStateDB::default(); for transaction in &block.body.transactions { - let tx_env = tx_env(transaction); + let mut tx_env = tx_env(transaction); + + // disable nonce check (we're executing with empty accounts, nonce 0) + tx_env.nonce = None; // execute tx let evm_builder = Evm::builder() .with_block_env(block_env.clone()) .with_tx_env(tx_env) - .modify_cfg_env(|cfg| cfg.chain_id = chain_id) + .modify_cfg_env(|cfg| { + cfg.chain_id = chain_id; + // we're executing with empty accounts, balance 0 + cfg.disable_balance_check = true; + }) .with_spec_id(spec_id) .with_external_context( TracerEip3155::new(Box::new(std::io::stderr())).without_summary(), From 3193d331cddd4b3380dde02ff0cee22bdb8eeb51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 3 Dec 2024 13:12:13 -0300 Subject: [PATCH 07/20] handle request errors --- crates/l2/prover/bench/src/rpc.rs | 35 ++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs index 8f1fe27c6..2fcfd569a 100644 --- a/crates/l2/prover/bench/src/rpc.rs +++ b/crates/l2/prover/bench/src/rpc.rs @@ -29,11 +29,7 @@ pub async fn get_block(rpc_url: &str, block_number: &usize) -> Result() .await .map_err(|err| err.to_string()) - .and_then(|json| { - json.get("result") - .cloned() - .ok_or("failed to get result from response".to_string()) - }) + .and_then(handle_request) .and_then(|result| serde_json::from_value::(result).map_err(|err| err.to_string())) .and_then(|hex_encoded_block| { hex::decode(hex_encoded_block.trim_start_matches("0x")).map_err(|err| err.to_string()) @@ -83,11 +79,7 @@ pub async fn get_account( .json::() .await .map_err(|err| err.to_string()) - .and_then(|json| { - json.get("result") - .cloned() - .ok_or("failed to get result from response".to_string()) - }) + .and_then(handle_request) .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string()))?; Ok(AccountState { @@ -108,6 +100,29 @@ pub async fn get_account( }) } +fn handle_request(response: serde_json::Value) -> Result { + response.get("result").cloned().ok_or_else(|| { + let final_error = response + .get("error") + .cloned() + .ok_or("response failed but error is missing".to_string()) + .and_then(|error| { + error + .get("message") + .cloned() + .ok_or("response failed but error message is missing".to_string()) + }) + .and_then(|message| { + serde_json::from_value::(message) + .map_err(|err| format!("failed to deserialize error message: {err}")) + }); + match final_error { + Ok(request_err) => request_err, + Err(json_err) => json_err, + } + }) +} + #[cfg(test)] mod test { use ethrex_core::Address; From 2c762208f1705420f2d708e2d57610dc648ada61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 3 Dec 2024 13:12:41 -0300 Subject: [PATCH 08/20] rate limited account fetching --- crates/l2/prover/bench/Cargo.toml | 1 + crates/l2/prover/bench/src/main.rs | 48 ++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/crates/l2/prover/bench/Cargo.toml b/crates/l2/prover/bench/Cargo.toml index 74307e3ad..07754e3d4 100644 --- a/crates/l2/prover/bench/Cargo.toml +++ b/crates/l2/prover/bench/Cargo.toml @@ -32,3 +32,4 @@ revm-primitives = { version = "10.0.0", features = [ "std", ], default-features = false } futures-util = "0.3.31" +tokio-utils = "0.1.2" diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index 23a964089..3f2872797 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -2,10 +2,13 @@ use bench::rpc::{get_account, get_block}; use clap::Parser; use ethrex_vm::{execution_db::touched_state::get_touched_state, SpecId}; use futures_util::future::join_all; +use tokio_utils::RateLimiter; const MAINNET_CHAIN_ID: u64 = 0x1; const MAINNET_SPEC_ID: SpecId = SpecId::CANCUN; +const RPC_RATE_LIMIT: usize = 100; // requests per second + #[derive(Parser, Debug)] struct Args { #[arg(short, long)] @@ -21,25 +24,46 @@ async fn main() { block_number, } = Args::parse(); - // fetch block + println!("fetching block {block_number}"); let block = get_block(&rpc_url, &block_number) .await .expect("failed to fetch block"); - // get all accounts and storage keys touched during execution of block + println!("pre-executing transactions to get touched state keys"); let touched_state = get_touched_state(&block, MAINNET_CHAIN_ID, MAINNET_SPEC_ID) .expect("failed to get touched state"); - // fetch all accounts and storage touched - let _accounts = join_all( - touched_state - .iter() - .map(|(address, _)| get_account(&rpc_url, &block_number, address)), - ) - .await - .into_iter() - .collect::, String>>() - .expect("failed to fetch accounts"); + println!("fetching touched state values"); + let mut accounts = Vec::with_capacity(touched_state.len()); + + let rate_limiter = RateLimiter::new(std::time::Duration::from_secs(1)); + let mut fetched_accs = 0; + for request_chunk in touched_state.chunks(RPC_RATE_LIMIT) { + let rate_limited = rate_limiter.throttle(|| async { + join_all( + request_chunk + .iter() + .map(|(address, _)| get_account(&rpc_url, &block_number, address)), + ) + .await + }); + + let account_chunk = rate_limited + .await + .into_iter() + .collect::, String>>() + .expect("failed to fetch accounts"); + + accounts.extend(account_chunk); + + fetched_accs += request_chunk.len(); + println!( + "fetched {} accounts of {}", + fetched_accs, + touched_state.len() + ); + } + // TODO: storage // 4. create prover program input and execute. Measure time. From 3dbaf646f58b01683cf378202fcce48b90365e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 3 Dec 2024 13:26:07 -0300 Subject: [PATCH 09/20] rename fn --- crates/l2/prover/bench/src/rpc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs index 2fcfd569a..d182ae2f9 100644 --- a/crates/l2/prover/bench/src/rpc.rs +++ b/crates/l2/prover/bench/src/rpc.rs @@ -29,7 +29,7 @@ pub async fn get_block(rpc_url: &str, block_number: &usize) -> Result() .await .map_err(|err| err.to_string()) - .and_then(handle_request) + .and_then(handle_response) .and_then(|result| serde_json::from_value::(result).map_err(|err| err.to_string())) .and_then(|hex_encoded_block| { hex::decode(hex_encoded_block.trim_start_matches("0x")).map_err(|err| err.to_string()) @@ -79,7 +79,7 @@ pub async fn get_account( .json::() .await .map_err(|err| err.to_string()) - .and_then(handle_request) + .and_then(handle_response) .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string()))?; Ok(AccountState { @@ -100,7 +100,7 @@ pub async fn get_account( }) } -fn handle_request(response: serde_json::Value) -> Result { +fn handle_response(response: serde_json::Value) -> Result { response.get("result").cloned().ok_or_else(|| { let final_error = response .get("error") From eb0cd4198b33b4a009d35dfa38adfae2a3b67efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 3 Dec 2024 16:40:14 -0300 Subject: [PATCH 10/20] fetch storage --- crates/l2/prover/bench/src/main.rs | 44 +++++++++++++++++----------- crates/l2/prover/bench/src/rpc.rs | 46 +++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 23 deletions(-) diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index 3f2872797..4c65ea483 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -1,3 +1,5 @@ +use std::collections::HashMap; + use bench::rpc::{get_account, get_block}; use clap::Parser; use ethrex_vm::{execution_db::touched_state::get_touched_state, SpecId}; @@ -29,32 +31,44 @@ async fn main() { .await .expect("failed to fetch block"); - println!("pre-executing transactions to get touched state keys"); + println!("pre-executing transactions to get touched state"); let touched_state = get_touched_state(&block, MAINNET_CHAIN_ID, MAINNET_SPEC_ID) .expect("failed to get touched state"); println!("fetching touched state values"); - let mut accounts = Vec::with_capacity(touched_state.len()); + let mut accounts = HashMap::new(); + let mut storages = HashMap::new(); let rate_limiter = RateLimiter::new(std::time::Duration::from_secs(1)); let mut fetched_accs = 0; for request_chunk in touched_state.chunks(RPC_RATE_LIMIT) { - let rate_limited = rate_limiter.throttle(|| async { - join_all( - request_chunk - .iter() - .map(|(address, _)| get_account(&rpc_url, &block_number, address)), - ) - .await - }); + // retrieve account state and its storage by fetching account proof + let account_and_storage_futures = + request_chunk.iter().map(|(address, storage_keys)| async { + let request = get_account( + &rpc_url, + &block_number, + &address.clone(), + &storage_keys.clone(), + ) + .await?; + Ok(((*address, request.0), (*address, request.1))) + }); - let account_chunk = rate_limited + let account_and_storage = rate_limiter + .throttle(|| async { join_all(account_and_storage_futures).await }) .await .into_iter() - .collect::, String>>() - .expect("failed to fetch accounts"); + .collect::, Vec<_>), String>>() + .expect("failed to fetch accounts and storage"); - accounts.extend(account_chunk); + let (account, storage) = account_and_storage; + accounts.extend(account); + storages.extend( + storage.into_iter().map(|(address, storage)| { + (address, storage.into_iter().collect::>()) + }), + ); fetched_accs += request_chunk.len(); println!( @@ -64,8 +78,6 @@ async fn main() { ); } - // TODO: storage - // 4. create prover program input and execute. Measure time. // 5. invoke rsp and execute too. Save in cache } diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs index d182ae2f9..0646dd8cb 100644 --- a/crates/l2/prover/bench/src/rpc.rs +++ b/crates/l2/prover/bench/src/rpc.rs @@ -1,6 +1,6 @@ use ethrex_core::{ types::{AccountState, Block}, - Address, + Address, U256, }; use ethrex_rlp::decode::RLPDecode; @@ -45,18 +45,23 @@ pub async fn get_account( rpc_url: &str, block_number: &usize, address: &Address, -) -> Result { + storage_keys: &[U256], +) -> Result<(AccountState, Vec<(U256, U256)>), String> { let client = reqwest::Client::new(); let block_number = format!("0x{block_number:x}"); let address = format!("0x{address:x}"); + let storage_keys = storage_keys + .iter() + .map(|key| format!("0x{key:x}")) + .collect::>(); let request = &json!( { "id": 1, "jsonrpc": "2.0", "method": "eth_getProof", - "params":[address, [], block_number] + "params":[address, storage_keys, block_number] } ); let response = client @@ -73,6 +78,13 @@ pub async fn get_account( code_hash: String, nonce: String, storage_hash: String, + storage_proof: Vec, + } + + #[derive(Deserialize)] + struct StorageProof { + key: String, + value: String, } let account_proof: AccountProof = response @@ -82,7 +94,24 @@ pub async fn get_account( .and_then(handle_response) .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string()))?; - Ok(AccountState { + let storage_key_values = account_proof + .storage_proof + .into_iter() + .map(|proof| -> Result<_, String> { + Ok(( + proof + .key + .parse() + .map_err(|_| "failed to parse storage value".to_string())?, + proof + .value + .parse() + .map_err(|_| "failed to parse storage value".to_string())?, + )) + }) + .collect::, _>>()?; + + let account_state = AccountState { nonce: u64::from_str_radix(account_proof.nonce.trim_start_matches("0x"), 16) .map_err(|_| "failed to parse nonce".to_string())?, balance: account_proof @@ -97,7 +126,9 @@ pub async fn get_account( .code_hash .parse() .map_err(|_| "failed to parse code hash".to_string())?, - }) + }; + + Ok((account_state, storage_key_values)) } fn handle_response(response: serde_json::Value) -> Result { @@ -105,12 +136,12 @@ fn handle_response(response: serde_json::Value) -> Result(message) @@ -146,6 +177,7 @@ mod test { RPC_URL, &BLOCK_NUMBER, &Address::from_slice(&hex::decode(VITALIK_ADDR).unwrap()), + &[], ) .await .unwrap(); From 5674cdf27406d137aa89233f8d1b00b2d2865faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 3 Dec 2024 19:02:17 -0300 Subject: [PATCH 11/20] fetch proofs, create executiondb --- Cargo.lock | 81 +++++++++++++- crates/l2/prover/bench/src/constants.rs | 37 +++++++ crates/l2/prover/bench/src/lib.rs | 1 + crates/l2/prover/bench/src/main.rs | 98 ++++++++++++----- crates/l2/prover/bench/src/rpc.rs | 136 +++++++++++++++--------- crates/vm/execution_db.rs | 56 +++++++++- 6 files changed, 330 insertions(+), 79 deletions(-) create mode 100644 crates/l2/prover/bench/src/constants.rs diff --git a/Cargo.lock b/Cargo.lock index 219883f08..77b858810 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -701,6 +701,26 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "async-stdin" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1ff8b5d9b5ec29e0f49583ba71847b8c8888b67a8510133048a380903aa6822" +dependencies = [ + "tokio", +] + +[[package]] +name = "async-throttle" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c99532de164435a0b91279e715bff4fa0d164643b409a67761907ffc210ee8f" +dependencies = [ + "backoff", + "dashmap 5.5.3", + "tokio", +] + [[package]] name = "async-trait" version = "0.1.83" @@ -835,6 +855,20 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "futures-core", + "getrandom", + "instant", + "pin-project-lite", + "rand 0.8.5", + "tokio", +] + [[package]] name = "backtrace" version = "0.3.74" @@ -891,6 +925,7 @@ dependencies = [ "serde", "serde_json", "tokio", + "tokio-utils", ] [[package]] @@ -1604,6 +1639,19 @@ dependencies = [ "serde", ] +[[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 0.9.10", +] + [[package]] name = "datatest-stable" version = "0.2.9" @@ -5746,6 +5794,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "shutdown-async" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2799e69bde7e68bedd86c6d94bffa783219114f1f31435ddda61f4aeba348ff" +dependencies = [ + "tokio", +] + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -6258,7 +6315,7 @@ dependencies = [ "aho-corasick 0.7.20", "clap 2.34.0", "crossbeam-channel", - "dashmap", + "dashmap 4.0.2", "dirs 3.0.2", "encoding_rs_io", "env_logger", @@ -6342,6 +6399,18 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-utils" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de75f75f464153a50fe48b9675360e3cf2ae1d7d81f9751363bd2ee4888f5ce8" +dependencies = [ + "async-stdin", + "async-throttle", + "shutdown-async", + "tub", +] + [[package]] name = "toml" version = "0.5.11" @@ -6490,6 +6559,16 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tub" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bca43faba247bc76eb1d6c1b8b561e4a1c5bdd427cc3d7a007faabea75c683a" +dependencies = [ + "crossbeam-queue", + "tokio", +] + [[package]] name = "twox-hash" version = "1.6.3" diff --git a/crates/l2/prover/bench/src/constants.rs b/crates/l2/prover/bench/src/constants.rs new file mode 100644 index 000000000..9171aaf62 --- /dev/null +++ b/crates/l2/prover/bench/src/constants.rs @@ -0,0 +1,37 @@ +// Blockchain related constants + +use ethrex_core::types::ChainConfig; +use revm_primitives::SpecId; + +// Chain config for different forks as defined on https://ethereum.github.io/execution-spec-tests/v3.0.0/consuming_tests/common_types/#fork +pub static CANCUN_CONFIG: ChainConfig = ChainConfig { + chain_id: 1_u64, + homestead_block: Some(0), + dao_fork_block: Some(0), + dao_fork_support: true, + eip150_block: Some(0), + eip155_block: Some(0), + eip158_block: Some(0), + byzantium_block: Some(0), + constantinople_block: Some(0), + petersburg_block: Some(0), + istanbul_block: Some(0), + muir_glacier_block: Some(0), + berlin_block: Some(0), + london_block: Some(0), + arrow_glacier_block: Some(0), + gray_glacier_block: Some(0), + merge_netsplit_block: Some(0), + terminal_total_difficulty: Some(0), + shanghai_time: Some(0), + cancun_time: Some(0), + prague_time: None, + terminal_total_difficulty_passed: false, + verkle_time: None, +}; +pub const MAINNET_CHAIN_ID: u64 = 0x1; +pub const MAINNET_SPEC_ID: SpecId = SpecId::CANCUN; + +// RPC related constants + +pub const RPC_RATE_LIMIT: usize = 100; // requests per second diff --git a/crates/l2/prover/bench/src/lib.rs b/crates/l2/prover/bench/src/lib.rs index 06a3fd023..bc1bcdc5c 100644 --- a/crates/l2/prover/bench/src/lib.rs +++ b/crates/l2/prover/bench/src/lib.rs @@ -1 +1,2 @@ +pub mod constants; pub mod rpc; diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index 4c65ea483..dbc980f09 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -1,16 +1,14 @@ use std::collections::HashMap; -use bench::rpc::{get_account, get_block}; +use bench::{ + constants::{CANCUN_CONFIG, MAINNET_CHAIN_ID, MAINNET_SPEC_ID, RPC_RATE_LIMIT}, + rpc::{get_account, get_block, Account, NodeRLP}, +}; use clap::Parser; -use ethrex_vm::{execution_db::touched_state::get_touched_state, SpecId}; +use ethrex_vm::execution_db::{touched_state::get_touched_state, ExecutionDB}; use futures_util::future::join_all; use tokio_utils::RateLimiter; -const MAINNET_CHAIN_ID: u64 = 0x1; -const MAINNET_SPEC_ID: SpecId = SpecId::CANCUN; - -const RPC_RATE_LIMIT: usize = 100; // requests per second - #[derive(Parser, Debug)] struct Args { #[arg(short, long)] @@ -38,37 +36,50 @@ async fn main() { println!("fetching touched state values"); let mut accounts = HashMap::new(); let mut storages = HashMap::new(); + let mut account_proofs = Vec::new(); + let mut storages_proofs: HashMap<_, Vec> = HashMap::new(); let rate_limiter = RateLimiter::new(std::time::Duration::from_secs(1)); let mut fetched_accs = 0; for request_chunk in touched_state.chunks(RPC_RATE_LIMIT) { - // retrieve account state and its storage by fetching account proof - let account_and_storage_futures = - request_chunk.iter().map(|(address, storage_keys)| async { - let request = get_account( + let account_futures = request_chunk.iter().map(|(address, storage_keys)| async { + Ok(( + *address, + get_account( &rpc_url, &block_number, &address.clone(), &storage_keys.clone(), ) - .await?; - Ok(((*address, request.0), (*address, request.1))) - }); + .await?, + )) + }); - let account_and_storage = rate_limiter - .throttle(|| async { join_all(account_and_storage_futures).await }) + let fetched_accounts = rate_limiter + .throttle(|| async { join_all(account_futures).await }) .await .into_iter() - .collect::, Vec<_>), String>>() - .expect("failed to fetch accounts and storage"); + .collect::, String>>() + .expect("failed to fetch accounts"); - let (account, storage) = account_and_storage; - accounts.extend(account); - storages.extend( - storage.into_iter().map(|(address, storage)| { - (address, storage.into_iter().collect::>()) - }), - ); + for ( + address, + Account { + account_state, + storage, + account_proof, + storage_proofs, + }, + ) in fetched_accounts + { + accounts.insert(address.to_owned(), account_state); + storages.insert(address.to_owned(), storage); + account_proofs.extend(account_proof); + storages_proofs + .entry(address) + .or_default() + .extend(storage_proofs.into_iter().flatten()); + } fetched_accs += request_chunk.len(); println!( @@ -78,6 +89,43 @@ async fn main() { ); } + println!("building program input"); + let storages = storages + .into_iter() + .map(|(address, storage)| (address, storage.into_iter().collect())) + .collect(); + + let account_proofs = { + let root_node = if !account_proofs.is_empty() { + Some(account_proofs.swap_remove(0)) + } else { + None + }; + (root_node, account_proofs) + }; + + let storages_proofs = storages_proofs + .into_iter() + .map(|(address, mut proofs)| { + (address, { + let root_node = if !proofs.is_empty() { + Some(proofs.swap_remove(0)) + } else { + None + }; + (root_node, proofs) + }) + }) + .collect(); + + let db = ExecutionDB::new( + accounts, + storages, + account_proofs, + storages_proofs, + CANCUN_CONFIG, + ); + // 4. create prover program input and execute. Measure time. // 5. invoke rsp and execute too. Save in cache } diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs index 0646dd8cb..1ed0a9cdc 100644 --- a/crates/l2/prover/bench/src/rpc.rs +++ b/crates/l2/prover/bench/src/rpc.rs @@ -4,9 +4,18 @@ use ethrex_core::{ }; use ethrex_rlp::decode::RLPDecode; -use serde::Deserialize; +use serde::{de::DeserializeOwned, Deserialize}; use serde_json::json; +pub type NodeRLP = Vec; + +pub struct Account { + pub account_state: AccountState, + pub storage: Vec<(U256, U256)>, + pub account_proof: Vec, + pub storage_proofs: Vec>, +} + pub async fn get_block(rpc_url: &str, block_number: &usize) -> Result { let client = reqwest::Client::new(); @@ -29,11 +38,8 @@ pub async fn get_block(rpc_url: &str, block_number: &usize) -> Result() .await .map_err(|err| err.to_string()) - .and_then(handle_response) - .and_then(|result| serde_json::from_value::(result).map_err(|err| err.to_string())) - .and_then(|hex_encoded_block| { - hex::decode(hex_encoded_block.trim_start_matches("0x")).map_err(|err| err.to_string()) - }) + .and_then(get_result) + .and_then(decode_hex) .and_then(|encoded_block| { Block::decode_unfinished(&encoded_block) .map_err(|err| err.to_string()) @@ -46,7 +52,7 @@ pub async fn get_account( block_number: &usize, address: &Address, storage_keys: &[U256], -) -> Result<(AccountState, Vec<(U256, U256)>), String> { +) -> Result { let client = reqwest::Client::new(); let block_number = format!("0x{block_number:x}"); @@ -79,79 +85,105 @@ pub async fn get_account( nonce: String, storage_hash: String, storage_proof: Vec, + account_proof: Vec, } #[derive(Deserialize)] struct StorageProof { key: String, value: String, + proof: Vec, } - let account_proof: AccountProof = response + let AccountProof { + balance, + code_hash, + nonce, + storage_hash, + storage_proof, + account_proof, + } = response .json::() .await .map_err(|err| err.to_string()) - .and_then(handle_response) - .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string()))?; + .and_then(get_result)?; - let storage_key_values = account_proof - .storage_proof + let (storage, storage_proofs) = storage_proof .into_iter() .map(|proof| -> Result<_, String> { - Ok(( - proof - .key - .parse() - .map_err(|_| "failed to parse storage value".to_string())?, - proof - .value - .parse() - .map_err(|_| "failed to parse storage value".to_string())?, - )) + let key = proof + .key + .parse() + .map_err(|_| "failed to parse storage key".to_string())?; + let value = proof + .value + .parse() + .map_err(|_| "failed to parse storage value".to_string())?; + let proofs = proof + .proof + .into_iter() + .map(decode_hex) + .collect::, _>>()?; + Ok(((key, value), proofs)) }) - .collect::, _>>()?; + .collect::, Vec<_>), _>>()?; let account_state = AccountState { - nonce: u64::from_str_radix(account_proof.nonce.trim_start_matches("0x"), 16) + nonce: u64::from_str_radix(nonce.trim_start_matches("0x"), 16) .map_err(|_| "failed to parse nonce".to_string())?, - balance: account_proof - .balance + balance: balance .parse() .map_err(|_| "failed to parse balance".to_string())?, - storage_root: account_proof - .storage_hash + storage_root: storage_hash .parse() .map_err(|_| "failed to parse storage root".to_string())?, - code_hash: account_proof - .code_hash + code_hash: code_hash .parse() .map_err(|_| "failed to parse code hash".to_string())?, }; - Ok((account_state, storage_key_values)) + let account_proof = account_proof + .into_iter() + .map(decode_hex) + .collect::, String>>()?; + + Ok(Account { + account_state, + storage, + account_proof, + storage_proofs, + }) } -fn handle_response(response: serde_json::Value) -> Result { - response.get("result").cloned().ok_or_else(|| { - let final_error = response - .get("error") - .cloned() - .ok_or("request failed (result field not found) but error is missing".to_string()) - .and_then(|error| { - error - .get("message") - .cloned() - .ok_or("request failed, found error field but message is missing".to_string()) - }) - .and_then(|message| { - serde_json::from_value::(message) - .map_err(|err| format!("failed to deserialize error message: {err}")) - }); - match final_error { - Ok(request_err) => request_err, - Err(json_err) => json_err, - } - }) +fn get_result(response: serde_json::Value) -> Result { + response + .get("result") + .cloned() + .ok_or_else(|| { + let final_error = response + .get("error") + .cloned() + .ok_or("request failed (result field not found) but error is missing".to_string()) + .and_then(|error| { + error.get("message").cloned().ok_or( + "request failed, found error field but message is missing".to_string(), + ) + }) + .and_then(|message| { + serde_json::from_value::(message) + .map_err(|err| format!("failed to deserialize error message: {err}")) + }); + match final_error { + Ok(request_err) => request_err, + Err(json_err) => json_err, + } + }) + .and_then(|result| serde_json::from_value(result).map_err(|err| err.to_string())) +} + +fn decode_hex(hex: String) -> Result, String> { + hex::decode(hex.trim_start_matches("0x")) + .map_err(|err| format!("failed to decode hex string: {err}")) } #[cfg(test)] diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index bc882e150..be090274e 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use ethereum_types::H160; use ethrex_core::{ types::{AccountState, Block, ChainConfig}, - H256, + Address, H256, U256, }; use ethrex_rlp::encode::RLPEncode; use ethrex_storage::{hash_address, hash_key, Store}; @@ -44,6 +44,60 @@ pub struct ExecutionDB { } impl ExecutionDB { + /// Creates a new [ExecutionDB] from raw values. + pub fn new( + accounts: HashMap, + storage: HashMap>, + account_proofs: (Option, Vec), + storage_proofs: HashMap, Vec)>, + chain_config: ChainConfig, + ) -> Self { + let accounts = accounts + .into_iter() + .map(|(address, value)| (RevmAddress::from_slice(address.as_bytes()), value)) + .collect(); + + let storage = storage + .into_iter() + .map(|(address, storage)| { + ( + RevmAddress::from_slice(address.as_bytes()), + storage + .into_iter() + .map(|(key, value)| { + let mut key_bytes = Vec::new(); + let mut value_bytes = Vec::new(); + + key.to_big_endian(&mut key_bytes); + value.to_big_endian(&mut value_bytes); + + ( + RevmU256::from_be_slice(&key_bytes), + RevmU256::from_be_slice(&value_bytes), + ) + }) + .collect(), + ) + }) + .collect(); + + let pruned_state_trie = account_proofs; + let pruned_storage_tries = storage_proofs + .into_iter() + .map(|(address, proofs)| (H160::from_slice(address.as_bytes()), proofs)) + .collect(); + + Self { + accounts, + code: HashMap::new(), + storage, + block_hashes: HashMap::new(), + chain_config, + pruned_state_trie, + pruned_storage_tries, + } + } + /// Creates a database by executing a block, without performing any validation. pub fn from_exec(block: &Block, store: &Store) -> Result { // TODO: perform validation to exit early From d103f2089d711729de4bcaf1e8689d5ff6bf71bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 4 Dec 2024 10:43:35 -0300 Subject: [PATCH 12/20] fix key value conversion --- crates/vm/execution_db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index be090274e..7b058da78 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -65,8 +65,8 @@ impl ExecutionDB { storage .into_iter() .map(|(key, value)| { - let mut key_bytes = Vec::new(); - let mut value_bytes = Vec::new(); + let mut key_bytes = [0; 32]; + let mut value_bytes = [0; 32]; key.to_big_endian(&mut key_bytes); value.to_big_endian(&mut value_bytes); From bbe45960b3e381640f64974a006ef33f64b1a442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 4 Dec 2024 12:01:46 -0300 Subject: [PATCH 13/20] execute block --- Cargo.lock | 271 +++++++++++++++-------------- crates/l2/prover/bench/Cargo.toml | 4 + crates/l2/prover/bench/src/main.rs | 22 ++- crates/l2/prover/bench/src/rpc.rs | 6 +- crates/l2/prover/src/prover.rs | 6 +- 5 files changed, 162 insertions(+), 147 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 77b858810..17e2f15a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-consensus" @@ -208,7 +208,7 @@ dependencies = [ "foldhash", "hashbrown 0.15.2", "hex-literal", - "indexmap 2.6.0", + "indexmap 2.7.0", "itoa", "k256", "keccak-asm", @@ -216,7 +216,7 @@ dependencies = [ "proptest", "rand 0.8.5", "ruint", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "serde", "sha3", "tiny-keccak", @@ -241,7 +241,7 @@ checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -299,7 +299,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -311,11 +311,11 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck 0.5.0", - "indexmap 2.6.0", + "indexmap 2.7.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -331,7 +331,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "syn-solidity", ] @@ -433,9 +433,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" [[package]] name = "approx" @@ -729,7 +729,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -767,7 +767,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -912,8 +912,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" name = "bench" version = "0.1.0" dependencies = [ - "clap 4.5.21", + "clap 4.5.22", "ethrex-core", + "ethrex-prover", "ethrex-rlp", "ethrex-vm", "futures-util", @@ -952,7 +953,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1067,7 +1068,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1109,7 +1110,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1176,9 +1177,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "jobserver", "libc", @@ -1290,9 +1291,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.21" +version = "4.5.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +checksum = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b" dependencies = [ "clap_builder", "clap_derive", @@ -1300,9 +1301,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.21" +version = "4.5.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +checksum = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1" dependencies = [ "anstream", "anstyle", @@ -1316,7 +1317,7 @@ version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" dependencies = [ - "clap 4.5.21", + "clap 4.5.22", ] [[package]] @@ -1328,7 +1329,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1614,7 +1615,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1625,7 +1626,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1714,7 +1715,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1727,7 +1728,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1747,7 +1748,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "unicode-xid", ] @@ -1849,7 +1850,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1935,7 +1936,7 @@ name = "ef_tests-levm" version = "0.1.0" dependencies = [ "bytes", - "clap 4.5.21", + "clap 4.5.22", "clap_complete", "colored", "ethrex-blockchain", @@ -1951,7 +1952,7 @@ dependencies = [ "serde", "serde_json", "spinoff", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -2018,7 +2019,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2109,7 +2110,7 @@ dependencies = [ "anyhow", "bytes", "cfg-if", - "clap 4.5.21", + "clap 4.5.22", "directories", "ethrex-blockchain", "ethrex-core", @@ -2128,7 +2129,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-subscriber 0.3.18", + "tracing-subscriber 0.3.19", ] [[package]] @@ -2239,7 +2240,7 @@ dependencies = [ "serde_json", "sha3", "spinoff", - "thiserror 2.0.3", + "thiserror 2.0.4", "walkdir", ] @@ -2290,7 +2291,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-subscriber 0.3.18", + "tracing-subscriber 0.3.19", "zkvm_interface", ] @@ -2331,7 +2332,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-subscriber 0.3.18", + "tracing-subscriber 0.3.19", ] [[package]] @@ -2442,7 +2443,7 @@ name = "ethrex_l2_cli" version = "0.1.0" dependencies = [ "bytes", - "clap 4.5.21", + "clap 4.5.22", "clap_complete", "colored", "dialoguer", @@ -2467,7 +2468,7 @@ dependencies = [ "tokio", "toml 0.8.19", "tracing", - "tracing-subscriber 0.3.18", + "tracing-subscriber 0.3.19", ] [[package]] @@ -2613,7 +2614,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2705,7 +2706,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2864,7 +2865,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.6.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -3018,9 +3019,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -3289,7 +3290,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3370,7 +3371,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3398,9 +3399,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -3478,10 +3479,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -3586,7 +3588,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3600,15 +3602,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.166" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets 0.52.6", @@ -3632,7 +3634,7 @@ dependencies = [ "bitflags 2.6.0", "derive_more 1.0.0", "impls", - "indexmap 2.6.0", + "indexmap 2.7.0", "libc", "mdbx-sys", "parking_lot 0.12.3", @@ -3657,7 +3659,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc0bda45ed5b3a2904262c1bb91e526127aa70e7ef3758aba2ef93cf896b9b58" dependencies = [ - "clap 4.5.21", + "clap 4.5.22", "escape8259", "termcolor", "threadpool", @@ -3760,7 +3762,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3833,11 +3835,10 @@ checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -4116,7 +4117,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4160,29 +4161,28 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.7.0" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be4817d39f3272f69c59fe05d0535ae6456c2dc2fa1ba02910296c7e0a5c590" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", - "rustversion", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "3.7.0" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.89", + "syn 1.0.109", ] [[package]] @@ -4295,7 +4295,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4480,7 +4480,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4532,7 +4532,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4565,10 +4565,10 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "rustls", "socket2", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", "tracing", ] @@ -4583,11 +4583,11 @@ dependencies = [ "getrandom", "rand 0.8.5", "ring", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.3", + "thiserror 2.0.4", "tinyvec", "tracing", "web-time", @@ -5061,7 +5061,7 @@ dependencies = [ "risc0-zkp", "risc0-zkvm-platform", "serde", - "syn 2.0.89", + "syn 2.0.90", "tracing", ] @@ -5375,9 +5375,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" [[package]] name = "rustc-hex" @@ -5524,7 +5524,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5551,7 +5551,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5654,7 +5654,7 @@ checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5663,7 +5663,7 @@ version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "itoa", "memchr", "ryu", @@ -5711,7 +5711,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -5728,7 +5728,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5970,7 +5970,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6035,9 +6035,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.89" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -6053,7 +6053,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6079,7 +6079,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6193,11 +6193,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl 2.0.4", ] [[package]] @@ -6208,18 +6208,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] name = "thiserror-impl" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6243,9 +6243,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -6264,9 +6264,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -6336,9 +6336,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.41.1" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -6360,7 +6360,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6386,9 +6386,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -6447,7 +6447,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -6502,7 +6502,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6537,9 +6537,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -6612,7 +6612,7 @@ checksum = "70b20a22c42c8f1cd23ce5e34f165d4d37038f5b663ad20fb6adbdf029172483" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6826,9 +6826,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -6837,36 +6837,37 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6874,22 +6875,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "wasm-streams" @@ -6906,9 +6907,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" dependencies = [ "js-sys", "wasm-bindgen", @@ -7231,7 +7232,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "synstructure", ] @@ -7253,7 +7254,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7273,7 +7274,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "synstructure", ] @@ -7294,7 +7295,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7316,7 +7317,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7330,9 +7331,9 @@ dependencies = [ "crossbeam-utils", "displaydoc", "flate2", - "indexmap 2.6.0", + "indexmap 2.7.0", "memchr", - "thiserror 2.0.3", + "thiserror 2.0.4", "zopfli", ] diff --git a/crates/l2/prover/bench/Cargo.toml b/crates/l2/prover/bench/Cargo.toml index 07754e3d4..e151619eb 100644 --- a/crates/l2/prover/bench/Cargo.toml +++ b/crates/l2/prover/bench/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" ethrex-core.workspace = true ethrex-rlp.workspace = true ethrex-vm.workspace = true +ethrex-prover.workspace = true #rsp-host-executor = { git = "https://github.com/succinctlabs/rsp" } #rsp-client-executor = { git = "https://github.com/succinctlabs/rsp" } @@ -33,3 +34,6 @@ revm-primitives = { version = "10.0.0", features = [ ], default-features = false } futures-util = "0.3.31" tokio-utils = "0.1.2" + +[features] +default = ["ethrex-prover/build_zkvm"] diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index dbc980f09..5a686d71f 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -5,6 +5,7 @@ use bench::{ rpc::{get_account, get_block, Account, NodeRLP}, }; use clap::Parser; +use ethrex_prover_lib::prover::{ProgramInput, Prover}; use ethrex_vm::execution_db::{touched_state::get_touched_state, ExecutionDB}; use futures_util::future::join_all; use tokio_utils::RateLimiter; @@ -24,10 +25,14 @@ async fn main() { block_number, } = Args::parse(); - println!("fetching block {block_number}"); - let block = get_block(&rpc_url, &block_number) + println!("fetching block {block_number} and its parent header"); + let block = get_block(&rpc_url, block_number) .await .expect("failed to fetch block"); + let parent_block_header = get_block(&rpc_url, block_number - 1) + .await + .expect("failed to fetch block") + .header; println!("pre-executing transactions to get touched state"); let touched_state = get_touched_state(&block, MAINNET_CHAIN_ID, MAINNET_SPEC_ID) @@ -47,7 +52,7 @@ async fn main() { *address, get_account( &rpc_url, - &block_number, + block_number, &address.clone(), &storage_keys.clone(), ) @@ -126,6 +131,13 @@ async fn main() { CANCUN_CONFIG, ); - // 4. create prover program input and execute. Measure time. - // 5. invoke rsp and execute too. Save in cache + let mut prover = Prover::new(); + let receipt = prover + .prove(ProgramInput { + block, + parent_block_header, + db, + }) + .expect("proving failed"); + let execution_gas = prover.get_gas().expect("failed to get execution gas"); } diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs index 1ed0a9cdc..188a8f970 100644 --- a/crates/l2/prover/bench/src/rpc.rs +++ b/crates/l2/prover/bench/src/rpc.rs @@ -16,7 +16,7 @@ pub struct Account { pub storage_proofs: Vec>, } -pub async fn get_block(rpc_url: &str, block_number: &usize) -> Result { +pub async fn get_block(rpc_url: &str, block_number: usize) -> Result { let client = reqwest::Client::new(); let block_number = format!("0x{block_number:x}"); @@ -49,7 +49,7 @@ pub async fn get_block(rpc_url: &str, block_number: &usize) -> Result Result { @@ -207,7 +207,7 @@ mod test { async fn get_account_works() { get_account( RPC_URL, - &BLOCK_NUMBER, + BLOCK_NUMBER, &Address::from_slice(&hex::decode(VITALIK_ADDR).unwrap()), &[], ) diff --git a/crates/l2/prover/src/prover.rs b/crates/l2/prover/src/prover.rs index f366a61b8..54898408d 100644 --- a/crates/l2/prover/src/prover.rs +++ b/crates/l2/prover/src/prover.rs @@ -1,10 +1,8 @@ use tracing::info; // risc0 -use zkvm_interface::{ - io::{ProgramInput, ProgramOutput}, - methods::{ZKVM_PROGRAM_ELF, ZKVM_PROGRAM_ID}, -}; +pub use zkvm_interface::io::{ProgramInput, ProgramOutput}; +use zkvm_interface::methods::{ZKVM_PROGRAM_ELF, ZKVM_PROGRAM_ID}; use risc0_zkvm::{default_prover, ExecutorEnv, ProverOpts}; From 6405e9d6463b1c5640ad985d0c8422a47a0d4e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 4 Dec 2024 17:30:33 -0300 Subject: [PATCH 14/20] fix invalid state root error --- crates/l2/prover/bench/src/main.rs | 8 +++- crates/storage/trie/trie.rs | 7 +++- crates/vm/errors.rs | 4 +- crates/vm/execution_db.rs | 63 ++++++++++++++++++------------ 4 files changed, 52 insertions(+), 30 deletions(-) diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index 5a686d71f..114dc41e5 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -97,7 +97,13 @@ async fn main() { println!("building program input"); let storages = storages .into_iter() - .map(|(address, storage)| (address, storage.into_iter().collect())) + .filter_map(|(address, storage)| { + if !storage.is_empty() { + Some((address, storage.into_iter().collect())) + } else { + None + } + }) .collect(); let account_proofs = { diff --git a/crates/storage/trie/trie.rs b/crates/storage/trie/trie.rs index 843c9ae82..5a8753837 100644 --- a/crates/storage/trie/trie.rs +++ b/crates/storage/trie/trie.rs @@ -198,7 +198,7 @@ impl Trie { Ok((Some(root_node.encode_raw()), node_path)) } - /// Creates a cached Trie (with [NullTrieDB]) from a list of encoded nodes. + /// Creates a stateless trie from a list of encoded nodes. /// Generally used in conjuction with [Trie::get_proofs]. pub fn from_nodes( root_node: Option<&NodeRLP>, @@ -218,6 +218,11 @@ impl Trie { Ok(trie) } + /// Creates an empty, stateless trie. + pub fn empty() -> Self { + Trie::stateless() + } + /// Builds an in-memory trie from the given elements and returns its hash pub fn compute_hash_from_unsorted_iter( iter: impl Iterator, diff --git a/crates/vm/errors.rs b/crates/vm/errors.rs index 4fbd723ed..3cf2a646d 100644 --- a/crates/vm/errors.rs +++ b/crates/vm/errors.rs @@ -55,8 +55,8 @@ pub enum ExecutionDBError { MissingAccountInStateTrie(H160), #[error("Missing storage trie of account {0}")] MissingStorageTrie(H160), - #[error("Storage trie root for account {0} does not match account storage root")] - InvalidStorageTrieRoot(H160), + #[error("Storage trie root {1} for account {0} does not match account storage root {2}")] + InvalidStorageTrieRoot(H160, H256, H256), #[error("The pruned storage trie of account {0} is missing the storage key {1}")] MissingKeyInStorageTrie(H160, H256), #[error("Storage trie value for account {0} and key {1} does not match value stored in db")] diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index 7b058da78..08d4472d8 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -206,34 +206,45 @@ impl ExecutionDB { return Err(ExecutionDBError::MissingAccountInStateTrie(address)); } - let (storage_trie_root, storage_trie_nodes) = - self.pruned_storage_tries - .get(&address) - .ok_or(ExecutionDBError::MissingStorageTrie(address))?; - - // compare account storage root with storage trie root - let storage_trie = Trie::from_nodes(storage_trie_root.as_ref(), storage_trie_nodes)?; - if storage_trie.hash_no_commit() != account.storage_root { - return Err(ExecutionDBError::InvalidStorageTrieRoot(address)); - } - - // check all storage keys are in storage trie and compare values - let storage = self - .storage - .get(revm_address) - .ok_or(ExecutionDBError::StorageNotFound(*revm_address))?; - for (key, value) in storage { - let key = H256::from_slice(&key.to_be_bytes_vec()); - let value = H256::from_slice(&value.to_be_bytes_vec()); - let retrieved_value = storage_trie - .get(&hash_key(&key))? - .ok_or(ExecutionDBError::MissingKeyInStorageTrie(address, key))?; - if value.encode_to_vec() != retrieved_value { - return Err(ExecutionDBError::InvalidStorageTrieValue(address, key)); + // validate storage, note that an ExecutionDB only stores values relevant to some + // execution, so an account might have storage whilest there's none stored in + // self.storage[address] + match self.storage.get(revm_address) { + Some(storage) if !storage.is_empty() => { + // first get the tries + let (storage_trie_root, storage_trie_nodes) = self + .pruned_storage_tries + .get(&address) + .ok_or(ExecutionDBError::MissingStorageTrie(address))?; + + // compare account storage root with storage trie root + let storage_trie = + Trie::from_nodes(storage_trie_root.as_ref(), storage_trie_nodes)?; + let storage_root = storage_trie.hash_no_commit(); + if storage_root != account.storage_root { + return Err(ExecutionDBError::InvalidStorageTrieRoot( + address, + storage_root, + account.storage_root, + )); + } + + // check all storage keys are in storage trie and compare values + for (key, value) in storage { + let key = H256::from_slice(&key.to_be_bytes_vec()); + let value = H256::from_slice(&value.to_be_bytes_vec()); + let retrieved_value = storage_trie + .get(&hash_key(&key))? + .ok_or(ExecutionDBError::MissingKeyInStorageTrie(address, key))?; + if value.encode_to_vec() != retrieved_value { + return Err(ExecutionDBError::InvalidStorageTrieValue(address, key)); + } + } + + storage_tries.insert(address, storage_trie); } + _ => (), } - - storage_tries.insert(address, storage_trie); } Ok((state_trie, storage_tries)) From 47f7966eeeb4ecf80aabcce168fa054132832367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 4 Dec 2024 18:13:26 -0300 Subject: [PATCH 15/20] fix badly decoded store value --- crates/l2/prover/bench/src/rpc.rs | 7 +++++-- crates/vm/errors.rs | 9 ++++++--- crates/vm/execution_db.rs | 22 +++++++++++++++------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs index 188a8f970..d2f3d9519 100644 --- a/crates/l2/prover/bench/src/rpc.rs +++ b/crates/l2/prover/bench/src/rpc.rs @@ -182,8 +182,11 @@ fn get_result(response: serde_json::Value) -> Result Result, String> { - hex::decode(hex.trim_start_matches("0x")) - .map_err(|err| format!("failed to decode hex string: {err}")) + let mut trimmed = hex.trim_start_matches("0x").to_string(); + if trimmed.len() % 2 != 0 { + trimmed = "0".to_string() + &trimmed; + } + hex::decode(trimmed).map_err(|err| format!("failed to decode hex string: {err}")) } #[cfg(test)] diff --git a/crates/vm/errors.rs b/crates/vm/errors.rs index 3cf2a646d..816cbad7d 100644 --- a/crates/vm/errors.rs +++ b/crates/vm/errors.rs @@ -1,5 +1,6 @@ use ethereum_types::{H160, H256}; -use ethrex_core::types::BlockHash; +use ethrex_core::{types::BlockHash, U256}; +use ethrex_rlp::error::RLPDecodeError; use ethrex_storage::error::StoreError; use ethrex_trie::TrieError; use revm::primitives::{ @@ -31,6 +32,8 @@ pub enum ExecutionDBError { Evm(#[from] Box), // boxed to avoid cyclic definition #[error("Trie error: {0}")] Trie(#[from] TrieError), + #[error("RLP decode error: {0}")] + RlpDecode(#[from] RLPDecodeError), #[error("State proofs error: {0}")] StateProofs(#[from] StateProofsError), #[error("Account {0} not found")] @@ -59,8 +62,8 @@ pub enum ExecutionDBError { InvalidStorageTrieRoot(H160, H256, H256), #[error("The pruned storage trie of account {0} is missing the storage key {1}")] MissingKeyInStorageTrie(H160, H256), - #[error("Storage trie value for account {0} and key {1} does not match value stored in db")] - InvalidStorageTrieValue(H160, H256), + #[error("Storage trie value {1} for account {0} does not match value stored in db {2}")] + InvalidStorageTrieValue(H160, U256, U256), #[error("{0}")] Custom(String), } diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index 08d4472d8..3fa5200e1 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -5,7 +5,7 @@ use ethrex_core::{ types::{AccountState, Block, ChainConfig}, Address, H256, U256, }; -use ethrex_rlp::encode::RLPEncode; +use ethrex_rlp::decode::RLPDecode; use ethrex_storage::{hash_address, hash_key, Store}; use ethrex_trie::{NodeRLP, Trie}; use revm::{ @@ -232,12 +232,20 @@ impl ExecutionDB { // check all storage keys are in storage trie and compare values for (key, value) in storage { let key = H256::from_slice(&key.to_be_bytes_vec()); - let value = H256::from_slice(&value.to_be_bytes_vec()); - let retrieved_value = storage_trie - .get(&hash_key(&key))? - .ok_or(ExecutionDBError::MissingKeyInStorageTrie(address, key))?; - if value.encode_to_vec() != retrieved_value { - return Err(ExecutionDBError::InvalidStorageTrieValue(address, key)); + let value = U256::from_big_endian(&value.to_be_bytes_vec()); + + let retrieved_value = RLPDecode::decode( + &storage_trie + .get(&hash_key(&key))? + .ok_or(ExecutionDBError::MissingKeyInStorageTrie(address, key))?, + )?; + + if value != retrieved_value { + return Err(ExecutionDBError::InvalidStorageTrieValue( + address, + retrieved_value, + value, + )); } } From c88debd26632f37e2d6e43ce0120828ecb281918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 4 Dec 2024 18:31:28 -0300 Subject: [PATCH 16/20] fetch initial state from previous block --- crates/l2/prover/bench/src/main.rs | 2 +- crates/l2/prover/zkvm/interface/guest/src/main.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index 114dc41e5..b9edee4ac 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -52,7 +52,7 @@ async fn main() { *address, get_account( &rpc_url, - block_number, + block_number - 1, &address.clone(), &storage_keys.clone(), ) diff --git a/crates/l2/prover/zkvm/interface/guest/src/main.rs b/crates/l2/prover/zkvm/interface/guest/src/main.rs index e4c2569bf..ca1c85a43 100644 --- a/crates/l2/prover/zkvm/interface/guest/src/main.rs +++ b/crates/l2/prover/zkvm/interface/guest/src/main.rs @@ -25,7 +25,10 @@ fn main() { let initial_state_hash = state_trie.hash_no_commit(); if initial_state_hash != parent_block_header.state_root { - panic!("invalid initial state trie"); + panic!( + "invalid initial state trie root, got {} and expected {}", + initial_state_hash, parent_block_header.state_root + ); } let receipts = execute_block(&block, &mut state).expect("failed to execute block"); From 037ffd2e080791d9d5dcaea359301cd539ab25c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 4 Dec 2024 18:31:43 -0300 Subject: [PATCH 17/20] ignored touched new accounts --- crates/vm/execution_db.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index 3fa5200e1..4b50e382c 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -359,13 +359,17 @@ pub mod touched_state { if !account.is_touched() { continue; } + if account.is_created() { + continue; + } self.touched_state .push((address, account.storage.keys().cloned().collect())); } } } - /// Get all touched account addresses and storage keys during the execution of a block. + /// Get all touched account addresses and storage keys during the execution of a block, + /// ignoring newly created accounts. /// /// Generally used for building an [super::ExecutionDB]. pub fn get_touched_state( From d29dacc0e1a73af31b4ee5d707aa648ed7017aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Thu, 5 Dec 2024 16:06:03 -0300 Subject: [PATCH 18/20] remove accounts and storage not verified --- .../prover/zkvm/interface/guest/src/main.rs | 12 ++-- crates/vm/execution_db.rs | 67 ++++++++++++------- 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/crates/l2/prover/zkvm/interface/guest/src/main.rs b/crates/l2/prover/zkvm/interface/guest/src/main.rs index ca1c85a43..bbb3b9063 100644 --- a/crates/l2/prover/zkvm/interface/guest/src/main.rs +++ b/crates/l2/prover/zkvm/interface/guest/src/main.rs @@ -11,18 +11,18 @@ fn main() { let ProgramInput { block, parent_block_header, - db, + mut db, } = env::read(); - let mut state = EvmState::from(db.clone()); - - // Validate the block pre-execution - validate_block(&block, &parent_block_header, &state).expect("invalid block"); - // Validate the initial state let (mut state_trie, mut storage_tries) = db .build_tries() .expect("failed to build state and storage tries or state is not valid"); + let mut state = EvmState::from(db); + + // Validate the block pre-execution + validate_block(&block, &parent_block_header, &state).expect("invalid block"); + let initial_state_hash = state_trie.hash_no_commit(); if initial_state_hash != parent_block_header.state_root { panic!( diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index 4b50e382c..5d009beb4 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -16,6 +16,7 @@ use revm::{ DatabaseRef, }; use serde::{Deserialize, Serialize}; +use tracing::warn; use crate::{errors::ExecutionDBError, evm_state, execute_block, get_state_transitions}; @@ -37,10 +38,10 @@ pub struct ExecutionDB { pub chain_config: ChainConfig, /// encoded nodes to reconstruct a state trie, but only including relevant data (pruned). /// root node is stored separately from the rest. - pub pruned_state_trie: (Option, Vec), + pruned_state_trie: (Option, Vec), /// encoded nodes to reconstruct every storage trie, but only including relevant data (pruned) /// root nodes are stored separately from the rest. - pub pruned_storage_tries: HashMap, Vec)>, + pruned_storage_tries: HashMap, Vec)>, } impl ExecutionDB { @@ -193,17 +194,26 @@ impl ExecutionDB { /// Verifies that all data in [self] is included in the stored tries, and then builds the /// pruned tries from the stored nodes. - pub fn build_tries(&self) -> Result<(Trie, HashMap), ExecutionDBError> { + pub fn build_tries(&mut self) -> Result<(Trie, HashMap), ExecutionDBError> { let (state_trie_root, state_trie_nodes) = &self.pruned_state_trie; let state_trie = Trie::from_nodes(state_trie_root.as_ref(), state_trie_nodes)?; let mut storage_tries = HashMap::new(); + // we'll remove any accounts and storage which we don't have a proof of inclusion for + let mut accounts_to_remove = Vec::new(); + let mut storage_to_remove = Vec::new(); + for (revm_address, account) in &self.accounts { let address = H160::from_slice(revm_address.as_slice()); // check account is in state trie if state_trie.get(&hash_address(&address))?.is_none() { - return Err(ExecutionDBError::MissingAccountInStateTrie(address)); + warn!( + "Account {} not found in state trie, will be removed from ExecutionDB", + address + ); + accounts_to_remove.push(revm_address.to_owned()); + continue; } // validate storage, note that an ExecutionDB only stores values relevant to some @@ -230,22 +240,22 @@ impl ExecutionDB { } // check all storage keys are in storage trie and compare values - for (key, value) in storage { - let key = H256::from_slice(&key.to_be_bytes_vec()); + for (revm_key, value) in storage { + let key = H256::from_slice(&revm_key.to_be_bytes_vec()); let value = U256::from_big_endian(&value.to_be_bytes_vec()); - let retrieved_value = RLPDecode::decode( - &storage_trie - .get(&hash_key(&key))? - .ok_or(ExecutionDBError::MissingKeyInStorageTrie(address, key))?, - )?; - - if value != retrieved_value { - return Err(ExecutionDBError::InvalidStorageTrieValue( - address, - retrieved_value, - value, - )); + if let Some(retrieved_value) = &storage_trie.get(&hash_key(&key))? { + let retrieved_value = RLPDecode::decode(retrieved_value)?; + if value != retrieved_value { + return Err(ExecutionDBError::InvalidStorageTrieValue( + address, + retrieved_value, + value, + )); + } + } else { + warn!("Storage key {} not found in storage trie of account {}, will be removed from ExecutionDB", key, address); + storage_to_remove.push((revm_address.to_owned(), revm_key.to_owned())); } } @@ -255,6 +265,18 @@ impl ExecutionDB { } } + // remove any accounts adn storage which we don't have a proof of inclusion for + for address in accounts_to_remove { + self.accounts.remove(&address); + self.storage.remove(&address); + } + for (address, key) in storage_to_remove { + self.storage + .get_mut(&address) + .ok_or(ExecutionDBError::StorageNotFound(address))? + .remove(&key); + } + Ok((state_trie, storage_tries)) } } @@ -312,7 +334,8 @@ pub mod touched_state { use ethrex_core::{types::Block, Address, U256}; use revm::{inspectors::TracerEip3155, DatabaseCommit, DatabaseRef, Evm}; use revm_primitives::{ - Account as RevmAccount, Address as RevmAddress, EVMError, SpecId, U256 as RevmU256, + Account as RevmAccount, AccountStatus as RevmAccountStatus, Address as RevmAddress, + EVMError, SpecId, U256 as RevmU256, }; use crate::{block_env, tx_env}; @@ -356,12 +379,6 @@ pub mod touched_state { impl DatabaseCommit for TouchedStateDB { fn commit(&mut self, changes: revm_primitives::HashMap) { for (address, account) in changes { - if !account.is_touched() { - continue; - } - if account.is_created() { - continue; - } self.touched_state .push((address, account.storage.keys().cloned().collect())); } From 1d4dabe14f617c53a9ebf4e478a60945dbc5eb0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Fri, 6 Dec 2024 12:20:49 -0300 Subject: [PATCH 19/20] add account code to executiondb --- crates/l2/prover/bench/Cargo.toml | 9 +++--- crates/l2/prover/bench/src/main.rs | 10 ++++++- crates/l2/prover/bench/src/rpc.rs | 45 +++++++++++++++++++++++++++--- crates/vm/execution_db.rs | 24 ++++++++++++---- 4 files changed, 72 insertions(+), 16 deletions(-) diff --git a/crates/l2/prover/bench/Cargo.toml b/crates/l2/prover/bench/Cargo.toml index e151619eb..9f8820f7a 100644 --- a/crates/l2/prover/bench/Cargo.toml +++ b/crates/l2/prover/bench/Cargo.toml @@ -9,15 +9,14 @@ ethrex-rlp.workspace = true ethrex-vm.workspace = true ethrex-prover.workspace = true -#rsp-host-executor = { git = "https://github.com/succinctlabs/rsp" } -#rsp-client-executor = { git = "https://github.com/succinctlabs/rsp" } +serde.workspace = true +hex.workspace = true +serde_json.workspace = true +bytes.workspace = true tokio = { version = "1.21", default-features = false, features = ["full"] } reqwest = { version = "0.12.9", features = ["json"] } clap = { version = "4.5.21", features = ["derive"] } -serde.workspace = true -hex.workspace = true -serde_json.workspace = true revm = { version = "14.0.3", features = [ "serde", diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index b9edee4ac..72641f41a 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -41,6 +41,7 @@ async fn main() { println!("fetching touched state values"); let mut accounts = HashMap::new(); let mut storages = HashMap::new(); + let mut codes = Vec::new(); let mut account_proofs = Vec::new(); let mut storages_proofs: HashMap<_, Vec> = HashMap::new(); @@ -74,11 +75,15 @@ async fn main() { storage, account_proof, storage_proofs, + code, }, ) in fetched_accounts { accounts.insert(address.to_owned(), account_state); storages.insert(address.to_owned(), storage); + if let Some(code) = code { + codes.push(code); + } account_proofs.extend(account_proof); storages_proofs .entry(address) @@ -132,11 +137,14 @@ async fn main() { let db = ExecutionDB::new( accounts, storages, + codes, account_proofs, storages_proofs, CANCUN_CONFIG, - ); + ) + .expect("failed to create execution db"); + println!("proving"); let mut prover = Prover::new(); let receipt = prover .prove(ProgramInput { diff --git a/crates/l2/prover/bench/src/rpc.rs b/crates/l2/prover/bench/src/rpc.rs index d2f3d9519..5dc75c148 100644 --- a/crates/l2/prover/bench/src/rpc.rs +++ b/crates/l2/prover/bench/src/rpc.rs @@ -1,5 +1,6 @@ +use bytes::Bytes; use ethrex_core::{ - types::{AccountState, Block}, + types::{AccountState, Block, EMPTY_KECCACK_HASH}, Address, U256, }; use ethrex_rlp::decode::RLPDecode; @@ -14,6 +15,7 @@ pub struct Account { pub storage: Vec<(U256, U256)>, pub account_proof: Vec, pub storage_proofs: Vec>, + pub code: Option, } pub async fn get_block(rpc_url: &str, block_number: usize) -> Result { @@ -55,8 +57,8 @@ pub async fn get_account( ) -> Result { let client = reqwest::Client::new(); - let block_number = format!("0x{block_number:x}"); - let address = format!("0x{address:x}"); + let block_number_str = format!("0x{block_number:x}"); + let address_str = format!("0x{address:x}"); let storage_keys = storage_keys .iter() .map(|key| format!("0x{key:x}")) @@ -67,7 +69,7 @@ pub async fn get_account( "id": 1, "jsonrpc": "2.0", "method": "eth_getProof", - "params":[address, storage_keys, block_number] + "params":[address_str, storage_keys, block_number_str] } ); let response = client @@ -142,6 +144,12 @@ pub async fn get_account( .map_err(|_| "failed to parse code hash".to_string())?, }; + let code = if account_state.code_hash != *EMPTY_KECCACK_HASH { + Some(get_code(rpc_url, block_number, address).await?) + } else { + None + }; + let account_proof = account_proof .into_iter() .map(decode_hex) @@ -152,9 +160,38 @@ pub async fn get_account( storage, account_proof, storage_proofs, + code, }) } +async fn get_code(rpc_url: &str, block_number: usize, address: &Address) -> Result { + let client = reqwest::Client::new(); + + let block_number = format!("0x{block_number:x}"); + let address = format!("0x{address:x}"); + let request = &json!({ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getCode", + "params": [address, block_number] + }); + + let response = client + .post(rpc_url) + .json(request) + .send() + .await + .map_err(|err| err.to_string())?; + + response + .json::() + .await + .map_err(|err| err.to_string()) + .and_then(get_result) + .and_then(decode_hex) + .map(Bytes::from_owner) +} + fn get_result(response: serde_json::Value) -> Result { response .get("result") diff --git a/crates/vm/execution_db.rs b/crates/vm/execution_db.rs index 5d009beb4..de0666507 100644 --- a/crates/vm/execution_db.rs +++ b/crates/vm/execution_db.rs @@ -1,8 +1,9 @@ use std::collections::HashMap; +use bytes::Bytes; use ethereum_types::H160; use ethrex_core::{ - types::{AccountState, Block, ChainConfig}, + types::{code_hash, AccountState, Block, ChainConfig}, Address, H256, U256, }; use ethrex_rlp::decode::RLPDecode; @@ -11,7 +12,7 @@ use ethrex_trie::{NodeRLP, Trie}; use revm::{ primitives::{ AccountInfo as RevmAccountInfo, Address as RevmAddress, Bytecode as RevmBytecode, - B256 as RevmB256, U256 as RevmU256, + Bytes as RevmBytes, B256 as RevmB256, U256 as RevmU256, }, DatabaseRef, }; @@ -49,10 +50,11 @@ impl ExecutionDB { pub fn new( accounts: HashMap, storage: HashMap>, + codes: Vec, account_proofs: (Option, Vec), storage_proofs: HashMap, Vec)>, chain_config: ChainConfig, - ) -> Self { + ) -> Result { let accounts = accounts .into_iter() .map(|(address, value)| (RevmAddress::from_slice(address.as_bytes()), value)) @@ -81,6 +83,16 @@ impl ExecutionDB { ) }) .collect(); + let code = codes + .into_iter() + .map(|bytecode| -> Result<_, ExecutionDBError> { + Ok(( + RevmB256::from_slice(code_hash(&bytecode).as_bytes()), + RevmBytecode::new_raw_checked(RevmBytes::from(bytecode.to_vec())) + .map_err(|err| ExecutionDBError::Custom(err.to_string()))?, + )) + }) + .collect::, _>>()?; let pruned_state_trie = account_proofs; let pruned_storage_tries = storage_proofs @@ -88,15 +100,15 @@ impl ExecutionDB { .map(|(address, proofs)| (H160::from_slice(address.as_bytes()), proofs)) .collect(); - Self { + Ok(Self { accounts, - code: HashMap::new(), + code, storage, block_hashes: HashMap::new(), chain_config, pruned_state_trie, pruned_storage_tries, - } + }) } /// Creates a database by executing a block, without performing any validation. From 5f2cdb1833a5c7279fa68263f37de2730ca1aa27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Fri, 6 Dec 2024 12:21:08 -0300 Subject: [PATCH 20/20] update risc0 version --- Cargo.lock | 1 + crates/l2/Cargo.toml | 2 +- crates/l2/prover/Cargo.toml | 2 +- crates/l2/prover/zkvm/interface/Cargo.toml | 2 +- crates/l2/prover/zkvm/interface/guest/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d98ea9b72..860b5678a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -918,6 +918,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" name = "bench" version = "0.1.0" dependencies = [ + "bytes", "clap 4.5.22", "ethrex-core", "ethrex-prover", diff --git a/crates/l2/Cargo.toml b/crates/l2/Cargo.toml index f69ea8ae4..16df5fa53 100644 --- a/crates/l2/Cargo.toml +++ b/crates/l2/Cargo.toml @@ -30,7 +30,7 @@ thiserror.workspace = true zkvm_interface = { path = "./prover/zkvm/interface/", default-features = false } # risc0 -risc0-zkvm = { version = "1.1.2" } +risc0-zkvm = { version = "1.2.0" } [dev-dependencies] ethrex-sdk = { path = "./sdk" } diff --git a/crates/l2/prover/Cargo.toml b/crates/l2/prover/Cargo.toml index eb6e18a8d..da6d463a2 100644 --- a/crates/l2/prover/Cargo.toml +++ b/crates/l2/prover/Cargo.toml @@ -24,7 +24,7 @@ ethrex-l2.workspace = true # risc0 zkvm_interface = { path = "./zkvm/interface", default-features = false } -risc0-zkvm = { version = "1.1.2" } +risc0-zkvm = { version = "1.2.0" } [dev-dependencies] ethrex-vm.workspace = true diff --git a/crates/l2/prover/zkvm/interface/Cargo.toml b/crates/l2/prover/zkvm/interface/Cargo.toml index 165de4996..70ef3d1bc 100644 --- a/crates/l2/prover/zkvm/interface/Cargo.toml +++ b/crates/l2/prover/zkvm/interface/Cargo.toml @@ -15,7 +15,7 @@ ethrex-storage = { path = "../../../../storage/store", default-features = false ethrex-trie = { path = "../../../../storage/trie", default-features = false } [build-dependencies] -risc0-build = { version = "1.1.2" } +risc0-build = { version = "1.2" } [package.metadata.risc0] methods = ["guest"] diff --git a/crates/l2/prover/zkvm/interface/guest/Cargo.toml b/crates/l2/prover/zkvm/interface/guest/Cargo.toml index 86d1c2c8f..9bc75c260 100644 --- a/crates/l2/prover/zkvm/interface/guest/Cargo.toml +++ b/crates/l2/prover/zkvm/interface/guest/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [workspace] [dependencies] -risc0-zkvm = { version = "1.1.2", default-features = false, features = ["std"] } +risc0-zkvm = { version = "1.2.0", default-features = false, features = ["std"] } zkvm_interface = { path = "../" } ethrex-core = { path = "../../../../../common", default-features = false }