From 57bd1d588baf48398fad5fb1a3a37b932b509814 Mon Sep 17 00:00:00 2001 From: Chris Smith <1979423+chris13524@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:25:26 -0700 Subject: [PATCH] fix: upgrade IRN and alloy (#784) * chore: upgrade IRN and alloy * chore: bump * chore: remove submodule * chore: use tagged versions --- Cargo.lock | 499 ++++++++++++++++++++++++++++------------- Cargo.toml | 9 +- irn | 2 +- src/storage/error.rs | 2 +- src/storage/irn/mod.rs | 26 +-- 5 files changed, 356 insertions(+), 182 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e723d139d..16d48823d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,6 +67,19 @@ dependencies = [ "memchr", ] +[[package]] +name = "alloc" +version = "0.1.0" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1#bf8f50a711180afbf79b8c334c65b57886173d4b" +dependencies = [ + "serde", + "serde_json", + "thiserror", + "tikv-jemalloc-ctl", + "tikv-jemallocator", + "wc_metrics", +] + [[package]] name = "alloc" version = "0.1.0" @@ -101,10 +114,42 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "alloy" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-json-rpc", + "alloy-network", + "alloy-provider", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-transport", + "alloy-transport-http", +] + +[[package]] +name = "alloy-chains" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf770dad29577cd3580f3dd09005799224a912b8cdfdd6dc04d030d42b3df4e" +dependencies = [ + "num_enum", + "strum", +] + [[package]] name = "alloy-consensus" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -112,20 +157,21 @@ dependencies = [ "alloy-serde", "c-kzg", "serde", - "sha2", ] [[package]] name = "alloy-contract" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-provider", - "alloy-rpc-types", + "alloy-rpc-types-eth", "alloy-sol-types", "alloy-transport", "futures", @@ -133,11 +179,23 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b095eb0533144b4497e84a9cc3e44a5c2e3754a3983c0376a55a2f9183a53e" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", +] + [[package]] name = "alloy-dyn-abi" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413902aa18a97569e60f679c23f46a18db1656d87ab4d4e49d0e1e52042f66df" +checksum = "4004925bff5ba0a11739ae84dbb6601a981ea692f3bd45b626935ee90a6b8471" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -151,22 +209,50 @@ dependencies = [ ] [[package]] -name = "alloy-eips" +name = "alloy-eip2930" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", "alloy-primitives", "alloy-rlp", "alloy-serde", "c-kzg", + "derive_more 1.0.0", "once_cell", "serde", + "sha2", ] [[package]] name = "alloy-genesis" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" dependencies = [ "alloy-primitives", "alloy-serde", @@ -175,9 +261,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" +checksum = "9996daf962fd0a90d3c93b388033228865953b92de7bb1959b891d78750a4091" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -187,10 +273,12 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" dependencies = [ "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", "thiserror", @@ -199,46 +287,48 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-json-rpc", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types", + "alloy-rpc-types-eth", + "alloy-serde", "alloy-signer", + "alloy-sol-types", "async-trait", + "auto_impl", "futures-utils-wasm", "thiserror", ] [[package]] -name = "alloy-node-bindings" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +name = "alloy-network-primitives" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" dependencies = [ - "alloy-genesis", + "alloy-eips", "alloy-primitives", - "k256", - "serde_json", - "tempfile", - "thiserror", - "tracing", - "url", + "alloy-serde", + "serde", ] [[package]] name = "alloy-primitives" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" +checksum = "411aff151f2a73124ee473708e82ed51b2535f68928b6a1caa8bc1246ae6f7cd" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", - "derive_more 0.99.18", + "derive_more 1.0.0", "hex-literal", "itoa", "k256", @@ -252,27 +342,33 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927f708dd457ed63420400ee5f06945df9632d5d101851952056840426a10dc5" dependencies = [ + "alloy-chains", + "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-rpc-client", - "alloy-rpc-types", - "alloy-rpc-types-trace", + "alloy-rpc-types-eth", "alloy-transport", "alloy-transport-http", "async-stream", "async-trait", "auto_impl", - "dashmap", + "dashmap 6.1.0", "futures", "futures-utils-wasm", "lru", + "pin-project", "reqwest 0.12.7", + "serde", "serde_json", + "thiserror", "tokio", "tracing", "url", @@ -302,8 +398,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d82952dca71173813d4e5733e2c986d8b04aea9e0f3b0a576664c232ad050a5" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -315,45 +412,48 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.5.1", "tracing", "url", ] [[package]] name = "alloy-rpc-types" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-genesis", - "alloy-primitives", - "alloy-rlp", + "alloy-rpc-types-eth", "alloy-serde", - "alloy-sol-types", - "itertools 0.12.1", "serde", - "serde_json", - "thiserror", ] [[package]] -name = "alloy-rpc-types-trace" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +name = "alloy-rpc-types-eth" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types", + "alloy-rlp", "alloy-serde", + "alloy-sol-types", + "cfg-if", + "derive_more 1.0.0", + "hashbrown 0.14.5", + "itertools 0.13.0", "serde", "serde_json", ] [[package]] name = "alloy-serde" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" dependencies = [ "alloy-primitives", "serde", @@ -362,8 +462,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" dependencies = [ "alloy-primitives", "async-trait", @@ -375,13 +476,13 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" +checksum = "0458ccb02a564228fcd76efb8eb5a520521a8347becde37b402afec9a1b83859" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", - "proc-macro-error", + "proc-macro-error2", "proc-macro2 1.0.86", "quote 1.0.37", "syn 2.0.77", @@ -389,15 +490,16 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" +checksum = "2bc65475025fc1e84bf86fc840f04f63fcccdcf3cf12053c99918e4054dfbc69" dependencies = [ + "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck 0.5.0", "indexmap 2.5.0", - "proc-macro-error", + "proc-macro-error2", "proc-macro2 1.0.86", "quote 1.0.37", "syn 2.0.77", @@ -407,24 +509,26 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" +checksum = "6ed10f0715a0b69fde3236ff3b9ae5f6f7c97db5a387747100070d3016b9266b" dependencies = [ + "alloy-json-abi", "const-hex", "dunce", "heck 0.5.0", "proc-macro2 1.0.86", "quote 1.0.37", + "serde_json", "syn 2.0.77", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbcba3ca07cf7975f15d871b721fb18031eec8bce51103907f6dcce00b255d98" +checksum = "3edae8ea1de519ccba896b6834dec874230f72fe695ff3c9c118e90ec7cff783" dependencies = [ "serde", "winnow", @@ -432,10 +536,11 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +checksum = "1eb88e4da0a1b697ed6a9f811fdba223cf4d5c21410804fd1707836af73a462b" dependencies = [ + "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", "const-hex", @@ -444,8 +549,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33616b2edf7454302a1d48084db185e52c309f73f6c10be99b0fe39354b3f1e9" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -455,21 +561,23 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.5.1", + "tracing", "url", - "wasm-bindgen-futures", ] [[package]] name = "alloy-transport-http" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=d68a6b7#d68a6b787b2904061f0ae7fcc02ece8513e3c500" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" dependencies = [ "alloy-json-rpc", "alloy-transport", "reqwest 0.12.7", "serde_json", - "tower", + "tower 0.5.1", + "tracing", "url", ] @@ -513,6 +621,12 @@ version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" +[[package]] +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + [[package]] name = "ark-ff" version = "0.3.0" @@ -1301,7 +1415,7 @@ dependencies = [ "sync_wrapper 0.1.2", "tokio", "tokio-tungstenite 0.20.1", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] @@ -1769,7 +1883,7 @@ dependencies = [ [[package]] name = "collections" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.12.0#5d76e0cac9d4c74d60fb71a05ced2e7e7a1bd8d6" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1#bf8f50a711180afbf79b8c334c65b57886173d4b" [[package]] name = "combine" @@ -1839,12 +1953,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation" version = "0.9.4" @@ -2044,6 +2152,20 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -2176,27 +2298,25 @@ version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ - "convert_case", "proc-macro2 1.0.86", "quote 1.0.37", - "rustc_version 0.4.1", "syn 2.0.77", ] [[package]] name = "derive_more" -version = "1.0.0-beta.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7abbfc297053be59290e3152f8cbcd52c8642e0728b69ee187d991d4c1af08d" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "1.0.0-beta.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bba3e9872d7c58ce7ef0fcf1844fcc3e23ef2a58377b50df35dd98e42a5726e" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", @@ -2481,6 +2601,26 @@ dependencies = [ "syn 1.0.109", ] +[[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 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "envy" version = "0.4.2" @@ -3002,7 +3142,7 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "future" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.12.0#5d76e0cac9d4c74d60fb71a05ced2e7e7a1bd8d6" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1#bf8f50a711180afbf79b8c334c65b57886173d4b" dependencies = [ "pin-project", "thiserror", @@ -3022,15 +3162,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "future_metrics" -version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.12.0#5d76e0cac9d4c74d60fb71a05ced2e7e7a1bd8d6" -dependencies = [ - "metrics 0.23.0", - "pin-project", -] - [[package]] name = "futures" version = "0.3.30" @@ -3244,7 +3375,7 @@ dependencies = [ "hyper 0.14.30", "maxminddb", "thiserror", - "tower", + "tower 0.4.13", "tower-layer", "tracing", ] @@ -3383,6 +3514,7 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", + "serde", ] [[package]] @@ -3741,7 +3873,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", + "tower 0.4.13", "tower-service", "tracing", ] @@ -3973,12 +4105,12 @@ version = "0.1.0" dependencies = [ "async-stream", "data-encoding", - "derive_more 1.0.0-beta.6", + "derive_more 1.0.0", "ed25519-dalek", "futures", "futures-util", + "irn_rpc", "metrics 0.23.0", - "network", "postcard", "rand", "ring 0.17.8", @@ -3989,10 +4121,40 @@ dependencies = [ "tokio", "tracing", "tryhard", - "wc 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.12.0)", + "wc 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1)", "xxhash-rust", ] +[[package]] +name = "irn_rpc" +version = "0.1.0" +dependencies = [ + "backoff", + "derivative", + "derive_more 1.0.0", + "futures", + "indexmap 2.5.0", + "libp2p", + "libp2p-tls 0.3.0", + "metrics 0.23.0", + "pin-project", + "quinn 0.10.2", + "quinn-proto 0.10.6", + "rand", + "rustls 0.21.12", + "serde", + "socket2", + "tap", + "thiserror", + "tokio", + "tokio-serde", + "tokio-serde-postcard", + "tokio-stream", + "tokio-util", + "tracing", + "wc 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1)", +] + [[package]] name = "itertools" version = "0.10.5" @@ -4013,9 +4175,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -4830,36 +4992,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "network" -version = "0.1.0" -dependencies = [ - "backoff", - "derivative", - "derive_more 0.99.18", - "futures", - "indexmap 2.5.0", - "libp2p", - "libp2p-tls 0.3.0", - "metrics 0.23.0", - "pin-project", - "quinn 0.10.2", - "quinn-proto 0.10.6", - "rand", - "rustls 0.21.12", - "serde", - "socket2", - "tap", - "thiserror", - "tokio", - "tokio-serde", - "tokio-serde-postcard", - "tokio-stream", - "tokio-util", - "tracing", - "wc 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.12.0)", -] - [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -5191,7 +5323,7 @@ checksum = "8b3a2a91fdbfdd4d212c0dcc2ab540de2c2bcbbd90be17de7a7daf8822d010c1" dependencies = [ "async-trait", "crossbeam-channel", - "dashmap", + "dashmap 5.5.3", "fnv", "futures-channel", "futures-executor", @@ -5700,6 +5832,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "proc-macro2" version = "0.4.30" @@ -6133,18 +6287,9 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relay_rpc" version = "0.1.0" -source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.30.0#edd6b6bcaa360e0887b4930ba78d56c958700612" +source = "git+https://github.com/WalletConnect/WalletConnectRust.git?tag=v0.32.0#51e984e512de13aae634a3e49cd00072c1a6dd6a" dependencies = [ - "alloy-contract", - "alloy-json-abi", - "alloy-json-rpc", - "alloy-node-bindings", - "alloy-primitives", - "alloy-provider", - "alloy-rpc-types", - "alloy-sol-types", - "alloy-transport", - "alloy-transport-http", + "alloy", "bs58 0.4.0", "chrono", "data-encoding", @@ -6386,8 +6531,9 @@ dependencies = [ "bytes", "cerberus", "chrono", + "data-encoding", "deadpool-redis", - "derive_more 0.99.18", + "derive_more 1.0.0", "dotenv", "envy", "ethers", @@ -6397,9 +6543,9 @@ dependencies = [ "hyper-tls 0.5.0", "ipnet", "irn_api", + "irn_rpc", "jsonrpc", "moka", - "network", "num_enum", "once_cell", "parquet", @@ -6426,7 +6572,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-http", "tracing", "tracing-subscriber", @@ -7505,9 +7651,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" +checksum = "4b95156f8b577cb59dc0b1df15c6f29a10afc5f8a7ac9786b0b5c68c19149278" dependencies = [ "paste", "proc-macro2 1.0.86", @@ -7990,6 +8136,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-http" version = "0.4.4" @@ -8004,7 +8164,7 @@ dependencies = [ "http-body 0.4.6", "http-range-header", "pin-project-lite", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -8523,11 +8683,12 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wc" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.12.0#5d76e0cac9d4c74d60fb71a05ced2e7e7a1bd8d6" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1#bf8f50a711180afbf79b8c334c65b57886173d4b" dependencies = [ + "alloc 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1)", "collections", - "future 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.12.0)", - "future_metrics", + "future 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1)", + "wc_metrics", ] [[package]] @@ -8535,7 +8696,7 @@ name = "wc" version = "0.1.0" source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.9.0#e2bc55dd0e06f30471d39bfbaedc71362136b677" dependencies = [ - "alloc", + "alloc 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.9.0)", "analytics", "future 0.1.0 (git+https://github.com/WalletConnect/utils-rs.git?tag=v0.9.0)", "geoip", @@ -8544,6 +8705,20 @@ dependencies = [ "rate_limit", ] +[[package]] +name = "wc_metrics" +version = "0.1.0" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.14.1#bf8f50a711180afbf79b8c334c65b57886173d4b" +dependencies = [ + "arc-swap", + "enum-ordinalize", + "futures", + "metrics 0.23.0", + "parking_lot", + "pin-project", + "smallvec", +] + [[package]] name = "web-sys" version = "0.3.70" @@ -8608,7 +8783,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index cd3ae5be7..cc529e855 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ build = "build.rs" [dependencies] wc = { git = "https://github.com/WalletConnect/utils-rs.git", tag = "v0.9.0", features = ["alloc", "analytics", "future", "http", "metrics", "geoip", "geoblock", "rate_limit"] } -relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.30.0", features = ["cacao"] } +relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.32.0", features = ["cacao"] } # Async async-trait = "0.1.81" @@ -51,14 +51,14 @@ sqlx = { version = "0.7.4", features = ["runtime-tokio-native-tls", "postgres", # IRN irn_api = { package = "irn_api", path = "irn/crates/irn_api", features = ["client"] } -irn_network = { package = "network", path = "irn/crates/network"} +irn_rpc = { package = "irn_rpc", path = "irn/crates/rpc"} dotenv = "0.15.0" envy = "0.4" anyhow = "1" thiserror = "1.0" -derive_more = "0.99" +derive_more = "1.0.0" once_cell = "1.15" ipnet = "2.5" @@ -79,9 +79,10 @@ rand = "0.8.5" rand_core = "0.6" prometheus-http-query = "0.6.6" ethers = { version = "2.0.11", git = "https://github.com/gakonst/ethers-rs" } # using Git version because crates.io version fails clippy -alloy-primitives = "0.7" +alloy-primitives = "0.8" bytes = "1.7.1" +data-encoding = "2.6.0" base64 = "0.22" bs58 = "0.5" regex = "1.10" diff --git a/irn b/irn index 9c1b75d57..2cdbee09f 160000 --- a/irn +++ b/irn @@ -1 +1 @@ -Subproject commit 9c1b75d57b36a8b984df356ea8dda1cb38a071e4 +Subproject commit 2cdbee09f89e86de636032a7d3a5f2e20be24172 diff --git a/src/storage/error.rs b/src/storage/error.rs index 04a6680fd..35ad83f0a 100644 --- a/src/storage/error.rs +++ b/src/storage/error.rs @@ -31,7 +31,7 @@ pub enum StorageError { Utf8Error(#[from] std::string::FromUtf8Error), /// IRN network errors #[error("IRN network error: {0}")] - IrnNetworkError(#[from] irn_network::Error), + IrnNetworkError(#[from] irn_rpc::quic::Error), /// IRN client errors #[error("IRN client error: {0}")] IrnClientError(#[from] irn_api::client::Error), diff --git a/src/storage/irn/mod.rs b/src/storage/irn/mod.rs index ed5bcdf5e..1ce55963b 100644 --- a/src/storage/irn/mod.rs +++ b/src/storage/irn/mod.rs @@ -4,9 +4,9 @@ use { auth::{Auth, PublicKey}, Client, Key, }, + irn_rpc::identity::Keypair, serde::Deserialize, - std::net::SocketAddr, - std::time::Duration, + std::{net::SocketAddr, time::Duration}, }; const REQUEST_TIMEOUT: Duration = Duration::from_secs(1); @@ -62,24 +62,25 @@ impl Irn { namespace: String, namespace_secret: String, ) -> Result { - let key = irn_api::auth::client_key_from_bytes( - key_base64.as_bytes(), - irn_api::auth::Encoding::Base64, + let keypair = Keypair::ed25519_from_bytes( + data_encoding::BASE64 + .decode(key_base64.as_bytes()) + .map_err(|_| StorageError::WrongKey(key_base64.clone()))?, ) .map_err(|_| StorageError::WrongKey(key_base64))?; // Generating peer_id. This should be replaced by the actual peer_id // in a future - let peer_id = irn_network::Keypair::generate_ed25519() + let peer_id = irn_rpc::identity::Keypair::generate_ed25519() .public() .to_peer_id(); let node_addr = node_addr .parse::() .map_err(|_| StorageError::WrongNodeAddress(node_addr))?; - let address = (peer_id, irn_network::socketaddr_to_multiaddr(node_addr)); + let address = (peer_id, irn_rpc::quic::socketaddr_to_multiaddr(node_addr)); let namespace = Auth::from_secret(namespace_secret.as_bytes(), namespace.as_bytes()) .map_err(|_| StorageError::WrongNamespace(namespace))?; let client = Client::new(irn_api::client::Config { - key, + keypair, nodes: [address].into(), shadowing_nodes: Default::default(), shadowing_factor: 0.0, @@ -88,6 +89,7 @@ impl Irn { connection_timeout: CONNECTION_TIMEOUT, udp_socket_count: UDP_SOCKET_COUNT, namespaces: vec![namespace.clone()], + shadowing_default_namespace: None, })?; Ok(Self { @@ -116,11 +118,7 @@ impl Irn { /// Set a value in the storage pub async fn set(&self, key: String, value: Vec) -> Result<(), StorageError> { self.client - .set( - self.key(key.as_bytes().into()), - value, - Some(self.calculate_ttl()), - ) + .set(self.key(key.as_bytes().into()), value, self.calculate_ttl()) .await .map_err(StorageError::IrnClientError) } @@ -159,7 +157,7 @@ impl Irn { self.key(key.as_bytes().into()), field.as_bytes().into(), value, - Some(self.calculate_ttl()), + self.calculate_ttl(), ) .await .map_err(StorageError::IrnClientError)