diff --git a/Cargo.lock b/Cargo.lock index d984d697..c48c4cdf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,42 +1,21 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] +version = 4 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.4" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -77,1397 +56,1653 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "alloy" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +checksum = "b5b524b8c28a7145d1fe4950f84360b5de3e307601679ff0558ddc20ea229399" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", +] [[package]] -name = "android_system_properties" -version = "0.1.5" +name = "alloy-chains" +version = "0.1.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "18c5c520273946ecf715c0010b4e3503d7eba9893cd9ce6b7fff5654c4a3c470" dependencies = [ - "libc", + "alloy-primitives", + "num_enum", + "strum", ] [[package]] -name = "anstream" -version = "0.3.2" +name = "alloy-consensus" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "ae09ffd7c29062431dd86061deefe4e3c6f07fa0d674930095f8dcedb0baf02c" dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is-terminal", - "utf8parse", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "auto_impl", + "c-kzg", + "derive_more", + "k256", + "serde", ] [[package]] -name = "anstyle" -version = "1.0.6" +name = "alloy-contract" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "66430a72d5bf5edead101c8c2f0a24bada5ec9f3cf9909b3e08b6d6899b4803e" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] [[package]] -name = "anstyle-parse" -version = "0.2.3" +name = "alloy-core" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "e8d22df68fa7d9744be0b1a9be3260e9aa089fbf41903ab182328333061ed186" dependencies = [ - "utf8parse", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", ] [[package]] -name = "anstyle-query" -version = "1.0.2" +name = "alloy-dyn-abi" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "1cf633ae9a1f0c82fdb9e559ed2be1c8e415c3e48fc47e1feaf32c6078ec0cdd" dependencies = [ - "windows-sys 0.52.0", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", ] [[package]] -name = "anstyle-wincon" -version = "1.0.2" +name = "alloy-eip2930" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "anstyle", - "windows-sys 0.48.0", + "alloy-primitives", + "alloy-rlp", + "serde", ] [[package]] -name = "argminmax" -version = "0.6.2" +name = "alloy-eip7702" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52424b59d69d69d5056d508b260553afd91c57e21849579cd1f50ee8b8b88eaa" +checksum = "5f6cee6a35793f3db8a5ffe60e86c695f321d081a567211245f503e8c498fce8" dependencies = [ - "num-traits", + "alloy-primitives", + "alloy-rlp", + "derive_more", + "k256", + "serde", ] [[package]] -name = "array-init-cursor" -version = "0.2.0" +name = "alloy-eips" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" +checksum = "5b6aa3961694b30ba53d41006131a2fca3bdab22e4c344e46db2c639e7c2dfdd" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "derive_more", + "once_cell", + "serde", + "sha2", +] [[package]] -name = "arrayvec" -version = "0.7.4" +name = "alloy-genesis" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "e53f7877ded3921d18a0a9556d55bedf84535567198c9edab2aa23106da91855" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] [[package]] -name = "ascii-canvas" -version = "3.0.0" +name = "alloy-json-abi" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +checksum = "1a500037938085feed8a20dbfc8fce58c599db68c948cfae711147175dee392c" dependencies = [ - "term", + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", ] [[package]] -name = "async-stream" -version = "0.3.5" +name = "alloy-json-rpc" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "3694b7e480728c0b3e228384f223937f14c10caef5a4c766021190fc8f283d35" dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "async-stream-impl" -version = "0.3.5" +name = "alloy-network" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", +checksum = "ea94b8ceb5c75d7df0a93ba0acc53b55a22b47b532b600a800a87ef04eb5b0b4" +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", + "serde", + "serde_json", + "thiserror", ] [[package]] -name = "async-trait" -version = "0.1.80" +name = "alloy-network-primitives" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "df9f3e281005943944d15ee8491534a1c7b3cbf7a7de26f8c433b842b93eb5f9" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", ] [[package]] -name = "async_io_stream" -version = "0.3.3" +name = "alloy-primitives" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +checksum = "3aeeb5825c2fc8c2662167058347cd0cafc3cb15bcb5cdb1758a63c2dca0409e" dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "foldhash", + "hashbrown 0.15.2", + "hex-literal", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c1f9eede27bf4c13c099e8e64d54efd7ce80ef6ea47478aa75d5d74e2dba3b" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 6.1.0", "futures", - "pharos", - "rustc_version", + "futures-utils-wasm", + "lru", + "parking_lot", + "pin-project", + "reqwest", + "schnellru", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", + "wasmtimer", ] [[package]] -name = "atoi" -version = "2.0.0" +name = "alloy-pubsub" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +checksum = "90f1f34232f77341076541c405482e4ae12f0ee7153d8f9969fc1691201b2247" dependencies = [ - "num-traits", + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", ] [[package]] -name = "atoi_simd" -version = "0.15.6" +name = "alloy-rlp" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" +checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] [[package]] -name = "auto_impl" -version = "1.2.0" +name = "alloy-rlp-derive" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] -name = "autocfg" -version = "1.2.0" +name = "alloy-rpc-client" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "374dbe0dc3abdc2c964f36b3d3edf9cdb3db29d16bda34aa123f03d810bec1dd" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", + "wasmtimer", +] [[package]] -name = "backtrace" -version = "0.3.71" +name = "alloy-rpc-types" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "c74832aa474b670309c20fffc2a869fa141edab7c79ff7963fad0a08de60bae1" dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-serde", + "serde", ] [[package]] -name = "base16ct" -version = "0.2.0" +name = "alloy-rpc-types-engine" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +checksum = "3f56294dce86af23ad6ee8df46cf8b0d292eb5d1ff67dc88a0886051e32b1faf" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "derive_more", + "serde", + "strum", +] [[package]] -name = "base64" -version = "0.13.1" +name = "alloy-rpc-types-eth" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "a8a477281940d82d29315846c7216db45b15e90bcd52309da9f54bcf7ad94a11" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "derive_more", + "itertools 0.13.0", + "serde", + "serde_json", +] [[package]] -name = "base64" -version = "0.21.7" +name = "alloy-rpc-types-trace" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "ecd8b4877ef520c138af702097477cdd19504a8e1e4675ba37e92ba40f2d3c6f" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", + "serde_json", + "thiserror", +] [[package]] -name = "base64ct" -version = "1.6.0" +name = "alloy-serde" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "4dfa4a7ccf15b2492bb68088692481fd6b2604ccbee1d0d6c44c21427ae4df83" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] [[package]] -name = "bech32" -version = "0.9.1" +name = "alloy-signer" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +checksum = "2e10aec39d60dc27edcac447302c7803d2371946fb737245320a05b78eb2fafd" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] [[package]] -name = "bit-set" -version = "0.5.3" +name = "alloy-signer-local" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "d8396f6dff60700bc1d215ee03d86ff56de268af96e2bf833a14d0bafcab9882" dependencies = [ - "bit-vec", + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand", + "thiserror", ] [[package]] -name = "bit-vec" -version = "0.6.3" +name = "alloy-sol-macro" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "5c0279d09463a4695788a3622fd95443625f7be307422deba4b55dd491a9c7a1" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.89", +] [[package]] -name = "bitflags" -version = "1.3.2" +name = "alloy-sol-macro-expander" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "4feea540fc8233df2ad1156efd744b2075372f43a8f942a68b3b19c8a00e2c12" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.89", + "syn-solidity", + "tiny-keccak", +] [[package]] -name = "bitflags" -version = "2.5.0" +name = "alloy-sol-macro-input" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "2a0ad281f3d1b613af814b66977ee698e443d4644a1510962d0241f26e0e53ae" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.89", + "syn-solidity", +] [[package]] -name = "bitvec" -version = "1.0.1" +name = "alloy-sol-type-parser" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "96eff16c797438add6c37bb335839d015b186c5421ee5626f5559a7bfeb38ef5" dependencies = [ - "funty", - "radium", - "tap", - "wyz", + "serde", + "winnow", ] [[package]] -name = "block-buffer" -version = "0.10.4" +name = "alloy-sol-types" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "cff34e0682d6665da243a3e81da96f07a2dd50f7e64073e382b1a141f5a2a2f6" dependencies = [ - "generic-array", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", ] [[package]] -name = "brotli" -version = "3.5.0" +name = "alloy-transport" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +checksum = "f99acddb34000d104961897dbb0240298e8b775a7efffb9fda2a1a3efedd65b3" dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", ] [[package]] -name = "brotli-decompressor" -version = "2.5.1" +name = "alloy-transport-http" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +checksum = "5dc013132e34eeadaa0add7e74164c1503988bfba8bae885b32e0918ba85a8a6" dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", ] [[package]] -name = "bs58" -version = "0.5.1" +name = "alloy-transport-ipc" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +checksum = "063edc0660e81260653cc6a95777c29d54c2543a668aa5da2359fb450d25a1ba" dependencies = [ - "sha2", - "tinyvec", + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde", + "serde_json", + "tempfile", + "tokio", + "tokio-util", + "tracing", ] [[package]] -name = "bumpalo" -version = "3.16.0" +name = "alloy-transport-ws" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "abd170e600801116d5efe64f74a4fc073dbbb35c807013a7d0a388742aeebba0" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http", + "rustls", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] [[package]] -name = "byte-slice-cast" -version = "1.2.2" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] -name = "bytemuck" -version = "1.15.0" +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "bytemuck_derive", + "libc", ] [[package]] -name = "bytemuck_derive" -version = "1.6.0" +name = "anstream" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", ] [[package]] -name = "byteorder" -version = "1.5.0" +name = "anstyle" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] -name = "bytes" -version = "1.6.0" +name = "anstyle-parse" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ - "serde", + "utf8parse", ] [[package]] -name = "bzip2" -version = "0.4.4" +name = "anstyle-query" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "bzip2-sys", - "libc", + "windows-sys 0.59.0", ] [[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" +name = "anstyle-wincon" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ - "cc", - "libc", - "pkg-config", + "anstyle", + "windows-sys 0.48.0", ] [[package]] -name = "camino" -version = "1.1.6" +name = "argminmax" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "52424b59d69d69d5056d508b260553afd91c57e21849579cd1f50ee8b8b88eaa" dependencies = [ - "serde", + "num-traits", ] [[package]] -name = "cargo-platform" -version = "0.1.8" +name = "ark-ff" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" dependencies = [ - "serde", + "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", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", ] [[package]] -name = "cargo_metadata" -version = "0.18.1" +name = "ark-ff" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", + "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", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", ] [[package]] -name = "cc" -version = "1.0.94" +name = "ark-ff-asm" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" dependencies = [ - "jobserver", - "libc", + "quote", + "syn 1.0.109", ] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "ark-ff-asm" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] [[package]] -name = "chrono" -version = "0.4.38" +name = "ark-ff-macros" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", + "num-bigint", "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.52.5", + "quote", + "syn 1.0.109", ] [[package]] -name = "chrono-tz" -version = "0.8.6" +name = "ark-ff-macros" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "chrono", - "chrono-tz-build", - "phf", + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "chrono-tz-build" -version = "0.2.1" +name = "ark-serialize" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" dependencies = [ - "parse-zoneinfo", - "phf", - "phf_codegen", + "ark-std 0.3.0", + "digest 0.9.0", ] [[package]] -name = "cipher" -version = "0.4.4" +name = "ark-serialize" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "crypto-common", - "inout", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", ] [[package]] -name = "clap_builder_cryo" -version = "4.3.21-cryo" +name = "ark-std" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e3a8989ce9e79041f7681f82e669c1a06724975fb8f5b7bd60e359e572da76" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ - "anstream", - "anstyle", - "clap_lex_cryo", - "strsim", + "num-traits", + "rand", ] [[package]] -name = "clap_cryo" -version = "4.3.21-cryo" +name = "ark-std" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8216426fdf2f5ce7fa46197e3517adf8b1c0ab96d3dbf73469bc15f34ad6" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ - "clap_builder_cryo", - "clap_derive_cryo", - "once_cell", + "num-traits", + "rand", ] [[package]] -name = "clap_derive_cryo" -version = "4.3.12" +name = "array-init-cursor" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1cd2cebdb1ec98182edb745382a2b65d6bc254782de26316e4366d83d39988" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.60", -] +checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" [[package]] -name = "clap_lex_cryo" -version = "0.5.0" +name = "arrayvec" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98979652585ac7c8d6267e363229b6a26bc4bf469c69e96442f85830ebc89f45" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] -name = "coins-bip32" -version = "0.8.7" +name = "async-stream" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ - "bs58", - "coins-core", - "digest", - "hmac", - "k256", - "serde", - "sha2", - "thiserror", + "async-stream-impl", + "futures-core", + "pin-project-lite", ] [[package]] -name = "coins-bip39" -version = "0.8.7" +name = "async-stream-impl" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ - "bitvec", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand", - "sha2", - "thiserror", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "coins-core" -version = "0.8.7" +name = "async-trait" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "color-print" -version = "0.3.5" +name = "async_io_stream" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a858372ff14bab9b1b30ea504f2a4bc534582aee3e42ba2d41d2a7baba63d5d" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ - "color-print-proc-macro", + "futures", + "pharos", + "rustc_version 0.4.1", ] [[package]] -name = "color-print-proc-macro" -version = "0.3.5" +name = "atoi" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e37866456a721d0a404439a1adae37a31be4e0055590d053dfe6981e05003f" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" dependencies = [ - "nom", - "proc-macro2", - "quote", - "syn 1.0.109", + "num-traits", ] [[package]] -name = "colorchoice" -version = "1.0.0" +name = "atoi_simd" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" [[package]] -name = "colored" -version = "2.1.0" +name = "auto_impl" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "lazy_static", - "windows-sys 0.48.0", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "comfy-table" -version = "7.1.1" +name = "autocfg" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" -dependencies = [ - "crossterm", - "strum", - "strum_macros 0.26.2", - "unicode-width", -] +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] -name = "console" -version = "0.15.8" +name = "backtrace" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ - "encode_unicode", - "lazy_static", + "addr2line", + "cfg-if", "libc", - "unicode-width", - "windows-sys 0.52.0", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] -name = "const-hex" -version = "1.11.3" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" -dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", -] +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] -name = "const-oid" -version = "0.9.6" +name = "base64" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "constant_time_eq" -version = "0.1.5" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "core-foundation" -version = "0.9.4" +name = "base64ct" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] -name = "core-foundation-sys" -version = "0.8.6" +name = "bimap" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" [[package]] -name = "cpufeatures" -version = "0.2.12" +name = "bit-set" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "libc", + "bit-vec", ] [[package]] -name = "crc32fast" -version = "1.4.0" +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" + +[[package]] +name = "bitvec" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "cfg-if", + "funty", + "radium", + "tap", + "wyz", ] [[package]] -name = "crossbeam-channel" -version = "0.5.12" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "crossbeam-utils", + "generic-array", ] [[package]] -name = "crossbeam-deque" -version = "0.8.5" +name = "blst" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", + "cc", + "glob", + "threadpool", + "zeroize", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.18" +name = "brotli" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ - "crossbeam-utils", + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", ] [[package]] -name = "crossbeam-queue" -version = "0.3.11" +name = "brotli-decompressor" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ - "crossbeam-utils", + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] -name = "crossbeam-utils" -version = "0.8.19" +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 = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] -name = "crossterm" -version = "0.27.0" +name = "bytemuck" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ - "bitflags 2.5.0", - "crossterm_winapi", - "libc", - "parking_lot", - "winapi", + "bytemuck_derive", ] [[package]] -name = "crossterm_winapi" -version = "0.9.1" +name = "bytemuck_derive" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ - "winapi", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "cryo_cli" -version = "0.3.2" +name = "bytes" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ - "anstyle", - "clap_cryo", - "color-print", - "colored", - "cryo_freeze", - "ethers", - "eyre", - "governor", - "hex", - "mesc", - "polars", - "rand", "serde", - "serde_json", - "tokio", ] [[package]] -name = "cryo_freeze" -version = "0.3.2" +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ - "async-trait", - "chrono", - "colored", - "cryo_to_df", - "ethers", - "ethers-core", - "futures", - "governor", - "heck", - "indexmap", - "indicatif", - "lazy_static", - "mesc", - "polars", - "prefix-hex", - "regex", + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", "serde", - "serde_json", - "thiserror", - "thousands", - "tokio", ] [[package]] -name = "cryo_python" -version = "0.3.2" +name = "cc" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ - "cryo_cli", - "cryo_freeze", - "polars", - "pyo3", - "pyo3-asyncio", - "pyo3-build-config", - "pyo3-polars", - "tokio", + "jobserver", + "libc", + "shlex", ] [[package]] -name = "cryo_to_df" -version = "0.3.2" -dependencies = [ - "indexmap", - "proc-macro2", - "quote", - "syn 1.0.109", -] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "crypto-bigint" -version = "0.5.5" +name = "chrono" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.52.6", ] [[package]] -name = "crypto-common" -version = "0.1.6" +name = "chrono-tz" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" dependencies = [ - "generic-array", - "typenum", + "chrono", + "chrono-tz-build", + "phf", ] [[package]] -name = "ctr" -version = "0.9.2" +name = "chrono-tz-build" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" dependencies = [ - "cipher", + "parse-zoneinfo", + "phf", + "phf_codegen", ] [[package]] -name = "dashmap" -version = "5.5.3" +name = "clap_builder_cryo" +version = "4.3.21-cryo" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +checksum = "e9e3a8989ce9e79041f7681f82e669c1a06724975fb8f5b7bd60e359e572da76" dependencies = [ - "cfg-if", - "hashbrown", - "lock_api", - "once_cell", - "parking_lot_core", + "anstream", + "anstyle", + "clap_lex_cryo", + "strsim", ] [[package]] -name = "data-encoding" -version = "2.5.0" +name = "clap_cryo" +version = "4.3.21-cryo" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "053a8216426fdf2f5ce7fa46197e3517adf8b1c0ab96d3dbf73469bc15f34ad6" +dependencies = [ + "clap_builder_cryo", + "clap_derive_cryo", + "once_cell", +] [[package]] -name = "der" -version = "0.7.9" +name = "clap_derive_cryo" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "fd1cd2cebdb1ec98182edb745382a2b65d6bc254782de26316e4366d83d39988" dependencies = [ - "const-oid", - "zeroize", + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "deranged" -version = "0.3.11" +name = "clap_lex_cryo" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98979652585ac7c8d6267e363229b6a26bc4bf469c69e96442f85830ebc89f45" + +[[package]] +name = "color-print" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "3aa954171903797d5623e047d9ab69d91b493657917bdfb8c2c80ecaf9cdb6f4" dependencies = [ - "powerfmt", + "color-print-proc-macro", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "color-print-proc-macro" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "692186b5ebe54007e45a59aea47ece9eb4108e141326c304cdc91699a7118a22" dependencies = [ + "nom", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] -name = "digest" -version = "0.10.7" +name = "colorchoice" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] -name = "dirs" -version = "5.0.1" +name = "colored" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "dirs-sys", + "lazy_static", + "windows-sys 0.48.0", ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "comfy-table" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "24f165e7b643266ea80cb858aed492ad9280e3e05ce24d4a99d7d7b889b6a4d9" dependencies = [ - "cfg-if", - "dirs-sys-next", + "crossterm", + "strum", + "strum_macros 0.26.4", + "unicode-width 0.2.0", ] [[package]] -name = "dirs-sys" -version = "0.4.1" +name = "console" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ + "encode_unicode", + "lazy_static", "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", + "unicode-width 0.1.14", + "windows-sys 0.52.0", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "const-hex" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "487981fa1af147182687064d0a2c336586d337a606595ced9ffb0c685c250c73" dependencies = [ - "libc", - "redox_users", - "winapi", + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", ] [[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "dyn-clone" -version = "1.0.17" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] -name = "ecdsa" -version = "0.16.9" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", - "spki", + "core-foundation-sys", + "libc", ] [[package]] -name = "either" -version = "1.11.0" +name = "core-foundation-sys" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "elliptic-curve" -version = "0.13.8" +name = "cpufeatures" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", + "libc", ] [[package]] -name = "ena" -version = "0.14.2" +name = "crc32fast" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "log", + "cfg-if", ] [[package]] -name = "encode_unicode" -version = "0.3.6" +name = "crossbeam-channel" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] [[package]] -name = "encoding_rs" -version = "0.8.34" +name = "crossbeam-deque" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "enr" -version = "0.10.0" +name = "crossbeam-epoch" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand", - "rlp", - "serde", - "sha3", - "zeroize", + "crossbeam-utils", ] [[package]] -name = "enum_dispatch" -version = "0.3.13" +name = "crossbeam-queue" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.60", + "crossbeam-utils", ] [[package]] -name = "equivalent" -version = "1.0.1" +name = "crossbeam-utils" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] -name = "errno" -version = "0.3.8" +name = "crossterm" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "libc", - "windows-sys 0.52.0", + "bitflags", + "crossterm_winapi", + "parking_lot", + "rustix", + "winapi", ] [[package]] -name = "eth-keystore" -version = "0.5.0" +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "cryo_cli" +version = "0.3.2" dependencies = [ - "aes", - "ctr", - "digest", + "alloy", + "anstyle", + "clap_cryo", + "color-print", + "colored", + "cryo_freeze", + "eyre", + "governor", "hex", - "hmac", - "pbkdf2 0.11.0", + "mesc", + "polars", "rand", - "scrypt", "serde", "serde_json", - "sha2", - "sha3", - "thiserror", - "uuid 0.8.2", + "tokio", ] [[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +name = "cryo_freeze" +version = "0.3.2" dependencies = [ - "ethereum-types", - "hex", - "once_cell", + "alloy", + "async-trait", + "chrono", + "colored", + "cryo_to_df", + "futures", + "governor", + "heck 0.4.1", + "indexmap", + "indicatif", + "mesc", + "polars", + "prefix-hex", "regex", "serde", "serde_json", - "sha3", "thiserror", - "uint", + "thousands", + "tokio", + "url", ] [[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +name = "cryo_python" +version = "0.3.2" dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", + "cryo_cli", + "cryo_freeze", + "polars", + "pyo3", + "pyo3-asyncio", + "pyo3-build-config", + "pyo3-polars", + "tokio", ] [[package]] -name = "ethereum-types" -version = "0.14.1" +name = "cryo_to_df" +version = "0.3.2" +dependencies = [ + "indexmap", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", + "generic-array", + "rand_core", + "subtle", + "zeroize", ] [[package]] -name = "ethers" -version = "2.0.14" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", + "generic-array", + "typenum", ] [[package]] -name = "ethers-addressbook" -version = "2.0.14" +name = "dashmap" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "ethers-core", + "cfg-if", + "hashbrown 0.14.5", + "lock_api", "once_cell", - "serde", - "serde_json", + "parking_lot_core", ] [[package]] -name = "ethers-contract" -version = "2.0.14" +name = "dashmap" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", + "parking_lot_core", ] [[package]] -name = "ethers-contract-abigen" -version = "2.0.14" +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "der" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", "proc-macro2", "quote", - "regex", - "reqwest", - "serde", - "serde_json", - "syn 2.0.60", - "toml", - "walkdir", + "syn 1.0.109", ] [[package]] -name = "ethers-contract-derive" -version = "2.0.14" +name = "derive_more" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +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 = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", "proc-macro2", "quote", - "serde_json", - "syn 2.0.60", + "syn 2.0.89", + "unicode-xid", ] [[package]] -name = "ethers-core" -version = "2.0.14" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", "generic-array", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.60", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", ] [[package]] -name = "ethers-etherscan" -version = "2.0.14" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "chrono", - "ethers-core", - "reqwest", - "semver", - "serde", - "serde_json", - "thiserror", - "tracing", + "block-buffer", + "const-oid", + "crypto-common", + "subtle", ] [[package]] -name = "ethers-middleware" -version = "2.0.14" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + +[[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 = "ethers-providers" -version = "2.0.14" +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "enum_dispatch" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http", - "instant", - "jsonwebtoken", "once_cell", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winapi", - "ws_stream_wasm", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "ethers-signers" -version = "2.0.14" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand", - "sha2", - "thiserror", - "tracing", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "ethers-solc" -version = "2.0.14" +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "cfg-if", - "const-hex", - "dirs", - "dunce", - "ethers-core", - "glob", - "home", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror", - "tiny-keccak", - "tokio", - "tracing", - "walkdir", - "yansi", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -1500,9 +1735,20 @@ checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" [[package]] name = "fastrand" -version = "2.0.2" +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 = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] [[package]] name = "ff" @@ -1526,17 +1772,11 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1557,6 +1797,27 @@ 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 = "foreign_vec" version = "0.1.0" @@ -1572,16 +1833,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "funty" version = "2.0.0" @@ -1590,9 +1841,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1605,9 +1856,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1615,15 +1866,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1632,58 +1883,44 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-locks" -version = "0.7.1" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1698,13 +1935,10 @@ dependencies = [ ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "futures-utils-wasm" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "generic-array" @@ -1719,9 +1953,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1732,9 +1966,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1742,18 +1976,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "governor" version = "0.6.3" @@ -1761,7 +1983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" dependencies = [ "cfg-if", - "dashmap", + "dashmap 5.5.3", "futures", "futures-timer", "no-std-compat", @@ -1785,40 +2007,27 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "halfbrown" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8588661a8607108a5ca69cab034063441a0413a0b041c13618a7dd348021ef6f" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "serde", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + +[[package]] +name = "hashbrown" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -1826,12 +2035,15 @@ dependencies = [ ] [[package]] -name = "hashers" -version = "1.0.1" +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ - "fxhash", + "allocator-api2", + "equivalent", + "foldhash", + "serde", ] [[package]] @@ -1840,17 +2052,38 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[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 = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[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" @@ -1858,7 +2091,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -1872,9 +2105,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -1883,134 +2116,267 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", - "pin-project-lite", ] [[package]] -name = "httparse" -version = "1.8.0" +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] [[package]] -name = "httpdate" -version = "1.0.3" +name = "httparse" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "0.14.28" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", + "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.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", - "want", ] [[package]] -name = "hyper-rustls" -version = "0.24.2" +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 = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", ] [[package]] -name = "iana-time-zone" -version = "0.1.60" +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 = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "icu_properties_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" dependencies = [ - "cc", + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "idna" -version = "0.5.0" +name = "icu_provider_macros" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "impl-codec" -version = "0.6.0" +name = "idna" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "parity-scale-codec", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "impl-rlp" -version = "0.3.0" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "rlp", + "icu_normalizer", + "icu_properties", ] [[package]] -name = "impl-serde" -version = "0.4.0" +name = "impl-codec" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "serde", + "parity-scale-codec", ] [[package]] name = "impl-trait-for-tuples" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] @@ -2021,25 +2387,26 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", + "serde", ] [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.2.0", + "web-time", ] [[package]] @@ -2049,54 +2416,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.12" +name = "interprocess" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "894148491d817cb36b6f778017b8ac46b17408d522dd90f539d677ea938362eb" dependencies = [ - "cfg-if", + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "itertools" -version = "0.11.0" +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 = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "itoap" @@ -2106,18 +2479,18 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8" [[package]] name = "jobserver" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685a7d121ee3f65ae4fddd72b25a04bb36b6af81bc0828f7d5434c0fe60fa3a2" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2133,32 +2506,17 @@ dependencies = [ "serde_json", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", "once_cell", "sha2", - "signature", ] [[package]] @@ -2171,46 +2529,26 @@ dependencies = [ ] [[package]] -name = "lalrpop" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" -dependencies = [ - "ascii-canvas", - "bit-set", - "ena", - "itertools", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", - "walkdir", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.2" +name = "keccak-asm" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" dependencies = [ - "regex-automata", + "digest 0.10.7", + "sha3-asm", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lexical-core" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "0431c65b318a590c1de6b8fd6e72798c92291d27762d94c9e6c37ed7a73d8458" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -2221,9 +2559,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "eb17a4bdb9b418051aa59d41d65b1c9be5affab314a872e5ad7f06231fb3b4e0" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -2232,9 +2570,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "5df98f4a4ab53bf8b175b363a34c7af608fe31f93cc1fb1bf07130622ca4ef61" dependencies = [ "lexical-util", "static_assertions", @@ -2242,18 +2580,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.5" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "85314db53332e5c192b6bca611fb10c114a80d1b831ddac0af1e9be1b9232ca0" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "6e7c3ad4e37db81c1cbe7cf34610340adc09c322871972f74877a712abc6c809" dependencies = [ "lexical-util", "lexical-write-integer", @@ -2262,9 +2600,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "eb89e9f6958b83258afa3deed90b5de9ef68eef090ad5086c791cd2345610162" dependencies = [ "lexical-util", "static_assertions", @@ -2272,37 +2610,33 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.165" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "fcb4d3d38eab6c5239a362fa8bae48c03baf980a6e7079f063942d563ef3533e" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] -name = "libredox" -version = "0.1.3" +name = "linux-raw-sys" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] -name = "linux-raw-sys" -version = "0.4.13" +name = "litemap" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -2310,45 +2644,43 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] -name = "lz4" -version = "1.24.0" +name = "lru" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "libc", - "lz4-sys", + "hashbrown 0.15.2", ] [[package]] -name = "lz4-sys" -version = "1.9.4" +name = "lz4" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "4d1febb2b4a79ddd1980eede06a8f7902197960aa0383ffcfdd62fe723036725" dependencies = [ - "cc", - "libc", + "lz4-sys", ] [[package]] -name = "md-5" -version = "0.10.6" +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ - "cfg-if", - "digest", + "cc", + "libc", ] [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2393,22 +2725,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2434,10 +2767,21 @@ dependencies = [ ] [[package]] -name = "new_debug_unreachable" -version = "1.0.6" +name = "native-tls" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] [[package]] name = "no-std-compat" @@ -2481,21 +2825,14 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "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" @@ -2507,9 +2844,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -2521,29 +2858,28 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] @@ -2554,81 +2890,95 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] -name = "open-fastrlp" -version = "0.1.4" +name = "openssl" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", ] [[package]] -name = "open-fastrlp-derive" +name = "openssl-macros" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "bytes", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] -name = "option-ext" -version = "0.2.0" +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 = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +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.6.9" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2636,15 +2986,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2667,52 +3017,10 @@ dependencies = [ ] [[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest", - "hmac", - "password-hash", - "sha2", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest", - "hmac", -] - -[[package]] -name = "pem" -version = "1.1.1" +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" @@ -2721,13 +3029,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "petgraph" -version = "0.6.4" +name = "pest" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ - "fixedbitset", - "indexmap", + "memchr", + "thiserror", + "ucd-trie", ] [[package]] @@ -2737,7 +3046,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version", + "rustc_version 0.4.1", ] [[package]] @@ -2746,8 +3055,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "phf_macros", - "phf_shared 0.11.2", + "phf_shared", ] [[package]] @@ -2757,7 +3065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" dependencies = [ "phf_generator", - "phf_shared 0.11.2", + "phf_shared", ] [[package]] @@ -2766,32 +3074,10 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared 0.11.2", + "phf_shared", "rand", ] -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - [[package]] name = "phf_shared" version = "0.11.2" @@ -2803,29 +3089,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2845,9 +3131,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "planus" @@ -2897,7 +3183,7 @@ dependencies = [ "foreign_vec", "futures", "getrandom", - "hashbrown", + "hashbrown 0.14.5", "itoa", "itoap", "lz4", @@ -2911,7 +3197,7 @@ dependencies = [ "streaming-iterator", "strength_reduce", "version_check", - "zstd 0.13.1", + "zstd", ] [[package]] @@ -2947,13 +3233,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f20d3c227186f74aa3c228c64ef72f5a15617322fed30b4323eaf53b25f8e7b" dependencies = [ "ahash", - "bitflags 2.5.0", + "bitflags", "bytemuck", "chrono", "chrono-tz", "comfy-table", "either", - "hashbrown", + "hashbrown 0.14.5", "indexmap", "num-traits", "once_cell", @@ -3031,7 +3317,7 @@ dependencies = [ "ahash", "chrono", "fallible-streaming-iterator", - "hashbrown", + "hashbrown 0.14.5", "indexmap", "itoa", "num-traits", @@ -3050,7 +3336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c27df26a19d3092298d31d47614ad84dc330c106e38aa8cd53727cd91c07cf56" dependencies = [ "ahash", - "bitflags 2.5.0", + "bitflags", "glob", "once_cell", "polars-arrow", @@ -3080,7 +3366,7 @@ dependencies = [ "chrono", "chrono-tz", "either", - "hashbrown", + "hashbrown 0.14.5", "hex", "indexmap", "jsonpath_lib_polars_vendor", @@ -3123,7 +3409,7 @@ dependencies = [ "simdutf8", "snap", "streaming-decompression", - "zstd 0.13.1", + "zstd", ] [[package]] @@ -3135,7 +3421,7 @@ dependencies = [ "crossbeam-channel", "crossbeam-queue", "enum_dispatch", - "hashbrown", + "hashbrown 0.14.5", "num-traits", "polars-arrow", "polars-compute", @@ -3147,7 +3433,7 @@ dependencies = [ "polars-utils", "rayon", "smartstring", - "uuid 1.10.0", + "uuid", "version_check", ] @@ -3235,7 +3521,7 @@ checksum = "694656a7d2b0cd8f07660dbc8d0fb7a81066ff57a452264907531d805c1e58c4" dependencies = [ "ahash", "bytemuck", - "hashbrown", + "hashbrown 0.14.5", "indexmap", "num-traits", "once_cell", @@ -3249,27 +3535,18 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "powerfmt" -version = "0.2.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prefix-hex" @@ -3277,17 +3554,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f1799f398371ad6957951ec446d3ff322d35c46d9db2e217b67e828b311c249" dependencies = [ - "hex", -] - -[[package]] -name = "prettyplease" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" -dependencies = [ - "proc-macro2", - "syn 2.0.60", + "hex", ] [[package]] @@ -3298,62 +3565,66 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] [[package]] name = "proc-macro-crate" -version = "1.3.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "toml_edit", ] [[package]] -name = "proc-macro-crate" +name = "proc-macro-error-attr2" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "toml_edit 0.20.7", + "proc-macro2", + "quote", ] [[package]] -name = "proc-macro-crate" -version = "3.1.0" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ - "toml_edit 0.21.1", + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ - "bitflags 2.5.0", + "bit-set", + "bit-vec", + "bitflags", "lazy_static", "num-traits", "rand", "rand_chacha", "rand_xorshift", "regex-syntax", + "rusty-fork", + "tempfile", "unarray", ] @@ -3417,7 +3688,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] @@ -3426,11 +3697,11 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] @@ -3460,11 +3731,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3484,6 +3761,7 @@ dependencies = [ "libc", "rand_chacha", "rand_core", + "serde", ] [[package]] @@ -3526,11 +3804,11 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.0.1" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ - "bitflags 2.5.0", + "bitflags", ] [[package]] @@ -3554,50 +3832,45 @@ dependencies = [ ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "recvmsg" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] -name = "redox_users" -version = "0.4.5" +name = "redox_syscall" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "getrandom", - "libredox", - "thiserror", + "bitflags", ] [[package]] name = "ref-cast" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3607,9 +3880,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -3618,49 +3891,47 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ - "base64 0.21.7", + "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", - "rustls", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 1.0.2", "tokio", - "tokio-rustls", + "tokio-native-tls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", - "winreg", + "windows-registry", ] [[package]] @@ -3673,21 +3944,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.8" @@ -3698,20 +3954,11 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "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", -] - [[package]] name = "rlp" version = "0.5.2" @@ -3719,26 +3966,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] [[package]] -name = "rlp-derive" -version = "0.1.0" +name = "ruint" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "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.23" +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 = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc-hex" @@ -3748,20 +4019,29 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +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 = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver", + "semver 1.0.23", ] [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -3770,87 +4050,86 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.11" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ - "log", - "ring 0.17.8", + "once_cell", + "ring", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.7", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "rustls-pki-types", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" - -[[package]] -name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] -name = "salsa20" -version = "0.10.2" +name = "rusty-fork" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" dependencies = [ - "cipher", + "fnv", + "quick-error", + "tempfile", + "wait-timeout", ] [[package]] -name = "same-file" -version = "1.0.6" +name = "ryu" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] -name = "scale-info" -version = "2.11.2" +name = "schannel" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", + "windows-sys 0.59.0", ] [[package]] -name = "scale-info-derive" -version = "2.11.2" +name = "schnellru" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", + "ahash", + "cfg-if", + "hashbrown 0.13.2", ] [[package]] @@ -3860,55 +4139,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "scrypt" -version = "0.10.0" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", ] [[package]] -name = "sct" -version = "0.7.1" +name = "security-framework" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] -name = "sec1" -version = "0.7.3" +name = "security-framework-sys" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", + "core-foundation-sys", + "libc", ] [[package]] name = "semver" -version = "1.0.22" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "serde", + "semver-parser", ] [[package]] -name = "send_wrapper" -version = "0.4.0" +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 = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] [[package]] name = "send_wrapper" @@ -3924,45 +4213,37 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.198" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "indexmap", "itoa", + "memchr", "ryu", "serde", ] -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3983,7 +4264,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -3994,7 +4275,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -4003,25 +4284,41 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest", + "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", + "digest 0.10.7", "rand_core", ] [[package]] name = "simd-json" -version = "0.13.10" +version = "0.13.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570c430b3d902ea083097e853263ae782dfe40857d93db019a12356c8e8143fa" +checksum = "a0228a564470f81724e30996bbc2b171713b37b15254a6440c7e2d5449b95691" dependencies = [ "ahash", "getrandom", @@ -4037,21 +4334,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - -[[package]] -name = "simple_asn1" -version = "0.6.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" @@ -4093,34 +4378,14 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", ] -[[package]] -name = "solang-parser" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" -dependencies = [ - "itertools", - "lalrpop", - "lalrpop-util", - "phf", - "thiserror", - "unicode-xid", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -4155,6 +4420,12 @@ dependencies = [ "log", ] +[[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" @@ -4182,19 +4453,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", -] - [[package]] name = "strsim" version = "0.10.0" @@ -4203,11 +4461,11 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.2", + "strum_macros 0.26.4", ] [[package]] @@ -4216,57 +4474,48 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] -name = "svm-rs" -version = "0.3.5" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "dirs", - "fs2", - "hex", - "once_cell", - "reqwest", - "semver", - "serde", - "serde_json", - "sha2", - "thiserror", - "url", - "zip", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "syn" -version = "1.0.109" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -4274,14 +4523,15 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.60" +name = "syn-solidity" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "6bdaa7b9e815582ba343a20c66627437cf45f1c6fba7f69772cbfd1358c7e197" dependencies = [ + "paste", "proc-macro2", "quote", - "unicode-ident", + "syn 2.0.89", ] [[package]] @@ -4291,38 +4541,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "sysinfo" -version = "0.30.11" +name = "sync_wrapper" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87341a165d73787554941cd5ef55ad728011566fe714e987d1b976c15dbc3a83" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "windows", + "futures-core", ] [[package]] -name = "system-configuration" -version = "0.5.1" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "system-configuration-sys" -version = "0.5.0" +name = "sysinfo" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" dependencies = [ + "cfg-if", "core-foundation-sys", "libc", + "ntapi", + "once_cell", + "windows", ] [[package]] @@ -4339,51 +4588,41 @@ checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" [[package]] name = "target-lexicon" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" - -[[package]] -name = "tempfile" -version = "3.10.1" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] -name = "term" -version = "0.7.0" +name = "tempfile" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ - "dirs-next", - "rustversion", - "winapi", + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] @@ -4393,34 +4632,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[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" +name = "threadpool" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" dependencies = [ - "num-conv", - "time-core", + "num_cpus", ] [[package]] @@ -4433,67 +4650,85 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[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.37.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "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.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +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-tungstenite" -version = "0.20.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", "rustls", + "rustls-pki-types", "tokio", "tokio-rustls", "tungstenite", @@ -4502,90 +4737,59 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.12", ] [[package]] name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "toml_datetime", - "winnow 0.5.40", + "winnow", ] [[package]] -name = "toml_edit" -version = "0.21.1" +name = "tower" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", ] [[package]] -name = "toml_edit" -version = "0.22.12" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.6", -] +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4606,28 +4810,18 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -4636,9 +4830,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" dependencies = [ "byteorder", "bytes", @@ -4648,9 +4842,9 @@ dependencies = [ "log", "rand", "rustls", + "rustls-pki-types", "sha1", "thiserror", - "url", "utf-8", ] @@ -4660,6 +4854,12 @@ 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" @@ -4678,26 +4878,11 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-reverse" @@ -4710,21 +4895,27 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unindent" @@ -4732,12 +4923,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -4746,9 +4931,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -4761,30 +4946,38 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[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.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "0.8.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", - "serde", ] [[package]] -name = "uuid" -version = "1.10.0" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" -dependencies = [ - "getrandom", -] +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-trait" @@ -4798,20 +4991,25 @@ dependencies = [ "ryu", ] +[[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.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "walkdir" -version = "2.5.0" +name = "wait-timeout" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ - "same-file", - "winapi-util", + "libc", ] [[package]] @@ -4831,34 +5029,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -4868,9 +5067,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4878,28 +5077,52 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" + +[[package]] +name = "wasmtimer" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -4907,9 +5130,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "widestring" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -4927,15 +5159,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -4949,7 +5172,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4958,7 +5181,37 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +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 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[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 0.52.6", ] [[package]] @@ -4976,7 +5229,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -4996,18 +5258,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -5018,9 +5280,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -5030,9 +5292,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -5042,15 +5304,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -5060,9 +5322,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -5072,9 +5334,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -5084,9 +5346,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -5096,37 +5358,30 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] [[package]] -name = "winnow" -version = "0.6.6" +name = "write16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" -dependencies = [ - "memchr", -] +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" [[package]] -name = "winreg" -version = "0.50.0" +name = "writeable" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "ws_stream_wasm" @@ -5139,8 +5394,8 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version", - "send_wrapper 0.6.0", + "rustc_version 0.4.1", + "send_wrapper", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -5158,104 +5413,141 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] -name = "yansi" -version = "0.5.1" +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 = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +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 = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.89", + "synstructure", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] [[package]] -name = "zip" -version = "0.6.6" +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd 0.11.2+zstd.1.5.2", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" +name = "zerovec" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", + "yoke", + "zerofrom", + "zerovec-derive", ] [[package]] -name = "zstd" -version = "0.13.1" +name = "zerovec-derive" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ - "zstd-safe 7.1.0", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +name = "zstd" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index c27463ff..bde9386e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,15 @@ cryo_cli = { version = "0.3.2", path = "./crates/cli" } cryo_freeze = { version = "0.3.2", path = "./crates/freeze" } cryo_to_df = { version = "0.3.2", path = "./crates/to_df" } +alloy = { version = "0.6.4", features = [ + "full", + "rpc-types-trace", + "provider-ws", + "provider-ipc", + "provider-debug-api", + "provider-trace-api", + "transport-ipc-mock", +] } anstyle = "1.0.4" async-trait = "0.1.74" chrono = { version = "0.4.31", features = ["serde"] } @@ -29,8 +38,6 @@ clap_cryo = { version = "4.3.21-cryo", features = [ ] } colored = "2.0.4" color-print = "0.3.5" -ethers = { version = "2.0.10", features = ["rustls", "ws", "ipc"] } -ethers-core = "2.0.10" eyre = "0.6.8" futures = "0.3.29" governor = "0.6.0" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 7eb4fccb..49cb9a0d 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -18,12 +18,12 @@ path = "src/main.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +alloy = { workspace = true } anstyle = { workspace = true } clap_cryo = { workspace = true } color-print = { workspace = true } colored = { workspace = true } cryo_freeze = { workspace = true } -ethers = { workspace = true } eyre = { workspace = true } governor = { workspace = true } hex = { workspace = true } diff --git a/crates/cli/src/args.rs b/crates/cli/src/args.rs index 49eff61c..238db4e5 100644 --- a/crates/cli/src/args.rs +++ b/crates/cli/src/args.rs @@ -106,6 +106,10 @@ pub struct Args { #[arg(long, default_value_t = 500, value_name = "B", help_heading = "Acquisition Options")] pub initial_backoff: u64, + /// The number of compute units per second for this provider + #[arg(long, default_value_t = 50, value_name = "U", help_heading = "Acquisition Options")] + pub compute_units_per_second: u64, + /// Global number of concurrent requests #[arg(long, value_name = "M", help_heading = "Acquisition Options")] pub max_concurrent_requests: Option, diff --git a/crates/cli/src/parse/blocks.rs b/crates/cli/src/parse/blocks.rs index 1f915c55..a9e75df2 100644 --- a/crates/cli/src/parse/blocks.rs +++ b/crates/cli/src/parse/blocks.rs @@ -168,6 +168,7 @@ async fn parse_block_inputs( } } +#[derive(Clone, Debug)] enum RangePosition { First, Last, @@ -322,15 +323,14 @@ async fn parse_block_number( source: Arc, ) -> Result { match (block_ref, range_position) { - ("latest", _) => source.get_block_number().await.map(|n| n.as_u64()).map_err(|_e| { + ("latest", _) => source.get_block_number().await.map_err(|_e| { ParseError::ParseError("Error retrieving latest block number".to_string()) }), ("", RangePosition::First) => Ok(0), - ("", RangePosition::Last) => { - source.get_block_number().await.map(|n| n.as_u64()).map_err(|_e| { - ParseError::ParseError("Error retrieving last block number".to_string()) - }) - } + ("", RangePosition::Last) => source + .get_block_number() + .await + .map_err(|_e| ParseError::ParseError("Error retrieving last block number".to_string())), ("", RangePosition::None) => Err(ParseError::ParseError("invalid input".to_string())), _ if block_ref.ends_with('B') | block_ref.ends_with('b') => { let s = &block_ref[..block_ref.len() - 1]; @@ -366,7 +366,7 @@ async fn apply_reorg_buffer( 0 => Ok(block_chunks), reorg_filter => { let latest_block = match source.get_block_number().await { - Ok(result) => result.as_u64(), + Ok(result) => result, Err(_e) => { return Err(ParseError::ParseError("reorg buffer parse error".to_string())) } @@ -387,24 +387,34 @@ pub(crate) async fn get_latest_block_number(source: Arc) -> Result { WithoutMock((&'a str, BlockChunk)), // Token | Expected WithMock((&'a str, BlockChunk, u64)), // Token | Expected | Mock Block Response } - async fn block_token_test_helper(tests: Vec<(BlockTokenTest<'_>, bool)>) { - let (provider, mock) = Provider::mocked(); + async fn block_token_test_helper( + tests: Vec<(BlockTokenTest<'_>, bool)>, + mock_ipc_path: PathBuf, + ) { + let ipc = IpcConnect::new(mock_ipc_path); + let provider = ProviderBuilder::new().on_ipc(ipc).await.unwrap().boxed(); let source = Source { - provider: provider.into(), + provider, semaphore: Arc::new(None), rate_limiter: Arc::new(None), chain_id: 1, @@ -416,8 +426,7 @@ mod tests { let source = Arc::new(source); for (test, res) in tests { match test { - BlockTokenTest::WithMock((token, expected, latest)) => { - mock.push(U64::from(latest)).unwrap(); + BlockTokenTest::WithMock((token, expected, _latest)) => { assert_eq!( block_token_test_executor(token, expected, source.clone()).await, res @@ -458,15 +467,20 @@ mod tests { } } + #[derive(Clone, Debug)] enum BlockInputTest<'a> { WithoutMock((&'a String, Vec)), // Token | Expected WithMock((&'a String, Vec, u64)), // Token | Expected | Mock Block Response } - async fn block_input_test_helper(tests: Vec<(BlockInputTest<'_>, bool)>) { - let (provider, mock) = Provider::mocked(); + async fn block_input_test_helper( + tests: Vec<(BlockInputTest<'_>, bool)>, + mock_ipc_path: PathBuf, + ) { + let ipc = IpcConnect::new(mock_ipc_path); + let provider = ProviderBuilder::new().on_ipc(ipc).await.unwrap().boxed(); let source = Arc::new(Source { - provider: provider.into(), + provider, chain_id: 1, rpc_url: "".to_string(), inner_request_size: 1, @@ -477,8 +491,7 @@ mod tests { }); for (test, res) in tests { match test { - BlockInputTest::WithMock((inputs, expected, latest)) => { - mock.push(U64::from(latest)).unwrap(); + BlockInputTest::WithMock((inputs, expected, _latest)) => { assert_eq!( block_input_test_executor(inputs, expected, source.clone()).await, res @@ -531,15 +544,20 @@ mod tests { true } + #[derive(Clone, Debug)] enum BlockNumberTest<'a> { WithoutMock((&'a str, RangePosition, u64)), WithMock((&'a str, RangePosition, u64, u64)), } - async fn block_number_test_helper(tests: Vec<(BlockNumberTest<'_>, bool)>) { - let (provider, mock) = Provider::mocked(); + async fn block_number_test_helper( + tests: Vec<(BlockNumberTest<'_>, bool)>, + mock_ipc_path: PathBuf, + ) { + let provider = + ProviderBuilder::new().on_ipc(IpcConnect::new(mock_ipc_path)).await.unwrap().boxed(); let source = Source { - provider: provider.into(), + provider, semaphore: Arc::new(None), rate_limiter: Arc::new(None), chain_id: 1, @@ -551,8 +569,7 @@ mod tests { let source = Arc::new(source); for (test, res) in tests { match test { - BlockNumberTest::WithMock((block_ref, range_position, expected, latest)) => { - mock.push(U64::from(latest)).unwrap(); + BlockNumberTest::WithMock((block_ref, range_position, expected, _latest)) => { assert_eq!( block_number_test_executor( block_ref, @@ -604,7 +621,18 @@ mod tests { // Number type (BlockTokenTest::WithoutMock((r"1", BlockChunk::Numbers(vec![1]))), true), /* Single block */ ]; - block_token_test_helper(tests).await; + let mut mock_server = MockIpcServer::new(); + let mock_ipc_path = mock_server.path().clone(); + for (test, _) in tests.clone().into_iter() { + match test { + BlockTokenTest::WithoutMock(_) => {} + BlockTokenTest::WithMock((_, _, mock_response)) => { + mock_server.add_reply(mock_response) + } + } + } + mock_server.spawn().await; + block_token_test_helper(tests, mock_ipc_path).await; } #[tokio::test] @@ -648,7 +676,16 @@ mod tests { true, ), // Multi input complex ]; - block_input_test_helper(tests).await; + let mut mock_server = MockIpcServer::new(); + let mock_ipc_path = mock_server.path().clone(); + for (test, _) in tests.clone() { + match test { + BlockInputTest::WithMock((_, _, expected)) => mock_server.add_reply(expected), + BlockInputTest::WithoutMock(_) => {} + } + } + mock_server.spawn().await; + block_input_test_helper(tests, mock_ipc_path).await; } #[tokio::test] @@ -666,6 +703,15 @@ mod tests { (BlockNumberTest::WithoutMock((r"1m", RangePosition::None, 1000000)), true), // m (BlockNumberTest::WithoutMock((r"1k", RangePosition::None, 1000)), true), // k ]; - block_number_test_helper(tests).await; + let mut mock_server = MockIpcServer::new(); + let mock_ipc_path = mock_server.path().clone(); + for (test, _) in tests.clone() { + match test { + BlockNumberTest::WithMock((_, _, _, expected)) => mock_server.add_reply(expected), + BlockNumberTest::WithoutMock(_) => {} + } + } + mock_server.spawn().await; + block_number_test_helper(tests, mock_ipc_path).await; } } diff --git a/crates/cli/src/parse/file_output.rs b/crates/cli/src/parse/file_output.rs index e5d0417a..db6430b1 100644 --- a/crates/cli/src/parse/file_output.rs +++ b/crates/cli/src/parse/file_output.rs @@ -142,7 +142,7 @@ fn parse_row_group_size( ) -> Option { match (row_group_size, n_row_groups, chunk_size) { (Some(row_group_size), _, _) => Some(row_group_size), - (_, Some(n_row_groups), Some(cs)) => Some((cs + n_row_groups - 1) / n_row_groups), + (_, Some(n_row_groups), Some(cs)) => Some(cs.div_ceil(n_row_groups)), _ => None, } } diff --git a/crates/cli/src/parse/parse_utils.rs b/crates/cli/src/parse/parse_utils.rs index 04f46987..d445df4a 100644 --- a/crates/cli/src/parse/parse_utils.rs +++ b/crates/cli/src/parse/parse_utils.rs @@ -1,7 +1,7 @@ use cryo_freeze::ParseError; use std::collections::HashMap; -pub(crate) fn hex_string_to_binary(hex_string: &String) -> Result, ParseError> { +pub(crate) fn hex_string_to_binary(hex_string: &str) -> Result, ParseError> { let hex_string = hex_string.strip_prefix("0x").unwrap_or(hex_string); hex::decode(hex_string) .map_err(|_| ParseError::ParseError("could not parse data as hex".to_string())) diff --git a/crates/cli/src/parse/partitions.rs b/crates/cli/src/parse/partitions.rs index bada931d..0816435e 100644 --- a/crates/cli/src/parse/partitions.rs +++ b/crates/cli/src/parse/partitions.rs @@ -8,7 +8,6 @@ use cryo_freeze::{ AddressChunk, CallDataChunk, Datatype, Dim, ParseError, Partition, PartitionLabels, SlotChunk, Source, Table, TimeDimension, TopicChunk, TransactionChunk, }; -use ethers::prelude::*; use rand::{seq::SliceRandom, thread_rng}; use std::{collections::HashMap, str::FromStr, sync::Arc}; diff --git a/crates/cli/src/parse/source.rs b/crates/cli/src/parse/source.rs index 8688d260..6b625157 100644 --- a/crates/cli/src/parse/source.rs +++ b/crates/cli/src/parse/source.rs @@ -1,8 +1,12 @@ use std::env; use crate::args::Args; -use cryo_freeze::{sources::ProviderWrapper, ParseError, Source, SourceLabels}; -use ethers::prelude::*; +use alloy::{ + providers::{Provider, ProviderBuilder, RootProvider}, + rpc::client::{BuiltInConnectionString, ClientBuilder, RpcClient}, + transports::{layers::RetryBackoffLayer, BoxTransport}, +}; +use cryo_freeze::{ParseError, Source, SourceLabels}; use governor::{Quota, RateLimiter}; use polars::prelude::*; use std::num::NonZeroU32; @@ -10,31 +14,20 @@ use std::num::NonZeroU32; pub(crate) async fn parse_source(args: &Args) -> Result { // parse network info let rpc_url = parse_rpc_url(args)?; - let (provider, chain_id): (ProviderWrapper, u64) = if rpc_url.starts_with("http") { - let provider = Provider::>::new_client( - &rpc_url, - args.max_retries, - args.initial_backoff, - ) - .map_err(|_e| ParseError::ParseError("could not connect to provider".to_string()))?; - let chain_id = provider.get_chainid().await.map_err(ParseError::ProviderError)?.as_u64(); - (provider.into(), chain_id) - } else if rpc_url.starts_with("ws") { - let provider = Provider::::connect(&rpc_url).await.map_err(|_| { - ParseError::ParseError("could not instantiate HTTP Provider".to_string()) - })?; - let chain_id = provider.get_chainid().await.map_err(ParseError::ProviderError)?.as_u64(); - (provider.into(), chain_id) - } else if rpc_url.ends_with(".ipc") { - let provider: Provider = Provider::connect_ipc(&rpc_url).await.map_err(|_| { - ParseError::ParseError("could not instantiate HTTP Provider".to_string()) - })?; - let chain_id = provider.get_chainid().await.map_err(ParseError::ProviderError)?.as_u64(); - (provider.into(), chain_id) - } else { - return Err(ParseError::ParseError(format!("invalid rpc url: {}", rpc_url))); - }; - + let retry_layer = RetryBackoffLayer::new( + args.max_retries, + args.initial_backoff, + args.compute_units_per_second, + ); + let connect: BuiltInConnectionString = rpc_url.parse().map_err(ParseError::ProviderError)?; + let client: RpcClient = ClientBuilder::default() + .layer(retry_layer) + .connect_boxed(connect) + .await + .map_err(ParseError::ProviderError)? + .boxed(); + let provider: RootProvider = ProviderBuilder::default().on_client(client); + let chain_id = provider.get_chain_id().await.map_err(ParseError::ProviderError)?; let rate_limiter = match args.requests_per_second { Some(rate_limit) => match (NonZeroU32::new(1), NonZeroU32::new(rate_limit)) { (Some(one), Some(value)) => { diff --git a/crates/cli/src/parse/timestamps.rs b/crates/cli/src/parse/timestamps.rs index e6e26b47..35b54ab8 100644 --- a/crates/cli/src/parse/timestamps.rs +++ b/crates/cli/src/parse/timestamps.rs @@ -1,3 +1,4 @@ +use alloy::rpc::types::BlockTransactionsKind; use cryo_freeze::{BlockChunk, ParseError, Source}; use polars::prelude::*; @@ -277,7 +278,7 @@ async fn timestamp_to_block_number(timestamp: u64, source: Arc) -> Resul let mut r = latest_block_number; let mut mid = (l + r) / 2; let mut block = source - .get_block(mid) + .get_block(mid, BlockTransactionsKind::Hashes) .await .map_err(|_e| ParseError::ParseError("Error fetching block for timestamp".to_string()))? .unwrap(); @@ -285,15 +286,15 @@ async fn timestamp_to_block_number(timestamp: u64, source: Arc) -> Resul while l <= r { mid = (l + r) / 2; block = source - .get_block(mid) + .get_block(mid, BlockTransactionsKind::Hashes) .await .map_err(|_e| ParseError::ParseError("Error fetching block for timestamp".to_string()))? .unwrap(); #[allow(clippy::comparison_chain)] - if block.timestamp == timestamp.into() { + if block.header.timestamp == timestamp { return Ok(mid); - } else if block.timestamp < timestamp.into() { + } else if block.header.timestamp < timestamp { l = mid + 1; } else { r = mid - 1; @@ -301,7 +302,7 @@ async fn timestamp_to_block_number(timestamp: u64, source: Arc) -> Resul } // If timestamp is between two different blocks, return the lower block. - if mid > 0 && block.timestamp > ethers::types::U256::from(timestamp) { + if mid > 0 && block.header.timestamp > timestamp { Ok(mid - 1) } else { Ok(mid) @@ -311,23 +312,27 @@ async fn timestamp_to_block_number(timestamp: u64, source: Arc) -> Resul async fn get_latest_timestamp(source: Arc) -> Result { let latest_block_number = get_latest_block_number(source.clone()).await?; let latest_block = source - .get_block(latest_block_number) + .get_block(latest_block_number, BlockTransactionsKind::Hashes) .await .map_err(|_e| ParseError::ParseError("Error fetching latest block".to_string()))? .unwrap(); - Ok(latest_block.timestamp.as_u64()) + Ok(latest_block.header.timestamp) } #[cfg(test)] mod tests { use std::num::NonZeroU32; + use alloy::{ + providers::ProviderBuilder, + rpc::client::{BuiltInConnectionString, ClientBuilder, RpcClient}, + transports::{layers::RetryBackoffLayer, BoxTransport}, + }; use governor::{Quota, RateLimiter}; use super::*; use cryo_freeze::SourceLabels; - use ethers::prelude::*; async fn setup_source() -> Source { let rpc_url = match crate::parse::source::parse_rpc_url(&Args::default()) { @@ -336,19 +341,27 @@ mod tests { }; let max_retry = 5; let initial_backoff = 500; + let compute_units_per_second = 50; let max_concurrent_requests = 100; - let provider = - Provider::>::new_client(&rpc_url, max_retry, initial_backoff) - .map_err(|_e| ParseError::ParseError("could not connect to provider".to_string())) - .unwrap(); - + let retry_layer = + RetryBackoffLayer::new(max_retry, initial_backoff, compute_units_per_second); + let connect: BuiltInConnectionString = + rpc_url.parse().map_err(ParseError::ProviderError).unwrap(); + let client: RpcClient = ClientBuilder::default() + .layer(retry_layer) + .connect_boxed(connect) + .await + .map_err(ParseError::ProviderError) + .unwrap() + .boxed(); + let provider = ProviderBuilder::default().on_client(client); let quota = Quota::per_second(NonZeroU32::new(15).unwrap()) .allow_burst(NonZeroU32::new(1).unwrap()); let rate_limiter = Some(RateLimiter::direct(quota)); let semaphore = tokio::sync::Semaphore::new(max_concurrent_requests as usize); Source { - provider: provider.into(), + provider, semaphore: Arc::new(Some(semaphore)), rate_limiter: Arc::new(rate_limiter), chain_id: 1, @@ -373,8 +386,12 @@ mod tests { let source = setup_source().await; let source = Arc::new(source); let latest_block_number = get_latest_block_number(source.clone()).await.unwrap(); - let latest_block = source.get_block(latest_block_number).await.unwrap().unwrap(); - let latest_timestamp = latest_block.timestamp.as_u64(); + let latest_block = source + .get_block(latest_block_number, BlockTransactionsKind::Hashes) + .await + .unwrap() + .unwrap(); + let latest_timestamp = latest_block.header.timestamp; assert_eq!( timestamp_to_block_number(latest_timestamp, source).await.unwrap(), diff --git a/crates/freeze/Cargo.toml b/crates/freeze/Cargo.toml index 9c8e5e18..b6df7eb9 100644 --- a/crates/freeze/Cargo.toml +++ b/crates/freeze/Cargo.toml @@ -11,18 +11,16 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +alloy = { workspace = true } async-trait = { workspace = true } chrono = { workspace = true } colored = { workspace = true } cryo_to_df = { workspace = true } -ethers = { workspace = true } -ethers-core = { workspace = true } futures = { workspace = true } governor = { workspace = true } heck = { workspace = true } indexmap = { workspace = true } indicatif = { workspace = true } -lazy_static = { workspace = true } mesc = { workspace = true } polars = { workspace = true } prefix-hex = { workspace = true } @@ -32,3 +30,4 @@ serde_json = { workspace = true } thiserror = { workspace = true } thousands = { workspace = true } tokio = { workspace = true } +url = "2.5.2" diff --git a/crates/freeze/src/datasets/address_appearances.rs b/crates/freeze/src/datasets/address_appearances.rs index 4e76b614..c3600105 100644 --- a/crates/freeze/src/datasets/address_appearances.rs +++ b/crates/freeze/src/datasets/address_appearances.rs @@ -1,5 +1,13 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, TxHash}, + rpc::types::{ + eth::{Block, Log}, + trace::parity::{Action, LocalizedTransactionTrace, TraceOutput}, + BlockTransactionsKind, Filter, FilterBlockOption, + }, + sol_types::SolEvent, +}; use polars::prelude::*; use std::collections::HashMap; @@ -34,7 +42,7 @@ impl Dataset for AddressAppearances { } } -type BlockLogsTraces = (Block, Vec, Vec); +type BlockLogsTraces = (Block, Vec, Vec); #[async_trait::async_trait] impl CollectByBlock for AddressAppearances { @@ -42,17 +50,18 @@ impl CollectByBlock for AddressAppearances { async fn extract(request: Params, source: Arc, _: Arc) -> R { let block_number = request.ethers_block_number()?; - let block = source.get_block(request.block_number()?).await?; + let block = + source.get_block(request.block_number()?, BlockTransactionsKind::Hashes).await?; let block = block.ok_or(CollectError::CollectError("block not found".to_string()))?; let filter = Filter { block_option: FilterBlockOption::Range { - from_block: Some(block_number), - to_block: Some(block_number), + from_block: Some(block_number.into()), + to_block: Some(block_number.into()), }, ..Default::default() }; let logs = source.get_logs(&filter).await?; - let traces = source.trace_block(request.block_number()?.into()).await?; + let traces = source.trace_block(request.block_number()?).await?; Ok((block, logs, traces)) } @@ -69,16 +78,15 @@ impl CollectByTransaction for AddressAppearances { async fn extract(request: Params, source: Arc, _: Arc) -> R { let tx_hash = request.ethers_transaction_hash()?; - let tx_data = source.get_transaction(tx_hash).await?.ok_or_else(|| { + let tx_data = source.get_transaction_by_hash(tx_hash).await?.ok_or_else(|| { CollectError::CollectError("could not find transaction data".to_string()) })?; let block_number = tx_data .block_number - .ok_or_else(|| CollectError::CollectError("block not found".to_string()))? - .as_u64(); + .ok_or_else(|| CollectError::CollectError("block not found".to_string()))?; let block = source - .get_block(block_number) + .get_block(block_number, BlockTransactionsKind::Hashes) .await? .ok_or(CollectError::CollectError("could not get block".to_string()))?; @@ -87,7 +95,9 @@ impl CollectByTransaction for AddressAppearances { .get_transaction_receipt(tx_hash) .await? .ok_or(CollectError::CollectError("could not get tx receipt".to_string()))? - .logs; + .inner + .logs() + .to_vec(); // traces let traces = source.trace_transaction(request.ethers_transaction_hash()?).await?; @@ -102,11 +112,11 @@ impl CollectByTransaction for AddressAppearances { } fn name(log: &Log) -> Option<&'static str> { - let event = log.topics[0]; - if event == *EVENT_ERC20_TRANSFER { - if log.data.len() > 0 { + let event = log.topic0().unwrap(); + if event == *ERC20::Transfer::SIGNATURE_HASH { + if log.data().data.len() > 0 { Some("erc20_transfer") - } else if log.topics.len() == 4 { + } else if log.topics().len() == 4 { Some("erc721_transfer") } else { None @@ -119,26 +129,26 @@ fn name(log: &Log) -> Option<&'static str> { impl AddressAppearances { fn process_first_transaction( &mut self, - block_author: H160, - trace: &Trace, + block_author: Address, + trace: &LocalizedTransactionTrace, schema: &Table, - tx_hash: H256, - logs_by_tx: &HashMap>, + tx_hash: TxHash, + logs_by_tx: &HashMap>, ) { - let block_number = trace.block_number as u32; - let block_hash = trace.block_hash.as_bytes().to_vec(); + let block_number = trace.block_number.unwrap() as u32; + let block_hash = trace.block_hash.unwrap().to_vec(); self.process_address(block_author, "miner_fee", block_number, &block_hash, tx_hash, schema); if let Some(logs) = logs_by_tx.get(&tx_hash) { for log in logs.iter() { - if log.topics.len() >= 3 { + if log.topics().len() >= 3 { if let Some(name) = name(log) { let mut from: [u8; 20] = [0; 20]; - from.copy_from_slice(&log.topics[1].to_fixed_bytes()[12..32]); + from.copy_from_slice(&log.topics()[1][12..32]); let name = &(name.to_string() + "_from"); self.process_address( - H160(from), + Address::from_slice(&from), name, block_number, &block_hash, @@ -147,10 +157,10 @@ impl AddressAppearances { ); let mut to: [u8; 20] = [0; 20]; - to.copy_from_slice(&log.topics[1].to_fixed_bytes()[12..32]); + to.copy_from_slice(&log.topics()[1][12..32]); let name = &(name.to_string() + "_to"); self.process_address( - H160(to), + Address::from_slice(&to), name, block_number, &block_hash, @@ -162,7 +172,7 @@ impl AddressAppearances { } } - match &trace.action { + match &trace.trace.action { Action::Call(action) => { self.process_address( action.from, @@ -194,7 +204,7 @@ impl AddressAppearances { _ => {} } - if let Some(Res::Create(result)) = &trace.result { + if let Some(TraceOutput::Create(result)) = &trace.trace.result { self.process_address( result.address, "tx_to", @@ -206,10 +216,15 @@ impl AddressAppearances { } } - fn process_trace(&mut self, trace: &Trace, schema: &Table, tx_hash: H256) { - let block_number = trace.block_number as u32; - let block_hash = trace.block_hash.as_bytes().to_vec(); - match &trace.action { + fn process_trace( + &mut self, + trace: &LocalizedTransactionTrace, + schema: &Table, + tx_hash: TxHash, + ) { + let block_number = trace.block_number.unwrap() as u32; + let block_hash = trace.block_hash.unwrap().to_vec(); + match &trace.trace.action { Action::Call(action) => { self.process_address( action.from, @@ -238,7 +253,7 @@ impl AddressAppearances { schema, ); } - Action::Suicide(action) => { + Action::Selfdestruct(action) => { self.process_address( action.address, "suicide", @@ -268,7 +283,7 @@ impl AddressAppearances { } } - if let Some(Res::Create(result)) = &trace.result { + if let Some(TraceOutput::Create(result)) = &trace.trace.result { self.process_address( result.address, "create", @@ -282,19 +297,19 @@ impl AddressAppearances { fn process_address( &mut self, - address: H160, + address: Address, relationship: &str, block_number: u32, block_hash: &[u8], - transaction_hash: H256, + transaction_hash: TxHash, schema: &Table, ) { self.n_rows += 1; - store!(schema, self, address, address.as_bytes().to_vec()); + store!(schema, self, address, address.to_vec()); store!(schema, self, relationship, relationship.to_string()); store!(schema, self, block_number, block_number); store!(schema, self, block_hash, block_hash.to_vec()); - store!(schema, self, transaction_hash, transaction_hash.as_bytes().to_vec()); + store!(schema, self, transaction_hash, transaction_hash.to_vec()); } } @@ -304,19 +319,16 @@ fn process_appearances( schema: &Table, ) -> R<()> { let (block, logs, traces) = traces; - let mut logs_by_tx: HashMap> = HashMap::new(); + let mut logs_by_tx: HashMap> = HashMap::new(); for log in logs.into_iter() { if let Some(tx_hash) = log.transaction_hash { logs_by_tx.entry(tx_hash).or_default().push(log); } } - let (_block_number, block_author) = match (block.number, block.author) { - (Some(number), Some(author)) => (number.as_u64(), author), - _ => return Ok(()), - }; + let (_block_number, block_author) = (block.header.number, block.header.beneficiary); - let mut current_tx_hash = H256([0; 32]); + let mut current_tx_hash = TxHash::ZERO; for trace in traces.iter() { if let (Some(tx_hash), Some(_tx_pos)) = (trace.transaction_hash, trace.transaction_position) { diff --git a/crates/freeze/src/datasets/balance_diffs.rs b/crates/freeze/src/datasets/balance_diffs.rs index 231a7071..5104de22 100644 --- a/crates/freeze/src/datasets/balance_diffs.rs +++ b/crates/freeze/src/datasets/balance_diffs.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, U256}, + rpc::types::trace::parity::{ChangedType, Delta, TraceResults}, +}; use polars::prelude::*; /// columns for transactions @@ -19,7 +22,7 @@ pub struct BalanceDiffs { #[async_trait::async_trait] impl Dataset for BalanceDiffs {} -type BlockTxsTraces = (Option, Vec>>, Vec); +type BlockTxsTraces = (Option, Vec>>, Vec); #[async_trait::async_trait] impl CollectByBlock for BalanceDiffs { @@ -29,7 +32,10 @@ impl CollectByBlock for BalanceDiffs { let schema = query.schemas.get(&Datatype::BalanceDiffs).ok_or(err("schema not provided"))?; let include_txs = schema.has_column("transaction_hash"); - source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await + let (bn, txs, traces) = + source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await?; + let trace_resuls = traces.into_iter().map(|t| t.full_trace).collect(); + Ok((bn, txs, trace_resuls)) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -58,7 +64,7 @@ pub(crate) fn process_balance_diffs( let schema = schemas.get(&Datatype::BalanceDiffs).ok_or(err("schema not provided"))?; let (block_number, txs, traces) = response; for (index, (trace, tx)) in traces.iter().zip(txs).enumerate() { - if let Some(ethers::types::StateDiff(state_diffs)) = &trace.state_diff { + if let Some(state_diffs) = &trace.state_diff { for (addr, diff) in state_diffs.iter() { process_balance_diff(addr, &diff.balance, block_number, tx, index, columns, schema); } @@ -68,8 +74,8 @@ pub(crate) fn process_balance_diffs( } pub(crate) fn process_balance_diff( - addr: &H160, - diff: &Diff, + addr: &Address, + diff: &Delta, block_number: &Option, transaction_hash: &Option>, transaction_index: usize, @@ -77,16 +83,16 @@ pub(crate) fn process_balance_diff( schema: &Table, ) { let (from, to) = match diff { - Diff::Same => return, - Diff::Born(value) => (U256::zero(), *value), - Diff::Died(value) => (*value, U256::zero()), - Diff::Changed(ChangedType { from, to }) => (*from, *to), + Delta::Unchanged => return, + Delta::Added(value) => (U256::ZERO, *value), + Delta::Removed(value) => (*value, U256::ZERO), + Delta::Changed(ChangedType { from, to }) => (*from, *to), }; columns.n_rows += 1; store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(transaction_index as u32)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, addr.as_bytes().to_vec()); + store!(schema, columns, address, addr.to_vec()); store!(schema, columns, from_value, from); store!(schema, columns, to_value, to); } diff --git a/crates/freeze/src/datasets/balance_reads.rs b/crates/freeze/src/datasets/balance_reads.rs index a8128628..6f9ba0ab 100644 --- a/crates/freeze/src/datasets/balance_reads.rs +++ b/crates/freeze/src/datasets/balance_reads.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, U256}, + rpc::types::trace::geth::AccountState, +}; use polars::prelude::*; use std::collections::BTreeMap; @@ -19,7 +22,7 @@ pub struct BalanceReads { #[async_trait::async_trait] impl Dataset for BalanceReads {} -type BlockTxsTraces = (Option, Vec>>, Vec>); +type BlockTxsTraces = (Option, Vec>>, Vec>); #[async_trait::async_trait] impl CollectByBlock for BalanceReads { @@ -70,7 +73,7 @@ pub(crate) fn process_balance_reads( } pub(crate) fn process_balance_read( - addr: &H160, + addr: &Address, account_state: &AccountState, block_number: &Option, transaction_hash: &Option>, @@ -83,7 +86,7 @@ pub(crate) fn process_balance_read( store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(transaction_index as u32)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, addr.as_bytes().to_vec()); + store!(schema, columns, address, addr.to_vec()); store!(schema, columns, balance, *balance); } } diff --git a/crates/freeze/src/datasets/balances.rs b/crates/freeze/src/datasets/balances.rs index 4a2d36a6..5b0583a1 100644 --- a/crates/freeze/src/datasets/balances.rs +++ b/crates/freeze/src/datasets/balances.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::primitives::{Address, U256}; use polars::prelude::*; /// columns for balances @@ -37,7 +37,8 @@ impl CollectByBlock for Balances { async fn extract(request: Params, source: Arc, _: Arc) -> R { let address = request.address()?; let block_number = request.block_number()? as u32; - let balance = source.get_balance(H160::from_slice(&address), block_number.into()).await?; + let balance = + source.get_balance(Address::from_slice(&address), block_number.into()).await?; Ok((block_number, None, address, balance)) } diff --git a/crates/freeze/src/datasets/blocks.rs b/crates/freeze/src/datasets/blocks.rs index 5b12e58b..5ee02e74 100644 --- a/crates/freeze/src/datasets/blocks.rs +++ b/crates/freeze/src/datasets/blocks.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::U256, + rpc::types::{Block, BlockTransactionsKind}, +}; use polars::prelude::*; /// columns for transactions @@ -14,7 +17,7 @@ pub struct Blocks { state_root: Vec>, transactions_root: Vec>, receipts_root: Vec>, - block_number: Vec>, + block_number: Vec>, gas_used: Vec, gas_limit: Vec, extra_data: Vec>, @@ -22,7 +25,7 @@ pub struct Blocks { timestamp: Vec, difficulty: Vec, total_difficulty: Vec>, - size: Vec>, + size: Vec>, mix_hash: Vec>>, nonce: Vec>>, base_fee_per_gas: Vec>, @@ -48,11 +51,11 @@ impl Dataset for Blocks { #[async_trait::async_trait] impl CollectByBlock for Blocks { - type Response = Block; + type Response = Block; async fn extract(request: Params, source: Arc, _: Arc) -> R { let block = source - .get_block(request.block_number()?) + .get_block(request.block_number()?, BlockTransactionsKind::Hashes) .await? .ok_or(CollectError::CollectError("block not found".to_string()))?; Ok(block) @@ -66,15 +69,18 @@ impl CollectByBlock for Blocks { #[async_trait::async_trait] impl CollectByTransaction for Blocks { - type Response = Block; + type Response = Block; async fn extract(request: Params, source: Arc, _: Arc) -> R { let transaction = source - .get_transaction(request.ethers_transaction_hash()?) + .get_transaction_by_hash(request.ethers_transaction_hash()?) .await? .ok_or(CollectError::CollectError("transaction not found".to_string()))?; let block = source - .get_block_by_hash(transaction.block_hash.ok_or(err("no block block_hash found"))?) + .get_block_by_hash( + transaction.block_hash.ok_or(err("no block block_hash found"))?, + BlockTransactionsKind::Hashes, + ) .await? .ok_or(CollectError::CollectError("block not found".to_string()))?; Ok(block) @@ -90,25 +96,30 @@ impl CollectByTransaction for Blocks { pub(crate) fn process_block(block: Block, columns: &mut Blocks, schema: &Table) -> R<()> { columns.n_rows += 1; - store!(schema, columns, block_hash, block.hash.map(|x| x.0.to_vec())); - store!(schema, columns, parent_hash, block.parent_hash.0.to_vec()); - store!(schema, columns, uncles_hash, block.uncles_hash.0.to_vec()); - store!(schema, columns, author, block.author.map(|x| x.0.to_vec())); - store!(schema, columns, state_root, block.state_root.0.to_vec()); - store!(schema, columns, transactions_root, block.transactions_root.0.to_vec()); - store!(schema, columns, receipts_root, block.receipts_root.0.to_vec()); - store!(schema, columns, block_number, block.number.map(|x| x.as_u32())); - store!(schema, columns, gas_used, block.gas_used.as_u64()); - store!(schema, columns, gas_limit, block.gas_limit.as_u64()); - store!(schema, columns, extra_data, block.extra_data.to_vec()); - store!(schema, columns, logs_bloom, block.logs_bloom.map(|x| x.0.to_vec())); - store!(schema, columns, timestamp, block.timestamp.as_u32()); - store!(schema, columns, difficulty, block.difficulty.as_u64()); - store!(schema, columns, total_difficulty, block.total_difficulty); - store!(schema, columns, base_fee_per_gas, block.base_fee_per_gas.map(|x| x.as_u64())); - store!(schema, columns, size, block.size.map(|x| x.as_u32())); - store!(schema, columns, mix_hash, block.mix_hash.map(|x| x.0.to_vec())); - store!(schema, columns, nonce, block.nonce.map(|x| x.0.to_vec())); - store!(schema, columns, withdrawals_root, block.withdrawals_root.map(|x| x.0.to_vec())); + store!(schema, columns, block_hash, Some(block.header.hash.to_vec())); + store!(schema, columns, parent_hash, block.header.parent_hash.0.to_vec()); + store!( + schema, + columns, + uncles_hash, + block.uncles.into_iter().flat_map(|s| s.to_vec()).collect() + ); + store!(schema, columns, author, Some(block.header.beneficiary.to_vec())); + store!(schema, columns, state_root, block.header.state_root.0.to_vec()); + store!(schema, columns, transactions_root, block.header.transactions_root.0.to_vec()); + store!(schema, columns, receipts_root, block.header.receipts_root.0.to_vec()); + store!(schema, columns, block_number, Some(block.header.number)); + store!(schema, columns, gas_used, block.header.gas_used); + store!(schema, columns, gas_limit, block.header.gas_limit); + store!(schema, columns, extra_data, block.header.extra_data.to_vec()); + store!(schema, columns, logs_bloom, Some(block.header.logs_bloom.to_vec())); + store!(schema, columns, timestamp, block.header.timestamp as u32); + store!(schema, columns, difficulty, block.header.difficulty.wrapping_to::()); + store!(schema, columns, total_difficulty, block.header.total_difficulty); + store!(schema, columns, base_fee_per_gas, block.header.base_fee_per_gas); + store!(schema, columns, size, block.header.size.map(|v| v.wrapping_to::())); + store!(schema, columns, mix_hash, Some(block.header.mix_hash.to_vec())); + store!(schema, columns, nonce, Some(block.header.nonce.0.to_vec())); + store!(schema, columns, withdrawals_root, block.header.withdrawals_root.map(|x| x.0.to_vec())); Ok(()) } diff --git a/crates/freeze/src/datasets/code_diffs.rs b/crates/freeze/src/datasets/code_diffs.rs index 2d2a2623..f8893b37 100644 --- a/crates/freeze/src/datasets/code_diffs.rs +++ b/crates/freeze/src/datasets/code_diffs.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, Bytes}, + rpc::types::trace::parity::{ChangedType, Delta, TraceResults}, +}; use polars::prelude::*; /// columns for transactions @@ -19,7 +22,7 @@ pub struct CodeDiffs { #[async_trait::async_trait] impl Dataset for CodeDiffs {} -type BlockTxTraces = (Option, Vec>>, Vec); +type BlockTxTraces = (Option, Vec>>, Vec); #[async_trait::async_trait] impl CollectByBlock for CodeDiffs { @@ -28,7 +31,10 @@ impl CollectByBlock for CodeDiffs { async fn extract(request: Params, source: Arc, query: Arc) -> R { let schema = query.schemas.get(&Datatype::CodeDiffs).ok_or(err("schema not provided"))?; let include_txs = schema.has_column("transaction_hash"); - source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await + let (bn, txs, traces) = + source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await?; + let trace_results = traces.into_iter().map(|t| t.full_trace).collect(); + Ok((bn, txs, trace_results)) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -57,7 +63,7 @@ pub(crate) fn process_code_diffs( let schema = schemas.get(&Datatype::CodeDiffs).ok_or(err("schema not provided"))?; let (block_number, txs, traces) = response; for (index, (trace, tx)) in traces.iter().zip(txs).enumerate() { - if let Some(ethers::types::StateDiff(state_diffs)) = &trace.state_diff { + if let Some(state_diffs) = &trace.state_diff { for (addr, diff) in state_diffs.iter() { process_code_diff(addr, &diff.code, block_number, tx, index, columns, schema); } @@ -67,8 +73,8 @@ pub(crate) fn process_code_diffs( } pub(crate) fn process_code_diff( - addr: &H160, - diff: &Diff, + addr: &Address, + diff: &Delta, block_number: &Option, transaction_hash: &Option>, transaction_index: usize, @@ -77,21 +83,21 @@ pub(crate) fn process_code_diff( ) { // this code will skip self-destructs and EOAs let (from, to) = match diff { - Diff::Same => return, - Diff::Born(value) => { + Delta::Unchanged => return, + Delta::Added(value) => { if value.is_empty() { return }; (Vec::new(), value.to_vec()) } - Diff::Died(value) => (value.to_vec(), Vec::new()), - Diff::Changed(ChangedType { from, to }) => (from.to_vec(), to.to_vec()), + Delta::Removed(value) => (value.to_vec(), Vec::new()), + Delta::Changed(ChangedType { from, to }) => (from.to_vec(), to.to_vec()), }; columns.n_rows += 1; store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(transaction_index as u32)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, addr.as_bytes().to_vec()); + store!(schema, columns, address, addr.to_vec()); store!(schema, columns, from_value, from); store!(schema, columns, to_value, to); } diff --git a/crates/freeze/src/datasets/code_reads.rs b/crates/freeze/src/datasets/code_reads.rs index 0b0aca30..1127e5cb 100644 --- a/crates/freeze/src/datasets/code_reads.rs +++ b/crates/freeze/src/datasets/code_reads.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::{primitives::Address, rpc::types::trace::geth::AccountState}; use polars::prelude::*; use std::collections::BTreeMap; @@ -19,7 +19,7 @@ pub struct CodeReads { #[async_trait::async_trait] impl Dataset for CodeReads {} -type BlockTxsTraces = (Option, Vec>>, Vec>); +type BlockTxsTraces = (Option, Vec>>, Vec>); #[async_trait::async_trait] impl CollectByBlock for CodeReads { @@ -68,7 +68,7 @@ pub(crate) fn process_code_reads( } pub(crate) fn process_code_read( - addr: &H160, + addr: &Address, account_state: &AccountState, block_number: &Option, transaction_hash: &Option>, @@ -81,7 +81,7 @@ pub(crate) fn process_code_read( store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(transaction_index as u32)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, contract_address, addr.as_bytes().to_vec()); - store!(schema, columns, code, code.as_bytes().to_vec()); + store!(schema, columns, contract_address, addr.to_vec()); + store!(schema, columns, code, code.to_vec()); } } diff --git a/crates/freeze/src/datasets/codes.rs b/crates/freeze/src/datasets/codes.rs index 1b1b6bf1..16bc5dca 100644 --- a/crates/freeze/src/datasets/codes.rs +++ b/crates/freeze/src/datasets/codes.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::primitives::Address; use polars::prelude::*; /// columns for balances @@ -41,7 +41,7 @@ impl CollectByBlock for Codes { async fn extract(request: Params, source: Arc, _: Arc) -> R { let address = request.address()?; let block_number = request.block_number()? as u32; - let output = source.get_code(H160::from_slice(&address), block_number.into()).await?; + let output = source.get_code(Address::from_slice(&address), block_number.into()).await?; Ok((block_number, None, address, output.to_vec())) } diff --git a/crates/freeze/src/datasets/contracts.rs b/crates/freeze/src/datasets/contracts.rs index 9c682dca..7df089a2 100644 --- a/crates/freeze/src/datasets/contracts.rs +++ b/crates/freeze/src/datasets/contracts.rs @@ -1,7 +1,9 @@ use super::traces; use crate::*; -use ethers::prelude::*; -use ethers_core::utils::keccak256; +use alloy::{ + primitives::{keccak256, Address}, + rpc::types::trace::parity::{Action, LocalizedTransactionTrace, TraceOutput}, +}; use polars::prelude::*; /// columns for transactions @@ -34,7 +36,7 @@ impl Dataset for Contracts { #[async_trait::async_trait] impl CollectByBlock for Contracts { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { source.trace_block(request.ethers_block_number()?).await @@ -49,7 +51,7 @@ impl CollectByBlock for Contracts { #[async_trait::async_trait] impl CollectByTransaction for Contracts { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { source.trace_transaction(request.ethers_transaction_hash()?).await @@ -64,39 +66,40 @@ impl CollectByTransaction for Contracts { /// process block into columns pub(crate) fn process_contracts( - traces: &[Trace], + traces: &[LocalizedTransactionTrace], columns: &mut Contracts, schemas: &Schemas, ) -> R<()> { let schema = schemas.get(&Datatype::Contracts).ok_or(err("schema not provided"))?; - let mut deployer = H160([0; 20]); + let mut deployer = Address::ZERO; let mut create_index = 0; for trace in traces.iter() { - if trace.trace_address.is_empty() { - deployer = match &trace.action { + if trace.trace.trace_address.is_empty() { + deployer = match &trace.trace.action { Action::Call(call) => call.from, Action::Create(create) => create.from, - Action::Suicide(suicide) => suicide.refund_address, + Action::Selfdestruct(suicide) => suicide.refund_address, Action::Reward(reward) => reward.author, }; }; - if let (Action::Create(create), Some(Res::Create(result))) = (&trace.action, &trace.result) + if let (Action::Create(create), Some(TraceOutput::Create(result))) = + (&trace.trace.action, &trace.trace.result) { columns.n_rows += 1; - store!(schema, columns, block_number, trace.block_number as u32); - store!(schema, columns, block_hash, trace.block_hash.as_bytes().to_vec()); + store!(schema, columns, block_number, trace.block_number.unwrap() as u32); + store!(schema, columns, block_hash, trace.block_hash.unwrap().to_vec()); store!(schema, columns, create_index, create_index); create_index += 1; let tx = trace.transaction_hash; - store!(schema, columns, transaction_hash, tx.map(|x| x.as_bytes().to_vec())); - store!(schema, columns, contract_address, result.address.as_bytes().into()); - store!(schema, columns, deployer, deployer.as_bytes().into()); - store!(schema, columns, factory, create.from.as_bytes().into()); + store!(schema, columns, transaction_hash, tx.map(|x| x.to_vec())); + store!(schema, columns, contract_address, result.address.to_vec()); + store!(schema, columns, deployer, deployer.to_vec()); + store!(schema, columns, factory, create.from.to_vec()); store!(schema, columns, init_code, create.init.to_vec()); store!(schema, columns, code, result.code.to_vec()); - store!(schema, columns, init_code_hash, keccak256(result.code.clone()).into()); - store!(schema, columns, code_hash, keccak256(create.init.clone()).into()); + store!(schema, columns, init_code_hash, keccak256(result.code.clone()).to_vec()); + store!(schema, columns, code_hash, keccak256(create.init.clone()).to_vec()); store!(schema, columns, n_init_code_bytes, create.init.len() as u32); store!(schema, columns, n_code_bytes, result.code.len() as u32); } diff --git a/crates/freeze/src/datasets/erc20_approvals.rs b/crates/freeze/src/datasets/erc20_approvals.rs index f8219f06..acba313a 100644 --- a/crates/freeze/src/datasets/erc20_approvals.rs +++ b/crates/freeze/src/datasets/erc20_approvals.rs @@ -1,5 +1,9 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{B256, U256}, + rpc::types::{Filter, Log, Topic}, + sol_types::SolEvent, +}; use polars::prelude::*; /// columns for transactions @@ -54,21 +58,24 @@ impl CollectByBlock for Erc20Approvals { type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { - let mut topics = [Some(ValueOrArray::Value(Some(*EVENT_ERC20_TRANSFER))), None, None, None]; + let mut topics: [Topic; 4] = Default::default(); + topics[0] = ERC20::Approval::SIGNATURE_HASH.into(); if let Some(from_address) = &request.from_address { - let mut v = vec![0u8; 12]; - v.append(&mut from_address.to_owned()); - topics[1] = Some(ValueOrArray::Value(Some(H256::from_slice(&v[..])))); + let v = B256::from_slice(from_address); + topics[1] = v.into(); } if let Some(to_address) = &request.to_address { - let mut v = vec![0u8; 12]; - v.append(&mut to_address.to_owned()); - topics[2] = Some(ValueOrArray::Value(Some(H256::from_slice(&v[..])))); + let v = B256::from_slice(to_address); + topics[2] = v.into(); } let filter = Filter { topics, ..request.ethers_log_filter()? }; + let logs = source.get_logs(&filter).await?; - Ok(logs.into_iter().filter(|x| x.topics.len() == 3 && x.data.len() == 32).collect()) + Ok(logs + .into_iter() + .filter(|x| x.topics().len() == 3 && x.data().data.len() == 32) + .collect()) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -88,7 +95,9 @@ impl CollectByTransaction for Erc20Approvals { } fn is_erc20_approval(log: &Log) -> bool { - log.topics.len() == 3 && log.data.len() == 32 && log.topics[0] == *EVENT_ERC20_APPROVAL + log.topics().len() == 3 && + log.data().data.len() == 32 && + log.topics()[0] == ERC20::Approval::SIGNATURE_HASH } fn process_erc20_approval(logs: Vec, columns: &mut Erc20Approvals, schema: &Table) -> R<()> { @@ -97,15 +106,20 @@ fn process_erc20_approval(logs: Vec, columns: &mut Erc20Approvals, schema: (log.block_number, log.transaction_hash, log.transaction_index, log.log_index) { columns.n_rows += 1; - store!(schema, columns, block_number, bn.as_u32()); - store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.as_bytes().to_vec())); - store!(schema, columns, transaction_index, ti.as_u32()); - store!(schema, columns, log_index, li.as_u32()); - store!(schema, columns, transaction_hash, tx.as_bytes().to_vec()); - store!(schema, columns, erc20, log.address.as_bytes().to_vec()); - store!(schema, columns, from_address, log.topics[1].as_bytes()[12..].to_vec()); - store!(schema, columns, to_address, log.topics[2].as_bytes()[12..].to_vec()); - store!(schema, columns, value, log.data.to_vec().as_slice().into()); + store!(schema, columns, block_number, bn as u32); + store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.to_vec())); + store!(schema, columns, transaction_index, ti as u32); + store!(schema, columns, log_index, li as u32); + store!(schema, columns, transaction_hash, tx.to_vec()); + store!(schema, columns, erc20, log.address().to_vec()); + store!(schema, columns, from_address, log.topics()[1][12..].to_vec()); + store!(schema, columns, to_address, log.topics()[2][12..].to_vec()); + store!( + schema, + columns, + value, + U256::from_be_slice(log.data().data.to_vec().as_slice()) + ); } } Ok(()) diff --git a/crates/freeze/src/datasets/erc20_balances.rs b/crates/freeze/src/datasets/erc20_balances.rs index a4cf5930..70fd4f86 100644 --- a/crates/freeze/src/datasets/erc20_balances.rs +++ b/crates/freeze/src/datasets/erc20_balances.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::{primitives::U256, sol_types::SolCall}; use polars::prelude::*; /// columns for transactions @@ -30,14 +30,14 @@ impl CollectByBlock for Erc20Balances { type Response = (u32, Vec, Vec, Option); async fn extract(request: Params, source: Arc, _: Arc) -> R { - let signature = FUNCTION_ERC20_BALANCE_OF.clone(); - let mut call_data = signature.clone(); + let signature = ERC20::balanceOfCall::SELECTOR; + let mut call_data = signature.clone().to_vec(); call_data.extend(vec![0; 12]); call_data.extend(request.address()?); let block_number = request.ethers_block_number()?; let contract = request.ethers_contract()?; let balance = source.call2(contract, call_data, block_number).await.ok(); - let balance = balance.map(|x| x.to_vec().as_slice().into()); + let balance = balance.map(|x| U256::from_be_slice(x.as_ref())); Ok((request.block_number()? as u32, request.contract()?, request.address()?, balance)) } diff --git a/crates/freeze/src/datasets/erc20_metadata.rs b/crates/freeze/src/datasets/erc20_metadata.rs index cc6f154d..ec254c92 100644 --- a/crates/freeze/src/datasets/erc20_metadata.rs +++ b/crates/freeze/src/datasets/erc20_metadata.rs @@ -1,4 +1,5 @@ use crate::*; +use alloy::sol_types::SolCall; use polars::prelude::*; /// columns for transactions @@ -47,7 +48,7 @@ impl CollectByBlock for Erc20Metadata { let address = request.ethers_address()?; // name - let call_data = FUNCTION_ERC20_NAME.clone(); + let call_data = ERC20::nameCall::SELECTOR.to_vec(); let name = match source.call2(address, call_data, block_number).await { Ok(output) => { String::from_utf8(output.to_vec()).ok().map(|s| remove_control_characters(&s)) @@ -56,7 +57,7 @@ impl CollectByBlock for Erc20Metadata { }; // symbol - let call_data = FUNCTION_ERC20_SYMBOL.clone(); + let call_data = ERC20::symbolCall::SELECTOR.to_vec(); let symbol = match source.call2(address, call_data, block_number).await { Ok(output) => { String::from_utf8(output.to_vec()).ok().map(|s| remove_control_characters(&s)) @@ -65,7 +66,7 @@ impl CollectByBlock for Erc20Metadata { }; // decimals - let call_data = FUNCTION_ERC20_DECIMALS.clone(); + let call_data = ERC20::decimalsCall::SELECTOR.to_vec(); let decimals = match source.call2(address, call_data, block_number).await { Ok(output) => bytes_to_u32(output).ok(), Err(_) => None, diff --git a/crates/freeze/src/datasets/erc20_supplies.rs b/crates/freeze/src/datasets/erc20_supplies.rs index 4d46366d..d02f1cab 100644 --- a/crates/freeze/src/datasets/erc20_supplies.rs +++ b/crates/freeze/src/datasets/erc20_supplies.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::{primitives::U256, sol_types::SolCall}; use polars::prelude::*; /// columns for transactions @@ -37,13 +37,13 @@ impl CollectByBlock for Erc20Supplies { type Response = (u32, Vec, Option); async fn extract(request: Params, source: Arc, _: Arc) -> R { - let signature: Vec = FUNCTION_ERC20_TOTAL_SUPPLY.clone(); + let signature: Vec = ERC20::totalSupplyCall::SELECTOR.to_vec(); let mut call_data = signature.clone(); call_data.extend(request.address()?); let block_number = request.ethers_block_number()?; let contract = request.ethers_address()?; let output = source.call2(contract, call_data, block_number).await.ok(); - let output = output.map(|x| x.to_vec().as_slice().into()); + let output = output.map(|x| U256::from_be_slice(x.as_ref())); Ok((request.block_number()? as u32, request.address()?, output)) } diff --git a/crates/freeze/src/datasets/erc20_transfers.rs b/crates/freeze/src/datasets/erc20_transfers.rs index be23086c..6881266b 100644 --- a/crates/freeze/src/datasets/erc20_transfers.rs +++ b/crates/freeze/src/datasets/erc20_transfers.rs @@ -1,5 +1,9 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{B256, U256}, + rpc::types::{Filter, Log, Topic}, + sol_types::SolEvent, +}; use polars::prelude::*; /// columns for transactions @@ -54,21 +58,23 @@ impl CollectByBlock for Erc20Transfers { type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { - let mut topics = [Some(ValueOrArray::Value(Some(*EVENT_ERC20_TRANSFER))), None, None, None]; + let mut topics: [Topic; 4] = Default::default(); + topics[0] = ERC20::Transfer::SIGNATURE_HASH.into(); if let Some(from_address) = &request.from_address { - let mut v = vec![0u8; 12]; - v.append(&mut from_address.to_owned()); - topics[1] = Some(ValueOrArray::Value(Some(H256::from_slice(&v[..])))); + let v = B256::from_slice(from_address); + topics[1] = v.into(); } if let Some(to_address) = &request.to_address { - let mut v = vec![0u8; 12]; - v.append(&mut to_address.to_owned()); - topics[2] = Some(ValueOrArray::Value(Some(H256::from_slice(&v[..])))); + let v = B256::from_slice(to_address); + topics[2] = v.into(); } let filter = Filter { topics, ..request.ethers_log_filter()? }; let logs = source.get_logs(&filter).await?; - Ok(logs.into_iter().filter(|x| x.topics.len() == 3 && x.data.len() == 32).collect()) + Ok(logs + .into_iter() + .filter(|x| x.topics().len() == 3 && x.data().data.len() == 32) + .collect()) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -93,7 +99,9 @@ impl CollectByTransaction for Erc20Transfers { } fn is_erc20_transfer(log: &Log) -> bool { - log.topics.len() == 3 && log.data.len() == 32 && log.topics[0] == *EVENT_ERC20_TRANSFER + log.topics().len() == 3 && + log.data().data.len() == 32 && + log.topics()[0] == ERC20::Approval::SIGNATURE_HASH } /// process block into columns @@ -103,15 +111,20 @@ fn process_erc20_transfers(logs: Vec, columns: &mut Erc20Transfers, schema: (log.block_number, log.transaction_hash, log.transaction_index, log.log_index) { columns.n_rows += 1; - store!(schema, columns, block_number, bn.as_u32()); - store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.as_bytes().to_vec())); - store!(schema, columns, transaction_index, ti.as_u32()); - store!(schema, columns, log_index, li.as_u32()); - store!(schema, columns, transaction_hash, tx.as_bytes().to_vec()); - store!(schema, columns, erc20, log.address.as_bytes().to_vec()); - store!(schema, columns, from_address, log.topics[1].as_bytes()[12..].to_vec()); - store!(schema, columns, to_address, log.topics[2].as_bytes()[12..].to_vec()); - store!(schema, columns, value, log.data.to_vec().as_slice().into()); + store!(schema, columns, block_number, bn as u32); + store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.to_vec())); + store!(schema, columns, transaction_index, ti as u32); + store!(schema, columns, log_index, li as u32); + store!(schema, columns, transaction_hash, tx.to_vec()); + store!(schema, columns, erc20, log.address().to_vec()); + store!(schema, columns, from_address, log.topics()[1][12..].to_vec()); + store!(schema, columns, to_address, log.topics()[2][12..].to_vec()); + store!( + schema, + columns, + value, + U256::from_be_slice(log.data().data.to_vec().as_slice()) + ); } } Ok(()) diff --git a/crates/freeze/src/datasets/erc721_metadata.rs b/crates/freeze/src/datasets/erc721_metadata.rs index 16dbf552..734f2d70 100644 --- a/crates/freeze/src/datasets/erc721_metadata.rs +++ b/crates/freeze/src/datasets/erc721_metadata.rs @@ -1,5 +1,6 @@ use super::erc20_metadata::remove_control_characters; use crate::*; +use alloy::sol_types::SolCall; use polars::prelude::*; /// columns for transactions @@ -37,7 +38,7 @@ impl CollectByBlock for Erc721Metadata { let address = request.ethers_address()?; // name - let call_data = FUNCTION_ERC20_NAME.clone(); + let call_data = ERC721::nameCall::SELECTOR.to_vec(); let name = match source.call2(address, call_data, block_number).await { Ok(output) => { String::from_utf8(output.to_vec()).ok().map(|s| remove_control_characters(&s)) @@ -46,7 +47,7 @@ impl CollectByBlock for Erc721Metadata { }; // symbol - let call_data = FUNCTION_ERC20_SYMBOL.clone(); + let call_data = ERC721::symbolCall::SELECTOR.to_vec(); let symbol = match source.call2(address, call_data, block_number).await { Ok(output) => { String::from_utf8(output.to_vec()).ok().map(|s| remove_control_characters(&s)) diff --git a/crates/freeze/src/datasets/erc721_transfers.rs b/crates/freeze/src/datasets/erc721_transfers.rs index e6c3fc22..065dc176 100644 --- a/crates/freeze/src/datasets/erc721_transfers.rs +++ b/crates/freeze/src/datasets/erc721_transfers.rs @@ -1,5 +1,9 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{B256, U256}, + rpc::types::{Filter, Log, Topic}, + sol_types::SolEvent, +}; use polars::prelude::*; /// columns for transactions @@ -54,22 +58,20 @@ impl CollectByBlock for Erc721Transfers { type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { - let mut topics = - [Some(ValueOrArray::Value(Some(*EVENT_ERC721_TRANSFER))), None, None, None]; + let mut topics: [Topic; 4] = Default::default(); + topics[0] = ERC721::Transfer::SIGNATURE_HASH.into(); if let Some(from_address) = &request.from_address { - let mut v = vec![0u8; 12]; - v.append(&mut from_address.to_owned()); - topics[1] = Some(ValueOrArray::Value(Some(H256::from_slice(&v[..])))); - } + let v = B256::from_slice(from_address); + topics[1] = v.into(); + }; if let Some(to_address) = &request.to_address { - let mut v = vec![0u8; 12]; - v.append(&mut to_address.to_owned()); - topics[2] = Some(ValueOrArray::Value(Some(H256::from_slice(&v[..])))); - } + let v = B256::from_slice(to_address); + topics[2] = v.into(); + }; let filter = Filter { topics, ..request.ethers_log_filter()? }; let logs = source.get_logs(&filter).await?; - Ok(logs.into_iter().filter(|x| x.topics.len() == 4 && x.data.len() == 0).collect()) + Ok(logs.into_iter().filter(|x| x.topics().len() == 4 && x.data().data.len() == 0).collect()) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -94,7 +96,9 @@ impl CollectByTransaction for Erc721Transfers { } fn is_erc721_transfer(log: &Log) -> bool { - log.topics.len() == 4 && log.data.len() == 0 && log.topics[0] == *EVENT_ERC721_TRANSFER + log.topics().len() == 4 && + log.data().data.len() == 0 && + log.topics()[0] == ERC721::Transfer::SIGNATURE_HASH } /// process block into columns @@ -108,15 +112,15 @@ fn process_erc721_transfers( (log.block_number, log.transaction_hash, log.transaction_index, log.log_index) { columns.n_rows += 1; - store!(schema, columns, block_number, bn.as_u32()); - store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.as_bytes().to_vec())); - store!(schema, columns, transaction_index, ti.as_u32()); - store!(schema, columns, log_index, li.as_u32()); - store!(schema, columns, transaction_hash, tx.as_bytes().to_vec()); - store!(schema, columns, erc20, log.address.as_bytes().to_vec()); - store!(schema, columns, from_address, log.topics[1].as_bytes()[12..].to_vec()); - store!(schema, columns, to_address, log.topics[2].as_bytes()[12..].to_vec()); - store!(schema, columns, token_id, log.topics[3].as_bytes().into()); + store!(schema, columns, block_number, bn as u32); + store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.to_vec())); + store!(schema, columns, transaction_index, ti as u32); + store!(schema, columns, log_index, li as u32); + store!(schema, columns, transaction_hash, tx.to_vec()); + store!(schema, columns, erc20, log.address().to_vec()); + store!(schema, columns, from_address, log.topics()[1][12..].to_vec()); + store!(schema, columns, to_address, log.topics()[2][12..].to_vec()); + store!(schema, columns, token_id, log.topics()[3].into()); } } Ok(()) diff --git a/crates/freeze/src/datasets/eth_calls.rs b/crates/freeze/src/datasets/eth_calls.rs index 4a58be3a..203528f8 100644 --- a/crates/freeze/src/datasets/eth_calls.rs +++ b/crates/freeze/src/datasets/eth_calls.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{keccak256, TxKind}, + rpc::types::{TransactionInput, TransactionRequest}, +}; use polars::prelude::*; /// columns for transactions @@ -47,12 +50,12 @@ impl CollectByBlock for EthCalls { async fn extract(request: Params, source: Arc, _: Arc) -> R { let transaction = TransactionRequest { - to: Some(request.ethers_contract()?.into()), - data: Some(request.call_data()?.into()), + to: Some(TxKind::Call(request.ethers_contract()?)), + input: TransactionInput::new(request.call_data()?.into()), ..Default::default() }; let number = request.block_number()?; - let output = source.call(transaction, number.into()).await.ok().map(|x| x.to_vec()); + let output = source.call(transaction, number).await.ok().map(|x| x.to_vec()); Ok((number as u32, request.contract()?, request.call_data()?, output)) } @@ -73,12 +76,7 @@ fn process_eth_call(response: EthCallsResponse, columns: &mut EthCalls, schema: store!(schema, columns, block_number, block_number); store!(schema, columns, contract_address, contract_address); store!(schema, columns, call_data, call_data.clone()); - store!(schema, columns, call_data_hash, ethers_core::utils::keccak256(call_data).into()); + store!(schema, columns, call_data_hash, keccak256(call_data).to_vec()); store!(schema, columns, output_data, output_data.clone()); - store!( - schema, - columns, - output_data_hash, - output_data.map(|data| ethers_core::utils::keccak256(data).into()) - ); + store!(schema, columns, output_data_hash, output_data.map(|data| keccak256(data).to_vec())); } diff --git a/crates/freeze/src/datasets/geth_balance_diffs.rs b/crates/freeze/src/datasets/geth_balance_diffs.rs index ef872405..a7197150 100644 --- a/crates/freeze/src/datasets/geth_balance_diffs.rs +++ b/crates/freeze/src/datasets/geth_balance_diffs.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::primitives::U256; use polars::prelude::*; /// columns for transactions diff --git a/crates/freeze/src/datasets/geth_calls.rs b/crates/freeze/src/datasets/geth_calls.rs index a0dc80c0..db5df396 100644 --- a/crates/freeze/src/datasets/geth_calls.rs +++ b/crates/freeze/src/datasets/geth_calls.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::{primitives::U256, rpc::types::trace::geth::CallFrame}; use polars::prelude::*; /// columns for geth traces @@ -83,8 +83,8 @@ fn process_trace( ) -> R<()> { columns.n_rows += 1; store!(schema, columns, typ, trace.typ); - store!(schema, columns, from_address, trace.from.as_bytes().to_vec()); - store!(schema, columns, to_address, noa_to_vec_u8(trace.to)?); + store!(schema, columns, from_address, trace.from.to_vec()); + store!(schema, columns, to_address, trace.to.map(|x| x.to_vec())); store!(schema, columns, value, trace.value); store!(schema, columns, gas, trace.gas); store!(schema, columns, gas_used, trace.gas_used); @@ -101,21 +101,11 @@ fn process_trace( trace_address.iter().map(|&n| n.to_string()).collect::>().join(" ") ); - if let Some(subcalls) = trace.calls { - for (s, subcall) in subcalls.into_iter().enumerate() { - let mut sub_trace_address = trace_address.clone(); - sub_trace_address.push(s as u32); - process_trace(subcall, columns, schema, block_number, tx, tx_index, sub_trace_address)? - } + for (s, subcall) in trace.calls.into_iter().enumerate() { + let mut sub_trace_address = trace_address.clone(); + sub_trace_address.push(s as u32); + process_trace(subcall, columns, schema, block_number, tx, tx_index, sub_trace_address)? } Ok(()) } - -fn noa_to_vec_u8(value: Option) -> R>> { - match value { - Some(NameOrAddress::Address(address)) => Ok(Some(address.as_bytes().to_vec())), - Some(NameOrAddress::Name(_)) => Err(err("block name string not allowed")), - None => Ok(None), - } -} diff --git a/crates/freeze/src/datasets/geth_nonce_diffs.rs b/crates/freeze/src/datasets/geth_nonce_diffs.rs index 027e32b5..47a86b02 100644 --- a/crates/freeze/src/datasets/geth_nonce_diffs.rs +++ b/crates/freeze/src/datasets/geth_nonce_diffs.rs @@ -1,5 +1,4 @@ use crate::*; -use ethers::prelude::*; use polars::prelude::*; /// columns for transactions @@ -11,8 +10,8 @@ pub struct GethNonceDiffs { pub(crate) transaction_index: Vec>, pub(crate) transaction_hash: Vec>>, pub(crate) address: Vec>, - pub(crate) from_value: Vec, - pub(crate) to_value: Vec, + pub(crate) from_value: Vec, + pub(crate) to_value: Vec, pub(crate) chain_id: Vec, } diff --git a/crates/freeze/src/datasets/geth_opcodes.rs b/crates/freeze/src/datasets/geth_opcodes.rs index 1f71831a..95f519b1 100644 --- a/crates/freeze/src/datasets/geth_opcodes.rs +++ b/crates/freeze/src/datasets/geth_opcodes.rs @@ -1,5 +1,7 @@ use crate::*; -use ethers::prelude::*; +use alloy::rpc::types::trace::geth::{ + DefaultFrame, GethDebugTracingOptions, GethDefaultTracingOptions, +}; use polars::prelude::*; /// columns for geth traces @@ -40,13 +42,21 @@ impl CollectByBlock for GethOpcodes { async fn extract(request: Params, source: Arc, query: Arc) -> R { let schema = query.schemas.get_schema(&Datatype::GethOpcodes)?; - let options = GethDebugTracingOptions { + // let options = GethDebugTracingOptions { + // disable_storage: Some(!schema.has_column("storage")), + // disable_stack: Some(!schema.has_column("stack")), + // enable_memory: Some(schema.has_column("memory")), + // enable_return_data: Some(schema.has_column("return_data")), + // ..Default::default() + // }; + let config = GethDefaultTracingOptions { disable_storage: Some(!schema.has_column("storage")), disable_stack: Some(!schema.has_column("stack")), enable_memory: Some(schema.has_column("memory")), enable_return_data: Some(schema.has_column("return_data")), ..Default::default() }; + let options = GethDebugTracingOptions { config, ..Default::default() }; let include_transaction = schema.has_column("block_number"); let block_number = request.block_number()? as u32; source.geth_debug_trace_block_opcodes(block_number, include_transaction, options).await @@ -63,14 +73,15 @@ impl CollectByTransaction for GethOpcodes { async fn extract(request: Params, source: Arc, query: Arc) -> R { let schema = query.schemas.get_schema(&Datatype::GethOpcodes)?; - let options = GethDebugTracingOptions { + let include_block_number = schema.has_column("block_number"); + let config = GethDefaultTracingOptions { disable_storage: Some(!schema.has_column("storage")), disable_stack: Some(!schema.has_column("stack")), enable_memory: Some(schema.has_column("memory")), enable_return_data: Some(schema.has_column("return_data")), ..Default::default() }; - let include_block_number = schema.has_column("block_number"); + let options = GethDebugTracingOptions { config, ..Default::default() }; source .geth_debug_trace_transaction_opcodes( request.transaction_hash()?, diff --git a/crates/freeze/src/datasets/logs.rs b/crates/freeze/src/datasets/logs.rs index ca34c540..01313f6d 100644 --- a/crates/freeze/src/datasets/logs.rs +++ b/crates/freeze/src/datasets/logs.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + dyn_abi::{DynSolType, DynSolValue, EventExt}, + rpc::types::Log, +}; use polars::prelude::*; /// columns for transactions @@ -19,7 +22,7 @@ pub struct Logs { topic3: Vec>>, data: Vec>, n_data_bytes: Vec, - event_cols: indexmap::IndexMap>, + event_cols: indexmap::IndexMap>, chain_id: Vec, } @@ -91,17 +94,37 @@ impl CollectByTransaction for Logs { /// process block into columns fn process_logs(logs: Vec, columns: &mut Logs, schema: &Table) -> R<()> { - let decode_keys = match &schema.log_decoder { - None => None, + // let decode_keys = match &schema.log_decoder { + // None => None, + // Some(decoder) => { + // let keys = decoder + // .event + // .inputs + // .clone() + // .into_iter() + // .map(|i| i.name) + // .collect::>(); + // Some(keys) + // } + // }; + let (indexed_keys, body_keys) = match &schema.log_decoder { + None => (None, None), Some(decoder) => { - let keys = decoder + let indexed: Vec = decoder .event .inputs .clone() .into_iter() - .map(|i| i.name) - .collect::>(); - Some(keys) + .filter_map(|x| if x.indexed { Some(x.name) } else { None }) + .collect(); + let body: Vec = decoder + .event + .inputs + .clone() + .into_iter() + .filter_map(|x| if x.indexed { None } else { Some(x.name) }) + .collect(); + (Some(indexed), Some(body)) } }; @@ -110,13 +133,29 @@ fn process_logs(logs: Vec, columns: &mut Logs, schema: &Table) -> R<()> { (log.block_number, log.transaction_hash, log.transaction_index, log.log_index) { // decode event - if let (Some(decoder), Some(decode_keys)) = (&schema.log_decoder, &decode_keys) { - match decoder.event.parse_log(log.clone().into()) { + if let (Some(decoder), Some(indexed_keys), Some(body_keys)) = + (&schema.log_decoder, &indexed_keys, &body_keys) + { + match decoder.event.decode_log(&log.inner.data, true) { Ok(log) => { - for param in log.params { - if decode_keys.contains(param.name.as_str()) { - columns.event_cols.entry(param.name).or_default().push(param.value); - } + // for param in log.indexed { + // if decode_keys.contains(param.name.as_str()) { + // columns.event_cols.entry(param.name).or_default().push(param. + // value); } + // } + for (idx, indexed_param) in log.indexed.into_iter().enumerate() { + columns + .event_cols + .entry(indexed_keys[idx].clone()) + .or_default() + .push(indexed_param); + } + for (idx, body_param) in log.body.into_iter().enumerate() { + columns + .event_cols + .entry(body_keys[idx].clone()) + .or_default() + .push(body_param); } } Err(_) => continue, @@ -124,22 +163,19 @@ fn process_logs(logs: Vec, columns: &mut Logs, schema: &Table) -> R<()> { }; columns.n_rows += 1; - store!(schema, columns, block_number, bn.as_u32()); - store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.as_bytes().to_vec())); - store!(schema, columns, transaction_index, ti.as_u32()); - store!(schema, columns, log_index, li.as_u32()); - store!(schema, columns, transaction_hash, tx.as_bytes().to_vec()); - store!(schema, columns, address, log.address.as_bytes().to_vec()); - store!(schema, columns, data, log.data.to_vec()); - store!(schema, columns, n_data_bytes, log.data.len() as u32); + store!(schema, columns, block_number, bn as u32); + store!(schema, columns, block_hash, log.block_hash.map(|bh| bh.to_vec())); + store!(schema, columns, transaction_index, ti as u32); + store!(schema, columns, log_index, li as u32); + store!(schema, columns, transaction_hash, tx.to_vec()); + store!(schema, columns, address, log.address().to_vec()); + store!(schema, columns, data, log.data().data.to_vec()); + store!(schema, columns, n_data_bytes, log.data().data.len() as u32); // topics for i in 0..4 { - let topic = if i < log.topics.len() { - Some(log.topics[i].as_bytes().to_vec()) - } else { - None - }; + let topic = + if i < log.topics().len() { Some(log.topics()[i].to_vec()) } else { None }; match i { 0 => store!(schema, columns, topic0, topic), 1 => store!(schema, columns, topic1, topic), diff --git a/crates/freeze/src/datasets/native_transfers.rs b/crates/freeze/src/datasets/native_transfers.rs index c8fde7e3..a8f27048 100644 --- a/crates/freeze/src/datasets/native_transfers.rs +++ b/crates/freeze/src/datasets/native_transfers.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::U256, + rpc::types::trace::parity::{Action, LocalizedTransactionTrace, TraceOutput}, +}; use polars::prelude::*; /// columns for transactions @@ -27,10 +30,10 @@ impl Dataset for NativeTransfers { #[async_trait::async_trait] impl CollectByBlock for NativeTransfers { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { - let traces = source.trace_block(request.block_number()?.into()).await?; + let traces = source.trace_block(request.block_number()?).await?; Ok(filter_traces_by_from_to_addresses(traces, &request.from_address, &request.to_address)) } @@ -43,7 +46,7 @@ impl CollectByBlock for NativeTransfers { #[async_trait::async_trait] impl CollectByTransaction for NativeTransfers { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { let traces = source.trace_transaction(request.ethers_transaction_hash()?).await?; @@ -59,48 +62,43 @@ impl CollectByTransaction for NativeTransfers { /// process block into columns pub(crate) fn process_native_transfers( - traces: &[Trace], + traces: &[LocalizedTransactionTrace], columns: &mut NativeTransfers, schemas: &Schemas, ) -> R<()> { let schema = schemas.get(&Datatype::NativeTransfers).ok_or(err("schema not provided"))?; for (transfer_index, trace) in traces.iter().enumerate() { columns.n_rows += 1; - store!(schema, columns, block_number, trace.block_number as u32); + store!(schema, columns, block_number, trace.block_number.unwrap_or(0) as u32); store!(schema, columns, transaction_index, trace.transaction_position.map(|x| x as u32)); - store!(schema, columns, block_hash, trace.block_hash.as_bytes().to_vec()); + store!(schema, columns, block_hash, trace.block_hash.unwrap().to_vec()); store!(schema, columns, transfer_index, transfer_index as u32); - store!( - schema, - columns, - transaction_hash, - trace.transaction_hash.map(|x| x.as_bytes().to_vec()) - ); + store!(schema, columns, transaction_hash, trace.transaction_hash.map(|x| x.to_vec())); - match &trace.action { + match &trace.trace.action { Action::Call(action) => { - store!(schema, columns, from_address, action.from.as_bytes().to_vec()); - store!(schema, columns, to_address, action.to.as_bytes().to_vec()); + store!(schema, columns, from_address, action.from.to_vec()); + store!(schema, columns, to_address, action.to.to_vec()); store!(schema, columns, value, action.value); } Action::Create(action) => { - store!(schema, columns, from_address, action.from.as_bytes().to_vec()); - match &trace.result.as_ref() { - Some(Res::Create(res)) => { - store!(schema, columns, to_address, res.address.0.into()) + store!(schema, columns, from_address, action.from.to_vec()); + match &trace.trace.result.as_ref() { + Some(TraceOutput::Create(res)) => { + store!(schema, columns, to_address, res.address.0.to_vec()) } _ => store!(schema, columns, to_address, vec![0; 32]), } store!(schema, columns, value, action.value); } - Action::Suicide(action) => { - store!(schema, columns, from_address, action.address.as_bytes().to_vec()); - store!(schema, columns, to_address, action.refund_address.as_bytes().to_vec()); + Action::Selfdestruct(action) => { + store!(schema, columns, from_address, action.address.to_vec()); + store!(schema, columns, to_address, action.refund_address.to_vec()); store!(schema, columns, value, action.balance); } Action::Reward(action) => { store!(schema, columns, from_address, vec![0; 20]); - store!(schema, columns, to_address, action.author.as_bytes().to_vec()); + store!(schema, columns, to_address, action.author.to_vec()); store!(schema, columns, value, action.value); } } diff --git a/crates/freeze/src/datasets/nonce_diffs.rs b/crates/freeze/src/datasets/nonce_diffs.rs index ac863f21..c17e7f7b 100644 --- a/crates/freeze/src/datasets/nonce_diffs.rs +++ b/crates/freeze/src/datasets/nonce_diffs.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, U64}, + rpc::types::trace::parity::{ChangedType, Delta, TraceResults}, +}; use polars::prelude::*; /// columns for transactions @@ -19,7 +22,7 @@ pub struct NonceDiffs { #[async_trait::async_trait] impl Dataset for NonceDiffs {} -type BlockTxsTraces = (Option, Vec>>, Vec); +type BlockTxsTraces = (Option, Vec>>, Vec); #[async_trait::async_trait] impl CollectByBlock for NonceDiffs { @@ -28,7 +31,9 @@ impl CollectByBlock for NonceDiffs { async fn extract(request: Params, source: Arc, query: Arc) -> R { let schema = query.schemas.get_schema(&Datatype::NonceDiffs)?; let include_txs = schema.has_column("transaction_hash"); - source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await + let (block_number, txs, traces) = + source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await?; + Ok((block_number, txs, traces.into_iter().map(|t| t.full_trace).collect())) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -57,7 +62,7 @@ pub(crate) fn process_nonce_diffs( let schema = schemas.get(&Datatype::NonceDiffs).ok_or(err("schema not provided"))?; let (block_number, txs, traces) = response; for (index, (trace, tx)) in traces.iter().zip(txs).enumerate() { - if let Some(ethers::types::StateDiff(state_diffs)) = &trace.state_diff { + if let Some(state_diffs) = &trace.state_diff { for (addr, diff) in state_diffs.iter() { process_nonce_diff(addr, &diff.nonce, block_number, tx, index, columns, schema); } @@ -67,8 +72,8 @@ pub(crate) fn process_nonce_diffs( } pub(crate) fn process_nonce_diff( - addr: &H160, - diff: &Diff, + addr: &Address, + diff: &Delta, block_number: &Option, transaction_hash: &Option>, transaction_index: usize, @@ -76,16 +81,16 @@ pub(crate) fn process_nonce_diff( schema: &Table, ) { let (from, to) = match diff { - Diff::Same => return, - Diff::Born(value) => (U256::zero(), *value), - Diff::Died(value) => (*value, U256::zero()), - Diff::Changed(ChangedType { from, to }) => (*from, *to), + Delta::Unchanged => return, + Delta::Added(value) => (U64::ZERO, *value), + Delta::Removed(value) => (*value, U64::ZERO), + Delta::Changed(ChangedType { from, to }) => (*from, *to), }; columns.n_rows += 1; store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(transaction_index as u32)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, addr.as_bytes().to_vec()); - store!(schema, columns, from_value, from.as_u64()); - store!(schema, columns, to_value, to.as_u64()); + store!(schema, columns, address, addr.to_vec()); + store!(schema, columns, from_value, from.wrapping_to::()); + store!(schema, columns, to_value, to.wrapping_to::()); } diff --git a/crates/freeze/src/datasets/nonce_reads.rs b/crates/freeze/src/datasets/nonce_reads.rs index fdc8d895..052c2eba 100644 --- a/crates/freeze/src/datasets/nonce_reads.rs +++ b/crates/freeze/src/datasets/nonce_reads.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::{primitives::Address, rpc::types::trace::geth::AccountState}; use polars::prelude::*; use std::collections::BTreeMap; @@ -19,7 +19,7 @@ pub struct NonceReads { #[async_trait::async_trait] impl Dataset for NonceReads {} -type BlockTxsTraces = (Option, Vec>>, Vec>); +type BlockTxsTraces = (Option, Vec>>, Vec>); #[async_trait::async_trait] impl CollectByBlock for NonceReads { @@ -68,7 +68,7 @@ pub(crate) fn process_nonce_reads( } pub(crate) fn process_nonce_read( - addr: &H160, + addr: &Address, account_state: &AccountState, block_number: &Option, transaction_hash: &Option>, @@ -81,7 +81,7 @@ pub(crate) fn process_nonce_read( store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(transaction_index as u32)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, addr.as_bytes().to_vec()); - store!(schema, columns, nonce, nonce.as_u64()); + store!(schema, columns, address, addr.to_vec()); + store!(schema, columns, nonce, *nonce); } } diff --git a/crates/freeze/src/datasets/nonces.rs b/crates/freeze/src/datasets/nonces.rs index 2948d1b0..e44c9048 100644 --- a/crates/freeze/src/datasets/nonces.rs +++ b/crates/freeze/src/datasets/nonces.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::primitives::Address; use polars::prelude::*; /// columns for balances @@ -37,9 +37,10 @@ impl CollectByBlock for Nonces { async fn extract(request: Params, source: Arc, _: Arc) -> R { let address = request.address()?; let block_number = request.block_number()? as u32; - let output = - source.get_transaction_count(H160::from_slice(&address), block_number.into()).await?; - Ok((block_number, None, address, output.as_u64())) + let output = source + .get_transaction_count(Address::from_slice(&address), block_number.into()) + .await?; + Ok((block_number, None, address, output)) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { diff --git a/crates/freeze/src/datasets/slots.rs b/crates/freeze/src/datasets/slots.rs index 1641e442..14f292aa 100644 --- a/crates/freeze/src/datasets/slots.rs +++ b/crates/freeze/src/datasets/slots.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::primitives::{Address, U256}; use polars::prelude::*; /// columns for balances @@ -49,12 +49,12 @@ impl CollectByBlock for Slots { let slot = request.slot()?; let output = source .get_storage_at( - H160::from_slice(&address), - H256::from_slice(&slot), + Address::from_slice(&address), + U256::from_be_slice(&slot), block_number.into(), ) .await?; - Ok((block_number, None, address, slot, output.as_bytes().to_vec())) + Ok((block_number, None, address, slot, output.to_vec_u8())) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { diff --git a/crates/freeze/src/datasets/storage_diffs.rs b/crates/freeze/src/datasets/storage_diffs.rs index 3f1cb180..b4ebfffd 100644 --- a/crates/freeze/src/datasets/storage_diffs.rs +++ b/crates/freeze/src/datasets/storage_diffs.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, B256}, + rpc::types::trace::parity::{ChangedType, Delta, TraceResults}, +}; use polars::prelude::*; /// columns for transactions @@ -24,7 +27,7 @@ impl Dataset for StorageDiffs { } } -type BlockTxsTraces = (Option, Vec>>, Vec); +type BlockTxsTraces = (Option, Vec>>, Vec); #[async_trait::async_trait] impl CollectByBlock for StorageDiffs { @@ -33,7 +36,10 @@ impl CollectByBlock for StorageDiffs { async fn extract(request: Params, source: Arc, query: Arc) -> R { let schema = query.schemas.get_schema(&Datatype::StorageDiffs)?; let include_txs = schema.has_column("transaction_hash"); - source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await + let (bn, txs, traces) = + source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await?; + let trace_results: Vec = traces.into_iter().map(|t| t.full_trace).collect(); + Ok((bn, txs, trace_results)) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -62,7 +68,7 @@ pub(crate) fn process_storage_diffs( let schema = schemas.get(&Datatype::StorageDiffs).ok_or(err("schema not provided"))?; let (block_number, txs, traces) = response; for (index, (trace, tx)) in traces.iter().zip(txs).enumerate() { - if let Some(ethers::types::StateDiff(state_diffs)) = &trace.state_diff { + if let Some(state_diffs) = &trace.state_diff { for (addr, diff) in state_diffs.iter() { process_storage_diff(addr, &diff.storage, block_number, tx, index, columns, schema); } @@ -72,8 +78,8 @@ pub(crate) fn process_storage_diffs( } pub(crate) fn process_storage_diff( - addr: &H160, - diff: &std::collections::BTreeMap>, + addr: &Address, + diff: &std::collections::BTreeMap>, block_number: &Option, transaction_hash: &Option>, transaction_index: usize, @@ -82,18 +88,18 @@ pub(crate) fn process_storage_diff( ) { for (s, sub_diff) in diff.iter() { let (from, to) = match sub_diff { - Diff::Same => continue, - Diff::Born(value) => (H256::zero(), *value), - Diff::Died(value) => (*value, H256::zero()), - Diff::Changed(ChangedType { from, to }) => (*from, *to), + Delta::Unchanged => continue, + Delta::Added(value) => (B256::ZERO, *value), + Delta::Removed(value) => (*value, B256::ZERO), + Delta::Changed(ChangedType { from, to }) => (*from, *to), }; columns.n_rows += 1; store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(transaction_index as u32)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, slot, s.as_bytes().to_vec()); - store!(schema, columns, address, addr.as_bytes().to_vec()); - store!(schema, columns, from_value, from.as_bytes().to_vec()); - store!(schema, columns, to_value, to.as_bytes().to_vec()); + store!(schema, columns, slot, s.to_vec()); + store!(schema, columns, address, addr.to_vec()); + store!(schema, columns, from_value, from.to_vec()); + store!(schema, columns, to_value, to.to_vec()); } } diff --git a/crates/freeze/src/datasets/storage_reads.rs b/crates/freeze/src/datasets/storage_reads.rs index 874919a9..d2769565 100644 --- a/crates/freeze/src/datasets/storage_reads.rs +++ b/crates/freeze/src/datasets/storage_reads.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::{primitives::Address, rpc::types::trace::geth::AccountState}; use polars::prelude::*; use std::collections::BTreeMap; @@ -24,7 +24,7 @@ impl Dataset for StorageReads { } } -type BlockTxsTraces = (Option, Vec>>, Vec>); +type BlockTxsTraces = (Option, Vec>>, Vec>); #[async_trait::async_trait] impl CollectByBlock for StorageReads { @@ -75,7 +75,7 @@ pub(crate) fn process_storage_reads( } pub(crate) fn process_storage_read( - addr: &H160, + addr: &Address, account_state: &AccountState, block_number: &Option, transaction_hash: &Option>, @@ -83,15 +83,13 @@ pub(crate) fn process_storage_read( columns: &mut StorageReads, schema: &Table, ) { - if let Some(storage) = &account_state.storage { - for (slot, value) in storage.iter() { - columns.n_rows += 1; - store!(schema, columns, block_number, *block_number); - store!(schema, columns, transaction_index, Some(transaction_index as u32)); - store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, contract_address, addr.as_bytes().to_vec()); - store!(schema, columns, slot, slot.as_bytes().to_vec()); - store!(schema, columns, value, value.as_bytes().to_vec()); - } + for (slot, value) in account_state.storage.iter() { + columns.n_rows += 1; + store!(schema, columns, block_number, *block_number); + store!(schema, columns, transaction_index, Some(transaction_index as u32)); + store!(schema, columns, transaction_hash, transaction_hash.clone()); + store!(schema, columns, contract_address, addr.to_vec()); + store!(schema, columns, slot, slot.to_vec()); + store!(schema, columns, value, value.to_vec()); } } diff --git a/crates/freeze/src/datasets/trace_calls.rs b/crates/freeze/src/datasets/trace_calls.rs index 5af951e2..c77f4adc 100644 --- a/crates/freeze/src/datasets/trace_calls.rs +++ b/crates/freeze/src/datasets/trace_calls.rs @@ -1,6 +1,6 @@ use super::traces; use crate::*; -use ethers::prelude::*; +use alloy::rpc::types::trace::parity::{Action, TraceOutput, TraceType, TransactionTrace}; use polars::prelude::*; /// columns for transactions @@ -58,8 +58,7 @@ impl CollectByBlock for TraceCalls { Some(request.ethers_block_number()?), ) .await? - .trace - .ok_or(CollectError::CollectError("traces missing".to_string()))?; + .trace; Ok((request.block_number()? as u32, request.contract()?, request.call_data()?, traces)) } @@ -85,7 +84,7 @@ fn process_transaction_traces( process_action(&trace.action, columns, schema); process_result(&trace.result, columns, schema); - store!(schema, columns, action_type, traces::action_type_to_string(&trace.action_type)); + store!(schema, columns, action_type, traces::action_type_to_string(&trace.action.kind())); store!( schema, columns, @@ -104,10 +103,10 @@ fn process_transaction_traces( fn process_action(action: &Action, columns: &mut TraceCalls, schema: &Table) { match action { Action::Call(action) => { - store!(schema, columns, action_from, Some(action.from.as_bytes().to_vec())); - store!(schema, columns, action_to, Some(action.to.as_bytes().to_vec())); + store!(schema, columns, action_from, Some(action.from.to_vec())); + store!(schema, columns, action_to, Some(action.to.to_vec())); store!(schema, columns, action_value, action.value.to_string()); - store!(schema, columns, action_gas, Some(action.gas.as_u32())); + store!(schema, columns, action_gas, Some(action.gas as u32)); store!(schema, columns, action_input, Some(action.input.to_vec())); store!( schema, @@ -119,18 +118,18 @@ fn process_action(action: &Action, columns: &mut TraceCalls, schema: &Table) { store!(schema, columns, action_reward_type, None); } Action::Create(action) => { - store!(schema, columns, action_from, Some(action.from.as_bytes().to_vec())); + store!(schema, columns, action_from, Some(action.from.to_vec())); store!(schema, columns, action_to, None); store!(schema, columns, action_value, action.value.to_string()); - store!(schema, columns, action_gas, Some(action.gas.as_u32())); + store!(schema, columns, action_gas, Some(action.gas as u32)); store!(schema, columns, action_input, None); store!(schema, columns, action_call_type, None); store!(schema, columns, action_init, Some(action.init.to_vec())); store!(schema, columns, action_reward_type, None); } - Action::Suicide(action) => { - store!(schema, columns, action_from, Some(action.address.as_bytes().to_vec())); - store!(schema, columns, action_to, Some(action.refund_address.as_bytes().to_vec())); + Action::Selfdestruct(action) => { + store!(schema, columns, action_from, Some(action.address.to_vec())); + store!(schema, columns, action_to, Some(action.refund_address.to_vec())); store!(schema, columns, action_value, action.balance.to_string()); store!(schema, columns, action_gas, None); store!(schema, columns, action_input, None); @@ -139,7 +138,7 @@ fn process_action(action: &Action, columns: &mut TraceCalls, schema: &Table) { store!(schema, columns, action_reward_type, None); } Action::Reward(action) => { - store!(schema, columns, action_from, Some(action.author.as_bytes().to_vec())); + store!(schema, columns, action_from, Some(action.author.to_vec())); store!(schema, columns, action_to, None); store!(schema, columns, action_value, action.value.to_string()); store!(schema, columns, action_gas, None); @@ -156,21 +155,21 @@ fn process_action(action: &Action, columns: &mut TraceCalls, schema: &Table) { } } -fn process_result(result: &Option, columns: &mut TraceCalls, schema: &Table) { +fn process_result(result: &Option, columns: &mut TraceCalls, schema: &Table) { match result { - Some(Res::Call(result)) => { - store!(schema, columns, result_gas_used, Some(result.gas_used.as_u32())); + Some(TraceOutput::Call(result)) => { + store!(schema, columns, result_gas_used, Some(result.gas_used as u32)); store!(schema, columns, result_output, Some(result.output.to_vec())); store!(schema, columns, result_code, None); store!(schema, columns, result_address, None); } - Some(Res::Create(result)) => { - store!(schema, columns, result_gas_used, Some(result.gas_used.as_u32())); + Some(TraceOutput::Create(result)) => { + store!(schema, columns, result_gas_used, Some(result.gas_used as u32)); store!(schema, columns, result_output, None); store!(schema, columns, result_code, Some(result.code.to_vec())); - store!(schema, columns, result_address, Some(result.address.as_bytes().to_vec())); + store!(schema, columns, result_address, Some(result.address.to_vec())); } - Some(Res::None) | None => { + None => { store!(schema, columns, result_gas_used, None); store!(schema, columns, result_output, None); store!(schema, columns, result_code, None); diff --git a/crates/freeze/src/datasets/traces.rs b/crates/freeze/src/datasets/traces.rs index 2ce7dd42..5bde18f8 100644 --- a/crates/freeze/src/datasets/traces.rs +++ b/crates/freeze/src/datasets/traces.rs @@ -1,5 +1,10 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::Address, + rpc::types::trace::parity::{ + Action, ActionType, CallType, LocalizedTransactionTrace, RewardType, TraceOutput, + }, +}; use polars::prelude::*; /// columns for transactions @@ -39,10 +44,10 @@ impl Dataset for Traces { #[async_trait::async_trait] impl CollectByBlock for Traces { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { - let traces = source.trace_block(request.block_number()?.into()).await?; + let traces = source.trace_block(request.block_number()?).await?; Ok(filter_traces_by_from_to_addresses(traces, &request.from_address, &request.to_address)) } @@ -55,7 +60,7 @@ impl CollectByBlock for Traces { #[async_trait::async_trait] impl CollectByTransaction for Traces { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { let traces = source.trace_transaction(request.ethers_transaction_hash()?).await?; @@ -70,66 +75,73 @@ impl CollectByTransaction for Traces { } pub(crate) fn filter_traces_by_from_to_addresses( - traces: Vec, + traces: Vec, from_address: &Option>, to_address: &Option>, -) -> Vec { +) -> Vec { // filter by from_address - let from_filter: Box bool + Send> = if let Some(from_address) = from_address { - Box::new(move |trace| { - let from = match &trace.action { - Action::Call(action) => action.from, - Action::Create(action) => action.from, - Action::Suicide(action) => action.address, - _ => return false, - }; - from.as_bytes() == from_address - }) - } else { - Box::new(|_| true) - }; + let from_filter: Box bool + Send> = + if let Some(from_address) = from_address { + Box::new(move |trace| { + let from = match &trace.trace.action { + Action::Call(action) => action.from, + Action::Create(action) => action.from, + Action::Selfdestruct(action) => action.address, + _ => return false, + }; + from == Address::from_slice(from_address) + }) + } else { + Box::new(|_| true) + }; // filter by to_address - let to_filter: Box bool + Send> = if let Some(to_address) = to_address { - Box::new(move |trace| { - let to = match &trace.action { - Action::Call(action) => action.to, - Action::Suicide(action) => action.refund_address, - Action::Reward(action) => action.author, - _ => return false, - }; - to.as_bytes() == to_address - }) - } else { - Box::new(|_| true) - }; + let to_filter: Box bool + Send> = + if let Some(to_address) = to_address { + Box::new(move |trace| { + let to = match &trace.trace.action { + Action::Call(action) => action.to, + Action::Selfdestruct(action) => action.refund_address, + Action::Reward(action) => action.author, + _ => return false, + }; + to == Address::from_slice(to_address) + }) + } else { + Box::new(|_| true) + }; traces.into_iter().filter(from_filter).filter(to_filter).collect() } /// process block into columns -pub(crate) fn process_traces(traces: &[Trace], columns: &mut Traces, schemas: &Schemas) -> R<()> { +pub(crate) fn process_traces( + traces: &[LocalizedTransactionTrace], + columns: &mut Traces, + schemas: &Schemas, +) -> R<()> { let schema = schemas.get(&Datatype::Traces).ok_or(err("schema not provided"))?; for trace in traces.iter() { columns.n_rows += 1; - process_action(&trace.action, columns, schema); - process_result(&trace.result, columns, schema); - store!(schema, columns, action_type, action_type_to_string(&trace.action_type)); + process_action(&trace.trace.action, columns, schema); + process_result(&trace.trace.result, columns, schema); + store!(schema, columns, action_type, action_type_to_string(&trace.trace.action.kind())); store!( schema, columns, trace_address, - trace.trace_address.iter().map(|n| n.to_string()).collect::>().join("_") + trace + .trace + .trace_address + .iter() + .map(|n| n.to_string()) + .collect::>() + .join("_") ); - store!(schema, columns, subtraces, trace.subtraces as u32); + store!(schema, columns, subtraces, trace.trace.subtraces as u32); store!(schema, columns, transaction_index, trace.transaction_position.map(|x| x as u32)); - store!( - schema, - columns, - transaction_hash, - trace.transaction_hash.map(|x| x.as_bytes().to_vec()) - ); - store!(schema, columns, block_number, trace.block_number as u32); - store!(schema, columns, block_hash, trace.block_hash.as_bytes().to_vec()); - store!(schema, columns, error, trace.error.clone()); + store!(schema, columns, transaction_hash, trace.transaction_hash.map(|x| x.to_vec())); + store!(schema, columns, block_number, trace.block_number.unwrap() as u32); + store!(schema, columns, block_hash, trace.block_hash.unwrap().to_vec()); + store!(schema, columns, error, trace.trace.error.clone()); } Ok(()) } @@ -137,10 +149,10 @@ pub(crate) fn process_traces(traces: &[Trace], columns: &mut Traces, schemas: &S fn process_action(action: &Action, columns: &mut Traces, schema: &Table) { match action { Action::Call(action) => { - store!(schema, columns, action_from, Some(action.from.as_bytes().to_vec())); - store!(schema, columns, action_to, Some(action.to.as_bytes().to_vec())); + store!(schema, columns, action_from, Some(action.from.to_vec())); + store!(schema, columns, action_to, Some(action.to.to_vec())); store!(schema, columns, action_value, action.value.to_string()); - store!(schema, columns, action_gas, Some(action.gas.as_u32())); + store!(schema, columns, action_gas, Some(action.gas as u32)); store!(schema, columns, action_input, Some(action.input.to_vec())); store!( schema, @@ -152,18 +164,18 @@ fn process_action(action: &Action, columns: &mut Traces, schema: &Table) { store!(schema, columns, action_reward_type, None); } Action::Create(action) => { - store!(schema, columns, action_from, Some(action.from.as_bytes().to_vec())); + store!(schema, columns, action_from, Some(action.from.to_vec())); store!(schema, columns, action_to, None); store!(schema, columns, action_value, action.value.to_string()); - store!(schema, columns, action_gas, Some(action.gas.as_u32())); + store!(schema, columns, action_gas, Some(action.gas as u32)); store!(schema, columns, action_input, None); store!(schema, columns, action_call_type, None); store!(schema, columns, action_init, Some(action.init.to_vec())); store!(schema, columns, action_reward_type, None); } - Action::Suicide(action) => { - store!(schema, columns, action_from, Some(action.address.as_bytes().to_vec())); - store!(schema, columns, action_to, Some(action.refund_address.as_bytes().to_vec())); + Action::Selfdestruct(action) => { + store!(schema, columns, action_from, Some(action.address.to_vec())); + store!(schema, columns, action_to, Some(action.refund_address.to_vec())); store!(schema, columns, action_value, action.balance.to_string()); store!(schema, columns, action_gas, None); store!(schema, columns, action_input, None); @@ -172,7 +184,7 @@ fn process_action(action: &Action, columns: &mut Traces, schema: &Table) { store!(schema, columns, action_reward_type, None); } Action::Reward(action) => { - store!(schema, columns, action_from, Some(action.author.as_bytes().to_vec())); + store!(schema, columns, action_from, Some(action.author.to_vec())); store!(schema, columns, action_to, None); store!(schema, columns, action_value, action.value.to_string()); store!(schema, columns, action_gas, None); @@ -189,21 +201,21 @@ fn process_action(action: &Action, columns: &mut Traces, schema: &Table) { } } -fn process_result(result: &Option, columns: &mut Traces, schema: &Table) { +fn process_result(result: &Option, columns: &mut Traces, schema: &Table) { match result { - Some(Res::Call(result)) => { - store!(schema, columns, result_gas_used, Some(result.gas_used.as_u32())); + Some(TraceOutput::Call(result)) => { + store!(schema, columns, result_gas_used, Some(result.gas_used as u32)); store!(schema, columns, result_output, Some(result.output.to_vec())); store!(schema, columns, result_code, None); store!(schema, columns, result_address, None); } - Some(Res::Create(result)) => { - store!(schema, columns, result_gas_used, Some(result.gas_used.as_u32())); + Some(TraceOutput::Create(result)) => { + store!(schema, columns, result_gas_used, Some(result.gas_used as u32)); store!(schema, columns, result_output, None); store!(schema, columns, result_code, Some(result.code.to_vec())); - store!(schema, columns, result_address, Some(result.address.as_bytes().to_vec())); + store!(schema, columns, result_address, Some(result.address.to_vec())); } - Some(Res::None) | None => { + None => { store!(schema, columns, result_gas_used, None); store!(schema, columns, result_output, None); store!(schema, columns, result_code, None); @@ -216,8 +228,9 @@ pub(crate) fn reward_type_to_string(reward_type: &RewardType) -> String { match reward_type { RewardType::Block => "reward".to_string(), RewardType::Uncle => "uncle".to_string(), - RewardType::EmptyStep => "empty_step".to_string(), - RewardType::External => "external".to_string(), + // below arms not exist in alloy + // RewardType::EmptyStep => "empty_step".to_string(), + // RewardType::External => "external".to_string(), } } @@ -226,7 +239,7 @@ pub(crate) fn action_type_to_string(action_type: &ActionType) -> String { ActionType::Call => "call".to_string(), ActionType::Create => "create".to_string(), ActionType::Reward => "reward".to_string(), - ActionType::Suicide => "suicide".to_string(), + ActionType::Selfdestruct => "suicide".to_string(), } } @@ -237,24 +250,27 @@ pub(crate) fn action_call_type_to_string(action_call_type: &CallType) -> String CallType::CallCode => "call_code".to_string(), CallType::DelegateCall => "delegate_call".to_string(), CallType::StaticCall => "static_call".to_string(), + CallType::AuthCall => "auth_call".to_string(), } } /// filter out error traces -pub(crate) fn filter_failed_traces(traces: Vec) -> Vec { +pub(crate) fn filter_failed_traces( + traces: Vec, +) -> Vec { let mut error_address: Option> = None; - let mut filtered: Vec = Vec::new(); + let mut filtered: Vec = Vec::new(); for trace in traces.into_iter() { // restart for each transaction - if trace.trace_address.is_empty() { + if trace.trace.trace_address.is_empty() { error_address = None; }; // if in an error, check if next trace is still in error if let Some(ref e_address) = error_address { - if trace.trace_address.len() >= e_address.len() && - trace.trace_address[0..e_address.len()] == e_address[..] + if trace.trace.trace_address.len() >= e_address.len() && + trace.trace.trace_address[0..e_address.len()] == e_address[..] { continue } else { @@ -263,8 +279,8 @@ pub(crate) fn filter_failed_traces(traces: Vec) -> Vec { } // check if current trace is start of an error - match trace.error { - Some(_) => error_address = Some(trace.trace_address), + match trace.trace.error { + Some(_) => error_address = Some(trace.trace.trace_address), None => filtered.push(trace), } } diff --git a/crates/freeze/src/datasets/transactions.rs b/crates/freeze/src/datasets/transactions.rs index cdb933b2..0f4f95fc 100644 --- a/crates/freeze/src/datasets/transactions.rs +++ b/crates/freeze/src/datasets/transactions.rs @@ -1,5 +1,11 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + consensus::Transaction as ConsensusTransaction, + primitives::{Address, TxKind, U256}, + rpc::types::{ + Block, BlockTransactions, BlockTransactionsKind, Transaction, TransactionReceipt, + }, +}; use polars::prelude::*; /// columns for transactions @@ -18,7 +24,7 @@ pub struct Transactions { gas_limit: Vec, gas_used: Vec>, gas_price: Vec>, - transaction_type: Vec>, + transaction_type: Vec, max_priority_fee_per_gas: Vec>, max_fee_per_gas: Vec>, success: Vec, @@ -31,7 +37,7 @@ pub struct Transactions { timestamp: Vec, r: Vec>, s: Vec>, - v: Vec, + v: Vec, } #[async_trait::async_trait] @@ -60,6 +66,7 @@ impl Dataset for Transactions { "n_input_bytes", "n_input_zero_bytes", "n_input_nonzero_bytes", + "n_rlp_bytes", "chain_id", ]) } @@ -74,11 +81,11 @@ pub type TransactionAndReceipt = (Transaction, Option); #[async_trait::async_trait] impl CollectByBlock for Transactions { - type Response = (Block, Vec, bool); + type Response = (Block, Vec, bool); async fn extract(request: Params, source: Arc, query: Arc) -> R { let block = source - .get_block_with_txs(request.block_number()?) + .get_block(request.block_number()?, BlockTransactionsKind::Full) .await? .ok_or(CollectError::CollectError("block not found".to_string()))?; let schema = query.schemas.get_schema(&Datatype::Transactions)?; @@ -87,19 +94,30 @@ impl CollectByBlock for Transactions { // filter by from_address let from_filter: Box bool + Send> = if let Some(from_address) = &request.from_address { - Box::new(move |tx| tx.from.as_bytes() == from_address) + Box::new(move |tx| tx.from == Address::from_slice(from_address)) } else { Box::new(|_| true) }; // filter by to_address let to_filter: Box bool + Send> = if let Some(to_address) = &request.to_address { - Box::new(move |tx| tx.to.as_ref().map_or(false, |x| x.as_bytes() == to_address)) + Box::new(move |tx| match tx.inner.kind() { + TxKind::Create => false, + TxKind::Call(address) => address == Address::from_slice(to_address), + }) } else { Box::new(|_| true) }; - let transactions = - block.transactions.clone().into_iter().filter(from_filter).filter(to_filter).collect(); + let transactions: Vec = block + .transactions + .clone() + .as_transactions() + .unwrap() + .iter() + .filter(|&x| from_filter(x)) + .filter(|&x| to_filter(x)) + .cloned() + .collect(); // 2. collect receipts if necessary // if transactions are filtered fetch by set of transaction hashes, else fetch all receipts @@ -108,7 +126,7 @@ impl CollectByBlock for Transactions { if schema.has_column("gas_used") | schema.has_column("success") { // receipts required let receipts = if request.from_address.is_some() || request.to_address.is_some() { - source.get_tx_receipts(&transactions).await? + source.get_tx_receipts(BlockTransactions::Full(transactions.clone())).await? } else { source.get_tx_receipts_in_block(&block).await? }; @@ -131,7 +149,7 @@ impl CollectByBlock for Transactions { columns, schema, exclude_failed, - block.timestamp.as_u32(), + block.header.timestamp as u32, )?; } Ok(()) @@ -146,7 +164,7 @@ impl CollectByTransaction for Transactions { let tx_hash = request.ethers_transaction_hash()?; let schema = query.schemas.get_schema(&Datatype::Transactions)?; let transaction = source - .get_transaction(tx_hash) + .get_transaction_by_hash(tx_hash) .await? .ok_or(CollectError::CollectError("transaction not found".to_string()))?; let receipt = if schema.has_column("gas_used") { @@ -160,11 +178,11 @@ impl CollectByTransaction for Transactions { .ok_or(CollectError::CollectError("no block number for tx".to_string()))?; let block = source - .get_block(block_number.as_u64()) + .get_block(block_number, BlockTransactionsKind::Hashes) .await? .ok_or(CollectError::CollectError("block not found".to_string()))?; - let timestamp = block.timestamp.as_u32(); + let timestamp = block.header.timestamp as u32; Ok(((transaction, receipt), query.exclude_failed, timestamp)) } @@ -196,55 +214,64 @@ pub(crate) fn process_transaction( }; columns.n_rows += 1; - store!(schema, columns, block_number, tx.block_number.map(|x| x.as_u32())); - store!(schema, columns, transaction_index, tx.transaction_index.map(|x| x.as_u64())); - store!(schema, columns, transaction_hash, tx.hash.as_bytes().to_vec()); - store!(schema, columns, from_address, tx.from.as_bytes().to_vec()); - store!(schema, columns, to_address, tx.to.map(|x| x.as_bytes().to_vec())); - store!(schema, columns, nonce, tx.nonce.as_u64()); - store!(schema, columns, value, tx.value); - store!(schema, columns, input, tx.input.to_vec()); - store!(schema, columns, gas_limit, tx.gas.as_u64()); + store!(schema, columns, block_number, tx.block_number.map(|x| x as u32)); + store!(schema, columns, transaction_index, tx.transaction_index); + store!(schema, columns, transaction_hash, tx.inner.tx_hash().to_vec()); + store!(schema, columns, from_address, tx.from.to_vec()); + store!( + schema, + columns, + to_address, + match tx.inner.kind() { + TxKind::Create => None, + TxKind::Call(address) => Some(address.to_vec()), + } + ); + store!(schema, columns, nonce, tx.inner.nonce()); + store!(schema, columns, value, tx.inner.value()); + store!(schema, columns, input, tx.inner.input().to_vec()); + store!(schema, columns, gas_limit, tx.inner.gas_limit()); store!(schema, columns, success, success); if schema.has_column("n_input_bytes") | schema.has_column("n_input_zero_bytes") | schema.has_column("n_input_nonzero_bytes") { - let n_input_bytes = tx.input.len() as u32; - let n_input_zero_bytes = tx.input.iter().filter(|&&x| x == 0).count() as u32; + let n_input_bytes = tx.inner.input().len() as u32; + let n_input_zero_bytes = tx.inner.input().iter().filter(|&&x| x == 0).count() as u32; store!(schema, columns, n_input_bytes, n_input_bytes); store!(schema, columns, n_input_zero_bytes, n_input_zero_bytes); store!(schema, columns, n_input_nonzero_bytes, n_input_bytes - n_input_zero_bytes); } - store!(schema, columns, n_rlp_bytes, tx.rlp().len() as u32); - store!(schema, columns, gas_used, receipt.and_then(|r| r.gas_used.map(|x| x.as_u64()))); - store!(schema, columns, gas_price, tx.gas_price.map(|gas_price| gas_price.as_u64())); - store!(schema, columns, transaction_type, tx.transaction_type.map(|value| value.as_u32())); - store!(schema, columns, max_fee_per_gas, tx.max_fee_per_gas.map(|value| value.as_u64())); + // in alloy eip2718_encoded_length is rlp_encoded_length + store!(schema, columns, n_rlp_bytes, tx.inner.eip2718_encoded_length() as u32); + store!(schema, columns, gas_used, receipt.map(|r| r.gas_used as u64)); + store!(schema, columns, gas_price, tx.inner.gas_price().map(|gas_price| gas_price as u64)); + store!(schema, columns, transaction_type, tx.inner.tx_type() as u32); + store!(schema, columns, max_fee_per_gas, Some(tx.inner.max_fee_per_gas() as u64)); store!( schema, columns, max_priority_fee_per_gas, - tx.max_priority_fee_per_gas.map(|value| value.as_u64()) + tx.inner.max_priority_fee_per_gas().map(|value| value as u64) ); store!(schema, columns, timestamp, timestamp); - store!(schema, columns, block_hash, tx.block_hash.unwrap_or_default().as_bytes().to_vec()); + store!(schema, columns, block_hash, tx.block_hash.unwrap_or_default().to_vec()); - store!(schema, columns, v, tx.v.as_u64()); - store!(schema, columns, r, tx.r.to_vec_u8()); - store!(schema, columns, s, tx.s.to_vec_u8()); + store!(schema, columns, v, tx.inner.signature().v()); + store!(schema, columns, r, tx.inner.signature().r().to_vec_u8()); + store!(schema, columns, s, tx.inner.signature().s().to_vec_u8()); Ok(()) } fn tx_success(tx: &Transaction, receipt: &Option) -> R { - if let Some(status) = receipt.as_ref().and_then(|x| x.status) { - Ok(status.as_u64() == 1) + if let Some(r) = receipt { + Ok(r.status()) } else if let (Some(1), Some(true)) = - (tx.chain_id.map(|x| x.as_u64()), tx.block_number.map(|x| x.as_u64() < 4370000)) + (tx.inner.chain_id(), tx.block_number.map(|x| x < 4370000)) { - if let Some(gas_used) = receipt.as_ref().and_then(|x| x.gas_used.map(|x| x.as_u64())) { - Ok(gas_used == 0) + if let Some(r) = receipt { + Ok(r.gas_used == 0) } else { return Err(err("could not determine status of transaction")) } diff --git a/crates/freeze/src/datasets/vm_traces.rs b/crates/freeze/src/datasets/vm_traces.rs index b06b4658..1ede0dfa 100644 --- a/crates/freeze/src/datasets/vm_traces.rs +++ b/crates/freeze/src/datasets/vm_traces.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::rpc::types::trace::parity::{TraceResults, VmTrace}; use polars::prelude::*; /// columns for transactions @@ -17,7 +17,7 @@ pub struct VmTraces { mem_data: Vec>>, storage_key: Vec>>, storage_val: Vec>>, - op: Vec, + op: Vec>, n_rows: usize, chain_id: Vec, } @@ -39,10 +39,13 @@ impl Dataset for VmTraces { #[async_trait::async_trait] impl CollectByBlock for VmTraces { - type Response = (Option, Option>, Vec); + type Response = (Option, Option>, Vec); async fn extract(request: Params, source: Arc, _: Arc) -> R { - source.trace_block_vm_traces(request.block_number()? as u32).await + let (bn, txs, traces) = + source.trace_block_vm_traces(request.block_number()? as u32).await?; + let trace_results = traces.into_iter().map(|t| t.full_trace).collect(); + Ok((bn, txs, trace_results)) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -52,7 +55,7 @@ impl CollectByBlock for VmTraces { #[async_trait::async_trait] impl CollectByTransaction for VmTraces { - type Response = (Option, Option>, Vec); + type Response = (Option, Option>, Vec); async fn extract(request: Params, source: Arc, _: Arc) -> R { source.trace_transaction_vm_traces(request.transaction_hash()?).await @@ -64,7 +67,7 @@ impl CollectByTransaction for VmTraces { } fn process_vm_traces( - response: (Option, Option>, Vec), + response: (Option, Option>, Vec), columns: &mut VmTraces, schemas: &Schemas, ) -> R<()> { @@ -79,7 +82,7 @@ fn process_vm_traces( } fn add_ops( - vm_trace: VMTrace, + vm_trace: VmTrace, schema: &Table, columns: &mut VmTraces, number: Option, @@ -120,12 +123,7 @@ fn add_ops( store!(schema, columns, storage_key, None); store!(schema, columns, storage_val, None); } - if schema.has_column("op") { - match opcode.op { - ExecutedInstruction::Known(op) => store!(schema, columns, op, op.to_string()), - ExecutedInstruction::Unknown(op) => store!(schema, columns, op, op), - } - }; + store!(schema, columns, op, opcode.op); if let Some(sub) = opcode.sub { add_ops(sub, schema, columns, number, tx_hash.clone(), tx_pos) diff --git a/crates/freeze/src/multi_datasets/blocks_and_transactions.rs b/crates/freeze/src/multi_datasets/blocks_and_transactions.rs index 12012599..4825e650 100644 --- a/crates/freeze/src/multi_datasets/blocks_and_transactions.rs +++ b/crates/freeze/src/multi_datasets/blocks_and_transactions.rs @@ -1,4 +1,5 @@ use crate::{datasets::transactions, types::collection::*, Datatype, *}; +use alloy::rpc::types::BlockTransactionsKind; use polars::prelude::*; use std::collections::HashMap; @@ -48,9 +49,9 @@ impl CollectByTransaction for BlocksAndTransactions { async fn extract(request: Params, source: Arc, query: Arc) -> R { let ((tx, receipt), exclude_failed, timestamp) = ::extract(request, source.clone(), query).await?; - let block_number = tx.block_number.ok_or(err("no block number for tx"))?.as_u64(); + let block_number = tx.block_number.ok_or(err("no block number for tx"))?; let block = source - .get_block(block_number) + .get_block(block_number, BlockTransactionsKind::Hashes) .await? .ok_or(CollectError::CollectError("block not found".to_string()))?; Ok((block, ((tx, receipt), exclude_failed, timestamp))) diff --git a/crates/freeze/src/multi_datasets/call_trace_derivatives.rs b/crates/freeze/src/multi_datasets/call_trace_derivatives.rs index 90148f27..53ad5c66 100644 --- a/crates/freeze/src/multi_datasets/call_trace_derivatives.rs +++ b/crates/freeze/src/multi_datasets/call_trace_derivatives.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::rpc::types::trace::parity::LocalizedTransactionTrace; use polars::prelude::*; use std::collections::HashMap; @@ -34,10 +34,10 @@ impl ToDataFrames for CallTraceDerivatives { #[async_trait::async_trait] impl CollectByBlock for CallTraceDerivatives { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { - source.trace_block(request.block_number()?.into()).await + source.trace_block(request.block_number()?).await } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { @@ -49,7 +49,7 @@ impl CollectByBlock for CallTraceDerivatives { #[async_trait::async_trait] impl CollectByTransaction for CallTraceDerivatives { - type Response = Vec; + type Response = Vec; async fn extract(request: Params, source: Arc, _: Arc) -> R { source.trace_transaction(request.ethers_transaction_hash()?).await @@ -63,7 +63,7 @@ impl CollectByTransaction for CallTraceDerivatives { } fn process_call_trace_derivatives( - response: Vec, + response: Vec, columns: &mut CallTraceDerivatives, schemas: &HashMap, ) -> R<()> { diff --git a/crates/freeze/src/multi_datasets/geth_state_diffs.rs b/crates/freeze/src/multi_datasets/geth_state_diffs.rs index fc1c04af..bd2f16cc 100644 --- a/crates/freeze/src/multi_datasets/geth_state_diffs.rs +++ b/crates/freeze/src/multi_datasets/geth_state_diffs.rs @@ -1,5 +1,8 @@ use crate::*; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, Bytes, B256, U256}, + rpc::types::trace::geth::{AccountState, DiffMode}, +}; use polars::prelude::*; use std::collections::{BTreeMap, HashMap, HashSet}; @@ -46,7 +49,7 @@ impl ToDataFrames for GethStateDiffs { } } -type BlockTxsTraces = (Option, Vec>>, Vec); +type BlockTxsTraces = (Option, Vec>>, Vec); #[async_trait::async_trait] impl CollectByBlock for GethStateDiffs { @@ -146,34 +149,34 @@ pub(crate) fn process_geth_diffs( } fn add_balances( - address: &H160, + address: &Address, pre: Option, post: Option, columns: &mut GethBalanceDiffs, schema: &Table, index: &(Option, u32, Option>), ) -> R<()> { - let (from_value, to_value) = parse_pre_post(pre, post, U256::zero); + let (from_value, to_value) = parse_pre_post(pre, post, U256::ZERO); let (block_number, transaction_index, transaction_hash) = index; columns.n_rows += 1; store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(*transaction_index as u64)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, address.as_bytes().to_vec()); + store!(schema, columns, address, address.to_vec()); store!(schema, columns, from_value, from_value); store!(schema, columns, to_value, to_value); Ok(()) } fn add_codes( - address: &H160, - pre: &Option, - post: &Option, + address: &Address, + pre: &Option, + post: &Option, columns: &mut GethCodeDiffs, schema: &Table, index: &(Option, u32, Option>), ) -> R<()> { - let blank = String::new(); + let blank = Bytes::new(); let (from_value, to_value) = match (pre, post) { (Some(pre), Some(post)) => (pre, post), (Some(pre), None) => (pre, &blank), @@ -185,57 +188,40 @@ fn add_codes( store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(*transaction_index as u64)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, address.as_bytes().to_vec()); - let from_value = if !from_value.is_empty() { - prefix_hex::decode(from_value).map_err(|_| err("could not decode from code contents"))? - } else { - vec![] - }; - let to_value = if !to_value.is_empty() { - prefix_hex::decode(to_value).map_err(|_| err("could not decode to code contents"))? - } else { - vec![] - }; - store!(schema, columns, from_value, from_value); - store!(schema, columns, to_value, to_value); + store!(schema, columns, address, address.to_vec()); + store!(schema, columns, from_value, from_value.to_vec()); + store!(schema, columns, to_value, to_value.to_vec()); Ok(()) } fn add_nonces( - address: &H160, - pre: Option, - post: Option, + address: &Address, + pre: Option, + post: Option, columns: &mut GethNonceDiffs, schema: &Table, index: &(Option, u32, Option>), ) -> R<()> { - let (from_value, to_value) = parse_pre_post(pre, post, U256::zero); + let (from_value, to_value) = parse_pre_post(pre, post, 0_u64); let (block_number, transaction_index, transaction_hash) = index; columns.n_rows += 1; store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(*transaction_index as u64)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, address.as_bytes().to_vec()); + store!(schema, columns, address, address.to_vec()); store!(schema, columns, from_value, from_value); store!(schema, columns, to_value, to_value); Ok(()) } fn add_storages( - address: &H160, - pre: &Option>, - post: &Option>, + address: &Address, + pre: &BTreeMap, + post: &BTreeMap, columns: &mut GethStorageDiffs, schema: &Table, index: &(Option, u32, Option>), ) -> R<()> { - let blank = BTreeMap::new(); - let (pre, post) = match (pre, post) { - (Some(pre), Some(post)) => (pre, post), - (Some(pre), None) => (pre, &blank), - (None, Some(post)) => (&blank, post), - (None, None) => (&blank, &blank), - }; let (block_number, transaction_index, transaction_hash) = index; let slots: Vec<_> = pre .clone() @@ -244,7 +230,7 @@ fn add_storages( .collect::>() .into_iter() .collect(); - let blank = H256::zero(); + let blank = B256::ZERO; for slot in slots.into_iter() { let (from, to) = match (pre.get(&slot), post.get(&slot)) { (Some(pre), Some(post)) => (pre, post), @@ -256,19 +242,22 @@ fn add_storages( store!(schema, columns, block_number, *block_number); store!(schema, columns, transaction_index, Some(*transaction_index as u64)); store!(schema, columns, transaction_hash, transaction_hash.clone()); - store!(schema, columns, address, address.as_bytes().to_vec()); - store!(schema, columns, slot, slot.as_bytes().to_vec()); - store!(schema, columns, from_value, from.as_bytes().to_vec()); - store!(schema, columns, to_value, to.as_bytes().to_vec()); + store!(schema, columns, address, address.to_vec()); + store!(schema, columns, slot, slot.to_vec()); + store!(schema, columns, from_value, from.to_vec()); + store!(schema, columns, to_value, to.to_vec()); } Ok(()) } -fn parse_pre_post(pre: Option, post: Option, new: fn() -> T) -> (T, T) { +fn parse_pre_post(pre: Option, post: Option, new: T) -> (T, T) +where + T: Copy + Clone, +{ match (pre, post) { (Some(pre), Some(post)) => (pre, post), - (Some(pre), None) => (pre, new()), - (None, Some(post)) => (new(), post), - (None, None) => (new(), new()), + (Some(pre), None) => (pre, new), + (None, Some(post)) => (new, post), + (None, None) => (new, new), } } diff --git a/crates/freeze/src/multi_datasets/state_diffs.rs b/crates/freeze/src/multi_datasets/state_diffs.rs index 31cff4fe..2806fee2 100644 --- a/crates/freeze/src/multi_datasets/state_diffs.rs +++ b/crates/freeze/src/multi_datasets/state_diffs.rs @@ -1,4 +1,5 @@ use crate::*; +use alloy::rpc::types::trace::parity::TraceResults; use polars::prelude::*; use std::collections::HashMap; @@ -11,7 +12,7 @@ pub struct StateDiffs( storage_diffs::StorageDiffs, ); -type BlockTxsTraces = (Option, Vec>>, Vec); +type BlockTxsTraces = (Option, Vec>>, Vec); impl ToDataFrames for StateDiffs { fn create_dfs( @@ -35,7 +36,10 @@ impl CollectByBlock for StateDiffs { async fn extract(request: Params, source: Arc, query: Arc) -> R { let include_txs = query.schemas.values().any(|x| x.has_column("transaction_hash")); - source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await + let (bn, txs, traces) = + source.trace_block_state_diffs(request.block_number()? as u32, include_txs).await?; + let trace_results = traces.into_iter().map(|t| t.full_trace).collect(); + Ok((bn, txs, trace_results)) } fn transform(response: Self::Response, columns: &mut Self, query: &Arc) -> R<()> { diff --git a/crates/freeze/src/multi_datasets/state_reads.rs b/crates/freeze/src/multi_datasets/state_reads.rs index f046d7b4..0fa8ae4b 100644 --- a/crates/freeze/src/multi_datasets/state_reads.rs +++ b/crates/freeze/src/multi_datasets/state_reads.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::{primitives::Address, rpc::types::trace::geth::AccountState}; use polars::prelude::*; use std::collections::{BTreeMap, HashMap}; @@ -12,7 +12,7 @@ pub struct StateReads( storage_reads::StorageReads, ); -type BlockTxsTraces = (Option, Vec>>, Vec>); +type BlockTxsTraces = (Option, Vec>>, Vec>); impl ToDataFrames for StateReads { fn create_dfs( diff --git a/crates/freeze/src/types/chunks/number_chunk.rs b/crates/freeze/src/types/chunks/number_chunk.rs index b557e4c4..bb68d1f4 100644 --- a/crates/freeze/src/types/chunks/number_chunk.rs +++ b/crates/freeze/src/types/chunks/number_chunk.rs @@ -1,6 +1,6 @@ use super::chunk_ops::ChunkData; use crate::ChunkError; -use ethers::types::FilterBlockOption; +use alloy::rpc::types::FilterBlockOption; /// Chunk of blocks #[derive(Debug, Clone)] @@ -77,7 +77,7 @@ impl NumberChunk { match self { NumberChunk::Numbers(numbers) => Some(NumberChunk::Numbers(numbers)), NumberChunk::Range(start, end) => { - let start = ((start + chunk_size - 1) / chunk_size) * chunk_size; + let start = start.div_ceil(chunk_size) * chunk_size; let end = (end / chunk_size) * chunk_size; if end > start { Some(NumberChunk::Range(start, end)) diff --git a/crates/freeze/src/types/chunks/subchunks.rs b/crates/freeze/src/types/chunks/subchunks.rs index 4d248c65..6404c875 100644 --- a/crates/freeze/src/types/chunks/subchunks.rs +++ b/crates/freeze/src/types/chunks/subchunks.rs @@ -27,7 +27,7 @@ impl Subchunk for BlockChunk { fn subchunk_by_count(&self, n_chunks: &u64) -> Vec { let total_blocks = self.size(); - let chunk_size = (total_blocks + n_chunks - 1) / n_chunks; + let chunk_size = total_blocks.div_ceil(*n_chunks); self.subchunk_by_size(&chunk_size) } } diff --git a/crates/freeze/src/types/conversions.rs b/crates/freeze/src/types/conversions.rs index ce8d39f5..536ee3ac 100644 --- a/crates/freeze/src/types/conversions.rs +++ b/crates/freeze/src/types/conversions.rs @@ -1,6 +1,6 @@ use crate::CollectError; /// conversion operations -use ethers::prelude::*; +use alloy::primitives::{Bytes, I256, U256}; use prefix_hex; /// convert Bytes to u32 @@ -21,11 +21,7 @@ pub trait ToVecU8 { impl ToVecU8 for U256 { fn to_vec_u8(&self) -> Vec { - let mut vec = Vec::new(); - for &number in self.0.iter().rev() { - vec.extend_from_slice(&number.to_be_bytes()); - } - vec + self.to_be_bytes_vec() } } @@ -45,9 +41,7 @@ impl ToVecU8 for Vec { fn to_vec_u8(&self) -> Vec { let mut vec = Vec::new(); for value in self { - for &number in value.0.iter().rev() { - vec.extend_from_slice(&number.to_be_bytes()); - } + vec.extend_from_slice(&value.to_be_bytes_vec()) } vec } diff --git a/crates/freeze/src/types/dataframes/creation.rs b/crates/freeze/src/types/dataframes/creation.rs index b4dd01d4..860d5b4c 100644 --- a/crates/freeze/src/types/dataframes/creation.rs +++ b/crates/freeze/src/types/dataframes/creation.rs @@ -74,7 +74,7 @@ macro_rules! with_series_u256 { let name = $name.to_string() + U256Type::U32.suffix().as_str(); let name = name.as_str(); - let converted: Vec = $value.iter().map(|v| v.as_u32()).collect(); + let converted: Vec = $value.iter().map(|v| v.wrapping_to::()).collect(); $all_series.push(Series::new(name, converted)); } @@ -83,7 +83,7 @@ macro_rules! with_series_u256 { let name = $name.to_string() + U256Type::U64.suffix().as_str(); let name = name.as_str(); - let converted: Vec = $value.iter().map(|v| v.as_u64()).collect(); + let converted: Vec = $value.iter().map(|v| v.wrapping_to::()).collect(); $all_series.push(Series::new(name, converted)); } @@ -154,7 +154,7 @@ macro_rules! with_series_option_u256 { let name = name.as_str(); let converted: Vec> = - $value.iter().map(|v| v.map(|x| x.as_u32())).collect(); + $value.iter().map(|v| v.map(|x| x.wrapping_to::())).collect(); $all_series.push(Series::new(name, converted)); } @@ -164,7 +164,7 @@ macro_rules! with_series_option_u256 { let name = name.as_str(); let converted: Vec> = - $value.iter().map(|v| v.map(|x| x.as_u64())).collect(); + $value.iter().map(|v| v.map(|x| x.wrapping_to::())).collect(); $all_series.push(Series::new(name, converted)); } diff --git a/crates/freeze/src/types/dataframes/u256s.rs b/crates/freeze/src/types/dataframes/u256s.rs index ea3a353a..9e476892 100644 --- a/crates/freeze/src/types/dataframes/u256s.rs +++ b/crates/freeze/src/types/dataframes/u256s.rs @@ -1,5 +1,5 @@ use crate::*; -use ethers::prelude::*; +use alloy::primitives::{I256, U256}; use polars::prelude::*; /// Converts a Vec of U256-like data into a polars Series @@ -46,11 +46,11 @@ impl ToU256Series for Vec { Ok(Series::new(name, converted)) } U256Type::U32 => { - let converted: Vec = self.iter().map(|v| v.as_u32()).collect(); + let converted: Vec = self.iter().map(|v| v.wrapping_to::()).collect(); Ok(Series::new(name, converted)) } U256Type::U64 => { - let converted: Vec = self.iter().map(|v| v.as_u64()).collect(); + let converted: Vec = self.iter().map(|v| v.wrapping_to::()).collect(); Ok(Series::new(name, converted)) } U256Type::Decimal128 => { @@ -100,12 +100,12 @@ impl ToU256Series for Vec> { } U256Type::U32 => { let converted: Vec> = - self.iter().map(|v| v.map(|x| x.as_u32())).collect(); + self.iter().map(|v| v.map(|x| x.wrapping_to::())).collect(); Ok(Series::new(name, converted)) } U256Type::U64 => { let converted: Vec> = - self.iter().map(|v| v.map(|x| x.as_u64())).collect(); + self.iter().map(|v| v.map(|x| x.wrapping_to::())).collect(); Ok(Series::new(name, converted)) } U256Type::Decimal128 => { diff --git a/crates/freeze/src/types/decoders/log_decoder.rs b/crates/freeze/src/types/decoders/log_decoder.rs index 5f7c87aa..b107b60b 100644 --- a/crates/freeze/src/types/decoders/log_decoder.rs +++ b/crates/freeze/src/types/decoders/log_decoder.rs @@ -1,8 +1,12 @@ use crate::{err, CollectError, ColumnEncoding, ToU256Series, U256Type}; -use ethers::prelude::*; -use ethers_core::abi::{AbiEncode, EventParam, HumanReadableParser, ParamType, RawLog, Token}; +use alloy::{ + dyn_abi::{DynSolValue, EventExt}, + hex::ToHexExt, + json_abi::Event, + primitives::{I256, U256}, + rpc::types::Log, +}; use polars::prelude::*; -use std::collections::HashSet; /// container for log decoding context #[derive(Clone, Debug, PartialEq)] @@ -11,7 +15,7 @@ pub struct LogDecoder { /// uint256 amount) pub raw: String, /// decoded abi type of event signature string - pub event: abi::Event, + pub event: Event, } impl LogDecoder { @@ -19,7 +23,7 @@ impl LogDecoder { /// ex: LogDecoder::new("event Transfer(address indexed from, address indexed to, uint256 /// amount)".to_string()) pub fn new(event_signature: String) -> Result { - match HumanReadableParser::parse_event(event_signature.as_str()) { + match Event::parse(&event_signature) { Ok(event) => Ok(Self { event, raw: event_signature.clone() }), Err(e) => { let err = format!("incorrectly formatted event {} (expect something like event Transfer(address indexed from, address indexed to, uint256 amount) err: {}", event_signature, e); @@ -37,19 +41,35 @@ impl LogDecoder { /// converts from a log type to an abi token type /// this function assumes all logs are of the same type and skips fields if they don't match the /// passed event definition - pub fn parse_log_from_event(&self, logs: Vec) -> indexmap::IndexMap> { - let mut map: indexmap::IndexMap> = indexmap::IndexMap::new(); - let known_keys = - self.event.inputs.clone().into_iter().map(|i| i.name).collect::>(); + pub fn parse_log_from_event( + &self, + logs: Vec, + ) -> indexmap::IndexMap> { + let mut map: indexmap::IndexMap> = indexmap::IndexMap::new(); + let indexed_keys: Vec = self + .event + .inputs + .clone() + .into_iter() + .filter_map(|x| if x.indexed { Some(x.name) } else { None }) + .collect(); + let body_keys: Vec = self + .event + .inputs + .clone() + .into_iter() + .filter_map(|x| if x.indexed { None } else { Some(x.name) }) + .collect(); for log in logs { - match self.event.parse_log(RawLog::from(log)) { - Ok(log) => { - for param in log.params { - if known_keys.contains(param.name.as_str()) { - let tokens = map.entry(param.name).or_default(); - tokens.push(param.value); - } + match self.event.decode_log_parts(log.topics().to_vec(), log.data().data.as_ref(), true) + { + Ok(decoded) => { + for (idx, param) in decoded.indexed.into_iter().enumerate() { + map.entry(indexed_keys[idx].clone()).or_default().push(param); + } + for (idx, param) in decoded.body.into_iter().enumerate() { + map.entry(body_keys[idx].clone()).or_default().push(param); } } Err(e) => eprintln!("error parsing log: {:?}", e), @@ -62,7 +82,7 @@ impl LogDecoder { pub fn make_series( &self, name: String, - data: Vec, + data: Vec, chunk_len: usize, u256_types: &[U256Type], column_encoding: &ColumnEncoding, @@ -70,7 +90,6 @@ impl LogDecoder { // This is a smooth brain way of doing this, but I can't think of a better way right now let mut ints: Vec = vec![]; let mut uints: Vec = vec![]; - let mut str_ints: Vec = vec![]; let mut u256s: Vec = vec![]; let mut i256s: Vec = vec![]; let mut bytes: Vec> = vec![]; @@ -79,68 +98,39 @@ impl LogDecoder { let mut strings: Vec = vec![]; // TODO: support array & tuple types - let param = self - .event - .inputs - .clone() - .into_iter() - .filter(|i| i.name == name) - .collect::>(); - let param = param.first(); - for token in data { match token { - Token::Address(a) => match column_encoding { - ColumnEncoding::Binary => bytes.push(a.to_fixed_bytes().into()), + DynSolValue::Address(a) => match column_encoding { + ColumnEncoding::Binary => bytes.push(a.to_vec()), ColumnEncoding::Hex => hexes.push(format!("{:?}", a)), }, - Token::FixedBytes(b) => match column_encoding { - ColumnEncoding::Binary => bytes.push(b), + DynSolValue::FixedBytes(b, _) => match column_encoding { + ColumnEncoding::Binary => bytes.push(b.to_vec()), ColumnEncoding::Hex => hexes.push(b.encode_hex()), }, - Token::Bytes(b) => match column_encoding { + DynSolValue::Bytes(b) => match column_encoding { ColumnEncoding::Binary => bytes.push(b), ColumnEncoding::Hex => hexes.push(b.encode_hex()), }, - Token::Uint(i) => match param { - Some(param) => match param.kind.clone() { - ParamType::Uint(size) => { - if size <= 64 { - uints.push(i.as_u64()) - } else { - u256s.push(i) - } - } - _ => str_ints.push(i.to_string()), - }, - None => match i.try_into() { - Ok(i) => ints.push(i), - Err(_) => str_ints.push(i.to_string()), - }, - }, - Token::Int(i) => { - let i = I256::from_raw(i); - match param { - Some(param) => match param.kind.clone() { - ParamType::Int(size) => { - if size <= 64 { - ints.push(i.as_i64()) - } else { - i256s.push(i) - } - } - _ => str_ints.push(i.to_string()), - }, - None => match i.try_into() { - Ok(i) => ints.push(i), - Err(_) => str_ints.push(i.to_string()), - }, + DynSolValue::Uint(i, size) => { + if size <= 64 { + uints.push(i.wrapping_to::()) + } else { + u256s.push(i) + } + } + DynSolValue::Int(i, size) => { + if size <= 64 { + ints.push(i.unchecked_into()); + } else { + i256s.push(i); } } - Token::Bool(b) => bools.push(b), - Token::String(s) => strings.push(s), - Token::Array(_) | Token::FixedArray(_) => {} - Token::Tuple(_) => {} + DynSolValue::Bool(b) => bools.push(b), + DynSolValue::String(s) => strings.push(s), + DynSolValue::Array(_) | DynSolValue::FixedArray(_) => {} + DynSolValue::Tuple(_) => {} + DynSolValue::Function(_) => {} } } let mixed_length_err = format!("could not parse column {}, mixed type", name); @@ -173,8 +163,6 @@ impl LogDecoder { Ok(series_vec) } else if !uints.is_empty() { Ok(vec![Series::new(name.as_str(), uints)]) - } else if !str_ints.is_empty() { - Ok(vec![Series::new(name.as_str(), str_ints)]) } else if !bytes.is_empty() { if bytes.len() != chunk_len { return Err(err(mixed_length_err)) diff --git a/crates/freeze/src/types/errors.rs b/crates/freeze/src/types/errors.rs index ebd9071b..fe3bae20 100644 --- a/crates/freeze/src/types/errors.rs +++ b/crates/freeze/src/types/errors.rs @@ -1,5 +1,5 @@ +use alloy::transports::{RpcError, TransportErrorKind}; /// error specifications -use ethers::prelude::*; use polars::prelude::*; use thiserror::Error; @@ -60,7 +60,7 @@ pub enum CollectError { /// Error related to provider operations #[error("Failed to get block: {0}")] - ProviderError(#[source] ProviderError), + ProviderError(#[source] RpcError), /// Error related to tokio task #[error("Task failed: {0}")] @@ -96,7 +96,7 @@ pub enum ParseError { /// Error related to provider operations #[error("Failed to get block: {0}")] - ProviderError(#[source] ProviderError), + ProviderError(#[source] RpcError), /// Parse int error #[error("Parsing error")] @@ -105,6 +105,10 @@ pub enum ParseError { /// MESC error #[error("MESC error: {:?}", .0)] MescError(mesc::MescError), + + /// Parse url error + #[error("Parsing url error: {0}")] + ParseUrlError(url::ParseError), } impl From for ParseError { diff --git a/crates/freeze/src/types/mod.rs b/crates/freeze/src/types/mod.rs index d4eb84c3..b0e163d6 100644 --- a/crates/freeze/src/types/mod.rs +++ b/crates/freeze/src/types/mod.rs @@ -1,5 +1,4 @@ /// type specifications for cryo_freeze crate - /// type specifications for chunk types pub mod chunks; /// conversion operations @@ -36,6 +35,7 @@ pub use reports::CRYO_VERSION; pub mod dataframes; /// function and event signatures +#[allow(missing_docs)] pub mod signatures; /// error specifications diff --git a/crates/freeze/src/types/rpc_params.rs b/crates/freeze/src/types/rpc_params.rs index 2832b4c3..fc58f5b0 100644 --- a/crates/freeze/src/types/rpc_params.rs +++ b/crates/freeze/src/types/rpc_params.rs @@ -1,5 +1,8 @@ use crate::{err, CollectError}; -use ethers::prelude::*; +use alloy::{ + primitives::{Address, BlockNumber, B256}, + rpc::types::{Filter, FilterBlockOption}, +}; /// represents parameters for a single rpc call #[derive(Default, Clone, Debug)] @@ -74,22 +77,22 @@ impl Params { /// ethers block number pub fn ethers_block_number(&self) -> Result { - Ok(self.block_number()?.into()) + self.block_number() } /// ethers transaction - pub fn ethers_transaction_hash(&self) -> Result { - Ok(H256::from_slice(&self.transaction_hash()?)) + pub fn ethers_transaction_hash(&self) -> Result { + Ok(B256::from_slice(&self.transaction_hash()?)) } /// ethers address - pub fn ethers_address(&self) -> Result { - Ok(H160::from_slice(&self.address()?)) + pub fn ethers_address(&self) -> Result { + Ok(Address::from_slice(&self.address()?)) } /// ethers contract - pub fn ethers_contract(&self) -> Result { - Ok(H160::from_slice(&self.contract()?)) + pub fn ethers_contract(&self) -> Result { + Ok(Address::from_slice(&self.contract()?)) } /// log filter @@ -97,16 +100,33 @@ impl Params { let (start, end) = self.block_range()?; let block_option = FilterBlockOption::Range { from_block: Some(start.into()), to_block: Some(end.into()) }; - let filter = Filter { - block_option, - address: self.address.clone().map(|x| ValueOrArray::Value(H160::from_slice(&x))), - topics: [ - self.topic0.clone().map(|x| ValueOrArray::Value(Some(H256::from_slice(&x)))), - self.topic1.clone().map(|x| ValueOrArray::Value(Some(H256::from_slice(&x)))), - self.topic2.clone().map(|x| ValueOrArray::Value(Some(H256::from_slice(&x)))), - self.topic3.clone().map(|x| ValueOrArray::Value(Some(H256::from_slice(&x)))), - ], - }; + // let filter = Filter { + // block_option, + // address: self.address.clone().map(|x| ValueOrArray::Value(Address::from_slice(&x))), + // topics: [ + // self.topic0.clone().map(|x| ValueOrArray::Value(Some(B256::from_slice(&x)))), + // self.topic1.clone().map(|x| ValueOrArray::Value(Some(B256::from_slice(&x)))), + // self.topic2.clone().map(|x| ValueOrArray::Value(Some(B256::from_slice(&x)))), + // self.topic3.clone().map(|x| ValueOrArray::Value(Some(B2::from_slice(&x)))), + // ], + // }; + let mut filter = Filter::new(); + filter.block_option = block_option; + if self.address.is_some() { + filter = filter.address(Address::from_slice(&self.address.clone().unwrap())); + } + if self.topic0.is_some() { + filter = filter.event_signature(B256::from_slice(&self.topic0.clone().unwrap())); + } + if self.topic1.is_some() { + filter = filter.topic1(B256::from_slice(&self.topic1.clone().unwrap())); + } + if self.topic2.is_some() { + filter = filter.topic2(B256::from_slice(&self.topic2.clone().unwrap())); + } + if self.topic3.is_some() { + filter = filter.topic3(B256::from_slice(&self.topic3.clone().unwrap())); + } Ok(filter) } } diff --git a/crates/freeze/src/types/signatures.rs b/crates/freeze/src/types/signatures.rs index b41280ec..fb74358d 100644 --- a/crates/freeze/src/types/signatures.rs +++ b/crates/freeze/src/types/signatures.rs @@ -1,37 +1,26 @@ -use ethers::prelude::*; - -lazy_static::lazy_static! { - - /// function signature of FUNCTION_ERC20_NAME - pub static ref FUNCTION_ERC20_NAME: Vec = prefix_hex::decode("0x06fdde03").expect("Decoding failed"); - - /// function signature of FUNCTION_ERC20_SYMBOL - pub static ref FUNCTION_ERC20_SYMBOL: Vec = prefix_hex::decode("0x95d89b41").expect("Decoding failed"); - - /// function signature of FUNCTION_ERC20_DECIMALS - pub static ref FUNCTION_ERC20_DECIMALS: Vec = prefix_hex::decode("0x313ce567").expect("Decoding failed"); - - /// function signature of FUNCTION_ERC20_BALANCE_OF - pub static ref FUNCTION_ERC20_BALANCE_OF: Vec = prefix_hex::decode("0x70a08231").expect("Decoding failed"); - - /// function signature of FUNCTION_ERC20_TOTAL_SUPPLY - pub static ref FUNCTION_ERC20_TOTAL_SUPPLY: Vec = prefix_hex::decode("0x18160ddd").expect("Decoding failed"); - - /// event hash of EVENT_ERC20_TRANSFER - pub static ref EVENT_ERC20_TRANSFER: H256 = H256( - prefix_hex::decode("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") - .expect("Decoding failed"), - ); - - /// event hash of EVENT_ERC20_APPROVAL - pub static ref EVENT_ERC20_APPROVAL: H256 = H256( - prefix_hex::decode("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925") - .expect("Decoding failed"), - ); +use alloy::sol; + +sol! { + contract ERC20 { + function name() external pure returns (string memory); + function symbol() external pure returns (string memory); + function decimals() external pure returns (uint8); + function totalSupply() external view returns (uint); + function balanceOf(address owner) external view returns (uint); + function allowance(address owner, address spender) external view returns (uint); + + event Approval(address indexed owner, address indexed spender, uint value); + event Transfer(address indexed from, address indexed to, uint value); + } +} - /// event hash of EVENT_ERC721_TRANSFER - pub static ref EVENT_ERC721_TRANSFER: H256 = H256( - prefix_hex::decode("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") - .expect("Decoding failed"), - ); +sol! { + contract ERC721 { + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + function name() external view returns (string memory); + function symbol() external view returns (string memory); + function tokenURI(uint256 tokenId) external view returns (string memory); + } } diff --git a/crates/freeze/src/types/sources.rs b/crates/freeze/src/types/sources.rs index 24d63e04..e718c564 100644 --- a/crates/freeze/src/types/sources.rs +++ b/crates/freeze/src/types/sources.rs @@ -1,6 +1,29 @@ use std::sync::Arc; -use ethers::prelude::*; +use alloy::{ + eips::BlockNumberOrTag, + primitives::{Address, BlockNumber, Bytes, TxHash, B256, U256}, + providers::{ + ext::{DebugApi, TraceApi}, + Provider, ProviderBuilder, RootProvider, + }, + rpc::types::{ + trace::{ + common::TraceResult, + geth::{ + AccountState, CallConfig, CallFrame, DefaultFrame, DiffMode, + GethDebugBuiltInTracerType, GethDebugTracerType, GethDebugTracingOptions, + GethTrace, PreStateConfig, PreStateFrame, + }, + parity::{ + LocalizedTransactionTrace, TraceResults, TraceResultsWithTransactionHash, TraceType, + }, + }, + Block, BlockTransactions, BlockTransactionsKind, Filter, Log, Transaction, + TransactionInput, TransactionReceipt, TransactionRequest, + }, + transports::{http::reqwest::Url, BoxTransport, RpcError, TransportErrorKind}, +}; use governor::{ clock::DefaultClock, middleware::NoOpMiddleware, @@ -20,7 +43,7 @@ pub type RateLimiter = governor::RateLimiter, /// chain_id of network pub chain_id: u64, /// number of blocks per log request @@ -37,56 +60,6 @@ pub struct Source { pub labels: SourceLabels, } -/// A non-generic wrapper over different provider types for use as a trait object -#[derive(Clone, Debug)] -pub enum ProviderWrapper { - /// mock provider - MockProvider(Arc>), - /// http client - RetryClientHttp(Arc>>), - /// websocket client - WsClient(Arc>), - /// ipc client - IpcClient(Arc>), -} - -impl From> for ProviderWrapper { - fn from(value: Provider) -> ProviderWrapper { - ProviderWrapper::MockProvider(Arc::new(value)) - } -} - -impl From>> for ProviderWrapper { - fn from(value: Provider>) -> ProviderWrapper { - ProviderWrapper::RetryClientHttp(Arc::new(value)) - } -} - -impl From> for ProviderWrapper { - fn from(value: Provider) -> ProviderWrapper { - ProviderWrapper::WsClient(Arc::new(value)) - } -} - -impl From> for ProviderWrapper { - fn from(value: Provider) -> ProviderWrapper { - ProviderWrapper::IpcClient(Arc::new(value)) - } -} - -/// extract the provider from a source and run specified method -#[macro_export] -macro_rules! source_provider { - ($source:expr, $method:ident($($arg:expr),*)) => { - match &$source.provider { - ProviderWrapper::MockProvider(provider) => provider.$method($($arg),*), - ProviderWrapper::RetryClientHttp(provider) => provider.$method($($arg),*), - ProviderWrapper::WsClient(provider) => provider.$method($($arg),*), - ProviderWrapper::IpcClient(provider) => provider.$method($($arg),*), - } - }; -} - impl Source { /// Returns all receipts for a block. /// Tries to use `eth_getBlockReceipts` first, and falls back to `eth_getTransactionReceipt` @@ -94,32 +67,32 @@ impl Source { &self, block: &Block, ) -> Result> { - let block_number = - block.number.ok_or(CollectError::CollectError("no block number".to_string()))?.as_u64(); - if let Ok(receipts) = self.get_block_receipts(block_number).await { + let block_number = block.header.number; + if let Ok(Some(receipts)) = self.get_block_receipts(block_number).await { return Ok(receipts); } - self.get_tx_receipts(&block.transactions).await + self.get_tx_receipts(block.transactions.clone()).await } /// Returns all receipts for vector of transactions using `eth_getTransactionReceipt` pub async fn get_tx_receipts( &self, - transactions: &Vec, + transactions: BlockTransactions, ) -> Result> { let mut tasks = Vec::new(); - for tx in transactions { - let tx_hash = tx.hash; + for tx in transactions.as_transactions().unwrap() { + let tx_hash = *tx.inner.tx_hash(); let source = self.clone(); - let task = task::spawn(async move { - match source.get_transaction_receipt(tx_hash).await? { - Some(receipt) => Ok(receipt), - None => { - Err(CollectError::CollectError("could not find tx receipt".to_string())) + let task: task::JoinHandle> = + task::spawn(async move { + match source.get_transaction_receipt(tx_hash).await? { + Some(receipt) => Ok(receipt), + None => { + Err(CollectError::CollectError("could not find tx receipt".to_string())) + } } - } - }); + }); tasks.push(task); } let mut receipts = Vec::new(); @@ -144,31 +117,21 @@ const DEFAULT_MAX_CONCURRENT_REQUESTS: u64 = 100; impl Source { /// initialize source pub async fn init(rpc_url: Option) -> Result { - let rpc_url = parse_rpc_url(rpc_url); - let provider = Provider::>::new_client( - &rpc_url, - DEFAULT_MAX_RETRIES, - DEFAULT_INTIAL_BACKOFF, - ) - .map_err(|_| CollectError::RPCError("could not connect to provider".to_string()))?; + let rpc_url: String = parse_rpc_url(rpc_url); + let parsed_rpc_url: Url = rpc_url.parse().expect("rpc url is not valid"); + let provider = ProviderBuilder::new().on_http(parsed_rpc_url.clone()); let chain_id = provider - .get_chainid() + .get_chain_id() .await - .map_err(|_| CollectError::RPCError("could not get chain_id".to_string()))? - .as_u64(); + .map_err(|_| CollectError::RPCError("could not get chain_id".to_string()))?; let rate_limiter = None; let semaphore = None; - let provider = Provider::>::new_client( - &rpc_url, - DEFAULT_MAX_RETRIES, - DEFAULT_INTIAL_BACKOFF, - ) - .map_err(|_| CollectError::RPCError("could not connect to provider".to_string()))?; + let provider = ProviderBuilder::new().on_http(parsed_rpc_url); let source = Source { - provider: ProviderWrapper::RetryClientHttp(Arc::new(provider)), + provider: provider.boxed(), chain_id, inner_request_size: DEFAULT_INNER_REQUEST_SIZE, max_concurrent_chunks: Some(DEFAULT_MAX_CONCURRENT_CHUNKS), @@ -251,7 +214,7 @@ pub struct SourceLabels { #[derive(Debug)] pub struct Fetcher

{ /// provider data source - pub provider: Provider

, + pub provider: RootProvider

, /// semaphore for controlling concurrency pub semaphore: Option, /// rate limiter for controlling request rate @@ -265,18 +228,18 @@ impl Source { /// Returns an array (possibly empty) of logs that match the filter pub async fn get_logs(&self, filter: &Filter) -> Result> { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, get_logs(filter)).await) + Self::map_err(self.provider.get_logs(filter).await) } /// Replays all transactions in a block returning the requested traces for each transaction pub async fn trace_replay_block_transactions( &self, - block: BlockNumber, + block: BlockNumberOrTag, trace_types: Vec, - ) -> Result> { + ) -> Result> { let _permit = self.permit_request().await; Self::map_err( - source_provider!(self, trace_replay_block_transactions(block, trace_types)).await, + self.provider.trace_replay_block_transactions(block.into(), &trace_types).await, ) } @@ -285,23 +248,25 @@ impl Source { &self, block: u32, include_transaction_hashes: bool, - ) -> Result<(Option, Vec>>, Vec)> { + ) -> Result<(Option, Vec>>, Vec)> { // get traces let result = self .trace_replay_block_transactions( - block.into(), - vec![ethers::types::TraceType::StateDiff], + BlockNumberOrTag::Number(block as u64), + vec![TraceType::StateDiff], ) .await?; // get transactions let txs = if include_transaction_hashes { - self.get_block(block as u64) + self.get_block(block as u64, BlockTransactionsKind::Hashes) .await? .ok_or(CollectError::CollectError("could not find block".to_string()))? .transactions + .as_transactions() + .unwrap() .iter() - .map(|tx| Some(tx.0.to_vec())) + .map(|tx| Some(tx.inner.tx_hash().to_vec())) .collect() } else { vec![None; result.len()] @@ -314,9 +279,12 @@ impl Source { pub async fn trace_block_vm_traces( &self, block: u32, - ) -> Result<(Option, Option>, Vec)> { + ) -> Result<(Option, Option>, Vec)> { let result = self - .trace_replay_block_transactions(block.into(), vec![ethers::types::TraceType::VmTrace]) + .trace_replay_block_transactions( + BlockNumberOrTag::Number(block as u64), + vec![TraceType::VmTrace], + ) .await; Ok((Some(block), None, result?)) } @@ -326,20 +294,20 @@ impl Source { &self, tx_hash: TxHash, trace_types: Vec, - ) -> Result { + ) -> Result { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, trace_replay_transaction(tx_hash, trace_types)).await) + Self::map_err(self.provider.trace_replay_transaction(tx_hash, &trace_types).await) } /// Get state diff traces of transaction pub async fn trace_transaction_state_diffs( &self, transaction_hash: Vec, - ) -> Result<(Option, Vec>>, Vec)> { + ) -> Result<(Option, Vec>>, Vec)> { let result = self .trace_replay_transaction( - H256::from_slice(&transaction_hash), - vec![ethers::types::TraceType::StateDiff], + B256::from_slice(&transaction_hash), + vec![TraceType::StateDiff], ) .await; Ok((None, vec![Some(transaction_hash)], vec![result?])) @@ -349,20 +317,17 @@ impl Source { pub async fn trace_transaction_vm_traces( &self, transaction_hash: Vec, - ) -> Result<(Option, Option>, Vec)> { + ) -> Result<(Option, Option>, Vec)> { let result = self - .trace_replay_transaction( - H256::from_slice(&transaction_hash), - vec![ethers::types::TraceType::VmTrace], - ) + .trace_replay_transaction(B256::from_slice(&transaction_hash), vec![TraceType::VmTrace]) .await; Ok((None, Some(transaction_hash), vec![result?])) } /// Gets the transaction with transaction_hash - pub async fn get_transaction(&self, tx_hash: TxHash) -> Result> { + pub async fn get_transaction_by_hash(&self, tx_hash: TxHash) -> Result> { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, get_transaction(tx_hash)).await) + Self::map_err(self.provider.get_transaction_by_hash(tx_hash).await) } /// Gets the transaction receipt with transaction_hash @@ -371,48 +336,57 @@ impl Source { tx_hash: TxHash, ) -> Result> { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, get_transaction_receipt(tx_hash)).await) + Self::map_err(self.provider.get_transaction_receipt(tx_hash).await) } /// Gets the block at `block_num` (transaction hashes only) - pub async fn get_block(&self, block_num: u64) -> Result>> { + pub async fn get_block( + &self, + block_num: u64, + kind: BlockTransactionsKind, + ) -> Result> { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, get_block(block_num)).await) + Self::map_err(self.provider.get_block(block_num.into(), kind).await) } /// Gets the block with `block_hash` (transaction hashes only) - pub async fn get_block_by_hash(&self, block_hash: H256) -> Result>> { - let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, get_block(BlockId::Hash(block_hash))).await) - } - - /// Gets the block at `block_num` (full transactions included) - pub async fn get_block_with_txs(&self, block_num: u64) -> Result>> { + pub async fn get_block_by_hash( + &self, + block_hash: B256, + kind: BlockTransactionsKind, + ) -> Result> { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, get_block_with_txs(block_num)).await) + Self::map_err(self.provider.get_block(block_hash.into(), kind).await) } /// Returns all receipts for a block. /// Note that this uses the `eth_getBlockReceipts` method which is not supported by all nodes. /// Consider using `FetcherExt::get_tx_receipts_in_block` which takes a block, and falls back to /// `eth_getTransactionReceipt` if `eth_getBlockReceipts` is not supported. - pub async fn get_block_receipts(&self, block_num: u64) -> Result> { + pub async fn get_block_receipts( + &self, + block_num: u64, + ) -> Result>> { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, get_block_receipts(block_num)).await) + Self::map_err(self.provider.get_block_receipts(block_num.into()).await) } /// Returns traces created at given block - pub async fn trace_block(&self, block_num: BlockNumber) -> Result> { + pub async fn trace_block( + &self, + block_num: BlockNumber, + ) -> Result> { let _permit = self.permit_request().await; - Self::map_err(source_provider!(self, trace_block(block_num)).await) + Self::map_err(self.provider.trace_block(block_num.into()).await) } /// Returns all traces of a given transaction - pub async fn trace_transaction(&self, tx_hash: TxHash) -> Result> { + pub async fn trace_transaction( + &self, + tx_hash: TxHash, + ) -> Result> { let _permit = self.permit_request().await; - source_provider!(self, trace_transaction(tx_hash)) - .await - .map_err(CollectError::ProviderError) + Self::map_err(self.provider.trace_transaction(tx_hash).await) } /// Deprecated @@ -422,10 +396,7 @@ impl Source { block_number: BlockNumber, ) -> Result { let _permit = self.permit_request().await; - let tx: ethers::core::types::transaction::eip2718::TypedTransaction = transaction.into(); - source_provider!(self, call(&tx, Some(block_number.into()))) - .await - .map_err(CollectError::ProviderError) + Self::map_err(self.provider.call(&transaction).block(block_number.into()).await) } /// Returns traces for given call data @@ -434,116 +405,121 @@ impl Source { transaction: TransactionRequest, trace_type: Vec, block_number: Option, - ) -> Result { + ) -> Result { let _permit = self.permit_request().await; - source_provider!(self, trace_call(transaction, trace_type, block_number)) - .await - .map_err(CollectError::ProviderError) + if let Some(bn) = block_number { + return Self::map_err( + self.provider.trace_call(&transaction, &trace_type).block_id(bn.into()).await, + ); + } + Self::map_err(self.provider.trace_call(&transaction, &trace_type).await) } /// Get nonce of address pub async fn get_transaction_count( &self, - address: H160, + address: Address, block_number: BlockNumber, - ) -> Result { + ) -> Result { let _permit = self.permit_request().await; - source_provider!(self, get_transaction_count(address, Some(block_number.into()))) - .await - .map_err(CollectError::ProviderError) + Self::map_err( + self.provider.get_transaction_count(address).block_id(block_number.into()).await, + ) } /// Get code at address - pub async fn get_balance(&self, address: H160, block_number: BlockNumber) -> Result { + pub async fn get_balance(&self, address: Address, block_number: BlockNumber) -> Result { let _permit = self.permit_request().await; - source_provider!(self, get_balance(address, Some(block_number.into()))) - .await - .map_err(CollectError::ProviderError) + Self::map_err(self.provider.get_balance(address).block_id(block_number.into()).await) } /// Get code at address - pub async fn get_code(&self, address: H160, block_number: BlockNumber) -> Result { + pub async fn get_code(&self, address: Address, block_number: BlockNumber) -> Result { let _permit = self.permit_request().await; - source_provider!(self, get_code(address, Some(block_number.into()))) - .await - .map_err(CollectError::ProviderError) + Self::map_err(self.provider.get_code_at(address).block_id(block_number.into()).await) } /// Get stored data at given location pub async fn get_storage_at( &self, - address: H160, - slot: H256, + address: Address, + slot: U256, block_number: BlockNumber, - ) -> Result { + ) -> Result { let _permit = self.permit_request().await; - source_provider!(self, get_storage_at(address, slot, Some(block_number.into()))) - .await - .map_err(CollectError::ProviderError) + Self::map_err( + self.provider.get_storage_at(address, slot).block_id(block_number.into()).await, + ) } /// Get the block number - pub async fn get_block_number(&self) -> Result { - Self::map_err(source_provider!(self, get_block_number()).await) + pub async fn get_block_number(&self) -> Result { + Self::map_err(self.provider.get_block_number().await) } // extra helpers below /// block number of transaction pub async fn get_transaction_block_number(&self, transaction_hash: Vec) -> Result { - let block = self.get_transaction(H256::from_slice(&transaction_hash)).await?; + let block = self.get_transaction_by_hash(B256::from_slice(&transaction_hash)).await?; let block = block.ok_or(CollectError::CollectError("could not get block".to_string()))?; Ok(block .block_number .ok_or(CollectError::CollectError("could not get block number".to_string()))? - .as_u32()) + as u32) } /// block number of transaction pub async fn get_transaction_logs(&self, transaction_hash: Vec) -> Result> { Ok(self - .get_transaction_receipt(H256::from_slice(&transaction_hash)) + .get_transaction_receipt(B256::from_slice(&transaction_hash)) .await? .ok_or(CollectError::CollectError("transaction receipt not found".to_string()))? - .logs) + .inner + .logs() + .to_vec()) } /// Return output data of a contract call pub async fn call2( &self, - address: H160, + address: Address, call_data: Vec, block_number: BlockNumber, ) -> Result { let transaction = TransactionRequest { to: Some(address.into()), - data: Some(call_data.into()), + input: TransactionInput::new(call_data.into()), ..Default::default() }; let _permit = self.permit_request().await; - let tx: ethers::core::types::transaction::eip2718::TypedTransaction = transaction.into(); - source_provider!(self, call(&tx, Some(block_number.into()))) - .await - .map_err(CollectError::ProviderError) + Self::map_err(self.provider.call(&transaction).block(block_number.into()).await) } /// Return output data of a contract call pub async fn trace_call2( &self, - address: H160, + address: Address, call_data: Vec, trace_type: Vec, block_number: Option, - ) -> Result { + ) -> Result { let transaction = TransactionRequest { to: Some(address.into()), - data: Some(call_data.into()), + input: TransactionInput::new(call_data.into()), ..Default::default() }; let _permit = self.permit_request().await; - source_provider!(self, trace_call(transaction, trace_type, block_number)) - .await - .map_err(CollectError::ProviderError) + if block_number.is_some() { + Self::map_err( + self.provider + .trace_call(&transaction, &trace_type) + .block_id(block_number.unwrap().into()) + .await, + ) + } else { + Self::map_err(self.provider.trace_call(&transaction, &trace_type).await) + } } /// get geth debug block traces @@ -552,19 +528,28 @@ impl Source { block_number: u32, options: GethDebugTracingOptions, include_transaction_hashes: bool, - ) -> Result<(Option, Vec>>, Vec)> { + ) -> Result<(Option, Vec>>, Vec>)> { let traces = { let _permit = self.permit_request().await; - source_provider!(self, debug_trace_block_by_number(Some(block_number.into()), options)) - .await - .map_err(CollectError::ProviderError)? + Self::map_err( + self.provider + .debug_trace_block_by_number( + BlockNumberOrTag::Number(block_number.into()), + options, + ) + .await, + )? }; let txs = if include_transaction_hashes { - match self.get_block(block_number as u64).await? { - Some(block) => { - block.transactions.iter().map(|x| Some(x.as_bytes().to_vec())).collect() - } + match self.get_block(block_number as u64, BlockTransactionsKind::Hashes).await? { + Some(block) => block + .transactions + .as_hashes() + .unwrap() + .iter() + .map(|x| Some(x.to_vec())) + .collect(), None => { return Err(CollectError::CollectError( "could not get block for txs".to_string(), @@ -593,8 +578,21 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Unknown(value) => calls.push(value), - _ => return Err(CollectError::CollectError("invalid trace result".to_string())), + TraceResult::Success { result, tx_hash } => match result { + GethTrace::JS(value) => calls.push(value), + _ => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}", + tx_hash + ))) + } + }, + TraceResult::Error { error, tx_hash } => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}: {}", + tx_hash, error + ))) + } } } Ok((block, txs, calls)) @@ -613,8 +611,21 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::Default(frame)) => calls.push(frame), - _ => return Err(CollectError::CollectError("invalid trace result".to_string())), + TraceResult::Success { result, tx_hash } => match result { + GethTrace::Default(frame) => calls.push(frame), + _ => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}", + tx_hash + ))) + } + }, + TraceResult::Error { error, tx_hash } => { + return Err(CollectError::CollectError(format!( + "inalid trace result in tx {:?}: {}", + tx_hash, error + ))); + } } } Ok((block, txs, calls)) @@ -634,11 +645,27 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::FourByteTracer(FourByteFrame(frame))) => { - calls.push(frame) + // GethTrace::Known(GethTraceFrame::FourByteTracer(FourByteFrame(frame))) => { + // calls.push(frame) + // } + // GethTrace::Known(GethTraceFrame::NoopTracer(_)) => {} + // _ => return Err(CollectError::CollectError("invalid trace result".to_string())), + TraceResult::Success { result, tx_hash } => match result { + GethTrace::FourByteTracer(frame) => calls.push(frame.0), + GethTrace::NoopTracer(_) => {} + _ => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}", + tx_hash + ))) + } + }, + TraceResult::Error { error, tx_hash } => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}: {}", + tx_hash, error + ))); } - GethTrace::Known(GethTraceFrame::NoopTracer(_)) => {} - _ => return Err(CollectError::CollectError("invalid trace result".to_string())), } } Ok((block, txs, calls)) @@ -649,7 +676,7 @@ impl Source { &self, block_number: u32, include_transaction_hashes: bool, - ) -> Result<(Option, Vec>>, Vec>)> { + ) -> Result<(Option, Vec>>, Vec>)> { let tracer = GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::PreStateTracer); let options = GethDebugTracingOptions { tracer: Some(tracer), ..Default::default() }; let (block, txs, traces) = @@ -658,10 +685,25 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::PreStateTracer(PreStateFrame::Default( - PreStateMode(frame), - ))) => calls.push(frame), - _ => return Err(CollectError::CollectError("invalid trace result".to_string())), + // GethTrace::Known(GethTraceFrame::PreStateTracer(PreStateFrame::Default( + // PreStateMode(frame), + // ))) => calls.push(frame), + // _ => return Err(CollectError::CollectError("invalid trace result".to_string())), + TraceResult::Success { result, tx_hash } => match result { + GethTrace::PreStateTracer(PreStateFrame::Default(frame)) => calls.push(frame.0), + _ => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}", + tx_hash + ))) + } + }, + TraceResult::Error { error, tx_hash } => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}: {}", + tx_hash, error + ))); + } } } Ok((block, txs, calls)) @@ -674,22 +716,37 @@ impl Source { include_transaction_hashes: bool, ) -> Result<(Option, Vec>>, Vec)> { let tracer = GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::CallTracer); - let config = GethDebugTracerConfig::BuiltInTracer( - GethDebugBuiltInTracerConfig::CallTracer(CallConfig { ..Default::default() }), - ); - let options = GethDebugTracingOptions { - tracer: Some(tracer), - tracer_config: Some(config), - ..Default::default() - }; + // let config = GethDebugTracerConfig::BuiltInTracer( + // GethDebugBuiltInTracerConfig::CallTracer(CallConfig { ..Default::default() }), + // ); + let options = GethDebugTracingOptions::default() + .with_tracer(tracer) + .with_call_config(CallConfig::default()); let (block, txs, traces) = self.geth_debug_trace_block(block_number, options, include_transaction_hashes).await?; let mut calls = Vec::new(); for trace in traces.into_iter() { + // match trace { + // GethTrace::Known(GethTraceFrame::CallTracer(call_frame)) => + // calls.push(call_frame), _ => return + // Err(CollectError::CollectError("invalid trace result".to_string())), } match trace { - GethTrace::Known(GethTraceFrame::CallTracer(call_frame)) => calls.push(call_frame), - _ => return Err(CollectError::CollectError("invalid trace result".to_string())), + TraceResult::Success { result, tx_hash } => match result { + GethTrace::CallTracer(frame) => calls.push(frame), + _ => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}", + tx_hash + ))) + } + }, + TraceResult::Error { error, tx_hash } => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}: {}", + tx_hash, error + ))); + } } } Ok((block, txs, calls)) @@ -702,30 +759,41 @@ impl Source { include_transaction_hashes: bool, ) -> Result<(Option, Vec>>, Vec)> { let tracer = GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::PreStateTracer); - let config = GethDebugTracerConfig::BuiltInTracer( - GethDebugBuiltInTracerConfig::PreStateTracer(PreStateConfig { diff_mode: Some(true) }), - ); - let options = GethDebugTracingOptions { - tracer: Some(tracer), - tracer_config: Some(config), - ..Default::default() - }; + // let config = GethDebugTracerConfig::BuiltInTracer( + // GethDebugBuiltInTracerConfig::PreStateTracer(PreStateConfig { diff_mode: Some(true) + // }), + let options = GethDebugTracingOptions::default() + .with_prestate_config(PreStateConfig { + diff_mode: Some(true), + disable_code: None, + disable_storage: None, + }) + .with_tracer(tracer); let (block, txs, traces) = self.geth_debug_trace_block(block_number, options, include_transaction_hashes).await?; let mut diffs = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::PreStateTracer(PreStateFrame::Diff(diff))) => { - diffs.push(diff) - } - GethTrace::Unknown(ethers::utils::__serde_json::Value::Object(map)) => { - let diff = parse_geth_diff_object(map)?; - diffs.push(diff) - } - _ => { - println!("{:?}", trace); - return Err(CollectError::CollectError("invalid trace result".to_string())); + TraceResult::Success { result, tx_hash } => match result { + GethTrace::PreStateTracer(PreStateFrame::Diff(diff)) => diffs.push(diff), + GethTrace::JS(serde_json::Value::Object(map)) => { + let diff = parse_geth_diff_object(map)?; + diffs.push(diff); + } + _ => { + println!("{:?}", result); + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}", + tx_hash + ))); + } + }, + TraceResult::Error { error, tx_hash } => { + return Err(CollectError::CollectError(format!( + "invalid trace result in tx {:?}: {}", + tx_hash, error + ))); } } } @@ -739,19 +807,20 @@ impl Source { options: GethDebugTracingOptions, include_block_number: bool, ) -> Result<(Option, Vec>>, Vec)> { - let ethers_tx = H256::from_slice(&transaction_hash); + let ethers_tx = B256::from_slice(&transaction_hash); let trace = { let _permit = self.permit_request().await; - source_provider!(self, debug_trace_transaction(ethers_tx, options)) + self.provider + .debug_trace_transaction(ethers_tx, options) .await .map_err(CollectError::ProviderError)? }; let traces = vec![trace]; let block_number = if include_block_number { - match self.get_transaction(ethers_tx).await? { - Some(tx) => tx.block_number.map(|x| x.as_u32()), + match self.get_transaction_by_hash(ethers_tx).await? { + Some(tx) => tx.block_number.map(|x| x as u32), None => { return Err(CollectError::CollectError( "could not get block for txs".to_string(), @@ -781,7 +850,7 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Unknown(value) => calls.push(value), + GethTrace::JS(value) => calls.push(value), _ => return Err(CollectError::CollectError("invalid trace result".to_string())), } } @@ -802,7 +871,7 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::Default(frame)) => calls.push(frame), + GethTrace::Default(frame) => calls.push(frame), _ => return Err(CollectError::CollectError("invalid trace result".to_string())), } } @@ -824,9 +893,7 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::FourByteTracer(FourByteFrame(frame))) => { - calls.push(frame) - } + GethTrace::FourByteTracer(frame) => calls.push(frame.0), _ => return Err(CollectError::CollectError("invalid trace result".to_string())), } } @@ -838,7 +905,7 @@ impl Source { &self, transaction_hash: Vec, include_block_number: bool, - ) -> Result<(Option, Vec>>, Vec>)> { + ) -> Result<(Option, Vec>>, Vec>)> { let tracer = GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::PreStateTracer); let options = GethDebugTracingOptions { tracer: Some(tracer), ..Default::default() }; let (block, txs, traces) = self @@ -848,9 +915,7 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::PreStateTracer(PreStateFrame::Default( - PreStateMode(frame), - ))) => calls.push(frame), + GethTrace::PreStateTracer(PreStateFrame::Default(frame)) => calls.push(frame.0), _ => return Err(CollectError::CollectError("invalid trace result".to_string())), } } @@ -864,14 +929,12 @@ impl Source { include_block_number: bool, ) -> Result<(Option, Vec>>, Vec)> { let tracer = GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::CallTracer); - let config = GethDebugTracerConfig::BuiltInTracer( - GethDebugBuiltInTracerConfig::CallTracer(CallConfig { ..Default::default() }), - ); - let options = GethDebugTracingOptions { - tracer: Some(tracer), - tracer_config: Some(config), - ..Default::default() - }; + // let config = GethDebugTracerConfig::BuiltInTracer( + // GethDebugBuiltInTracerConfig::CallTracer(CallConfig { ..Default::default() }), + // ); + let options = GethDebugTracingOptions::default() + .with_tracer(tracer) + .with_call_config(CallConfig::default()); let (block, txs, traces) = self .geth_debug_trace_transaction(transaction_hash, options, include_block_number) .await?; @@ -879,7 +942,9 @@ impl Source { let mut calls = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::CallTracer(call_frame)) => calls.push(call_frame), + // GethTrace::Known(GethTraceFrame::CallTracer(call_frame)) => + // calls.push(call_frame), + GethTrace::CallTracer(frame) => calls.push(frame), _ => return Err(CollectError::CollectError("invalid trace result".to_string())), } } @@ -893,14 +958,12 @@ impl Source { include_transaction_hashes: bool, ) -> Result<(Option, Vec>>, Vec)> { let tracer = GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::PreStateTracer); - let config = GethDebugTracerConfig::BuiltInTracer( - GethDebugBuiltInTracerConfig::PreStateTracer(PreStateConfig { diff_mode: Some(true) }), + // let config = GethDebugTracerConfig::BuiltInTracer( + // GethDebugBuiltInTracerConfig::PreStateTracer(PreStateConfig { diff_mode: Some(true) + // }), ); + let options = GethDebugTracingOptions::default().with_tracer(tracer).with_prestate_config( + PreStateConfig { diff_mode: Some(true), disable_code: None, disable_storage: None }, ); - let options = GethDebugTracingOptions { - tracer: Some(tracer), - tracer_config: Some(config), - ..Default::default() - }; let (block, txs, traces) = self .geth_debug_trace_transaction(transaction_hash, options, include_transaction_hashes) .await?; @@ -908,9 +971,10 @@ impl Source { let mut diffs = Vec::new(); for trace in traces.into_iter() { match trace { - GethTrace::Known(GethTraceFrame::PreStateTracer(PreStateFrame::Diff(diff))) => { - diffs.push(diff) - } + // GethTrace::Known(GethTraceFrame::PreStateTracer(PreStateFrame::Diff(diff))) => { + // diffs.push(diff) + // } + GethTrace::PreStateTracer(PreStateFrame::Diff(diff)) => diffs.push(diff), _ => return Err(CollectError::CollectError("invalid trace result".to_string())), } } @@ -930,7 +994,7 @@ impl Source { permit } - fn map_err(res: ::core::result::Result) -> Result { + fn map_err(res: ::core::result::Result>) -> Result { res.map_err(CollectError::ProviderError) } } @@ -938,12 +1002,10 @@ impl Source { use crate::err; use std::collections::BTreeMap; -fn parse_geth_diff_object( - map: ethers::utils::__serde_json::Map, -) -> Result { - let pre: BTreeMap = serde_json::from_value(map["pre"].clone()) +fn parse_geth_diff_object(map: serde_json::Map) -> Result { + let pre: BTreeMap = serde_json::from_value(map["pre"].clone()) .map_err(|_| err("cannot deserialize pre diff"))?; - let post: BTreeMap = serde_json::from_value(map["post"].clone()) + let post: BTreeMap = serde_json::from_value(map["post"].clone()) .map_err(|_| err("cannot deserialize pre diff"))?; Ok(DiffMode { pre, post }) diff --git a/crates/python/rust/collect_adapter.rs b/crates/python/rust/collect_adapter.rs index 0f8e4672..d17fa26b 100644 --- a/crates/python/rust/collect_adapter.rs +++ b/crates/python/rust/collect_adapter.rs @@ -31,6 +31,7 @@ use cryo_freeze::collect; chunk_order = None, max_retries = 10, initial_backoff = 500, + compute_units_per_second = 50, dry = false, chunk_size = 1000, n_chunks = None, @@ -92,6 +93,7 @@ pub fn _collect( chunk_order: Option, max_retries: u32, initial_backoff: u64, + compute_units_per_second: u64, dry: bool, chunk_size: u64, n_chunks: Option, @@ -157,6 +159,7 @@ pub fn _collect( chunk_order, max_retries, initial_backoff, + compute_units_per_second, dry, chunk_size, n_chunks, diff --git a/crates/python/rust/freeze_adapter.rs b/crates/python/rust/freeze_adapter.rs index 5b7616ea..f40317a2 100644 --- a/crates/python/rust/freeze_adapter.rs +++ b/crates/python/rust/freeze_adapter.rs @@ -28,6 +28,7 @@ use cryo_cli::{run, Args}; chunk_order = None, max_retries = 10, initial_backoff = 500, + compute_units_per_second = 50, dry = false, chunk_size = 1000, n_chunks = None, @@ -89,6 +90,7 @@ pub fn _freeze( chunk_order: Option, max_retries: u32, initial_backoff: u64, + compute_units_per_second: u64, dry: bool, chunk_size: u64, n_chunks: Option, @@ -149,6 +151,7 @@ pub fn _freeze( chunk_order, max_retries, initial_backoff, + compute_units_per_second, dry, chunk_size, n_chunks, diff --git a/crates/to_df/src/lib.rs b/crates/to_df/src/lib.rs index 97f10c2b..6ab93323 100644 --- a/crates/to_df/src/lib.rs +++ b/crates/to_df/src/lib.rs @@ -98,47 +98,47 @@ pub fn to_df(attrs: TokenStream, input: TokenStream) -> TokenStream { } } - use ethers_core::abi::ParamType; - // Write columns even if there are no values decoded - indicates empty dataframe let chunk_len = self.n_rows; if self.event_cols.is_empty() { for param in decoder.event.inputs.iter() { let name = "event__".to_string() + param.name.as_str(); let name = name.as_str(); - match param.kind { - ParamType::Address => { + let ty = DynSolType::parse(¶m.ty).unwrap(); + match ty { + DynSolType::Address => { match schema.binary_type { ColumnEncoding::Binary => cols.push(Series::new(name, Vec::>::new())), ColumnEncoding::Hex => cols.push(Series::new(name, Vec::::new())), } }, - ParamType::Bytes => { + DynSolType::Bytes => { match schema.binary_type { ColumnEncoding::Binary => cols.push(Series::new(name, Vec::>::new())), ColumnEncoding::Hex => cols.push(Series::new(name, Vec::::new())), } }, - ParamType::Int(bits) => { + DynSolType::Int(bits) => { if bits <= 64 { cols.push(Series::new(name, Vec::::new())) } else { create_empty_u256_columns(&mut cols, name, &u256_types, &schema.binary_type) } }, - ParamType::Uint(bits) => { + DynSolType::Uint(bits) => { if bits <= 64 { cols.push(Series::new(name, Vec::::new())) } else { create_empty_u256_columns(&mut cols, name, &u256_types, &schema.binary_type) } }, - ParamType::Bool => cols.push(Series::new(name, Vec::::new())), - ParamType::String => cols.push(Series::new(name, Vec::::new())), - ParamType::Array(_) => return Err(err("could not generate Array column")), - ParamType::FixedBytes(_) => return Err(err("could not generate FixedBytes column")), - ParamType::FixedArray(_, _) => return Err(err("could not generate FixedArray column")), - ParamType::Tuple(_) => return Err(err("could not generate Tuple column")), + DynSolType::Bool => cols.push(Series::new(name, Vec::::new())), + DynSolType::String => cols.push(Series::new(name, Vec::::new())), + DynSolType::Array(_) => return Err(err("could not generate Array column")), + DynSolType::FixedBytes(_) => return Err(err("could not generate FixedBytes column")), + DynSolType::FixedArray(_, _) => return Err(err("could not generate FixedArray column")), + DynSolType::Tuple(_) => return Err(err("could not generate Tuple column")), + DynSolType::Function => return Err(err("could not generate Function column")), _ => (), } }