diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03aab46fe..ac444e867 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,7 +149,6 @@ jobs: chain_tests, dispatch_errors_tests, frame_system_tests, - keystore_tests, pallet_balances_tests, pallet_transaction_payment_tests, state_tests, diff --git a/Cargo.lock b/Cargo.lock index 882e954d1..cb1e49ec3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,7 +55,7 @@ dependencies = [ "bitvec", "derive_more", "either", - "frame-metadata 15.1.0", + "frame-metadata", "hex", "log", "parity-scale-codec", @@ -69,7 +69,6 @@ dependencies = [ "sp-core", "sp-runtime", "sp-runtime-interface", - "sp-storage", "test-case", ] @@ -127,11 +126,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.19.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli", + "gimli 0.26.2", ] [[package]] @@ -140,7 +139,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] @@ -149,41 +148,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array 0.14.7", -] - -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - [[package]] name = "ahash" version = "0.7.6" @@ -255,32 +219,12 @@ dependencies = [ "num-traits", ] -[[package]] -name = "aquamarine" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" -dependencies = [ - "include_dir", - "itertools", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "array-bytes" version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" -[[package]] -name = "array-bytes" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" - [[package]] name = "arrayref" version = "0.3.7" @@ -587,9 +531,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.3" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "215c0072ecc28f92eeb0eea38ba63ddfcb65c2828c46311d646f1a3ff5f9841c" +checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" dependencies = [ "smallvec", ] @@ -618,16 +562,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "ckb-merkle-mountain-range" version = "0.5.2" @@ -656,40 +590,12 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "common-path" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" - [[package]] name = "const-oid" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" -[[package]] -name = "const-random" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" -dependencies = [ - "const-random-macro", - "proc-macro-hack", -] - -[[package]] -name = "const-random-macro" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" -dependencies = [ - "getrandom 0.2.10", - "once_cell", - "proc-macro-hack", - "tiny-keccak", -] - [[package]] name = "constant_time_eq" version = "0.2.6" @@ -738,9 +644,9 @@ dependencies = [ [[package]] name = "cranelift-entity" -version = "0.95.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" +checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" dependencies = [ "serde", ] @@ -779,7 +685,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", "typenum", ] @@ -803,15 +708,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -981,32 +877,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "docify" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6491709f76fb7ceb951244daf624d480198b427556084391d6e3c33d3ae74b9" -dependencies = [ - "docify_macros", -] - -[[package]] -name = "docify_macros" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc5338a9f72ce29a81377d9039798fcc926fb471b2004666caf48e446dffbbf" -dependencies = [ - "common-path", - "derive-syn-parse", - "once_cell", - "proc-macro2", - "quote", - "regex", - "syn 2.0.27", - "termcolor", - "walkdir", -] - [[package]] name = "downcast-rs" version = "1.2.0" @@ -1071,8 +941,6 @@ checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", "ed25519", - "rand 0.7.3", - "serde", "sha2 0.9.9", "zeroize", ] @@ -1190,15 +1058,15 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "expander" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" +checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" dependencies = [ "blake2", "fs-err", "proc-macro2", "quote", - "syn 2.0.27", + "syn 1.0.109", ] [[package]] @@ -1302,7 +1170,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-support-procedural", @@ -1327,7 +1195,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-pallet-pov" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -1342,7 +1210,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1353,7 +1221,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -1370,11 +1238,10 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", - "frame-try-runtime", "parity-scale-codec", "scale-info", "sp-core", @@ -1396,44 +1263,28 @@ dependencies = [ "serde", ] -[[package]] -name = "frame-metadata" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" -dependencies = [ - "cfg-if 1.0.0", - "parity-scale-codec", - "scale-info", - "serde", -] - [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "aquamarine", "bitflags 1.3.2", "environmental", - "frame-metadata 16.0.0", + "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", - "macro_magic", + "once_cell", "parity-scale-codec", "paste", "scale-info", "serde", - "serde_json", "smallvec", "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", - "sp-debug-derive", - "sp-genesis-builder", "sp-inherents", "sp-io", "sp-runtime", @@ -1448,15 +1299,13 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", - "expander", "frame-support-procedural-tools", "itertools", - "macro_magic", "proc-macro-warning", "proc-macro2", "quote", @@ -1466,7 +1315,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1478,7 +1327,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "proc-macro2", "quote", @@ -1488,9 +1337,8 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "cfg-if 1.0.0", "frame-support", "log", "parity-scale-codec", @@ -1507,7 +1355,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -1522,7 +1370,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "sp-api", @@ -1531,7 +1379,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "parity-scale-codec", @@ -1707,13 +1555,13 @@ dependencies = [ ] [[package]] -name = "ghash" -version = "0.5.0" +name = "gimli" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ - "opaque-debug 0.3.0", - "polyval", + "fallible-iterator", + "stable_deref_trait", ] [[package]] @@ -1721,11 +1569,6 @@ name = "gimli" version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" -dependencies = [ - "fallible-iterator", - "indexmap 1.9.3", - "stable_deref_trait", -] [[package]] name = "glob" @@ -1801,21 +1644,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - -[[package]] -name = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - [[package]] name = "hmac" version = "0.8.1" @@ -1927,17 +1755,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-num-traits" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951641f13f873bff03d4bf19ae8bec531935ac0ac2cc775f84d7edfdcfed3f17" -dependencies = [ - "integer-sqrt", - "num-traits", - "uint", -] - [[package]] name = "impl-serde" version = "0.4.0" @@ -1958,25 +1775,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "include_dir" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" -dependencies = [ - "include_dir_macros", -] - -[[package]] -name = "include_dir_macros" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" -dependencies = [ - "proc-macro2", - "quote", -] - [[package]] name = "indexmap" version = "1.9.3" @@ -2004,15 +1802,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "integer-sqrt" version = "0.1.5" @@ -2022,12 +1811,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "intx" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -2195,7 +1978,7 @@ dependencies = [ [[package]] name = "kitchensink-runtime" version = "3.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-benchmarking-pallet-pov", @@ -2209,8 +1992,6 @@ dependencies = [ "log", "node-primitives", "pallet-alliance", - "pallet-asset-conversion", - "pallet-asset-conversion-tx-payment", "pallet-asset-rate", "pallet-asset-tx-payment", "pallet-assets", @@ -2242,7 +2023,6 @@ dependencies = [ "pallet-message-queue", "pallet-mmr", "pallet-multisig", - "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", "pallet-nis", @@ -2267,7 +2047,6 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-statement", "pallet-sudo", "pallet-timestamp", "pallet-tips", @@ -2280,7 +2059,6 @@ dependencies = [ "pallet-vesting", "pallet-whitelist", "parity-scale-codec", - "primitive-types", "scale-info", "sp-api", "sp-authority-discovery", @@ -2294,7 +2072,6 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-statement-store", "sp-std", "sp-transaction-pool", "sp-version", @@ -2435,54 +2212,6 @@ dependencies = [ "libc", ] -[[package]] -name = "macro_magic" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" -dependencies = [ - "macro_magic_core", - "macro_magic_macros", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "macro_magic_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" -dependencies = [ - "const-random", - "derive-syn-parse", - "macro_magic_core_macros", - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "macro_magic_core_macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "macro_magic_macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" -dependencies = [ - "macro_magic_core", - "quote", - "syn 2.0.27", -] - [[package]] name = "matchers" version = "0.0.1" @@ -2530,9 +2259,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] @@ -2546,6 +2275,12 @@ dependencies = [ "hash-db", ] +[[package]] +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + [[package]] name = "merlin" version = "2.0.1" @@ -2680,8 +2415,12 @@ dependencies = [ [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", "sp-core", "sp-runtime", ] @@ -2689,7 +2428,7 @@ dependencies = [ [[package]] name = "node-template-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2729,6 +2468,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-complex" version = "0.4.3" @@ -2765,6 +2515,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", + "num-bigint", "num-integer", "num-traits", ] @@ -2790,12 +2541,12 @@ dependencies = [ [[package]] name = "object" -version = "0.30.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", - "hashbrown 0.13.2", + "hashbrown 0.12.3", "indexmap 1.9.3", "memchr", ] @@ -2874,7 +2625,7 @@ dependencies = [ [[package]] name = "pallet-alliance" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -2891,43 +2642,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-asset-conversion" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-asset-conversion-tx-payment" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" -dependencies = [ - "frame-support", - "frame-system", - "pallet-asset-conversion", - "pallet-transaction-payment", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-asset-rate" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -2941,7 +2659,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -2959,7 +2677,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -2974,7 +2692,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -2990,7 +2708,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -3006,7 +2724,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -3020,7 +2738,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3044,7 +2762,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3064,7 +2782,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3079,7 +2797,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3097,7 +2815,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3116,7 +2834,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3133,7 +2851,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "bitflags 1.3.2", "environmental", @@ -3155,13 +2873,14 @@ dependencies = [ "sp-runtime", "sp-std", "wasm-instrument", - "wasmi", + "wasmi 0.28.0", + "wasmparser-nostd", ] [[package]] name = "pallet-contracts-primitives" -version = "24.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -3174,7 +2893,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "proc-macro2", "quote", @@ -3184,7 +2903,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "assert_matches", "frame-benchmarking", @@ -3201,7 +2920,7 @@ dependencies = [ [[package]] name = "pallet-core-fellowship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3219,7 +2938,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3237,7 +2956,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3260,7 +2979,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3273,7 +2992,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3285,16 +3004,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-staking", "sp-std", ] [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -3311,7 +3028,7 @@ dependencies = [ [[package]] name = "pallet-glutton" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "blake2", "frame-benchmarking", @@ -3329,7 +3046,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3352,7 +3069,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "enumflags2", "frame-benchmarking", @@ -3368,7 +3085,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3388,7 +3105,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3405,7 +3122,7 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -3419,7 +3136,7 @@ dependencies = [ [[package]] name = "pallet-lottery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3433,7 +3150,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3450,7 +3167,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3469,7 +3186,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3486,7 +3203,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3499,27 +3216,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-nft-fractionalization" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-assets", - "pallet-nfts", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-nfts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "enumflags2", "frame-benchmarking", @@ -3537,7 +3237,7 @@ dependencies = [ [[package]] name = "pallet-nfts-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "pallet-nfts", @@ -3548,7 +3248,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3564,7 +3264,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -3581,7 +3281,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3601,7 +3301,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -3612,7 +3312,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -3629,7 +3329,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3653,7 +3353,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3670,7 +3370,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3685,7 +3385,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3703,7 +3403,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3718,7 +3418,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3736,7 +3436,7 @@ dependencies = [ [[package]] name = "pallet-remark" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3753,7 +3453,7 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -3768,7 +3468,7 @@ dependencies = [ [[package]] name = "pallet-salary" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3786,7 +3486,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3803,7 +3503,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -3824,7 +3524,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3840,18 +3540,13 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", - "hex-literal", - "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic", - "sp-io", "sp-runtime", "sp-std", ] @@ -3859,7 +3554,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3881,7 +3576,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3892,7 +3587,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "sp-api", @@ -3901,7 +3596,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3915,30 +3610,11 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-statement" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" -dependencies = [ - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-core", - "sp-io", - "sp-runtime", - "sp-statement-store", - "sp-std", -] - [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -3951,7 +3627,7 @@ dependencies = [ [[package]] name = "pallet-template" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3963,7 +3639,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -3981,7 +3657,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4000,7 +3676,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", "frame-system", @@ -4016,7 +3692,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4028,7 +3704,7 @@ dependencies = [ [[package]] name = "pallet-transaction-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4048,7 +3724,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4065,7 +3741,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4080,7 +3756,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4096,7 +3772,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4111,7 +3787,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4257,18 +3933,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "polyval" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash", -] - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -4283,7 +3947,6 @@ checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", "impl-codec", - "impl-num-traits", "impl-serde", "scale-info", "uint", @@ -4323,17 +3986,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro-warning" -version = "0.4.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70550716265d1ec349c41f70dd4f964b4fd88394efe4405f0c1da679c4799a07" +checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" dependencies = [ "proc-macro2", "quote", @@ -4709,9 +4366,10 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", + "async-trait", "parking_lot", "serde_json", "sp-application-crypto", @@ -5171,7 +4829,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "hash-db", "log", @@ -5179,7 +4837,6 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -5192,7 +4849,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "Inflector", "blake2", @@ -5205,8 +4862,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "23.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "scale-info", @@ -5218,8 +4875,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "16.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "integer-sqrt", "num-traits", @@ -5233,7 +4890,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "scale-info", @@ -5246,24 +4903,41 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ + "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", "sp-std", ] +[[package]] +name = "sp-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +dependencies = [ + "async-trait", + "futures", + "log", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror", +] + [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", + "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -5274,7 +4948,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "async-trait", "parity-scale-codec", @@ -5282,9 +4956,11 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", + "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", + "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", @@ -5293,7 +4969,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "finality-grandpa", "log", @@ -5311,7 +4987,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "scale-info", @@ -5322,10 +4998,10 @@ dependencies = [ [[package]] name = "sp-core" -version = "21.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "bitflags 1.3.2", "blake2", "bounded-collections", @@ -5361,28 +5037,29 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "9.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.7", "sha3", + "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "9.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ + "proc-macro2", "quote", "sp-core-hashing", "syn 2.0.27", @@ -5390,8 +5067,8 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "8.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "proc-macro2", "quote", @@ -5400,8 +5077,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.19.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "environmental", "parity-scale-codec", @@ -5409,26 +5086,16 @@ dependencies = [ "sp-storage", ] -[[package]] -name = "sp-genesis-builder" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" -dependencies = [ - "serde_json", - "sp-api", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", "thiserror", @@ -5436,12 +5103,13 @@ dependencies = [ [[package]] name = "sp-io" -version = "23.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "bytes 1.4.0", "ed25519", "ed25519-dalek", + "futures", "libsecp256k1", "log", "parity-scale-codec", @@ -5461,8 +5129,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "24.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "lazy_static", "sp-core", @@ -5472,11 +5140,13 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.27.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ + "futures", "parity-scale-codec", "parking_lot", + "serde", "sp-core", "sp-externalities", "thiserror", @@ -5485,7 +5155,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "thiserror", "zstd", @@ -5494,9 +5164,9 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata", "parity-scale-codec", "scale-info", "sp-std", @@ -5505,7 +5175,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -5523,7 +5193,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "scale-info", @@ -5537,7 +5207,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "sp-api", "sp-core", @@ -5546,8 +5216,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "8.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "backtrace", "lazy_static", @@ -5556,8 +5226,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "either", "hash256-std-hasher", @@ -5578,8 +5248,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "17.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "bytes 1.4.0", "impl-trait-for-tuples", @@ -5596,8 +5266,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "11.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "Inflector", "proc-macro-crate", @@ -5609,13 +5279,12 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", - "sp-keystore", "sp-runtime", "sp-staking", "sp-std", @@ -5624,9 +5293,8 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -5637,8 +5305,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.28.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "hash-db", "log", @@ -5653,42 +5321,17 @@ dependencies = [ "sp-trie", "thiserror", "tracing", - "trie-db", -] - -[[package]] -name = "sp-statement-store" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" -dependencies = [ - "aes-gcm", - "curve25519-dalek 3.2.0", - "ed25519-dalek", - "hkdf", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sha2 0.10.7", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-externalities", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "thiserror", - "x25519-dalek", ] [[package]] name = "sp-std" -version = "8.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" [[package]] name = "sp-storage" -version = "13.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "impl-serde", "parity-scale-codec", @@ -5701,9 +5344,11 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "async-trait", + "futures-timer", + "log", "parity-scale-codec", "sp-inherents", "sp-runtime", @@ -5713,8 +5358,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "10.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "sp-std", @@ -5726,7 +5371,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "sp-api", "sp-runtime", @@ -5735,9 +5380,10 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "async-trait", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -5749,8 +5395,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "22.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "ahash 0.8.3", "hash-db", @@ -5772,8 +5418,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "22.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "impl-serde", "parity-scale-codec", @@ -5789,8 +5435,8 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "8.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -5800,21 +5446,22 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "14.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", + "wasmi 0.13.2", "wasmtime", ] [[package]] name = "sp-weights" -version = "20.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "parity-scale-codec", "scale-info", @@ -5912,7 +5559,7 @@ dependencies = [ "ac-primitives", "async-trait", "derive_more", - "frame-metadata 15.1.0", + "frame-metadata", "frame-support", "futures", "hex", @@ -5927,8 +5574,6 @@ dependencies = [ "sp-core", "sp-runtime", "sp-runtime-interface", - "sp-storage", - "sp-version", "test-case", "tungstenite", "url", @@ -5952,7 +5597,7 @@ dependencies = [ name = "substrate-client-keystore" version = "0.9.1" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-trait", "parking_lot", "sc-keystore", @@ -5967,13 +5612,12 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#d38d176b844aab1338ce79eb71cd6df86c97d4a0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", - "parity-wasm", "sp-maybe-compressed-blob", "strum", "tempfile", @@ -6140,15 +5784,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -6438,16 +6073,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - [[package]] name = "untrusted" version = "0.7.1" @@ -6599,9 +6224,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.112.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" +checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" dependencies = [ "anyhow", "libc", @@ -6615,9 +6240,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.112.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" +checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" dependencies = [ "anyhow", "cxx", @@ -6627,36 +6252,68 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.112.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" +checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", + "regex", ] [[package]] name = "wasmi" -version = "0.30.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +dependencies = [ + "parity-wasm", + "wasmi-validation", + "wasmi_core 0.2.1", +] + +[[package]] +name = "wasmi" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a" dependencies = [ - "intx", - "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core", + "wasmi_core 0.12.0", "wasmparser-nostd", ] +[[package]] +name = "wasmi-validation" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +dependencies = [ + "parity-wasm", +] + [[package]] name = "wasmi_arena" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" +[[package]] +name = "wasmi_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +dependencies = [ + "downcast-rs", + "libm", + "memory_units", + "num-rational", + "num-traits", +] + [[package]] name = "wasmi_core" version = "0.12.0" @@ -6671,9 +6328,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.102.0" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ "indexmap 1.9.3", "url", @@ -6690,9 +6347,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" +checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" dependencies = [ "anyhow", "bincode", @@ -6700,7 +6357,7 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", - "object 0.30.4", + "object 0.29.0", "once_cell", "paste", "psm", @@ -6710,30 +6367,30 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.45.0", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-asm-macros" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" +checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "wasmtime-environ" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" +checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.26.2", "indexmap 1.9.3", "log", - "object 0.30.4", + "object 0.29.0", "serde", "target-lexicon", "thiserror", @@ -6743,52 +6400,52 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" +checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" dependencies = [ - "addr2line 0.19.0", + "addr2line 0.17.0", "anyhow", "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli", + "gimli 0.26.2", "log", - "object 0.30.4", + "object 0.29.0", "rustc-demangle", "serde", "target-lexicon", "wasmtime-environ", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.45.0", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-jit-debug" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" +checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" dependencies = [ "once_cell", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" +checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" dependencies = [ "cfg-if 1.0.0", "libc", - "windows-sys 0.45.0", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-runtime" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" +checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" dependencies = [ "anyhow", "cc", @@ -6805,14 +6462,14 @@ dependencies = [ "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.45.0", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-types" -version = "8.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" +checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" dependencies = [ "cranelift-entity", "serde", @@ -6911,6 +6568,21 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -7090,17 +6762,6 @@ dependencies = [ "tap", ] -[[package]] -name = "x25519-dalek" -version = "2.0.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" -dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.6.4", - "zeroize", -] - [[package]] name = "zeroize" version = "1.6.0" diff --git a/Cargo.toml b/Cargo.toml index f749c86d9..be838c96b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,14 +44,12 @@ tungstenite = { version = "0.18.0", optional = true, features = ["native-tls"] } ws = { version = "0.9.2", optional = true, features = ["ssl"] } # Substrate no_std dependencies -sp-core = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-storage = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-version = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # substrate std / wasm only -frame-support = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-support = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # local deps ac-compose-macros = { path = "compose-macros", default-features = false } @@ -61,7 +59,7 @@ ac-primitives = { path = "primitives", default-features = false } [dev-dependencies] ac-node-api = { path = "node-api", features = ["mocks"] } -kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } scale-info = { version = "2.1.1", features = ["derive"] } test-case = "3.1.0" @@ -106,8 +104,6 @@ std = [ "sp-core/std", "sp-runtime/std", "sp-runtime-interface/std", - "sp-storage/std", - "sp-version/std", # substrate std "frame-support", # local deps diff --git a/client-keystore/Cargo.toml b/client-keystore/Cargo.toml index 09d2ec18c..bffca4335 100644 --- a/client-keystore/Cargo.toml +++ b/client-keystore/Cargo.toml @@ -12,11 +12,11 @@ parking_lot = "0.12.0" serde_json = "1.0.79" # Substrate dependencies -sc-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } [dev-dependencies] tempfile = "3.3.0" diff --git a/client-keystore/src/lib.rs b/client-keystore/src/lib.rs index 7083beeae..378e72bb2 100644 --- a/client-keystore/src/lib.rs +++ b/client-keystore/src/lib.rs @@ -22,9 +22,10 @@ use parking_lot::RwLock; use sp_application_crypto::{AppCrypto, AppPair, IsWrappedBy}; use sp_core::{ - crypto::{ByteArray, ExposeSecret, KeyTypeId, Pair as CorePair, SecretString, VrfSecret}, + crypto::{ByteArray, ExposeSecret, KeyTypeId, Pair as CorePair, SecretString, VrfSigner}, ecdsa, ed25519, sr25519, }; +use sp_keystore::{Error as TraitError, Keystore, KeystorePtr}; use std::{ collections::HashMap, fs::{self, File}, @@ -37,7 +38,6 @@ use sc_keystore::{Error, Result}; mod keystore_ext; pub use keystore_ext::KeystoreExt; -pub use sp_keystore::{Error as TraitError, Keystore, KeystorePtr}; /// A local based keystore that is either memory-based or filesystem-based. pub struct LocalKeystore(RwLock); @@ -103,33 +103,19 @@ impl LocalKeystore { Ok(signature) } - fn vrf_sign( + fn vrf_sign( &self, key_type: KeyTypeId, public: &T::Public, - data: &T::VrfSignData, + transcript: &T::VrfInput, ) -> std::result::Result, TraitError> { let sig = self .0 .read() .key_pair_by_type::(public, key_type)? - .map(|pair| pair.vrf_sign(data)); + .map(|pair| pair.vrf_sign(transcript)); Ok(sig) } - - fn vrf_output( - &self, - key_type: KeyTypeId, - public: &T::Public, - input: &T::VrfInput, - ) -> std::result::Result, TraitError> { - let preout = self - .0 - .read() - .key_pair_by_type::(public, key_type)? - .map(|pair| pair.vrf_output(input)); - Ok(preout) - } } impl Keystore for LocalKeystore { @@ -139,7 +125,7 @@ impl Keystore for LocalKeystore { /// Generate a new pair compatible with the 'ed25519' signature scheme. /// - /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. + /// If the `[seed]` is `Some` then the key will be ephemeral and stored in memory. fn sr25519_generate_new( &self, key_type: KeyTypeId, @@ -161,18 +147,9 @@ impl Keystore for LocalKeystore { &self, key_type: KeyTypeId, public: &sr25519::Public, - data: &sr25519::vrf::VrfSignData, + transcript: &sr25519::vrf::VrfTranscript, ) -> std::result::Result, TraitError> { - self.vrf_sign::(key_type, public, data) - } - - fn sr25519_vrf_output( - &self, - key_type: KeyTypeId, - public: &sr25519::Public, - input: &sr25519::vrf::VrfInput, - ) -> std::result::Result, TraitError> { - self.vrf_output::(key_type, public, input) + self.vrf_sign::(key_type, public, transcript) } fn ed25519_public_keys(&self, key_type: KeyTypeId) -> Vec { @@ -181,7 +158,7 @@ impl Keystore for LocalKeystore { /// Generate a new pair compatible with the 'sr25519' signature scheme. /// - /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. + /// If the `[seed]` is `Some` then the key will be ephemeral and stored in memory. fn ed25519_generate_new( &self, key_type: KeyTypeId, @@ -205,7 +182,7 @@ impl Keystore for LocalKeystore { /// Generate a new pair compatible with the 'ecdsa' signature scheme. /// - /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. + /// If the `[seed]` is `Some` then the key will be ephemeral and stored in memory. fn ecdsa_generate_new( &self, key_type: KeyTypeId, @@ -237,60 +214,6 @@ impl Keystore for LocalKeystore { Ok(sig) } - #[cfg(feature = "bls-experimental")] - fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { - self.public_keys::(key_type) - } - - #[cfg(feature = "bls-experimental")] - /// Generate a new pair compatible with the 'bls381' signature scheme. - /// - /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. - fn bls381_generate_new( - &self, - key_type: KeyTypeId, - seed: Option<&str>, - ) -> std::result::Result { - self.generate_new::(key_type, seed) - } - - #[cfg(feature = "bls-experimental")] - fn bls381_sign( - &self, - key_type: KeyTypeId, - public: &bls381::Public, - msg: &[u8], - ) -> std::result::Result, TraitError> { - self.sign::(key_type, public, msg) - } - - #[cfg(feature = "bls-experimental")] - fn bls377_public_keys(&self, key_type: KeyTypeId) -> Vec { - self.public_keys::(key_type) - } - - #[cfg(feature = "bls-experimental")] - /// Generate a new pair compatible with the 'bls377' signature scheme. - /// - /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. - fn bls377_generate_new( - &self, - key_type: KeyTypeId, - seed: Option<&str>, - ) -> std::result::Result { - self.generate_new::(key_type, seed) - } - - #[cfg(feature = "bls-experimental")] - fn bls377_sign( - &self, - key_type: KeyTypeId, - public: &bls377::Public, - msg: &[u8], - ) -> std::result::Result, TraitError> { - self.sign::(key_type, public, msg) - } - fn insert( &self, key_type: KeyTypeId, diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 5b411bd76..2d54b9dc5 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -14,17 +14,17 @@ tokio = { version = "1.24", features = ["rt-multi-thread", "macros", "time"] } wabt = "0.10.0" # Substrate dependencies -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-core = { features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-weights = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-core = { features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-weights = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # local deps substrate-api-client = { path = "..", default-features = false, features = ["jsonrpsee-client", "tungstenite-client", "ws-client", "staking-xt", "contracts-xt"] } diff --git a/examples/examples/get_blocks_async.rs b/examples/examples/get_blocks_async.rs index 5ab46485c..d2fd5c2ae 100644 --- a/examples/examples/get_blocks_async.rs +++ b/examples/examples/get_blocks_async.rs @@ -18,7 +18,7 @@ #[cfg(not(feature = "sync-examples"))] use substrate_api_client::{ - ac_primitives::AssetRuntimeConfig, + ac_primitives::DefaultRuntimeConfig, rpc::{HandleSubscription, JsonrpseeClient}, Api, GetChainInfo, SubscribeChain, }; @@ -31,7 +31,7 @@ async fn main() { } // To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet. -// Therefore, we need to use the `AssetRuntimeConfig` in this example. +// Therefore, we need to use the `DefaultRuntimeConfig` in this example. // ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node // you most likely should use `DefaultRuntimeConfig` instead. @@ -41,8 +41,8 @@ async fn main() { env_logger::init(); // Initialize the api. - let client = JsonrpseeClient::with_default_url().unwrap(); - let api = Api::::new(client).await.unwrap(); + let client = JsonrpseeClient::new("wss://rococo.api.integritee.network:443").unwrap(); + let api = Api::::new(client).await.unwrap(); let (genesis_block, header_hash, signed_block) = futures::future::try_join3( api.get_genesis_block(), diff --git a/node-api/Cargo.toml b/node-api/Cargo.toml index 16cbe959e..43add7804 100644 --- a/node-api/Cargo.toml +++ b/node-api/Cargo.toml @@ -25,13 +25,12 @@ serde = { version = "1.0.136", features = ["derive"], default-features = false } serde_json = { version = "1.0.79", default-features = false, features = ["alloc"] } # substrate -sp-core = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-storage = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # need to add this for `no_std` -sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", features = ["full_crypto"], branch = "master" } -sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", features = ["full_crypto"], branch = "polkadot-v0.9.42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # local ac-primitives = { path = "../primitives", default-features = false } @@ -61,7 +60,8 @@ std = [ # no_std support "sp-application-crypto/std", "sp-runtime-interface/std", - "sp-storage/std", + # local + "ac-primitives/std", ] # Enable import of test_utils also outside of crate (feature test does not allow to do so). mocks = [] diff --git a/node-api/src/metadata/metadata_types.rs b/node-api/src/metadata/metadata_types.rs index 0d4cf4ceb..97e19f562 100644 --- a/node-api/src/metadata/metadata_types.rs +++ b/node-api/src/metadata/metadata_types.rs @@ -12,6 +12,7 @@ use crate::{ metadata::{v14_to_v15, variant_index::VariantIndex, InvalidMetadataError, MetadataError}, storage::GetStorageTypes, }; +use ac_primitives::StorageKey; use alloc::{ collections::btree_map::BTreeMap, string::{String, ToString}, @@ -26,7 +27,6 @@ use frame_metadata::{ RuntimeMetadata, RuntimeMetadataPrefixed, META_RESERVED, }; use scale_info::{form::PortableForm, PortableRegistry, Type, Variant}; -use sp_storage::StorageKey; #[cfg(feature = "std")] use serde::Serialize; diff --git a/node-api/src/storage.rs b/node-api/src/storage.rs index 4511ef522..6ddbf1054 100644 --- a/node-api/src/storage.rs +++ b/node-api/src/storage.rs @@ -14,12 +14,12 @@ //! For querying runtime storage. use crate::metadata::MetadataError; +use ac_primitives::StorageKey; use alloc::{borrow::ToOwned, vec::Vec}; use codec::Encode; use core::marker::PhantomData; use frame_metadata::v15::{StorageEntryMetadata, StorageEntryType, StorageHasher}; use scale_info::form::PortableForm; -use sp_storage::StorageKey; #[derive(Clone, Debug, PartialEq, Eq, Ord, PartialOrd)] pub struct StorageValue { diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 21d64e8e1..9aa3a26cb 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -19,27 +19,27 @@ serde = { version = "1.0", default-features = false, features = ["derive", "allo serde_json = { version = "1.0", default-features = false, features = ["alloc"] } # substrate no_std -sp-core = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-core-hashing = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-staking = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-version = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-weights = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-core-hashing = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-weights = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # need to add this for the app_crypto macro -sp-application-crypto = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-application-crypto = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # substrate std / wasm only -frame-system = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-assets = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-balances = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-contracts = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-staking = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-system = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-assets = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-balances = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-contracts = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-staking = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } [dev-dependencies] -node-template-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +node-template-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } [features] default = ["std"] diff --git a/primitives/src/config/asset_runtime_config.rs b/primitives/src/config/asset_runtime_config.rs index 56dec0256..8efa69874 100644 --- a/primitives/src/config/asset_runtime_config.rs +++ b/primitives/src/config/asset_runtime_config.rs @@ -8,12 +8,14 @@ //! https://github.com/paritytech/subxt/blob/ce0a82e3227efb0eae131f025da5f839d9623e15/subxt/src/config/substrate.rs use crate::{ - config::Config, sr25519, types::AccountData, AccountId32, AssetTip, BlakeTwo256, Block, - ExtrinsicSigner, GenericExtrinsicParams, Header, MultiAddress, MultiSignature, OpaqueExtrinsic, - H256, + config::Config, types::AccountData, AssetTip, BlakeTwo256, ExtrinsicSigner, + GenericExtrinsicParams, SubstrateBlock, SubstrateHeader, SubstrateOpaqueExtrinsic, }; use codec::{Decode, Encode}; use core::fmt::Debug; +pub use primitive_types::{H256, U256}; +use sp_core::sr25519; +use sp_runtime::{AccountId32, MultiAddress, MultiSignature}; /// Standard runtime config for Substrate and Polkadot nodes that use the asset pallet. #[derive(Decode, Encode, Clone, Eq, PartialEq, Debug)] @@ -27,12 +29,12 @@ impl Config for AssetRuntimeConfig { type Address = MultiAddress; type Signature = MultiSignature; type Hasher = BlakeTwo256; - type Header = Header; + type Header = SubstrateHeader; type AccountData = AccountData; type ExtrinsicParams = AssetTipExtrinsicParams; type CryptoKey = sr25519::Pair; type ExtrinsicSigner = ExtrinsicSigner; - type Block = Block; + type Block = SubstrateBlock; type Balance = u128; type ContractCurrency = u128; type StakingBalance = u128; diff --git a/primitives/src/config/mod.rs b/primitives/src/config/mod.rs index c3fa4c3e4..4c0604585 100644 --- a/primitives/src/config/mod.rs +++ b/primitives/src/config/mod.rs @@ -11,16 +11,14 @@ //! This file is mostly subxt: //! https://github.com/paritytech/subxt/blob/ce0a82e3227efb0eae131f025da5f839d9623e15/subxt/src/config/mod.rs -use codec::{Decode, Encode, FullCodec}; use core::{fmt::Debug, marker::PhantomData}; + +use codec::{Decode, Encode, FullCodec}; use serde::{de::DeserializeOwned, Serialize}; use sp_core::Pair; -use sp_runtime::traits::{ - AtLeast32Bit, AtLeast32BitUnsigned, Block, Hash as HashTrait, Header as HeaderTrait, - MaybeSerializeDeserialize, -}; +use sp_runtime::traits::{AtLeast32Bit, AtLeast32BitUnsigned, MaybeSerializeDeserialize}; -use crate::{extrinsic_params, SignExtrinsic}; +use crate::{extrinsic_params, Block, Hasher, Header, SignExtrinsic}; pub use asset_runtime_config::*; pub use default_runtime_config::*; @@ -34,7 +32,7 @@ pub trait Config { /// transactions associated with a sender account. /// This type enforces the (de)serialization implementation /// also in no-std mode (unlike substrates MaybeSerializeDeserialize). - type Index: Debug + Copy + DeserializeOwned + AtLeast32Bit + Decode; + type Index: Default + Debug + Copy + DeserializeOwned + AtLeast32Bit + Decode; /// The block number type used by the runtime. type BlockNumber: Debug @@ -45,7 +43,8 @@ pub trait Config { + DeserializeOwned + core::hash::Hash + core::str::FromStr - + Into; + + Into + + AtLeast32BitUnsigned; /// The output of the `Hashing` function. type Hash: Debug @@ -74,11 +73,11 @@ pub trait Config { type Signature: Debug + Encode + From<::Signature>; /// The hashing system (algorithm) being used in the runtime (e.g. Blake2). - type Hasher: Debug + HashTrait; + type Hasher: Debug + Hasher; /// The block header. type Header: Debug - + HeaderTrait + + Header + Send + DeserializeOwned; diff --git a/primitives/src/extrinsics/mod.rs b/primitives/src/extrinsics/mod.rs index b858a16eb..6916d1fb0 100644 --- a/primitives/src/extrinsics/mod.rs +++ b/primitives/src/extrinsics/mod.rs @@ -17,7 +17,7 @@ //! Primitives for substrate extrinsics. -use crate::OpaqueExtrinsic; +use crate::SubstrateOpaqueExtrinsic as OpaqueExtrinsic; use alloc::{format, vec::Vec}; use codec::{Decode, Encode, Error, Input}; use core::fmt; diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 42493e298..7c4087afe 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -24,24 +24,14 @@ pub use config::*; pub use extrinsics::*; pub use rpc_numbers::*; pub use rpc_params::*; +pub use serde_impls::*; +pub use traits::*; pub use types::*; pub mod config; pub mod extrinsics; pub mod rpc_numbers; pub mod rpc_params; +pub mod serde_impls; +pub mod traits; pub mod types; - -// Re-export substrate types for easy import on user side. -pub use sp_core::{ - sr25519, - storage::{StorageChangeSet, StorageData, StorageKey}, - Bytes, H256, -}; -pub use sp_runtime::{ - generic::{Block, Digest, DigestItem, Header, SignedBlock}, - traits::{BlakeTwo256, Block as BlockTrait, Hash as HashTrait, Header as HeaderTrait}, - AccountId32, ConsensusEngineId, Justifications, MultiAddress, MultiSignature, OpaqueExtrinsic, -}; -pub use sp_version::RuntimeVersion; -pub use sp_weights::Weight; diff --git a/primitives/src/serde_impls.rs b/primitives/src/serde_impls.rs new file mode 100644 index 000000000..acb8b39aa --- /dev/null +++ b/primitives/src/serde_impls.rs @@ -0,0 +1,889 @@ +/* + Copyright 2019 Supercomputing Systems AG + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +//! Re-defintion of substrate primitives that do not implement +//! (De)Serialization in no_std. They can be converted to +//! the original substrate types with From / Into. +//! This may be omitted, if substrate allows serde impls also in no_std: https://github.com/paritytech/substrate/issues/12994 + +use crate::{Block, Hasher, Header}; +use alloc::{format, string::String, vec::Vec}; +use codec::{Decode, Encode, MaxEncodedLen}; +use impl_serde::serialize::{from_hex, FromHexError}; +use primitive_types::{H256, U256}; +use scale_info::TypeInfo; +use serde::{Deserialize, Serialize}; +use sp_core::RuntimeDebug; +use sp_runtime::{traits::Extrinsic, Justification}; +use sp_version::{ApiId, ApisVec}; + +/// Hex-serialized shim for `Vec`. +// https://github.com/paritytech/substrate/blob/5aaf5f42a7850f00b15a14f635b67061d831ac2d/primitives/core/src/lib.rs#L131 +#[derive(PartialEq, Eq, Clone, RuntimeDebug, Serialize, Deserialize, Hash, PartialOrd, Ord)] +pub struct Bytes(#[serde(with = "impl_serde::serialize")] pub Vec); + +impl From> for Bytes { + fn from(s: Vec) -> Self { + Bytes(s) + } +} + +impl core::str::FromStr for Bytes { + type Err = FromHexError; + + fn from_str(s: &str) -> Result { + from_hex(s).map(Bytes) + } +} + +impl From for sp_core::Bytes { + fn from(bytes: Bytes) -> Self { + Self(bytes.0) + } +} + +impl From for Bytes { + fn from(bytes: sp_core::Bytes) -> Self { + Self(bytes.0) + } +} + +/// Storage key. +// https://github.com/paritytech/substrate/blob/cd2fdcf85eb96c53ce2a5d418d4338eb92f5d4f5/primitives/storage/src/lib.rs#L41-L43 +#[derive( + PartialEq, + Eq, + RuntimeDebug, + Serialize, + Deserialize, + Hash, + PartialOrd, + Ord, + Clone, + Encode, + Decode, +)] +pub struct StorageKey(#[serde(with = "impl_serde::serialize")] pub Vec); + +impl From> for StorageKey { + fn from(s: Vec) -> Self { + StorageKey(s) + } +} + +impl AsRef<[u8]> for StorageKey { + fn as_ref(&self) -> &[u8] { + self.0.as_ref() + } +} + +impl From for sp_core::storage::StorageKey { + fn from(storage_key: StorageKey) -> Self { + Self(storage_key.0) + } +} + +impl From for StorageKey { + fn from(storage_key: sp_core::storage::StorageKey) -> Self { + Self(storage_key.0) + } +} + +/// Storage data associated to a [`StorageKey`]. +// https://github.com/paritytech/substrate/blob/cd2fdcf85eb96c53ce2a5d418d4338eb92f5d4f5/primitives/storage/src/lib.rs#L148-L150 +#[derive( + PartialEq, + Eq, + RuntimeDebug, + Serialize, + Deserialize, + Hash, + PartialOrd, + Ord, + Clone, + Encode, + Decode, + Default, +)] +pub struct StorageData(#[serde(with = "impl_serde::serialize")] pub Vec); + +impl From for sp_core::storage::StorageData { + fn from(storage_data: StorageData) -> Self { + Self(storage_data.0) + } +} + +impl From for StorageData { + fn from(storage_data: sp_core::storage::StorageData) -> Self { + Self(storage_data.0) + } +} + +/// Storage change set +#[derive(RuntimeDebug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct StorageChangeSet { + /// Block hash + pub block: Hash, + /// A list of changes + pub changes: Vec<(StorageKey, Option)>, +} + +impl From> for sp_core::storage::StorageChangeSet { + fn from(storage_change_set: StorageChangeSet) -> Self { + Self { + block: storage_change_set.block, + changes: storage_change_set + .changes + .iter() + .map(|(key, maybe_data)| { + (key.clone().into(), maybe_data.as_ref().map(|data| data.clone().into())) + }) + .collect(), + } + } +} + +impl From> for StorageChangeSet { + fn from(storage_change_set: sp_core::storage::StorageChangeSet) -> Self { + Self { + block: storage_change_set.block, + changes: storage_change_set + .changes + .into_iter() + .map(|(key, maybe_data)| { + let key: StorageKey = key.into(); + let maybe_data: Option = maybe_data.map(|data| data.into()); + (key, maybe_data) + }) + .collect(), + } + } +} + +/// Runtime version. +/// This should not be thought of as classic Semver (major/minor/tiny). +/// This triplet have different semantics and mis-interpretation could cause problems. +/// In particular: bug fixes should result in an increment of `spec_version` and possibly +/// `authoring_version`, absolutely not `impl_version` since they change the semantics of the +/// runtime. +// https://github.com/paritytech/substrate/blob/1b3ddae9dec6e7653b5d6ef0179df1af831f46f0/primitives/version/src/lib.rs#L152-L215 +// FIXME: For now RuntimeVersion conversion is not implemented to the substrate RuntimeVersion. +// It's a little more complicated because of the RuntimeString, which is different in no_std than in std mode. +#[derive( + Clone, PartialEq, Eq, Default, sp_runtime::RuntimeDebug, TypeInfo, Serialize, Deserialize, +)] +#[serde(rename_all = "camelCase")] +pub struct RuntimeVersion { + /// Identifies the different Substrate runtimes. There'll be at least polkadot and node. + /// A different on-chain spec_name to that of the native runtime would normally result + /// in node not attempting to sync or author blocks. + pub spec_name: String, + + /// Name of the implementation of the spec. This is of little consequence for the node + /// and serves only to differentiate code of different implementation teams. For this + /// codebase, it will be parity-polkadot. If there were a non-Rust implementation of the + /// Polkadot runtime (e.g. C++), then it would identify itself with an accordingly different + /// `impl_name`. + pub impl_name: String, + + /// `authoring_version` is the version of the authorship interface. An authoring node + /// will not attempt to author blocks unless this is equal to its native runtime. + pub authoring_version: u32, + + /// Version of the runtime specification. A full-node will not attempt to use its native + /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + /// `spec_version` and `authoring_version` are the same between Wasm and native. + pub spec_version: u32, + + /// Version of the implementation of the specification. Nodes are free to ignore this; it + /// serves only as an indication that the code is different; as long as the other two versions + /// are the same then while the actual code may be different, it is nonetheless required to + /// do the same thing. + /// Non-consensus-breaking optimizations are about the only changes that could be made which + /// would result in only the `impl_version` changing. + pub impl_version: u32, + + /// List of supported API "features" along with their versions. + #[serde( + serialize_with = "apis_serialize::serialize", + deserialize_with = "apis_serialize::deserialize" + )] + pub apis: ApisVec, + //pub apis: alloc::borrow::Cow<'static, [([u8; 8], u32)]>, + /// All existing dispatches are fully compatible when this number doesn't change. If this + /// number changes, then `spec_version` must change, also. + /// + /// This number must change when an existing dispatchable (module ID, dispatch ID) is changed, + /// either through an alteration in its user-level semantics, a parameter + /// added/removed/changed, a dispatchable being removed, a module being removed, or a + /// dispatchable/module changing its index. + /// + /// It need *not* change when a new module is added or when a dispatchable is added. + pub transaction_version: u32, + + /// Version of the state implementation used by this runtime. + /// Use of an incorrect version is consensus breaking. + pub state_version: u8, +} + +/// Abstraction over a substrate block and justification. +// https://github.com/paritytech/substrate/blob/fafc8e0ba8c98bd22b47913ded414e74a0fcb67f/primitives/runtime/src/generic/block.rs +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +#[serde(deny_unknown_fields)] +pub struct SignedBlock { + /// Full block. + pub block: Block, + /// Block justification. + pub justifications: Option, +} + +impl From> for SignedBlock { + fn from(signed_block: sp_runtime::generic::SignedBlock) -> Self { + Self { + block: signed_block.block, + justifications: signed_block.justifications.map(|justifactions| justifactions.into()), + } + } +} + +impl From> for sp_runtime::generic::SignedBlock { + fn from(signed_block: SignedBlock) -> Self { + Self { + block: signed_block.block, + justifications: signed_block.justifications.map(|justifactions| justifactions.into()), + } + } +} + +/// Collection of justifications for a given block, multiple justifications may +/// be provided by different consensus engines for the same block. +// https://github.com/paritytech/substrate/blob/fafc8e0ba8c98bd22b47913ded414e74a0fcb67f/primitives/runtime/src/lib.rs#L125-L127 +#[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, Serialize, Deserialize)] +pub struct Justifications(pub Vec); + +impl From for Justifications { + fn from(justifications: sp_runtime::Justifications) -> Self { + let mut justification_vec = Vec::new(); + for justification in justifications.iter() { + justification_vec.push(justification.clone()); + } + Self(justification_vec) + } +} + +impl From for sp_runtime::Justifications { + fn from(justifications: Justifications) -> Self { + let first_justifaction = justifications.0[0].clone(); + let mut sp_runtime_justifications: sp_runtime::Justifications = first_justifaction.into(); + for justification in justifications.0 { + sp_runtime_justifications.append(justification); + } + sp_runtime_justifications + } +} + +/// The old (deprecated) weight type. +// https://github.com/paritytech/substrate/blob/d0540a79967cb06cd7598a4965c7c06afc788b0c/primitives/weights/src/lib.rs#L78 +#[derive( + Decode, + Encode, + PartialEq, + Eq, + Clone, + Copy, + RuntimeDebug, + Default, + TypeInfo, + Serialize, + Deserialize, +)] +#[serde(transparent)] +pub struct OldWeight(pub u64); + +/// New weight type. +// https://github.com/paritytech/substrate/blob/7bbfe737a180e548ace7e819099dcb62cf48fa11/primitives/weights/src/weight_v2.rs#L25-L36 +#[derive( + Encode, + Decode, + MaxEncodedLen, + TypeInfo, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + Default, + Serialize, + Deserialize, +)] +pub struct Weight { + #[codec(compact)] + /// The weight of computational time used based on some reference hardware. + ref_time: u64, + #[codec(compact)] + /// The weight of storage space used by proof of validity. + proof_size: u64, +} + +impl Weight { + /// Set the reference time part of the weight. + pub const fn set_ref_time(mut self, c: u64) -> Self { + self.ref_time = c; + self + } + + /// Set the storage size part of the weight. + pub const fn set_proof_size(mut self, c: u64) -> Self { + self.proof_size = c; + self + } + + /// Return the reference time part of the weight. + pub const fn ref_time(&self) -> u64 { + self.ref_time + } + + /// Return the storage size part of the weight. + pub const fn proof_size(&self) -> u64 { + self.proof_size + } + + /// Construct [`Weight`] from weight parts, namely reference time and proof size weights. + pub const fn from_parts(ref_time: u64, proof_size: u64) -> Self { + Self { ref_time, proof_size } + } + + /// Construct [`Weight`] from the same weight for all parts. + pub const fn from_all(value: u64) -> Self { + Self { ref_time: value, proof_size: value } + } + + /// Return a [`Weight`] where all fields are zero. + pub const fn zero() -> Self { + Self { ref_time: 0, proof_size: 0 } + } +} + +impl From for Weight { + fn from(weight: sp_weights::Weight) -> Self { + Weight::from_parts(weight.ref_time(), weight.proof_size()) + } +} + +impl From for sp_weights::Weight { + fn from(weight: Weight) -> Self { + sp_weights::Weight::from_parts(weight.ref_time(), weight.proof_size()) + } +} + +// Copied from sp_version (only available in std in the substrate version). +// https://github.com/paritytech/substrate/blob/1b3ddae9dec6e7653b5d6ef0179df1af831f46f0/primitives/version/src/lib.rs#L392-L393 +mod apis_serialize { + use super::*; + use impl_serde::serialize as bytes; + use serde::{de, ser::SerializeTuple, Serializer}; + + #[derive(Serialize)] + struct ApiId<'a>(#[serde(serialize_with = "serialize_bytesref")] &'a super::ApiId, &'a u32); + + pub fn serialize(apis: &ApisVec, ser: S) -> Result + where + S: Serializer, + { + let len = apis.len(); + let mut seq = ser.serialize_tuple(len)?; + for (api, ver) in &**apis { + seq.serialize_element(&ApiId(api, ver))?; + } + seq.end() + } + + pub fn serialize_bytesref(&apis: &&super::ApiId, ser: S) -> Result + where + S: Serializer, + { + bytes::serialize(apis, ser) + } + + #[derive(Deserialize)] + struct ApiIdOwned(#[serde(deserialize_with = "deserialize_bytes")] super::ApiId, u32); + + pub fn deserialize<'de, D>(deserializer: D) -> Result + where + D: de::Deserializer<'de>, + { + struct Visitor; + impl<'de> de::Visitor<'de> for Visitor { + type Value = ApisVec; + + fn expecting(&self, formatter: &mut core::fmt::Formatter) -> core::fmt::Result { + formatter.write_str("a sequence of api id and version tuples") + } + + fn visit_seq(self, mut visitor: V) -> Result + where + V: de::SeqAccess<'de>, + { + let mut apis = Vec::new(); + while let Some(value) = visitor.next_element::()? { + apis.push((value.0, value.1)); + } + Ok(apis.into()) + } + } + deserializer.deserialize_seq(Visitor) + } + + pub fn deserialize_bytes<'de, D>(d: D) -> Result + where + D: de::Deserializer<'de>, + { + let mut arr = [0; 8]; + bytes::deserialize_check_len(d, bytes::ExpectedLen::Exact(&mut arr[..]))?; + Ok(arr) + } +} + +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)] +pub struct SubstrateOpaqueExtrinsic(Vec); + +impl SubstrateOpaqueExtrinsic { + /// Convert an encoded extrinsic to an `SubstrateOpaqueExtrinsic`. + pub fn from_bytes(mut bytes: &[u8]) -> Result { + Self::decode(&mut bytes) + } +} + +impl ::serde::Serialize for SubstrateOpaqueExtrinsic { + fn serialize(&self, seq: S) -> Result + where + S: ::serde::Serializer, + { + self.using_encoded(|bytes| ::impl_serde::serialize::serialize(bytes, seq)) + } +} + +impl<'a> ::serde::Deserialize<'a> for SubstrateOpaqueExtrinsic { + fn deserialize(de: D) -> Result + where + D: ::serde::Deserializer<'a>, + { + let r = impl_serde::serialize::deserialize(de)?; + Decode::decode(&mut &r[..]) + .map_err(|e| ::serde::de::Error::custom(format!("Decode error: {}", e))) + } +} + +impl Extrinsic for SubstrateOpaqueExtrinsic { + type Call = (); + type SignaturePayload = (); +} + +/// A generic Substrate block type, adapted from `sp_runtime::generic::Block`. +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SubstrateBlock { + /// The block header. + pub header: H, + /// The accompanying extrinsics. + pub extrinsics: Vec, +} + +impl Block for SubstrateBlock +where + H: Header, + E: Extrinsic + Encode + Serialize, +{ + type Extrinsic = E; + type Header = H; + type Hasher = ::Hasher; + + fn header(&self) -> &Self::Header { + &self.header + } + fn extrinsics(&self) -> &[Self::Extrinsic] { + &self.extrinsics[..] + } + fn deconstruct(self) -> (Self::Header, Vec) { + (self.header, self.extrinsics) + } + fn new(header: Self::Header, extrinsics: Vec) -> Self { + SubstrateBlock { header, extrinsics } + } + fn encode_from(header: &Self::Header, extrinsics: &[Self::Extrinsic]) -> Vec { + (header, extrinsics).encode() + } +} + +// Copied from subxt. +// https://github.com/paritytech/subxt/blob/ce0a82e3227efb0eae131f025da5f839d9623e15/subxt/src/config/substrate.rs +/// A type that can hash values using the blaks2_256 algorithm. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Encode)] +pub struct BlakeTwo256; + +impl Hasher for BlakeTwo256 { + type Output = H256; + fn hash(s: &[u8]) -> Self::Output { + sp_core_hashing::blake2_256(s).into() + } +} + +/// A generic Substrate header type, adapted from `sp_runtime::generic::Header`. +/// The block number and hasher can be configured to adapt this for other nodes. +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SubstrateHeader + TryFrom, H: Hasher> { + /// The parent hash. + pub parent_hash: H::Output, + /// The block number. + #[serde(serialize_with = "serialize_number", deserialize_with = "deserialize_number")] + #[codec(compact)] + pub number: N, + /// The state trie merkle root + pub state_root: H::Output, + /// The merkle root of the extrinsics. + pub extrinsics_root: H::Output, + /// A chain-specific digest of data useful for light clients or referencing auxiliary data. + pub digest: Digest, +} + +impl Header for SubstrateHeader +where + N: Copy + Into + Into + TryFrom + Encode, + H: Hasher + Encode, + SubstrateHeader: Encode, +{ + type Number = N; + type Hasher = H; + fn number(&self) -> Self::Number { + self.number + } +} + +/// Generic header digest. From `sp_runtime::generic::digest`. +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, Serialize, Deserialize, Default)] +pub struct Digest { + /// A list of digest items. + pub logs: Vec, +} + +/// Digest item that is able to encode/decode 'system' digest items and +/// provide opaque access to other items. From `sp_runtime::generic::digest`. +#[derive(Debug, PartialEq, Eq, Clone)] +pub enum DigestItem { + /// A pre-runtime digest. + /// + /// These are messages from the consensus engine to the runtime, although + /// the consensus engine can (and should) read them itself to avoid + /// code and state duplication. It is erroneous for a runtime to produce + /// these, but this is not (yet) checked. + /// + /// NOTE: the runtime is not allowed to panic or fail in an `on_initialize` + /// call if an expected `PreRuntime` digest is not present. It is the + /// responsibility of a external block verifier to check this. Runtime API calls + /// will initialize the block without pre-runtime digests, so initialization + /// cannot fail when they are missing. + PreRuntime(ConsensusEngineId, Vec), + + /// A message from the runtime to the consensus engine. This should *never* + /// be generated by the native code of any consensus engine, but this is not + /// checked (yet). + Consensus(ConsensusEngineId, Vec), + + /// Put a Seal on it. This is only used by native code, and is never seen + /// by runtimes. + Seal(ConsensusEngineId, Vec), + + /// Some other thing. Unsupported and experimental. + Other(Vec), + + /// An indication for the light clients that the runtime execution + /// environment is updated. + /// + /// Currently this is triggered when: + /// 1. Runtime code blob is changed or + /// 2. `heap_pages` value is changed. + RuntimeEnvironmentUpdated, +} + +// From sp_runtime::generic, DigestItem enum indexes are encoded using this: +#[repr(u32)] +#[derive(Encode, Decode)] +enum DigestItemType { + Other = 0u32, + Consensus = 4u32, + Seal = 5u32, + PreRuntime = 6u32, + RuntimeEnvironmentUpdated = 8u32, +} +impl Encode for DigestItem { + fn encode(&self) -> Vec { + let mut v = Vec::new(); + + match self { + Self::Consensus(val, data) => { + DigestItemType::Consensus.encode_to(&mut v); + (val, data).encode_to(&mut v); + }, + Self::Seal(val, sig) => { + DigestItemType::Seal.encode_to(&mut v); + (val, sig).encode_to(&mut v); + }, + Self::PreRuntime(val, data) => { + DigestItemType::PreRuntime.encode_to(&mut v); + (val, data).encode_to(&mut v); + }, + Self::Other(val) => { + DigestItemType::Other.encode_to(&mut v); + val.encode_to(&mut v); + }, + Self::RuntimeEnvironmentUpdated => { + DigestItemType::RuntimeEnvironmentUpdated.encode_to(&mut v); + }, + } + + v + } +} +impl Decode for DigestItem { + fn decode(input: &mut I) -> Result { + let item_type: DigestItemType = Decode::decode(input)?; + match item_type { + DigestItemType::PreRuntime => { + let vals: (ConsensusEngineId, Vec) = Decode::decode(input)?; + Ok(Self::PreRuntime(vals.0, vals.1)) + }, + DigestItemType::Consensus => { + let vals: (ConsensusEngineId, Vec) = Decode::decode(input)?; + Ok(Self::Consensus(vals.0, vals.1)) + }, + DigestItemType::Seal => { + let vals: (ConsensusEngineId, Vec) = Decode::decode(input)?; + Ok(Self::Seal(vals.0, vals.1)) + }, + DigestItemType::Other => Ok(Self::Other(Decode::decode(input)?)), + DigestItemType::RuntimeEnvironmentUpdated => Ok(Self::RuntimeEnvironmentUpdated), + } + } +} + +/// Consensus engine unique ID. From `sp_runtime::ConsensusEngineId`. +pub type ConsensusEngineId = [u8; 4]; + +impl serde::Serialize for DigestItem { + fn serialize(&self, seq: S) -> Result + where + S: serde::Serializer, + { + self.using_encoded(|bytes| impl_serde::serialize::serialize(bytes, seq)) + } +} + +impl<'a> serde::Deserialize<'a> for DigestItem { + fn deserialize(de: D) -> Result + where + D: serde::Deserializer<'a>, + { + let r = impl_serde::serialize::deserialize(de)?; + Decode::decode(&mut &r[..]) + .map_err(|e| serde::de::Error::custom(format!("Decode error: {e}"))) + } +} + +fn serialize_number + TryFrom>( + val: &T, + s: S, +) -> Result +where + S: serde::Serializer, +{ + let u256: U256 = (*val).into(); + serde::Serialize::serialize(&u256, s) +} + +fn deserialize_number<'a, D, T: Copy + Into + TryFrom>(d: D) -> Result +where + D: serde::Deserializer<'a>, +{ + // At the time of writing, Smoldot gives back block numbers in numeric rather + // than hex format. So let's support deserializing from both here: + use crate::rpc_numbers::NumberOrHex; + let number_or_hex = NumberOrHex::deserialize(d)?; + let u256 = number_or_hex.into_u256(); + TryFrom::try_from(u256).map_err(|_| serde::de::Error::custom("Try from failed")) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::UncheckedExtrinsicV4; + use codec::Encode; + use core::str::FromStr; + use node_template_runtime::{BalancesCall, RuntimeCall, SignedExtra}; + use primitive_types::H256; + use sp_core::crypto::Ss58Codec; + use sp_runtime::{testing::sr25519, AccountId32, MultiAddress, MultiSignature}; + + #[test] + fn from_substrate_bytes_to_bytes_works() { + let string = "0x12341560"; + let bytes = Bytes::from_str(string).unwrap(); + let substrate_bytes: sp_core::Bytes = bytes.clone().into(); + let original_bytes: Bytes = substrate_bytes.into(); + + assert_eq!(original_bytes, bytes); + } + + #[test] + fn from_substrate_storage_data_to_storage_data_works() { + let test_vec = "test_string".encode(); + let storage_data = StorageData(test_vec); + let substrate_storage_data: sp_core::storage::StorageData = storage_data.clone().into(); + let original_storage_data: StorageData = substrate_storage_data.into(); + + assert_eq!(original_storage_data, storage_data); + } + + #[test] + fn from_substrate_storage_key_to_storage_key_works() { + let test_vec = "test_string".encode(); + let storage_key = StorageKey(test_vec); + let substrate_storage_key: sp_core::storage::StorageKey = storage_key.clone().into(); + let original_storage_key: StorageKey = substrate_storage_key.into(); + + assert_eq!(original_storage_key, storage_key); + } + + #[test] + fn from_substrate_change_set_to_change_set_works() { + let test_vec = "test_data".encode(); + let storage_data = StorageData(test_vec); + let test_vec = "test_key".encode(); + let storage_key = StorageKey(test_vec); + let changes = vec![(storage_key, Some(storage_data))]; + let hash = H256::random(); + + let change_set = StorageChangeSet { block: hash, changes: changes.clone() }; + + let substrate_change_set: sp_core::storage::StorageChangeSet = change_set.into(); + let original_change_set: StorageChangeSet = substrate_change_set.into(); + + assert_eq!(original_change_set.block, hash); + assert_eq!(original_change_set.changes, changes); + } + + #[test] + fn from_substrate_justifications_to_justification_works() { + let encoded_justifcation = "test_string".encode(); + let consensus_engine_id: [u8; 4] = [1, 2, 3, 4]; + let justification: Justification = (consensus_engine_id, encoded_justifcation); + let justifications = Justifications(vec![justification]); + + let substrate_justifications: sp_runtime::Justifications = justifications.clone().into(); + let original_justifications: Justifications = substrate_justifications.into(); + + assert_eq!(original_justifications, justifications); + } + + #[test] + fn from_substrate_signed_block_to_signed_block_works() { + let block = "test_string".encode(); + let encoded_justifcation = "test_string".encode(); + let consensus_engine_id: [u8; 4] = [1, 2, 3, 4]; + let justification: Justification = (consensus_engine_id, encoded_justifcation); + let justifications = Some(Justifications(vec![justification])); + + let signed_block = SignedBlock { block, justifications }; + + let substrate_signed_block: sp_runtime::generic::SignedBlock> = + signed_block.clone().into(); + let original_signed_block: SignedBlock> = substrate_signed_block.into(); + + assert_eq!(original_signed_block, signed_block); + } + + #[test] + fn deserialize_header_works() { + let header_json = r#" + { + "digest": { + "logs": [] + }, + "extrinsicsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", + "number": 4, + "parentHash": "0xcb2690b2c85ceab55be03fc7f7f5f3857e7efeb7a020600ebd4331e10be2f7a5", + "stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + "#; + + let header: SubstrateHeader = + serde_json::from_str(header_json).expect("valid block header"); + assert_eq!(header.number(), 4); + } + #[test] + fn deserialize_block_works() { + //header + let header = SubstrateHeader:: { + parent_hash: BlakeTwo256::hash(b"1000"), + number: 2000, + state_root: BlakeTwo256::hash(b"3000"), + extrinsics_root: BlakeTwo256::hash(b"4000"), + digest: Digest { logs: vec![] }, + }; + + //extrinsic + let bob: AccountId32 = + sr25519::Public::from_ss58check("5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty") + .unwrap() + .into(); + let bob = MultiAddress::Id(bob); + + let call1 = RuntimeCall::Balances(BalancesCall::force_transfer { + source: bob.clone(), + dest: bob.clone(), + value: 10, + }); + let xt1 = UncheckedExtrinsicV4::< + MultiAddress, + RuntimeCall, + MultiSignature, + SignedExtra, + >::new_unsigned(call1.clone()); + + //Block + let extrinsics = vec![xt1]; + let block = SubstrateBlock::new(header.clone(), extrinsics.clone()); + + //serialize + let json = serde_json::to_string(&block).expect("serializing failed"); + let block_des: SubstrateBlock< + SubstrateHeader, + UncheckedExtrinsicV4< + MultiAddress, + RuntimeCall, + MultiSignature, + SignedExtra, + >, + > = serde_json::from_str(&json).expect("deserializing failed"); + let header_des = block_des.header; + assert_eq!(header, header_des); + let extrinsics_des = block_des.extrinsics; + assert_eq!(extrinsics_des, extrinsics); + } +} diff --git a/primitives/src/traits.rs b/primitives/src/traits.rs new file mode 100644 index 000000000..9194bd538 --- /dev/null +++ b/primitives/src/traits.rs @@ -0,0 +1,83 @@ +/* + Copyright 2019 Supercomputing Systems AG + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +//! Re-definition of substrate trait +//! Needed to become independent of sp_runtime + +use alloc::vec::Vec; +use codec::Encode; +use sp_runtime::traits::Extrinsic; + +/// This represents the hasher used by a node to hash things like block headers +/// and extrinsics. +// https://github.com/paritytech/subxt/blob/ce0a82e3227efb0eae131f025da5f839d9623e15/subxt/src/config/mod.rs#L71 +pub trait Hasher { + /// The type given back from the hash operation + type Output; + + /// Hash some bytes to the given output type. + fn hash(s: &[u8]) -> Self::Output; + + /// Hash some SCALE encodable type to the given output type. + fn hash_of(s: &S) -> Self::Output { + let out = s.encode(); + Self::hash(&out) + } +} +/// This represents the block header type used by a node. +// https://github.com/paritytech/subxt/blob/ce0a82e3227efb0eae131f025da5f839d9623e15/subxt/src/config/mod.rs#L85 +pub trait Header: Sized + Encode { + /// The block number type for this header. + type Number: Into; + /// The hasher used to hash this header. + type Hasher: Hasher; //Header::Hash; type Hashing: Hash; + + /// Return the block number of this header. + fn number(&self) -> Self::Number; + + /// Hash this header. + fn hash(&self) -> ::Output { + Self::Hasher::hash_of(self) + } +} + +/// This represents the block header type used by a node. +// https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs +pub trait Block: Sized + Encode { + /// Type for extrinsics. + type Extrinsic: Extrinsic + Encode; + /// Header type. + type Header: Header; + /// Block hash type. + type Hasher: Hasher; + + /// Returns a reference to the header. + fn header(&self) -> &Self::Header; + /// Returns a reference to the list of extrinsics. + fn extrinsics(&self) -> &[Self::Extrinsic]; + /// Split the block into header and list of extrinsics. + fn deconstruct(self) -> (Self::Header, Vec); + /// Creates new block from header and extrinsics. + fn new(header: Self::Header, extrinsics: Vec) -> Self; + /// Returns the hash of the block. + fn hash(&self) -> ::Output { + <::Hasher>::hash_of(self.header()) + } + /// Creates an encoded block from the given `header` and `extrinsics` without requiring the + /// creation of an instance. + fn encode_from(header: &Self::Header, extrinsics: &[Self::Extrinsic]) -> Vec; +} diff --git a/primitives/src/types.rs b/primitives/src/types.rs index 8cbe6cf76..a2785b942 100644 --- a/primitives/src/types.rs +++ b/primitives/src/types.rs @@ -160,7 +160,7 @@ impl FeeDetails { #[serde(rename_all = "camelCase")] #[serde(bound(serialize = "Balance: core::fmt::Display, Weight: Serialize"))] #[serde(bound(deserialize = "Balance: core::str::FromStr, Weight: Deserialize<'de>"))] -pub struct RuntimeDispatchInfo { +pub struct RuntimeDispatchInfo { /// Weight of this dispatch. pub weight: Weight, /// Class of this dispatch. diff --git a/src/api/api_client.rs b/src/api/api_client.rs index ece2510dd..2cd04331c 100644 --- a/src/api/api_client.rs +++ b/src/api/api_client.rs @@ -18,13 +18,11 @@ use crate::{ }; use ac_compose_macros::rpc_params; use ac_node_api::metadata::Metadata; -use ac_primitives::{Config, ExtrinsicParams, SignExtrinsic}; +use ac_primitives::{Bytes, Config, ExtrinsicParams, RuntimeVersion, SignExtrinsic}; use codec::Decode; use core::convert::TryFrom; use frame_metadata::RuntimeMetadataPrefixed; use log::{debug, info}; -use sp_core::Bytes; -use sp_version::RuntimeVersion; /// Api to talk with substrate-nodes /// diff --git a/src/api/mod.rs b/src/api/mod.rs index 0ce95708b..84defddc1 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -16,10 +16,10 @@ */ use ac_node_api::EventDetails; +use ac_primitives::Bytes; use alloc::{string::String, vec::Vec}; use codec::Decode; use serde::{Deserialize, Serialize}; -use sp_core::Bytes; pub use api_client::Api; pub use error::{Error, Result}; diff --git a/src/api/rpc_api/author.rs b/src/api/rpc_api/author.rs index 6208faa16..e4e00028f 100644 --- a/src/api/rpc_api/author.rs +++ b/src/api/rpc_api/author.rs @@ -19,12 +19,10 @@ use crate::{ Api, ExtrinsicReport, TransactionStatus, XtStatus, }; use ac_compose_macros::rpc_params; -use ac_primitives::{config::Config, UncheckedExtrinsicV4}; +use ac_primitives::{config::Config, Bytes, Hasher, UncheckedExtrinsicV4}; use codec::{Decode, Encode}; use log::*; use serde::de::DeserializeOwned; -use sp_core::Bytes; -use sp_runtime::traits::Hash as HashTrait; pub type TransactionSubscriptionFor = ::Subscription>; @@ -358,7 +356,7 @@ where encoded_extrinsic: &Bytes, watch_until: XtStatus, ) -> Result> { - let tx_hash = T::Hasher::hash(encoded_extrinsic); + let tx_hash = T::Hasher::hash(&encoded_extrinsic.0); let mut subscription: TransactionSubscriptionFor = self.submit_and_watch_opaque_extrinsic(encoded_extrinsic).await?; diff --git a/src/api/rpc_api/chain.rs b/src/api/rpc_api/chain.rs index 4452af5bd..8c21cdbd3 100644 --- a/src/api/rpc_api/chain.rs +++ b/src/api/rpc_api/chain.rs @@ -17,11 +17,10 @@ use crate::{ Error, }; use ac_compose_macros::rpc_params; -use ac_primitives::config::Config; +use ac_primitives::{config::Config, SignedBlock}; use alloc::vec::Vec; use log::*; use serde::de::DeserializeOwned; -use sp_runtime::generic::SignedBlock; #[maybe_async::maybe_async(?Send)] pub trait GetChainInfo { diff --git a/src/api/rpc_api/events.rs b/src/api/rpc_api/events.rs index a6796bc6f..902800654 100644 --- a/src/api/rpc_api/events.rs +++ b/src/api/rpc_api/events.rs @@ -18,14 +18,12 @@ use crate::{ }; use ac_compose_macros::rpc_params; use ac_node_api::{metadata::Metadata, EventDetails, EventRecord, Events, Phase}; -use ac_primitives::config::Config; +use ac_primitives::{config::Config, Block, Hasher, StorageChangeSet}; use alloc::{vec, vec::Vec}; use codec::Decode; use core::marker::PhantomData; use log::*; use serde::de::DeserializeOwned; -use sp_runtime::traits::{Block as BlockHash, Hash as HashTrait}; -use sp_storage::StorageChangeSet; pub type EventSubscriptionFor = EventSubscription<::Subscription>, Hash>; @@ -231,18 +229,13 @@ mod tests { use super::*; use crate::rpc::mocks::RpcClientMock; use ac_node_api::{metadata::Metadata, test_utils::*}; - use ac_primitives::DefaultRuntimeConfig; + use ac_primitives::{Bytes, DefaultRuntimeConfig, RuntimeVersion, SignedBlock, StorageData}; use codec::{Decode, Encode}; use frame_metadata::RuntimeMetadataPrefixed; use kitchensink_runtime::{BalancesCall, RuntimeCall, UncheckedExtrinsic}; use scale_info::TypeInfo; - use sp_core::{crypto::Ss58Codec, sr25519, Bytes, H256}; - use sp_runtime::{ - generic::{Block, SignedBlock}, - AccountId32, MultiAddress, - }; - use sp_storage::StorageData; - use sp_version::RuntimeVersion; + use sp_core::{crypto::Ss58Codec, sr25519, H256}; + use sp_runtime::{generic::Block, AccountId32, MultiAddress}; use std::{collections::HashMap, fs}; use test_case::test_case; @@ -379,9 +372,9 @@ mod tests { let xt2: Bytes = UncheckedExtrinsic::new_unsigned(call2).encode().into(); let xt3: Bytes = UncheckedExtrinsic::new_unsigned(call3).encode().into(); - let xt_hash1 = ::Hasher::hash(&xt1); - let xt_hash2 = ::Hasher::hash(&xt2); - let xt_hash3 = ::Hasher::hash(&xt3); + let xt_hash1 = ::Hasher::hash(&xt1.0); + let xt_hash2 = ::Hasher::hash(&xt2.0); + let xt_hash3 = ::Hasher::hash(&xt3.0); let block = Block { header: default_header(), extrinsics: vec![xt1, xt2, xt3] }; let signed_block = SignedBlock { block, justifications: None }; diff --git a/src/api/rpc_api/frame_system.rs b/src/api/rpc_api/frame_system.rs index e87b3510e..efb53e9e5 100644 --- a/src/api/rpc_api/frame_system.rs +++ b/src/api/rpc_api/frame_system.rs @@ -18,10 +18,9 @@ use crate::{ rpc::Request, }; use ac_compose_macros::rpc_params; -use ac_primitives::{config::Config, AccountInfo}; +use ac_primitives::{config::Config, AccountInfo, StorageKey}; use alloc::{string::String, vec::Vec}; use log::*; -use sp_storage::StorageKey; #[maybe_async::maybe_async(?Send)] pub trait GetAccountInformation { @@ -30,6 +29,8 @@ pub trait GetAccountInformation { type AccountData; /// Retrieves the next account index as available on the node. + // FIXME: Remove std feature #574 + #[cfg(feature = "std")] async fn get_system_account_next_index( &self, account_id: Self::AccountId, @@ -59,6 +60,8 @@ where type Index = T::Index; type AccountData = T::AccountData; + // FIXME: Remove std feature: #574 + #[cfg(feature = "std")] async fn get_system_account_next_index( &self, account_id: Self::AccountId, diff --git a/src/api/rpc_api/pallet_transaction_payment.rs b/src/api/rpc_api/pallet_transaction_payment.rs index bdfe13984..8096b0cbd 100644 --- a/src/api/rpc_api/pallet_transaction_payment.rs +++ b/src/api/rpc_api/pallet_transaction_payment.rs @@ -15,9 +15,10 @@ use crate::{ rpc::Request, }; use ac_compose_macros::rpc_params; -use ac_primitives::{config::Config, FeeDetails, InclusionFee, NumberOrHex, RuntimeDispatchInfo}; +use ac_primitives::{ + config::Config, Bytes, FeeDetails, InclusionFee, NumberOrHex, RuntimeDispatchInfo, +}; use core::str::FromStr; -use sp_core::Bytes; /// Interface to common calls of the substrate transaction payment pallet. #[maybe_async::maybe_async(?Send)] diff --git a/src/api/rpc_api/state.rs b/src/api/rpc_api/state.rs index 224e4d636..3bde977ea 100644 --- a/src/api/rpc_api/state.rs +++ b/src/api/rpc_api/state.rs @@ -17,13 +17,12 @@ use crate::{ }; use ac_compose_macros::rpc_params; use ac_node_api::MetadataError; -use ac_primitives::config::Config; +use ac_primitives::{config::Config, StorageChangeSet, StorageData, StorageKey}; use alloc::{borrow::ToOwned, string::String, vec, vec::Vec}; use codec::{Decode, Encode}; use core::cmp; use log::*; use serde::de::DeserializeOwned; -use sp_storage::{StorageChangeSet, StorageData, StorageKey}; /// Default substrate value of maximum number of keys returned. // See https://github.com/paritytech/substrate/blob/9f6fecfeea15345c983629af275b1f1702a50004/client/rpc/src/state/mod.rs#L54 diff --git a/src/lib.rs b/src/lib.rs index c9d52a5f6..272a32d74 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,8 +19,8 @@ extern crate alloc; +use ac_primitives::StorageKey; use sp_core::twox_128; -use sp_storage::StorageKey; pub use ac_compose_macros; pub use ac_node_api; diff --git a/test-no-std/Cargo.toml b/test-no-std/Cargo.toml index f87e690a5..352a7e1c0 100644 --- a/test-no-std/Cargo.toml +++ b/test-no-std/Cargo.toml @@ -15,7 +15,7 @@ ac-primitives = { path = "../primitives", default-features = false, optional = t substrate-api-client = { path = "..", default-features = false, optional = true, features = ["disable_target_static_assertions", "sync-api"] } # substrate dependencies -sp-io = { default-features = false, features = ["disable_oom", "disable_panic_handler"], git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-io = { default-features = false, features = ["disable_oom", "disable_panic_handler"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } [features] # It is better to test the no-std crates standalone (don't enable both features at the same time) because dependency diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 42330e69c..45fc00bd3 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -14,18 +14,18 @@ tokio = { version = "1.24", features = ["rt-multi-thread", "macros", "time"] } wabt = "0.10.0" # Substrate dependencies -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } +pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # local deps substrate-api-client = { path = "..", features = [ diff --git a/testing/examples/keystore_tests.rs b/testing/examples/keystore_tests.rs deleted file mode 100644 index 041b0e8b7..000000000 --- a/testing/examples/keystore_tests.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright 2019 Supercomputing Systems AG - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -//! Tests for the author rpc interface functions. - -use sp_application_crypto::sr25519; -use sp_core::crypto::{KeyTypeId, Ss58Codec}; -use std::path::PathBuf; -use substrate_client_keystore::{Keystore, KeystoreExt, LocalKeystore}; - -pub const KEYSTORE_PATH: &str = "my_keystore"; -pub const SR25519: KeyTypeId = KeyTypeId(*b"sr25"); - -#[tokio::main] -async fn main() { - let store = LocalKeystore::open(PathBuf::from(&KEYSTORE_PATH), None).unwrap(); - let seed = "//Ferdie"; - - // This does not place the key into the keystore if we have a seed, but it does - // place it into the keystore if the seed is none. - let key = store.sr25519_generate_new(SR25519, Some(seed)).unwrap(); - store.insert(SR25519, seed, &key.0).unwrap(); - - drop(store); - println!("{}", key.to_ss58check()); - - let store = LocalKeystore::open(PathBuf::from(&KEYSTORE_PATH), None).unwrap(); - let pubkeys = store.public_keys::().unwrap(); - - assert_eq!(pubkeys[0].to_ss58check(), key.to_ss58check()); -}