diff --git a/Cargo.lock b/Cargo.lock index c3ab7f2b..04ca5f67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,22 +12,13 @@ dependencies = [ "regex", ] -[[package]] -name = "addr2line" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" -dependencies = [ - "gimli 0.25.0", -] - [[package]] name = "addr2line" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.26.1", + "gimli", ] [[package]] @@ -77,7 +68,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.5", "once_cell", "version_check", ] @@ -175,9 +166,9 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.0.4" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43" +checksum = "c026b7e44f1316b567ee750fea85103f87fcb80792b860e979f221259796ca0a" dependencies = [ "async-channel", "async-executor", @@ -226,34 +217,16 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-process" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" -dependencies = [ - "async-io", - "blocking", - "cfg-if 1.0.0", - "event-listener", - "futures-lite", - "libc", - "once_cell", - "signal-hook", - "winapi 0.3.9", -] - [[package]] name = "async-std" -version = "1.11.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" +checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" dependencies = [ "async-channel", "async-global-executor", "async-io", "async-lock", - "async-process", "crossbeam-utils", "futures-channel", "futures-core", @@ -293,9 +266,9 @@ checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" dependencies = [ "proc-macro2", "quote", @@ -366,7 +339,7 @@ version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ - "addr2line 0.17.0", + "addr2line", "cc", "cfg-if 1.0.0", "libc", @@ -381,6 +354,12 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + [[package]] name = "base58" version = "0.2.0" @@ -393,17 +372,25 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64ct" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179" + [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-primitives", "fnv", "futures 0.3.21", + "hex", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", + "sc-chain-spec", "sc-client-api", "sc-keystore", "sc-network", @@ -424,7 +411,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -435,21 +422,24 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", + "parking_lot 0.12.0", "sc-rpc", + "sc-utils", "serde", "sp-core", "sp-runtime", + "thiserror", ] [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -502,9 +492,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" -version = "0.20.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" dependencies = [ "funty", "radium", @@ -523,6 +513,15 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "blake2" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" +dependencies = [ + "digest 0.10.3", +] + [[package]] name = "blake2-rfc" version = "0.2.18" @@ -592,6 +591,15 @@ dependencies = [ "generic-array 0.14.5", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array 0.14.5", +] + [[package]] name = "block-padding" version = "0.1.5" @@ -628,7 +636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ "borsh-derive", - "hashbrown", + "hashbrown 0.11.2", ] [[package]] @@ -730,6 +738,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "cache-padded" version = "1.2.0" @@ -738,9 +757,9 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "camino" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] @@ -762,7 +781,7 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 1.0.7", + "semver 1.0.6", "serde", "serde_json", ] @@ -944,17 +963,32 @@ dependencies = [ [[package]] name = "clap" -version = "2.34.0" +version = "3.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" dependencies = [ - "ansi_term", "atty", "bitflags", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", "strsim", + "termcolor", "textwrap", - "unicode-width", - "vec_map", +] + +[[package]] +name = "clap_derive" +version = "3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" +dependencies = [ + "heck 0.4.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -966,6 +1000,12 @@ dependencies = [ "cache-padded", ] +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1023,24 +1063,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc0cb7df82c8cf8f2e6a8dd394a0932a71369c160cc9b027dca414fced242513" +checksum = "62fc68cdb867b7d27b5f33cd65eb11376dfb41a2d09568a1a2c2bc1dc204f4ef" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4463c15fa42eee909e61e5eac4866b7c6d22d0d8c621e57a0c5380753bfa8c" +checksum = "31253a44ab62588f8235a996cc9b0636d98a299190069ced9628b8547329b47a" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli", "log", "regalloc", "smallvec", @@ -1049,34 +1089,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793f6a94a053a55404ea16e1700202a88101672b8cd6b4df63e13cde950852bf" +checksum = "7a20ab4627d30b702fb1b8a399882726d216b8164d3b3fa6189e3bf901506afe" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44aa1846df275bce5eb30379d65964c7afc63c05a117076e62a119c25fe174be" +checksum = "6687d9668dacfed4468361f7578d86bded8ca4db978f734d9b631494bebbb5b8" [[package]] name = "cranelift-entity" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a45d8d6318bf8fc518154d9298eab2a8154ec068a8885ff113f6db8d69bb3a" +checksum = "c77c5d72db97ba2cb36f69037a709edbae0d29cb25503775891e7151c5c874bf" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e07339bd461766deb7605169de039e01954768ff730fa1254e149001884a8525" +checksum = "426dca83f63c7c64ea459eb569aadc5e0c66536c0042ed5d693f91830e8750d0" dependencies = [ "cranelift-codegen", "log", @@ -1086,9 +1125,9 @@ dependencies = [ [[package]] name = "cranelift-native" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e2fca76ff57e0532936a71e3fc267eae6a19a86656716479c66e7f912e3d7b" +checksum = "8007864b5d0c49b026c861a15761785a2871124e401630c03ef1426e6d0d559e" dependencies = [ "cranelift-codegen", "libc", @@ -1097,9 +1136,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.78.0" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f46fec547a1f8a32c54ea61c28be4f4ad234ad95342b718a9a9adcaadb0c778" +checksum = "94cf12c071415ba261d897387ae5350c4d83c238376c8c5a96514ecfa2ea66a3" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1143,10 +1182,11 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ + "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "lazy_static", @@ -1170,6 +1210,28 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +dependencies = [ + "generic-array 0.14.5", + "rand_core 0.6.3", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +dependencies = [ + "generic-array 0.14.5", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -1288,11 +1350,12 @@ dependencies = [ "beefy-gadget", "beefy-gadget-rpc", "beefy-primitives", + "clap", "debio-runtime", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", - "frame-system-rpc-runtime-api", + "frame-system-benchmarking", "hex-literal", "jsonrpc-core", "pallet-im-online", @@ -1337,7 +1400,6 @@ dependencies = [ "sp-runtime", "sp-timestamp", "sp-transaction-storage-proof", - "structopt", "substrate-build-script-utils", "substrate-frame-rpc-system", ] @@ -1420,10 +1482,20 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", + "static_assertions", "substrate-wasm-builder", "user-profile", ] +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1455,6 +1527,17 @@ dependencies = [ "generic-array 0.14.5", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "directories" version = "4.0.1" @@ -1624,6 +1707,17 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28" +[[package]] +name = "ecdsa" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +dependencies = [ + "der", + "elliptic-curve", + "signature", +] + [[package]] name = "ed25519" version = "1.4.1" @@ -1671,6 +1765,24 @@ dependencies = [ "traits-electronic-medical-record", ] +[[package]] +name = "elliptic-curve" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +dependencies = [ + "base16ct", + "crypto-bigint", + "der", + "ff", + "generic-array 0.14.5", + "group", + "rand_core 0.6.3", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "enum-as-inner" version = "0.3.4" @@ -1768,6 +1880,16 @@ dependencies = [ "libc", ] +[[package]] +name = "ff" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +dependencies = [ + "rand_core 0.6.3", + "subtle", +] + [[package]] name = "file-per-thread-logger" version = "0.1.5" @@ -1780,17 +1902,17 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.14.4" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" +checksum = "d9def033d8505edf199f6a5d07aa7e6d2d6185b164293b77f0efd108f4f3e11d" dependencies = [ "either", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "log", "num-traits", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.2", "scale-info", ] @@ -1834,7 +1956,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", ] @@ -1852,7 +1974,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -1861,7 +1983,9 @@ dependencies = [ "parity-scale-codec", "paste", "scale-info", + "serde", "sp-api", + "sp-application-crypto", "sp-io", "sp-runtime", "sp-runtime-interface", @@ -1872,33 +1996,48 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "Inflector", "chrono", + "clap", "frame-benchmarking", "frame-support", "handlebars", + "hash-db", + "hex", + "itertools", + "kvdb", "linked-hash-map", "log", + "memory-db", "parity-scale-codec", + "rand 0.8.5", "sc-cli", + "sc-client-api", "sc-client-db", "sc-executor", "sc-service", "serde", + "serde_json", + "serde_nanos", + "sp-api", + "sp-blockchain", "sp-core", + "sp-database", "sp-externalities", "sp-keystore", "sp-runtime", "sp-state-machine", - "structopt", + "sp-std", + "sp-storage", + "sp-trie", ] [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -1913,9 +2052,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "14.2.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" +checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if 1.0.0", "parity-scale-codec", @@ -1926,7 +2065,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "bitflags", "frame-metadata", @@ -1955,7 +2094,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1967,7 +2106,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -1979,7 +2118,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro2", "quote", @@ -1989,7 +2128,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "log", @@ -2006,7 +2145,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -2021,7 +2160,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sp-api", @@ -2049,6 +2188,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -2067,9 +2212,9 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "funty" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" @@ -2175,12 +2320,6 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" -[[package]] -name = "futures-timer" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" - [[package]] name = "futures-timer" version = "3.0.2" @@ -2729,9 +2868,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ "cfg-if 1.0.0", "libc", @@ -2750,21 +2889,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" - [[package]] name = "glob" version = "0.3.0" @@ -2796,11 +2929,22 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "group" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +dependencies = [ + "ff", + "rand_core 0.6.3", + "subtle", +] + [[package]] name = "h2" -version = "0.3.13" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b" dependencies = [ "bytes 1.1.0", "fnv", @@ -2811,7 +2955,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.1", + "tokio-util", "tracing", ] @@ -2853,6 +2997,15 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" +dependencies = [ + "ahash", +] + [[package]] name = "heck" version = "0.3.3" @@ -3058,9 +3211,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "043f0e083e9901b6cc658a77d1eb86f4fc650bbb977a4337dd63192826aa85dd" dependencies = [ "bytes 1.1.0", "futures-channel", @@ -3158,9 +3311,9 @@ dependencies = [ [[package]] name = "impl-codec" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ "parity-scale-codec", ] @@ -3187,12 +3340,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.11.2", "serde", ] @@ -3214,23 +3367,12 @@ dependencies = [ "num-traits", ] -[[package]] -name = "intervalier" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275" -dependencies = [ - "futures 0.3.21", - "futures-timer 2.0.2", -] - [[package]] name = "io-lifetimes" -version = "0.3.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278e90d6f8a6c76a8334b336e306efa3c5f2b604048cbfd486d6f49878e3af14" +checksum = "f6ef6787e7f0faedc040f95716bdd0e62bcfcf4ba93da053b62dea2691c13864" dependencies = [ - "rustc_version 0.4.0", "winapi 0.3.9", ] @@ -3371,7 +3513,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "net2", - "parking_lot", + "parking_lot 0.11.2", "unicase", ] @@ -3386,7 +3528,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "parity-tokio-ipc", - "parking_lot", + "parking_lot 0.11.2", "tower-service", ] @@ -3400,7 +3542,7 @@ dependencies = [ "jsonrpc-core", "lazy_static", "log", - "parking_lot", + "parking_lot 0.11.2", "rand 0.7.3", "serde", ] @@ -3419,7 +3561,7 @@ dependencies = [ "log", "tokio", "tokio-stream", - "tokio-util 0.6.9", + "tokio-util", "unicase", ] @@ -3434,10 +3576,22 @@ dependencies = [ "jsonrpc-server-utils", "log", "parity-ws", - "parking_lot", + "parking_lot 0.11.2", "slab", ] +[[package]] +name = "k256" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "sec1", +] + [[package]] name = "keccak" version = "0.1.0" @@ -3465,9 +3619,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" +checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" dependencies = [ "parity-util-mem", "smallvec", @@ -3475,20 +3629,20 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" +checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot", + "parking_lot 0.12.0", ] [[package]] name = "kvdb-rocksdb" -version = "0.14.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1b6ea8f2536f504b645ad78419c8246550e19d2c3419a167080ce08edee35a" +checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" dependencies = [ "fs-swap", "kvdb", @@ -3496,7 +3650,7 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot", + "parking_lot 0.12.0", "regex", "rocksdb", "smallvec", @@ -3678,7 +3832,7 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot", + "parking_lot 0.11.2", "pin-project 1.0.10", "smallvec", "wasm-timer", @@ -3696,7 +3850,7 @@ dependencies = [ "either", "fnv", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "instant", "lazy_static", "libsecp256k1", @@ -3704,7 +3858,7 @@ dependencies = [ "multiaddr", "multihash 0.14.0", "multistream-select", - "parking_lot", + "parking_lot 0.11.2", "pin-project 1.0.10", "prost", "prost-build", @@ -3878,7 +4032,7 @@ dependencies = [ "libp2p-core", "log", "nohash-hasher", - "parking_lot", + "parking_lot 0.11.2", "rand 0.7.3", "smallvec", "unsigned-varint 0.7.1", @@ -3949,7 +4103,7 @@ dependencies = [ "pin-project 1.0.10", "rand 0.7.3", "salsa20", - "sha3", + "sha3 0.9.1", ] [[package]] @@ -3961,7 +4115,7 @@ dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "libp2p-core", "libp2p-swarm", "log", @@ -4009,7 +4163,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru 0.7.5", + "lru 0.7.3", "rand 0.7.3", "smallvec", "unsigned-varint 0.7.1", @@ -4050,7 +4204,7 @@ checksum = "7399c5b6361ef525d41c11fcf51635724f832baf5819b30d3d873eabb4fbae4b" dependencies = [ "async-io", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "if-watch", "ipnet", "libc", @@ -4111,21 +4265,24 @@ checksum = "4e7362abb8867d7187e7e93df17f460d554c997fc5c8ac57dc1259057f6889af" dependencies = [ "futures 0.3.21", "libp2p-core", - "parking_lot", + "parking_lot 0.11.2", "thiserror", "yamux", ] [[package]] name = "librocksdb-sys" -version = "6.20.3" +version = "0.6.1+6.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d" +checksum = "81bc587013734dadb7cf23468e531aa120788b87243648be42e2d3a072186291" dependencies = [ "bindgen", + "bzip2-sys", "cc", "glob", "libc", + "libz-sys", + "tikv-jemalloc-sys", ] [[package]] @@ -4214,24 +4371,24 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.0.28" +version = "0.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687387ff42ec7ea4f2149035a5675fedb675d26f98db90a1846ac63d3addb5f5" +checksum = "a261afc61b7a5e323933b402ca6a1765183687c614789b1e4db7762ed4230bca" [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" dependencies = [ "scopeguard", ] [[package]] name = "log" -version = "0.4.16" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ "cfg-if 1.0.0", "value-bag", @@ -4243,16 +4400,16 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" dependencies = [ - "hashbrown", + "hashbrown 0.11.2", ] [[package]] name = "lru" -version = "0.7.5" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" +checksum = "fcb87f3080f6d1d69e8c564c0fcfde1d7aa8cc451ce40cae89479111f03bc0eb" dependencies = [ - "hashbrown", + "hashbrown 0.11.2", ] [[package]] @@ -4364,12 +4521,12 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" +checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.12.0", "parity-util-mem", ] @@ -4521,7 +4678,7 @@ dependencies = [ "generic-array 0.14.5", "multihash-derive", "sha2 0.9.9", - "sha3", + "sha3 0.9.1", "unsigned-varint 0.5.1", ] @@ -4853,6 +5010,15 @@ dependencies = [ "user-profile", ] +[[package]] +name = "os_str_bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +dependencies = [ + "memchr", +] + [[package]] name = "owning_ref" version = "0.4.1" @@ -4865,7 +5031,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4879,7 +5045,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -4894,7 +5060,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4918,7 +5084,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4933,7 +5099,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-primitives", "frame-support", @@ -4949,14 +5115,14 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-merkle-tree", "beefy-primitives", "frame-support", "frame-system", "hex", - "libsecp256k1", + "k256", "log", "pallet-beefy", "pallet-mmr", @@ -4974,7 +5140,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -4997,7 +5163,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5016,7 +5182,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5034,7 +5200,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5050,7 +5216,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5067,7 +5233,7 @@ dependencies = [ [[package]] name = "pallet-octopus-appchain" version = "4.0.0-pre.0" -source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.13#831d3dc328aee1a4aea42597b6d018e1d5e2ad0c" +source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.18#929324c1c53d4353bbd89aa04e114c50a4f291fd" dependencies = [ "base64", "borsh", @@ -5082,6 +5248,7 @@ dependencies = [ "serde", "serde_bytes", "serde_json", + "sp-application-crypto", "sp-core", "sp-io", "sp-runtime", @@ -5091,7 +5258,7 @@ dependencies = [ [[package]] name = "pallet-octopus-lpos" version = "4.0.0-pre.0" -source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.13#831d3dc328aee1a4aea42597b6d018e1d5e2ad0c" +source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.18#929324c1c53d4353bbd89aa04e114c50a4f291fd" dependencies = [ "borsh", "frame-benchmarking", @@ -5113,7 +5280,7 @@ dependencies = [ [[package]] name = "pallet-octopus-support" version = "4.0.0-pre.0" -source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.13#831d3dc328aee1a4aea42597b6d018e1d5e2ad0c" +source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.18#929324c1c53d4353bbd89aa04e114c50a4f291fd" dependencies = [ "borsh", "frame-support", @@ -5126,7 +5293,7 @@ dependencies = [ [[package]] name = "pallet-octopus-upward-messages" version = "4.0.0-pre.0" -source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.13#831d3dc328aee1a4aea42597b6d018e1d5e2ad0c" +source = "git+https://github.com/octopus-network/octopus-pallets.git?branch=release-v0.9.18#929324c1c53d4353bbd89aa04e114c50a4f291fd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5144,7 +5311,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5158,7 +5325,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5179,7 +5346,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5193,7 +5360,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -5210,7 +5377,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5227,7 +5394,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5244,7 +5411,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5255,11 +5422,12 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-runtime", @@ -5268,9 +5436,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.3.11" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e7f385d61562f5834282b90aa50b41f38a35cf64d5209b8b05487b50553dbe" +checksum = "3d121a9af17a43efd0a38c6afa508b927ba07785bd4709efb2ac03bf77efef8d" dependencies = [ "blake2-rfc", "crc32fast", @@ -5280,16 +5448,16 @@ dependencies = [ "log", "lz4", "memmap2 0.2.3", - "parking_lot", + "parking_lot 0.11.2", "rand 0.8.5", "snap", ] [[package]] name = "parity-scale-codec" -version = "2.3.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -5301,9 +5469,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "2.3.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -5333,15 +5501,15 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" +checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ "cfg-if 1.0.0", - "hashbrown", + "hashbrown 0.12.0", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot", + "parking_lot 0.12.0", "primitive-types", "smallvec", "winapi 0.3.9", @@ -5405,7 +5573,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.1", ] [[package]] @@ -5423,14 +5601,27 @@ dependencies = [ ] [[package]] -name = "paste" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" - -[[package]] -name = "pbkdf2" -version = "0.4.0" +name = "parking_lot_core" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + +[[package]] +name = "paste" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" + +[[package]] +name = "pbkdf2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" dependencies = [ @@ -5575,11 +5766,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" [[package]] name = "platforms" @@ -5631,9 +5833,9 @@ checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "primitive-types" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", "impl-codec", @@ -5770,7 +5972,7 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot", + "parking_lot 0.11.2", "thiserror", ] @@ -5829,24 +6031,13 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.18" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a" +checksum = "6eca0fa5dd7c4c96e184cec588f0b1db1ee3165e678db21c09793105acb17e6f" dependencies = [ "cc", ] -[[package]] -name = "pwasm-utils" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" -dependencies = [ - "byteorder", - "log", - "parity-wasm 0.42.2", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -5872,18 +6063,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.17" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58" +checksum = "b4af2ec4714533fcdf07e886f17025ace8b997b9ce51204ee69b6da831c3da57" dependencies = [ "proc-macro2", ] [[package]] name = "radium" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" @@ -5945,7 +6136,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.5", ] [[package]] @@ -6009,20 +6200,20 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "7776223e2696f1aa4c6b0170e83212f47296a00424305117d013dfe86fb0fe55" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.5", "redox_syscall", "thiserror", ] @@ -6049,9 +6240,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.32" +version = "0.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6304468554ed921da3d32c355ea107b8d13d7b8996c3adfb7aab48d3bc321f4" +checksum = "7d808cff91dfca7b239d40b972ba628add94892b1d9e19a842aedc5cfae8ab1a" dependencies = [ "log", "rustc-hash", @@ -6156,9 +6347,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a62eca5cacf2c8261128631bed9f045598d40bfbe4b29f5163f0f802f8f44a7" +checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" dependencies = [ "libc", "librocksdb-sys", @@ -6174,23 +6365,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rsix" -version = "0.23.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f64c5788d5aab8b75441499d99576a24eb09f76fb267b36fec7e3d970c66431" -dependencies = [ - "bitflags", - "cc", - "errno", - "io-lifetimes", - "itoa 0.4.8", - "libc", - "linux-raw-sys", - "once_cell", - "rustc_version 0.4.0", -] - [[package]] name = "rustc-demangle" version = "0.1.21" @@ -6233,7 +6407,21 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.7", + "semver 1.0.6", +] + +[[package]] +name = "rustix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2dcfc2778a90e38f56a708bfc90572422e11d6c7ee233d053d1f782cf9df6d2" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "winapi 0.3.9", ] [[package]] @@ -6261,6 +6449,12 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustversion" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" + [[package]] name = "rw-stream-sink" version = "0.2.1" @@ -6308,7 +6502,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "sp-core", @@ -6319,10 +6513,10 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "log", "parity-scale-codec", "sc-block-builder", @@ -6342,7 +6536,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6358,7 +6552,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.3", @@ -6375,7 +6569,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -6386,9 +6580,10 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "chrono", + "clap", "fdlimit", "futures 0.3.21", "hex", @@ -6415,7 +6610,6 @@ dependencies = [ "sp-panic-handler", "sp-runtime", "sp-version", - "structopt", "thiserror", "tiny-bip39", "tokio", @@ -6424,14 +6618,14 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "fnv", "futures 0.3.21", "hash-db", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -6452,7 +6646,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "kvdb", @@ -6462,7 +6656,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "sc-client-api", "sc-state-db", "sp-arithmetic", @@ -6477,14 +6671,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "libp2p", "log", - "parking_lot", + "parking_lot 0.12.0", "sc-client-api", "sc-utils", "serde", @@ -6501,10 +6695,9 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "fork-tree", "futures 0.3.21", "log", @@ -6513,7 +6706,7 @@ dependencies = [ "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "rand 0.7.3", "retain_mut", "sc-client-api", @@ -6539,14 +6732,14 @@ dependencies = [ "sp-runtime", "sp-version", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "futures 0.3.21", "jsonrpc-core", "jsonrpc-core-client", @@ -6563,12 +6756,13 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", + "thiserror", ] [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6581,17 +6775,16 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "log", "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-api", "sp-arithmetic", "sp-blockchain", "sp-consensus", @@ -6607,7 +6800,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "sc-client-api", "sp-authorship", @@ -6618,13 +6811,12 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "lazy_static", - "libsecp256k1", - "log", + "lru 0.6.6", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -6639,31 +6831,31 @@ dependencies = [ "sp-trie", "sp-version", "sp-wasm-interface", + "tracing", "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "environmental", "parity-scale-codec", - "pwasm-utils", "sc-allocator", "sp-core", "sp-maybe-compressed-blob", "sp-serializer", "sp-wasm-interface", "thiserror", + "wasm-instrument", "wasmi", ] [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "parity-scale-codec", @@ -6679,7 +6871,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "cfg-if 1.0.0", "libc", @@ -6697,20 +6889,22 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "ahash", "async-trait", - "derive_more", "dyn-clone", "finality-grandpa", "fork-tree", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", + "hex", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "rand 0.8.5", "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-consensus", "sc-keystore", @@ -6729,14 +6923,14 @@ dependencies = [ "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "finality-grandpa", "futures 0.3.21", "jsonrpc-core", @@ -6753,16 +6947,17 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", + "thiserror", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ansi_term", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "log", "parity-util-mem", "sc-client-api", @@ -6775,44 +6970,42 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "hex", - "parking_lot", + "parking_lot 0.12.0", "serde_json", "sp-application-crypto", "sp-core", "sp-keystore", + "thiserror", ] [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "async-std", "async-trait", "asynchronous-codec 0.5.0", "bitflags", "bytes 1.1.0", "cid", - "derive_more", "either", "fnv", "fork-tree", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "hex", "ip_network", "libp2p", "linked-hash-map", "linked_hash_set", "log", - "lru 0.7.5", + "lru 0.7.3", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "pin-project 1.0.10", "prost", "prost-build", @@ -6841,13 +7034,14 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "ahash", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "libp2p", "log", - "lru 0.7.5", + "lru 0.7.3", "sc-network", "sp-runtime", "substrate-prometheus-endpoint", @@ -6857,19 +7051,19 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "bytes 1.1.0", "fnv", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "hex", "hyper", "hyper-rustls", "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "rand 0.7.3", "sc-client-api", "sc-network", @@ -6885,7 +7079,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "libp2p", @@ -6898,7 +7092,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6907,7 +7101,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "hash-db", @@ -6915,7 +7109,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -6938,7 +7132,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -6947,7 +7141,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "sc-chain-spec", "sc-transaction-pool-api", "serde", @@ -6963,7 +7157,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -6980,20 +7174,20 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "directories", "exit-future", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot", + "parking_lot 0.12.0", "pin-project 1.0.10", "rand 0.7.3", "sc-block-builder", @@ -7044,13 +7238,13 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot", + "parking_lot 0.12.0", "sc-client-api", "sp-core", ] @@ -7058,7 +7252,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -7069,7 +7263,6 @@ dependencies = [ "sc-consensus-babe", "sc-consensus-epochs", "sc-finality-grandpa", - "sc-rpc-api", "serde", "serde_json", "sp-blockchain", @@ -7080,13 +7273,13 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "chrono", "futures 0.3.21", "libp2p", "log", - "parking_lot", + "parking_lot 0.12.0", "pin-project 1.0.10", "rand 0.7.3", "serde", @@ -7098,7 +7291,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ansi_term", "atty", @@ -7107,7 +7300,7 @@ dependencies = [ "libc", "log", "once_cell", - "parking_lot", + "parking_lot 0.12.0", "regex", "rustc-hash", "sc-client-api", @@ -7129,7 +7322,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -7140,15 +7333,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", - "intervalier", + "futures-timer", "linked-hash-map", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot", + "parking_lot 0.12.0", "retain_mut", "sc-client-api", "sc-transaction-pool-api", @@ -7167,9 +7360,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "futures 0.3.21", "log", "serde", @@ -7181,19 +7373,21 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "lazy_static", + "log", + "parking_lot 0.12.0", "prometheus", ] [[package]] name = "scale-info" -version = "1.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +checksum = "0563970d79bcbf3c537ce3ad36d859b30d36fc5b190efd227f1f7a84d7cf0d42" dependencies = [ "bitvec", "cfg-if 1.0.0", @@ -7205,9 +7399,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +checksum = "b7805950c36512db9e3251c970bb7ac425f326716941862205d612ab3b5e46e2" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -7265,6 +7459,37 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sec1" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +dependencies = [ + "der", + "generic-array 0.14.5", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" +dependencies = [ + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" +dependencies = [ + "cc", +] + [[package]] name = "secrecy" version = "0.8.0" @@ -7326,9 +7551,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" +checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" dependencies = [ "serde", ] @@ -7359,9 +7584,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" dependencies = [ "serde", ] @@ -7388,6 +7613,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_nanos" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e44969a61f5d316be20a42ff97816efb3b407a924d06824c3d8a49fa8450de0e" +dependencies = [ + "serde", +] + [[package]] name = "service-request" version = "2.1.0" @@ -7568,6 +7802,17 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "sha3" version = "0.9.1" @@ -7580,6 +7825,16 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha3" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" +dependencies = [ + "digest 0.10.3", + "keccak", +] + [[package]] name = "sharded-slab" version = "0.1.4" @@ -7595,16 +7850,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signal-hook" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -7616,9 +7861,12 @@ dependencies = [ [[package]] name = "signature" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +dependencies = [ + "rand_core 0.6.3", +] [[package]] name = "simba" @@ -7634,9 +7882,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "smallvec" @@ -7657,7 +7905,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" dependencies = [ "aes-gcm", - "blake2", + "blake2 0.9.2", "chacha20poly1305", "rand 0.8.5", "rand_core 0.6.3", @@ -7708,7 +7956,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "log", @@ -7725,9 +7973,9 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "blake2-rfc", + "blake2 0.10.4", "proc-macro-crate 1.1.3", "proc-macro2", "quote", @@ -7736,8 +7984,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -7749,8 +7997,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "integer-sqrt", "num-traits", @@ -7765,7 +8013,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "parity-scale-codec", @@ -7777,7 +8025,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sp-api", @@ -7789,13 +8037,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "log", - "lru 0.7.5", + "lru 0.7.3", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "sp-api", "sp-consensus", "sp-database", @@ -7807,11 +8055,11 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "futures 0.3.21", - "futures-timer 3.0.2", + "futures-timer", "log", "parity-scale-codec", "sp-core", @@ -7826,7 +8074,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "merlin", @@ -7849,19 +8097,21 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7872,8 +8122,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "base58", "bitflags", @@ -7893,15 +8143,15 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot", + "parking_lot 0.12.0", "primitive-types", "rand 0.7.3", "regex", "scale-info", "schnorrkel", + "secp256k1", "secrecy", "serde", - "sha2 0.9.9", "sp-core-hashing", "sp-debug-derive", "sp-externalities", @@ -7912,29 +8162,28 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "tiny-keccak", - "twox-hash", "wasmi", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "blake2-rfc", + "blake2 0.10.4", "byteorder", - "sha2 0.9.9", + "digest 0.10.3", + "sha2 0.10.2", + "sha3 0.10.1", "sp-std", - "tiny-keccak", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro2", "quote", @@ -7945,16 +8194,16 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "kvdb", - "parking_lot", + "parking_lot 0.12.0", ] [[package]] name = "sp-debug-derive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro2", "quote", @@ -7963,8 +8212,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "0.12.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "environmental", "parity-scale-codec", @@ -7975,7 +8224,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "finality-grandpa", "log", @@ -7993,7 +8242,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -8006,15 +8255,16 @@ dependencies = [ [[package]] name = "sp-io" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", + "secp256k1", "sp-core", "sp-externalities", "sp-keystore", @@ -8030,8 +8280,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "lazy_static", "sp-core", @@ -8041,33 +8291,34 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "0.12.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "futures 0.3.21", "merlin", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "schnorrkel", "serde", "sp-core", "sp-externalities", + "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "thiserror", "zstd", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "sp-api", "sp-core", @@ -8076,8 +8327,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "backtrace", "lazy_static", @@ -8086,8 +8337,8 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "rustc-hash", "serde", @@ -8096,8 +8347,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "either", "hash256-std-hasher", @@ -8118,8 +8369,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8135,8 +8386,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -8148,7 +8399,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "serde", "serde_json", @@ -8157,7 +8408,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -8171,7 +8422,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -8181,14 +8432,14 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "0.12.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot", + "parking_lot 0.12.0", "rand 0.7.3", "smallvec", "sp-core", @@ -8204,13 +8455,13 @@ dependencies = [ [[package]] name = "sp-std" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" [[package]] name = "sp-storage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8223,7 +8474,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "sp-core", @@ -8236,10 +8487,10 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "futures-timer 3.0.2", + "futures-timer", "log", "parity-scale-codec", "sp-api", @@ -8251,8 +8502,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sp-std", @@ -8264,7 +8515,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "sp-api", "sp-runtime", @@ -8273,7 +8524,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "log", @@ -8288,8 +8539,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "memory-db", @@ -8297,20 +8548,22 @@ dependencies = [ "scale-info", "sp-core", "sp-std", + "thiserror", "trie-db", "trie-root", ] [[package]] name = "sp-version" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm 0.42.2", "scale-info", "serde", + "sp-core-hashing-proc-macro", "sp-runtime", "sp-std", "sp-version-proc-macro", @@ -8320,7 +8573,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -8330,13 +8583,15 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-trait-for-tuples", + "log", "parity-scale-codec", "sp-std", "wasmi", + "wasmtime", ] [[package]] @@ -8345,6 +8600,16 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "ss58-registry" version = "1.17.0" @@ -8387,52 +8652,29 @@ dependencies = [ [[package]] name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "structopt" -version = "0.3.26" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" -dependencies = [ - "heck 0.3.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" +checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.22.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" +checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" dependencies = [ "heck 0.3.3", "proc-macro2", "quote", + "rustversion", "syn", ] @@ -8452,7 +8694,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "platforms", ] @@ -8460,7 +8702,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.21", @@ -8482,26 +8724,26 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "async-std", - "derive_more", "futures-util", "hyper", "log", "prometheus", + "thiserror", "tokio", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.13#afb74de23dfe2994e7ce38c0870efb9734e966f7" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "sp-maybe-compressed-blob", + "strum", "tempfile", "toml", "walkdir", @@ -8516,9 +8758,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.90" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704df27628939572cd88d33f171cd6f896f4eaca85252c6e0a72d8d8287ee86f" +checksum = "ea297be220d52398dcc07ce15a209fce436d361735ac1db700cab3b6cdfb9f54" dependencies = [ "proc-macro2", "quote", @@ -8574,12 +8816,9 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.11.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" @@ -8619,6 +8858,17 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.4.3+5.2.1-patched.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + [[package]] name = "time" version = "0.1.44" @@ -8649,15 +8899,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.5.1" @@ -8685,6 +8926,7 @@ dependencies = [ "mio 0.8.2", "num_cpus", "once_cell", + "parking_lot 0.12.0", "pin-project-lite 0.2.8", "signal-hook-registry", "socket2 0.4.4", @@ -8727,20 +8969,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-util" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" -dependencies = [ - "bytes 1.1.0", - "futures-core", - "futures-sink", - "pin-project-lite 0.2.8", - "tokio", - "tracing", -] - [[package]] name = "toml" version = "0.5.8" @@ -8781,9 +9009,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90442985ee2f57c9e1b548ee72ae842f4a9a20e3f417cc38dbc5dc684d9bb4ee" +checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" dependencies = [ "lazy_static", "valuable", @@ -8830,7 +9058,7 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot", + "parking_lot 0.11.2", "regex", "serde", "serde_json", @@ -9011,12 +9239,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.22.6" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" +checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.12.0", "log", "rustc-hex", "smallvec", @@ -9024,9 +9252,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" +checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" dependencies = [ "hash-db", ] @@ -9067,7 +9295,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot", + "parking_lot 0.11.2", "resolv-conf", "smallvec", "thiserror", @@ -9093,6 +9321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ "cfg-if 1.0.0", + "digest 0.10.3", "rand 0.8.5", "static_assertions", ] @@ -9151,12 +9380,6 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - [[package]] name = "unicode-xid" version = "0.2.2" @@ -9272,12 +9495,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -9412,6 +9629,15 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "wasm-instrument" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +dependencies = [ + "parity-wasm 0.42.2", +] + [[package]] name = "wasm-timer" version = "0.2.5" @@ -9420,7 +9646,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures 0.3.21", "js-sys", - "parking_lot", + "parking_lot 0.11.2", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -9459,9 +9685,9 @@ checksum = "98930446519f63d00a836efdc22f67766ceae8dbcc1571379f2bcabc6b2b9abc" [[package]] name = "wasmtime" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311d06b0c49346d1fbf48a17052e844036b95a7753c1afb34e8c0af3f6b5bb13" +checksum = "4c9c724da92e39a85d2231d4c2a942c8be295211441dbca581c6c3f3f45a9f00" dependencies = [ "anyhow", "backtrace", @@ -9491,9 +9717,9 @@ dependencies = [ [[package]] name = "wasmtime-cache" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147930a4995137dc096e5b17a573b446799be2bbaea433e821ce6a80abe2c5" +checksum = "da4439d99100298344567c0eb6916ad5864e99e54760b8177c427e529077fb30" dependencies = [ "anyhow", "base64", @@ -9501,7 +9727,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rsix", + "rustix", "serde", "sha2 0.9.9", "toml", @@ -9511,9 +9737,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3083a47e1ede38aac06a1d9831640d673f9aeda0b82a64e4ce002f3432e2e7" +checksum = "1762765dd69245f00e5d9783b695039e449a7be0f9c5383e4c78465dd6131aeb" dependencies = [ "anyhow", "cranelift-codegen", @@ -9521,7 +9747,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.25.0", + "gimli", "log", "more-asserts", "object", @@ -9533,14 +9759,13 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c2d194b655321053bc4111a1aa4ead552655c8a17d17264bc97766e70073510" +checksum = "c4468301d95ec71710bb6261382efe27d1296447711645e3dbabaea6e4de3504" dependencies = [ "anyhow", - "cfg-if 1.0.0", "cranelift-entity", - "gimli 0.25.0", + "gimli", "indexmap", "log", "more-asserts", @@ -9554,24 +9779,21 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864ac8dfe4ce310ac59f16fdbd560c257389cb009ee5d030ac6e30523b023d11" +checksum = "ab0ae6e581ff014b470ec35847ea3c0b4c3ace89a55df5a04c802a11f4574e7d" dependencies = [ - "addr2line 0.16.0", + "addr2line", "anyhow", "bincode", "cfg-if 1.0.0", - "gimli 0.25.0", - "log", - "more-asserts", + "gimli", "object", "region", - "rsix", + "rustix", "serde", "target-lexicon", "thiserror", - "wasmparser", "wasmtime-environ", "wasmtime-runtime", "winapi 0.3.9", @@ -9579,9 +9801,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab97da813a26b98c9abfd3b0c2d99e42f6b78b749c0646344e2e262d212d8c8b" +checksum = "6d9c28877ae37a367cda7b52b8887589816152e95dde9b7c80cc686f52761961" dependencies = [ "anyhow", "backtrace", @@ -9596,7 +9818,7 @@ dependencies = [ "more-asserts", "rand 0.8.5", "region", - "rsix", + "rustix", "thiserror", "wasmtime-environ", "winapi 0.3.9", @@ -9604,9 +9826,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff94409cc3557bfbbcce6b14520ccd6bd3727e965c0fe68d63ef2c185bf379c6" +checksum = "395726e8f5dd8c57cb0db445627b842343f7e29ed7489467fdf7953ed9d3cd4f" dependencies = [ "cranelift-entity", "serde", @@ -9712,6 +9934,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" + +[[package]] +name = "windows_i686_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" + +[[package]] +name = "windows_i686_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" + [[package]] name = "winreg" version = "0.6.2" @@ -9733,9 +9998,12 @@ dependencies = [ [[package]] name = "wyz" -version = "0.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" +checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +dependencies = [ + "tap", +] [[package]] name = "x25519-dalek" @@ -9757,7 +10025,7 @@ dependencies = [ "futures 0.3.21", "log", "nohash-hasher", - "parking_lot", + "parking_lot 0.11.2", "rand 0.8.5", "static_assertions", ] diff --git a/node/Cargo.toml b/node/Cargo.toml index bd9e5884..e6854d82 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -11,75 +11,75 @@ repository = 'https://github.com/debionetwork/debio-node' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13' } +substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } [dependencies] # External Dependencies -codec = { package = 'parity-scale-codec', version = '2.0.0' } -serde = { version = '1.0.130', features = ['derive'] } +codec = { package = 'parity-scale-codec', version = '3.0.0' } +serde = { version = '1.0.136', features = ['derive'] } +clap = { version = '3.0', features = ['derive'] } hex-literal = { version = '0.3.4' } -structopt = { version = '0.3.25' } jsonrpc-core = { version = '18.0.0' } # Substrate Dependencies ## Substrate Primitive Dependencies -beefy-primitives = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-consensus-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sp-transaction-storage-proof = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } +beefy-primitives = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-consensus-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sp-transaction-storage-proof = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } ## Substrate Client Dependencies -sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', features = ['wasmtime'] } -sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-consensus-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-consensus-babe-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-consensus-slots = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-consensus-uncles = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', features = ['wasmtime'] } -sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', features = ['wasmtime'] } -sc-sync-state-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } +sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] } +sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-consensus-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-consensus-babe-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-consensus-slots = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-consensus-uncles = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] } +sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] } +sc-sync-state-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } ## Substrate Frame Dependencies -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } ## Substrate Pallet Dependencies -pallet-im-online = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -pallet-mmr-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -beefy-gadget = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } -beefy-gadget-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } +pallet-im-online = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +pallet-mmr-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +beefy-gadget = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } +beefy-gadget-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } # Octopus Dependencies ## Octopus Pallet Dependencies -pallet-octopus-appchain = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.13' } -pallet-octopus-lpos = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.13' } +pallet-octopus-appchain = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.18' } +pallet-octopus-lpos = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.18' } # Local Dependencies # DeBio Runtime Dependencies diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 620f714b..7fe98260 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -10,7 +10,7 @@ use sp_finality_grandpa::AuthorityId as GrandpaId; use sp_runtime::traits::{IdentifyAccount, Verify}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; -use pallet_octopus_appchain::AuthorityId as OctopusId; +use pallet_octopus_appchain::sr25519::AuthorityId as OctopusId; use debio_runtime::{ currency::{OCTS, UNITS as DBIO}, @@ -87,12 +87,12 @@ pub fn session_keys( /// Helper function to generate appchain config pub fn appchain_config( - relay_contract: &str, - asset_id_by_name: &str, + anchor_contract: &str, + asset_id_by_token_id: &str, premined_amount: Balance, era_payout: Balance, ) -> (String, String, Balance, Balance) { - (relay_contract.to_string(), asset_id_by_name.to_string(), premined_amount, era_payout) + (anchor_contract.to_string(), asset_id_by_token_id.to_string(), premined_amount, era_payout) } /// Helper function to generate an properties @@ -229,6 +229,7 @@ pub fn staging_testnet_config() -> Result { None, // Protocol ID Some("debio-staging-testnet"), + None, // Properties Some(properties), // Extensions @@ -352,6 +353,7 @@ pub fn development_testnet_config() -> Result { None, // Protocol ID Some("debio-development-testnet"), + None, // Properties Some(properties), // Extensions @@ -425,6 +427,7 @@ pub fn local_config() -> Result { None, // Protocol ID Some("debio-local"), + None, // Properties Some(properties), // Extensions @@ -487,6 +490,7 @@ pub fn development_config() -> Result { None, // Protocol ID Some("debio-development"), + None, // Properties Some(properties), // Extensions @@ -544,24 +548,24 @@ fn genesis( im_online: Default::default(), octopus_appchain: OctopusAppchainConfig { anchor_contract: appchain_config.0, - asset_id_by_name: vec![(appchain_config.1, 0)], + asset_id_by_token_id: vec![(appchain_config.1, 0)], premined_amount: appchain_config.2, validators: initial_authorities.iter().map(|x| (x.0.clone(), x.6)).collect(), }, octopus_lpos: OctopusLposConfig { era_payout: appchain_config.3, ..Default::default() }, octopus_assets: Default::default(), - sudo: SudoConfig { key: root_key }, - labs: LabsConfig { lab_verifier_key: api_admin_key.clone() }, - orders: OrdersConfig { escrow_key: api_admin_key.clone() }, + sudo: SudoConfig { key: Some(root_key) }, + labs: LabsConfig { lab_verifier_key: Some(api_admin_key.clone()) }, + orders: OrdersConfig { escrow_key: Some(api_admin_key.clone()) }, rewards: RewardsConfig { rewarder_key: api_admin_key.clone() }, genetic_analysts: GeneticAnalystsConfig { - genetic_analyst_verifier_key: api_admin_key.clone(), + genetic_analyst_verifier_key: Some(api_admin_key.clone()), }, genetic_analysis_orders: GeneticAnalysisOrdersConfig { - escrow_key: api_admin_key.clone(), - treasury_key, + escrow_key: Some(api_admin_key.clone()), + treasury_key: Some(treasury_key), }, - service_request: ServiceRequestConfig { admin_key: api_admin_key.clone() }, - user_profile: UserProfileConfig { admin_key: api_admin_key }, + service_request: ServiceRequestConfig { admin_key: Some(api_admin_key.clone()) }, + user_profile: UserProfileConfig { admin_key: Some(api_admin_key) }, } } diff --git a/node/src/cli.rs b/node/src/cli.rs index ccd21384..4ac93184 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -1,48 +1,71 @@ -use sc_cli::{ - BuildSpecCmd, CheckBlockCmd, ExportBlocksCmd, ExportStateCmd, ImportBlocksCmd, KeySubcommand, - PurgeChainCmd, RevertCmd, RunCmd, -}; +#[allow(missing_docs)] +#[derive(Debug, clap::Parser)] +pub struct RunCmd { + #[allow(missing_docs)] + #[clap(flatten)] + pub base: sc_cli::RunCmd, -use frame_benchmarking_cli::BenchmarkCmd; + #[clap(long)] + pub enable_dev_signer: bool, -use structopt::StructOpt; + /// Maximum number of logs in a query. + #[clap(long, default_value = "10000")] + pub max_past_logs: u32, -#[derive(Debug, StructOpt)] + /// Maximum fee history cache size. + #[clap(long, default_value = "2048")] + pub fee_history_limit: u64, + + /// The dynamic-fee pallet target gas price set by block author + #[clap(long, default_value = "1")] + pub target_gas_price: u64, +} + +#[derive(Debug, clap::Parser)] pub struct Cli { - #[structopt(subcommand)] + #[clap(subcommand)] pub subcommand: Option, - #[structopt(flatten)] + #[clap(flatten)] pub run: RunCmd, } -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Subcommand)] pub enum Subcommand { /// Key management cli utilities - Key(KeySubcommand), + #[clap(subcommand)] + Key(sc_cli::KeySubcommand), /// Build a chain specification. - BuildSpec(BuildSpecCmd), + BuildSpec(sc_cli::BuildSpecCmd), /// Validate blocks. - CheckBlock(CheckBlockCmd), + CheckBlock(sc_cli::CheckBlockCmd), /// Export blocks. - ExportBlocks(ExportBlocksCmd), + ExportBlocks(sc_cli::ExportBlocksCmd), /// Export the state of a given block into a chain spec. - ExportState(ExportStateCmd), + ExportState(sc_cli::ExportStateCmd), /// Import blocks. - ImportBlocks(ImportBlocksCmd), + ImportBlocks(sc_cli::ImportBlocksCmd), /// Remove the whole chain. - PurgeChain(PurgeChainCmd), + PurgeChain(sc_cli::PurgeChainCmd), /// Revert the chain to a previous state. - Revert(RevertCmd), + Revert(sc_cli::RevertCmd), /// The custom benchmark subcommand benchmarking runtime pallets. - #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")] - Benchmark(BenchmarkCmd), + #[clap(name = "benchmark", about = "Benchmark runtime pallets.")] + Benchmark(frame_benchmarking_cli::BenchmarkCmd), + + /// Try some command against runtime state. + #[cfg(feature = "try-runtime")] + TryRuntime(try_runtime_cli::TryRuntimeCmd), + + /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. + #[cfg(not(feature = "try-runtime"))] + TryRuntime, } diff --git a/node/src/command.rs b/node/src/command.rs index 3f332ae4..9a0a1727 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -6,9 +6,7 @@ use crate::{ use std::path::PathBuf; -use sc_cli::{ - ChainSpec, Error::Service as CliErrorService, Result as CliResult, RuntimeVersion, SubstrateCli, -}; +use sc_cli::{ChainSpec, Result as CliResult, RuntimeVersion, SubstrateCli}; use sc_service::PartialComponents; use debio_runtime::{Block, VERSION}; @@ -118,10 +116,27 @@ pub fn run() -> CliResult<()> { `--features runtime-benchmarks`." .into()) }, + #[cfg(feature = "try-runtime")] + Some(Subcommand::TryRuntime(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + // we don't need any of the components of new_partial, just a runtime, or a task + // manager to do `async_run`. + let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); + let task_manager = + sc_service::TaskManager::new(config.tokio_handle.clone(), registry) + .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; + Ok((cmd.run::(config), task_manager)) + }) + }, + #[cfg(not(feature = "try-runtime"))] + Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ + You can enable it with `--features try-runtime`." + .into()), None => { - let runner = cli.create_runner(&cli.run)?; + let runner = cli.create_runner(&cli.run.base)?; runner.run_node_until_exit(|config| async move { - service::new_full(config).map_err(CliErrorService) + service::new_full(config).map_err(sc_cli::Error::Service) }) }, } diff --git a/node/src/lib.rs b/node/src/lib.rs new file mode 100644 index 00000000..f117b8aa --- /dev/null +++ b/node/src/lib.rs @@ -0,0 +1,3 @@ +pub mod chain_spec; +pub mod rpc; +pub mod service; diff --git a/node/src/rpc.rs b/node/src/rpc.rs index 45de2486..8931147a 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -23,7 +23,7 @@ use sc_transaction_pool_api::TransactionPool; use substrate_frame_rpc_system::{AccountNonceApi, FullSystem, SystemApi}; -use beefy_gadget::notification::BeefySignedCommitmentStream; +use beefy_gadget::notification::{BeefyBestBlockStream, BeefySignedCommitmentStream}; use beefy_gadget_rpc::{BeefyApi, BeefyRpcHandler}; use pallet_mmr_rpc::{Mmr, MmrApi, MmrRuntimeApi}; use pallet_transaction_payment_rpc::{ @@ -62,6 +62,8 @@ pub struct GrandpaDeps { pub struct BeefyDeps { /// Receives notifications about signed commitment events from BEEFY. pub beefy_commitment_stream: BeefySignedCommitmentStream, + /// Receives notifications about best block events from BEEFY. + pub beefy_best_block_stream: BeefyBestBlockStream, /// Executor to drive the subscription manager in the BEEFY RPC handler. pub beefy_subscription_executor: SubscriptionTaskExecutor, } @@ -124,7 +126,8 @@ where finality_provider, } = grandpa; - let BeefyDeps { beefy_commitment_stream, beefy_subscription_executor } = beefy; + let BeefyDeps { beefy_commitment_stream, beefy_best_block_stream, beefy_subscription_executor } = + beefy; let mut io = IoHandler::default(); @@ -145,17 +148,18 @@ where subscription_executor, finality_provider, ))); - io.extend_with(BeefyApi::to_delegate(BeefyRpcHandler::new( + let beefy_handler: BeefyRpcHandler = BeefyRpcHandler::new( beefy_commitment_stream, + beefy_best_block_stream, beefy_subscription_executor, - ))); + )?; + io.extend_with(BeefyApi::to_delegate(beefy_handler)); io.extend_with(MmrApi::to_delegate(Mmr::new(client.clone()))); io.extend_with(SyncStateRpcApi::to_delegate(SyncStateRpcHandler::new( chain_spec, client, shared_authority_set, shared_epoch_changes, - deny_unsafe, )?)); Ok(io) diff --git a/node/src/service.rs b/node/src/service.rs index 1776f1bb..2d60a55c 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -10,7 +10,7 @@ use sp_timestamp::InherentDataProvider; use sp_transaction_storage_proof::registration; use sc_basic_authorship::ProposerFactory; -use sc_client_api::ExecutorProvider; +use sc_client_api::{BlockBackend, ExecutorProvider}; use sc_consensus::{DefaultImportQueue, LongestChain}; use sc_consensus_babe::{ self, BabeBlockImport, BabeLink, BabeParams, Config as BabeConfig, SlotProportion, @@ -33,7 +33,10 @@ use sc_telemetry::{Error as TelemetryError, Telemetry, TelemetryWorker}; use sc_transaction_pool::{BasicPool, FullPool}; use beefy_gadget::{ - notification::{BeefySignedCommitmentSender, BeefySignedCommitmentStream}, + notification::{ + BeefyBestBlockSender, BeefyBestBlockStream, BeefySignedCommitmentSender, + BeefySignedCommitmentStream, + }, BeefyParams, }; @@ -96,7 +99,7 @@ pub fn new_partial( BabeBlockImport, BabeLink, GrandpaLinkHalf, - BeefySignedCommitmentSender, + (BeefySignedCommitmentSender, BeefyBestBlockSender), ), impl Fn(DenyUnsafe, SubscriptionTaskExecutor) -> Result, SharedVoterState, @@ -120,6 +123,7 @@ pub fn new_partial( config.wasm_method, config.default_heap_pages, config.max_runtime_instances, + config.runtime_cache_size, ); let (client, backend, keystore_container, task_manager) = @@ -156,7 +160,7 @@ pub fn new_partial( let justification_import = grandpa_block_import.clone(); let (block_import, babe_link) = sc_consensus_babe::block_import( - BabeConfig::get_or_compute(&*client)?, + BabeConfig::get(&*client)?, grandpa_block_import, client.clone(), )?; @@ -172,8 +176,10 @@ pub fn new_partial( move |_, ()| async move { let timestamp = InherentDataProvider::from_system_time(); - let slot = - BabeInherentDataProvider::from_timestamp_and_duration(*timestamp, slot_duration); + let slot = BabeInherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); let uncles = AuthorshipInherentDataProvider::<::Header>::check_inherents(); @@ -186,9 +192,12 @@ pub fn new_partial( telemetry.as_ref().map(|x| x.handle()), )?; - let (beefy_link, beefy_commitment_stream) = BeefySignedCommitmentStream::channel(); + let (beefy_commitment_link, beefy_commitment_stream) = + BeefySignedCommitmentStream::::channel(); + let (beefy_best_block_link, beefy_best_block_stream) = BeefyBestBlockStream::::channel(); + let beefy_links = (beefy_commitment_link, beefy_best_block_link); - let import_setup = (block_import, babe_link, grandpa_link, beefy_link); + let import_setup = (block_import, babe_link, grandpa_link, beefy_links); let (rpc_extensions_builder, shared_voter_state) = { let (_, babe_link, grandpa_link, _) = &import_setup; @@ -233,6 +242,7 @@ pub fn new_partial( }, beefy: BeefyDeps { beefy_commitment_stream: beefy_commitment_stream.clone(), + beefy_best_block_stream: beefy_best_block_stream.clone(), beefy_subscription_executor: subscription_executor, }, }; @@ -274,10 +284,25 @@ pub fn new_full_base( other: (import_setup, rpc_extensions_builder, shared_voter_state, mut telemetry), } = new_partial(&config)?; - let (block_import, babe_link, grandpa_link, beefy_link) = import_setup; + let (block_import, babe_link, grandpa_link, beefy_links) = import_setup; - config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config()); - config.network.extra_sets.push(beefy_gadget::beefy_peers_set_config()); + let grandpa_protocol_name = sc_finality_grandpa::protocol_standard_name( + &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), + &config.chain_spec, + ); + config + .network + .extra_sets + .push(sc_finality_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); + + let beefy_protocol_name = beefy_gadget::protocol_standard_name( + &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), + &config.chain_spec, + ); + config + .network + .extra_sets + .push(beefy_gadget::beefy_peers_set_config(beefy_protocol_name.clone())); let warp_sync = Arc::new(NetworkProvider::new( backend.clone(), @@ -359,7 +384,7 @@ pub fn new_full_base( let timestamp = InherentDataProvider::from_system_time(); - let slot = BabeInherentDataProvider::from_timestamp_and_duration( + let slot = BabeInherentDataProvider::from_timestamp_and_slot_duration( *timestamp, slot_duration, ); @@ -400,6 +425,7 @@ pub fn new_full_base( name: Some(name), keystore: keystore.clone(), telemetry: telemetry.as_ref().map(|x| x.handle()), + protocol_name: grandpa_protocol_name, }; // start the full GRANDPA voter @@ -432,9 +458,11 @@ pub fn new_full_base( backend, key_store: keystore.clone(), network: network.clone(), - signed_commitment_sender: beefy_link, + signed_commitment_sender: beefy_links.0, + beefy_best_block_sender: beefy_links.1, min_block_delta: 8, prometheus_registry, + protocol_name: beefy_protocol_name, }; let beefy = beefy_gadget::start_beefy_gadget::<_, _, _, _>(beefy_params); diff --git a/pallets/certifications/Cargo.toml b/pallets/certifications/Cargo.toml index d579006c..07c53360 100644 --- a/pallets/certifications/Cargo.toml +++ b/pallets/certifications/Cargo.toml @@ -12,25 +12,25 @@ license = 'AGPL-3.0' targets = ['x86_64-unknown-linux-gnu'] [dependencies] -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -scale-info = { version = '1.0', default-features = false, features = ['derive'] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } traits-certifications = { path = './traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/certifications/benchmarking/Cargo.toml b/pallets/certifications/benchmarking/Cargo.toml index 28aa0a74..71e198f5 100644 --- a/pallets/certifications/benchmarking/Cargo.toml +++ b/pallets/certifications/benchmarking/Cargo.toml @@ -11,24 +11,18 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } labs = { path = '../../labs', default-features = false } certifications = { path = '../../certifications', default-features = false } @@ -37,7 +31,7 @@ primitives-area-code = { path = '../../../primitives/area-code', default-feature traits-certifications = { path = '../../certifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/certifications/benchmarking/src/mock.rs b/pallets/certifications/benchmarking/src/mock.rs index 9189bf20..3d17cd2f 100644 --- a/pallets/certifications/benchmarking/src/mock.rs +++ b/pallets/certifications/benchmarking/src/mock.rs @@ -57,6 +57,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/certifications/src/lib.rs b/pallets/certifications/src/lib.rs index dd74fc7b..30f50394 100644 --- a/pallets/certifications/src/lib.rs +++ b/pallets/certifications/src/lib.rs @@ -86,6 +86,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/certifications/tests/Cargo.toml b/pallets/certifications/tests/Cargo.toml index b87f6d33..1d77d42e 100644 --- a/pallets/certifications/tests/Cargo.toml +++ b/pallets/certifications/tests/Cargo.toml @@ -14,24 +14,24 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies labs = { path = '../../labs', default-features = false } @@ -50,7 +50,7 @@ traits-certifications = { path = '../../certifications/traits', default-features traits-genetic-testing = { path = '../../genetic-testing/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/certifications/tests/src/mock.rs b/pallets/certifications/tests/src/mock.rs index b16be073..4052a29e 100644 --- a/pallets/certifications/tests/src/mock.rs +++ b/pallets/certifications/tests/src/mock.rs @@ -63,6 +63,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/certifications/traits/Cargo.toml b/pallets/certifications/traits/Cargo.toml index 8fb8b6fc..79f555de 100644 --- a/pallets/certifications/traits/Cargo.toml +++ b/pallets/certifications/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["agustinustheoo "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/doctor-certifications/Cargo.toml b/pallets/doctor-certifications/Cargo.toml index 38b7f355..6c63a4a5 100644 --- a/pallets/doctor-certifications/Cargo.toml +++ b/pallets/doctor-certifications/Cargo.toml @@ -11,26 +11,20 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } traits-doctor-certifications = { path = './traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/doctor-certifications/benchmarking/Cargo.toml b/pallets/doctor-certifications/benchmarking/Cargo.toml index 62f72357..a0a44f78 100644 --- a/pallets/doctor-certifications/benchmarking/Cargo.toml +++ b/pallets/doctor-certifications/benchmarking/Cargo.toml @@ -11,24 +11,18 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } doctors = { path = '../../doctors', default-features = false } doctor-certifications = { path = '../../doctor-certifications', default-features = false } @@ -37,7 +31,7 @@ primitives-area-code = { path = '../../../primitives/area-code', default-feature traits-doctor-certifications = { path = '../../doctor-certifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/doctor-certifications/benchmarking/src/mock.rs b/pallets/doctor-certifications/benchmarking/src/mock.rs index 01194860..c91ed843 100644 --- a/pallets/doctor-certifications/benchmarking/src/mock.rs +++ b/pallets/doctor-certifications/benchmarking/src/mock.rs @@ -57,6 +57,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/doctor-certifications/src/lib.rs b/pallets/doctor-certifications/src/lib.rs index ff005b2d..a45c3f4c 100644 --- a/pallets/doctor-certifications/src/lib.rs +++ b/pallets/doctor-certifications/src/lib.rs @@ -80,6 +80,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/doctor-certifications/tests/Cargo.toml b/pallets/doctor-certifications/tests/Cargo.toml index 74d9c5b5..8bb2f912 100644 --- a/pallets/doctor-certifications/tests/Cargo.toml +++ b/pallets/doctor-certifications/tests/Cargo.toml @@ -14,22 +14,22 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies doctors = { path = '../../doctors', default-features = false } @@ -40,7 +40,7 @@ primitives-area-code = { path = '../../../primitives/area-code', default-feature traits-doctor-certifications = { path = '../../doctor-certifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/doctor-certifications/tests/src/mock.rs b/pallets/doctor-certifications/tests/src/mock.rs index 5b77b647..4af49c12 100644 --- a/pallets/doctor-certifications/tests/src/mock.rs +++ b/pallets/doctor-certifications/tests/src/mock.rs @@ -56,6 +56,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/doctor-certifications/traits/Cargo.toml b/pallets/doctor-certifications/traits/Cargo.toml index c390b844..12747174 100644 --- a/pallets/doctor-certifications/traits/Cargo.toml +++ b/pallets/doctor-certifications/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["agustinustheoo "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/doctors/Cargo.toml b/pallets/doctors/Cargo.toml index c228b531..1ec12f95 100644 --- a/pallets/doctors/Cargo.toml +++ b/pallets/doctors/Cargo.toml @@ -11,35 +11,29 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } primitives-area-code = { path = '../../primitives/area-code', default-features = false } traits-user-profile = { path = '../user-profile/traits', default-features = false } traits-doctor-certifications = { path = '../doctor-certifications/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Local Dependencies doctor-certifications = { path = '../doctor-certifications', default-features = false } user-profile = { path = '../user-profile', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/doctors/src/lib.rs b/pallets/doctors/src/lib.rs index 46d52fe5..252b22a0 100644 --- a/pallets/doctors/src/lib.rs +++ b/pallets/doctors/src/lib.rs @@ -141,6 +141,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/doctors/src/mock.rs b/pallets/doctors/src/mock.rs index b734a12c..5e68a3d1 100644 --- a/pallets/doctors/src/mock.rs +++ b/pallets/doctors/src/mock.rs @@ -63,6 +63,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl doctors::Config for Test { diff --git a/pallets/electronic-medical-record/Cargo.toml b/pallets/electronic-medical-record/Cargo.toml index 5bd87b84..263626c1 100644 --- a/pallets/electronic-medical-record/Cargo.toml +++ b/pallets/electronic-medical-record/Cargo.toml @@ -13,29 +13,29 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] # External Dependencies -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Frame Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies traits-electronic-medical-record = { path = './traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/electronic-medical-record/src/lib.rs b/pallets/electronic-medical-record/src/lib.rs index 2c25f2ce..014a0c51 100644 --- a/pallets/electronic-medical-record/src/lib.rs +++ b/pallets/electronic-medical-record/src/lib.rs @@ -154,6 +154,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/electronic-medical-record/src/mock.rs b/pallets/electronic-medical-record/src/mock.rs index 6baab2d2..994bc605 100644 --- a/pallets/electronic-medical-record/src/mock.rs +++ b/pallets/electronic-medical-record/src/mock.rs @@ -53,6 +53,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl electronic_medical_record::Config for Test { diff --git a/pallets/electronic-medical-record/traits/Cargo.toml b/pallets/electronic-medical-record/traits/Cargo.toml index 8167f3be..07aa6ad8 100644 --- a/pallets/electronic-medical-record/traits/Cargo.toml +++ b/pallets/electronic-medical-record/traits/Cargo.toml @@ -5,19 +5,13 @@ authors = ["Agustinus Theodorus "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analysis-orders/Cargo.toml b/pallets/genetic-analysis-orders/Cargo.toml index bba28276..3f3182cf 100644 --- a/pallets/genetic-analysis-orders/Cargo.toml +++ b/pallets/genetic-analysis-orders/Cargo.toml @@ -13,24 +13,18 @@ repository = '' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -serde = { default-features = false, version = "1.0.130", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +serde = { default-features = false, version = "1.0.136", features = ["derive"] } chrono = { default-features = false, version = '0.4' } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-duration = { path = '../../primitives/duration', default-features = false } primitives-tracking-id = { path = '../../primitives/tracking-id', default-features = false } @@ -45,9 +39,9 @@ traits-genetic-analysis-orders = { path = './traits', default-features = false } traits-user-profile = { path = '../user-profile/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies genetic-analysts = { path = '../genetic-analysts', default-features = false } @@ -58,8 +52,8 @@ genetic-data = { path = '../genetic-data', default-features = false } user-profile = { path = '../user-profile', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analysis-orders/benchmarking/Cargo.toml b/pallets/genetic-analysis-orders/benchmarking/Cargo.toml index 0a04ffec..fbe6c672 100644 --- a/pallets/genetic-analysis-orders/benchmarking/Cargo.toml +++ b/pallets/genetic-analysis-orders/benchmarking/Cargo.toml @@ -11,26 +11,20 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -hex-literal = '0.3.3' -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +hex-literal = '0.3.4' +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } genetic-analysts = { path = '../../genetic-analysts', default-features = false } genetic-analyst-services = { path = '../../genetic-analyst-services', default-features = false } @@ -52,7 +46,7 @@ traits-genetic-data = { path = '../../genetic-data/traits', default-features = f traits-user-profile = { path = '../../user-profile/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-analysis-orders/benchmarking/src/lib.rs b/pallets/genetic-analysis-orders/benchmarking/src/lib.rs index c5699d8e..cb8d1f72 100644 --- a/pallets/genetic-analysis-orders/benchmarking/src/lib.rs +++ b/pallets/genetic-analysis-orders/benchmarking/src/lib.rs @@ -48,7 +48,7 @@ use primitives_price_and_currency::PriceByCurrency; benchmarks! { create_genetic_analysis_order { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { @@ -107,7 +107,7 @@ benchmarks! { ) cancel_genetic_analysis_order { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { @@ -176,7 +176,7 @@ benchmarks! { ) set_genetic_analysis_order_paid { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { @@ -242,7 +242,7 @@ benchmarks! { ) fulfill_genetic_analysis_order { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { @@ -326,7 +326,7 @@ benchmarks! { ) set_genetic_analysis_order_refunded { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { @@ -404,7 +404,7 @@ benchmarks! { ) update_escrow_key { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_escrow_key( RawOrigin::Signed(caller), @@ -412,7 +412,7 @@ benchmarks! { ) update_treasury_key { - let caller: T::AccountId = TreasuryKey::::get(); + let caller: T::AccountId = TreasuryKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_treasury_key( RawOrigin::Signed(caller), diff --git a/pallets/genetic-analysis-orders/benchmarking/src/mock.rs b/pallets/genetic-analysis-orders/benchmarking/src/mock.rs index 41e6f20a..191389d2 100644 --- a/pallets/genetic-analysis-orders/benchmarking/src/mock.rs +++ b/pallets/genetic-analysis-orders/benchmarking/src/mock.rs @@ -62,6 +62,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/genetic-analysis-orders/src/lib.rs b/pallets/genetic-analysis-orders/src/lib.rs index c3563778..75da42db 100644 --- a/pallets/genetic-analysis-orders/src/lib.rs +++ b/pallets/genetic-analysis-orders/src/lib.rs @@ -6,7 +6,6 @@ use interface::GeneticAnalysisOrderInterface; use frame_support::{ codec::{Decode, Encode}, - log, pallet_prelude::*, sp_runtime::{ traits::{AccountIdConversion, Hash}, @@ -142,6 +141,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] @@ -187,15 +187,15 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn admin_key)] - pub type EscrowKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type EscrowKey = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn treasury_key)] - pub type TreasuryKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type TreasuryKey = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn pallet_id)] - pub type PalletAccount = StorageValue<_, T::AccountId, ValueQuery>; + pub type PalletAccount = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn total_escrow_amount)] @@ -205,22 +205,26 @@ pub mod pallet { // ----- Genesis Configs ------------------ #[pallet::genesis_config] pub struct GenesisConfig { - pub escrow_key: T::AccountId, - pub treasury_key: T::AccountId, + pub escrow_key: Option, + pub treasury_key: Option, } #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { - Self { escrow_key: Default::default(), treasury_key: Default::default() } + Self { escrow_key: None, treasury_key: None } } } #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { - EscrowKey::::put(&self.escrow_key); - TreasuryKey::::put(&self.treasury_key); + if let Some(ref escrow_key) = self.escrow_key { + EscrowKey::::put(escrow_key); + } + if let Some(ref treasury_key) = self.treasury_key { + TreasuryKey::::put(treasury_key); + } PalletAccount::::put(>::get_pallet_id()); } } @@ -299,6 +303,7 @@ pub mod pallet { BadOrigin, CannotLookup, ConsumerRemaining, + TooManyConsumers, NoProviders, Token, Arithmetic, @@ -613,17 +618,14 @@ impl GeneticAnalysisOrderInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -654,7 +656,7 @@ impl GeneticAnalysisOrderInterface for Pallet { escrow_account_id: &T::AccountId, genetic_analysis_order_id: &T::Hash, ) -> Result { - if escrow_account_id.clone() != EscrowKey::::get() { + if escrow_account_id.clone() != EscrowKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -682,17 +684,14 @@ impl GeneticAnalysisOrderInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -709,7 +708,7 @@ impl GeneticAnalysisOrderInterface for Pallet { genetic_analysis_order_id: &T::Hash, ) -> Result { // Only the admin can fulfill the genetic_analysis_order - if escrow_account_id.clone() != EscrowKey::::get() { + if escrow_account_id.clone() != EscrowKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -752,24 +751,21 @@ impl GeneticAnalysisOrderInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } // Transfer 5% to DBIO Treasury match CurrencyOf::::transfer( &Self::account_id(), - &TreasuryKey::::get(), + &TreasuryKey::::get().unwrap(), price_component_substracted_value, ExistenceRequirement::AllowDeath, ) { @@ -778,17 +774,14 @@ impl GeneticAnalysisOrderInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -804,7 +797,7 @@ impl GeneticAnalysisOrderInterface for Pallet { escrow_account_id: &T::AccountId, genetic_analysis_order_id: &T::Hash, ) -> Result { - if escrow_account_id.clone() != EscrowKey::::get() { + if escrow_account_id.clone() != EscrowKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -835,17 +828,14 @@ impl GeneticAnalysisOrderInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -860,7 +850,7 @@ impl GeneticAnalysisOrderInterface for Pallet { account_id: &T::AccountId, escrow_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != EscrowKey::::get() { + if account_id.clone() != EscrowKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -873,7 +863,7 @@ impl GeneticAnalysisOrderInterface for Pallet { account_id: &T::AccountId, treasury_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != TreasuryKey::::get() { + if account_id.clone() != TreasuryKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -1033,7 +1023,7 @@ impl Pallet { /// The account ID that holds the funds pub fn account_id() -> AccountIdOf { - >::get() + >::get().unwrap() } /// Is the balance sufficient for payment diff --git a/pallets/genetic-analysis-orders/src/mock.rs b/pallets/genetic-analysis-orders/src/mock.rs index ee8c93f1..49b0858b 100644 --- a/pallets/genetic-analysis-orders/src/mock.rs +++ b/pallets/genetic-analysis-orders/src/mock.rs @@ -64,6 +64,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/genetic-analysis-orders/src/tests.rs b/pallets/genetic-analysis-orders/src/tests.rs index ae16b45c..4315c3eb 100644 --- a/pallets/genetic-analysis-orders/src/tests.rs +++ b/pallets/genetic-analysis-orders/src/tests.rs @@ -211,6 +211,8 @@ fn cancel_genetic_analysis_order_with_refund_works() { 0 )); + PalletAccount::::put(0); + assert_ok!(GeneticAnalysts::register_genetic_analyst( Origin::signed(1), GeneticAnalystInfo { @@ -382,6 +384,8 @@ fn set_genetic_analysis_order_paid_works() { 0 )); + PalletAccount::::put(0); + assert_ok!(GeneticAnalysts::register_genetic_analyst( Origin::signed(1), GeneticAnalystInfo { @@ -503,6 +507,7 @@ fn fulfill_genetic_analysis_order_works() { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(Balances::set_balance(RawOrigin::Root.into(), 1, 10000, 0)); + PalletAccount::::put(0); EscrowKey::::put(1); TreasuryKey::::put(2); @@ -660,6 +665,7 @@ fn set_genetic_analysis_order_refunded_works() { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(Balances::set_balance(RawOrigin::Root.into(), 1, 100, 0)); + PalletAccount::::put(0); EscrowKey::::put(3); assert_ok!(GeneticAnalysts::register_genetic_analyst( @@ -1230,6 +1236,8 @@ fn cant_set_genetic_analysis_order_paid_when_unauthorized() { 0 )); + EscrowKey::::put(0); + assert_ok!(GeneticAnalysts::register_genetic_analyst( Origin::signed(1), GeneticAnalystInfo { @@ -1528,6 +1536,7 @@ fn cant_fulfill_genetic_analysis_order_when_insufficient_pallet_funds() { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(Balances::set_balance(RawOrigin::Root.into(), 1, 100, 0)); + PalletAccount::::put(0); EscrowKey::::put(3); assert_ok!(GeneticAnalysts::register_genetic_analyst( @@ -1617,7 +1626,7 @@ fn cant_fulfill_genetic_analysis_order_when_insufficient_pallet_funds() { assert_ok!(Balances::set_balance( RawOrigin::Root.into(), - PalletAccount::::get(), + PalletAccount::::get().unwrap(), 1, 0 )); @@ -1748,6 +1757,7 @@ fn cant_set_genetic_analysis_order_refunded_when_insufficient_funds() { 0 )); + PalletAccount::::put(0); EscrowKey::::put(3); assert_ok!(GeneticAnalysts::register_genetic_analyst( @@ -1837,7 +1847,7 @@ fn cant_set_genetic_analysis_order_refunded_when_insufficient_funds() { assert_ok!(Balances::set_balance( RawOrigin::Root.into(), - PalletAccount::::get(), + PalletAccount::::get().unwrap(), 1000000000000000000u128.saturated_into(), 0 )); @@ -1856,6 +1866,8 @@ fn cant_set_genetic_analysis_order_refunded_when_insufficient_funds() { fn call_event_should_work() { ::default().existential_deposit(1).build().execute_with(|| { System::set_block_number(1); + PalletAccount::::put(0); + TreasuryKey::::put(0); assert_ok!(Balances::set_balance(RawOrigin::Root.into(), 1, 100, 0)); assert_ok!(GeneticAnalysts::register_genetic_analyst( Origin::signed(1), @@ -2097,11 +2109,11 @@ fn update_escrow_key_works() { ::default().existential_deposit(1).build().execute_with(|| { EscrowKey::::put(2); - assert_eq!(GeneticAnalysisOrders::admin_key(), 2); + assert_eq!(GeneticAnalysisOrders::admin_key(), Some(2)); assert_ok!(GeneticAnalysisOrders::update_escrow_key(Origin::signed(2), 1,)); - assert_eq!(GeneticAnalysisOrders::admin_key(), 1); + assert_eq!(GeneticAnalysisOrders::admin_key(), Some(1)); }) } @@ -2110,7 +2122,7 @@ fn sudo_update_escrow_key_works() { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(GeneticAnalysisOrders::sudo_update_escrow_key(Origin::root(), 1)); - assert_eq!(GeneticAnalysisOrders::admin_key(), 1); + assert_eq!(GeneticAnalysisOrders::admin_key(), Some(1)); }) } @@ -2119,11 +2131,11 @@ fn update_treasury_key_works() { ::default().existential_deposit(1).build().execute_with(|| { TreasuryKey::::put(2); - assert_eq!(GeneticAnalysisOrders::treasury_key(), 2); + assert_eq!(GeneticAnalysisOrders::treasury_key(), Some(2)); assert_ok!(GeneticAnalysisOrders::update_treasury_key(Origin::signed(2), 1,)); - assert_eq!(GeneticAnalysisOrders::treasury_key(), 1); + assert_eq!(GeneticAnalysisOrders::treasury_key(), Some(1)); }) } @@ -2132,6 +2144,6 @@ fn sudo_update_treasury_key_works() { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(GeneticAnalysisOrders::sudo_update_treasury_key(Origin::root(), 1)); - assert_eq!(GeneticAnalysisOrders::treasury_key(), 1); + assert_eq!(GeneticAnalysisOrders::treasury_key(), Some(1)); }) } diff --git a/pallets/genetic-analysis-orders/traits/Cargo.toml b/pallets/genetic-analysis-orders/traits/Cargo.toml index 7e11aa82..5ecd4ea1 100644 --- a/pallets/genetic-analysis-orders/traits/Cargo.toml +++ b/pallets/genetic-analysis-orders/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["agustinustheoo "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analysis/Cargo.toml b/pallets/genetic-analysis/Cargo.toml index 9dbbb104..fdd7f1c3 100644 --- a/pallets/genetic-analysis/Cargo.toml +++ b/pallets/genetic-analysis/Cargo.toml @@ -9,19 +9,13 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-tracking-id = { path = '../../primitives/tracking-id', default-features = false } @@ -29,10 +23,10 @@ traits-genetic-analysis = { path = './traits', default-features = false } traits-genetic-analysis-orders = { path = '../genetic-analysis-orders/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analysis/benchmarking/Cargo.toml b/pallets/genetic-analysis/benchmarking/Cargo.toml index e923ad52..3b3dd24f 100644 --- a/pallets/genetic-analysis/benchmarking/Cargo.toml +++ b/pallets/genetic-analysis/benchmarking/Cargo.toml @@ -11,26 +11,20 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } genetic-analysts = { path = '../../genetic-analysts', default-features = false } genetic-analyst-services = { path = '../../genetic-analyst-services', default-features = false } @@ -52,7 +46,7 @@ traits-genetic-data = { path = '../../genetic-data/traits', default-features = f traits-user-profile = { path = '../../user-profile/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-analysis/benchmarking/src/lib.rs b/pallets/genetic-analysis/benchmarking/src/lib.rs index 9e05bd06..9394ccee 100644 --- a/pallets/genetic-analysis/benchmarking/src/lib.rs +++ b/pallets/genetic-analysis/benchmarking/src/lib.rs @@ -49,7 +49,7 @@ use primitives_price_and_currency::PriceByCurrency; benchmarks! { reject_genetic_analysis { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { @@ -117,7 +117,7 @@ benchmarks! { ) process_genetic_analysis { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { @@ -184,7 +184,7 @@ benchmarks! { ) submit_genetic_analysis { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let genetic_analyst = GeneticAnalystInfo { diff --git a/pallets/genetic-analysis/benchmarking/src/mock.rs b/pallets/genetic-analysis/benchmarking/src/mock.rs index 390b1cab..20254817 100644 --- a/pallets/genetic-analysis/benchmarking/src/mock.rs +++ b/pallets/genetic-analysis/benchmarking/src/mock.rs @@ -65,6 +65,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_timestamp::Config for Test { diff --git a/pallets/genetic-analysis/src/lib.rs b/pallets/genetic-analysis/src/lib.rs index 34ea59f7..7d2a9a4c 100644 --- a/pallets/genetic-analysis/src/lib.rs +++ b/pallets/genetic-analysis/src/lib.rs @@ -103,6 +103,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/genetic-analysis/tests/Cargo.toml b/pallets/genetic-analysis/tests/Cargo.toml index 7052708b..10c3aaab 100644 --- a/pallets/genetic-analysis/tests/Cargo.toml +++ b/pallets/genetic-analysis/tests/Cargo.toml @@ -14,25 +14,25 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies genetic-analysts = { path = '../../genetic-analysts', default-features = false } @@ -55,7 +55,7 @@ traits-genetic-data = { path = '../../genetic-data/traits', default-features = f traits-user-profile = { path = '../../user-profile/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-analysis/tests/src/mock.rs b/pallets/genetic-analysis/tests/src/mock.rs index 0bc62d94..75e36f3f 100644 --- a/pallets/genetic-analysis/tests/src/mock.rs +++ b/pallets/genetic-analysis/tests/src/mock.rs @@ -61,6 +61,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/genetic-analysis/traits/Cargo.toml b/pallets/genetic-analysis/traits/Cargo.toml index 8e12dadd..b924b248 100644 --- a/pallets/genetic-analysis/traits/Cargo.toml +++ b/pallets/genetic-analysis/traits/Cargo.toml @@ -4,16 +4,10 @@ version = "2.1.0" authors = ["agustinustheoo "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-tracking-id = { path = '../../../primitives/tracking-id', default-features = false } [features] diff --git a/pallets/genetic-analyst-qualifications/Cargo.toml b/pallets/genetic-analyst-qualifications/Cargo.toml index f59159b8..bdaed0c3 100644 --- a/pallets/genetic-analyst-qualifications/Cargo.toml +++ b/pallets/genetic-analyst-qualifications/Cargo.toml @@ -11,26 +11,20 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } traits-genetic-analyst-qualifications = { path = '../genetic-analyst-qualifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analyst-qualifications/benchmarking/Cargo.toml b/pallets/genetic-analyst-qualifications/benchmarking/Cargo.toml index d513df7b..fbbf0d84 100644 --- a/pallets/genetic-analyst-qualifications/benchmarking/Cargo.toml +++ b/pallets/genetic-analyst-qualifications/benchmarking/Cargo.toml @@ -11,25 +11,19 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } genetic-analysts = { path = '../../genetic-analysts', default-features = false } genetic-analyst-qualifications = { path = '../../genetic-analyst-qualifications', default-features = false } @@ -38,7 +32,7 @@ primitives-area-code = { path = '../../../primitives/area-code', default-feature traits-genetic-analyst-qualifications = { path = '../../genetic-analyst-qualifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-analyst-qualifications/benchmarking/src/mock.rs b/pallets/genetic-analyst-qualifications/benchmarking/src/mock.rs index e4512256..0f5ebe24 100644 --- a/pallets/genetic-analyst-qualifications/benchmarking/src/mock.rs +++ b/pallets/genetic-analyst-qualifications/benchmarking/src/mock.rs @@ -57,6 +57,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/genetic-analyst-qualifications/src/lib.rs b/pallets/genetic-analyst-qualifications/src/lib.rs index cce5610d..a973d288 100644 --- a/pallets/genetic-analyst-qualifications/src/lib.rs +++ b/pallets/genetic-analyst-qualifications/src/lib.rs @@ -102,6 +102,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/genetic-analyst-qualifications/tests/Cargo.toml b/pallets/genetic-analyst-qualifications/tests/Cargo.toml index 456e6623..3cf6486d 100644 --- a/pallets/genetic-analyst-qualifications/tests/Cargo.toml +++ b/pallets/genetic-analyst-qualifications/tests/Cargo.toml @@ -14,24 +14,24 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } # Local Dependencies genetic-analysts = { path = '../../genetic-analysts', default-features = false } @@ -46,7 +46,7 @@ traits-genetic-analyst-services = { path = '../../genetic-analyst-services/trait traits-genetic-analyst-qualifications = { path = '../../genetic-analyst-qualifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-analyst-qualifications/tests/src/mock.rs b/pallets/genetic-analyst-qualifications/tests/src/mock.rs index c469394d..dad8a2da 100644 --- a/pallets/genetic-analyst-qualifications/tests/src/mock.rs +++ b/pallets/genetic-analyst-qualifications/tests/src/mock.rs @@ -61,6 +61,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/genetic-analyst-qualifications/traits/Cargo.toml b/pallets/genetic-analyst-qualifications/traits/Cargo.toml index e4b590dd..52e1045a 100644 --- a/pallets/genetic-analyst-qualifications/traits/Cargo.toml +++ b/pallets/genetic-analyst-qualifications/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["agustinustheoo "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analyst-services/Cargo.toml b/pallets/genetic-analyst-services/Cargo.toml index 0ea8abc2..cd042c36 100644 --- a/pallets/genetic-analyst-services/Cargo.toml +++ b/pallets/genetic-analyst-services/Cargo.toml @@ -11,28 +11,22 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-duration = { path = '../../primitives/duration', default-features = false } primitives-price-and-currency = { path = '../../primitives/price-and-currency', default-features = false } traits-genetic-analyst-services = { path = './traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analyst-services/benchmarking/Cargo.toml b/pallets/genetic-analyst-services/benchmarking/Cargo.toml index 7e5ad4f1..0b298066 100644 --- a/pallets/genetic-analyst-services/benchmarking/Cargo.toml +++ b/pallets/genetic-analyst-services/benchmarking/Cargo.toml @@ -14,24 +14,24 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies genetic-analysts = { path = '../../genetic-analysts', default-features = false } @@ -46,7 +46,7 @@ traits-genetic-analyst-services = { path = '../../genetic-analyst-services/trait traits-genetic-analyst-qualifications = { path = '../../genetic-analyst-qualifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-analyst-services/benchmarking/src/mock.rs b/pallets/genetic-analyst-services/benchmarking/src/mock.rs index b7857099..f174f2aa 100644 --- a/pallets/genetic-analyst-services/benchmarking/src/mock.rs +++ b/pallets/genetic-analyst-services/benchmarking/src/mock.rs @@ -58,6 +58,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/genetic-analyst-services/src/lib.rs b/pallets/genetic-analyst-services/src/lib.rs index 49a2d3e7..12f79952 100644 --- a/pallets/genetic-analyst-services/src/lib.rs +++ b/pallets/genetic-analyst-services/src/lib.rs @@ -92,6 +92,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/genetic-analyst-services/tests/Cargo.toml b/pallets/genetic-analyst-services/tests/Cargo.toml index 78f95919..0c790f39 100644 --- a/pallets/genetic-analyst-services/tests/Cargo.toml +++ b/pallets/genetic-analyst-services/tests/Cargo.toml @@ -14,24 +14,24 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } # Local Dependencies genetic-analysts = { path = '../../genetic-analysts', default-features = false } @@ -49,7 +49,7 @@ traits-genetic-analyst-services = { path = '../../genetic-analyst-services/trait traits-genetic-analyst-qualifications = { path = '../../genetic-analyst-qualifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-analyst-services/tests/src/mock.rs b/pallets/genetic-analyst-services/tests/src/mock.rs index a2d1ff39..e0075e86 100644 --- a/pallets/genetic-analyst-services/tests/src/mock.rs +++ b/pallets/genetic-analyst-services/tests/src/mock.rs @@ -61,6 +61,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/genetic-analyst-services/traits/Cargo.toml b/pallets/genetic-analyst-services/traits/Cargo.toml index 9b1668b4..e18df70e 100644 --- a/pallets/genetic-analyst-services/traits/Cargo.toml +++ b/pallets/genetic-analyst-services/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["agustinustheoo "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-price-and-currency = { path = '../../../primitives/price-and-currency', default-features = false } [features] diff --git a/pallets/genetic-analysts/Cargo.toml b/pallets/genetic-analysts/Cargo.toml index a651df30..0f5b9ce9 100644 --- a/pallets/genetic-analysts/Cargo.toml +++ b/pallets/genetic-analysts/Cargo.toml @@ -11,22 +11,16 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-stake-status = { path = '../../primitives/stake-status', default-features = false } primitives-verification-status = { path = '../../primitives/verification-status', default-features = false } @@ -39,8 +33,8 @@ traits-genetic-analyst-services = { path = '../genetic-analyst-services/traits', traits-genetic-analyst-qualifications = { path = '../genetic-analyst-qualifications/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Local Dependencies genetic-analyst-services = { path = '../genetic-analyst-services', default-features = false } @@ -48,9 +42,9 @@ genetic-analyst-qualifications = { path = '../genetic-analyst-qualifications', d user-profile = { path = '../user-profile', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analysts/benchmarking/Cargo.toml b/pallets/genetic-analysts/benchmarking/Cargo.toml index def76645..c02c1b86 100644 --- a/pallets/genetic-analysts/benchmarking/Cargo.toml +++ b/pallets/genetic-analysts/benchmarking/Cargo.toml @@ -11,20 +11,14 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-stake-status = { path = '../../../primitives/stake-status', default-features = false } primitives-verification-status = { path = '../../../primitives/verification-status', default-features = false } @@ -37,9 +31,9 @@ traits-genetic-analyst-services = { path = '../../genetic-analyst-services/trait traits-genetic-analyst-qualifications = { path = '../../genetic-analyst-qualifications/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } ## Local Dependencies genetic-analysts = { path = '../../genetic-analysts', default-features = false } @@ -51,9 +45,9 @@ genetic-data = { path = '../../genetic-data', default-features = false } user-profile = { path = '../../user-profile', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analysts/benchmarking/src/lib.rs b/pallets/genetic-analysts/benchmarking/src/lib.rs index ff867e15..ebedf2e7 100644 --- a/pallets/genetic-analysts/benchmarking/src/lib.rs +++ b/pallets/genetic-analysts/benchmarking/src/lib.rs @@ -77,7 +77,7 @@ benchmarks! { ) update_genetic_analyst_verification_status { - let caller: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let old_genetic_analyst = GeneticAnalystInfo { @@ -104,7 +104,7 @@ benchmarks! { ) update_genetic_analyst_availability_status { - let caller: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let old_genetic_analyst = GeneticAnalystInfo { @@ -148,7 +148,7 @@ benchmarks! { ) stake_genetic_analyst { - let caller: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let _ = ::Currency::deposit_creating(&caller, 60000000000000000000000u128.saturated_into()); @@ -171,7 +171,7 @@ benchmarks! { ) unstake_genetic_analyst { - let caller: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let _ = ::Currency::deposit_creating(&caller, 60000000000000000000000u128.saturated_into()); @@ -196,7 +196,7 @@ benchmarks! { ) retrieve_unstake_amount { - let caller_admin: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller_admin: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); let caller: T::AccountId = whitelisted_caller(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); @@ -225,21 +225,21 @@ benchmarks! { ) update_minimum_stake_amount { - let caller: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); }: update_minimum_stake_amount( RawOrigin::Signed(caller), 60000000000000000000000u128.saturated_into() ) update_unstake_time { - let caller: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); }: update_unstake_time( RawOrigin::Signed(caller), 0u64.saturated_into() ) update_admin_key { - let caller: T::AccountId = GeneticAnalystVerifierKey::::get(); + let caller: T::AccountId = GeneticAnalystVerifierKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_admin_key( RawOrigin::Signed(caller), diff --git a/pallets/genetic-analysts/benchmarking/src/mock.rs b/pallets/genetic-analysts/benchmarking/src/mock.rs index 6b37cd39..441d7cf3 100644 --- a/pallets/genetic-analysts/benchmarking/src/mock.rs +++ b/pallets/genetic-analysts/benchmarking/src/mock.rs @@ -68,6 +68,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/genetic-analysts/src/lib.rs b/pallets/genetic-analysts/src/lib.rs index 5ff166fb..d1d70f20 100644 --- a/pallets/genetic-analysts/src/lib.rs +++ b/pallets/genetic-analysts/src/lib.rs @@ -13,7 +13,6 @@ pub use weights::WeightInfo; pub use crate::interface::GeneticAnalystInterface; use frame_support::{ - log, pallet_prelude::*, sp_runtime::{traits::AccountIdConversion, RuntimeDebug, SaturatedConversion}, traits::{Currency, ExistenceRequirement, StorageVersion}, @@ -190,6 +189,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] @@ -225,11 +225,11 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn admin_key)] - pub type GeneticAnalystVerifierKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type GeneticAnalystVerifierKey = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn pallet_id)] - pub type PalletAccount = StorageValue<_, T::AccountId, ValueQuery>; + pub type PalletAccount = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn total_staked_amount)] @@ -247,13 +247,13 @@ pub mod pallet { // ----- Genesis Configs ------------------ #[pallet::genesis_config] pub struct GenesisConfig { - pub genetic_analyst_verifier_key: T::AccountId, + pub genetic_analyst_verifier_key: Option, } #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { - Self { genetic_analyst_verifier_key: Default::default() } + Self { genetic_analyst_verifier_key: None } } } @@ -261,12 +261,15 @@ pub mod pallet { impl GenesisBuild for GenesisConfig { fn build(&self) { UnstakeTime::::put(MomentOf::::default()); - GeneticAnalystVerifierKey::::put(&self.genetic_analyst_verifier_key); + if let Some(ref genetic_analyst_verifier_key) = self.genetic_analyst_verifier_key { + GeneticAnalystVerifierKey::::put(genetic_analyst_verifier_key); + } PalletAccount::::put(>::get_pallet_id()); >::set_minimum_stake_amount(50000000000000000000000u128.saturated_into()); >::set_total_staked_amount(); } } + // ----------------------------------------- #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] @@ -342,6 +345,7 @@ pub mod pallet { BadOrigin, CannotLookup, ConsumerRemaining, + TooManyConsumers, NoProviders, Token, Arithmetic, @@ -617,7 +621,7 @@ impl GeneticAnalystInterface for Pallet { account_id: &T::AccountId, status: &Self::VerificationStatus, ) -> Result { - if genetic_analyst_verifier_key.clone() != GeneticAnalystVerifierKey::::get() { + if genetic_analyst_verifier_key.clone() != GeneticAnalystVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -655,17 +659,14 @@ impl GeneticAnalystInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -734,17 +735,14 @@ impl GeneticAnalystInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } } @@ -789,7 +787,7 @@ impl GeneticAnalystInterface for Pallet { admin_key: &T::AccountId, account_id: &T::AccountId, ) -> Result { - if admin_key.clone() != GeneticAnalystVerifierKey::::get() { + if admin_key.clone() != GeneticAnalystVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -822,17 +820,14 @@ impl GeneticAnalystInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -869,7 +864,7 @@ impl GeneticAnalystInterface for Pallet { account_id: &T::AccountId, amount: Self::Balance, ) -> Result<(), Self::Error> { - if account_id.clone() != GeneticAnalystVerifierKey::::get() { + if account_id.clone() != GeneticAnalystVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -882,7 +877,7 @@ impl GeneticAnalystInterface for Pallet { account_id: &T::AccountId, moment: Self::Moment, ) -> Result<(), Self::Error> { - if account_id.clone() != GeneticAnalystVerifierKey::::get() { + if account_id.clone() != GeneticAnalystVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -895,7 +890,7 @@ impl GeneticAnalystInterface for Pallet { account_id: &T::AccountId, admin_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != GeneticAnalystVerifierKey::::get() { + if account_id.clone() != GeneticAnalystVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -929,7 +924,7 @@ impl Pallet { /// The account ID that holds the funds pub fn account_id() -> AccountIdOf { - >::get() + >::get().unwrap() } pub fn get_balance_by_account_id(account_id: &AccountIdOf) -> BalanceOf { diff --git a/pallets/genetic-analysts/tests/Cargo.toml b/pallets/genetic-analysts/tests/Cargo.toml index 08a7e8ce..89ecdd6d 100644 --- a/pallets/genetic-analysts/tests/Cargo.toml +++ b/pallets/genetic-analysts/tests/Cargo.toml @@ -11,28 +11,22 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # External Dependencies -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } primitives-duration = { path = '../../../primitives/duration', default-features = false } primitives-price-and-currency = { path = '../../../primitives/price-and-currency', default-features = false } @@ -47,9 +41,9 @@ traits-genetic-analyst-services = { path = '../../genetic-analyst-services/trait traits-genetic-analyst-qualifications = { path = '../../genetic-analyst-qualifications/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } ## Local Dependencies genetic-analysts = { path = '../../genetic-analysts', default-features = false } @@ -61,9 +55,9 @@ genetic-data = { path = '../../genetic-data', default-features = false } user-profile = { path = '../../user-profile', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-analysts/tests/src/lib.rs b/pallets/genetic-analysts/tests/src/lib.rs index b650f32b..7249e7e8 100644 --- a/pallets/genetic-analysts/tests/src/lib.rs +++ b/pallets/genetic-analysts/tests/src/lib.rs @@ -485,6 +485,7 @@ mod tests { } )); + PalletAccount::::put(4); GeneticAnalystVerifierKey::::put(2); assert_ok!(GeneticAnalysts::stake_genetic_analyst(Origin::signed(1),)); @@ -603,6 +604,8 @@ mod tests { #[test] fn cant_update_genetic_analyst_verification_status_when_unauthorized() { ::default().existential_deposit(1).build().execute_with(|| { + GeneticAnalystVerifierKey::::put(4); + assert_ok!(GeneticAnalysts::register_genetic_analyst( Origin::signed(1), GeneticAnalystInfo { @@ -723,6 +726,8 @@ mod tests { 0 )); + PalletAccount::::put(0); + assert_ok!(GeneticAnalysts::register_genetic_analyst( Origin::signed(1), GeneticAnalystInfo { @@ -747,7 +752,7 @@ mod tests { assert_ok!(Balances::set_balance( RawOrigin::Root.into(), - PalletAccount::::get(), + PalletAccount::::get().unwrap(), 0u128.saturated_into(), 0 )); @@ -773,6 +778,7 @@ mod tests { 0 )); + PalletAccount::::put(4); GeneticAnalystVerifierKey::::put(2); assert_ok!(GeneticAnalysts::update_minimum_stake_amount( @@ -846,6 +852,9 @@ mod tests { #[test] fn cant_stake_genetic_analyst_when_already_staked() { ::default().existential_deposit(1).build().execute_with(|| { + PalletAccount::::put(4); + GeneticAnalystVerifierKey::::put(1); + assert_ok!(Balances::set_balance( RawOrigin::Root.into(), 1, @@ -1103,11 +1112,11 @@ mod tests { ::default().existential_deposit(1).build().execute_with(|| { GeneticAnalystVerifierKey::::put(2); - assert_eq!(GeneticAnalysts::admin_key(), 2); + assert_eq!(GeneticAnalysts::admin_key(), Some(2)); assert_ok!(GeneticAnalysts::update_admin_key(Origin::signed(2), 1,)); - assert_eq!(GeneticAnalysts::admin_key(), 1); + assert_eq!(GeneticAnalysts::admin_key(), Some(1)); }) } @@ -1128,13 +1137,14 @@ mod tests { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(GeneticAnalysts::sudo_update_admin_key(Origin::root(), 1)); - assert_eq!(GeneticAnalysts::admin_key(), 1); + assert_eq!(GeneticAnalysts::admin_key(), Some(1)); }) } #[test] fn cant_sudo_update_admin_key_when_not_sudo() { ::default().existential_deposit(1).build().execute_with(|| { + GeneticAnalystVerifierKey::::put(4); assert_noop!( GeneticAnalysts::update_admin_key(Origin::signed(2), 1,), Error::::Unauthorized @@ -1170,6 +1180,7 @@ mod tests { } )); + PalletAccount::::put(4); GeneticAnalystVerifierKey::::put(2); assert_ok!(GeneticAnalysts::stake_genetic_analyst(Origin::signed(1),)); @@ -1246,6 +1257,7 @@ mod tests { } )); + PalletAccount::::put(4); GeneticAnalystVerifierKey::::put(2); assert_ok!(GeneticAnalysts::update_minimum_stake_amount( @@ -2224,6 +2236,7 @@ mod tests { #[test] fn cant_unstake_genetic_analyst_when_insufficient_pallet_funds() { ::default().existential_deposit(1).build().execute_with(|| { + PalletAccount::::put(0); GeneticAnalystVerifierKey::::put(2); assert_ok!(Balances::set_balance( @@ -2262,7 +2275,7 @@ mod tests { assert_ok!(Balances::set_balance( RawOrigin::Root.into(), - PalletAccount::::get(), + PalletAccount::::get().unwrap(), 0u128.saturated_into(), 0 )); diff --git a/pallets/genetic-analysts/tests/src/mock.rs b/pallets/genetic-analysts/tests/src/mock.rs index 0b8249b1..46e7aa6d 100644 --- a/pallets/genetic-analysts/tests/src/mock.rs +++ b/pallets/genetic-analysts/tests/src/mock.rs @@ -67,6 +67,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_randomness_collective_flip::Config for Test {} diff --git a/pallets/genetic-analysts/traits/Cargo.toml b/pallets/genetic-analysts/traits/Cargo.toml index be0ea41e..7e8bb2b9 100644 --- a/pallets/genetic-analysts/traits/Cargo.toml +++ b/pallets/genetic-analysts/traits/Cargo.toml @@ -5,17 +5,11 @@ authors = ["agustinustheoo "] edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-data/Cargo.toml b/pallets/genetic-data/Cargo.toml index 0426a0c3..0f9eca70 100644 --- a/pallets/genetic-data/Cargo.toml +++ b/pallets/genetic-data/Cargo.toml @@ -13,28 +13,28 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] # External Dependencies -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Frame Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } traits-genetic-data = { path = './traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-data/src/lib.rs b/pallets/genetic-data/src/lib.rs index db11e722..957726a7 100644 --- a/pallets/genetic-data/src/lib.rs +++ b/pallets/genetic-data/src/lib.rs @@ -90,6 +90,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/genetic-data/src/mock.rs b/pallets/genetic-data/src/mock.rs index f086bd54..f53e234f 100644 --- a/pallets/genetic-data/src/mock.rs +++ b/pallets/genetic-data/src/mock.rs @@ -53,6 +53,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl genetic_data::Config for Test { diff --git a/pallets/genetic-data/traits/Cargo.toml b/pallets/genetic-data/traits/Cargo.toml index d0b165b8..f7063d0b 100644 --- a/pallets/genetic-data/traits/Cargo.toml +++ b/pallets/genetic-data/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["agustinustheoo "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-testing/Cargo.toml b/pallets/genetic-testing/Cargo.toml index 15cdd2e1..7e0d765d 100644 --- a/pallets/genetic-testing/Cargo.toml +++ b/pallets/genetic-testing/Cargo.toml @@ -9,27 +9,21 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } traits-genetic-testing = { path = './traits', default-features = false } traits-order = { path = '../orders/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/genetic-testing/benchmarking/Cargo.toml b/pallets/genetic-testing/benchmarking/Cargo.toml index 8b7be27b..f3fca908 100644 --- a/pallets/genetic-testing/benchmarking/Cargo.toml +++ b/pallets/genetic-testing/benchmarking/Cargo.toml @@ -11,24 +11,18 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } labs = { path = '../../labs', default-features = false } services = { path = '../../services', default-features = false } @@ -46,7 +40,7 @@ traits-order = { path = '../../orders/traits', default-features = false } traits-genetic-testing = { path = '../../genetic-testing/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-testing/benchmarking/src/lib.rs b/pallets/genetic-testing/benchmarking/src/lib.rs index 3c1900ca..c5bb54fc 100644 --- a/pallets/genetic-testing/benchmarking/src/lib.rs +++ b/pallets/genetic-testing/benchmarking/src/lib.rs @@ -46,7 +46,7 @@ use sp_core::Decode; benchmarks! { reject_dna_sample { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -106,7 +106,7 @@ benchmarks! { ) process_dna_sample { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -165,7 +165,7 @@ benchmarks! { ) submit_test_result { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -230,7 +230,7 @@ benchmarks! { ) submit_independent_test_result { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); let _dna_test_result = DnaTestResultSubmission { comments: Some("DNA Test Result comments".as_bytes().to_vec()), @@ -243,7 +243,7 @@ benchmarks! { ) submit_data_bounty_details { - let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap_or_default(); + let caller: T::AccountId = T::AccountId::decode(&mut "18c79faa6203d8b8349b19cc72cc6bfd008c243ea998435847abf6618756ca0b".as_bytes()).unwrap(); }: submit_data_bounty_details( RawOrigin::Signed(caller), T::Hashing::hash("0xhJ7TRe456FADD2726A132ABJK5RCc9E6fC5869F4".as_bytes()), diff --git a/pallets/genetic-testing/benchmarking/src/mock.rs b/pallets/genetic-testing/benchmarking/src/mock.rs index fe560f1d..9235a3b6 100644 --- a/pallets/genetic-testing/benchmarking/src/mock.rs +++ b/pallets/genetic-testing/benchmarking/src/mock.rs @@ -61,6 +61,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/genetic-testing/src/lib.rs b/pallets/genetic-testing/src/lib.rs index 52a6d9f5..ddb2cf1c 100644 --- a/pallets/genetic-testing/src/lib.rs +++ b/pallets/genetic-testing/src/lib.rs @@ -137,6 +137,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/genetic-testing/tests/Cargo.toml b/pallets/genetic-testing/tests/Cargo.toml index 15e80fe4..9370aeb9 100644 --- a/pallets/genetic-testing/tests/Cargo.toml +++ b/pallets/genetic-testing/tests/Cargo.toml @@ -14,25 +14,25 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies labs = { path = '../../labs', default-features = false } @@ -52,7 +52,7 @@ traits-user-profile = { path = '../../user-profile/traits', default-features = f traits-order = { path = '../../orders/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/genetic-testing/tests/src/mock.rs b/pallets/genetic-testing/tests/src/mock.rs index 8905d72c..ca13efbc 100644 --- a/pallets/genetic-testing/tests/src/mock.rs +++ b/pallets/genetic-testing/tests/src/mock.rs @@ -60,6 +60,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/genetic-testing/traits/Cargo.toml b/pallets/genetic-testing/traits/Cargo.toml index d9140b8d..7608876b 100644 --- a/pallets/genetic-testing/traits/Cargo.toml +++ b/pallets/genetic-testing/traits/Cargo.toml @@ -4,18 +4,12 @@ version = "2.1.0" authors = ["Kevin "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/hospital-certifications/Cargo.toml b/pallets/hospital-certifications/Cargo.toml index cbc992f0..6facd5c3 100644 --- a/pallets/hospital-certifications/Cargo.toml +++ b/pallets/hospital-certifications/Cargo.toml @@ -11,26 +11,20 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } traits-hospital-certifications = { path = './traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/hospital-certifications/benchmarking/Cargo.toml b/pallets/hospital-certifications/benchmarking/Cargo.toml index 451932d5..559a516a 100644 --- a/pallets/hospital-certifications/benchmarking/Cargo.toml +++ b/pallets/hospital-certifications/benchmarking/Cargo.toml @@ -11,24 +11,18 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } hospitals = { path = '../../hospitals', default-features = false } hospital-certifications = { path = '../../hospital-certifications', default-features = false } @@ -37,7 +31,7 @@ primitives-area-code = { path = '../../../primitives/area-code', default-feature traits-hospital-certifications = { path = '../../hospital-certifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/hospital-certifications/benchmarking/src/mock.rs b/pallets/hospital-certifications/benchmarking/src/mock.rs index ef810df7..b71cf6df 100644 --- a/pallets/hospital-certifications/benchmarking/src/mock.rs +++ b/pallets/hospital-certifications/benchmarking/src/mock.rs @@ -57,6 +57,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/hospital-certifications/src/lib.rs b/pallets/hospital-certifications/src/lib.rs index 435abf44..ba129aef 100644 --- a/pallets/hospital-certifications/src/lib.rs +++ b/pallets/hospital-certifications/src/lib.rs @@ -80,6 +80,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/hospital-certifications/tests/Cargo.toml b/pallets/hospital-certifications/tests/Cargo.toml index 46f3a70b..88c5be0d 100644 --- a/pallets/hospital-certifications/tests/Cargo.toml +++ b/pallets/hospital-certifications/tests/Cargo.toml @@ -14,22 +14,22 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies hospitals = { path = '../../hospitals', default-features = false } @@ -40,7 +40,7 @@ primitives-area-code = { path = '../../../primitives/area-code', default-feature traits-hospital-certifications = { path = '../../hospital-certifications/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/hospital-certifications/tests/src/mock.rs b/pallets/hospital-certifications/tests/src/mock.rs index d2442904..4606b137 100644 --- a/pallets/hospital-certifications/tests/src/mock.rs +++ b/pallets/hospital-certifications/tests/src/mock.rs @@ -56,6 +56,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/hospital-certifications/traits/Cargo.toml b/pallets/hospital-certifications/traits/Cargo.toml index 9fdc2648..23c26383 100644 --- a/pallets/hospital-certifications/traits/Cargo.toml +++ b/pallets/hospital-certifications/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["agustinustheoo "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/hospitals/Cargo.toml b/pallets/hospitals/Cargo.toml index 6e668b12..8aeef641 100644 --- a/pallets/hospitals/Cargo.toml +++ b/pallets/hospitals/Cargo.toml @@ -11,35 +11,29 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } primitives-area-code = { path = '../../primitives/area-code', default-features = false } traits-user-profile = { path = '../user-profile/traits', default-features = false } traits-hospital-certifications = { path = '../hospital-certifications/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies hospital-certifications = { path = '../hospital-certifications', default-features = false } user-profile = { path = '../user-profile', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/hospitals/src/lib.rs b/pallets/hospitals/src/lib.rs index ad62f3cf..53d9fe22 100644 --- a/pallets/hospitals/src/lib.rs +++ b/pallets/hospitals/src/lib.rs @@ -141,6 +141,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/hospitals/src/mock.rs b/pallets/hospitals/src/mock.rs index b9854535..6f1281aa 100644 --- a/pallets/hospitals/src/mock.rs +++ b/pallets/hospitals/src/mock.rs @@ -61,6 +61,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl hospitals::Config for Test { diff --git a/pallets/labs/Cargo.toml b/pallets/labs/Cargo.toml index 19a341dc..8343da4c 100644 --- a/pallets/labs/Cargo.toml +++ b/pallets/labs/Cargo.toml @@ -11,24 +11,18 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-stake-status = { path = '../../primitives/stake-status', default-features = false } primitives-verification-status = { path = '../../primitives/verification-status', default-features = false } @@ -41,8 +35,8 @@ traits-certifications = { path = '../certifications/traits', default-features = traits-user-profile = { path = '../user-profile/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies services = { path = '../services', default-features = false } @@ -50,8 +44,8 @@ certifications = { path = '../certifications', default-features = false } user-profile = { path = '../user-profile', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/labs/benchmarking/Cargo.toml b/pallets/labs/benchmarking/Cargo.toml index b3b0c47c..4d81a935 100644 --- a/pallets/labs/benchmarking/Cargo.toml +++ b/pallets/labs/benchmarking/Cargo.toml @@ -11,24 +11,18 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-area-code = { path = '../../../primitives/area-code', default-features = false } primitives-stake-status = { path = '../../../primitives/stake-status', default-features = false } @@ -41,9 +35,9 @@ traits-certifications = { path = '../../certifications/traits', default-features traits-genetic-testing = { path = '../../genetic-testing/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } # Local Dependencies labs = { path = '../../labs', default-features = false } @@ -54,7 +48,7 @@ certifications = { path = '../../certifications', default-features = false } genetic-testing = { path = '../../genetic-testing', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.119" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/labs/benchmarking/src/lib.rs b/pallets/labs/benchmarking/src/lib.rs index b40ef627..aabb80f6 100644 --- a/pallets/labs/benchmarking/src/lib.rs +++ b/pallets/labs/benchmarking/src/lib.rs @@ -81,7 +81,7 @@ benchmarks! { ) update_lab_verification_status { - let caller: T::AccountId = LabVerifierKey::::get(); + let caller: T::AccountId = LabVerifierKey::::get().unwrap(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let old_lab = LabInfo { @@ -130,7 +130,7 @@ benchmarks! { ) stake_lab { - let caller: T::AccountId = LabVerifierKey::::get(); + let caller: T::AccountId = LabVerifierKey::::get().unwrap(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let _ = ::Currency::deposit_creating(&caller, 60000000000000000000000u128.saturated_into()); @@ -155,7 +155,7 @@ benchmarks! { ) unstake_lab { - let caller: T::AccountId = LabVerifierKey::::get(); + let caller: T::AccountId = LabVerifierKey::::get().unwrap(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let _ = ::Currency::deposit_creating(&caller, 60000000000000000000000u128.saturated_into()); @@ -182,7 +182,7 @@ benchmarks! { ) retrieve_unstake_amount { - let caller_admin: T::AccountId = LabVerifierKey::::get(); + let caller_admin: T::AccountId = LabVerifierKey::::get().unwrap(); let caller: T::AccountId = whitelisted_caller(); let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); @@ -213,21 +213,21 @@ benchmarks! { ) update_minimum_stake_amount { - let caller: T::AccountId = LabVerifierKey::::get(); + let caller: T::AccountId = LabVerifierKey::::get().unwrap(); }: update_minimum_stake_amount( RawOrigin::Signed(caller), 60000000000000000000000u128.saturated_into() ) update_unstake_time { - let caller: T::AccountId = LabVerifierKey::::get(); + let caller: T::AccountId = LabVerifierKey::::get().unwrap(); }: update_unstake_time( RawOrigin::Signed(caller), 0u64.saturated_into() ) update_admin_key { - let caller: T::AccountId = LabVerifierKey::::get(); + let caller: T::AccountId = LabVerifierKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_admin_key( RawOrigin::Signed(caller), diff --git a/pallets/labs/benchmarking/src/mock.rs b/pallets/labs/benchmarking/src/mock.rs index 1f9c109b..9a7f3fb9 100644 --- a/pallets/labs/benchmarking/src/mock.rs +++ b/pallets/labs/benchmarking/src/mock.rs @@ -74,6 +74,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/labs/src/lib.rs b/pallets/labs/src/lib.rs index 03a9a728..338271ad 100644 --- a/pallets/labs/src/lib.rs +++ b/pallets/labs/src/lib.rs @@ -15,7 +15,6 @@ pub use weights::WeightInfo; pub use crate::interface::LabInterface; use frame_support::{ - log, pallet_prelude::*, sp_runtime::{traits::AccountIdConversion, RuntimeDebug, SaturatedConversion}, traits::{Currency, ExistenceRequirement, StorageVersion}, @@ -198,6 +197,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] @@ -251,11 +251,11 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn admin_key)] - pub type LabVerifierKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type LabVerifierKey = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn pallet_id)] - pub type PalletAccount = StorageValue<_, T::AccountId, ValueQuery>; + pub type PalletAccount = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn total_staked_amount)] @@ -273,20 +273,22 @@ pub mod pallet { // ----- Genesis Configs ------------------ #[pallet::genesis_config] pub struct GenesisConfig { - pub lab_verifier_key: T::AccountId, + pub lab_verifier_key: Option, } #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { - Self { lab_verifier_key: Default::default() } + Self { lab_verifier_key: None } } } #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { - LabVerifierKey::::put(&self.lab_verifier_key); + if let Some(ref lab_verifier_key) = self.lab_verifier_key { + LabVerifierKey::::put(lab_verifier_key); + } UnstakeTime::::put(MomentOf::::default()); PalletAccount::::put(>::get_pallet_id()); >::set_minimum_stake_amount(50000000000000000000000u128.saturated_into()); @@ -360,6 +362,7 @@ pub mod pallet { Other, BadOrigin, CannotLookup, + TooManyConsumers, ConsumerRemaining, NoProviders, Token, @@ -614,7 +617,7 @@ impl LabInterface for Pallet { account_id: &T::AccountId, status: &Self::VerificationStatus, ) -> Result { - if lab_verifier_key.clone() != LabVerifierKey::::get() { + if lab_verifier_key.clone() != LabVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -679,17 +682,14 @@ impl LabInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } } @@ -731,7 +731,7 @@ impl LabInterface for Pallet { admin_key: &T::AccountId, account_id: &T::AccountId, ) -> Result { - if admin_key.clone() != LabVerifierKey::::get() { + if admin_key.clone() != LabVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -764,17 +764,14 @@ impl LabInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -792,7 +789,7 @@ impl LabInterface for Pallet { account_id: &T::AccountId, amount: Self::Balance, ) -> Result<(), Self::Error> { - if account_id.clone() != LabVerifierKey::::get() { + if account_id.clone() != LabVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -805,7 +802,7 @@ impl LabInterface for Pallet { account_id: &T::AccountId, moment: Self::Moment, ) -> Result<(), Self::Error> { - if account_id.clone() != LabVerifierKey::::get() { + if account_id.clone() != LabVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -818,7 +815,7 @@ impl LabInterface for Pallet { account_id: &T::AccountId, admin_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != LabVerifierKey::::get() { + if account_id.clone() != LabVerifierKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -920,7 +917,7 @@ impl Pallet { /// The account ID that holds the funds pub fn account_id() -> AccountIdOf { - >::get() + >::get().unwrap() } pub fn get_balance_by_account_id(account_id: &AccountIdOf) -> BalanceOf { diff --git a/pallets/labs/tests/Cargo.toml b/pallets/labs/tests/Cargo.toml index 4efa591d..f2474d55 100644 --- a/pallets/labs/tests/Cargo.toml +++ b/pallets/labs/tests/Cargo.toml @@ -11,24 +11,18 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-duration = { path = '../../../primitives/duration', default-features = false } @@ -44,9 +38,9 @@ traits-certifications = { path = '../../certifications/traits', default-features traits-genetic-testing = { path = '../../genetic-testing/traits', default-features = false } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } # Local Dependencies labs = { path = '../../labs', default-features = false } @@ -57,7 +51,7 @@ certifications = { path = '../../certifications', default-features = false } genetic-testing = { path = '../../genetic-testing', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.119" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/labs/tests/src/lib.rs b/pallets/labs/tests/src/lib.rs index e40ac9b8..c3fe7599 100644 --- a/pallets/labs/tests/src/lib.rs +++ b/pallets/labs/tests/src/lib.rs @@ -403,6 +403,8 @@ mod tests { #[test] fn cant_update_lab_verification_status_when_not_admin() { ::default().existential_deposit(1).build().execute_with(|| { + LabVerifierKey::::put(1); + assert_ok!(Labs::register_lab( Origin::signed(1), LabInfo { @@ -669,6 +671,8 @@ mod tests { #[test] fn stake_lab_works() { ::default().existential_deposit(1).build().execute_with(|| { + PalletAccount::::put(0); + assert_ok!(Balances::set_balance( RawOrigin::Root.into(), 1, @@ -747,6 +751,8 @@ mod tests { #[test] fn cant_stake_lab_when_already_staked() { ::default().existential_deposit(1).build().execute_with(|| { + PalletAccount::::put(0); + assert_ok!(Balances::set_balance( RawOrigin::Root.into(), 1, @@ -998,11 +1004,11 @@ mod tests { ::default().existential_deposit(1).build().execute_with(|| { LabVerifierKey::::put(2); - assert_eq!(Labs::admin_key(), 2); + assert_eq!(Labs::admin_key(), Some(2)); assert_ok!(Labs::update_admin_key(Origin::signed(2), 1,)); - assert_eq!(Labs::admin_key(), 1); + assert_eq!(Labs::admin_key(), Some(1)); }) } @@ -1023,13 +1029,15 @@ mod tests { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(Labs::sudo_update_admin_key(Origin::root(), 1)); - assert_eq!(Labs::admin_key(), 1); + assert_eq!(Labs::admin_key(), Some(1)); }) } #[test] fn cant_sudo_update_admin_key_when_not_sudo() { ::default().existential_deposit(1).build().execute_with(|| { + LabVerifierKey::::put(1); + assert_noop!( Labs::update_admin_key(Origin::signed(2), 1,), Error::::Unauthorized @@ -1669,6 +1677,7 @@ mod tests { #[test] fn cant_unstake_lab_when_insufficient_pallet_funds() { ::default().existential_deposit(1).build().execute_with(|| { + PalletAccount::::put(0); LabVerifierKey::::put(2); assert_ok!(Balances::set_balance( @@ -1709,7 +1718,7 @@ mod tests { assert_ok!(Balances::set_balance( RawOrigin::Root.into(), - PalletAccount::::get(), + PalletAccount::::get().unwrap(), 0u128.saturated_into(), 0 )); diff --git a/pallets/labs/tests/src/mock.rs b/pallets/labs/tests/src/mock.rs index 6a7a12c1..8e5d23ba 100644 --- a/pallets/labs/tests/src/mock.rs +++ b/pallets/labs/tests/src/mock.rs @@ -68,6 +68,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/labs/traits/Cargo.toml b/pallets/labs/traits/Cargo.toml index b5a17204..0d3ecfe8 100644 --- a/pallets/labs/traits/Cargo.toml +++ b/pallets/labs/traits/Cargo.toml @@ -5,17 +5,11 @@ authors = ["agustinustheoo "] edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-verification-status = { path = '../../../primitives/verification-status', default-features = false } [features] diff --git a/pallets/orders/Cargo.toml b/pallets/orders/Cargo.toml index f910422b..9c631118 100644 --- a/pallets/orders/Cargo.toml +++ b/pallets/orders/Cargo.toml @@ -13,23 +13,17 @@ repository = '' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -serde = { default-features = false, version = "1.0.130", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +serde = { default-features = false, version = "1.0.136", features = ["derive"] } chrono = { default-features = false, version = '0.4' } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } traits-services = { path = '../services/traits', default-features = false } traits-genetic-testing = { path = '../genetic-testing/traits', default-features = false } @@ -37,9 +31,9 @@ traits-user-profile = { path = '../user-profile/traits', default-features = fals traits-order = { path = './traits', default-features = false } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies services = { path = '../services', default-features = false } @@ -53,8 +47,8 @@ primitives-area-code = { path = '../../primitives/area-code', default-features = primitives-price-and-currency = { path = '../../primitives/price-and-currency', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/orders/benchmarking/Cargo.toml b/pallets/orders/benchmarking/Cargo.toml index f44dfa99..70b27dcd 100644 --- a/pallets/orders/benchmarking/Cargo.toml +++ b/pallets/orders/benchmarking/Cargo.toml @@ -11,25 +11,19 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -hex-literal = '0.3.3' -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +hex-literal = '0.3.4' +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } labs = { path = '../../labs', default-features = false } services = { path = '../../services', default-features = false } @@ -47,7 +41,7 @@ primitives-area-code = { path = '../../../primitives/area-code', default-feature primitives-price-and-currency = { path = '../../../primitives/price-and-currency', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/orders/benchmarking/src/lib.rs b/pallets/orders/benchmarking/src/lib.rs index a208b7d8..21dd2f00 100644 --- a/pallets/orders/benchmarking/src/lib.rs +++ b/pallets/orders/benchmarking/src/lib.rs @@ -45,7 +45,7 @@ use primitives_area_code::{CityCode, CountryCode, RegionCode}; benchmarks! { create_order { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -93,7 +93,7 @@ benchmarks! { ) cancel_order { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -151,7 +151,7 @@ benchmarks! { ) set_order_paid { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -209,7 +209,7 @@ benchmarks! { ) fulfill_order { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -290,7 +290,7 @@ benchmarks! { ) set_order_refunded { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller_origin = T::Origin::from(RawOrigin::Signed(caller.clone())); let lab = LabInfo { @@ -360,7 +360,7 @@ benchmarks! { ) update_escrow_key { - let caller: T::AccountId = EscrowKey::::get(); + let caller: T::AccountId = EscrowKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_escrow_key( RawOrigin::Signed(caller), diff --git a/pallets/orders/benchmarking/src/mock.rs b/pallets/orders/benchmarking/src/mock.rs index 31a49bba..6b47aed7 100644 --- a/pallets/orders/benchmarking/src/mock.rs +++ b/pallets/orders/benchmarking/src/mock.rs @@ -62,6 +62,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/orders/src/lib.rs b/pallets/orders/src/lib.rs index ac8ef838..d97b9d4a 100644 --- a/pallets/orders/src/lib.rs +++ b/pallets/orders/src/lib.rs @@ -119,6 +119,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] @@ -159,26 +160,28 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn admin_key)] - pub type EscrowKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type EscrowKey = StorageValue<_, T::AccountId, OptionQuery>; // ----------------------------------------- // ----- Genesis Configs ------------------ #[pallet::genesis_config] pub struct GenesisConfig { - pub escrow_key: T::AccountId, + pub escrow_key: Option, } #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { - Self { escrow_key: Default::default() } + Self { escrow_key: None } } } #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { - EscrowKey::::put(&self.escrow_key); + if let Some(ref escrow_key) = self.escrow_key { + EscrowKey::::put(escrow_key); + } } } // ---------------------------------------- @@ -452,7 +455,7 @@ impl OrderInterface for Pallet { escrow_account_id: &T::AccountId, order_id: &T::Hash, ) -> Result { - if escrow_account_id.clone() != EscrowKey::::get() { + if escrow_account_id.clone() != EscrowKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -494,7 +497,7 @@ impl OrderInterface for Pallet { escrow_account_id: &T::AccountId, order_id: &T::Hash, ) -> Result { - if escrow_account_id.clone() != EscrowKey::::get() { + if escrow_account_id.clone() != EscrowKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -516,7 +519,7 @@ impl OrderInterface for Pallet { account_id: &T::AccountId, escrow_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != EscrowKey::::get() { + if account_id.clone() != EscrowKey::::get().unwrap() { return Err(Error::::Unauthorized) } diff --git a/pallets/orders/src/mock.rs b/pallets/orders/src/mock.rs index d489f36f..e4f9f559 100644 --- a/pallets/orders/src/mock.rs +++ b/pallets/orders/src/mock.rs @@ -63,6 +63,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/orders/src/tests.rs b/pallets/orders/src/tests.rs index 97e99b35..639d56dd 100644 --- a/pallets/orders/src/tests.rs +++ b/pallets/orders/src/tests.rs @@ -716,6 +716,8 @@ fn cant_set_order_paid_when_unauthorized() { let _order_id = Orders::last_order_by_customer_id(2).unwrap(); + EscrowKey::::put(2); + assert_noop!( Orders::set_order_paid(Origin::signed(3), _order_id), Error::::Unauthorized @@ -1131,11 +1133,11 @@ fn update_escrow_key_works() { ::default().existential_deposit(1).build().execute_with(|| { EscrowKey::::put(2); - assert_eq!(Orders::admin_key(), 2); + assert_eq!(Orders::admin_key(), Some(2)); assert_ok!(Orders::update_escrow_key(Origin::signed(2), 1,)); - assert_eq!(Orders::admin_key(), 1); + assert_eq!(Orders::admin_key(), Some(1)); }) } @@ -1144,6 +1146,6 @@ fn sudo_update_escrow_key_works() { ::default().existential_deposit(1).build().execute_with(|| { assert_ok!(Orders::sudo_update_escrow_key(Origin::root(), 1)); - assert_eq!(Orders::admin_key(), 1); + assert_eq!(Orders::admin_key(), Some(1)); }) } diff --git a/pallets/orders/traits/Cargo.toml b/pallets/orders/traits/Cargo.toml index b511665b..7b7e84bb 100644 --- a/pallets/orders/traits/Cargo.toml +++ b/pallets/orders/traits/Cargo.toml @@ -5,18 +5,12 @@ authors = ["Kevin "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/rewards/Cargo.toml b/pallets/rewards/Cargo.toml index c4828b4d..21cffa52 100644 --- a/pallets/rewards/Cargo.toml +++ b/pallets/rewards/Cargo.toml @@ -13,27 +13,27 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] # External Dependencies -hex-literal = '0.3.3' -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -scale-info = { version = '1.0', default-features = false, features = ['derive'] } +hex-literal = '0.3.4' +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/rewards/src/benchmarking.rs b/pallets/rewards/src/benchmarking.rs index 49bc1d7f..cae2e4c9 100644 --- a/pallets/rewards/src/benchmarking.rs +++ b/pallets/rewards/src/benchmarking.rs @@ -7,7 +7,7 @@ use frame_system::RawOrigin; benchmarks! { reward_funds { - let caller: T::AccountId = RewarderKey::::get(); + let caller: T::AccountId = RewarderKey::::get().unwrap(); let value = T::Currency::minimum_balance().saturating_mul(100u32.into()); let _id = caller.clone(); }: reward_funds( @@ -17,7 +17,7 @@ benchmarks! { ) update_admin_key { - let caller: T::AccountId = RewarderKey::::get(); + let caller: T::AccountId = RewarderKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_admin_key( RawOrigin::Signed(caller), diff --git a/pallets/rewards/src/lib.rs b/pallets/rewards/src/lib.rs index 2acfaa5d..0b8bc5ee 100644 --- a/pallets/rewards/src/lib.rs +++ b/pallets/rewards/src/lib.rs @@ -38,8 +38,8 @@ pub mod pallet { pub trait Config: frame_system::Config + Sized { type Event: From> + IsType<::Event>; /// Currency type for this pallet. - type PalletId: Get; type Currency: Currency<::AccountId>; + type PalletId: Get; type WeightInfo: WeightInfo; } // ----------------------------------------- @@ -53,11 +53,11 @@ pub mod pallet { // ------ Storage -------------------------- #[pallet::storage] #[pallet::getter(fn admin_key)] - pub type RewarderKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type RewarderKey = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn pallet_id)] - pub type PalletAccount = StorageValue<_, T::AccountId, ValueQuery>; + pub type PalletAccount = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn total_reward_amount)] @@ -73,7 +73,7 @@ pub mod pallet { #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { - Self { rewarder_key: Default::default() } + Self { rewarder_key: >::get_pallet_id() } } } @@ -110,6 +110,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] @@ -177,7 +178,7 @@ impl Pallet { /// The account ID that holds the funds pub fn account_id() -> AccountIdOf { - >::get() + >::get().unwrap() } /// Set current total reward amount @@ -197,7 +198,7 @@ impl RewardInterface for Pallet { reward: Self::Balance, ) -> Result<(), Self::Error> { let pallet_id = Self::account_id(); - if rewarder_account_id.clone() != RewarderKey::::get() { + if rewarder_account_id.clone() != RewarderKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -221,7 +222,7 @@ impl RewardInterface for Pallet { account_id: &T::AccountId, admin_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != RewarderKey::::get() { + if account_id.clone() != RewarderKey::::get().unwrap() { return Err(Error::::Unauthorized) } diff --git a/pallets/rewards/src/mock.rs b/pallets/rewards/src/mock.rs index 8a37d802..1c8fdd4d 100644 --- a/pallets/rewards/src/mock.rs +++ b/pallets/rewards/src/mock.rs @@ -57,6 +57,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } type Balance = u64; diff --git a/pallets/rewards/src/tests.rs b/pallets/rewards/src/tests.rs index 7dc0c886..7c8cfcfb 100644 --- a/pallets/rewards/src/tests.rs +++ b/pallets/rewards/src/tests.rs @@ -11,7 +11,7 @@ fn reward_funds_works() { assert_ok!(Balances::set_balance( RawOrigin::Root.into(), - PalletAccount::::get(), + PalletAccount::::get().unwrap(), 100, 0 )); @@ -19,7 +19,7 @@ fn reward_funds_works() { System::assert_last_event(Event::Rewards(crate::Event::RewardFunds(2, 10, 1))); - assert_eq!(Balances::free_balance(PalletAccount::::get()), 90); + assert_eq!(Balances::free_balance(PalletAccount::::get().unwrap()), 90); }) } @@ -32,7 +32,7 @@ fn reward_funds_bad_signature() { assert_ok!(Balances::set_balance( RawOrigin::Root.into(), - PalletAccount::::get(), + PalletAccount::::get().unwrap(), 1, 0 )); @@ -56,11 +56,11 @@ fn update_admin_key_works() { ExternalityBuilder::build().execute_with(|| { RewarderKey::::put(2); - assert_eq!(Rewards::admin_key(), 2); + assert_eq!(Rewards::admin_key(), Some(2)); assert_ok!(Rewards::update_admin_key(Origin::signed(2), 1,)); - assert_eq!(Rewards::admin_key(), 1); + assert_eq!(Rewards::admin_key(), Some(1)); }) } @@ -69,6 +69,6 @@ fn sudo_update_admin_key_works() { ExternalityBuilder::build().execute_with(|| { assert_ok!(Rewards::sudo_update_admin_key(Origin::root(), 1)); - assert_eq!(Rewards::admin_key(), 1); + assert_eq!(Rewards::admin_key(), Some(1)); }) } diff --git a/pallets/service-request/Cargo.toml b/pallets/service-request/Cargo.toml index 679b8c70..e1f2134e 100644 --- a/pallets/service-request/Cargo.toml +++ b/pallets/service-request/Cargo.toml @@ -12,26 +12,26 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] # External Dependencies -hex-literal = '0.3.3' -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -scale-info = { version = '1.0', default-features = false, features = ['derive'] } +hex-literal = '0.3.4' +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies labs = { path = '../labs', default-features = false } @@ -47,8 +47,8 @@ primitives-verification-status = { path = '../../primitives/verification-status' primitives-area-code = { path = '../../primitives/area-code', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/service-request/benchmarking/Cargo.toml b/pallets/service-request/benchmarking/Cargo.toml index 4a467f61..b5baa459 100644 --- a/pallets/service-request/benchmarking/Cargo.toml +++ b/pallets/service-request/benchmarking/Cargo.toml @@ -13,26 +13,26 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] # External Dependencies -hex-literal = '0.3.3' -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -scale-info = { version = '1.0', default-features = false, features = ['derive'] } +hex-literal = '0.3.4' +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Pallet Dependencies -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Local Dependencies labs = { path = '../../labs', default-features = false } @@ -49,8 +49,8 @@ primitives-verification-status = { path = '../../../primitives/verification-stat primitives-area-code = { path = '../../../primitives/area-code', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/service-request/benchmarking/src/lib.rs b/pallets/service-request/benchmarking/src/lib.rs index 5f83ca5a..24f8f3de 100644 --- a/pallets/service-request/benchmarking/src/lib.rs +++ b/pallets/service-request/benchmarking/src/lib.rs @@ -66,7 +66,7 @@ benchmarks! { ) retrieve_unstaked_amount { - let caller: T::AccountId = AdminKey::::get(); + let caller: T::AccountId = AdminKey::::get().unwrap(); let customer: T::AccountId = account("customer", 0, SEED); let customer_origin = ::Origin::from(RawOrigin::Signed(customer.clone())); @@ -115,7 +115,7 @@ benchmarks! { let _add_labs = Labs::::register_lab(caller_origin, lab); // verified lab - let admin_key: T::AccountId = LabVerifierKey::::get(); + let admin_key: T::AccountId = LabVerifierKey::::get().unwrap(); let admin_key_origin = ::Origin::from(RawOrigin::Signed(admin_key)); let _verified_labs = Labs::::update_lab_verification_status(admin_key_origin, caller.clone(), VerificationStatus::Verified); @@ -189,7 +189,7 @@ benchmarks! { let _add_lab = Labs::::register_lab(lab_origin.clone(), lab); // verified lab - let admin_key: T::AccountId = LabVerifierKey::::get(); + let admin_key: T::AccountId = LabVerifierKey::::get().unwrap(); let admin_key_origin = ::Origin::from(RawOrigin::Signed(admin_key)); let _verified_labs = Labs::::update_lab_verification_status(admin_key_origin, lab_id.clone(), VerificationStatus::Verified); @@ -215,7 +215,7 @@ benchmarks! { ) finalize_request{ - let caller: T::AccountId = AdminKey::::get(); + let caller: T::AccountId = AdminKey::::get().unwrap(); let lab_id: T::AccountId = account("lab", 0, SEED); let customer_id: T::AccountId = account("customer", 0, SEED); @@ -241,7 +241,7 @@ benchmarks! { let _add_lab = Labs::::register_lab(lab_id_origin.clone(), lab); // verified lab - let admin_key: T::AccountId = LabVerifierKey::::get(); + let admin_key: T::AccountId = LabVerifierKey::::get().unwrap(); let admin_key_origin = ::Origin::from(RawOrigin::Signed(admin_key)); let _verified_labs = Labs::::update_lab_verification_status(admin_key_origin, lab_id.clone(), VerificationStatus::Verified); @@ -291,7 +291,7 @@ benchmarks! { ) update_admin_key { - let caller: T::AccountId = AdminKey::::get(); + let caller: T::AccountId = AdminKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_admin_key( RawOrigin::Signed(caller), diff --git a/pallets/service-request/benchmarking/src/mock.rs b/pallets/service-request/benchmarking/src/mock.rs index 3937bcbc..27758d39 100644 --- a/pallets/service-request/benchmarking/src/mock.rs +++ b/pallets/service-request/benchmarking/src/mock.rs @@ -71,6 +71,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/service-request/src/lib.rs b/pallets/service-request/src/lib.rs index 5d4392cb..28df5a46 100644 --- a/pallets/service-request/src/lib.rs +++ b/pallets/service-request/src/lib.rs @@ -3,7 +3,6 @@ use frame_support::{ codec::{Decode, Encode}, dispatch::DispatchResultWithPostInfo, - log, pallet_prelude::*, scale_info::TypeInfo, sp_runtime::{ @@ -185,20 +184,22 @@ pub mod pallet { #[pallet::genesis_config] pub struct GenesisConfig { - pub admin_key: T::AccountId, + pub admin_key: Option, } #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { - Self { admin_key: Default::default() } + Self { admin_key: None } } } #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { - AdminKey::::put(&self.admin_key); + if let Some(ref admin_key) = self.admin_key { + AdminKey::::put(admin_key); + } } } @@ -243,6 +244,7 @@ pub mod pallet { BadOrigin, CannotLookup, ConsumerRemaining, + TooManyConsumers, NoProviders, Token, Arithmetic, @@ -253,17 +255,18 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::storage] #[pallet::getter(fn admin_key)] - pub type AdminKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type AdminKey = StorageValue<_, T::AccountId, OptionQuery>; /// Get Staking Account Id by Request Id #[pallet::storage] #[pallet::getter(fn staking_account_id_by_request_id)] pub type StakingAccountIdByRequestId = - StorageMap<_, Blake2_128Concat, RequestIdOf, AccountIdOf, ValueQuery>; + StorageMap<_, Blake2_128Concat, RequestIdOf, AccountIdOf, OptionQuery>; /// Get Request by Account Id #[pallet::storage] @@ -587,16 +590,12 @@ impl SeviceRequestInterface for Pallet { sp_runtime::DispatchError::Other(_) => Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => Err(Error::::Arithmetic), }, } } @@ -634,7 +633,7 @@ impl SeviceRequestInterface for Pallet { admin: Self::Admin, request_id: Self::RequestId, ) -> Result { - if admin != AdminKey::::get() { + if admin != AdminKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -684,16 +683,12 @@ impl SeviceRequestInterface for Pallet { sp_runtime::DispatchError::Other(_) => Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => Err(Error::::Arithmetic), }, } } @@ -832,17 +827,14 @@ impl SeviceRequestInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } } else { @@ -869,14 +861,8 @@ impl SeviceRequestInterface for Pallet { sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { - index: _, - error: _, - message: Some(m), - } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => @@ -884,8 +870,7 @@ impl SeviceRequestInterface for Pallet { sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } } @@ -920,7 +905,7 @@ impl SeviceRequestInterface for Pallet { request_id: Self::RequestId, test_result_success: bool, ) -> Result { - if admin != AdminKey::::get() { + if admin != AdminKey::::get().unwrap() { return Err(Error::::Unauthorized) } @@ -960,17 +945,14 @@ impl SeviceRequestInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } } @@ -987,17 +969,14 @@ impl SeviceRequestInterface for Pallet { sp_runtime::DispatchError::Other(_) => return Err(Error::::Other), sp_runtime::DispatchError::CannotLookup => return Err(Error::::CannotLookup), sp_runtime::DispatchError::BadOrigin => return Err(Error::::BadOrigin), - sp_runtime::DispatchError::Module { index: _, error: _, message: Some(m) } => { - log::error!("Module Error: {:?}", m); - return Err(Error::::Module) - }, + sp_runtime::DispatchError::TooManyConsumers => + return Err(Error::::TooManyConsumers), sp_runtime::DispatchError::ConsumerRemaining => return Err(Error::::ConsumerRemaining), sp_runtime::DispatchError::NoProviders => return Err(Error::::NoProviders), sp_runtime::DispatchError::Token(_) => return Err(Error::::Token), sp_runtime::DispatchError::Arithmetic(_) => return Err(Error::::Arithmetic), - sp_runtime::DispatchError::Module { index: _, error: _, message: None } => - return Err(Error::::Arithmetic), + sp_runtime::DispatchError::Module(_) => return Err(Error::::Arithmetic), }, } @@ -1031,7 +1010,7 @@ impl SeviceRequestInterface for Pallet { account_id: &T::AccountId, admin_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != AdminKey::::get() { + if account_id.clone() != AdminKey::::get().unwrap() { return Err(Error::::Unauthorized) } diff --git a/pallets/service-request/src/mock.rs b/pallets/service-request/src/mock.rs index 7438eeb7..7eca69af 100644 --- a/pallets/service-request/src/mock.rs +++ b/pallets/service-request/src/mock.rs @@ -68,6 +68,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/service-request/src/tests.rs b/pallets/service-request/src/tests.rs index 7c9a7df6..58307a7f 100644 --- a/pallets/service-request/src/tests.rs +++ b/pallets/service-request/src/tests.rs @@ -655,7 +655,7 @@ fn cant_create_request_when_balance_not_enough() { String::from("Vaksin").into_bytes(), 10 ), - Error::::Module + Error::::Arithmetic ); }) } @@ -1187,6 +1187,8 @@ fn cant_retrieve_unstake_when_not_unstaked() { #[test] fn cant_finalize_request_when_unauthorized() { ::default().existential_deposit(0).build().execute_with(|| { + AdminKey::::put(2); + assert_noop!( ServiceRequest::finalize_request( Origin::signed(1), @@ -1441,10 +1443,10 @@ fn update_admin_key_works() { ::default().existential_deposit(0).build().execute_with(|| { AdminKey::::put(2); - assert_eq!(ServiceRequest::admin_key(), 2); + assert_eq!(ServiceRequest::admin_key(), Some(2)); assert_ok!(ServiceRequest::update_admin_key(Origin::signed(2), 1,)); - assert_eq!(ServiceRequest::admin_key(), 1); + assert_eq!(ServiceRequest::admin_key(), Some(1)); }) } diff --git a/pallets/services/Cargo.toml b/pallets/services/Cargo.toml index 0e62c56a..7885e5d6 100644 --- a/pallets/services/Cargo.toml +++ b/pallets/services/Cargo.toml @@ -11,19 +11,13 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } traits-services = { path = './traits', default-features = false } @@ -31,9 +25,9 @@ primitives-duration = { path = '../../primitives/duration', default-features = f primitives-price-and-currency = { path = '../../primitives/price-and-currency', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +serde = { default-features = false, version = "1.0.136" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/services/benchmarking/Cargo.toml b/pallets/services/benchmarking/Cargo.toml index b17bcaa3..1a5c8e7a 100644 --- a/pallets/services/benchmarking/Cargo.toml +++ b/pallets/services/benchmarking/Cargo.toml @@ -11,24 +11,18 @@ license = 'Unlicense' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } labs = { path = '../../labs', default-features = false } services = { path = '../../services', default-features = false } @@ -41,7 +35,7 @@ primitives-price-and-currency = { path = '../../../primitives/price-and-currency traits-services = { path = '../../services/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/services/benchmarking/src/mock.rs b/pallets/services/benchmarking/src/mock.rs index 13bddf14..199e3961 100644 --- a/pallets/services/benchmarking/src/mock.rs +++ b/pallets/services/benchmarking/src/mock.rs @@ -67,6 +67,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/services/src/lib.rs b/pallets/services/src/lib.rs index 872346ed..40fa17c8 100644 --- a/pallets/services/src/lib.rs +++ b/pallets/services/src/lib.rs @@ -108,6 +108,7 @@ pub mod pallet { // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::hooks] diff --git a/pallets/services/tests/Cargo.toml b/pallets/services/tests/Cargo.toml index b7c58b46..318f56ae 100644 --- a/pallets/services/tests/Cargo.toml +++ b/pallets/services/tests/Cargo.toml @@ -14,24 +14,24 @@ targets = ['x86_64-unknown-linux-gnu'] # alias "parity-scale-code" to "codec" [dependencies] # External Dependencies -scale-info = { version = '1.0', default-features = false, features = ['derive'] } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } # Substrate packages ## Substrate Primitive Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } ## Substrate Frame Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } ## Substrate Pallet Dependencies -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-randomness-collective-flip = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.18" } # Local Dependencies labs = { path = '../../labs', default-features = false } @@ -52,7 +52,7 @@ traits-certifications = { path = '../../certifications/traits', default-features traits-genetic-testing = { path = '../../genetic-testing/traits', default-features = false } [dev-dependencies] -serde = { default-features = false, version = "1.0.130" } +serde = { default-features = false, version = "1.0.136" } [features] default = ['std'] diff --git a/pallets/services/tests/src/mock.rs b/pallets/services/tests/src/mock.rs index 6d25e79d..cf7b1227 100644 --- a/pallets/services/tests/src/mock.rs +++ b/pallets/services/tests/src/mock.rs @@ -63,6 +63,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } pub type Moment = u64; diff --git a/pallets/services/traits/Cargo.toml b/pallets/services/traits/Cargo.toml index 09a8afe5..3237b8f5 100644 --- a/pallets/services/traits/Cargo.toml +++ b/pallets/services/traits/Cargo.toml @@ -5,20 +5,14 @@ authors = ["Kevin "] edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } primitives-price-and-currency = { path = '../../../primitives/price-and-currency', default-features = false } diff --git a/pallets/user-profile/Cargo.toml b/pallets/user-profile/Cargo.toml index ab5aa581..5e640db3 100644 --- a/pallets/user-profile/Cargo.toml +++ b/pallets/user-profile/Cargo.toml @@ -8,27 +8,21 @@ license = 'AGPL-3.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -serde = { default-features = false, version = "1.0.130", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +serde = { default-features = false, version = "1.0.136", features = ["derive"] } rustc-hex = { version = "2.1.0", default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } traits-user-profile = { path = './traits', default-features = false } [dev-dependencies] -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/user-profile/src/benchmarking.rs b/pallets/user-profile/src/benchmarking.rs index a8a6a97c..4cd2ce93 100644 --- a/pallets/user-profile/src/benchmarking.rs +++ b/pallets/user-profile/src/benchmarking.rs @@ -22,7 +22,7 @@ benchmarks! { admin_set_eth_address { let eth_address = T::EthereumAddress::default(); - let caller: T::AccountId = AdminKey::::get(); + let caller: T::AccountId = AdminKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: admin_set_eth_address( RawOrigin::Signed(caller), @@ -31,7 +31,7 @@ benchmarks! { ) update_admin_key { - let caller: T::AccountId = AdminKey::::get(); + let caller: T::AccountId = AdminKey::::get().unwrap(); let caller2: T::AccountId = whitelisted_caller(); }: update_admin_key( RawOrigin::Signed(caller), diff --git a/pallets/user-profile/src/lib.rs b/pallets/user-profile/src/lib.rs index 51ffe39d..4b37e687 100644 --- a/pallets/user-profile/src/lib.rs +++ b/pallets/user-profile/src/lib.rs @@ -59,26 +59,29 @@ pub mod pallet { #[pallet::genesis_config] pub struct GenesisConfig { - pub admin_key: T::AccountId, + pub admin_key: Option, } #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { - Self { admin_key: Default::default() } + Self { admin_key: None } } } #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { - AdminKey::::put(&self.admin_key); + if let Some(ref admin_key) = self.admin_key { + AdminKey::::put(admin_key); + } } } // ----- This is template code, every pallet needs this --- #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(PhantomData); #[pallet::hooks] @@ -92,7 +95,7 @@ pub mod pallet { // ----- Storage ------------------ #[pallet::storage] #[pallet::getter(fn admin_key)] - pub type AdminKey = StorageValue<_, T::AccountId, ValueQuery>; + pub type AdminKey = StorageValue<_, T::AccountId, OptionQuery>; #[pallet::storage] #[pallet::getter(fn eth_address_by_account_id)] @@ -165,7 +168,7 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { let admin = ensure_signed(origin)?; - ensure!(admin == AdminKey::::get(), Error::::Unauthorized); + ensure!(admin == AdminKey::::get().unwrap(), Error::::Unauthorized); >>::set_eth_address_by_account_id( &account_id, @@ -231,7 +234,7 @@ impl UserProfileInterface> for Pallet { account_id: &T::AccountId, admin_key: &T::AccountId, ) -> Result<(), Self::Error> { - if account_id.clone() != AdminKey::::get() { + if account_id.clone() != AdminKey::::get().unwrap() { return Err(Error::::Unauthorized) } diff --git a/pallets/user-profile/src/mock.rs b/pallets/user-profile/src/mock.rs index 70d5b58b..3d1833ab 100644 --- a/pallets/user-profile/src/mock.rs +++ b/pallets/user-profile/src/mock.rs @@ -58,6 +58,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl user_profile::Config for Test { diff --git a/pallets/user-profile/src/tests.rs b/pallets/user-profile/src/tests.rs index ad887e6a..260fc27b 100644 --- a/pallets/user-profile/src/tests.rs +++ b/pallets/user-profile/src/tests.rs @@ -43,6 +43,8 @@ fn admin_set_eth_address() { #[test] fn cant_set_eth_address_when_not_admin() { ExternalityBuilder::build().execute_with(|| { + AdminKey::::put(2); + assert_noop!( UserProfile::admin_set_eth_address(Origin::signed(1), 2, EthereumAddress([b'X'; 20])), Error::::Unauthorized @@ -74,11 +76,11 @@ fn update_admin_key_works() { ExternalityBuilder::build().execute_with(|| { AdminKey::::put(2); - assert_eq!(UserProfile::admin_key(), 2); + assert_eq!(UserProfile::admin_key(), Some(2)); assert_ok!(UserProfile::update_admin_key(Origin::signed(2), 1,)); - assert_eq!(UserProfile::admin_key(), 1); + assert_eq!(UserProfile::admin_key(), Some(1)); }) } @@ -87,6 +89,6 @@ fn sudo_update_admin_key_works() { ExternalityBuilder::build().execute_with(|| { assert_ok!(UserProfile::sudo_update_admin_key(Origin::root(), 1)); - assert_eq!(UserProfile::admin_key(), 1); + assert_eq!(UserProfile::admin_key(), Some(1)); }) } diff --git a/pallets/user-profile/traits/Cargo.toml b/pallets/user-profile/traits/Cargo.toml index 7d8800c0..08c31730 100644 --- a/pallets/user-profile/traits/Cargo.toml +++ b/pallets/user-profile/traits/Cargo.toml @@ -4,18 +4,12 @@ version = "2.1.0" authors = ["Kevin "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/primitives/area-code/Cargo.toml b/primitives/area-code/Cargo.toml index ceddc559..2ae61609 100644 --- a/primitives/area-code/Cargo.toml +++ b/primitives/area-code/Cargo.toml @@ -4,17 +4,11 @@ version = "2.1.0" authors = ["Agustinus Theodorus "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/primitives/availability-status/Cargo.toml b/primitives/availability-status/Cargo.toml index e24ed670..cb2fda99 100644 --- a/primitives/availability-status/Cargo.toml +++ b/primitives/availability-status/Cargo.toml @@ -4,16 +4,10 @@ version = "2.1.0" authors = ["Agustinus Theodorus "] edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/primitives/duration/Cargo.toml b/primitives/duration/Cargo.toml index 716e58c2..37d9b460 100644 --- a/primitives/duration/Cargo.toml +++ b/primitives/duration/Cargo.toml @@ -4,16 +4,10 @@ version = "2.1.0" authors = ["Agustinus Theodorus "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/primitives/price-and-currency/Cargo.toml b/primitives/price-and-currency/Cargo.toml index 9df54340..123c85f7 100644 --- a/primitives/price-and-currency/Cargo.toml +++ b/primitives/price-and-currency/Cargo.toml @@ -4,17 +4,11 @@ version = "2.1.0" authors = ["Agustinus Theodorus "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/primitives/stake-status/Cargo.toml b/primitives/stake-status/Cargo.toml index 603b7710..9c356a56 100644 --- a/primitives/stake-status/Cargo.toml +++ b/primitives/stake-status/Cargo.toml @@ -4,16 +4,10 @@ version = "2.1.0" authors = ["Agustinus Theodorus "] edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/primitives/tracking-id/Cargo.toml b/primitives/tracking-id/Cargo.toml index 801fd65b..201f0aaf 100644 --- a/primitives/tracking-id/Cargo.toml +++ b/primitives/tracking-id/Cargo.toml @@ -4,17 +4,11 @@ version = "2.1.0" authors = ["Agustinus Theodorus "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/primitives/verification-status/Cargo.toml b/primitives/verification-status/Cargo.toml index 4598c813..1dfcdef1 100644 --- a/primitives/verification-status/Cargo.toml +++ b/primitives/verification-status/Cargo.toml @@ -4,16 +4,10 @@ version = "2.1.0" authors = ["Agustinus Theodorus "] edition = '2021' -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - [dependencies] -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index dfed512c..6a5dcc98 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -11,63 +11,64 @@ repository = 'https://github.com/debionetwork/debio-node' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' } [dependencies] # External Dependencies -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -scale-info = { version = '1.0', default-features = false, features = ['derive'] } +codec = { package = 'parity-scale-codec', version = '3.0.0', default-features = false, features = ['derive'] } +scale-info = { version = '2.0.1', default-features = false, features = ['derive'] } hex-literal = { version = '0.3.4', optional = true } log = { version = '0.4.14', default-features = false } +static_assertions = '1.1.0' # Substrate Dependencies ## Substrate Primitive Dependencies -beefy-primitives = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-consensus-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-staking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +beefy-primitives = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-consensus-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-staking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } ## Substrate Frame Dependencies -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } ## Substrate Pallet Dependencies -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-beefy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-beefy-mmr = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-im-online = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-mmr = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-mmr-primitives = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false, features = ['historical'] } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } -pallet-uniques = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-beefy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-beefy-mmr = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-im-online = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-mmr = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-mmr-primitives = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false, features = ['historical'] } +pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } +pallet-uniques = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', default-features = false } # Octopus Dependencies ## Octopus Pallet Dependencies -pallet-octopus-appchain = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.13', default-features = false } -pallet-octopus-lpos = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.13', default-features = false } -pallet-octopus-upward-messages = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.13', default-features = false } +pallet-octopus-appchain = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.18', default-features = false } +pallet-octopus-lpos = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.18', default-features = false } +pallet-octopus-upward-messages = { git = 'https://github.com/octopus-network/octopus-pallets.git', branch = 'release-v0.9.18', default-features = false } # Local Pallet labs = { path = '../pallets/labs', default-features = false } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 302c8b4f..d42fc165 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -7,13 +7,23 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use beefy_primitives::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion}; -use sp_api::impl_runtime_apis; -use sp_consensus_babe::{ - AllowedSlots::PrimaryAndSecondaryVRFSlots, BabeEpochConfiguration, BabeGenesisConfiguration, - Epoch, EquivocationProof, OpaqueKeyOwnershipProof, Slot, +use frame_support::{ + construct_runtime, parameter_types, + traits::{ConstU128, ConstU16, Everything, KeyOwnerProofSystem}, + weights::{ + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + DispatchClass, IdentityFee, Weight, + }, + PalletId, +}; +use frame_system::{ + limits::{BlockLength, BlockWeights}, + offchain, ChainContext, CheckEra, CheckGenesis, CheckNonZeroSender, CheckNonce, + CheckSpecVersion, CheckTxVersion, CheckWeight, EnsureRoot, }; +use sp_api::impl_runtime_apis; +use sp_consensus_babe::{AllowedSlots::PrimaryAndSecondaryVRFSlots, BabeEpochConfiguration}; use sp_core::{crypto::KeyTypeId, sr25519, Decode, Encode, OpaqueMetadata, RuntimeDebug, H256}; -use sp_inherents::{CheckInherentsResult, InherentData}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ @@ -22,7 +32,7 @@ use sp_runtime::{ Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedPointNumber, MultiAddress, MultiSignature, Perbill, Perquintill, + ApplyExtrinsicResult, MultiAddress, MultiSignature, Perbill, }; use sp_staking::SessionIndex; use sp_std::prelude::*; @@ -30,21 +40,6 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use frame_support::{ - construct_runtime, parameter_types, - traits::{Everything, KeyOwnerProofSystem}, - weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - DispatchClass, IdentityFee, Weight, - }, - PalletId, -}; -use frame_system::{ - limits::{BlockLength, BlockWeights}, - offchain, ChainContext, CheckEra, CheckGenesis, CheckNonce, CheckSpecVersion, CheckTxVersion, - CheckWeight, EnsureRoot, -}; - use pallet_babe::{ AuthorityId as BabeId, EquivocationHandler as BabeEquivocationHandler, ExternalTrigger, }; @@ -56,13 +51,11 @@ use pallet_grandpa::{ }; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_mmr_primitives as mmr; -use pallet_octopus_appchain::AuthorityId as OctopusId; +use pallet_octopus_appchain::sr25519::AuthorityId as OctopusId; use pallet_octopus_lpos::{EraIndex, ExposureOf}; use pallet_session::{historical as pallet_session_historical, FindAccountFromAuthorIndex}; use pallet_session_historical::NoteHistoricalRoot; -use pallet_transaction_payment::{ - ChargeTransactionPayment, CurrencyAdapter, Multiplier, TargetedFeeAdjustment, -}; +use pallet_transaction_payment::{ChargeTransactionPayment, CurrencyAdapter}; use scale_info::TypeInfo; @@ -89,6 +82,7 @@ pub type Header = generic::Header; pub type Block = generic::Block; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( + CheckNonZeroSender, CheckSpecVersion, CheckTxVersion, CheckGenesis, @@ -102,15 +96,55 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. -pub type Executive = - frame_executive::Executive, Runtime, AllPallets>; -pub type ClassId = u32; -pub type InstanceId = u32; +pub type Executive = frame_executive::Executive< + Runtime, + Block, + ChainContext, + Runtime, + AllPalletsWithSystem, +>; +pub type ClassId = u128; +pub type InstanceId = u128; pub type OctopusAssetId = u32; pub type OctopusAssetBalance = u128; pub struct OctopusAppCrypto; +#[cfg(feature = "runtime-benchmarks")] +#[macro_use] +extern crate frame_benchmarking; + +#[cfg(feature = "runtime-benchmarks")] +mod benches { + define_benchmarks!( + [frame_benchmarking, BaselineBench::] + [frame_system, SystemBench::] + [electronic_medical_record, ElectronicMedicalRecord] + [hospitals, Hospitals] + [doctors, Doctors] + [genetic_data, GeneticData] + [electronic_medical_record, ElectronicMedicalRecord] + [hospitals, Hospitals] + [doctors, Doctors] + [user_profile, UserProfile] + [rewards, Rewards] + [genetic_data, GeneticData] + [labs_benchmarking, LabsBench::] + [services_benchmarking, ServicesBench::] + [certifications_benchmarking, CertificationsBench::] + [orders_benchmarking, OrdersBench::] + [hospital_certifications_benchmarking, HospitalCertificationsBench::] + [doctor_certifications_benchmarking, DoctorCertificationsBench::] + [genetic_analysts_benchmarking, GeneticAnalystsBench::] + [genetic_analyst_services_benchmarking, GeneticAnalystServicesBench::] + [genetic_analyst_qualifications_benchmarking, GeneticAnalystQualificationsBench::] + [service_request_benchmarking, ServiceRequestBench::] + [genetic_testing_benchmarking, GeneticTestingBench::] + [genetic_analysis_orders_benchmarking, GeneticAnalysisOrdersBench::] + [genetic_analysis_benchmarking, GeneticAnalysisBench::] + ); +} + /// Ethereum Address type #[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Default, RuntimeDebug, TypeInfo)] pub struct EthereumAddress([u8; 20]); @@ -173,10 +207,11 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 2012, + spec_version: 2015, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, + state_version: 1, }; /// Since BABE is probabilistic this is the average expected block time that @@ -260,7 +295,6 @@ parameter_types! { .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) .build_or_panic(); pub const BlockHashCount: BlockNumber = 2400; - pub const SS58Prefix: u16 = 42; pub const Version: RuntimeVersion = VERSION; } @@ -310,9 +344,10 @@ impl frame_system::Config for Runtime { /// Weight information for the extrinsics of this pallet. type SystemWeightInfo = (); /// This is used as an identifier of the chain. 42 is the generic substrate prefix. - type SS58Prefix = SS58Prefix; + type SS58Prefix = ConstU16<42>; /// The set code logic, just the default since we're not a parachain. type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl offchain::SigningTypes for Runtime { @@ -351,6 +386,7 @@ where let current_block = System::block_number().saturated_into::().saturating_sub(1); let era = generic::Era::mortal(period, current_block); let extra = ( + CheckNonZeroSender::::new(), CheckSpecVersion::::new(), CheckTxVersion::::new(), CheckGenesis::::new(), @@ -418,7 +454,7 @@ parameter_types! { } impl pallet_balances::Config for Runtime { - type AccountStore = System; + type AccountStore = frame_system::Pallet; type Balance = Balance; type DustRemoval = (); type Event = Event; @@ -432,14 +468,10 @@ impl pallet_balances::Config for Runtime { parameter_types! { pub const OperationalFeeMultiplier: u8 = 5; pub const TransactionByteFee: Balance = currency::BYTE_FEE; - pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); - pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(1, 100_000); - pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000); } impl pallet_transaction_payment::Config for Runtime { - type FeeMultiplierUpdate = - TargetedFeeAdjustment; + type FeeMultiplierUpdate = (); type OnChargeTransaction = CurrencyAdapter; type OperationalFeeMultiplier = OperationalFeeMultiplier; type TransactionByteFee = TransactionByteFee; @@ -455,7 +487,7 @@ parameter_types! { pub const ValueLimit: u32 = 256; } -impl pallet_uniques::Config for Runtime { +impl pallet_uniques::Config for Runtime { type AttributeDepositBase = MetadataDepositBase; type ClassDeposit = ClassDeposit; type ClassId = ClassId; @@ -486,6 +518,7 @@ impl pallet_assets::Config for Runtime { type AssetId = OctopusAssetId; type Currency = Balances; type ForceOrigin = EnsureRoot; + type AssetAccountDeposit = ConstU128<{ currency::DOLLARS }>; type AssetDeposit = AssetDeposit; type MetadataDepositBase = MetadataDepositBase; type MetadataDepositPerByte = MetadataDepositPerByte; @@ -506,16 +539,21 @@ parameter_types! { impl pallet_octopus_appchain::Config for Runtime { type Assets = OctopusAssets; type AssetBalance = OctopusAssetBalance; + type AssetIdByTokenId = OctopusAppchain; type AssetId = OctopusAssetId; - type AssetIdByName = OctopusAppchain; - type AuthorityId = OctopusAppCrypto; + type AuthorityId = OctopusId; + type AppCrypto = OctopusAppCrypto; type Call = Call; + type ClassId = ClassId; + type Convertor = (); type Currency = Balances; type Event = Event; type GracePeriod = GracePeriod; + type InstanceId = InstanceId; type LposInterface = OctopusLpos; type PalletId = OctopusAppchainPalletId; type RequestEventLimit = RequestEventLimit; + type Uniques = OctopusUniques; type UnsignedPriority = UnsignedPriority; type UpwardMessagesInterface = OctopusUpwardMessages; type WeightInfo = (); @@ -828,7 +866,7 @@ construct_runtime!( Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, - Uniques: pallet_uniques::{Call, Event, Pallet, Storage}, + OctopusUniques: pallet_uniques::::{Call, Event, Pallet, Storage}, OctopusAssets: pallet_assets::::{Call, Config, Event, Pallet, Storage}, OctopusAppchain: pallet_octopus_appchain::{Call, Config, Event, Pallet, Storage, ValidateUnsigned}, OctopusLpos: pallet_octopus_lpos::{Call, Config, Event, Pallet, Storage}, @@ -896,11 +934,14 @@ impl_runtime_apis! { Executive::finalize_block() } - fn inherent_extrinsics(data: InherentData) -> Vec<::Extrinsic> { + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { data.create_extrinsics() } - fn check_inherents(block: Block, data: InherentData) -> CheckInherentsResult { + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { data.check_extrinsics(&block) } } @@ -922,13 +963,13 @@ impl_runtime_apis! { } impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> BabeGenesisConfiguration { + fn configuration() -> sp_consensus_babe::BabeGenesisConfiguration { // The choice of `c` parameter (where `1 - c` represents the // probability of a slot being empty), is done in accordance to the // slot duration and expected target block time, for safely // resisting network delays of maximum two seconds. // - BabeGenesisConfiguration { + sp_consensus_babe::BabeGenesisConfiguration { slot_duration: Babe::slot_duration(), epoch_length: EpochDuration::get(), c: BABE_GENESIS_EPOCH_CONFIG.c, @@ -938,29 +979,39 @@ impl_runtime_apis! { } } - fn current_epoch_start() -> Slot { + fn current_epoch_start() -> sp_consensus_babe::Slot { Babe::current_epoch_start() } - fn current_epoch() -> Epoch { + fn current_epoch() -> sp_consensus_babe::Epoch { Babe::current_epoch() } - fn next_epoch() -> Epoch { + fn next_epoch() -> sp_consensus_babe::Epoch { Babe::next_epoch() } - fn generate_key_ownership_proof(_slot: Slot, authority_id: BabeId) -> Option { - Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id)).map(|p| p.encode()).map(OpaqueKeyOwnershipProof::new) + fn generate_key_ownership_proof( + _slot: sp_consensus_babe::Slot, + authority_id: sp_consensus_babe::AuthorityId, + ) -> Option { + use codec::Encode; + + Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(sp_consensus_babe::OpaqueKeyOwnershipProof::new) } fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: EquivocationProof<::Header>, - key_owner_proof: OpaqueKeyOwnershipProof, + equivocation_proof: sp_consensus_babe::EquivocationProof<::Header>, + key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof, ) -> Option<()> { let key_owner_proof = key_owner_proof.decode()?; - Babe::submit_unsigned_equivocation_report(equivocation_proof, key_owner_proof) + Babe::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) } } @@ -969,7 +1020,9 @@ impl_runtime_apis! { opaque::SessionKeys::generate(seed) } - fn decode_session_keys(encoded: Vec) -> Option, KeyTypeId)>> { + fn decode_session_keys( + encoded: Vec, + ) -> Option, KeyTypeId)>> { opaque::SessionKeys::decode_into_raw_public_keys(&encoded) } } @@ -984,25 +1037,29 @@ impl_runtime_apis! { } fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof<::Hash, NumberFor>, + equivocation_proof: fg_primitives::EquivocationProof< + ::Hash, + NumberFor, + >, key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, ) -> Option<()> { let key_owner_proof = key_owner_proof.decode()?; - Grandpa::submit_unsigned_equivocation_report(equivocation_proof, key_owner_proof) + Grandpa::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) } fn generate_key_ownership_proof( _set_id: fg_primitives::SetId, authority_id: GrandpaId, ) -> Option { - Historical::prove((fg_primitives::KEY_TYPE, authority_id)).map(|p| p.encode()).map(fg_primitives::OpaqueKeyOwnershipProof::new) - } - } + use codec::Encode; - impl beefy_primitives::BeefyApi for Runtime { - fn validator_set() -> beefy_primitives::ValidatorSet { - Beefy::validator_set() + Historical::prove((fg_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(fg_primitives::OpaqueKeyOwnershipProof::new) } } @@ -1019,34 +1076,49 @@ impl_runtime_apis! { ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { TransactionPayment::query_info(uxt, len) } - - fn query_fee_details(uxt: ::Extrinsic, len: u32) -> pallet_transaction_payment::FeeDetails { + fn query_fee_details( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { TransactionPayment::query_fee_details(uxt, len) } } - impl pallet_mmr_primitives::MmrApi for Runtime { - fn generate_proof(leaf_index: u64) -> Result<(mmr::EncodableOpaqueLeaf, mmr::Proof), mmr::Error> { - Mmr::generate_proof(leaf_index).map(|(leaf, proof)| (mmr::EncodableOpaqueLeaf::from_leaf(&leaf), proof)) + impl beefy_primitives::BeefyApi for Runtime { + fn validator_set() -> Option> { + Beefy::validator_set() } + } - fn verify_proof(leaf: mmr::EncodableOpaqueLeaf, proof: mmr::Proof) -> Result<(), mmr::Error> { - pub type Leaf = <::LeafData as mmr::LeafDataProvider>::LeafData; - - let leaf: Leaf = leaf.into_opaque_leaf().try_decode().ok_or(mmr::Error::Verify)?; + impl pallet_mmr_primitives::MmrApi for Runtime { + fn generate_proof(leaf_index: u64) + -> Result<(mmr::EncodableOpaqueLeaf, mmr::Proof), mmr::Error> + { + Mmr::generate_proof(leaf_index) + .map(|(leaf, proof)| (mmr::EncodableOpaqueLeaf::from_leaf(&leaf), proof)) + } + fn verify_proof(leaf: mmr::EncodableOpaqueLeaf, proof: mmr::Proof) + -> Result<(), mmr::Error> + { + pub type Leaf = < + ::LeafData as mmr::LeafDataProvider + >::LeafData; + + let leaf: Leaf = leaf + .into_opaque_leaf() + .try_decode() + .ok_or(mmr::Error::Verify)?; Mmr::verify_leaf(leaf, proof) } fn verify_proof_stateless( root: Hash, leaf: mmr::EncodableOpaqueLeaf, - proof: mmr::Proof, + proof: mmr::Proof ) -> Result<(), mmr::Error> { type MmrHashing = ::Hashing; - let node = mmr::DataOrHash::Data(leaf.into_opaque_leaf()); - pallet_mmr::verify_leaf_proof::(root, node, proof) } } @@ -1057,9 +1129,10 @@ impl_runtime_apis! { Vec, Vec, ) { - use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList}; - use frame_benchmarking::baseline::Pallet as BaselineBench; + use frame_benchmarking::{baseline, Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use frame_system_benchmarking::Pallet as SystemBench; + use baseline::Pallet as BaselineBench; // Local Pallets use services_benchmarking::Pallet as ServicesBench; @@ -1077,29 +1150,7 @@ impl_runtime_apis! { use genetic_analysis_orders_benchmarking::Pallet as GeneticAnalysisOrdersBench; let mut list = Vec::::new(); - - list_benchmark!(list, extra, frame_benchmarking, BaselineBench::); - - // Local Pallets - list_benchmark!(list, extra, labs, LabsBench::); - list_benchmark!(list, extra, services, ServicesBench::); - list_benchmark!(list, extra, certifications, CertificationsBench::); - list_benchmark!(list, extra, orders, OrdersBench::); - list_benchmark!(list, extra, electronic_medical_record, ElectronicMedicalRecord); - list_benchmark!(list, extra, hospitals, Hospitals); - list_benchmark!(list, extra, hospital_certifications, HospitalCertificationsBench::); - list_benchmark!(list, extra, doctors, Doctors); - list_benchmark!(list, extra, doctor_certifications, DoctorCertificationsBench::); - list_benchmark!(list, extra, genetic_analysts, GeneticAnalystsBench::); - list_benchmark!(list, extra, genetic_analyst_services, GeneticAnalystServicesBench::); - list_benchmark!(list, extra, genetic_analyst_qualifications, GeneticAnalystQualificationsBench::); - list_benchmark!(list, extra, user_profile, UserProfile); - list_benchmark!(list, extra, rewards, Rewards); - list_benchmark!(list, extra, service_request, ServiceRequestBench::); - list_benchmark!(list, extra, genetic_data, GeneticData); - list_benchmark!(list, extra, genetic_testing, GeneticTestingBench::); - list_benchmark!(list, extra, genetic_analysis_orders, GeneticAnalysisOrdersBench::); - list_benchmark!(list, extra, genetic_analysis, GeneticAnalysisBench::); + list_benchmarks!(list, extra); let storage_info = AllPalletsWithSystem::storage_info(); @@ -1109,8 +1160,9 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{add_benchmark, Benchmarking, BenchmarkBatch, TrackedStorageKey}; - use frame_benchmarking::baseline::Pallet as BaselineBench; + use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey}; + use frame_system_benchmarking::Pallet as SystemBench; + use baseline::Pallet as BaselineBench; // Local Pallets use services_benchmarking::Pallet as ServicesBench; @@ -1127,7 +1179,8 @@ impl_runtime_apis! { use orders_benchmarking::Pallet as OrdersBench; use genetic_analysis_orders_benchmarking::Pallet as GeneticAnalysisOrdersBench; - impl frame_benchmarking::baseline::Config for Runtime {} + impl frame_system_benchmarking::Config for Runtime {} + impl baseline::Config for Runtime {} // Local Pallets impl services_benchmarking::Config for Runtime {} @@ -1159,31 +1212,24 @@ impl_runtime_apis! { let mut batches = Vec::::new(); let params = (&config, &whitelist); + add_benchmarks!(params, batches); - add_benchmark!(params, batches, frame_benchmarking, BaselineBench::); + Ok(batches) + } + } - // Local Pallets - add_benchmark!(params, batches, labs, LabsBench::); - add_benchmark!(params, batches, services, ServicesBench::); - add_benchmark!(params, batches, certifications, CertificationsBench::); - add_benchmark!(params, batches, orders, OrdersBench::); - add_benchmark!(params, batches, electronic_medical_record, ElectronicMedicalRecord); - add_benchmark!(params, batches, hospitals, Hospitals); - add_benchmark!(params, batches, hospital_certifications, HospitalCertificationsBench::); - add_benchmark!(params, batches, doctors, Doctors); - add_benchmark!(params, batches, doctor_certifications, DoctorCertificationsBench::); - add_benchmark!(params, batches, genetic_analysts, GeneticAnalystsBench::); - add_benchmark!(params, batches, genetic_analyst_services, GeneticAnalystServicesBench::); - add_benchmark!(params, batches, genetic_analyst_qualifications, GeneticAnalystQualificationsBench::); - add_benchmark!(params, batches, user_profile, UserProfile); - add_benchmark!(params, batches, rewards, Rewards); - add_benchmark!(params, batches, genetic_data, GeneticData); - add_benchmark!(params, batches, genetic_testing, GeneticTestingBench::); - add_benchmark!(params, batches, genetic_analysis, GeneticAnalysisBench::); - add_benchmark!(params, batches, service_request, ServiceRequestBench::); - add_benchmark!(params, batches, genetic_analysis_orders, GeneticAnalysisOrdersBench::); + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade() -> (Weight, Weight) { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. If any of the pre/post migration checks fail, we shall stop + // right here and right now. + let weight = Executive::try_runtime_upgrade().unwrap(); + (weight, BlockWeights::get().max_block) + } - Ok(batches) + fn execute_block_no_check(block: Block) -> Weight { + Executive::execute_block_no_check(block) } } }