diff --git a/Cargo.lock b/Cargo.lock index bf43502b..0f1e242e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,6 +34,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -67,25 +68,40 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" +checksum = "a205d0cbb7bfdf9f4fd4b0ec842bc4c5f926e8c14ec3072d3fd75dd363baf1e0" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-serde", + "alloy-trie", "auto_impl", "c-kzg", "derive_more", "serde", ] +[[package]] +name = "alloy-consensus-any" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993c34090a3f281cb746fd1604520cf21f8407ffbeb006aaa34c0556bffa718e" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", +] + [[package]] name = "alloy-contract" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" +checksum = "aec7945dff98ba68489aa6da455bf66f6c0fee8157df06747fbae7cb03c368e2" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -98,14 +114,14 @@ dependencies = [ "alloy-transport", "futures", "futures-util", - "thiserror 1.0.69", + "thiserror 2.0.9", ] [[package]] name = "alloy-dyn-abi" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cf633ae9a1f0c82fdb9e559ed2be1c8e415c3e48fc47e1feaf32c6078ec0cdd" +checksum = "41056bde53ae10ffbbf11618efbe1e0290859e5eab0fe9ef82ebdb62f12a866f" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -131,21 +147,22 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.1.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" dependencies = [ "alloy-primitives", "alloy-rlp", + "derive_more", "k256", "serde", ] [[package]] name = "alloy-eips" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" +checksum = "d1d9907c29ce622946759bf4fd3418166bfeae76c1c544b8081c7be3acd9b4be" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -161,9 +178,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a500037938085feed8a20dbfc8fce58c599db68c948cfae711147175dee392c" +checksum = "c357da577dfb56998d01f574d81ad7a1958d248740a7981b205d69d65a7da404" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -173,29 +190,31 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" +checksum = "39a786ce6bc7539dc30cabac6b7875644247c9e7d780e71a9f254d42ebdc013c" dependencies = [ "alloy-primitives", "alloy-sol-types", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.9", "tracing", ] [[package]] name = "alloy-network" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" +checksum = "99051f82f77159d5bee06108f33cffee02849e2861fc500bf74213aa2ae8a26e" dependencies = [ "alloy-consensus", + "alloy-consensus-any", "alloy-eips", "alloy-json-rpc", "alloy-network-primitives", "alloy-primitives", + "alloy-rpc-types-any", "alloy-rpc-types-eth", "alloy-serde", "alloy-signer", @@ -203,14 +222,16 @@ dependencies = [ "async-trait", "auto_impl", "futures-utils-wasm", - "thiserror 1.0.69", + "serde", + "serde_json", + "thiserror 2.0.9", ] [[package]] name = "alloy-network-primitives" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" +checksum = "d2aff127863f8279921397be8af0ac3f05a8757d5c4c972b491c278518fa07c7" dependencies = [ "alloy-consensus", "alloy-eips", @@ -221,9 +242,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aeeb5825c2fc8c2662167058347cd0cafc3cb15bcb5cdb1758a63c2dca0409e" +checksum = "6259a506ab13e1d658796c31e6e39d2e2ee89243bcc505ddc613b35732e0a430" dependencies = [ "alloy-rlp", "bytes", @@ -250,9 +271,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" +checksum = "0280a4f68e0cefde9449ee989a248230efbe3f95255299d2a7a92009e154629d" dependencies = [ "alloy-chains", "alloy-consensus", @@ -272,14 +293,17 @@ dependencies = [ "futures", "futures-utils-wasm", "lru", + "parking_lot", "pin-project", "reqwest", + "schnellru", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.9", "tokio", "tracing", "url", + "wasmtimer", ] [[package]] @@ -306,9 +330,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" +checksum = "b6fc8b0f68619cfab3a2e15dca7b80ab266f78430bb4353dec546528e04b7449" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -324,13 +348,14 @@ dependencies = [ "tower", "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" +checksum = "986f23fe42ac95832901a24b93c20f7ed2b9644394c02b86222801230da60041" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -339,11 +364,22 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-rpc-types-any" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e3aa433d3657b42e98e257ee6fa201f5c853245648a33da8fbb7497a5008bf" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + [[package]] name = "alloy-rpc-types-engine" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0285c4c09f838ab830048b780d7f4a4f460f309aa1194bb049843309524c64c" +checksum = "30814f8b9ac10219fb77fe42c277a0ffa1c369fbc3961f14d159f51fb221966e" dependencies = [ "alloy-consensus", "alloy-eips", @@ -359,11 +395,12 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" +checksum = "0643cc497a71941f526454fe4fecb47e9307d3a7b6c05f70718a0341643bcc79" dependencies = [ "alloy-consensus", + "alloy-consensus-any", "alloy-eips", "alloy-network-primitives", "alloy-primitives", @@ -378,9 +415,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" +checksum = "ea61b049d7ecc66a29f107970dae493d0908e366048f7484a1ca9b02c85f9b2b" dependencies = [ "alloy-primitives", "serde", @@ -389,23 +426,23 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" +checksum = "93461b0e79c2ddd791fec5f369ab5c2686a33bbb03530144972edf5248f8a2c7" dependencies = [ "alloy-primitives", "async-trait", "auto_impl", "elliptic-curve", "k256", - "thiserror 1.0.69", + "thiserror 2.0.9", ] [[package]] name = "alloy-signer-local" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" +checksum = "6f08ec1bfa433f9e9f7c5af05af07e5cf86d27d93170de76b760e63b925f1c9c" dependencies = [ "alloy-consensus", "alloy-network", @@ -414,14 +451,14 @@ dependencies = [ "async-trait", "k256", "rand", - "thiserror 1.0.69", + "thiserror 2.0.9", ] [[package]] name = "alloy-sol-macro" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0279d09463a4695788a3622fd95443625f7be307422deba4b55dd491a9c7a1" +checksum = "d9d64f851d95619233f74b310f12bcf16e0cbc27ee3762b6115c14a84809280a" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -433,9 +470,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feea540fc8233df2ad1156efd744b2075372f43a8f942a68b3b19c8a00e2c12" +checksum = "6bf7ed1574b699f48bf17caab4e6e54c6d12bc3c006ab33d58b1e227c1c3559f" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", @@ -452,9 +489,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0ad281f3d1b613af814b66977ee698e443d4644a1510962d0241f26e0e53ae" +checksum = "8c02997ccef5f34f9c099277d4145f183b422938ed5322dc57a089fe9b9ad9ee" dependencies = [ "alloy-json-abi", "const-hex", @@ -469,9 +506,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96eff16c797438add6c37bb335839d015b186c5421ee5626f5559a7bfeb38ef5" +checksum = "ce13ff37285b0870d0a0746992a4ae48efaf34b766ae4c2640fa15e5305f8e73" dependencies = [ "serde", "winnow", @@ -479,9 +516,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff34e0682d6665da243a3e81da96f07a2dd50f7e64073e382b1a141f5a2a2f6" +checksum = "1174cafd6c6d810711b4e00383037bdb458efc4fe3dbafafa16567e0320c54d8" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -492,9 +529,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" +checksum = "baf656f983e14812df65b5aee37e7b37535f68a848295e6ed736b2054a405cb7" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -502,18 +539,19 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.9", "tokio", "tower", "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-transport-http" -version = "0.4.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" +checksum = "ec938d51a47b7953b1c0fd8ddeb89a29eb113cd4908dfc4e01c7893b252d669f" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -524,6 +562,22 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-trie" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a5fd8fea044cc9a8c8a50bb6f28e31f0385d820f116c5b98f6f4e55d6e5590b" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec", + "derive_more", + "nybbles", + "serde", + "smallvec", + "tracing", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -729,6 +783,9 @@ name = "arrayvec" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] [[package]] name = "askama" @@ -967,6 +1024,22 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -1267,9 +1340,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487981fa1af147182687064d0a2c336586d337a606595ced9ffb0c685c250c73" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -1719,7 +1792,7 @@ dependencies = [ "hex", "revm", "revm-primitives", - "thiserror 1.0.69", + "thiserror 2.0.9", ] [[package]] @@ -2068,14 +2141,17 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +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 = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] [[package]] name = "hashbrown" @@ -2110,6 +2186,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "hex-literal" version = "0.4.1" @@ -2855,9 +2940,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "metrics" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884adb57038347dfbaf2d5065887b6cf4312330dc8e94bc30a1a839bd79d3261" +checksum = "7a7deb012b3b2767169ff203fadb4c6b0b82b947512e5eb9e0b78c2e186ad9e3" dependencies = [ "ahash", "portable-atomic", @@ -2865,9 +2950,9 @@ dependencies = [ [[package]] name = "metrics-exporter-prometheus" -version = "0.15.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" +checksum = "85b6f8152da6d7892ff1b7a1c0fa3f435e92b5918ad67035c3bb432111d9a29b" dependencies = [ "base64 0.22.1", "indexmap 2.6.0", @@ -2879,15 +2964,14 @@ dependencies = [ [[package]] name = "metrics-util" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4259040465c955f9f2f1a4a8a16dc46726169bca0f88e8fb2dbeced487c3e828" +checksum = "15b482df36c13dd1869d73d14d28cd4855fbd6cfc32294bee109908a9f4a4ed7" dependencies = [ "crossbeam-epoch", "crossbeam-utils", - "hashbrown 0.14.5", + "hashbrown 0.15.2", "metrics", - "num_cpus", "quanta", "sketches-ddsketch", ] @@ -3103,6 +3187,17 @@ dependencies = [ "syn 2.0.89", ] +[[package]] +name = "nybbles" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23" +dependencies = [ + "const-hex", + "serde", + "smallvec", +] + [[package]] name = "object" version = "0.36.5" @@ -3513,7 +3608,7 @@ dependencies = [ "rustc-hash", "rustls 0.23.19", "socket2", - "thiserror 2.0.3", + "thiserror 2.0.9", "tokio", "tracing", ] @@ -3532,7 +3627,7 @@ dependencies = [ "rustls 0.23.19", "rustls-pki-types", "slab", - "thiserror 2.0.3", + "thiserror 2.0.9", "tinyvec", "tracing", "web-time", @@ -3770,9 +3865,9 @@ dependencies = [ [[package]] name = "revm" -version = "14.0.3" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641702b12847f9ed418d552f4fcabe536d867a2c980e96b6e7e25d7b992f929f" +checksum = "15689a3c6a8d14b647b4666f2e236ef47b5a5133cdfd423f545947986fff7013" dependencies = [ "auto_impl", "cfg-if", @@ -3785,9 +3880,9 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "10.0.3" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5e14002afae20b5bf1566f22316122f42f57517000e559c55b25bf7a49cba2" +checksum = "74e3f11d0fed049a4a10f79820c59113a79b38aed4ebec786a79d5c667bfeb51" dependencies = [ "revm-primitives", "serde", @@ -3795,9 +3890,9 @@ dependencies = [ [[package]] name = "revm-precompile" -version = "11.0.3" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3198c06247e8d4ad0d1312591edf049b0de4ddffa9fecb625c318fd67db8639b" +checksum = "e381060af24b750069a2b2d2c54bba273d84e8f5f9e8026fc9262298e26cc336" dependencies = [ "aurora-engine-modexp", "c-kzg", @@ -3806,16 +3901,16 @@ dependencies = [ "once_cell", "revm-primitives", "ripemd", - "secp256k1", + "secp256k1 0.29.1", "sha2", "substrate-bn", ] [[package]] name = "revm-primitives" -version = "10.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1525851a03aff9a9d6a1d018b414d76252d6802ab54695b27093ecd7e7a101" +checksum = "3702f132bb484f4f0d0ca4f6fbde3c82cfd745041abbedd6eda67730e1868ef0" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -4112,6 +4207,17 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "schnellru" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" +dependencies = [ + "ahash", + "cfg-if", + "hashbrown 0.13.2", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -4142,6 +4248,17 @@ dependencies = [ "secp256k1-sys", ] +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand", + "secp256k1-sys", +] + [[package]] name = "secp256k1-sys" version = "0.10.1" @@ -4464,12 +4581,12 @@ dependencies = [ "log", "num-bigint", "rand", - "secp256k1", + "secp256k1 0.30.0", "serde", "sha3 0.10.8", "shielder-circuits", "static_assertions", - "thiserror 1.0.69", + "thiserror 2.0.9", "tracing", ] @@ -4551,9 +4668,9 @@ dependencies = [ [[package]] name = "sketches-ddsketch" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" +checksum = "c1e9a774a6c28142ac54bb25d25562e6bcf957493a184f15ad4eebccb23e410a" [[package]] name = "slab" @@ -4569,6 +4686,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -4719,9 +4839,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdaa7b9e815582ba343a20c66627437cf45f1c6fba7f69772cbfd1358c7e197" +checksum = "219389c1ebe89f8333df8bdfb871f6631c552ff399c23cac02480b6088aad8f0" dependencies = [ "paste", "proc-macro2", @@ -4844,11 +4964,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.3" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl 2.0.9", ] [[package]] @@ -4864,9 +4984,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.3" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", @@ -5461,6 +5581,20 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmtimer" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + [[package]] name = "web-sys" version = "0.3.70" diff --git a/Cargo.toml b/Cargo.toml index 02769830..2b7558c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,17 +12,17 @@ categories = ["cryptography"] repository = "https://github.com/Cardinal-Cryptography/zkOS-monorepo" [workspace.dependencies] -alloy-contract = { version = "0.4.2" } -alloy-eips = { version = "0.4.2" } -alloy-network = { version = "0.4.2" } +alloy-contract = { version = "0.8.1" } +alloy-eips = { version = "0.8.1" } +alloy-network = { version = "0.8.1" } alloy-primitives = { version = "0.8.5" } -alloy-provider = { version = "0.4.2" } -alloy-rpc-types = { version = "0.4.2" } -alloy-rpc-types-eth = { version = "0.4.2" } -alloy-signer = { version = "0.4.2" } -alloy-signer-local = { version = "0.4.2" } +alloy-provider = { version = "0.8.1" } +alloy-rpc-types = { version = "0.8.1" } +alloy-rpc-types-eth = { version = "0.8.1" } +alloy-signer = { version = "0.8.1" } +alloy-signer-local = { version = "0.8.1" } alloy-sol-types = { version = "0.8.5" } -alloy-transport = { version = "0.4.2" } +alloy-transport = { version = "0.8.1" } anyhow = { version = "1.0.86", default-features = false } askama = { version = "0.12.0", default-features = false } async-channel = { version = "2.3.1" } @@ -39,8 +39,8 @@ inquire = { version = "0.7.5" } itertools = { version = "0.13.0" } lazy_static = { version = "1.5.0" } log = { version = "0.4.22" } -metrics = { version = "0.23.0", default-features = false } -metrics-exporter-prometheus = { version = "0.15.3", default-features = false } +metrics = { version = "0.24.1", default-features = false } +metrics-exporter-prometheus = { version = "0.16.0", default-features = false } num-bigint = { version = "0.4.3" } openssl = { version = "0.10.59" } rand = { version = "0.8.5" } @@ -48,12 +48,12 @@ rand_chacha = { version = "0.3.1" } rand_core = { version = "0.6.4" } rayon = { version = "1.8" } reqwest = { version = "0.12.5" } -revm = { version = "14.0.3", default-features = false } -revm-primitives = { version = "10.0.0", default-features = false } +revm = { version = "18.0.0", default-features = false } +revm-primitives = { version = "14.0.0", default-features = false } rstest = "0.23.0" ruint = { version = "1" } rust-argon2 = { version = "2.1.0" } -secp256k1 = { version = "0.29.1" } +secp256k1 = { version = "0.30.0" } serde = { version = "1.0.203" } serde_json = { version = "1.0.120" } sha2 = { version = "0.10.8" } @@ -63,7 +63,7 @@ shellexpand = { version = "3.1.0" } shielder-circuits = { git = "ssh://git@github.com/Cardinal-Cryptography/zkOS-circuits", rev = "7743b2f" } static_assertions = { version = "1.1.0" } testcontainers = { version = "0.19.0" } -thiserror = { version = "1.0.61" } +thiserror = { version = "2.0.9" } tokio = { version = "1.38.0" } tower-http = { version = "0.6.1" } tracing = { version = "0.1.40" } diff --git a/contracts/MerkleTree.sol b/contracts/MerkleTree.sol index 4a62c7d6..d7c51342 100644 --- a/contracts/MerkleTree.sol +++ b/contracts/MerkleTree.sol @@ -70,12 +70,13 @@ abstract contract MerkleTree is Initializable { } /* - * Given an index of a leaf return the path from a leaf index to the root, - * omitting the root and leaf for gas efficiency, - * as they can be derived from hashing their children. + * Given an index of a leaf return the Merkle path from this leaf to the root. + * * Leaves are indexed from 0. - * Path is an array of length TREE_HEIGHT*ARITY+1, where the first TREE_HEIGHT*ARITY elements are the siblings of the path, - * and the last element is the root. + * + * Path is an array of length TREE_HEIGHT*ARITY+1, where the first TREE_HEIGHT*ARITY elements is the full path + * (ancestors with their siblings, ordered) and the last element is the root. + * * If tree looks like this: * l_3 = hash(l_1, l_2) * l_5 = hash(l_3, l_4) @@ -96,21 +97,15 @@ abstract contract MerkleTree is Initializable { uint256[] memory path = new uint256[](TREE_HEIGHT * ARITY + 1); uint256 parent = 0; - for (uint256 i = 0; i < TREE_HEIGHT; ) { + for (uint256 i = 0; i < TREE_HEIGHT; ++i) { unchecked { parent = (index + ARITY - 2) / ARITY; } - for (uint256 j = 0; j < ARITY; ) { + for (uint256 j = 0; j < ARITY; ++j) { path[i * ARITY + j] = $.notes[parent * ARITY + j - (ARITY - 2)]; - unchecked { - j++; - } } index = parent; - unchecked { - i++; - } } path[TREE_HEIGHT * ARITY] = $.root; @@ -132,23 +127,17 @@ abstract contract MerkleTree is Initializable { uint256[ARITY] memory subtrees; $.notes[index] = note; - for (uint256 i = 0; i < TREE_HEIGHT; ) { + for (uint256 i = 0; i < TREE_HEIGHT; ++i) { unchecked { parent = (index + ARITY - 2) / ARITY; } - for (uint256 j = 0; j < ARITY; ) { + for (uint256 j = 0; j < ARITY; ++j) { subtrees[j] = $.notes[parent * ARITY + j - (ARITY - 2)]; - unchecked { - j++; - } } note = Poseidon2.hash(subtrees); $.notes[parent] = note; index = parent; - unchecked { - i++; - } } $.root = note; $.nextFreeLeafId += 1; diff --git a/contracts/Shielder.sol b/contracts/Shielder.sol index ae4293f1..0864397b 100644 --- a/contracts/Shielder.sol +++ b/contracts/Shielder.sol @@ -204,13 +204,7 @@ contract Shielder is uint256 index = _addNote(newNote); _registerNullifier(oldNullifierHash); - emit DepositNative( - CONTRACT_VERSION, - idHiding, - msg.value, - newNote, - index - ); + emit DepositNative(CONTRACT_VERSION, idHiding, amount, newNote, index); } /* diff --git a/crates/shielder-cli/src/recovery.rs b/crates/shielder-cli/src/recovery.rs index 6b48bfa5..1a486135 100644 --- a/crates/shielder-cli/src/recovery.rs +++ b/crates/shielder-cli/src/recovery.rs @@ -1,7 +1,10 @@ use alloy_eips::BlockNumberOrTag; use alloy_primitives::{BlockHash, BlockNumber, U256}; -use alloy_provider::Provider; -use alloy_rpc_types_eth::Transaction; +use alloy_provider::{ + network::{primitives::BlockTransactionsKind, TransactionResponse}, + Provider, +}; +use alloy_rpc_types_eth::{Transaction, TransactionTrait}; use alloy_sol_types::SolCall; use anyhow::{anyhow, bail, Result}; use shielder_circuits::{poseidon::off_circuit::hash, F}; @@ -78,7 +81,10 @@ async fn find_shielder_transaction( account: &ShielderAccount, ) -> Result { let block = provider - .get_block_by_number(BlockNumberOrTag::Number(block_number), true) + .get_block_by_number( + BlockNumberOrTag::Number(block_number), + BlockTransactionsKind::Full, + ) .await? .ok_or(anyhow!("Block not found"))?; let txs = block @@ -93,7 +99,7 @@ async fn find_shielder_transaction( }; event.check_version().map_err(|_| anyhow!("Bad version"))?; let event_note = event.note(); - let action = ShielderAction::from((tx.hash, event)); + let action = ShielderAction::from((tx.tx_hash(), event)); let mut hypothetical_account = account.clone(); hypothetical_account.register_action(action.clone()); @@ -113,15 +119,15 @@ async fn try_get_shielder_event_for_tx( tx: &Transaction, block_hash: BlockHash, ) -> Result> { - let tx_data = tx.input.as_ref(); + let tx_data = tx.input(); let maybe_action = if newAccountNativeCall::abi_decode(tx_data, true).is_ok() { - let event = get_event::(provider, tx.hash, block_hash).await?; + let event = get_event::(provider, tx.tx_hash(), block_hash).await?; Some(ShielderContractEvents::NewAccountNative(event)) } else if depositNativeCall::abi_decode(tx_data, true).is_ok() { - let event = get_event::(provider, tx.hash, block_hash).await?; + let event = get_event::(provider, tx.tx_hash(), block_hash).await?; Some(ShielderContractEvents::DepositNative(event)) } else if withdrawNativeCall::abi_decode(tx_data, true).is_ok() { - let event = get_event::(provider, tx.hash, block_hash).await?; + let event = get_event::(provider, tx.tx_hash(), block_hash).await?; Some(ShielderContractEvents::WithdrawNative(event)) } else { None diff --git a/crates/shielder-relayer/run-relayer.sh b/crates/shielder-relayer/run-relayer.sh index 0049ba64..1048d88f 100755 --- a/crates/shielder-relayer/run-relayer.sh +++ b/crates/shielder-relayer/run-relayer.sh @@ -7,7 +7,6 @@ set -u # The following environment variables are required to run the Relayer service. Other configuration parameters # have their default fallback values. REQUIRED_RUN_VARS=( - "NODE_RPC_PORT" "NODE_RPC_URL" "FEE_DESTINATION_KEY" "RELAYER_SIGNING_KEYS" @@ -28,6 +27,10 @@ ARGS=( -u "${DOCKER_USER}" --name="${RELAYER_CONTAINER_NAME}" -e RUST_LOG=info + -e NODE_RPC_URL="${NODE_RPC_URL}" + -e FEE_DESTINATION_KEY="${FEE_DESTINATION_KEY}" + -e RELAYER_SIGNING_KEYS="${RELAYER_SIGNING_KEYS}" + -e SHIELDER_CONTRACT_ADDRESS="${SHIELDER_CONTRACT_ADDRESS}" ) # Add network args based on OS @@ -40,41 +43,25 @@ else fi if [[ -n "${RELAYER_PORT:-}" ]]; then - ARGS+=(-e RELAYER_PORT=${RELAYER_PORT}) -fi -if [[ -n "${NODE_RPC_URL:-}" ]]; then - if [[ "$OSTYPE" == "darwin"* ]]; then - ARGS+=(-e NODE_RPC_URL=http://host.docker.internal:${NODE_RPC_PORT}) - else - ARGS+=(-e NODE_RPC_URL=${NODE_RPC_URL}) - fi -fi -if [[ -n "${FEE_DESTINATION_KEY:-}" ]]; then - ARGS+=(-e FEE_DESTINATION_KEY=${FEE_DESTINATION_KEY}) -fi -if [[ -n "${RELAYER_SIGNING_KEYS:-}" ]]; then - ARGS+=(-e RELAYER_SIGNING_KEYS=${RELAYER_SIGNING_KEYS}) -fi -if [[ -n "${SHIELDER_CONTRACT_ADDRESS:-}" ]]; then - ARGS+=(-e SHIELDER_CONTRACT_ADDRESS=${SHIELDER_CONTRACT_ADDRESS}) + ARGS+=(-e RELAYER_PORT="${RELAYER_PORT}") fi if [[ -n "${DRY_RUNNING:-}" ]]; then - ARGS+=(-e DRY_RUNNING=${DRY_RUNNING}) + ARGS+=(-e DRY_RUNNING="${DRY_RUNNING}") fi if [[ -n "${NONCE_POLICY:-}" ]]; then - ARGS+=(-e NONCE_POLICY=${NONCE_POLICY}) + ARGS+=(-e NONCE_POLICY="${NONCE_POLICY}") fi if [[ -n "${RELAY_COUNT_FOR_RECHARGE:-}" ]]; then - ARGS+=(-e RELAY_COUNT_FOR_RECHARGE=${RELAY_COUNT_FOR_RECHARGE}) + ARGS+=(-e RELAY_COUNT_FOR_RECHARGE="${RELAY_COUNT_FOR_RECHARGE}") fi if [[ -n "${BALANCE_MONITOR_INTERVAL_SECS:-}" ]]; then - ARGS+=(-e BALANCE_MONITOR_INTERVAL_SECS=${BALANCE_MONITOR_INTERVAL_SECS}) + ARGS+=(-e BALANCE_MONITOR_INTERVAL_SECS="${BALANCE_MONITOR_INTERVAL_SECS}") fi if [[ -n "${TOTAL_FEE:-}" ]]; then - ARGS+=(-e TOTAL_FEE=${TOTAL_FEE}) + ARGS+=(-e TOTAL_FEE="${TOTAL_FEE}") fi if [[ -n "${RELAY_GAS:-}" ]]; then - ARGS+=(-e RELAY_GAS=${RELAY_GAS}) + ARGS+=(-e RELAY_GAS="${RELAY_GAS}") fi docker run --rm -d "${ARGS[@]}" "${RELAYER_DOCKER_IMAGE}"