From 184c02714aa59d68239d3578b1a53ff891c95255 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 12 Apr 2025 08:09:09 -0400 Subject: [PATCH] alloy-core 1.0, alloy 0.14, revm 0.22 (001) This moves to Rust 1.86 as were prior on Rust 1.81, and the new alloy dependencies require 1.82. The revm API changes were notable for us. Instead of relying on a modified call instruction (with deep introspection into the EVM design), we now use the more recent and now more prominent Inspector API. This: 1) Lets us perform far less introspection 2) Forces us to rewrite the gas estimation code we just had audited Thankfully, it itself should be much easier to read/review, and our existing test suite has extensively validated it. This resolves 001 which was a concern for if/when this upgrade occurs. By doing it now, with a dedicated test case ensuring the issue we would have had with alloy-core 0.8 and `validate=false` isn't actively an issue, we resolve it. --- Cargo.lock | 1528 +++++++++++++---- .../alloy-simple-request-transport/Cargo.toml | 4 +- networks/ethereum/schnorr/Cargo.toml | 12 +- networks/ethereum/schnorr/src/tests/mod.rs | 10 +- .../ethereum/schnorr/src/tests/premise.rs | 2 +- processor/ethereum/Cargo.toml | 10 +- processor/ethereum/deployer/Cargo.toml | 20 +- processor/ethereum/deployer/src/lib.rs | 21 +- processor/ethereum/deployer/src/tests.rs | 8 +- processor/ethereum/erc20/Cargo.toml | 13 +- processor/ethereum/erc20/src/lib.rs | 13 +- processor/ethereum/erc20/src/tests.rs | 26 + processor/ethereum/primitives/Cargo.toml | 4 +- processor/ethereum/primitives/src/lib.rs | 5 +- processor/ethereum/router/Cargo.toml | 30 +- processor/ethereum/router/src/gas.rs | 272 +-- processor/ethereum/router/src/lib.rs | 26 +- .../router/src/tests/create_address.rs | 8 +- processor/ethereum/router/src/tests/erc20.rs | 4 +- processor/ethereum/router/src/tests/mod.rs | 45 +- processor/ethereum/src/publisher.rs | 5 +- processor/ethereum/src/rpc.rs | 15 +- processor/ethereum/test-primitives/Cargo.toml | 9 +- processor/ethereum/test-primitives/src/lib.rs | 16 +- rust-toolchain.toml | 2 +- 25 files changed, 1483 insertions(+), 625 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5389d888..2b4ec9f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,10 +78,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -101,20 +101,20 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.1.51" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e0f0136c085132939da6b753452ebed4efaa73fe523bb855b10c199c2ebfaf" +checksum = "7734aecfc58a597dde036e4c5cace2ae43e2f8bf3d406b022a1ef34da178dd49" dependencies = [ "alloy-primitives", "num_enum", - "strum 0.26.3", + "strum 0.27.1", ] [[package]] name = "alloy-consensus" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4138dc275554afa6f18c4217262ac9388790b2fc393c2dfe03c51d357abf013" +checksum = "c2179ba839ac532f50279f5da2a6c5047f791f03f6f808b4dfab11327b97902f" dependencies = [ "alloy-eips", "alloy-primitives", @@ -123,16 +123,21 @@ dependencies = [ "alloy-trie", "auto_impl", "c-kzg", - "derive_more", + "derive_more 2.0.1", + "either", "k256", + "once_cell", + "rand 0.8.5", "serde", + "serde_with", + "thiserror 2.0.9", ] [[package]] name = "alloy-consensus-any" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa04e1882c31288ce1028fdf31b6ea94cfa9eafa2e497f903ded631c8c6a42c" +checksum = "aec6f67bdc62aa277e0ec13c1b1fb396c8a62b65c8e9bd8c1d3583cc6d1a8dd3" dependencies = [ "alloy-consensus", "alloy-eips", @@ -144,18 +149,31 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.8.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3fdddfc89197319b1be19875a70ced62a72bebb67e2276dad688cd59f40e70" +checksum = "9d020a85ae8cf79b9c897a86d617357817bbc9a7d159dd7e6fedf1bc90f64d35" dependencies = [ "alloy-primitives", ] [[package]] -name = "alloy-eip2930" -version = "0.1.0" +name = "alloy-eip2124" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.9", +] + +[[package]] +name = "alloy-eip2930" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe3e16484669964c26ac48390245d84c410b1a5f968976076c17184725ef235" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -164,40 +182,42 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cabf647eb4650c91a9d38cb6f972bb320009e7e9d61765fb688a86f1563b33e8" +checksum = "804cefe429015b4244966c006d25bda5545fa9db5990e9c9079faf255052f50a" dependencies = [ "alloy-primitives", "alloy-rlp", - "derive_more", "k256", "serde", + "thiserror 2.0.9", ] [[package]] name = "alloy-eips" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dd5869ed09e399003e0e0ec6903d981b2a92e74c5d37e6b40890bad2517526" +checksum = "609515c1955b33af3d78d26357540f68c5551a90ef58fd53def04f2aa074ec43" dependencies = [ + "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", "alloy-primitives", "alloy-rlp", "alloy-serde", + "auto_impl", "c-kzg", - "derive_more", - "once_cell", + "derive_more 2.0.1", + "either", "serde", - "sha2", + "sha2 0.10.8", ] [[package]] name = "alloy-genesis" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d2a7fe5c1a9bd6793829ea21a636f30fc2b3f5d2e7418ba86d96e41dd1f460" +checksum = "6dfec8348d97bd624901c6a4b22bb4c24df8a3128fc3d5e42d24f7b79dfa8588" dependencies = [ "alloy-eips", "alloy-primitives", @@ -207,10 +227,35 @@ dependencies = [ ] [[package]] -name = "alloy-json-rpc" -version = "0.9.2" +name = "alloy-hardforks" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2008bedb8159a255b46b7c8614516eda06679ea82f620913679afbd8031fea72" +checksum = "c7d3b2243e2adfaea41da41982f91ecab8083fa51b240d0427955d709f65b1b4" +dependencies = [ + "alloy-chains", + "alloy-eip2124", + "alloy-primitives", + "auto_impl", + "dyn-clone", +] + +[[package]] +name = "alloy-json-abi" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5189fa9a8797e92396bc4b4454c5f2073a4945f7c2b366af9af60f9536558f7a" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3994ab6ff6bdeb5aebe65381a8f6a47534789817570111555e8ac413e242ce06" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -222,9 +267,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4556f01fe41d0677495df10a648ddcf7ce118b0e8aa9642a0e2b6dd1fb7259de" +checksum = "0be3aa020a6d3aa7601185b4c1a7d6f3a5228cb5424352db63064b29a455c891" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -239,6 +284,7 @@ dependencies = [ "alloy-sol-types", "async-trait", "auto_impl", + "derive_more 2.0.1", "futures-utils-wasm", "serde", "serde_json", @@ -247,9 +293,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31c3c6b71340a1d076831823f09cb6e02de01de5c6630a9631bdb36f947ff80" +checksum = "498f2ee2eef38a6db0fc810c7bf7daebdf5f2fa8d04adb8bd53e54e91ddbdea3" dependencies = [ "alloy-consensus", "alloy-eips", @@ -260,14 +306,18 @@ dependencies = [ [[package]] name = "alloy-node-bindings" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4520cd4bc5cec20c32c98e4bc38914c7fb96bf4a712105e44da186a54e65e3ba" +checksum = "60dd250ffe9514728daf5e84cac7193e221b85feffe3bea7d45f2b9fcbe6b885" dependencies = [ "alloy-genesis", + "alloy-hardforks", + "alloy-network", "alloy-primitives", + "alloy-signer", + "alloy-signer-local", "k256", - "rand", + "rand 0.8.5", "serde_json", "tempfile", "thiserror 2.0.9", @@ -277,25 +327,24 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0540fd0355d400b59633c27bd4b42173e59943f28e9d3376b77a24771d432d04" +checksum = "70b98b99c1dcfbe74d7f0b31433ff215e7d1555e367d90e62db904f3c9d4ff53" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", - "derive_more", + "derive_more 2.0.1", "foldhash", "hashbrown 0.15.2", - "hex-literal", "indexmap 2.7.0", "itoa", "k256", "keccak-asm", "paste", "proptest", - "rand", + "rand 0.9.0", "ruint", "rustc-hash 2.1.0", "serde", @@ -305,9 +354,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22c4441b3ebe2d77fa9cf629ba68c3f713eb91779cff84275393db97eddd82" +checksum = "3d6ba76d476f475668925f858cc4db51781f12abdaa4e0274eb57a09f574e869" dependencies = [ "alloy-chains", "alloy-consensus", @@ -320,17 +369,19 @@ dependencies = [ "alloy-rpc-types-debug", "alloy-rpc-types-eth", "alloy-rpc-types-trace", + "alloy-signer", + "alloy-sol-types", "alloy-transport", "async-stream", "async-trait", "auto_impl", "dashmap", + "either", "futures", "futures-utils-wasm", - "lru", + "lru 0.13.0", "parking_lot 0.12.3", "pin-project", - "schnellru", "serde", "serde_json", "thiserror 2.0.9", @@ -358,19 +409,20 @@ checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] name = "alloy-rpc-client" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" +checksum = "1d6a6985b48a536b47aa0aece56e6a0f49240ce5d33a7f0c94f1b312eda79aa1" dependencies = [ "alloy-json-rpc", "alloy-primitives", "alloy-transport", "alloy-transport-http", + "async-stream", "futures", "pin-project", "serde", @@ -379,14 +431,15 @@ dependencies = [ "tokio-stream", "tower 0.5.2", "tracing", + "tracing-futures", "wasmtimer", ] [[package]] name = "alloy-rpc-types-any" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" +checksum = "d1a40595b927dfb07218459037837dbc8de8500a26024bb6ff0548dd2ccc13e0" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -395,9 +448,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "358d6a8d7340b9eb1a7589a6c1fb00df2c9b26e90737fa5ed0108724dd8dac2c" +checksum = "05525519bd7f37f98875354f0b3693d3ad3c7a7f067e3b8946777920be15cb5b" dependencies = [ "alloy-primitives", "serde", @@ -405,9 +458,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0938bc615c02421bd86c1733ca7205cc3d99a122d9f9bff05726bd604b76a5c2" +checksum = "f2a9f64e0f69cfb6029e2a044519a1bdd44ce9fc334d5315a7b9837f7a6748e5" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -425,9 +478,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd38207e056cc7d1372367fbb4560ddf9107cbd20731743f641246bf0dede149" +checksum = "2bccbe4594eaa2d69d21fa0b558c44e36202e599eb209da70b405415cb37a354" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -439,9 +492,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae0465c71d4dced7525f408d84873aeebb71faf807d22d74c4a426430ccd9b55" +checksum = "d4dba6ff08916bc0a9cbba121ce21f67c0b554c39cf174bc7b9df6c651bd3c3b" dependencies = [ "alloy-primitives", "serde", @@ -450,18 +503,35 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfa395ad5cc952c82358d31e4c68b27bf4a89a5456d9b27e226e77dac50e4ff" +checksum = "0c580da7f00f3999e44e327223044d6732358627f93043e22d92c583f6583556" dependencies = [ "alloy-primitives", "async-trait", "auto_impl", + "either", "elliptic-curve", "k256", "thiserror 2.0.9", ] +[[package]] +name = "alloy-signer-local" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00f0f07862bd8f6bc66c953660693c5903062c2c9d308485b2a6eee411089e7" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror 2.0.9", +] + [[package]] name = "alloy-simple-request-transport" version = "0.1.1" @@ -475,23 +545,23 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6d1a14b4a9f6078ad9132775a2ebb465b06b387d60f7413ddc86d7bf7453408" +checksum = "60fcfa26956bcb22f66ab13407115197f26ef23abca5b48d39a1946897382d74" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4436b4b96d265eb17daea26eb31525c3076d024d10901e446790afbd2f7eeaf5" +checksum = "72a9b402f0013f1ff8c24066eeafc2207a8e52810a2b18b77776ce7fead5af41" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -500,47 +570,62 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f58698a18b96faa8513519de112b79a96010b4ff84264ce54a217c52a8e98b" +checksum = "d02d61741337bb6b3f4899c2e3173fe17ffa2810e143d3b28acd953197c8dd79" dependencies = [ "const-hex", "dunce", "heck 0.5.0", + "macro-string", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", "syn-solidity", ] [[package]] -name = "alloy-sol-types" -version = "0.8.16" +name = "alloy-sol-type-parser" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c766e4979fc19d70057150befe8e3ea3f0c4cbc6839b8eaaa250803451692305" +checksum = "d2b5f5f9f561c29f78ea521ebe2e5ac1633f1b1442dae582f68ecd57c6350042" dependencies = [ + "serde", + "winnow 0.7.6", +] + +[[package]] +name = "alloy-sol-types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02635bce18205ff8149fb752c753b0a91ea3f3c8ee04c58846448be4811a640" +dependencies = [ + "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", "const-hex", + "serde", ] [[package]] name = "alloy-transport" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d17722a198f33bbd25337660787aea8b8f57814febb7c746bc30407bdfc39448" +checksum = "6e1f1a55f9ff9a48aa0b4a8c616803754620010fbb266edae2f4548f4304373b" dependencies = [ "alloy-json-rpc", "base64 0.22.1", - "futures-util", + "derive_more 2.0.1", + "futures", "futures-utils-wasm", + "parking_lot 0.12.3", "serde", "serde_json", "thiserror 2.0.9", @@ -553,9 +638,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1509599021330a31c4a6816b655e34bf67acb1cc03c564e09fd8754ff6c5de" +checksum = "171b3d8824b6697d6c8325373ec410d230b6c59ce552edfbfabe4e7b8a26aac3" dependencies = [ "alloy-transport", "url", @@ -563,14 +648,14 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.7.8" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6917c79e837aa7b77b7a6dae9f89cbe15313ac161c4d3cfaf8909ef21f3d22d8" +checksum = "8f9382b4e38b126358f276b863673bc47840d3b3508dd1c9efe22f81b4e83649" dependencies = [ "alloy-primitives", "alloy-rlp", "arrayvec", - "derive_more", + "derive_more 1.0.0", "nybbles", "serde", "smallvec", @@ -670,6 +755,54 @@ name = "arbitrary" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-bn254" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-r1cs-std", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-poly", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.2", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] [[package]] name = "ark-ff" @@ -709,6 +842,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.3.0" @@ -729,6 +882,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.100", +] + [[package]] name = "ark-ff-macros" version = "0.3.0" @@ -754,6 +917,63 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.2", +] + +[[package]] +name = "ark-r1cs-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941551ef1df4c7a401de7068758db6503598e6f01850bdb2cfdb614a1f9dbea1" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-relations", + "ark-std 0.5.0", + "educe", + "num-bigint", + "num-integer", + "num-traits", + "tracing", +] + +[[package]] +name = "ark-relations" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec46ddc93e7af44bcab5230937635b06fb5744464dd6a7e7b083e80ebd274384" +dependencies = [ + "ark-ff 0.5.0", + "ark-std 0.5.0", + "tracing", + "tracing-subscriber 0.2.25", +] + [[package]] name = "ark-serialize" version = "0.3.0" @@ -775,6 +995,30 @@ dependencies = [ "num-bigint", ] +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "ark-std" version = "0.3.0" @@ -782,7 +1026,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -792,7 +1036,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", ] [[package]] @@ -868,7 +1122,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", "synstructure 0.13.1", ] @@ -891,7 +1145,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -954,7 +1208,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -965,7 +1219,7 @@ checksum = "1b1244b10dcd56c92219da4e14caa97e312079e185f04ba3eea25061561dc0a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -1023,7 +1277,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -1134,23 +1388,23 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] name = "bit-set" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitcoin" @@ -1166,7 +1420,7 @@ dependencies = [ "bitcoin_hashes", "hex-conservative", "hex_lit", - "secp256k1", + "secp256k1 0.29.1", "serde", ] @@ -1193,8 +1447,8 @@ dependencies = [ "hex", "k256", "modular-frost", - "rand_core", - "secp256k1", + "rand_core 0.6.4", + "secp256k1 0.29.1", "serde", "serde_json", "simple-request", @@ -1330,15 +1584,15 @@ dependencies = [ "ff", "group", "pairing", - "rand_core", + "rand_core 0.6.4", "subtle", ] [[package]] name = "blst" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +checksum = "47c79a94619fade3c0b887670333513a67ac28a6a7e653eb260bf0d4103db38d" dependencies = [ "cc", "glob", @@ -1410,7 +1664,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -1503,10 +1757,11 @@ dependencies = [ [[package]] name = "c-kzg" -version = "1.0.3" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +checksum = "4e7e3c397401eb76228c89561cf22f85f41c95aa799ee9d860de3ea1cbc728fc" dependencies = [ + "arbitrary", "blst", "cc", "glob", @@ -1673,8 +1928,8 @@ dependencies = [ "k256", "minimal-ed448", "p256", - "rand_core", - "sha2", + "rand_core 0.6.4", + "sha2 0.10.8", "sha3", "std-shims", "subtle", @@ -1723,7 +1978,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -1791,7 +2046,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] @@ -1963,6 +2218,21 @@ dependencies = [ "wasmtime-types", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.4.2" @@ -2010,7 +2280,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -2022,7 +2292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array 0.14.7", - "rand_core", + "rand_core 0.6.4", "typenum", ] @@ -2047,7 +2317,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "group", - "rand_core", + "rand_core 0.6.4", "rustc_version 0.4.1", "subtle", "zeroize", @@ -2061,7 +2331,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -2089,7 +2359,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -2107,7 +2377,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -2120,12 +2390,47 @@ dependencies = [ "ff", "ff-group-tests", "group", - "rand_core", + "rand_core 0.6.4", "rustversion", "subtle", "zeroize", ] +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.100", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.100", +] + [[package]] name = "dashmap" version = "6.1.0" @@ -2245,13 +2550,44 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "derive_more" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ - "derive_more-impl", + "derive_more-impl 1.0.0", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl 2.0.1", ] [[package]] @@ -2262,7 +2598,18 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", "unicode-xid", ] @@ -2302,8 +2649,8 @@ dependencies = [ "digest 0.10.7", "hex", "md-5", - "rand", - "sha2", + "rand 0.8.5", + "sha2 0.10.8", ] [[package]] @@ -2342,7 +2689,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -2363,9 +2710,9 @@ dependencies = [ "generic-array 1.1.1", "multiexp", "pasta_curves", - "rand", - "rand_chacha", - "rand_core", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "schnorr-signatures", "secq256k1", "std-shims", @@ -2386,7 +2733,7 @@ dependencies = [ "hex-literal", "k256", "multiexp", - "rand_core", + "rand_core 0.6.4", "rustversion", "thiserror 2.0.9", "zeroize", @@ -2405,7 +2752,7 @@ dependencies = [ "bytes", "dyn-clone", "futures", - "rand", + "rand 0.8.5", "secrecy", "serde", "serde_json", @@ -2469,7 +2816,7 @@ dependencies = [ "group", "hex", "pasta_curves", - "rand_core", + "rand_core 0.6.4", "std-shims", "subtle", "zeroize", @@ -2485,6 +2832,7 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] @@ -2507,9 +2855,9 @@ checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core", + "rand_core 0.6.4", "serde", - "sha2", + "sha2 0.10.8", "subtle", "zeroize", ] @@ -2524,16 +2872,31 @@ dependencies = [ "ed25519", "hashbrown 0.14.5", "hex", - "rand_core", - "sha2", + "rand_core 0.6.4", + "sha2 0.10.8", "zeroize", ] [[package]] -name = "either" -version = "1.13.0" +name = "educe" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -2548,8 +2911,9 @@ dependencies = [ "generic-array 0.14.7", "group", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", + "serdect", "subtle", "tap", "zeroize", @@ -2569,7 +2933,7 @@ dependencies = [ "generic-array 1.1.1", "hex", "hex-literal", - "rand_core", + "rand_core 0.6.4", "rustversion", "std-shims", "subtle", @@ -2597,7 +2961,27 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] @@ -2608,7 +2992,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -2660,7 +3044,7 @@ dependencies = [ "build-solidity-contracts", "group", "k256", - "rand_core", + "rand_core 0.6.4", "sha3", "subtle", "tokio", @@ -2712,7 +3096,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -2738,6 +3122,17 @@ dependencies = [ "bytes", ] +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + [[package]] name = "fdlimit" version = "0.2.1" @@ -2754,7 +3149,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "bitvec", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2768,7 +3163,7 @@ dependencies = [ "k256", "p256", "pasta_curves", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2823,7 +3218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -2842,7 +3237,7 @@ dependencies = [ "digest 0.10.7", "merlin", "rustversion", - "sha2", + "sha2 0.10.8", "subtle", "zeroize", ] @@ -2993,7 +3388,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -3005,7 +3400,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -3015,7 +3410,7 @@ source = "git+https://github.com/serai-dex/substrate#6e3f07bf5c98a6a3ec15f2b1a46 dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -3066,7 +3461,7 @@ dependencies = [ "flexible-transcript", "group", "modular-frost", - "rand_core", + "rand_core 0.6.4", "schnorr-signatures", "schnorrkel", "zeroize", @@ -3187,7 +3582,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -3294,7 +3689,7 @@ dependencies = [ "ciphersuite", "flexible-transcript", "multiexp", - "rand_core", + "rand_core 0.6.4", "std-shims", "zeroize", ] @@ -3361,18 +3756,30 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + [[package]] name = "getrandom_or_panic" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", ] [[package]] @@ -3428,7 +3835,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -3573,7 +3980,7 @@ dependencies = [ "idna 1.0.3", "ipnet", "once_cell", - "rand", + "rand 0.8.5", "socket2 0.5.8", "thiserror 1.0.69", "tinyvec", @@ -3595,7 +4002,7 @@ dependencies = [ "lru-cache", "once_cell", "parking_lot 0.12.3", - "rand", + "rand 0.8.5", "resolv-conf", "smallvec", "thiserror 1.0.69", @@ -3855,6 +4262,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.2.3" @@ -3953,7 +4366,7 @@ dependencies = [ "http 0.2.12", "hyper 0.14.30", "log", - "rand", + "rand 0.8.5", "tokio", "url", "xmltree", @@ -3985,7 +4398,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -4144,7 +4557,7 @@ dependencies = [ "hyper 0.14.30", "jsonrpsee-types", "parking_lot 0.12.3", - "rand", + "rand 0.8.5", "rustc-hash 1.1.0", "serde", "serde_json", @@ -4213,7 +4626,8 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", - "sha2", + "serdect", + "sha2 0.10.8", ] [[package]] @@ -4320,7 +4734,7 @@ dependencies = [ "either", "futures", "futures-timer", - "getrandom", + "getrandom 0.2.15", "instant", "libp2p-allow-block-list 0.2.0", "libp2p-connection-limits 0.2.1", @@ -4357,7 +4771,7 @@ dependencies = [ "either", "futures", "futures-timer", - "getrandom", + "getrandom 0.2.15", "libp2p-allow-block-list 0.4.0", "libp2p-connection-limits 0.4.0", "libp2p-core 0.42.0", @@ -4448,7 +4862,7 @@ dependencies = [ "parking_lot 0.12.3", "pin-project", "quick-protobuf", - "rand", + "rand 0.8.5", "rw-stream-sink", "smallvec", "thiserror 1.0.69", @@ -4474,7 +4888,7 @@ dependencies = [ "parking_lot 0.12.3", "pin-project", "quick-protobuf", - "rand", + "rand 0.8.5", "rw-stream-sink", "smallvec", "thiserror 1.0.69", @@ -4530,7 +4944,7 @@ dependencies = [ "fnv", "futures", "futures-ticker", - "getrandom", + "getrandom 0.2.15", "hex_fmt", "libp2p-core 0.42.0", "libp2p-identity", @@ -4538,9 +4952,9 @@ dependencies = [ "prometheus-client 0.22.3", "quick-protobuf", "quick-protobuf-codec 0.3.1", - "rand", + "rand 0.8.5", "regex", - "sha2", + "sha2 0.10.8", "smallvec", "tracing", "void", @@ -4562,7 +4976,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm 0.43.7", "log", - "lru", + "lru 0.12.5", "quick-protobuf", "quick-protobuf-codec 0.2.0", "smallvec", @@ -4581,8 +4995,8 @@ dependencies = [ "hkdf", "multihash 0.19.1", "quick-protobuf", - "rand", - "sha2", + "rand 0.8.5", + "sha2 0.10.8", "thiserror 1.0.69", "tracing", "zeroize", @@ -4608,8 +5022,8 @@ dependencies = [ "log", "quick-protobuf", "quick-protobuf-codec 0.2.0", - "rand", - "sha2", + "rand 0.8.5", + "sha2 0.10.8", "smallvec", "thiserror 1.0.69", "uint", @@ -4630,7 +5044,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm 0.43.7", "log", - "rand", + "rand 0.8.5", "smallvec", "socket2 0.5.8", "tokio", @@ -4651,7 +5065,7 @@ dependencies = [ "libp2p-core 0.42.0", "libp2p-identity", "libp2p-swarm 0.45.1", - "rand", + "rand 0.8.5", "smallvec", "socket2 0.5.8", "tokio", @@ -4709,8 +5123,8 @@ dependencies = [ "multihash 0.19.1", "once_cell", "quick-protobuf", - "rand", - "sha2", + "rand 0.8.5", + "sha2 0.10.8", "snow", "static_assertions", "thiserror 1.0.69", @@ -4734,8 +5148,8 @@ dependencies = [ "multihash 0.19.1", "once_cell", "quick-protobuf", - "rand", - "sha2", + "rand 0.8.5", + "sha2 0.10.8", "snow", "static_assertions", "thiserror 1.0.69", @@ -4758,7 +5172,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm 0.43.7", "log", - "rand", + "rand 0.8.5", "void", ] @@ -4774,7 +5188,7 @@ dependencies = [ "libp2p-core 0.42.0", "libp2p-identity", "libp2p-swarm 0.45.1", - "rand", + "rand 0.8.5", "tracing", "void", "web-time", @@ -4796,7 +5210,7 @@ dependencies = [ "log", "parking_lot 0.12.3", "quinn 0.10.2", - "rand", + "rand 0.8.5", "ring 0.16.20", "rustls 0.21.12", "socket2 0.5.8", @@ -4819,7 +5233,7 @@ dependencies = [ "libp2p-tls 0.5.0", "parking_lot 0.12.3", "quinn 0.11.6", - "rand", + "rand 0.8.5", "ring 0.17.8", "rustls 0.23.20", "socket2 0.5.8", @@ -4841,7 +5255,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm 0.43.7", "log", - "rand", + "rand 0.8.5", "smallvec", "void", ] @@ -4859,7 +5273,7 @@ dependencies = [ "libp2p-core 0.42.0", "libp2p-identity", "libp2p-swarm 0.45.1", - "rand", + "rand 0.8.5", "smallvec", "tracing", "void", @@ -4883,7 +5297,7 @@ dependencies = [ "log", "multistream-select", "once_cell", - "rand", + "rand 0.8.5", "smallvec", "tokio", "void", @@ -4902,10 +5316,10 @@ dependencies = [ "libp2p-core 0.42.0", "libp2p-identity", "libp2p-swarm-derive 0.35.0", - "lru", + "lru 0.12.5", "multistream-select", "once_cell", - "rand", + "rand 0.8.5", "smallvec", "tokio", "tracing", @@ -4923,7 +5337,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -4935,7 +5349,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -5131,6 +5545,52 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "libsecp256k1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" +dependencies = [ + "arrayref", + "base64 0.22.1", + "digest 0.9.0", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + [[package]] name = "libz-sys" version = "1.1.20" @@ -5219,6 +5679,15 @@ dependencies = [ "hashbrown 0.15.2", ] +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.2", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -5256,6 +5725,17 @@ dependencies = [ "libc", ] +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "macro_magic" version = "0.4.2" @@ -5265,7 +5745,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -5279,7 +5759,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -5290,7 +5770,7 @@ checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -5301,7 +5781,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -5402,7 +5882,7 @@ checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ "byteorder", "keccak", - "rand_core", + "rand_core 0.6.4", "zeroize", ] @@ -5423,7 +5903,7 @@ dependencies = [ "generic-array 1.1.1", "group", "hex", - "rand_core", + "rand_core 0.6.4", "rustversion", "subtle", "zeroize", @@ -5451,7 +5931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -5494,8 +5974,8 @@ dependencies = [ "hex", "minimal-ed448", "multiexp", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "schnorr-signatures", "serde_json", "subtle", @@ -5512,7 +5992,7 @@ dependencies = [ "hex-literal", "monero-io", "monero-primitives", - "rand_core", + "rand_core 0.6.4", "serde", "serde_json", "std-shims", @@ -5541,7 +6021,7 @@ dependencies = [ "monero-generators", "monero-io", "monero-primitives", - "rand_core", + "rand_core 0.6.4", "std-shims", "thiserror 2.0.9", "zeroize", @@ -5559,8 +6039,8 @@ dependencies = [ "monero-generators", "monero-io", "monero-primitives", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "std-shims", "subtle", "thiserror 2.0.9", @@ -5659,7 +6139,7 @@ dependencies = [ "monero-rpc", "monero-serai", "monero-simple-request-rpc", - "rand_core", + "rand_core 0.6.4", "serde", "serde_json", "tokio", @@ -5692,9 +6172,9 @@ dependencies = [ "monero-rpc", "monero-serai", "monero-simple-request-rpc", - "rand", - "rand_chacha", - "rand_core", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "rand_distr", "serde", "serde_json", @@ -5742,7 +6222,7 @@ dependencies = [ "ff", "group", "k256", - "rand_core", + "rand_core 0.6.4", "rustversion", "std-shims", "zeroize", @@ -5760,7 +6240,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive 0.8.0", - "sha2", + "sha2 0.10.8", "sha3", "unsigned-varint 0.7.2", ] @@ -5789,7 +6269,7 @@ dependencies = [ "multihash-derive 0.9.0", "ripemd", "sha1", - "sha2", + "sha2 0.10.8", "sha3", "strobe-rs", ] @@ -5874,7 +6354,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ - "rand", + "rand 0.8.5", ] [[package]] @@ -6102,7 +6582,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -6111,7 +6591,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3409fc85ac27b27d971ea7cd1aabafd2eefa6de7e481c8d4f707225c117e81a" dependencies = [ + "alloy-rlp", "const-hex", + "proptest", "serde", "smallvec", ] @@ -6157,9 +6639,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opaque-debug" @@ -6192,6 +6674,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", + "sha2 0.10.8", ] [[package]] @@ -6362,8 +6845,8 @@ dependencies = [ "lz4", "memmap2", "parking_lot 0.12.3", - "rand", - "siphasher", + "rand 0.8.5", + "siphasher 0.3.11", "snap", "winapi", ] @@ -6459,7 +6942,7 @@ dependencies = [ "ff", "group", "lazy_static", - "rand", + "rand 0.8.5", "static_assertions", "subtle", "zeroize", @@ -6542,6 +7025,48 @@ dependencies = [ "indexmap 2.7.0", ] +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher 1.0.1", +] + [[package]] name = "pin-project" version = "1.1.7" @@ -6559,7 +7084,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -6640,7 +7165,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -6767,7 +7292,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -6778,7 +7303,7 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -6836,22 +7361,22 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] name = "proptest" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ "bit-set", "bit-vec", "bitflags 2.6.0", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.5", "rusty-fork", @@ -7007,7 +7532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ "bytes", - "rand", + "rand 0.8.5", "ring 0.16.20", "rustc-hash 1.1.0", "rustls 0.21.12", @@ -7024,8 +7549,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "getrandom", - "rand", + "getrandom 0.2.15", + "rand 0.8.5", "ring 0.17.8", "rustc-hash 2.1.0", "rustls 0.23.20", @@ -7073,6 +7598,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radium" version = "0.7.0" @@ -7086,11 +7617,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serde", ] +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", + "zerocopy 0.8.24", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -7098,7 +7641,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -7107,7 +7660,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.2", + "serde", ] [[package]] @@ -7117,7 +7680,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -7126,7 +7689,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -7135,7 +7698,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -7203,7 +7766,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", "thiserror 1.0.69", ] @@ -7225,7 +7788,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -7297,63 +7860,183 @@ dependencies = [ [[package]] name = "revm" -version = "19.3.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5a57589c308880c0f89ebf68d92aeef0d51e1ed88867474f895f6fd0f25c64" +checksum = "85eb66316c261a8ffd266e3c295991d703e810b29b57006dfea08481e81e2f56" dependencies = [ - "auto_impl", - "cfg-if", - "dyn-clone", + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database", + "revm-database-interface", + "revm-handler", + "revm-inspector", "revm-interpreter", "revm-precompile", + "revm-primitives", + "revm-state", +] + +[[package]] +name = "revm-bytecode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63e138d520c5c5bc25ecc82506e9e4e6e85a811809fc5251c594378dccabfc6" +dependencies = [ + "bitvec", + "phf", + "revm-primitives", + "serde", +] + +[[package]] +name = "revm-context" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7836a0adfcb1a64427ddd314f9cb8703fbdda36348b73df86eb28977aaff1acc" +dependencies = [ + "cfg-if", + "derive-where", + "revm-bytecode", + "revm-context-interface", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-context-interface" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d74335aa1f14222cc4d3be1f62a029cc7dc03819cc8d080ff17b7e1d76375f" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "auto_impl", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e5c80c5a2fd605f2119ee32a63fb3be941fb6a81ced8cdb3397abca28317224" +dependencies = [ + "alloy-eips", + "revm-bytecode", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database-interface" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0e4dfbc734b1ea67b5e8f8b3c7dc4283e2210d978cdaf6c7a45e97be5ea53b3" +dependencies = [ + "auto_impl", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-handler" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4354eacb23dda95569e9d74e25066c0ed7889683f6ff49149b5319bcb856745a" +dependencies = [ + "auto_impl", + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database-interface", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-inspector" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "babc07c45ff2dcb62fc54d7b69cd60cf209896319905e7653c6bdbcb5152f695" +dependencies = [ + "auto_impl", + "revm-context", + "revm-database-interface", + "revm-handler", + "revm-interpreter", + "revm-primitives", + "revm-state", "serde", "serde_json", ] [[package]] name = "revm-interpreter" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f632e761f171fb2f6ace8d1552a5793e0350578d4acec3e79ade1489f4c2a6" +checksum = "feb20260342003cfb791536e678ef5bbea1bfd1f8178b170e8885ff821985473" dependencies = [ + "revm-bytecode", + "revm-context-interface", "revm-primitives", "serde", ] [[package]] name = "revm-precompile" -version = "16.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6542fb37650dfdbf4b9186769e49c4a8bc1901a3280b2ebf32f915b6c8850f36" +checksum = "418e95eba68c9806c74f3e36cd5d2259170b61e90ac608b17ff8c435038ddace" dependencies = [ + "ark-bls12-381", + "ark-bn254", + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", "aurora-engine-modexp", "c-kzg", "cfg-if", "k256", + "libsecp256k1", "once_cell", + "p256", "revm-primitives", "ripemd", - "secp256k1", - "sha2", - "substrate-bn", + "secp256k1 0.30.0", + "sha2 0.10.8", ] [[package]] name = "revm-primitives" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48faea1ecf2c9f80d9b043bbde0db9da616431faed84c4cfa3dd7393005598e6" +checksum = "1fc2283ff87358ec7501956c5dd8724a6c2be959c619c4861395ae5e0054575f" dependencies = [ - "alloy-eip2930", - "alloy-eip7702", "alloy-primitives", - "auto_impl", - "bitflags 2.6.0", - "bitvec", - "cfg-if", - "dyn-clone", "enumn", - "hex", + "serde", +] + +[[package]] +name = "revm-state" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09dd121f6e66d75ab111fb51b4712f129511569bc3e41e6067ae760861418bd8" +dependencies = [ + "bitflags 2.6.0", + "revm-bytecode", + "revm-primitives", "serde", ] @@ -7390,7 +8073,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7474,21 +8157,24 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.3" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +checksum = "78a46eb779843b2c4f21fac5773e25d6d5b7c8f0922876c91541790d2ca27eef" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", - "fastrlp", + "fastrlp 0.3.1", + "fastrlp 0.4.0", "num-bigint", + "num-integer", "num-traits", "parity-scale-codec", "primitive-types", "proptest", - "rand", + "rand 0.8.5", + "rand 0.9.0", "rlp", "ruint-macro", "serde", @@ -7713,7 +8399,7 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "rand", + "rand 0.8.5", "sc-client-api", "sc-network", "sp-api", @@ -7791,7 +8477,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -7808,7 +8494,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand", + "rand 0.8.5", "regex", "rpassword", "sc-client-api", @@ -7974,7 +8660,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.3", - "rand", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8126,7 +8812,7 @@ dependencies = [ "parking_lot 0.12.3", "partial_sort", "pin-project", - "rand", + "rand 0.8.5", "sc-client-api", "sc-network-common", "sc-utils", @@ -8290,7 +8976,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "parking_lot 0.12.3", - "rand", + "rand 0.8.5", "sc-client-api", "sc-network", "sc-transaction-pool-api", @@ -8419,7 +9105,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "pin-project", - "rand", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8486,7 +9172,7 @@ dependencies = [ "futures", "libc", "log", - "rand", + "rand 0.8.5", "rand_pcg", "regex", "sc-telemetry", @@ -8508,7 +9194,7 @@ dependencies = [ "log", "parking_lot 0.12.3", "pin-project", - "rand", + "rand 0.8.5", "sc-utils", "serde", "serde_json", @@ -8552,7 +9238,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -8620,7 +9306,7 @@ checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" dependencies = [ "bitvec", "cfg-if", - "derive_more", + "derive_more 1.0.0", "parity-scale-codec", "scale-info-derive", "serde", @@ -8635,7 +9321,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -8667,8 +9353,8 @@ dependencies = [ "flexible-transcript", "hex", "multiexp", - "rand_core", - "sha2", + "rand_core 0.6.4", + "sha2 0.10.8", "std-shims", "zeroize", ] @@ -8685,9 +9371,9 @@ dependencies = [ "curve25519-dalek", "getrandom_or_panic", "merlin", - "rand_core", + "rand_core 0.6.4", "serde_bytes", - "sha2", + "sha2 0.10.8", "subtle", "zeroize", ] @@ -8730,6 +9416,7 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", + "serdect", "subtle", "zeroize", ] @@ -8741,11 +9428,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "bitcoin_hashes", - "rand", + "rand 0.8.5", "secp256k1-sys", "serde", ] +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", +] + [[package]] name = "secp256k1-sys" version = "0.10.1" @@ -8769,7 +9467,7 @@ dependencies = [ "hex", "hex-literal", "k256", - "rand_core", + "rand_core 0.6.4", "rustversion", "std-shims", "subtle", @@ -8891,8 +9589,8 @@ dependencies = [ "log", "modular-frost", "parity-scale-codec", - "rand_core", - "secp256k1", + "rand_core 0.6.4", + "secp256k1 0.29.1", "serai-client", "serai-db", "serai-processor-bin", @@ -8925,7 +9623,7 @@ dependencies = [ "monero-address", "multiaddr", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "serai-abi", "serai-docker-tests", "serde", @@ -8982,7 +9680,7 @@ dependencies = [ "hex", "log", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "schnorrkel", "serai-client", "serai-coordinator-libp2p-p2p", @@ -9012,7 +9710,7 @@ dependencies = [ "hex", "libp2p 0.54.1", "log", - "rand_core", + "rand_core 0.6.4", "schnorrkel", "serai-client", "serai-coordinator-p2p", @@ -9066,7 +9764,7 @@ dependencies = [ "dkg", "log", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "schnorr-signatures", "serai-client", "serai-coordinator-substrate", @@ -9109,7 +9807,7 @@ dependencies = [ "frame-support", "frame-system", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "scale-info", "serai-coins-pallet", "serai-primitives", @@ -9200,7 +9898,7 @@ dependencies = [ "log", "modular-frost", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "serai-client", "serai-db", "serai-env", @@ -9238,7 +9936,6 @@ dependencies = [ "alloy-core", "alloy-provider", "alloy-rpc-types-eth", - "alloy-simple-request-transport", "k256", "serai-processor-ethereum-primitives", ] @@ -9331,7 +10028,7 @@ dependencies = [ "hex", "log", "once_cell", - "rand_core", + "rand_core 0.6.4", "schnorr-signatures", "serai-db", "serai-env", @@ -9348,7 +10045,7 @@ dependencies = [ "ciphersuite", "dockertest", "hex", - "rand_core", + "rand_core 0.6.4", "serai-docker-tests", "serai-message-queue", "serai-primitives", @@ -9369,8 +10066,8 @@ dependencies = [ "monero-simple-request-rpc", "monero-wallet", "parity-scale-codec", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serai-client", "serai-processor-bin", "serai-processor-key-gen", @@ -9426,7 +10123,7 @@ dependencies = [ "monero-address", "pallet-transaction-payment-rpc", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "sc-authority-discovery", "sc-basic-authorship", "sc-cli", @@ -9470,8 +10167,8 @@ dependencies = [ "flexible-transcript", "hex", "home", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "secq256k1", "zalloc", "zeroize", @@ -9485,7 +10182,7 @@ dependencies = [ "ciphersuite", "frame-support", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "scale-info", "serde", "sp-application-crypto", @@ -9549,7 +10246,6 @@ dependencies = [ "alloy-core", "alloy-provider", "alloy-rpc-types-eth", - "alloy-simple-request-transport", "alloy-sol-macro", "alloy-sol-types", "alloy-transport", @@ -9591,14 +10287,14 @@ dependencies = [ "group", "k256", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "revm", "serai-client", "serai-ethereum-test-primitives", "serai-processor-ethereum-deployer", "serai-processor-ethereum-erc20", "serai-processor-ethereum-primitives", - "syn 2.0.94", + "syn 2.0.100", "syn-solidity", "tokio", ] @@ -9611,7 +10307,7 @@ dependencies = [ "log", "modular-frost", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "serai-db", "serai-processor-messages", "serai-validator-sets-primitives", @@ -9629,8 +10325,8 @@ dependencies = [ "flexible-transcript", "log", "parity-scale-codec", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serai-db", "serai-processor-messages", "serai-validator-sets-primitives", @@ -9709,7 +10405,7 @@ dependencies = [ "log", "modular-frost", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "serai-cosign", "serai-db", "serai-in-instructions-primitives", @@ -9791,7 +10487,7 @@ version = "0.1.0" dependencies = [ "dockertest", "hex", - "rand_core", + "rand_core 0.6.4", "serai-docker-tests", "tokio", ] @@ -9890,7 +10586,7 @@ dependencies = [ "pallet-grandpa", "pallet-timestamp", "parity-scale-codec", - "rand_core", + "rand_core 0.6.4", "scale-info", "serai-coins-pallet", "serai-dex-pallet", @@ -9951,7 +10647,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -9975,7 +10671,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -10013,9 +10709,32 @@ dependencies = [ "serde", "serde_derive", "serde_json", + "serde_with_macros", "time", ] +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "sha-1" version = "0.9.8" @@ -10040,6 +10759,19 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.8" @@ -10102,7 +10834,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -10138,6 +10870,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "slab" version = "0.4.9" @@ -10178,10 +10916,10 @@ dependencies = [ "blake2", "chacha20poly1305", "curve25519-dalek", - "rand_core", + "rand_core 0.6.4", "ring 0.17.8", "rustc_version 0.4.1", - "sha2", + "sha2 0.10.8", "subtle", ] @@ -10217,7 +10955,7 @@ dependencies = [ "http 0.2.12", "httparse", "log", - "rand", + "rand 0.8.5", "sha-1", ] @@ -10232,7 +10970,7 @@ dependencies = [ "futures", "httparse", "log", - "rand", + "rand 0.8.5", "sha1", ] @@ -10268,7 +11006,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -10425,7 +11163,7 @@ dependencies = [ "parking_lot 0.12.3", "paste", "primitive-types", - "rand", + "rand 0.8.5", "regex", "scale-info", "schnorrkel", @@ -10464,7 +11202,7 @@ source = "git+https://github.com/serai-dex/substrate#6e3f07bf5c98a6a3ec15f2b1a46 dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -10483,7 +11221,7 @@ source = "git+https://github.com/serai-dex/substrate#6e3f07bf5c98a6a3ec15f2b1a46 dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -10617,7 +11355,7 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand", + "rand 0.8.5", "scale-info", "serde", "sp-application-crypto", @@ -10655,7 +11393,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -10696,7 +11434,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.3", - "rand", + "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", @@ -10808,7 +11546,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -10973,6 +11711,15 @@ dependencies = [ "strum_macros 0.26.4", ] +[[package]] +name = "strum" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" +dependencies = [ + "strum_macros 0.27.1", +] + [[package]] name = "strum_macros" version = "0.24.3" @@ -10996,7 +11743,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -11009,7 +11756,20 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.94", + "syn 2.0.100", +] + +[[package]] +name = "strum_macros" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.100", ] [[package]] @@ -11020,23 +11780,10 @@ dependencies = [ "hmac", "pbkdf2 0.12.2", "schnorrkel", - "sha2", + "sha2 0.10.8", "zeroize", ] -[[package]] -name = "substrate-bn" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c" -dependencies = [ - "byteorder", - "crunchy", - "lazy_static", - "rand", - "rustc-hex", -] - [[package]] name = "substrate-build-script-utils" version = "3.0.0" @@ -11110,9 +11857,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.94" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -11121,14 +11868,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74af950d86ec0f5b2ae2d7f1590bbfbcf4603a0a15742d8f98132ac4fe3efd4" +checksum = "34c9c96de1f835488c1501092847b522be88c9ac6fb0d4c0fbea92992324c8f4" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -11157,7 +11904,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -11201,7 +11948,7 @@ checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.2.15", "once_cell", "rustix", "windows-sys 0.59.0", @@ -11263,7 +12010,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -11274,7 +12021,7 @@ checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -11337,9 +12084,9 @@ dependencies = [ "hmac", "once_cell", "pbkdf2 0.11.0", - "rand", + "rand 0.8.5", "rustc-hash 1.1.0", - "sha2", + "sha2 0.10.8", "thiserror 1.0.69", "unicode-normalization", "wasm-bindgen", @@ -11396,7 +12143,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -11564,7 +12311,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -11583,6 +12330,8 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ + "futures", + "futures-task", "pin-project", "tracing", ] @@ -11661,8 +12410,8 @@ dependencies = [ "hex", "log", "parity-scale-codec", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "schnorr-signatures", "serai-db", "subtle", @@ -11710,7 +12459,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand", + "rand 0.8.5", "smallvec", "socket2 0.4.10", "thiserror 1.0.69", @@ -11736,7 +12485,7 @@ dependencies = [ "idna 0.4.0", "ipnet", "once_cell", - "rand", + "rand 0.8.5", "smallvec", "thiserror 1.0.69", "tinyvec", @@ -11757,7 +12506,7 @@ dependencies = [ "lru-cache", "once_cell", "parking_lot 0.12.3", - "rand", + "rand 0.8.5", "resolv-conf", "smallvec", "thiserror 1.0.69", @@ -11786,7 +12535,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand", + "rand 0.8.5", "static_assertions", ] @@ -11986,6 +12735,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.99" @@ -12007,7 +12765,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", "wasm-bindgen-shared", ] @@ -12042,7 +12800,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12191,7 +12949,7 @@ dependencies = [ "log", "rustix", "serde", - "sha2", + "sha2 0.10.8", "toml 0.5.11", "windows-sys 0.48.0", "zstd 0.11.2+zstd.1.5.2", @@ -12320,7 +13078,7 @@ dependencies = [ "memfd", "memoffset", "paste", - "rand", + "rand 0.8.5", "rustix", "sptr", "wasm-encoder", @@ -12351,7 +13109,7 @@ checksum = "ca7af9bb3ee875c4907835e607a275d10b04d15623d3aebe01afe8fbd3f85050" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -12503,7 +13261,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -12514,7 +13272,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] @@ -12702,6 +13460,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -12712,6 +13479,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "wyz" version = "0.5.1" @@ -12728,7 +13504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ "curve25519-dalek", - "rand_core", + "rand_core 0.6.4", "serde", "zeroize", ] @@ -12793,7 +13569,7 @@ dependencies = [ "nohash-hasher", "parking_lot 0.12.3", "pin-project", - "rand", + "rand 0.8.5", "static_assertions", ] @@ -12808,7 +13584,7 @@ dependencies = [ "nohash-hasher", "parking_lot 0.12.3", "pin-project", - "rand", + "rand 0.8.5", "static_assertions", "web-time", ] @@ -12837,7 +13613,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +dependencies = [ + "zerocopy-derive 0.8.24", ] [[package]] @@ -12848,7 +13633,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] @@ -12868,7 +13664,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.100", ] [[package]] diff --git a/networks/ethereum/alloy-simple-request-transport/Cargo.toml b/networks/ethereum/alloy-simple-request-transport/Cargo.toml index de5925df..b3b7b3dd 100644 --- a/networks/ethereum/alloy-simple-request-transport/Cargo.toml +++ b/networks/ethereum/alloy-simple-request-transport/Cargo.toml @@ -21,8 +21,8 @@ tower = "0.5" serde_json = { version = "1", default-features = false } simple-request = { path = "../../../common/request", version = "0.1", default-features = false } -alloy-json-rpc = { version = "0.9", default-features = false } -alloy-transport = { version = "0.9", default-features = false } +alloy-json-rpc = { version = "0.14", default-features = false } +alloy-transport = { version = "0.14", default-features = false } [features] default = ["tls"] diff --git a/networks/ethereum/schnorr/Cargo.toml b/networks/ethereum/schnorr/Cargo.toml index 42797bb7..040ff479 100644 --- a/networks/ethereum/schnorr/Cargo.toml +++ b/networks/ethereum/schnorr/Cargo.toml @@ -29,14 +29,14 @@ rand_core = { version = "0.6", default-features = false, features = ["std"] } k256 = { version = "^0.13.1", default-features = false, features = ["ecdsa"] } -alloy-core = { version = "0.8", default-features = false } -alloy-sol-types = { version = "0.8", default-features = false } +alloy-core = { version = "1", default-features = false } +alloy-sol-types = { version = "1", default-features = false } alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } -alloy-rpc-types-eth = { version = "0.9", default-features = false } -alloy-rpc-client = { version = "0.9", default-features = false } -alloy-provider = { version = "0.9", default-features = false } +alloy-rpc-types-eth = { version = "0.14", default-features = false } +alloy-rpc-client = { version = "0.14", default-features = false } +alloy-provider = { version = "0.14", default-features = false } -alloy-node-bindings = { version = "0.9", default-features = false } +alloy-node-bindings = { version = "0.14", default-features = false } tokio = { version = "1", default-features = false, features = ["macros"] } diff --git a/networks/ethereum/schnorr/src/tests/mod.rs b/networks/ethereum/schnorr/src/tests/mod.rs index 4b23a0ba..f606a59e 100644 --- a/networks/ethereum/schnorr/src/tests/mod.rs +++ b/networks/ethereum/schnorr/src/tests/mod.rs @@ -32,7 +32,7 @@ mod abi { pub(crate) use TestSchnorr::*; } -async fn setup_test() -> (AnvilInstance, Arc>, Address) { +async fn setup_test() -> (AnvilInstance, Arc, Address) { let anvil = Anvil::new().spawn(); let provider = Arc::new(RootProvider::new( @@ -61,7 +61,7 @@ async fn setup_test() -> (AnvilInstance, Arc>, Addre } async fn call_verify( - provider: &RootProvider, + provider: &RootProvider, address: Address, public_key: &PublicKey, message: &[u8], @@ -80,10 +80,8 @@ async fn call_verify( .abi_encode() .into(), )); - let bytes = provider.call(&call).await.unwrap(); - let res = abi::verifyCall::abi_decode_returns(&bytes, true).unwrap(); - - res._0 + let bytes = provider.call(call).await.unwrap(); + abi::verifyCall::abi_decode_returns(&bytes).unwrap() } #[tokio::test] diff --git a/networks/ethereum/schnorr/src/tests/premise.rs b/networks/ethereum/schnorr/src/tests/premise.rs index dee78e44..93b2d419 100644 --- a/networks/ethereum/schnorr/src/tests/premise.rs +++ b/networks/ethereum/schnorr/src/tests/premise.rs @@ -18,7 +18,7 @@ use crate::{Signature, tests::test_key}; fn ecrecover(message: Scalar, odd_y: bool, r: Scalar, s: Scalar) -> Option<[u8; 20]> { let sig = ecdsa::Signature::from_scalars(r, s).ok()?; let message: [u8; 32] = message.to_repr().into(); - alloy_core::primitives::PrimitiveSignature::from_signature_and_parity(sig, odd_y) + alloy_core::primitives::Signature::from_signature_and_parity(sig, odd_y) .recover_address_from_prehash(&alloy_core::primitives::B256::from(message)) .ok() .map(Into::into) diff --git a/processor/ethereum/Cargo.toml b/processor/ethereum/Cargo.toml index 94594b93..f4671230 100644 --- a/processor/ethereum/Cargo.toml +++ b/processor/ethereum/Cargo.toml @@ -31,14 +31,14 @@ frost = { package = "modular-frost", path = "../../crypto/frost", default-featur k256 = { version = "^0.13.1", default-features = false, features = ["std"] } -alloy-core = { version = "0.8", default-features = false } +alloy-core = { version = "1", default-features = false } alloy-rlp = { version = "0.3", default-features = false } -alloy-rpc-types-eth = { version = "0.9", default-features = false } -alloy-transport = { version = "0.9", default-features = false } +alloy-rpc-types-eth = { version = "0.14", default-features = false } +alloy-transport = { version = "0.14", default-features = false } alloy-simple-request-transport = { path = "../../networks/ethereum/alloy-simple-request-transport", default-features = false } -alloy-rpc-client = { version = "0.9", default-features = false } -alloy-provider = { version = "0.9", default-features = false } +alloy-rpc-client = { version = "0.14", default-features = false } +alloy-provider = { version = "0.14", default-features = false } serai-client = { path = "../../substrate/client", default-features = false, features = ["ethereum"] } diff --git a/processor/ethereum/deployer/Cargo.toml b/processor/ethereum/deployer/Cargo.toml index 3e0f7d5b..30843fc4 100644 --- a/processor/ethereum/deployer/Cargo.toml +++ b/processor/ethereum/deployer/Cargo.toml @@ -17,17 +17,16 @@ rustdoc-args = ["--cfg", "docsrs"] workspace = true [dependencies] -alloy-core = { version = "0.8", default-features = false } +alloy-core = { version = "1", default-features = false } -alloy-sol-types = { version = "0.8", default-features = false } -alloy-sol-macro = { version = "0.8", default-features = false } +alloy-sol-types = { version = "1", default-features = false } +alloy-sol-macro = { version = "1", default-features = false } -alloy-consensus = { version = "0.9", default-features = false } +alloy-consensus = { version = "0.14", default-features = false } -alloy-rpc-types-eth = { version = "0.9", default-features = false } -alloy-transport = { version = "0.9", default-features = false } -alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } -alloy-provider = { version = "0.9", default-features = false } +alloy-rpc-types-eth = { version = "0.14", default-features = false } +alloy-transport = { version = "0.14", default-features = false } +alloy-provider = { version = "0.14", default-features = false } ethereum-primitives = { package = "serai-processor-ethereum-primitives", path = "../primitives", default-features = false } @@ -35,8 +34,9 @@ ethereum-primitives = { package = "serai-processor-ethereum-primitives", path = build-solidity-contracts = { path = "../../../networks/ethereum/build-contracts", default-features = false } [dev-dependencies] -alloy-rpc-client = { version = "0.9", default-features = false } -alloy-node-bindings = { version = "0.9", default-features = false } +alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } +alloy-rpc-client = { version = "0.14", default-features = false } +alloy-node-bindings = { version = "0.14", default-features = false } tokio = { version = "1.0", default-features = false, features = ["rt-multi-thread", "macros"] } diff --git a/processor/ethereum/deployer/src/lib.rs b/processor/ethereum/deployer/src/lib.rs index 10140303..685d0892 100644 --- a/processor/ethereum/deployer/src/lib.rs +++ b/processor/ethereum/deployer/src/lib.rs @@ -11,7 +11,6 @@ use alloy_sol_types::SolCall; use alloy_rpc_types_eth::{TransactionInput, TransactionRequest}; use alloy_transport::{TransportErrorKind, RpcError}; -use alloy_simple_request_transport::SimpleRequest; use alloy_provider::{Provider, RootProvider}; #[cfg(test)] @@ -44,7 +43,7 @@ const INITCODE: &[u8] = { /// of the EVM. It then supports retrieving the deployed contracts addresses (which aren't /// deterministic) using a single call. #[derive(Clone, Debug)] -pub struct Deployer(Arc>); +pub struct Deployer(Arc); impl Deployer { /// Obtain the transaction to deploy this contract, already signed. /// @@ -119,7 +118,7 @@ impl Deployer { /// /// This will return `None` if the Deployer has yet to be deployed on-chain. pub async fn new( - provider: Arc>, + provider: Arc, ) -> Result, RpcError> { let address = Self::address(); let code = provider.get_code_at(address).await?; @@ -138,16 +137,14 @@ impl Deployer { let call = TransactionRequest::default().to(Self::address()).input(TransactionInput::new( abi::Deployer::deploymentsCall::new((init_code_hash.into(),)).abi_encode().into(), )); - let bytes = self.0.call(&call).await?; - let deployment = abi::Deployer::deploymentsCall::abi_decode_returns(&bytes, true) - .map_err(|e| { - TransportErrorKind::Custom( - format!("node returned a non-address for function returning address: {e:?}").into(), - ) - })? - ._0; + let bytes = self.0.call(call).await?; + let deployment = abi::Deployer::deploymentsCall::abi_decode_returns(&bytes).map_err(|e| { + TransportErrorKind::Custom( + format!("node returned a non-address for function returning address: {e:?}").into(), + ) + })?; - if **deployment == [0; 20] { + if deployment == Address::ZERO { return Ok(None); } Ok(Some(deployment)) diff --git a/processor/ethereum/deployer/src/tests.rs b/processor/ethereum/deployer/src/tests.rs index 6e4570ff..12969016 100644 --- a/processor/ethereum/deployer/src/tests.rs +++ b/processor/ethereum/deployer/src/tests.rs @@ -76,9 +76,9 @@ async fn test_deployer() { let call = TransactionRequest::default() .to(Deployer::address()) .input(TransactionInput::new(deploy_tx.tx().input.clone())); - let call_err = provider.call(&call).await.unwrap_err(); + let call_err = provider.call(call).await.unwrap_err(); assert!(matches!( - call_err.as_error_resp().unwrap().as_decoded_error::(true).unwrap(), + call_err.as_error_resp().unwrap().as_decoded_interface_error::().unwrap(), DeployerErrors::PriorDeployed(PriorDeployed {}), )); } @@ -97,9 +97,9 @@ async fn test_deployer() { let call = TransactionRequest::default() .to(Deployer::address()) .input(TransactionInput::new(deploy_tx.tx().input.clone())); - let call_err = provider.call(&call).await.unwrap_err(); + let call_err = provider.call(call).await.unwrap_err(); assert!(matches!( - call_err.as_error_resp().unwrap().as_decoded_error::(true).unwrap(), + call_err.as_error_resp().unwrap().as_decoded_interface_error::().unwrap(), DeployerErrors::DeploymentFailed(DeploymentFailed {}), )); } diff --git a/processor/ethereum/erc20/Cargo.toml b/processor/ethereum/erc20/Cargo.toml index 078192a4..4a5a45e8 100644 --- a/processor/ethereum/erc20/Cargo.toml +++ b/processor/ethereum/erc20/Cargo.toml @@ -17,15 +17,14 @@ rustdoc-args = ["--cfg", "docsrs"] workspace = true [dependencies] -alloy-core = { version = "0.8", default-features = false } +alloy-core = { version = "1", default-features = false } -alloy-sol-types = { version = "0.8", default-features = false } -alloy-sol-macro = { version = "0.8", default-features = false } +alloy-sol-types = { version = "1", default-features = false } +alloy-sol-macro = { version = "1", default-features = false } -alloy-rpc-types-eth = { version = "0.9", default-features = false } -alloy-transport = { version = "0.9", default-features = false } -alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } -alloy-provider = { version = "0.9", default-features = false } +alloy-rpc-types-eth = { version = "0.14", default-features = false } +alloy-transport = { version = "0.14", default-features = false } +alloy-provider = { version = "0.14", default-features = false } ethereum-primitives = { package = "serai-processor-ethereum-primitives", path = "../primitives", default-features = false } diff --git a/processor/ethereum/erc20/src/lib.rs b/processor/ethereum/erc20/src/lib.rs index 20e086aa..2d07fde0 100644 --- a/processor/ethereum/erc20/src/lib.rs +++ b/processor/ethereum/erc20/src/lib.rs @@ -11,7 +11,6 @@ use alloy_sol_types::{SolInterface, SolEvent}; use alloy_rpc_types_eth::{Log, Filter, TransactionTrait}; use alloy_transport::{TransportErrorKind, RpcError}; -use alloy_simple_request_transport::SimpleRequest; use alloy_provider::{Provider, RootProvider}; use ethereum_primitives::LogIndex; @@ -94,7 +93,7 @@ impl Erc20 { // Yielding THE top-level transfer would require tracing the transaction execution and isn't // worth the effort. async fn top_level_transfer( - provider: &RootProvider, + provider: &RootProvider, erc20: Address, transaction_hash: [u8; 32], transfer_logs: &[Log], @@ -112,15 +111,13 @@ impl Erc20 { return Ok(None); } - // Don't validate the encoding as this can't be re-encoded to an identical bytestring due - // to the additional data appended after the call itself - let Ok(call) = IERC20Calls::abi_decode(transaction.inner.input(), false) else { + let Ok(call) = IERC20Calls::abi_decode(transaction.inner.input()) else { return Ok(None); }; // Extract the top-level call's from/to/value let (from, to, value) = match call { - IERC20Calls::transfer(transferCall { to, value }) => (transaction.from, to, value), + IERC20Calls::transfer(transferCall { to, value }) => (transaction.inner.signer(), to, value), IERC20Calls::transferFrom(transferFromCall { from, to, value }) => (from, to, value), // Treat any other function selectors as unrecognized _ => return Ok(None), @@ -149,7 +146,7 @@ impl Erc20 { } // Read the data appended after - let data = if let Ok(call) = SeraiIERC20Calls::abi_decode(transaction.inner.input(), true) { + let data = if let Ok(call) = SeraiIERC20Calls::abi_decode(transaction.inner.input()) { match call { SeraiIERC20Calls::transferWithInInstruction01BB244A8A( transferWithInInstructionCall { inInstruction, .. }, @@ -180,7 +177,7 @@ impl Erc20 { /// /// The `transfers` in the result are unordered. The `logs` are sorted by index. pub async fn top_level_transfers_unordered( - provider: &RootProvider, + provider: &RootProvider, blocks: RangeInclusive, erc20: Address, to: Address, diff --git a/processor/ethereum/erc20/src/tests.rs b/processor/ethereum/erc20/src/tests.rs index 037c7862..d837ffb1 100644 --- a/processor/ethereum/erc20/src/tests.rs +++ b/processor/ethereum/erc20/src/tests.rs @@ -12,4 +12,30 @@ fn selector_collisions() { ); } +#[test] +fn abi_decode_panic() { + use alloy_sol_types::SolInterface; + + /* + The following code panics with alloy-core 0.8, when the validate flag (commented out) is set to + `false`. This flag was removed with alloy-core 1.0, leaving the default behavior of + `abi_decode` to be `validate = false`. This test was added to ensure when we removed our + practice of `validate = true`, we didn't open ourselves up this as a DoS risk. + */ + assert!(crate::SeraiIERC20Calls::abi_decode( + &alloy_core::primitives::hex::decode(concat!( + "a9059cbb", + "0000000000000000000000000000000000000000000000000000000000000000", + "0000000000000000000000000000000000000000000000000000000000000000", + "000000000000000000000000000000000000000000000000000000000000006f", + "ffffffffff000000000000000000000000000000000000000000000000000023", + "000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "ffffff0000000000000000000000000000000000000000000000000000000000", + )) + .unwrap(), + // false + ) + .is_err()); +} + // This is primarily tested via serai-processor-ethereum-router diff --git a/processor/ethereum/primitives/Cargo.toml b/processor/ethereum/primitives/Cargo.toml index 89869cb8..0235b68d 100644 --- a/processor/ethereum/primitives/Cargo.toml +++ b/processor/ethereum/primitives/Cargo.toml @@ -22,5 +22,5 @@ borsh = { version = "1", default-features = false, features = ["std", "derive", group = { version = "0.13", default-features = false } k256 = { version = "^0.13.1", default-features = false, features = ["std", "arithmetic"] } -alloy-primitives = { version = "0.8", default-features = false } -alloy-consensus = { version = "0.9", default-features = false, features = ["k256"] } +alloy-primitives = { version = "1", default-features = false } +alloy-consensus = { version = "0.14", default-features = false, features = ["k256"] } diff --git a/processor/ethereum/primitives/src/lib.rs b/processor/ethereum/primitives/src/lib.rs index 2727ea22..ee0cf92b 100644 --- a/processor/ethereum/primitives/src/lib.rs +++ b/processor/ethereum/primitives/src/lib.rs @@ -7,7 +7,7 @@ use ::borsh::{BorshSerialize, BorshDeserialize}; use group::ff::PrimeField; use k256::Scalar; -use alloy_primitives::PrimitiveSignature; +use alloy_primitives::Signature; use alloy_consensus::{SignableTransaction, Signed, TxLegacy}; mod borsh; @@ -68,8 +68,7 @@ pub fn deterministically_sign(tx: TxLegacy) -> Signed { let s = Scalar::ONE; let r_bytes: [u8; 32] = r.to_repr().into(); let s_bytes: [u8; 32] = s.to_repr().into(); - let signature = - PrimitiveSignature::from_scalars_and_parity(r_bytes.into(), s_bytes.into(), false); + let signature = Signature::from_scalars_and_parity(r_bytes.into(), s_bytes.into(), false); let res = tx.into_signed(signature); debug_assert!(res.recover_signer().is_ok()); diff --git a/processor/ethereum/router/Cargo.toml b/processor/ethereum/router/Cargo.toml index 5cdd0b3a..320a1e33 100644 --- a/processor/ethereum/router/Cargo.toml +++ b/processor/ethereum/router/Cargo.toml @@ -22,19 +22,18 @@ borsh = { version = "1", default-features = false, features = ["std", "derive", group = { version = "0.13", default-features = false } k256 = { version = "0.13", default-features = false, features = ["std", "arithmetic"] } -alloy-core = { version = "0.8", default-features = false } +alloy-core = { version = "1", default-features = false } -alloy-sol-types = { version = "0.8", default-features = false } -alloy-sol-macro = { version = "0.8", default-features = false } +alloy-sol-types = { version = "1", default-features = false } +alloy-sol-macro = { version = "1", default-features = false } -alloy-consensus = { version = "0.9", default-features = false } +alloy-consensus = { version = "0.14", default-features = false } -alloy-rpc-types-eth = { version = "0.9", default-features = false } -alloy-transport = { version = "0.9", default-features = false } -alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } -alloy-provider = { version = "0.9", default-features = false } +alloy-rpc-types-eth = { version = "0.14", default-features = false } +alloy-transport = { version = "0.14", default-features = false } +alloy-provider = { version = "0.14", default-features = false } -revm = { version = "19", default-features = false, features = ["std"] } +revm = { version = "22", default-features = false, features = ["std"] } ethereum-schnorr = { package = "ethereum-schnorr-contract", path = "../../../networks/ethereum/schnorr", default-features = false } @@ -52,18 +51,19 @@ build-solidity-contracts = { path = "../../../networks/ethereum/build-contracts" syn = { version = "2", default-features = false, features = ["proc-macro"] } -syn-solidity = { version = "0.8", default-features = false } -alloy-sol-macro-input = { version = "0.8", default-features = false } -alloy-sol-macro-expander = { version = "0.8", default-features = false } +syn-solidity = { version = "1", default-features = false } +alloy-sol-macro-input = { version = "1", default-features = false } +alloy-sol-macro-expander = { version = "1", default-features = false } [dev-dependencies] rand_core = { version = "0.6", default-features = false, features = ["std"] } k256 = { version = "0.13", default-features = false, features = ["std"] } -alloy-provider = { version = "0.9", default-features = false, features = ["debug-api", "trace-api"] } -alloy-rpc-client = { version = "0.9", default-features = false } -alloy-node-bindings = { version = "0.9", default-features = false } +alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } +alloy-provider = { version = "0.14", default-features = false, features = ["debug-api", "trace-api"] } +alloy-rpc-client = { version = "0.14", default-features = false } +alloy-node-bindings = { version = "0.14", default-features = false } tokio = { version = "1.0", default-features = false, features = ["rt-multi-thread", "macros"] } diff --git a/processor/ethereum/router/src/gas.rs b/processor/ethereum/router/src/gas.rs index 266ad586..786e2bce 100644 --- a/processor/ethereum/router/src/gas.rs +++ b/processor/ethereum/router/src/gas.rs @@ -1,26 +1,130 @@ +use core::convert::Infallible; + use k256::{Scalar, ProjectivePoint}; -use alloy_core::primitives::{Address, U160, U256}; +use alloy_core::primitives::{Address, U256, Bytes}; use alloy_sol_types::SolCall; use revm::{ - primitives::*, - interpreter::{gas::*, opcode::InstructionTables, *}, - db::{emptydb::EmptyDB, in_memory_db::InMemoryDB}, - Handler, Context, EvmBuilder, Evm, + primitives::hardfork::SpecId, + bytecode::Bytecode, + state::AccountInfo, + database::{empty_db::EmptyDB, in_memory_db::InMemoryDB}, + interpreter::{ + gas::calculate_initial_tx_gas, + interpreter_action::{CallInputs, CallOutcome}, + interpreter::EthInterpreter, + Interpreter, + }, + handler::{ + instructions::EthInstructions, PrecompileProvider, EthPrecompiles, EthFrame, MainnetHandler, + }, + context::{ + result::{EVMError, InvalidTransaction, ExecutionResult}, + evm::{EvmData, Evm}, + context::Context, + *, + }, + inspector::{Inspector, InspectorHandler}, }; use ethereum_schnorr::{PublicKey, Signature}; use crate::*; +// The specification this uses +const SPEC_ID: SpecId = SpecId::CANCUN; + // The chain ID used for gas estimation const CHAIN_ID: U256 = U256::from_be_slice(&[1]); +type RevmContext = Context, ()>; + +fn precompiles() -> EthPrecompiles { + let mut precompiles = EthPrecompiles::default(); + PrecompileProvider::::set_spec(&mut precompiles, SPEC_ID); + precompiles +} + +/* + Instead of attempting to solve the halting problem, we assume all CALLs take the worst-case + amount of gas (as we do have bounds on the gas they're allowed to take). This assumption is + implemented via an revm Inspector. + + The Inspector is allowed to override the CALL directly. We don't do this due to the amount of + side effects a CALL has. Instead, we override the result. + + In the case the ERC20 is called, we additionally have it return `true` (as expected for compliant + ERC20s, and as will trigger the worst-case gas consumption by the Router itself). This is done by + hooking `call_end`. +*/ +pub(crate) struct WorstCaseCallInspector { + erc20: Option
, + call_depth: usize, + unused_gas: u64, + override_immediate_call_return_value: bool, +} +impl Inspector for WorstCaseCallInspector { + fn call(&mut self, _context: &mut RevmContext, _inputs: &mut CallInputs) -> Option { + self.call_depth += 1; + // Don't override the CALL immediately for prior described reasons + None + } + + fn call_end( + &mut self, + _context: &mut RevmContext, + inputs: &CallInputs, + outcome: &mut CallOutcome, + ) { + self.call_depth -= 1; + + /* + Mark the amount of gas left unused, for us to later assume will be used in practice. + + This only runs if the call-depth is 1 (so only the Router-made calls have their gas so + tracked), and if it's not to a precompile. This latter condition isn't solely because we can + perfectly model precompiles (which wouldn't be worth the complexity) yet because the Router + does call precompiles (ecrecover) and accordingly has to model the gas of that correctly. + */ + if (self.call_depth == 1) && (!precompiles().contains(&inputs.target_address)) { + let unused_gas = inputs.gas_limit - outcome.result.gas.spent(); + self.unused_gas += unused_gas; + + // Now that the CALL is over, flag we should normalize the values on the stack + self.override_immediate_call_return_value = true; + } + + // If ERC20, provide the expected ERC20 return data + if Some(inputs.target_address) == self.erc20 { + outcome.result.output = true.abi_encode().into(); + } + } + + fn step(&mut self, interpreter: &mut Interpreter, _context: &mut RevmContext) { + if self.override_immediate_call_return_value { + // We fix this result to having succeeded, which triggers the most-expensive pathing within + // the Router contract itself (some paths return early if a CALL fails) + let return_value = interpreter.stack.pop().unwrap(); + assert!((return_value == U256::ZERO) || (return_value == U256::ONE)); + assert!( + interpreter.stack.push(U256::ONE), + "stack capacity couldn't fit item after popping an item" + ); + self.override_immediate_call_return_value = false; + } + } +} + /// The object used for estimating gas. /// /// Due to `execute` heavily branching, we locally simulate calls with revm. -pub(crate) type GasEstimator = Evm<'static, (), InMemoryDB>; +pub(crate) type GasEstimator = Evm< + RevmContext, + WorstCaseCallInspector, + EthInstructions, + EthPrecompiles, +>; impl Router { const SMART_CONTRACT_NONCE_STORAGE_SLOT: U256 = U256::from_be_slice(&[0]); @@ -114,114 +218,26 @@ impl Router { db }; - // Create a custom handler so we can assume every CALL is the worst-case - let handler = { - let mut instructions = InstructionTables::<'_, _>::new_plain::(); - instructions.update_boxed(revm::interpreter::opcode::CALL, { - move |call_op, interpreter, host: &mut Context<_, _>| { - let (address_called, value, return_addr, return_len) = { - let stack = &mut interpreter.stack; - - let address = stack.peek(1).unwrap(); - let value = stack.peek(2).unwrap(); - let return_addr = stack.peek(5).unwrap(); - let return_len = stack.peek(6).unwrap(); - - ( - address, - value, - usize::try_from(return_addr).unwrap(), - usize::try_from(return_len).unwrap(), - ) - }; - let address_called = - Address::from(U160::from_be_slice(&address_called.to_be_bytes::<32>()[12 ..])); - - // Have the original call op incur its costs as programmed - call_op(interpreter, host); - - /* - Unfortunately, the call opcode executed only sets itself up, it doesn't handle the - entire inner call for us. We manually do so here by shimming the intended result. The - other option, on this path chosen, would be to shim the call-frame execution ourselves - and only then manipulate the result. - - Ideally, we wouldn't override CALL, yet STOP/RETURN (the tail of the CALL) to avoid all - of this. Those overrides weren't being successfully hit in initial experiments, and - while this solution does appear overly complicated, it's sufficiently tested to justify - itself. - - revm does cost the entire gas limit during the call setup. After the call completes, - it refunds whatever was unused. Since we manually complete the call here ourselves, - but don't implement that refund logic as we want the worst-case scenario, we do - successfully implement complete costing of the gas limit. - */ - - // Perform the call value transfer, which also marks the recipient as warm - assert!(host - .evm - .inner - .journaled_state - .transfer( - &interpreter.contract.target_address, - &address_called, - value, - &mut host.evm.inner.db - ) - .unwrap() - .is_none()); - - // Clear the call-to-be - debug_assert!(matches!(interpreter.next_action, InterpreterAction::Call { .. })); - interpreter.next_action = InterpreterAction::None; - interpreter.instruction_result = InstructionResult::Continue; - - // Clear the existing return data - interpreter.return_data_buffer.clear(); - - /* - If calling an ERC20, trigger the return data's worst-case by returning `true` - (as expected by compliant ERC20s). Else return none, as we expect none or won't bother - copying/decoding the return data. - - This doesn't affect calls to ecrecover as those use STATICCALL and this overrides CALL - alone. - */ - if Some(address_called) == erc20 { - interpreter.return_data_buffer = true.abi_encode().into(); - } - // Also copy the return data into memory - let return_len = return_len.min(interpreter.return_data_buffer.len()); - let needed_memory_size = return_addr + return_len; - if interpreter.shared_memory.len() < needed_memory_size { - assert!(interpreter.resize_memory(needed_memory_size)); - } - interpreter - .shared_memory - .slice_mut(return_addr, return_len) - .copy_from_slice(&interpreter.return_data_buffer[.. return_len]); - - // Finally, push the result of the call onto the stack - interpreter.stack.push(U256::from(1)).unwrap(); - } - }); - let mut handler = Handler::mainnet::(); - handler.set_instruction_table(instructions); - - handler - }; - - EvmBuilder::default() - .with_db(db) - .with_handler(handler) - .modify_cfg_env(|cfg| { - cfg.chain_id = CHAIN_ID.try_into().unwrap(); - }) - .modify_tx_env(|tx| { - tx.gas_limit = u64::MAX; - tx.transact_to = self.address.into(); - }) - .build() + Evm { + data: EvmData { + ctx: RevmContext::new(db, SPEC_ID) + .modify_cfg_chained(|cfg| { + cfg.chain_id = CHAIN_ID.try_into().unwrap(); + }) + .modify_tx_chained(|tx: &mut TxEnv| { + tx.gas_limit = u64::MAX; + tx.kind = self.address.into(); + }), + inspector: WorstCaseCallInspector { + erc20, + call_depth: 0, + unused_gas: 0, + override_immediate_call_return_value: false, + }, + }, + instruction: EthInstructions::default(), + precompiles: precompiles(), + } } /// The worst-case gas cost for a legacy transaction which executes this batch. @@ -242,11 +258,10 @@ impl Router { let fee = U256::from(1); // Set a balance of the amount sent out to ensure we don't error on that premise - { - let db = gas_estimator.db_mut(); + gas_estimator.data.ctx.modify_db(|db| { let account = db.load_account(self.address).unwrap(); account.info.balance = fee + outs.0.iter().map(|out| out.amount).sum::(); - } + }); fee } @@ -271,8 +286,7 @@ impl Router { consistent use of nonce #1 shows storage read/writes aren't being persisted. They're solely returned upon execution in a `state` field we ignore. */ - { - let tx = gas_estimator.tx_mut(); + gas_estimator.data.ctx.modify_tx(|tx| { tx.caller = Address::from({ /* We assume the transaction sender is not the destination of any `OutInstruction`, making @@ -296,25 +310,35 @@ impl Router { )) .abi_encode() .into(); - } + }); // Execute the transaction - let mut gas = match gas_estimator.transact().unwrap().result { + let mut gas = match MainnetHandler::< + _, + EVMError, + EthFrame<_, _, _>, + >::default() + .inspect_run(&mut gas_estimator) + .unwrap() + .result + { ExecutionResult::Success { gas_used, gas_refunded, .. } => { assert_eq!(gas_refunded, 0); gas_used } res => panic!("estimated execute transaction failed: {res:?}"), }; + gas += gas_estimator.into_inspector().unused_gas; // The transaction uses gas based on the amount of non-zero bytes in the calldata, which is - // variable to the fee, which is variable to the gad used. This iterates until parity + // variable to the fee, which is variable to the gas used. This iterates until parity let initial_gas = |fee, sig| { let gas = calculate_initial_tx_gas( - SpecId::CANCUN, + SPEC_ID, &abi::executeCall::new((sig, Address::from(coin), fee, outs.0.clone())).abi_encode(), false, - &[], + 0, + 0, 0, ); assert_eq!(gas.floor_gas, 0); diff --git a/processor/ethereum/router/src/lib.rs b/processor/ethereum/router/src/lib.rs index f052763e..d5b2f3cf 100644 --- a/processor/ethereum/router/src/lib.rs +++ b/processor/ethereum/router/src/lib.rs @@ -19,7 +19,6 @@ use alloy_consensus::TxLegacy; use alloy_rpc_types_eth::{BlockId, Log, Filter, TransactionInput, TransactionRequest}; use alloy_transport::{TransportErrorKind, RpcError}; -use alloy_simple_request_transport::SimpleRequest; use alloy_provider::{Provider, RootProvider}; use scale::Encode; @@ -48,6 +47,7 @@ mod _irouter_abi { #[expect(warnings)] #[expect(needless_pass_by_value)] #[expect(clippy::all)] +#[expect(clippy::unused_self)] #[expect(clippy::ignored_unit_patterns)] #[expect(clippy::redundant_closure_for_method_calls)] mod _router_abi { @@ -236,7 +236,7 @@ pub struct Escape { /// A view of the Router for Serai. #[derive(Clone, Debug)] pub struct Router { - provider: Arc>, + provider: Arc, address: Address, empty_execute_gas: HashMap, } @@ -272,7 +272,7 @@ impl Router { /// This performs an on-chain lookup for the first deployed Router constructed with this public /// key. This lookup is of a constant amount of calls and does not read any logs. pub async fn new( - provider: Arc>, + provider: Arc, initial_serai_key: &PublicKey, ) -> Result, RpcError> { let Some(deployer) = Deployer::new(provider.clone()).await? else { @@ -573,7 +573,7 @@ impl Router { if log.topics().first() != Some(&Transfer::SIGNATURE_HASH) { continue; } - let Ok(transfer) = Transfer::decode_log(&log.inner.clone(), true) else { continue }; + let Ok(transfer) = Transfer::decode_log(&log.inner.clone()) else { continue }; // Check if this aligns with the InInstruction if (transfer.from == in_instruction.from) && (transfer.to == self.address) && @@ -743,11 +743,11 @@ impl Router { ) -> Result, RpcError> { let call = TransactionRequest::default().to(self.address).input(TransactionInput::new(call.into())); - let bytes = self.provider.call(&call).block(block).await?; + let bytes = self.provider.call(call).block(block).await?; // This is fine as both key calls share a return type - let res = abi::nextSeraiKeyCall::abi_decode_returns(&bytes, true) + let res = abi::nextSeraiKeyCall::abi_decode_returns(&bytes) .map_err(|e| TransportErrorKind::Custom(format!("failed to decode key: {e:?}").into()))?; - let eth_repr = <[u8; 32]>::from(res._0); + let eth_repr = <[u8; 32]>::from(res); Ok(if eth_repr == [0; 32] { None } else { @@ -778,10 +778,10 @@ impl Router { let call = TransactionRequest::default() .to(self.address) .input(TransactionInput::new(abi::nextNonceCall::new(()).abi_encode().into())); - let bytes = self.provider.call(&call).block(block).await?; - let res = abi::nextNonceCall::abi_decode_returns(&bytes, true) + let bytes = self.provider.call(call).block(block).await?; + let res = abi::nextNonceCall::abi_decode_returns(&bytes) .map_err(|e| TransportErrorKind::Custom(format!("failed to decode nonce: {e:?}").into()))?; - Ok(u64::try_from(res._0).map_err(|_| { + Ok(u64::try_from(res).map_err(|_| { TransportErrorKind::Custom("nonce returned exceeded 2**64".to_string().into()) })?) } @@ -794,10 +794,10 @@ impl Router { let call = TransactionRequest::default() .to(self.address) .input(TransactionInput::new(abi::escapedToCall::new(()).abi_encode().into())); - let bytes = self.provider.call(&call).block(block).await?; - let res = abi::escapedToCall::abi_decode_returns(&bytes, true).map_err(|e| { + let bytes = self.provider.call(call).block(block).await?; + let res = abi::escapedToCall::abi_decode_returns(&bytes).map_err(|e| { TransportErrorKind::Custom(format!("failed to decode the address escaped to: {e:?}").into()) })?; - Ok(if res._0 == Address([0; 20].into()) { None } else { Some(res._0) }) + Ok(if res == Address::ZERO { None } else { Some(res) }) } } diff --git a/processor/ethereum/router/src/tests/create_address.rs b/processor/ethereum/router/src/tests/create_address.rs index 339c44b2..627db581 100644 --- a/processor/ethereum/router/src/tests/create_address.rs +++ b/processor/ethereum/router/src/tests/create_address.rs @@ -6,7 +6,7 @@ use alloy_consensus::TxLegacy; use alloy_rpc_types_eth::{TransactionInput, TransactionRequest}; use alloy_provider::Provider; -use revm::{primitives::SpecId, interpreter::gas::calculate_initial_tx_gas}; +use revm::{primitives::hardfork::SpecId, interpreter::gas::calculate_initial_tx_gas}; use crate::tests::Test; @@ -65,13 +65,13 @@ async fn test_create_address() { let call = TransactionRequest::default().to(address).input(TransactionInput::new(input.clone().into())); assert_eq!( - &test.provider.call(&call).await.unwrap().as_ref()[12 ..], + &test.provider.call(call.clone()).await.unwrap().as_ref()[12 ..], address.create(nonce).as_slice(), ); // Check the function is constant-gas - let gas_used = test.provider.estimate_gas(&call).await.unwrap(); - let initial_gas = calculate_initial_tx_gas(SpecId::CANCUN, &input, false, &[], 0).initial_gas; + let gas_used = test.provider.estimate_gas(call).await.unwrap(); + let initial_gas = calculate_initial_tx_gas(SpecId::CANCUN, &input, false, 0, 0, 0).initial_gas; let this_call = gas_used - initial_gas; if gas.is_none() { gas = Some(this_call); diff --git a/processor/ethereum/router/src/tests/erc20.rs b/processor/ethereum/router/src/tests/erc20.rs index 02dc957e..dd471923 100644 --- a/processor/ethereum/router/src/tests/erc20.rs +++ b/processor/ethereum/router/src/tests/erc20.rs @@ -86,13 +86,13 @@ impl Erc20 { let call = TransactionRequest::default().to(self.0).input(TransactionInput::new( abi::TestERC20::balanceOfCall::new((account,)).abi_encode().into(), )); - U256::abi_decode(&test.provider.call(&call).await.unwrap(), true).unwrap() + U256::abi_decode(&test.provider.call(call).await.unwrap()).unwrap() } pub(crate) async fn router_approval(&self, test: &Test, account: Address) -> U256 { let call = TransactionRequest::default().to(self.0).input(TransactionInput::new( abi::TestERC20::allowanceCall::new((test.router.address(), account)).abi_encode().into(), )); - U256::abi_decode(&test.provider.call(&call).await.unwrap(), true).unwrap() + U256::abi_decode(&test.provider.call(call).await.unwrap()).unwrap() } } diff --git a/processor/ethereum/router/src/tests/mod.rs b/processor/ethereum/router/src/tests/mod.rs index 403e871e..433f988f 100644 --- a/processor/ethereum/router/src/tests/mod.rs +++ b/processor/ethereum/router/src/tests/mod.rs @@ -63,7 +63,7 @@ struct CalldataAgnosticGas; impl CalldataAgnosticGas { #[must_use] fn calculate(input: &[u8], mut constant_zero_bytes: usize, gas_used: u64) -> u64 { - use revm::{primitives::SpecId, interpreter::gas::calculate_initial_tx_gas}; + use revm::{primitives::hardfork::SpecId, interpreter::gas::calculate_initial_tx_gas}; let mut without_variable_zero_bytes = Vec::with_capacity(input.len()); for byte in input { @@ -76,9 +76,9 @@ impl CalldataAgnosticGas { } } gas_used + - (calculate_initial_tx_gas(SpecId::CANCUN, &without_variable_zero_bytes, false, &[], 0) + (calculate_initial_tx_gas(SpecId::CANCUN, &without_variable_zero_bytes, false, 0, 0, 0) .initial_gas - - calculate_initial_tx_gas(SpecId::CANCUN, input, false, &[], 0).initial_gas) + calculate_initial_tx_gas(SpecId::CANCUN, input, false, 0, 0, 0).initial_gas) } } @@ -92,7 +92,7 @@ struct RouterState { struct Test { #[allow(unused)] anvil: AnvilInstance, - provider: Arc>, + provider: Arc, chain_id: U256, router: Router, state: RouterState, @@ -173,8 +173,8 @@ impl Test { let call = TransactionRequest::default() .to(self.router.address()) .input(TransactionInput::new(tx.input)); - let call_err = self.provider.call(&call).await.unwrap_err(); - call_err.as_error_resp().unwrap().as_decoded_error::(true).unwrap() + let call_err = self.provider.call(call).await.unwrap_err(); + call_err.as_error_resp().unwrap().as_decoded_interface_error::().unwrap() } fn confirm_next_serai_key_tx(&self) -> TxLegacy { @@ -574,11 +574,11 @@ async fn test_empty_execute() { TransactionRequest::default().to(token).input(TransactionInput::new(vec![].into())); // Check it returns the expected result assert_eq!( - test.provider.call(&call).await.unwrap().as_ref(), + test.provider.call(call.clone()).await.unwrap().as_ref(), U256::from(1).abi_encode().as_slice() ); // Check it has the expected gas cost (16 is documented in `return_true_code`) - assert_eq!(test.provider.estimate_gas(&call).await.unwrap(), 21_000 + 16); + assert_eq!(test.provider.estimate_gas(call).await.unwrap(), 21_000 + 16); } let gas = test.router.execute_gas(Coin::Erc20(token), U256::from(0), &[].as_slice().into()); @@ -700,6 +700,35 @@ async fn test_eth_code_out_instruction() { assert_eq!(test.provider.get_code_at(deployed).await.unwrap().to_vec(), true.abi_encode()); } +#[tokio::test] +async fn test_eth_code_out_instruction_reverts() { + let mut test = Test::new().await; + test.confirm_next_serai_key().await; + let () = test + .provider + .raw_request("anvil_setBalance".into(), (test.router.address(), 1_000_000)) + .await + .unwrap(); + + // [REVERT], which will cause `executeArbitraryCode`'s call to CREATE to fail + let code = vec![0xfd]; + let amount_out = U256::from(0); + let out_instructions = OutInstructions::from( + [( + SeraiEthereumAddress::Contract(ContractDeployment::new(50_000, code.clone()).unwrap()), + amount_out, + )] + .as_slice(), + ); + + let gas = test.router.execute_gas(Coin::Ether, U256::from(1), &out_instructions); + let fee = U256::from(gas); + let (tx, gas_used) = test.execute(Coin::Ether, fee, out_instructions, vec![true]).await; + + let unused_gas = test.gas_unused_by_calls(&tx).await; + assert_eq!(gas_used + unused_gas, gas); +} + #[tokio::test] async fn test_erc20_code_out_instruction() { let mut test = Test::new().await; diff --git a/processor/ethereum/src/publisher.rs b/processor/ethereum/src/publisher.rs index 3d18a6ef..afeb2603 100644 --- a/processor/ethereum/src/publisher.rs +++ b/processor/ethereum/src/publisher.rs @@ -4,7 +4,6 @@ use std::sync::Arc; use alloy_rlp::Encodable; use alloy_transport::{TransportErrorKind, RpcError}; -use alloy_simple_request_transport::SimpleRequest; use alloy_provider::RootProvider; use tokio::{ @@ -26,13 +25,13 @@ use crate::{ #[derive(Clone)] pub(crate) struct TransactionPublisher { db: D, - rpc: Arc>, + rpc: Arc, router: Arc>>, relayer_url: String, } impl TransactionPublisher { - pub(crate) fn new(db: D, rpc: Arc>, relayer_url: String) -> Self { + pub(crate) fn new(db: D, rpc: Arc, relayer_url: String) -> Self { Self { db, rpc, router: Arc::new(RwLock::new(None)), relayer_url } } diff --git a/processor/ethereum/src/rpc.rs b/processor/ethereum/src/rpc.rs index 57c14f59..943a529c 100644 --- a/processor/ethereum/src/rpc.rs +++ b/processor/ethereum/src/rpc.rs @@ -2,9 +2,8 @@ use core::future::Future; use std::{sync::Arc, collections::HashSet}; use alloy_core::primitives::B256; -use alloy_rpc_types_eth::{Header, BlockTransactionsKind, BlockNumberOrTag}; +use alloy_rpc_types_eth::{Header, BlockNumberOrTag}; use alloy_transport::{RpcError, TransportErrorKind}; -use alloy_simple_request_transport::SimpleRequest; use alloy_provider::{Provider, RootProvider}; use serai_client::primitives::{ExternalNetworkId, ExternalCoin, Amount}; @@ -26,7 +25,7 @@ use crate::{ #[derive(Clone)] pub(crate) struct Rpc { pub(crate) db: D, - pub(crate) provider: Arc>, + pub(crate) provider: Arc, } impl ScannerFeed for Rpc { @@ -49,7 +48,7 @@ impl ScannerFeed for Rpc { async move { let actual_number = self .provider - .get_block(BlockNumberOrTag::Finalized.into(), BlockTransactionsKind::Hashes) + .get_block(BlockNumberOrTag::Finalized.into()) .await? .ok_or_else(|| { TransportErrorKind::Custom("there was no finalized block".to_string().into()) @@ -77,7 +76,7 @@ impl ScannerFeed for Rpc { async move { let header = self .provider - .get_block(BlockNumberOrTag::Number(number).into(), BlockTransactionsKind::Hashes) + .get_block(BlockNumberOrTag::Number(number).into()) .await? .ok_or_else(|| { TransportErrorKind::Custom( @@ -105,7 +104,7 @@ impl ScannerFeed for Rpc { } else { self .provider - .get_block((start - 1).into(), BlockTransactionsKind::Hashes) + .get_block((start - 1).into()) .await? .ok_or_else(|| { TransportErrorKind::Custom( @@ -120,7 +119,7 @@ impl ScannerFeed for Rpc { let end_header = self .provider - .get_block((start + 31).into(), BlockTransactionsKind::Hashes) + .get_block((start + 31).into()) .await? .ok_or_else(|| { TransportErrorKind::Custom( @@ -177,7 +176,7 @@ impl ScannerFeed for Rpc { while to_check != epoch.prior_end_hash { let to_check_block = self .provider - .get_block(B256::from(to_check).into(), BlockTransactionsKind::Hashes) + .get_block(B256::from(to_check).into()) .await? .ok_or_else(|| { TransportErrorKind::Custom( diff --git a/processor/ethereum/test-primitives/Cargo.toml b/processor/ethereum/test-primitives/Cargo.toml index 6d3b4c1d..2efb6b1e 100644 --- a/processor/ethereum/test-primitives/Cargo.toml +++ b/processor/ethereum/test-primitives/Cargo.toml @@ -19,11 +19,10 @@ workspace = true [dependencies] k256 = { version = "0.13", default-features = false, features = ["std"] } -alloy-core = { version = "0.8", default-features = false } -alloy-consensus = { version = "0.9", default-features = false, features = ["std"] } +alloy-core = { version = "1", default-features = false } +alloy-consensus = { version = "0.14", default-features = false, features = ["std"] } -alloy-rpc-types-eth = { version = "0.9", default-features = false } -alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } -alloy-provider = { version = "0.9", default-features = false } +alloy-rpc-types-eth = { version = "0.14", default-features = false } +alloy-provider = { version = "0.14", default-features = false } ethereum-primitives = { package = "serai-processor-ethereum-primitives", path = "../primitives", default-features = false } diff --git a/processor/ethereum/test-primitives/src/lib.rs b/processor/ethereum/test-primitives/src/lib.rs index 47cc983e..d0d2a12c 100644 --- a/processor/ethereum/test-primitives/src/lib.rs +++ b/processor/ethereum/test-primitives/src/lib.rs @@ -5,13 +5,12 @@ use k256::{elliptic_curve::sec1::ToEncodedPoint, ProjectivePoint}; use alloy_core::{ - primitives::{Address, U256, Bytes, PrimitiveSignature, TxKind}, + primitives::{Address, U256, Bytes, Signature, TxKind}, hex::FromHex, }; use alloy_consensus::{SignableTransaction, TxLegacy, Signed}; use alloy_rpc_types_eth::TransactionReceipt; -use alloy_simple_request_transport::SimpleRequest; use alloy_provider::{Provider, RootProvider}; use ethereum_primitives::{keccak256, deterministically_sign}; @@ -24,7 +23,7 @@ fn address(point: &ProjectivePoint) -> [u8; 20] { } /// Fund an account. -pub async fn fund_account(provider: &RootProvider, address: Address, value: U256) { +pub async fn fund_account(provider: &RootProvider, address: Address, value: U256) { let _: () = provider .raw_request("anvil_setBalance".into(), [address.to_string(), value.to_string()]) .await @@ -32,10 +31,7 @@ pub async fn fund_account(provider: &RootProvider, address: Addre } /// Publish an already-signed transaction. -pub async fn publish_tx( - provider: &RootProvider, - tx: Signed, -) -> TransactionReceipt { +pub async fn publish_tx(provider: &RootProvider, tx: Signed) -> TransactionReceipt { // Fund the sender's address fund_account( provider, @@ -55,7 +51,7 @@ pub async fn publish_tx( /// /// The contract deployment will be done by a random account. pub async fn deploy_contract( - provider: &RootProvider, + provider: &RootProvider, file_path: &str, constructor_arguments: &[u8], ) -> Address { @@ -88,7 +84,7 @@ pub async fn deploy_contract( /// /// This assumes the wallet is funded. pub async fn send( - provider: &RootProvider, + provider: &RootProvider, wallet: &k256::ecdsa::SigningKey, mut tx: TxLegacy, ) -> TransactionReceipt { @@ -111,7 +107,7 @@ pub async fn send( ); let mut bytes = vec![]; - tx.into_signed(PrimitiveSignature::from(sig)).eip2718_encode(&mut bytes); + tx.into_signed(Signature::from(sig)).eip2718_encode(&mut bytes); let pending_tx = provider.send_raw_transaction(&bytes).await.unwrap(); pending_tx.get_receipt().await.unwrap() } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d99e6588..903c9fbd 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.81" +channel = "1.86" targets = ["wasm32-unknown-unknown"] profile = "minimal" components = ["rust-src", "rustfmt", "clippy"]