From 011a656448b65a3e8f0f584c5d5e2eeb41d70f0b Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Mon, 21 Oct 2024 14:24:42 +0200 Subject: [PATCH 1/9] chore(deps): bump scale-encode and scale-decode --- Cargo.lock | 212 ++++++++++++++++++++++++----------------------------- Cargo.toml | 6 +- 2 files changed, 99 insertions(+), 119 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b6987d36c..9c81d31dac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -120,7 +120,7 @@ dependencies = [ "bytes", "cfg-if", "const-hex", - "derive_more", + "derive_more 0.99.18", "hex-literal", "itoa", "proptest", @@ -1527,7 +1527,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", ] [[package]] @@ -2054,7 +2054,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "befbaf3a1ce23ac8476481484fef5f4d500cbd15b4dad6380ce1d28134b0c1f7" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.77", @@ -2336,38 +2336,14 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -2380,28 +2356,17 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.77", ] -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.77", ] @@ -2460,15 +2425,36 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 1.0.109", + "syn 2.0.77", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", + "unicode-xid", ] [[package]] @@ -2755,9 +2741,9 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", "tiny-keccak", ] @@ -2770,9 +2756,9 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "primitive-types 0.12.2", "scale-info", "uint 0.9.5", @@ -3025,7 +3011,7 @@ version = "14.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8156f209055d352994ecd49e19658c6b469d7c6de923bd79868957d0dcfb6f71" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.77", @@ -3176,7 +3162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bead15a320be1764cdd50458c4cfacb23e0cee65f64f500f8e34136a94c7eeca" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.77", @@ -3831,6 +3817,15 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67aa010c1e3da95bf151bd8b4c059b2ed7e75387cdb969b4f8f2723a43f9941" +dependencies = [ + "parity-scale-codec", +] + [[package]] name = "impl-rlp" version = "0.3.0" @@ -3849,6 +3844,15 @@ dependencies = [ "serde", ] +[[package]] +name = "impl-serde" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a143eada6a1ec4aefa5049037a26a6d597bfd64f8c026d07b77133e02b7dd0b" +dependencies = [ + "serde", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -6806,7 +6810,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -7043,7 +7047,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52b5648a2e8ce1f9a0f8c41c38def670cefd91932cd793468e1a5b0b0b4e4af1" dependencies = [ "bounded-collections", - "derive_more", + "derive_more 0.99.18", "parity-scale-codec", "polkadot-core-primitives", "scale-info", @@ -7178,7 +7182,7 @@ checksum = "5be514b77ad3cf996bfbc2ae17517e05bb9c69324e98210cbce2d601542d7ace" dependencies = [ "bitflags 1.3.2", "bitvec", - "derive_more", + "derive_more 0.99.18", "frame-benchmarking", "frame-support", "frame-system", @@ -7730,9 +7734,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", "uint 0.9.5", ] @@ -7744,19 +7748,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" dependencies = [ "fixed-hash", + "impl-codec 0.7.0", + "impl-serde 0.5.0", + "scale-info", "uint 0.10.0", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - [[package]] name = "proc-macro-crate" version = "3.1.0" @@ -8347,7 +8344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5174a470eeb535a721ae9fdd6e291c2411a906b96592182d05217591d5c5cf7b" dependencies = [ "byteorder", - "derive_more", + "derive_more 0.99.18", ] [[package]] @@ -8487,13 +8484,13 @@ dependencies = [ [[package]] name = "scale-decode" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98f3262c250d90e700bb802eb704e1f841e03331c2eb815e46516c4edbf5b27" +checksum = "d157a4753b652a9d34bafd05b5d9e71cda401d030ed151a58cc3af77997553ba" dependencies = [ - "derive_more", + "derive_more 1.0.0", "parity-scale-codec", - "primitive-types 0.12.2", + "primitive-types 0.13.1", "scale-bits", "scale-decode-derive", "scale-type-resolver", @@ -8502,23 +8499,23 @@ dependencies = [ [[package]] name = "scale-decode-derive" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb22f574168103cdd3133b19281639ca65ad985e24612728f727339dcaf4021" +checksum = "f0386b0bcba1c217c97da321f064c33337c3bfe1decd33d8caa9a93fb82d1aa6" dependencies = [ - "darling 0.14.4", + "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "scale-encode" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba0b9c48dc0eb20c60b083c29447c0c4617cb7c4a4c9fef72aa5c5bc539e15e" +checksum = "528464e6ae6c8f98e2b79633bf79ef939552e795e316579dab09c61670d56602" dependencies = [ - "derive_more", + "derive_more 0.99.18", "parity-scale-codec", "primitive-types 0.12.2", "scale-bits", @@ -8529,15 +8526,15 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82ab7e60e2d9c8d47105f44527b26f04418e5e624ffc034f6b4a86c0ba19c5bf" +checksum = "bef2618f123c88da9cd8853b69d766068f1eddc7692146d7dfe9b89e25ce2efd" dependencies = [ - "darling 0.14.4", - "proc-macro-crate 1.3.1", + "darling", + "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -8548,7 +8545,7 @@ checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "bitvec", "cfg-if", - "derive_more", + "derive_more 0.99.18", "parity-scale-codec", "scale-info-derive", "serde", @@ -8560,7 +8557,7 @@ version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -8615,7 +8612,7 @@ checksum = "8cd6ab090d823e75cfdb258aad5fe92e13f2af7d04b43a55d607d25fcc38c811" dependencies = [ "base58", "blake2", - "derive_more", + "derive_more 0.99.18", "either", "frame-metadata 15.1.0", "parity-scale-codec", @@ -9079,7 +9076,7 @@ dependencies = [ "bs58", "chacha20", "crossbeam-queue", - "derive_more", + "derive_more 0.99.18", "ed25519-zebra", "either", "event-listener 5.3.0", @@ -9129,7 +9126,7 @@ dependencies = [ "base64 0.22.1", "blake2-rfc", "bs58", - "derive_more", + "derive_more 0.99.18", "either", "event-listener 5.3.0", "fnv", @@ -9536,7 +9533,7 @@ dependencies = [ "Inflector", "blake2", "expander", - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.77", @@ -9711,7 +9708,7 @@ dependencies = [ "futures", "hash-db", "hash256-std-hasher", - "impl-serde", + "impl-serde 0.4.0", "itertools 0.11.0", "k256", "libsecp256k1", @@ -10038,7 +10035,7 @@ checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" dependencies = [ "Inflector", "expander", - "proc-macro-crate 3.1.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.77", @@ -10145,7 +10142,7 @@ version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99c82989b3a4979a7e1ad848aad9f5d0b4388f1f454cc131766526601ab9e8f8" dependencies = [ - "impl-serde", + "impl-serde 0.4.0", "parity-scale-codec", "ref-cast", "serde", @@ -10232,7 +10229,7 @@ version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d521a405707b5be561367cd3d442ff67588993de24062ce3adefcf8437ee9fe1" dependencies = [ - "impl-serde", + "impl-serde 0.4.0", "parity-scale-codec", "parity-wasm", "scale-info", @@ -10448,12 +10445,6 @@ dependencies = [ "vte", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -10561,12 +10552,12 @@ dependencies = [ "hex", "http-body", "hyper", - "impl-serde", + "impl-serde 0.4.0", "instant", "jsonrpsee", "parity-scale-codec", "polkadot-sdk", - "primitive-types 0.12.2", + "primitive-types 0.13.1", "scale-bits", "scale-decode", "scale-encode", @@ -10651,11 +10642,11 @@ dependencies = [ "frame-metadata 16.0.0", "hashbrown 0.14.5", "hex", - "impl-serde", + "impl-serde 0.4.0", "keccak-hash", "parity-scale-codec", "polkadot-sdk", - "primitive-types 0.12.2", + "primitive-types 0.13.1", "scale-bits", "scale-decode", "scale-encode", @@ -10698,7 +10689,7 @@ dependencies = [ name = "subxt-macro" version = "0.37.0" dependencies = [ - "darling 0.20.10", + "darling", "parity-scale-codec", "polkadot-sdk", "proc-macro-error2", @@ -10845,7 +10836,7 @@ name = "test-runtime" version = "0.37.0" dependencies = [ "hex", - "impl-serde", + "impl-serde 0.4.0", "jsonrpsee", "parity-scale-codec", "serde", @@ -11061,17 +11052,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.21.1" diff --git a/Cargo.toml b/Cargo.toml index 2b0f28e765..e6e6e8b6e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,7 +89,7 @@ impl-serde = { version = "0.4.0", default-features = false } indoc = "2" jsonrpsee = { version = "0.24.5" } pretty_assertions = "1.4.1" -primitive-types = { version = "0.12.2", default-features = false } +primitive-types = { version = "0.13.1", default-features = false } proc-macro-error2 = "2.0.0" proc-macro2 = "1.0.86" quote = "1.0.37" @@ -97,8 +97,8 @@ regex = { version = "1.11.0", default-features = false } scale-info = { version = "2.11.3", default-features = false } scale-value = { version = "0.16.3", default-features = false } scale-bits = { version = "0.6.0", default-features = false } -scale-decode = { version = "0.13.1", default-features = false } -scale-encode = { version = "0.7.1", default-features = false } +scale-decode = { version = "0.13.2", default-features = false } +scale-encode = { version = "0.7.2", default-features = false } scale-typegen = "0.8.0" scale-typegen-description = "0.8.0" serde = { version = "1.0.210", default-features = false, features = ["derive"] } From 724ad0eb6030debedbaaa95cb8c6dbc96c15a1d4 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Mon, 21 Oct 2024 18:09:54 +0200 Subject: [PATCH 2/9] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e6e6e8b6e4..372ae3e401 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,7 +98,7 @@ scale-info = { version = "2.11.3", default-features = false } scale-value = { version = "0.16.3", default-features = false } scale-bits = { version = "0.6.0", default-features = false } scale-decode = { version = "0.13.2", default-features = false } -scale-encode = { version = "0.7.2", default-features = false } +scale-encode = { version = "0.8.0", default-features = false } scale-typegen = "0.8.0" scale-typegen-description = "0.8.0" serde = { version = "1.0.210", default-features = false, features = ["derive"] } From f44a47bd7e09baa0375f0bb480a187378fd14227 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Mon, 21 Oct 2024 18:37:38 +0200 Subject: [PATCH 3/9] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 372ae3e401..b08e2f4ec6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,7 +97,7 @@ regex = { version = "1.11.0", default-features = false } scale-info = { version = "2.11.3", default-features = false } scale-value = { version = "0.16.3", default-features = false } scale-bits = { version = "0.6.0", default-features = false } -scale-decode = { version = "0.13.2", default-features = false } +scale-decode = { version = "0.14.0", default-features = false } scale-encode = { version = "0.8.0", default-features = false } scale-typegen = "0.8.0" scale-typegen-description = "0.8.0" From cff0c2fd32ea2de8260175d90f791c1ff1e90337 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 22 Oct 2024 12:48:12 +0200 Subject: [PATCH 4/9] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b08e2f4ec6..6c58770fd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,7 +95,7 @@ proc-macro2 = "1.0.86" quote = "1.0.37" regex = { version = "1.11.0", default-features = false } scale-info = { version = "2.11.3", default-features = false } -scale-value = { version = "0.16.3", default-features = false } +scale-value = { version = "0.17.0", default-features = false } scale-bits = { version = "0.6.0", default-features = false } scale-decode = { version = "0.14.0", default-features = false } scale-encode = { version = "0.8.0", default-features = false } From 4a0211b06c370caaef42b5a014426bc0e9fe5358 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 22 Oct 2024 17:12:50 +0200 Subject: [PATCH 5/9] update Cargo.lock --- Cargo.lock | 78 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c81d31dac..70a69109ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2999,7 +2999,7 @@ dependencies = [ "frame-metadata 16.0.0", "hex", "parity-scale-codec", - "scale-decode", + "scale-decode 0.13.2", "scale-info", "scale-type-resolver", "sp-crypto-hashing", @@ -8487,6 +8487,19 @@ name = "scale-decode" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d157a4753b652a9d34bafd05b5d9e71cda401d030ed151a58cc3af77997553ba" +dependencies = [ + "derive_more 1.0.0", + "parity-scale-codec", + "scale-bits", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-decode" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ae9cc099ae85ff28820210732b00f019546f36f33225f509fe25d5816864a0" dependencies = [ "derive_more 1.0.0", "parity-scale-codec", @@ -8499,9 +8512,9 @@ dependencies = [ [[package]] name = "scale-decode-derive" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0386b0bcba1c217c97da321f064c33337c3bfe1decd33d8caa9a93fb82d1aa6" +checksum = "5ed9401effa946b493f9f84dc03714cca98119b230497df6f3df6b84a2b03648" dependencies = [ "darling", "proc-macro2", @@ -8517,7 +8530,20 @@ checksum = "528464e6ae6c8f98e2b79633bf79ef939552e795e316579dab09c61670d56602" dependencies = [ "derive_more 0.99.18", "parity-scale-codec", - "primitive-types 0.12.2", + "scale-bits", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-encode" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9271284d05d0749c40771c46180ce89905fd95aa72a2a2fddb4b7c0aa424db" +dependencies = [ + "derive_more 1.0.0", + "parity-scale-codec", + "primitive-types 0.13.1", "scale-bits", "scale-encode-derive", "scale-type-resolver", @@ -8526,9 +8552,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef2618f123c88da9cd8853b69d766068f1eddc7692146d7dfe9b89e25ce2efd" +checksum = "102fbc6236de6c53906c0b262f12c7aa69c2bdc604862c12728f5f4d370bc137" dependencies = [ "darling", "proc-macro-crate", @@ -8600,7 +8626,7 @@ dependencies = [ "rand_chacha", "scale-info", "scale-typegen", - "scale-value", + "scale-value 0.16.3", "smallvec", ] @@ -8617,8 +8643,28 @@ dependencies = [ "frame-metadata 15.1.0", "parity-scale-codec", "scale-bits", - "scale-decode", - "scale-encode", + "scale-decode 0.13.2", + "scale-encode 0.7.2", + "scale-info", + "scale-type-resolver", + "serde", + "yap", +] + +[[package]] +name = "scale-value" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e0ef2a0ee1e02a69ada37feb87ea1616ce9808aca072befe2d3131bf28576e" +dependencies = [ + "base58", + "blake2", + "derive_more 1.0.0", + "either", + "parity-scale-codec", + "scale-bits", + "scale-decode 0.14.0", + "scale-encode 0.8.0", "scale-info", "scale-type-resolver", "serde", @@ -10559,10 +10605,10 @@ dependencies = [ "polkadot-sdk", "primitive-types 0.13.1", "scale-bits", - "scale-decode", - "scale-encode", + "scale-decode 0.14.0", + "scale-encode 0.8.0", "scale-info", - "scale-value", + "scale-value 0.17.0", "serde", "serde_json", "subxt-core", @@ -10596,7 +10642,7 @@ dependencies = [ "quote", "scale-info", "scale-typegen-description", - "scale-value", + "scale-value 0.17.0", "serde", "serde_json", "smoldot", @@ -10648,10 +10694,10 @@ dependencies = [ "polkadot-sdk", "primitive-types 0.13.1", "scale-bits", - "scale-decode", - "scale-encode", + "scale-decode 0.14.0", + "scale-encode 0.8.0", "scale-info", - "scale-value", + "scale-value 0.17.0", "serde", "serde_json", "subxt-macro", From dcd2aaea48794f976bdebe830bc3735dae05ffed Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 22 Oct 2024 18:00:51 +0200 Subject: [PATCH 6/9] bump scale-typegen --- Cargo.lock | 99 ++++++++++++------------------------------ Cargo.toml | 6 +-- codegen/src/api/mod.rs | 2 +- 3 files changed, 31 insertions(+), 76 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70a69109ea..c12ea25b71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2996,7 +2996,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed90459016b06a2855321469cb01fbc74208c80c06b085d1ed13162cf8bd7e1b" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata", "hex", "parity-scale-codec", "scale-decode 0.13.2", @@ -3053,17 +3053,6 @@ dependencies = [ "sp-tracing", ] -[[package]] -name = "frame-metadata" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" -dependencies = [ - "cfg-if", - "parity-scale-codec", - "scale-info", -] - [[package]] name = "frame-metadata" version = "16.0.0" @@ -3103,7 +3092,7 @@ dependencies = [ "bitflags 1.3.2", "docify", "environmental", - "frame-metadata 16.0.0", + "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", @@ -3379,7 +3368,7 @@ dependencies = [ name = "generate-custom-metadata" version = "0.37.0" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata", "parity-scale-codec", "scale-info", ] @@ -3958,7 +3947,7 @@ version = "0.37.0" dependencies = [ "assert_matches", "cfg_aliases", - "frame-metadata 16.0.0", + "frame-metadata", "futures", "hex", "parity-scale-codec", @@ -8522,19 +8511,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "scale-encode" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528464e6ae6c8f98e2b79633bf79ef939552e795e316579dab09c61670d56602" -dependencies = [ - "derive_more 0.99.18", - "parity-scale-codec", - "scale-bits", - "scale-type-resolver", - "smallvec", -] - [[package]] name = "scale-encode" version = "0.8.0" @@ -8565,13 +8541,13 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.3" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +checksum = "22760a375f81a31817aeaf6f5081e9ccb7ffd7f2da1809a6e3fc82b6656f10d5" dependencies = [ "bitvec", "cfg-if", - "derive_more 0.99.18", + "derive_more 1.0.0", "parity-scale-codec", "scale-info-derive", "serde", @@ -8579,9 +8555,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.3" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +checksum = "abc61ebe25a5c410c0e245028fc9934bf8fa4817199ef5a24a68092edfd34614" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8601,9 +8577,9 @@ dependencies = [ [[package]] name = "scale-typegen" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498d1aecf2ea61325d4511787c115791639c0fd21ef4f8e11e49dd09eff2bbac" +checksum = "0dc4c70c7fea2eef1740f0081d3fe385d8bee1eef11e9272d3bec7dc8e5438e0" dependencies = [ "proc-macro2", "quote", @@ -8614,9 +8590,9 @@ dependencies = [ [[package]] name = "scale-typegen-description" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4cabffc407f6378bc7a164fab8280bfcd862b2dd063cc5c9914a520ea8566" +checksum = "916c0acaebbf59523ac8beaa55017561da372f2e9fdcc90429f5e364feec378b" dependencies = [ "anyhow", "peekmore", @@ -8626,31 +8602,10 @@ dependencies = [ "rand_chacha", "scale-info", "scale-typegen", - "scale-value 0.16.3", + "scale-value", "smallvec", ] -[[package]] -name = "scale-value" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6ab090d823e75cfdb258aad5fe92e13f2af7d04b43a55d607d25fcc38c811" -dependencies = [ - "base58", - "blake2", - "derive_more 0.99.18", - "either", - "frame-metadata 15.1.0", - "parity-scale-codec", - "scale-bits", - "scale-decode 0.13.2", - "scale-encode 0.7.2", - "scale-info", - "scale-type-resolver", - "serde", - "yap", -] - [[package]] name = "scale-value" version = "0.17.0" @@ -8664,7 +8619,7 @@ dependencies = [ "parity-scale-codec", "scale-bits", "scale-decode 0.14.0", - "scale-encode 0.8.0", + "scale-encode", "scale-info", "scale-type-resolver", "serde", @@ -9955,7 +9910,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a616fa51350b35326682a472ee8e6ba742fdacb18babac38ecd46b3e05ead869" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata", "parity-scale-codec", "scale-info", ] @@ -10592,7 +10547,7 @@ dependencies = [ "derive-where", "either", "finito", - "frame-metadata 16.0.0", + "frame-metadata", "futures", "getrandom", "hex", @@ -10606,9 +10561,9 @@ dependencies = [ "primitive-types 0.13.1", "scale-bits", "scale-decode 0.14.0", - "scale-encode 0.8.0", + "scale-encode", "scale-info", - "scale-value 0.17.0", + "scale-value", "serde", "serde_json", "subxt-core", @@ -10632,7 +10587,7 @@ version = "0.37.0" dependencies = [ "clap", "color-eyre", - "frame-metadata 16.0.0", + "frame-metadata", "heck 0.5.0", "hex", "indoc", @@ -10642,7 +10597,7 @@ dependencies = [ "quote", "scale-info", "scale-typegen-description", - "scale-value 0.17.0", + "scale-value", "serde", "serde_json", "smoldot", @@ -10659,7 +10614,7 @@ dependencies = [ name = "subxt-codegen" version = "0.37.0" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata", "getrandom", "heck 0.5.0", "hex", @@ -10685,7 +10640,7 @@ dependencies = [ "blake2", "derive-where", "frame-decode", - "frame-metadata 16.0.0", + "frame-metadata", "hashbrown 0.14.5", "hex", "impl-serde 0.4.0", @@ -10695,9 +10650,9 @@ dependencies = [ "primitive-types 0.13.1", "scale-bits", "scale-decode 0.14.0", - "scale-encode 0.8.0", + "scale-encode", "scale-info", - "scale-value 0.17.0", + "scale-value", "serde", "serde_json", "subxt-macro", @@ -10753,7 +10708,7 @@ dependencies = [ "bitvec", "criterion", "frame-decode", - "frame-metadata 16.0.0", + "frame-metadata", "hashbrown 0.14.5", "parity-scale-codec", "polkadot-sdk", @@ -11304,7 +11259,7 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" name = "ui-tests" version = "0.37.0" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata", "generate-custom-metadata", "hex", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index 6c58770fd8..5256202f9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,13 +94,13 @@ proc-macro-error2 = "2.0.0" proc-macro2 = "1.0.86" quote = "1.0.37" regex = { version = "1.11.0", default-features = false } -scale-info = { version = "2.11.3", default-features = false } +scale-info = { version = "2.11.4", default-features = false } scale-value = { version = "0.17.0", default-features = false } scale-bits = { version = "0.6.0", default-features = false } scale-decode = { version = "0.14.0", default-features = false } scale-encode = { version = "0.8.0", default-features = false } -scale-typegen = "0.8.0" -scale-typegen-description = "0.8.0" +scale-typegen = "0.9.0" +scale-typegen-description = "0.9.0" serde = { version = "1.0.210", default-features = false, features = ["derive"] } serde_json = { version = "1.0.128", default-features = false } syn = { version = "2.0.77", features = ["full", "extra-traits"] } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 6f93a278b2..781c17f32a 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -45,7 +45,7 @@ impl RuntimeGenerator { /// /// Supported versions: v14 and v15. pub fn new(mut metadata: Metadata) -> Self { - scale_typegen::utils::ensure_unique_type_paths(metadata.types_mut()); + scale_typegen::utils::ensure_unique_type_paths(metadata.types_mut()).expect("Duplicate type paths in metadata; this is bug please file an issue."); RuntimeGenerator { metadata } } From 6cc03b9263fd8ec72f460f3b94e037001bc4c9f4 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 22 Oct 2024 18:20:46 +0200 Subject: [PATCH 7/9] use primitive_types::H256 --- subxt/src/backend/chain_head/follow_stream_driver.rs | 2 +- subxt/src/backend/mod.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/subxt/src/backend/chain_head/follow_stream_driver.rs b/subxt/src/backend/chain_head/follow_stream_driver.rs index 6d75fb427e..833d77fc65 100644 --- a/subxt/src/backend/chain_head/follow_stream_driver.rs +++ b/subxt/src/backend/chain_head/follow_stream_driver.rs @@ -507,7 +507,7 @@ mod test_utils { #[cfg(test)] mod test { use futures::TryStreamExt; - use polkadot_sdk::sp_core::H256; + use primitive_types::H256; use super::super::follow_stream::test_utils::{ ev_best_block, ev_finalized, ev_initialized, ev_new_block, diff --git a/subxt/src/backend/mod.rs b/subxt/src/backend/mod.rs index ce7521b535..e37cfde8d3 100644 --- a/subxt/src/backend/mod.rs +++ b/subxt/src/backend/mod.rs @@ -339,7 +339,8 @@ mod test { pub use crate::backend::rpc::{RawRpcFuture, RawRpcSubscription}; pub use crate::{backend::StorageResponse, error::RpcError}; pub use futures::StreamExt; - pub use polkadot_sdk::sp_core::{self, H256}; + pub use polkadot_sdk::sp_core; + pub use primitive_types::H256; pub use rpc::RpcClientT; pub use serde::Serialize; pub use serde_json::value::RawValue; From 4c553906a74ead7009ebc1723d1a929848aca6c0 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 22 Oct 2024 18:26:31 +0200 Subject: [PATCH 8/9] cargo fmt --- codegen/src/api/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 781c17f32a..adad72c5b7 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -45,7 +45,8 @@ impl RuntimeGenerator { /// /// Supported versions: v14 and v15. pub fn new(mut metadata: Metadata) -> Self { - scale_typegen::utils::ensure_unique_type_paths(metadata.types_mut()).expect("Duplicate type paths in metadata; this is bug please file an issue."); + scale_typegen::utils::ensure_unique_type_paths(metadata.types_mut()) + .expect("Duplicate type paths in metadata; this is bug please file an issue."); RuntimeGenerator { metadata } } From cb90ad286793d8f9d2979797e5cd3b5ac03fcf47 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 22 Oct 2024 18:41:12 +0200 Subject: [PATCH 9/9] remove old darling hack --- Cargo.lock | 6 +++--- Cargo.toml | 4 +--- macro/src/lib.rs | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8f2025c8f0..b77b2ebad7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10541,7 +10541,7 @@ dependencies = [ "hex", "http-body", "hyper", - "impl-serde 0.4.0", + "impl-serde 0.5.0", "jsonrpsee", "parity-scale-codec", "polkadot-sdk", @@ -10631,7 +10631,7 @@ dependencies = [ "frame-metadata", "hashbrown 0.14.5", "hex", - "impl-serde 0.4.0", + "impl-serde 0.5.0", "keccak-hash", "parity-scale-codec", "polkadot-sdk", @@ -10824,7 +10824,7 @@ name = "test-runtime" version = "0.37.0" dependencies = [ "hex", - "impl-serde 0.4.0", + "impl-serde 0.5.0", "jsonrpsee", "parity-scale-codec", "serde", diff --git a/Cargo.toml b/Cargo.toml index 3742343054..00e8e15cfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,8 +59,6 @@ unused_extern_crates = "deny" type_complexity = "allow" # Priority -1 means that it can overwritten by other lints, https://rust-lang.github.io/rust-clippy/master/index.html#/lint_groups_priority all = { level = "deny", priority = -1 } -# https://github.com/rust-lang/rust-clippy/issues/12643 -manual-unwrap-or-default = "allow" [workspace.dependencies] async-trait = "0.1.83" @@ -85,7 +83,7 @@ getrandom = { version = "0.2", default-features = false } hashbrown = "0.14.5" hex = { version = "0.4.3", default-features = false } heck = "0.5.0" -impl-serde = { version = "0.4.0", default-features = false } +impl-serde = { version = "0.5.0", default-features = false } indoc = "2" jsonrpsee = { version = "0.24.5" } pretty_assertions = "1.4.1" diff --git a/macro/src/lib.rs b/macro/src/lib.rs index fd224b268e..0828dc4919 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -3,8 +3,6 @@ // see LICENSE for license details. //! Subxt macro for generating Substrate runtime interfaces. -// TODO: The workspace lint is not working properly so it's disabled here for now. -#![allow(clippy::manual_unwrap_or_default)] use codec::Decode; use darling::{ast::NestedMeta, FromMeta};