diff --git a/Cargo.lock b/Cargo.lock index 4fb7faf4..6cd9e145 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,14 +70,14 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e7f99e3a50210eaee2abd57293a2e72b1a5b7bb251b44c4bf33d02ddd402ab" +checksum = "eda689f7287f15bd3582daba6be8d1545bad3740fd1fb778f629a1fe866bb43b" dependencies = [ - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "alloy-trie", "alloy-tx-macros", "auto_impl", @@ -95,15 +95,15 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9945351a277c914f3776ae72b3fc1d22f90d2e840276830e48e9be5bf371a8fe" +checksum = "2b5659581e41e8fe350ecc3593cb5c9dcffddfd550896390f2b78a07af67b0fa" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "serde", ] @@ -167,16 +167,16 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4134375e533d095e045982cd7684a29c37089ab7a605ecf2b4aa17a5e61d72d3" +checksum = "6f35887da30b5fc50267109a3c61cd63e6ca1f45967983641053a40ee83468c1" dependencies = [ "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "auto_impl", "c-kzg", "derive_more 2.0.1", @@ -192,7 +192,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff5aae4c6dc600734b206b175f3200085ee82dcdaa388760358830a984ca9869" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-hardforks", "alloy-primitives", "alloy-rpc-types-eth", @@ -211,9 +211,9 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d61d58e94791b74c2566a2f240f3f796366e2479d4d39b4a3ec848c733fb92ce" dependencies = [ - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "alloy-trie", "serde", "serde_with", @@ -245,16 +245,57 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-json-rpc" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883dee3b4020fcb5667ee627b4f401e899dad82bf37b246620339dd980720ed9" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "http", + "serde", + "serde_json", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6e5b8ac1654a05c224390008e43634a2bdc74e181e02cf8ed591d8b3d4ad08" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips 1.0.24", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde 1.0.24", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "derive_more 2.0.1", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.12", +] + [[package]] name = "alloy-network-primitives" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b21283a28b117505a75ee1f2e63c16ea2ea72afca44f670b1f02795d9f5d988" +checksum = "80d7980333dd9391719756ac28bc2afa9baa705fc70ffd11dc86ab078dd64477" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "serde", ] @@ -285,6 +326,45 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-provider" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478a42fe167057b7b919cd8b0c2844f0247f667473340dad100eaf969de5754e" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips 1.0.24", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-signer", + "alloy-sol-types", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "either", + "futures", + "futures-utils-wasm", + "lru 0.13.0", + "parking_lot", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tracing", + "url", + "wasmtimer", +] + [[package]] name = "alloy-rlp" version = "0.3.12" @@ -307,6 +387,40 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "alloy-rpc-client" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0c6d723fbdf4a87454e2e3a275e161be27edcfbf46e2e3255dd66c138634b6" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f7eb22670a972ad6c222a6c6dac3eef905579acffe9d63ab42be24c7d158535" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde 1.0.24", +] + [[package]] name = "alloy-rpc-types-engine" version = "1.0.20" @@ -314,7 +428,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14796fd8574c77213802b0dc0e85886b5cb27c44e72678ab7d0a4a2d5aee79e9" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", "derive_more 2.0.1", @@ -323,21 +437,22 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bea7326ca6cd6971c58042055a039d5c97a1431e30380d8b4883ad98067c1b5" +checksum = "b777b98526bbe5b7892ca22a7fd5f18ed624ff664a79f40d0f9f2bf94ba79a84" dependencies = [ "alloy-consensus", "alloy-consensus-any", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "alloy-sol-types", "itertools 0.14.0", "serde", "serde_json", + "serde_with", "thiserror 2.0.12", ] @@ -354,15 +469,30 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c02a06ae34d2354398dc9d2de0503129c3f0904a3eb791b5d0149f267c2688" +checksum = "ee8d2c52adebf3e6494976c8542fbdf12f10123b26e11ad56f77274c16a2a039" dependencies = [ "alloy-primitives", "serde", "serde_json", ] +[[package]] +name = "alloy-signer" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c0494d1e0f802716480aabbe25549c7f6bc2a25ff33b08fd332bbb4b7d06894" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "either", + "elliptic-curve", + "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 2.0.12", +] + [[package]] name = "alloy-sol-macro" version = "1.2.0" @@ -433,6 +563,46 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-transport" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c0107675e10c7f248bf7273c1e7fdb02409a717269cc744012e6f3c39959bfb" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "auto_impl", + "base64", + "derive_more 2.0.1", + "futures", + "futures-utils-wasm", + "governor", + "parking_lot", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78e3736701b5433afd06eecff08f0688a71a10e0e1352e0bbf0bed72f0dd4e35" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", +] + [[package]] name = "alloy-trie" version = "0.9.0" @@ -451,9 +621,9 @@ dependencies = [ [[package]] name = "alloy-tx-macros" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd621a9ddef2fdc06d17089f45e47cf84d0b46ca5a1bc6c83807c9119636f52" +checksum = "6acb36318dfa50817154064fea7932adf2eec3f51c86680e2b37d7e8906c66bb" dependencies = [ "alloy-primitives", "darling", @@ -848,6 +1018,28 @@ dependencies = [ "serde", ] +[[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.101", +] + [[package]] name = "async-trait" version = "0.1.88" @@ -859,6 +1051,12 @@ dependencies = [ "syn 2.0.101", ] +[[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.2.0" @@ -1424,6 +1622,16 @@ 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" @@ -1544,6 +1752,27 @@ dependencies = [ "typenum", ] +[[package]] +name = "csv" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" +dependencies = [ + "memchr", +] + [[package]] name = "darling" version = "0.20.11" @@ -1579,6 +1808,20 @@ dependencies = [ "syn 2.0.101", ] +[[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.10" @@ -2024,6 +2267,21 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[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" @@ -2039,30 +2297,107 @@ 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.101", +] + +[[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-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[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 = "gcd" version = "2.3.0" @@ -2098,9 +2433,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -2163,6 +2500,27 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "governor" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be93b4ec2e4710b04d9264c0c7350cdd62a8c20e5e4ac732552ebb8f0debe8eb" +dependencies = [ + "cfg-if", + "futures-sink", + "futures-timer", + "futures-util", + "getrandom 0.3.3", + "no-std-compat", + "nonzero_ext", + "parking_lot", + "portable-atomic", + "quanta", + "smallvec", + "spinning_top", + "web-time", +] + [[package]] name = "group" version = "0.12.1" @@ -2450,38 +2808,139 @@ dependencies = [ ] [[package]] -name = "iana-time-zone" -version = "0.1.63" +name = "http" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "cc", + "bytes", + "http", ] [[package]] -name = "icu_collections" -version = "2.0.0" +name = "http-body-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ - "displaydoc", - "potential_utf", - "yoke", + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[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.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "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 = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", "zerofrom", "zerovec", ] @@ -2634,6 +3093,33 @@ dependencies = [ "serde", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -2870,6 +3356,16 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "lockfree-object-pool" version = "0.1.6" @@ -2891,6 +3387,15 @@ dependencies = [ "hashbrown 0.15.4", ] +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.4", +] + [[package]] name = "macro-string" version = "0.1.4" @@ -2988,6 +3493,17 @@ dependencies = [ "adler2", ] +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + [[package]] name = "modular-bitfield" version = "0.11.2" @@ -3029,6 +3545,23 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "nibble_vec" version = "0.1.0" @@ -3038,6 +3571,27 @@ dependencies = [ "smallvec", ] +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -3139,7 +3693,7 @@ checksum = "e238432a7881ec7164503ccc516c014bf009be7984cde1ba56837862543bdec3" dependencies = [ "bitvec", "either", - "lru", + "lru 0.12.5", "num-bigint 0.4.6", "num-integer", "num-modular", @@ -3225,6 +3779,25 @@ dependencies = [ "smallvec", ] +[[package]] +name = "objc2-core-foundation" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" +dependencies = [ + "bitflags", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "object" version = "0.36.7" @@ -3257,10 +3830,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8719d9b783b29cfa1cf8d591b894805786b9ab4940adc700a57fd0d5b721cf5" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "derive_more 2.0.1", "serde", "serde_with", @@ -3285,6 +3858,50 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +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.101", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "openvm" version = "1.3.0" @@ -4899,6 +5516,29 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + [[package]] name = "pasta_curves" version = "0.4.1" @@ -4995,6 +5635,26 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "pin-project-lite" version = "0.2.16" @@ -5357,6 +6017,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags", +] + [[package]] name = "regex" version = "1.11.1" @@ -5410,6 +6079,42 @@ dependencies = [ "bytecheck", ] +[[package]] +name = "reqwest" +version = "0.12.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +dependencies = [ + "base64", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "reth-chainspec" version = "1.5.0" @@ -5417,7 +6122,7 @@ source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b dependencies = [ "alloy-chains", "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-evm", "alloy-genesis", "alloy-primitives", @@ -5436,7 +6141,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-genesis", "alloy-primitives", "alloy-trie", @@ -5464,7 +6169,7 @@ name = "reth-db-models" version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "reth-primitives-traits", ] @@ -5487,7 +6192,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", "reth-codecs", @@ -5502,7 +6207,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-evm", "alloy-primitives", "auto_impl", @@ -5524,7 +6229,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-evm", "alloy-primitives", "reth-chainspec", @@ -5555,7 +6260,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-evm", "alloy-primitives", "derive_more 2.0.1", @@ -5596,7 +6301,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -5635,10 +6340,10 @@ source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b dependencies = [ "alloy-chains", "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-genesis", "alloy-primitives", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "auto_impl", "derive_more 2.0.1", "once_cell", @@ -5659,7 +6364,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-evm", "alloy-primitives", "derive_more 2.0.1", @@ -5702,7 +6407,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", "bytes", @@ -5739,7 +6444,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rpc-types-engine", "auto_impl", @@ -5760,7 +6465,7 @@ name = "reth-storage-errors" version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", "derive_more 2.0.1", @@ -5777,7 +6482,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", "alloy-trie", @@ -6039,7 +6744,7 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad3fbe34f6bb00a9c3155723b3718b9cb9f17066ba38f9eb101b678cd3626775" dependencies = [ - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "revm-bytecode 4.1.0", "revm-database-interface 4.0.1", "revm-primitives 19.2.0", @@ -6052,7 +6757,7 @@ name = "revm-database" version = "6.0.0" source = "git+https://github.com/scroll-tech/revm?branch=feat%2Freth-v78#c143b332683b41849632cc482bddbcb1be0d8d6f" dependencies = [ - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "revm-bytecode 5.0.0", "revm-database-interface 6.0.0", "revm-primitives 20.0.0", @@ -6588,6 +7293,15 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + [[package]] name = "rustversion" version = "1.0.21" @@ -6615,7 +7329,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "sbv-core" version = "2.0.0" -source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#a4d0e2302ffd3ecbeef29e16ddeb361084358f7b" +source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#f9b76ac7feadafc7e94c6cb6a76151e46922dc98" dependencies = [ "sbv-helpers", "sbv-kv", @@ -6628,7 +7342,7 @@ dependencies = [ [[package]] name = "sbv-helpers" version = "2.0.0" -source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#a4d0e2302ffd3ecbeef29e16ddeb361084358f7b" +source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#f9b76ac7feadafc7e94c6cb6a76151e46922dc98" dependencies = [ "tracing", ] @@ -6636,7 +7350,7 @@ dependencies = [ [[package]] name = "sbv-kv" version = "2.0.0" -source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#a4d0e2302ffd3ecbeef29e16ddeb361084358f7b" +source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#f9b76ac7feadafc7e94c6cb6a76151e46922dc98" dependencies = [ "auto_impl", "hashbrown 0.15.4", @@ -6646,7 +7360,7 @@ dependencies = [ [[package]] name = "sbv-precompile" version = "2.0.0" -source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#a4d0e2302ffd3ecbeef29e16ddeb361084358f7b" +source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#f9b76ac7feadafc7e94c6cb6a76151e46922dc98" dependencies = [ "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-pairing", @@ -6657,13 +7371,15 @@ dependencies = [ [[package]] name = "sbv-primitives" version = "2.0.0" -source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#a4d0e2302ffd3ecbeef29e16ddeb361084358f7b" +source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#f9b76ac7feadafc7e94c6cb6a76151e46922dc98" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-evm", + "alloy-network", "alloy-primitives", - "alloy-serde 1.0.20", + "alloy-rpc-types-eth", + "alloy-serde 1.0.24", "auto_impl", "itertools 0.14.0", "reth-chainspec", @@ -6684,6 +7400,8 @@ dependencies = [ "sbv-kv", "scroll-alloy-consensus", "scroll-alloy-evm", + "scroll-alloy-network", + "scroll-alloy-rpc-types", "serde", "tiny-keccak", ] @@ -6691,7 +7409,7 @@ dependencies = [ [[package]] name = "sbv-trie" version = "2.0.0" -source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#a4d0e2302ffd3ecbeef29e16ddeb361084358f7b" +source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#f9b76ac7feadafc7e94c6cb6a76151e46922dc98" dependencies = [ "alloy-rlp", "alloy-trie", @@ -6703,16 +7421,44 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sbv-utils" +version = "2.0.0" +source = "git+https://github.com/scroll-tech/stateless-block-verifier?branch=chore%2Fopenvm-1.3#f9b76ac7feadafc7e94c6cb6a76151e46922dc98" +dependencies = [ + "alloy-provider", + "alloy-transport", + "async-trait", + "futures", + "sbv-primitives", + "thiserror 1.0.69", +] + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "scroll-alloy-consensus" version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "derive_more 2.0.1", "reth-codecs", "serde", @@ -6725,7 +7471,7 @@ version = "1.5.0" source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" dependencies = [ "alloy-consensus", - "alloy-eips 1.0.20", + "alloy-eips 1.0.24", "alloy-evm", "alloy-primitives", "auto_impl", @@ -6747,6 +7493,38 @@ dependencies = [ "serde", ] +[[package]] +name = "scroll-alloy-network" +version = "1.5.0" +source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-signer", + "scroll-alloy-consensus", + "scroll-alloy-rpc-types", +] + +[[package]] +name = "scroll-alloy-rpc-types" +version = "1.5.0" +source = "git+https://github.com/scroll-tech/reth?rev=090d7950d169abbfb896875a7b1ff3f8ca356ac8#090d7950d169abbfb896875a7b1ff3f8ca356ac8" +dependencies = [ + "alloy-consensus", + "alloy-eips 1.0.24", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde 1.0.24", + "derive_more 2.0.1", + "scroll-alloy-consensus", + "serde", + "serde_json", +] + [[package]] name = "scroll-zkvm-batch-circuit" version = "0.5.0" @@ -6845,10 +7623,15 @@ name = "scroll-zkvm-integration" version = "0.5.0" dependencies = [ "alloy-primitives", + "alloy-provider", + "alloy-rpc-client", + "alloy-transport", "cargo_metadata 0.20.0", "chrono", + "csv", "eyre", "ff 0.13.1", + "futures", "glob", "halo2curves-axiom 0.7.0", "hex", @@ -6867,6 +7650,7 @@ dependencies = [ "revm 24.0.0", "rkyv", "sbv-primitives", + "sbv-utils", "scroll-zkvm-prover", "scroll-zkvm-types", "scroll-zkvm-verifier", @@ -6874,8 +7658,11 @@ dependencies = [ "serde_json", "sha2 0.10.9", "snark-verifier-sdk", + "sysinfo", + "tokio", "tracing", "tracing-subscriber 0.3.19", + "url", "vm-zstd", ] @@ -6943,7 +7730,7 @@ name = "scroll-zkvm-types-base" version = "0.5.0" dependencies = [ "alloy-primitives", - "alloy-serde 1.0.20", + "alloy-serde 1.0.24", "itertools 0.14.0", "rkyv", "sbv-primitives", @@ -7098,6 +7885,29 @@ 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.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "0.11.0" @@ -7225,6 +8035,18 @@ dependencies = [ "stacker", ] +[[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.12.0" @@ -7324,6 +8146,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook-registry" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +dependencies = [ + "libc", +] + [[package]] name = "signature" version = "2.2.0" @@ -7352,6 +8183,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + [[package]] name = "smallvec" version = "1.15.1" @@ -7407,6 +8244,16 @@ dependencies = [ "snark-verifier", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "sp1-lib" version = "5.0.0" @@ -7459,6 +8306,15 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "spinning_top" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" +dependencies = [ + "lock_api", +] + [[package]] name = "spki" version = "0.7.3" @@ -7609,6 +8465,15 @@ dependencies = [ "syn 2.0.101", ] +[[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.2" @@ -7620,6 +8485,20 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sysinfo" +version = "0.35.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c3ffa3e4ff2b324a57f7aeb3c349656c7b127c3c189520251a648102a92496e" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows", +] + [[package]] name = "tap" version = "1.0.1" @@ -7816,6 +8695,72 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "slab", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[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-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.8.23" @@ -7857,6 +8802,51 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "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" @@ -7950,6 +8940,12 @@ dependencies = [ "strength_reduce", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "typeid" version = "1.0.3" @@ -8053,6 +9049,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[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" @@ -8082,6 +9084,15 @@ 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" @@ -8123,6 +9134,19 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.100" @@ -8155,6 +9179,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasmtimer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d49b5d6c64e8558d9b1b065014426f35c18de636895d24893dbbd329743446" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + [[package]] name = "web-sys" version = "0.3.77" @@ -8165,6 +9203,16 @@ dependencies = [ "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 = "winapi" version = "0.3.9" @@ -8187,6 +9235,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core", +] + [[package]] name = "windows-core" version = "0.61.2" @@ -8200,6 +9270,17 @@ dependencies = [ "windows-strings", ] +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.60.0" @@ -8228,6 +9309,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core", + "windows-link", +] + [[package]] name = "windows-result" version = "0.3.4" @@ -8271,6 +9362,15 @@ dependencies = [ "windows_x86_64_msvc", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index be5bf733..41e20b95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,20 +60,26 @@ p3-field = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085e sbv-core = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3", features = ["scroll"] } sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3", features = ["scroll", "serde", "rkyv"] } +sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3", features = ["scroll"] } sbv-kv = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3" } sbv-trie = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3" } sbv-precompile = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3" } - + +alloy-provider = "1.0" +alloy-rpc-client = "1.0" alloy-primitives = { version = "1.2", default-features = false, features = ["std", "map-hashbrown", "map-fxhash", "rkyv"] } alloy-serde = { version = "1.0.13", default-features = false } +alloy-transport = "1.0" bitcode = { version = "0.6.5", default-features = false, features = ["serde", "derive"] } bincode_v1 = { version = "1.3", package = "bincode"} bincode = { version = "2.0" } cargo_metadata = "0.20" c-kzg = { version = "2.0" } +csv = "1.3.1" derivative = "2.2.0" eyre = "0.6" +futures = "0.3" halo2curves-axiom = { version = "0.5.3" } itertools = "0.14" hex-literal = { version = "0.4.1", default-features = false } @@ -94,11 +100,14 @@ snark-verifier-sdk = { version = "=0.2.1", default-features = false, features = "display", "revm", ] } +sysinfo = { version = "0.35", default-features = false } tiny-keccak = "2.0" tracing = "0.1" +tokio = "1" vm-zstd = { git = "https://github.com/scroll-tech/rust-zstd-decompressor.git", branch = "master" } toml = "0.8.14" tracing-subscriber = "0.3" +url = "2.5" scroll-zkvm-types = { path = "crates/types" } scroll-zkvm-types-base = { path = "crates/types/base" } diff --git a/Makefile b/Makefile index c28fb8ba..3c973765 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,9 @@ test-single-chunk: test-multi-chunk: @cargo test --release -p scroll-zkvm-integration --test chunk_circuit setup_prove_verify_multi -- --exact --nocapture +test-scanner: + @cargo test --release -p scroll-zkvm-integration --test chunk_circuit test_scanner -- --exact --nocapture + test-single-batch: $(TESTDATA_PATH)/tasks/batch-task.json @cargo test --release -p scroll-zkvm-integration --test batch_circuit setup_prove_verify_single -- --exact --nocapture diff --git a/crates/integration/Cargo.toml b/crates/integration/Cargo.toml index a32dca17..582bd6d4 100644 --- a/crates/integration/Cargo.toml +++ b/crates/integration/Cargo.toml @@ -8,6 +8,7 @@ scroll-zkvm-types.workspace = true scroll-zkvm-prover.workspace = true scroll-zkvm-verifier.workspace = true sbv-primitives = { workspace = true } +sbv-utils.workspace = true tracing.workspace = true rkyv.workspace = true tracing-subscriber.workspace = true @@ -22,15 +23,23 @@ openvm-native-recursion = { workspace = true, default-features = false } openvm-native-transpiler = { workspace = true, default-features = false } openvm-transpiler = { workspace = true, default-features = false } +alloy-provider = { workspace = true } +alloy-rpc-client.workspace = true +alloy-transport = { workspace = true, features = ["throttle"] } alloy-primitives.workspace = true cargo_metadata.workspace = true eyre.workspace = true +futures.workspace = true rayon.workspace = true serde.workspace = true vm-zstd = { workspace = true, features = ["zstd"] } +sysinfo = { workspace = true, features = ["system"] } +tokio = { workspace = true, features = ["full", "macros"] } +url.workspace = true hex.workspace = true chrono = "0.4" +csv.workspace = true ff = "0.13" glob = "0.3" once_cell = "1.20" diff --git a/crates/integration/src/utils/mod.rs b/crates/integration/src/utils/mod.rs index 0ea52989..055edb6d 100644 --- a/crates/integration/src/utils/mod.rs +++ b/crates/integration/src/utils/mod.rs @@ -14,6 +14,7 @@ use scroll_zkvm_types::{ types_agg::AggregationInput, utils::{keccak256, point_eval, serialize_vk}, }; +use std::env; use vm_zstd::zstd_encode; fn is_l1_tx(tx: &Transaction) -> bool { @@ -45,6 +46,31 @@ fn blks_tx_bytes<'a>(blks: impl Iterator) -> Vec { }) } +pub fn get_rayon_threads() -> usize { + const MEMORY_PRESERVED_EACH_THREAD: u64 = 10 * 1024 * 1024 * 1024; // 10GB + + if let Some(threads) = env::var("RAYON_NUM_THREADS") + .ok() + .and_then(|s| s.parse().ok()) + { + eprintln!("RAYON_NUM_THREADS set, using {} threads", threads); + return threads; + } + + let mut system = sysinfo::System::new(); + system.refresh_cpu_list(sysinfo::CpuRefreshKind::nothing().with_frequency()); + system.refresh_memory_specifics(sysinfo::MemoryRefreshKind::nothing().with_ram()); + let free_memory = system.free_memory(); + let max_threads = (free_memory / MEMORY_PRESERVED_EACH_THREAD) as usize; + let n_cpus = system.cpus().len(); + let threads = std::cmp::min(max_threads, n_cpus); + eprintln!( + "RAYON_NUM_THREADS not set, using {} threads ({} CPUs, {} free memory)", + threads, n_cpus, free_memory + ); + threads +} + #[derive(Clone, Debug)] pub struct LastHeader { pub batch_index: u64, diff --git a/crates/integration/tests/chunk_circuit.rs b/crates/integration/tests/chunk_circuit.rs index dd8723d2..f03aefea 100644 --- a/crates/integration/tests/chunk_circuit.rs +++ b/crates/integration/tests/chunk_circuit.rs @@ -1,4 +1,10 @@ -use eyre::Ok; +use std::fs::File; +use std::path::PathBuf; +use alloy_primitives::B256; +use eyre::{Context, ContextCompat, Ok}; +use rayon::iter::{IntoParallelIterator, ParallelBridge, ParallelIterator}; +use sbv_primitives::BlockWitness; +use scroll_zkvm_integration::utils::get_rayon_threads; use scroll_zkvm_integration::{ ProverTester, prove_verify, tester_execute, testers::chunk::{ @@ -9,6 +15,11 @@ use scroll_zkvm_integration::{ }; use scroll_zkvm_prover::{Prover, utils::vm::ExecutionResult}; use scroll_zkvm_types::chunk::ChunkWitness; +use scroll_zkvm_types::public_inputs::ForkName; + +thread_local! { + static PROVER: Prover = ChunkProverTester::load_prover(false).unwrap(); +} fn exec_chunk(prover: &Prover, wit: &ChunkWitness) -> eyre::Result<(ExecutionResult, u64)> { let blk = wit.blocks[0].header.number; @@ -126,34 +137,37 @@ fn test_autofill_trie_nodes() -> eyre::Result<()> { Ok(()) } +fn execute_multi(wits: Vec) -> impl FnOnce() -> (u64, u64) + Send + Sync + 'static { + || { + wits.into_par_iter() + .map(|wit| -> (u64, u64) { + let (exec_result, gas) = PROVER.with(|prover| exec_chunk(&prover, &wit).unwrap()); + (gas, exec_result.total_cycle) + }) + .reduce( + || (0u64, 0u64), + |(gas1, cycle1): (u64, u64), (gas2, cycle2): (u64, u64)| { + (gas1 + gas2, cycle1 + cycle2) + }, + ) + } +} + #[test] fn test_execute_multi() -> eyre::Result<()> { - // use rayon::iter::{IntoParallelIterator, ParallelIterator}; - ChunkProverTester::setup()?; - // Initialize Rayon thread pool with 8 threads - let parallel = 8; + // Initialize Rayon thread pool let pool = rayon::ThreadPoolBuilder::new() - .num_threads(parallel) - .build() - .unwrap(); + .num_threads(get_rayon_threads()) + .build()?; + // Execute tasks in parallel - let (total_gas, total_cycle) = pool.install(|| { - // comment by fan@scroll.io: why we need to load prover multiple times (which is time costing) - let prover = ChunkProverTester::load_prover(false).unwrap(); - let init = (0u64, 0u64); - let adder = - |(gas1, cycle1): (u64, u64), (gas2, cycle2): (u64, u64)| (gas1 + gas2, cycle1 + cycle2); - preset_chunk_multiple() - .into_iter() - .map(|mut task| -> (u64, u64) { - let (exec_result, gas) = - exec_chunk(&prover, &task.get_or_build_witness().unwrap()).unwrap(); - (gas, exec_result.total_cycle) - }) - .fold(init, adder) - }); + let tasks = preset_chunk_multiple() + .into_iter() + .map(|mut task| task.get_or_build_witness().unwrap()) + .collect::>(); + let (total_gas, total_cycle) = pool.install(execute_multi(tasks)); println!( "Total gas: {}, Total cycles: {}, Average cycle/gas: {}", @@ -204,3 +218,136 @@ fn setup_prove_verify_multi() -> eyre::Result<()> { Ok(()) } + +#[tokio::test] +async fn test_scanner() -> eyre::Result<()> { + use alloy_provider::{Provider, ProviderBuilder}; + use alloy_rpc_client::ClientBuilder; + use alloy_transport::layers::{RetryBackoffLayer, ThrottleLayer}; + use sbv_primitives::types::Network; + use sbv_utils::rpc::ProviderExt; + use std::env; + use url::Url; + + let rpc_url: Url = env::var("RPC_URL") + .context("RPC_URL must be set")? + .parse() + .context("Unable to parse RPC_URL")?; + println!("RPC URL = {}", rpc_url); + + let out_path = env::var("OUT_PATH") + .map(|s| PathBuf::from(s)) + .unwrap_or_else(|_| PathBuf::from("scanner.csv")); + println!("out_path = {}", out_path.display()); + let out = File::create(&out_path)?; + let mut writer = csv::Writer::from_writer(out); + + ChunkProverTester::setup()?; + + let client = ClientBuilder::default() + .layer(RetryBackoffLayer::new( + env::var("MAX_RATE_LIMIT_RETRIES") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(10), + env::var("RETRIES_INITIAL_BACKOFF") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(100), + u64::MAX, + )) + .layer(ThrottleLayer::new( + env::var("REQUESTS_PER_SECOND") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(10), + )) + .http(rpc_url); + let provider = ProviderBuilder::<_, _, Network>::default() + .with_recommended_fillers() + .connect_client(client); + + let latest_block = provider + .get_block_number() + .await + .context("Failed to get the latest block number")?; + + // fetch latest 1000 blocks + let n_chunks: u64 = env::var("N_CHUNKS") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(50); + let chunk_size: u64 = env::var("CHUNK_SIZE") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(20); + let start_block = latest_block + .checked_sub(chunk_size * n_chunks) + .context("Not enough blocks to fetch. Please decrease N_CHUNKS or CHUNK_SIZE.")?; + println!( + "blocks = {start_block}..={latest_block}; {chunk_size} blocks chunk, {n_chunks} chunks" + ); + + let blocks = futures::future::try_join_all((start_block..=latest_block).map(|block| { + let provider = provider.clone(); + async move { + provider + .dump_block_witness(block.into()) + .await + .map(|w| w.unwrap()) + } + })) + .await?; + + // Initialize Rayon thread pool + let pool = rayon::ThreadPoolBuilder::new() + .num_threads(get_rayon_threads()) + .build()?; + + #[derive(serde::Serialize)] + struct Stats { + start_block: u64, + end_block: u64, + tx_num: usize, + cycle: u64, + gas: u64, + cycle_per_gas: f64, + } + + let stats = pool.install(move || { + blocks + .chunks_exact(chunk_size as usize) + .par_bridge() + .map(|blocks| { + let wit = ChunkWitness::new(blocks, B256::ZERO, ForkName::Feynman); + let (exec_result, gas) = PROVER.with(|prover| exec_chunk(&prover, &wit).unwrap()); + // Block range, tx num, cycle, gas, cycle-per_gas + let stats = Stats { + start_block: blocks[0].header.number, + end_block: blocks.last().unwrap().header.number, + tx_num: blocks.iter().map( | b| b.num_transactions()).sum::(), + cycle: exec_result.total_cycle, + gas, + cycle_per_gas: exec_result.total_cycle as f64 / gas as f64, + }; + println!( + "Blocks {}..={} | Tx: {} | Cycle: {} | Gas: {} | Cycle/Gas: {:.2}", + stats.start_block, + stats.end_block, + stats.tx_num, + stats.cycle, + stats.gas, + stats.cycle_per_gas + ); + stats + }) + .collect::>() + }); + + for stat in stats { + writer.serialize(stat).context("Failed to write stats to CSV")?; + } + writer.flush().context("Failed to flush CSV")?; + + Ok(()) +} diff --git a/download-release.sh b/download-release.sh index 8644ee91..641e3320 100644 --- a/download-release.sh +++ b/download-release.sh @@ -8,18 +8,22 @@ if [ -z "${SCROLL_ZKVM_VERSION}" ]; then fi # chunk-circuit exe +mkdir -p crates/circuits/chunk-circuit/openvm wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/chunk/app.vmexe -O crates/circuits/chunk-circuit/openvm/app.vmexe # batch-circuit exe +mkdir -p crates/circuits/batch-circuit/openvm wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/batch/app.vmexe -O crates/circuits/batch-circuit/openvm/app.vmexe # bundle-circuit exe +mkdir -p crates/circuits/bundle-circuit/openvm wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app.vmexe -O crates/circuits/bundle-circuit/openvm/app.vmexe # bundle-circuit exe, legacy version, may not exist wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app_euclidv1.vmexe -O crates/circuits/bundle-circuit/openvm/app_euclidv1.vmexe || echo "legacy app not exist for $SCROLL_ZKVM_VERSION" # assets for verifier-only mode +mkdir -p crates/verifier/testdata wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/root-verifier-vm-config -O crates/verifier/testdata/root-verifier-vm-config wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/root-verifier-committed-exe -O crates/verifier/testdata/root-verifier-committed-exe wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/verifier.bin -O crates/verifier/testdata/verifier.bin