diff --git a/Cargo.lock b/Cargo.lock index cffc59e46..9d33763dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,7 +12,7 @@ dependencies = [ [[package]] name = "adding-machine" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -72,9 +72,9 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6757ed5faa82ccfbfa1837cd7a7a2e1bdb634236f21fa74d6c5c5736152838a1" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -103,7 +103,7 @@ checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" [[package]] name = "api-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-executive", "frame-support", @@ -196,8 +196,8 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" dependencies = [ - "quote 1.0.3", - "syn 1.0.18", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -279,7 +279,7 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "babe-grandpa-node" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "babe-grandpa-runtime", "ctrlc", @@ -291,8 +291,8 @@ dependencies = [ "parking_lot 0.9.0", "sc-basic-authorship", "sc-cli", - "sc-client", "sc-client-api", + "sc-consensus", "sc-consensus-babe", "sc-executor", "sc-finality-grandpa", @@ -316,7 +316,7 @@ dependencies = [ [[package]] name = "babe-grandpa-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-executive", "frame-support", @@ -361,9 +361,9 @@ dependencies = [ [[package]] name = "backtrace-sys" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78848718ee1255a2485d1309ad9cdecfc2e7d0362dd11c6829364c6b35ae1bc7" +checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399" dependencies = [ "cc", "libc", @@ -383,7 +383,7 @@ checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "basic-pow" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "futures 0.3.4", "log", @@ -391,8 +391,8 @@ dependencies = [ "rand 0.7.3", "sc-basic-authorship", "sc-cli", - "sc-client", "sc-client-api", + "sc-consensus", "sc-consensus-pow", "sc-executor", "sc-network", @@ -409,13 +409,13 @@ dependencies = [ "sp-transaction-pool", "structopt", "substrate-build-script-utils", - "super-runtime", "vergen", + "weight-fee-runtime", ] [[package]] name = "basic-token" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -441,8 +441,8 @@ dependencies = [ "lazycell", "log", "peeking_take_while", - "proc-macro2 1.0.10", - "quote 1.0.3", + "proc-macro2 1.0.12", + "quote 1.0.4", "regex", "rustc-hash", "shlex", @@ -647,7 +647,7 @@ dependencies = [ [[package]] name = "charity" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -662,7 +662,7 @@ dependencies = [ [[package]] name = "check-membership" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -674,7 +674,7 @@ dependencies = [ [[package]] name = "child-trie" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -741,7 +741,7 @@ dependencies = [ [[package]] name = "compounding-interest" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -776,7 +776,7 @@ dependencies = [ [[package]] name = "constant-config" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -911,7 +911,7 @@ dependencies = [ [[package]] name = "currency-imbalances" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -942,7 +942,7 @@ checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" [[package]] name = "default-instance" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -972,9 +972,9 @@ version = "0.99.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -1004,7 +1004,7 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "double-map" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -1072,36 +1072,9 @@ dependencies = [ "serde", ] -[[package]] -name = "ethbloom" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7abcddbdd5db30aeed4deb586adc4824e6c247e2f7238d1187f752893f096b" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde 0.3.0", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "964c23cdee0ca07d5be2a628b46d5c11a2134ce554a8c16d8dbc2db647e4fd4d" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-rlp", - "impl-serde 0.3.0", - "primitive-types", - "uint", -] - [[package]] name = "execution-schedule" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -1124,9 +1097,9 @@ dependencies = [ [[package]] name = "failure" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" dependencies = [ "backtrace", "failure_derive", @@ -1134,13 +1107,13 @@ dependencies = [ [[package]] name = "failure_derive" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "synstructure", ] @@ -1161,10 +1134,11 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.11.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024517816630be5204eba201e8d1d405042b1255a5e0e3f298b054fc24d59e1d" +checksum = "1f4682570188cd105606e621b9992e580f717c15f8cd1b7d106b59f1c6e54680" dependencies = [ + "either", "futures 0.3.4", "futures-timer 2.0.2", "log", @@ -1175,9 +1149,9 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32529fc42e86ec06e5047092082aab9ad459b070c5d2a76b14f4f5ce70bf2e84" +checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" dependencies = [ "byteorder", "rand 0.7.3", @@ -1187,7 +1161,7 @@ dependencies = [ [[package]] name = "fixed-point" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -1227,18 +1201,18 @@ checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "fork-tree" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4492b78f0aec7271d261e0f1025297012c7853c263e036d15790f9ca99e72" +checksum = "00caa7b4d3f6b29b211cd82dfceb1fbe30281fdf6f05e95f1d519837f92443a6" dependencies = [ "parity-scale-codec", ] [[package]] name = "frame-benchmarking" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2fc91a6a976ce87b105722d8d9cdc44d4cb03ad24493d34cbfb64bbaacb7ee" +checksum = "b22054d77cb9377dcb9660f9634e79b2e50fcd4129fae7921e98ca30dc5c12e7" dependencies = [ "frame-support", "frame-system", @@ -1254,23 +1228,25 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2941cd59682f596645d54b0e84c02e98f9be53a346841c720ead60cdbadb3463" +checksum = "76692e90be57adc50ca89c08ff92b6d501a1ec9e0800aedd67f3c9eb9cd26b37" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "serde", + "sp-io", "sp-runtime", "sp-std", + "sp-tracing", ] [[package]] name = "frame-metadata" -version = "11.0.0-alpha.6" +version = "11.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5eaf1cd17755f099188d76995520a3179fedf0cb631264b8759dea0cd2e981" +checksum = "d4ed1031c3ab5fd338d4922380ecaa1784d96c4670b5e329838c1be9821f1596" dependencies = [ "parity-scale-codec", "serde", @@ -1280,9 +1256,9 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4058dce75ae1d45b469a8cbbe0c9dc3083e5546936b60e4647e73584e0f7ba7" +checksum = "bdd5a22a0c3e66a82b4ca1965e21373d3e0d29266313130d04a5045906c81dc4" dependencies = [ "bitmask", "frame-metadata", @@ -1300,50 +1276,50 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", - "tracing", + "sp-tracing", ] [[package]] name = "frame-support-procedural" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eefa7eb42406f732f87f8331aaaa787a65abe0f5f681a59fac1737ba4e81d89e" +checksum = "1a6b4279196725ff56647d12a285328a79685a7d05be6c507f55a11e00f492c0" dependencies = [ "frame-support-procedural-tools", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0fce760be3b164dd44ba5826f6a504c485020f6813604d4c73b42b50797d71" +checksum = "d9135714a5cd9e01b9839c16433d5f075706ef87f8f2fc412944ff826fc8ccd1" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c453b69522957f835e3679e8a98a90a3859481423bf5a2c570397c416339dcf5" +checksum = "ab73d20fca63196489400b98b71aa96a8709968d83dc26e7c99aa135ba1eaf4f" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "frame-system" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c97e7168ca4cd7b2358ca30da4c5aba4a2b9b5eef45df67ca85b3dd59069a5" +checksum = "eb202b187ce580c0414d9c7608478377bd2fe90bb15a5777e8c6b746d4c9519a" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1493,9 +1469,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -1583,7 +1559,7 @@ dependencies = [ [[package]] name = "generic-event" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -1665,9 +1641,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377038bf3c89d18d6ca1431e7a5027194fbd724ca10592b9487ede5e8e144f42" +checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" dependencies = [ "bytes 0.5.4", "fnv", @@ -1678,7 +1654,7 @@ dependencies = [ "indexmap", "log", "slab", - "tokio 0.2.18", + "tokio 0.2.20", "tokio-util", ] @@ -1718,7 +1694,7 @@ dependencies = [ [[package]] name = "hello-substrate" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -1730,9 +1706,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" +checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" dependencies = [ "libc", ] @@ -1882,7 +1858,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.2.4", + "h2 0.2.5", "http 0.2.1", "http-body 0.3.1", "httparse", @@ -1891,7 +1867,7 @@ dependencies = [ "net2", "pin-project", "time", - "tokio 0.2.18", + "tokio 0.2.20", "tower-service", "want 0.3.0", ] @@ -1909,7 +1885,7 @@ dependencies = [ "log", "rustls", "rustls-native-certs", - "tokio 0.2.18", + "tokio 0.2.20", "tokio-rustls", "webpki", ] @@ -1945,15 +1921,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" -dependencies = [ - "rlp", -] - [[package]] name = "impl-serde" version = "0.2.3" @@ -1965,9 +1932,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" dependencies = [ "serde", ] @@ -1978,9 +1945,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -2023,6 +1990,12 @@ dependencies = [ "libc", ] +[[package]] +name = "ip_network" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f" + [[package]] name = "ipnet" version = "2.3.0" @@ -2055,9 +2028,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.37" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055" +checksum = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7" dependencies = [ "wasm-bindgen", ] @@ -2107,9 +2080,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -2187,7 +2160,7 @@ dependencies = [ [[package]] name = "kitchen-node" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "ctrlc", "derive_more 0.15.0", @@ -2198,7 +2171,6 @@ dependencies = [ "parking_lot 0.9.0", "sc-basic-authorship", "sc-cli", - "sc-client", "sc-client-db", "sc-consensus-manual-seal", "sc-executor", @@ -2222,9 +2194,9 @@ dependencies = [ [[package]] name = "kv-log-macro" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb" +checksum = "2a2d3beed37e5483887d81eb39de6de03a8346531410e1306ca48a9a89bd3a51" dependencies = [ "log", ] @@ -2271,7 +2243,7 @@ dependencies = [ [[package]] name = "last-caller" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -2398,8 +2370,8 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "329127858e4728db5ab60c33d5ae352a999325fdf190ed022ec7d3a4685ae2e6" dependencies = [ - "quote 1.0.3", - "syn 1.0.18", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -2650,9 +2622,9 @@ dependencies = [ [[package]] name = "linked-hash-map" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" [[package]] name = "linked_hash_set" @@ -2685,7 +2657,7 @@ dependencies = [ [[package]] name = "lockable-currency" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -2715,7 +2687,7 @@ dependencies = [ [[package]] name = "manual-seal" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "futures 0.3.4", "jsonrpc-core", @@ -2724,7 +2696,6 @@ dependencies = [ "rand 0.7.3", "sc-basic-authorship", "sc-cli", - "sc-client", "sc-client-api", "sc-client-db", "sc-consensus-manual-seal", @@ -2774,6 +2745,16 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +[[package]] +name = "memmap" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +dependencies = [ + "libc", + "winapi 0.3.8", +] + [[package]] name = "memoffset" version = "0.5.4" @@ -2824,9 +2805,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" dependencies = [ "cfg-if", "fuchsia-zircon", @@ -2855,9 +2836,9 @@ dependencies = [ [[package]] name = "mio-uds" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", @@ -2939,9 +2920,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" dependencies = [ "cfg-if", "libc", @@ -3080,7 +3061,7 @@ dependencies = [ [[package]] name = "ocw-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-executive", "frame-support", @@ -3111,7 +3092,7 @@ dependencies = [ [[package]] name = "offchain-demo" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "alt_serde", "frame-support", @@ -3167,9 +3148,9 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166dabc0bb0e4db44a4b0dd2489549d72a9549ec331a53028b7f5d19f12b2507" +checksum = "cd1d74c4e2175fccdf649463e4def9cc2d69a6a55cd192d96ad73774752e8a39" dependencies = [ "frame-support", "frame-system", @@ -3177,6 +3158,7 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "serde", + "sp-application-crypto", "sp-consensus-babe", "sp-consensus-vrf", "sp-inherents", @@ -3189,9 +3171,9 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ef08001886d3747220630337f7afbb8f1d7cbfacaa3a8a13317e1cb3e8e366" +checksum = "5933eed290294f48ae9c6ca9b83c48f73c0e50eb2d86532a388d2076806f9d37" dependencies = [ "frame-benchmarking", "frame-support", @@ -3205,9 +3187,9 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d89d58fe723cc05bdfc5f237a51e275bf58dcafb493ad68211c27ecd8f1afd" +checksum = "99b6aaf467788f82d9f18c940f57b6773e6114988120c63630ec1a30ef6af73d" dependencies = [ "frame-support", "frame-system", @@ -3222,9 +3204,9 @@ dependencies = [ [[package]] name = "pallet-generic-asset" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704f7b13a66b3ba76f260d1e1a4c7aefaf02c1e817eb7cf7a59f99ae1c62f96" +checksum = "7360a50e10a05e9835c4ee53dc6227221399af150712ab68ae09300b67876087" dependencies = [ "frame-support", "frame-system", @@ -3236,9 +3218,9 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed9f0fe5149552a1f1f26f4ed8999d692e0e209c54314c4f28a9bd8a1a1161d" +checksum = "0be9854b7b21a8ab2d14bc323d08b18b6d57d1bbdba1657f37169a02ac198162" dependencies = [ "frame-support", "frame-system", @@ -3255,9 +3237,9 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d153675f7ac1d8490e2e7db46b376edee52936edfa082f4d29831e6a19470b2" +checksum = "6941e40c29068970666b5737cc274d1a05ba9cabdb5b02059f585c69c4f96b4c" dependencies = [ "frame-support", "frame-system", @@ -3272,9 +3254,9 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1139a9bf489b947a677574ee8ade27c7b710ce25a07f1630b80c20af8f682f91" +checksum = "e6f06234e000e7b7554d75d62280e953f902981196d6dcde0d084ad5c7df4809" dependencies = [ "frame-support", "frame-system", @@ -3286,9 +3268,9 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fdeb41738a79d3247b2a7fd9ce8ae5a7d9e92ca2de198e006f891240c8dcacc" +checksum = "6aace05f197abe3905182ec817e6fadc3c985b3c2ec41bfc74bb9918d1585e9e" dependencies = [ "frame-support", "frame-system", @@ -3305,9 +3287,9 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b15e01796c9d2791cbd9ae2d7c9b59c8eccc3682afbb1189f6ebe7b07f4d71" +checksum = "246c9c0b5c29baff01d925ebadee6c0c642fa4c56ba8de1957f1ecc1438cc7dc" dependencies = [ "frame-support", "frame-system", @@ -3320,9 +3302,9 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d9de9af5f5ed3377a6108eed436791bfe18bc3e4e2e416854d0074d31b1be00" +checksum = "4c90b652dfb8796d657a2df5fa6200ada33b9784554b81a32efd73de2fe00575" dependencies = [ "frame-benchmarking", "frame-support", @@ -3338,9 +3320,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54768f5959e0bef53218b91f289d6807c0786d93fb90a3c7e39ab7ff9f018f23" +checksum = "52333b8598b2bcb3af5e158c61cb2d30821220a5034e92a74c6a4ef116d82a7f" dependencies = [ "frame-support", "frame-system", @@ -3352,9 +3334,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7323ef565470b51bb79fc65d3c3a1bff0ecb317485acc66a64406309c25f1b77" +checksum = "40f6cc2ebdaff949b9f38cc03f19e541bd22773ce32e84532ac1d85a481cb112" dependencies = [ "frame-support", "parity-scale-codec", @@ -3364,6 +3346,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "parity-db" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d595e372d119261593297debbe4193811a4dc811d2a1ccbb8caaa6666ad7ab" +dependencies = [ + "blake2-rfc", + "crc32fast", + "libc", + "log", + "memmap", + "parking_lot 0.10.2", +] + [[package]] name = "parity-multiaddr" version = "0.7.3" @@ -3435,9 +3431,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -3453,10 +3449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6e2583649a3ca84894d1d71da249abcfda54d5aca24733d72ca10d0f02361c" dependencies = [ "cfg-if", - "ethereum-types", - "hashbrown", "impl-trait-for-tuples", - "lru", "parity-util-mem-derive", "parking_lot 0.10.2", "primitive-types", @@ -3470,8 +3463,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2 1.0.10", - "syn 1.0.18", + "proc-macro2 1.0.12", + "syn 1.0.19", "synstructure", ] @@ -3533,9 +3526,9 @@ dependencies = [ [[package]] name = "paste" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4fb1930692d1b6a9cfabdde3d06ea0a7d186518e2f4d67660d8970e2fa647a" +checksum = "0a229b1c58c692edcaa5b9b0948084f130f55d2dcc15b02fcc5340b2b4521476" dependencies = [ "paste-impl", "proc-macro-hack", @@ -3543,14 +3536,14 @@ dependencies = [ [[package]] name = "paste-impl" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62486e111e571b1e93b710b61e8f493c0013be39629b714cb166bdb06aa5a8a" +checksum = "2e0bf239e447e67ff6d16a8bb5e4d4bd2343acf5066061c0e8e06ac5ba8ca68c" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -3599,29 +3592,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f6a7f5eee6292c559c793430c55c00aea9d3b3d1905e855806ca4d7253426a2" +checksum = "82c3bfbfb5bb42f99498c7234bbd768c220eb0cea6818259d0d18a1aa3d2595d" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8988430ce790d8682672117bc06dda364c0be32d3abd738234f19f3240bad99a" +checksum = "ccbf6449dcfb18562c015526b085b8df1aa3cdab180af8ec2ebd300a3bd28f63" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "pin-project-lite" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" [[package]] name = "pin-utils" @@ -3649,14 +3642,13 @@ checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "primitive-types" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5e4b9943a2da369aec5e96f7c10ebc74fcf434d39590d974b0a3460e6f67fbb" +checksum = "c55c21c64d0eaa4d7ed885d959ef2d62d9e488c27c0e02d9aa5ce6c877b7d5f8" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde 0.3.0", + "impl-serde 0.3.1", "uint", ] @@ -3676,9 +3668,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "version_check", ] @@ -3688,9 +3680,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "syn-mid", "version_check", ] @@ -3718,9 +3710,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" +checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" dependencies = [ "unicode-xid 0.2.0", ] @@ -3790,9 +3782,9 @@ checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -3845,11 +3837,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" +checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7" dependencies = [ - "proc-macro2 1.0.10", + "proc-macro2 1.0.12", ] [[package]] @@ -4053,7 +4045,7 @@ dependencies = [ [[package]] name = "randomness" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -4112,6 +4104,26 @@ version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +[[package]] +name = "ref-cast" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a214c7875e1b63fc1618db7c80efc0954f6156c9ff07699fd9039e255accdd1" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602eb59cda66fcb9aec25841fb76bc01d2b34282dcdd705028da297db6f3eec8" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + [[package]] name = "regex" version = "1.3.7" @@ -4141,7 +4153,7 @@ dependencies = [ [[package]] name = "reservable-currency" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -4154,13 +4166,13 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.12" +version = "0.16.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" +checksum = "703516ae74571f24b465b4a1431e81e2ad51336cb0ded733a55a1aa3eccac196" dependencies = [ "cc", - "lazy_static", "libc", + "once_cell", "spin", "untrusted", "web-sys", @@ -4169,7 +4181,7 @@ dependencies = [ [[package]] name = "ringbuffer-queue" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -4186,15 +4198,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" -[[package]] -name = "rlp" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7d3f9bed94764eac15b8f14af59fac420c236adaff743b7bcc88e265cb4345" -dependencies = [ - "rustc-hex", -] - [[package]] name = "rocksdb" version = "0.13.0" @@ -4217,7 +4220,7 @@ dependencies = [ [[package]] name = "rpc-node" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "api-runtime", "ctrlc", @@ -4230,7 +4233,6 @@ dependencies = [ "parking_lot 0.9.0", "sc-basic-authorship", "sc-cli", - "sc-client", "sc-client-api", "sc-client-db", "sc-consensus-manual-seal", @@ -4334,9 +4336,9 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eeea19615c22c30accd79ca751b7db8642a3a88572432624a88c6754b6c7d33" +checksum = "606bb1a659f6d10c9d6d1b1520d81b07df6cca26008c865ca4a1eb957841ebfb" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -4357,9 +4359,9 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7b45adef0526ef295a9b7da4af933322df7119385a78c2e96c99b5d54fcc35" +checksum = "ad86d3862ea0507e4ab26581b64ac902508f5e91f2bdae618327db12d70840c9" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -4374,9 +4376,9 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d37957c58cb0cf1fa9fe1187447d16e4708a7a0541ee2c1226b2536f4241742" +checksum = "95ab12f5eabca6fd4e16c202f045dc8e7542b9049294b92747cfcabf037586a4" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -4391,21 +4393,21 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2703f02f31f53601ed0408df76939a2e1911ff64a146e7b15ed1be56193e91ba" +checksum = "a11bc26f24e234d61e708f92339efe51ad3d299e0e11d368ee9b3bf94787076f" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sc-cli" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46513d8e34913e19ffb8663ff211528f5590712c3c4e69bfa41ca748120a2001" +checksum = "e0cd2a720cc286c964f011f94cd54eb32c9d612883e88b4df2a07902bd6d7822" dependencies = [ "ansi_term 0.12.1", "app_dirs", @@ -4441,50 +4443,14 @@ dependencies = [ "structopt", "substrate-prometheus-endpoint", "time", - "tokio 0.2.18", -] - -[[package]] -name = "sc-client" -version = "0.8.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9908c438f8e60d07c97a7f1d4ea8c6d31a498f283373c533f2006c032b9a4971" -dependencies = [ - "derive_more 0.99.5", - "fnv", - "futures 0.3.4", - "hash-db", - "hex-literal", - "kvdb", - "log", - "parity-scale-codec", - "parking_lot 0.10.2", - "sc-block-builder", - "sc-client-api", - "sc-executor", - "sc-telemetry", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-keyring", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-utils", - "sp-version", - "substrate-prometheus-endpoint", - "tracing", + "tokio 0.2.20", ] [[package]] name = "sc-client-api" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a2271c80a792efffc4abfe9be8b87c9747721cfa4426f3b707283a431bbacd" +checksum = "4242f40585bfd1375bbde27f169e2ecaaa40ef1b60b44294c454bc97d5048cdd" dependencies = [ "derive_more 0.99.5", "fnv", @@ -4502,6 +4468,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-database", "sp-externalities", "sp-inherents", "sp-keyring", @@ -4513,41 +4480,56 @@ dependencies = [ "sp-trie", "sp-utils", "sp-version", + "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1ae5b4c8333cb751cd9bbc7ecf0eb1c55d4865fca6651066844febcec71618" +checksum = "b3395df025dfa8edf1be099a2ac941082b953707ea536cffeda5d3e51b23e896" dependencies = [ + "blake2-rfc", "hash-db", "kvdb", "kvdb-memorydb", "kvdb-rocksdb", "linked-hash-map", "log", + "parity-db", "parity-scale-codec", "parity-util-mem", "parking_lot 0.10.2", - "sc-client", "sc-client-api", "sc-executor", "sc-state-db", "sp-blockchain", "sp-consensus", "sp-core", + "sp-database", "sp-runtime", "sp-state-machine", "sp-trie", "substrate-prometheus-endpoint", ] +[[package]] +name = "sc-consensus" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f7378c44bc005807c427fe3f342fb3a851ff2fe82289e73a10e794ab1a33eee" +dependencies = [ + "sc-client-api", + "sp-blockchain", + "sp-consensus", + "sp-runtime", +] + [[package]] name = "sc-consensus-babe" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c656cb92d387f3c402118b44113de78c04d090a931638da29c8af4aeca1ca5" +checksum = "092fc2604c71a2deb9464d4b9780d6a7238e379566e530b206b7a4557e299f9a" dependencies = [ "derive_more 0.99.5", "fork-tree", @@ -4562,7 +4544,6 @@ dependencies = [ "parking_lot 0.10.2", "pdqselect", "rand 0.7.3", - "sc-client", "sc-client-api", "sc-consensus-epochs", "sc-consensus-slots", @@ -4588,9 +4569,9 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ba501b3709df95d511377ad6e91d490678a7bcea73a359a3d2f72630793f4c" +checksum = "a194e3025fe8bd0e54b126c1cf85a19ed186c9b325184dd34ee622e7d1a68ee1" dependencies = [ "fork-tree", "parity-scale-codec", @@ -4602,9 +4583,9 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972c170186ea1fcc1b18c285487636755d6b1ed9e04f490fc4a694b901b61d0d" +checksum = "38e24894732dc4aa31546f2b8c329bf7caef143edbf7d4b50269b1581771237a" dependencies = [ "assert_matches", "derive_more 0.99.5", @@ -4614,12 +4595,12 @@ dependencies = [ "jsonrpc-derive", "log", "parking_lot 0.10.2", - "sc-client", "sc-client-api", "sc-transaction-pool", "serde", "sp-blockchain", "sp-consensus", + "sp-core", "sp-inherents", "sp-runtime", "sp-transaction-pool", @@ -4627,9 +4608,9 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d8b0f98a158006147808adfa3d5822dd41a33a6d561b130b9e42a4d3afa7f5c" +checksum = "41fb7e3e5ee46d419a171d8b56efb60d210dcaf1911cdec984e2a2adefc9766f" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -4649,9 +4630,9 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ec4ede5a5b469f5cc1ac9fd304c7683f1e57638e5d9f8f23df6a98758b9cc24" +checksum = "d21cdecefdce1abe0fab714c2850f067093a2eed46422d748879a09e66aa2ecf" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -4671,9 +4652,9 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cd8315b774db6c11b8efb43686a68243e9a100b8f48d2f1b537a8d42925399" +checksum = "0445485b65ecf90d85caa7de51fa2297072050a687822a8f583bcae32fcc8d78" dependencies = [ "log", "sc-client-api", @@ -4686,9 +4667,9 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f238a411de5e1cfe3b104f287aad0a48e4a39d9157171b7761d91d6d4a76610a" +checksum = "2cba18b495c2959a9bfed031f4df4175dfebbbc827ff3524d6eeae05de1f4530" dependencies = [ "derive_more 0.99.5", "lazy_static", @@ -4699,6 +4680,7 @@ dependencies = [ "parking_lot 0.10.2", "sc-executor-common", "sc-executor-wasmi", + "sp-api", "sp-core", "sp-externalities", "sp-io", @@ -4713,9 +4695,9 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "549d94ce1316c168a72c26abf0bf3390ae76b1645030e2aac9ecf0542b04fa85" +checksum = "7b92cabca9418211b63c407c939523672fae62051f0dd8088c3068ab3e883dae" dependencies = [ "derive_more 0.99.5", "log", @@ -4731,9 +4713,9 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7efc6978b59884e1593ec172fe5b1a909c980b0e495897c904da50616c3a7a" +checksum = "8a8f35b44090ffdb0bbc4350dcf686ee649099ac7dc3ca0608d513018d4c84ae" dependencies = [ "log", "parity-scale-codec", @@ -4747,11 +4729,12 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bcf9e6787b6b421c2152e3d876105dec0c4cfa9fdac6bca54bec404d79a8593" +checksum = "32a0e197ef12caf06b0d01d922dbe24d018e99a62d723da1df4a303efe9d86be" dependencies = [ "assert_matches", + "derive_more 0.99.5", "finality-grandpa", "fork-tree", "futures 0.3.4", @@ -4762,8 +4745,8 @@ dependencies = [ "pin-project", "rand 0.7.3", "sc-block-builder", - "sc-client", "sc-client-api", + "sc-consensus", "sc-keystore", "sc-network", "sc-network-gossip", @@ -4784,9 +4767,9 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a03ec9890c64668809ac230921c504f18dc79bec75addf02da197b437d740dda" +checksum = "7560120ce244b775d755e8550f894b6b57bed6bbb20cb12164e2ceb25e1fc9c6" dependencies = [ "ansi_term 0.12.1", "futures 0.3.4", @@ -4802,9 +4785,9 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fd2f3cb18368d58af4946e277b9e4bea605feb65872116130c1dd0905f341e3" +checksum = "e1e44f10a561c72a7fa604cb1a356564ef496609b8306a330b4185840231fe9d" dependencies = [ "derive_more 0.99.5", "hex", @@ -4818,9 +4801,9 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda92d4930bd77f3d215504ce16a3715585d8fc7c3d7be3c6f6891ee841f5686" +checksum = "4ef69b5eb4ed887f9b4a02227f922412d814085023f38bc395ad194713f73749" dependencies = [ "bitflags", "bytes 0.5.4", @@ -4833,6 +4816,7 @@ dependencies = [ "futures-timer 3.0.2", "futures_codec", "hex", + "ip_network", "libp2p", "linked-hash-map", "linked_hash_set", @@ -4846,7 +4830,6 @@ dependencies = [ "prost-build", "rand 0.7.3", "sc-block-builder", - "sc-client", "sc-client-api", "sc-peerset", "serde", @@ -4857,7 +4840,6 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-consensus-babe", "sp-core", "sp-runtime", "sp-utils", @@ -4871,9 +4853,9 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a61f954d0ce6279fe48df2d3d20d3e5589964d501509f85b323cb0fde37b1b90" +checksum = "4002e0430151434a6039e3187b84267cf89e04214de6f677d9ddd89e6a31dafd" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -4888,9 +4870,9 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3544cf74f21323eac40c965a3ccda06d828875127e7966c0a05db9686460bf34" +checksum = "31712efd8cb5ff149885bc19c752555c696e95d27c8a075d1cc58ebb5d6cc957" dependencies = [ "bytes 0.5.4", "fnv", @@ -4916,9 +4898,9 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b85bec68c3c1b4495b6eabdf14d1c4140a6d569b61af9c4f721f23eae42ed7" +checksum = "6c6d53c1c8de2f896ac3dec705285a216ea50b9b387a631362ae2635f6b6fe74" dependencies = [ "futures 0.3.4", "libp2p", @@ -4930,9 +4912,9 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f8136a2d703b2f4aeb970707ec83d55ae584c3c0af7aa10b3bd93b227a6fd0" +checksum = "f02f88a10ad3271bc0da9e70d30fcfa182f33226b5e5e9af1b0e0dbeaab032bb" dependencies = [ "futures 0.3.4", "hash-db", @@ -4942,7 +4924,6 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.10.2", "sc-block-builder", - "sc-client", "sc-client-api", "sc-executor", "sc-keystore", @@ -4964,9 +4945,9 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c681fed8a6aab250f1fbb0848dee73c199bbcf94dc03f27edb57d2c50f0cff3" +checksum = "a27aa7d70aec2be0967110b5df9a11ac3aa76fe4c8576455c266d3135d8fe63a" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -4989,9 +4970,9 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d090ab799eaf3e41f36cdd9c79c2f5d1b0eeefc5f3422bc273084badd7ff62" +checksum = "40b5547f9bb330a6d4273f471b44f8f2b12791abb9cb8557135f372075c42372" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -5005,16 +4986,16 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6863666dc415a261bb21dfe599403fb977720feb5bc6ebacf078f5f78c165b" +checksum = "361410fc964e1cc77435f4c3bd1c724b39ad518bdf145c40f7c80701782e6e78" dependencies = [ "derive_more 0.99.5", "exit-future", "futures 0.1.29", "futures 0.3.4", - "futures-diagnose", "futures-timer 3.0.2", + "hash-db", "lazy_static", "log", "netstat2", @@ -5022,9 +5003,11 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parking_lot 0.10.2", + "pin-project", "procfs", + "rand 0.7.3", + "sc-block-builder", "sc-chain-spec", - "sc-client", "sc-client-api", "sc-client-db", "sc-executor", @@ -5041,14 +5024,19 @@ dependencies = [ "slog", "sp-api", "sp-application-crypto", + "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-core", + "sp-externalities", "sp-io", "sp-runtime", "sp-session", + "sp-state-machine", "sp-transaction-pool", + "sp-trie", "sp-utils", + "sp-version", "substrate-prometheus-endpoint", "sysinfo", "tracing", @@ -5057,9 +5045,9 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31877c85414ed8e19a480940d7ae340832e7616208072cb43982fdcdd176021" +checksum = "2f18e23f3d774df943bbd8a9fbe90140263de6dcae46aabb702a354198a7e3b4" dependencies = [ "log", "parity-scale-codec", @@ -5072,9 +5060,9 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdaddc5a9aaeabbe68599ae2bfa4f247fa1617e8a119f4665884757052697035" +checksum = "0c9db676096e46d39083d9cccb62437234b515a085d77488a23b24443b6182ad" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -5095,9 +5083,9 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a0c0eecadf7c89b09e4e7290b301ffd8c3b30af4d1aa47d147f32f9d9e0b33" +checksum = "6d3da8fdeb53322e32e8576c62170cbeea78a0417238b6bd510f7584a6e411fb" dependencies = [ "erased-serde", "log", @@ -5111,9 +5099,9 @@ dependencies = [ [[package]] name = "sc-transaction-graph" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7f1ad6be774288fd73818271d3041442956a149a461de22f97f12210fdc776" +checksum = "48864c813861c919d5c167c11dce9875d74019d633384d66a3ae97ed7db17857" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -5132,9 +5120,9 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca9c7db165344a2d45dc1b7d0a52e1028198b25adba8406e05055f4c5e5626b8" +checksum = "3f59734238f19b1d8c3dd1fa0afa9569ee438ae0296a83417c5c9bdd0c6f2d24" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -5150,8 +5138,10 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", + "sp-tracing", "sp-transaction-pool", "sp-utils", + "substrate-prometheus-endpoint", "wasm-timer", ] @@ -5201,9 +5191,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572dfa3a0785509e7a44b5b4bebcf94d41ba34e9ed9eb9df722545c3b3c4144a" +checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" dependencies = [ "bitflags", "core-foundation", @@ -5214,9 +5204,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb15a5fec93b7021b8a9e96009c5d8d51c15673569f7c0f6b7204e5b7b404f" +checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" dependencies = [ "core-foundation-sys", "libc", @@ -5258,9 +5248,9 @@ version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -5355,7 +5345,7 @@ dependencies = [ [[package]] name = "simple-event" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -5367,7 +5357,7 @@ dependencies = [ [[package]] name = "simple-map" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -5379,7 +5369,7 @@ dependencies = [ [[package]] name = "single-value" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -5434,9 +5424,9 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -5494,9 +5484,9 @@ dependencies = [ [[package]] name = "sp-allocator" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532c396c2d6727d9b0d3eee3edbcaf939e78a6ce944fa34c2b98d6a02a2485e" +checksum = "1cdb45d1695a4b2004ce17681387bfbeb7ef9ae370c7903de9333f7bf905fbb9" dependencies = [ "derive_more 0.99.5", "log", @@ -5507,9 +5497,9 @@ dependencies = [ [[package]] name = "sp-api" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a4df52a0c56d742fc75f4da486627c1b050be2ac87cc042c2c0246756f22d2" +checksum = "4e34c770de3ada5729a094ed0e594a94fe03f4d6bfffd5d27f40e00778d20998" dependencies = [ "hash-db", "parity-scale-codec", @@ -5523,22 +5513,22 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff834a833fd8beda20cd588341cdae52336f02f60aa6f0a34d9fd4d91975b369" +checksum = "53f6276132fc841a61e38d6eaa3a89acd10ccec1d8167cedf453c2fff0513b93" dependencies = [ "blake2-rfc", "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sp-application-crypto" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5dec618ed8ea85fd767358185a412440c02a0adce569c2aa92ee355550d678" +checksum = "f2997e5072ef4fa6ac54658b0e79149095ececd89e3bd693f8fed90ad69862e8" dependencies = [ "parity-scale-codec", "serde", @@ -5549,9 +5539,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b413966b541aadf8725dddc29daeefa950f45b17208f33302890484c56009bd3" +checksum = "35ee0e06a6d46a3d6fb8706dfa2ca593b60a06c248fbd5173ab56070c209612e" dependencies = [ "integer-sqrt", "num-traits 0.2.11", @@ -5564,9 +5554,9 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d686e832e745c3aa2d55e303d46ccd41d64c02916bb40c64cfbb7456840664d" +checksum = "1787b702a5b1fbb2b172f94d8bc2aaa2f2eed21e0ff35a06d515d75425add4dd" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -5576,9 +5566,9 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70049c389c66c4c9207149e2579ce6d752788dee8c596fbda76059f2ddde968f" +checksum = "e4b654cf89dd73ad85848b2c7e60812f231ba2785aeec9c4708a434323fecf9a" dependencies = [ "parity-scale-codec", "sp-api", @@ -5589,9 +5579,9 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db268602314a0f3a028ef6073185a6a5e0b8e7703da306e72e8a1fcbd2a0c05" +checksum = "40b9c16247ff5ddd2b5aae78c51ffb49eddd804492be6182442281afff391e1e" dependencies = [ "derive_more 0.99.5", "log", @@ -5606,9 +5596,9 @@ dependencies = [ [[package]] name = "sp-chain-spec" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d73d557c214577b64a396e54f337403e251339a6599387747ae3570a19bb27" +checksum = "2997456fa5b605fec06c5f2267a0e7cb44708b210548b1a557ce89b07bc04211" dependencies = [ "serde", "serde_json 1.0.52", @@ -5616,13 +5606,12 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a4eec34198eb14fc2ef129df522e28df5ce6aeea886369ef2eafaaec6bc4fc7" +checksum = "dff4f5824b4d69bbe0db4e67018abadf76acad541b12b58b6880f67fdd6ecc53" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", - "futures-diagnose", "futures-timer 3.0.2", "libp2p", "log", @@ -5640,10 +5629,11 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6108fbecddd95ce8151f09e8ecb0941b3eddcfeefb4c996f27a8a8b4827abd" +checksum = "16a8789e70d9c821572a8365b688200dec01442d3086130ce701f101485cf5fa" dependencies = [ + "merlin", "parity-scale-codec", "sp-api", "sp-application-crypto", @@ -5657,9 +5647,9 @@ dependencies = [ [[package]] name = "sp-consensus-pow" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a867278824cd9f90b606231e2ca2acee18e7093d4bcf95cd7ffe2e15bb164fae" +checksum = "00ef4315aa2b48dde5d6130390e7eaafb48640233e32a880abfb565c6adc5cae" dependencies = [ "parity-scale-codec", "sp-api", @@ -5670,9 +5660,9 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba3eef8ab960eb88307f1c4eda1c36dfd95dc933bd6a277d2e26a503a6e5a71" +checksum = "ae850e7f455f312155d28623f2d910a37861d639bf8b3d16222823322c88c02a" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -5683,9 +5673,9 @@ dependencies = [ [[package]] name = "sp-core" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0589a2e394a3dcd5dfd258c5f5bf22e6d0f28ffbd5e6d3a09ad702a6dc1c0152" +checksum = "a4d4e7309949c9ce65a0347b20bbc89cc09efee55b1918c3253392286dab0df9" dependencies = [ "base58", "blake2-rfc", @@ -5695,10 +5685,11 @@ dependencies = [ "hash-db", "hash256-std-hasher", "hex", - "impl-serde 0.3.0", + "impl-serde 0.3.1", "lazy_static", "libsecp256k1", "log", + "merlin", "num-traits 0.2.11", "parity-scale-codec", "parity-util-mem", @@ -5722,33 +5713,44 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-database" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96e050dc3b7a9119e78254bdde9365a27d951a810f7afdcb58fc5799f8bddbb" +dependencies = [ + "kvdb", + "parking_lot 0.10.2", +] + [[package]] name = "sp-debug-derive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df968a922a9d3b3f65d37e91e30904876efce88d017d4448c4babc990a738134" +checksum = "b2c4cb00ba7694df96793cf024418e6a75d5f224716460961b5c9dbfa621c0e8" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sp-externalities" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06b8ac80a03205205426ae9ef3200133a8ffab4f4f0eeecd3b858034f9e5b02" +checksum = "93a826d5f8f0085804f5e7174885958611955a904ff184ae0ad289d6b83d8a3e" dependencies = [ "environmental", + "parity-scale-codec", "sp-std", "sp-storage", ] [[package]] name = "sp-finality-grandpa" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7107d11f07fb400a0d71838225865e2bf27f79241751ef9ff1501980dd63b3" +checksum = "c91cc8d9e62f28d3dd90c3e4291f26147c5094f6f2587aeea4301bf3731d4a3c" dependencies = [ "parity-scale-codec", "serde", @@ -5760,9 +5762,9 @@ dependencies = [ [[package]] name = "sp-finality-tracker" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5f718fb1e75fd137b01b539a200cf5e3cd1e0f1d21dc55a03341d7e25c81624" +checksum = "8f050f19f1e07b63f61a872552fecf7239c75e77dc133a5f5ae00dac0e7b348d" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -5771,9 +5773,9 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a14f699ab5cac6c9e80197774f06a4aa38211cb8acdb8660e328775efa2599e1" +checksum = "8367b0e285f8c3ab00400a5f5b53ff0dba263005d2458fdc3e9652f824205f0b" dependencies = [ "derive_more 0.99.5", "parity-scale-codec", @@ -5784,14 +5786,16 @@ dependencies = [ [[package]] name = "sp-io" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20758b1831f75d58c20ca735d34b96dc792ef8264bf4d4a8c476964d90a6aea7" +checksum = "ede88516c08b2070ad2b49f5e4ebff896910b11c0a63184eb5c20b0b604b8655" dependencies = [ + "futures 0.3.4", "hash-db", "libsecp256k1", "log", "parity-scale-codec", + "parking_lot 0.10.2", "sp-core", "sp-externalities", "sp-runtime-interface", @@ -5803,9 +5807,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f71e65eb13d8a4d320d3785558ac8fc12f8b2bdbfc5268c0e8a5a143d68686e" +checksum = "509e39a8b8c8c6532fcbea3140e3f92ec6712ee028bdc968f4ccb90181205c24" dependencies = [ "lazy_static", "sp-core", @@ -5815,19 +5819,20 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc02ea51f7abe7e8999658a8a41693426f14e66cff6cc5af989888289ad0fc" +checksum = "e63092c0ecd8fc90971a14a169f62337b78d885873e55dee87f33fe5f76d6591" dependencies = [ "sp-api", + "sp-core", "sp-runtime", ] [[package]] name = "sp-panic-handler" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef909e5ea664bce0bca723baf352c75125e4ed017843240e91d718df4720e1e4" +checksum = "acec634cd613519673edad420f56d5bbd087da9923c05aa66708882ee9676d20" dependencies = [ "backtrace", "log", @@ -5835,9 +5840,9 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d29a58ef51317f96eec408b40c604ccfe8c7c3b9ecc2636e2a9c84a79fae53a" +checksum = "7bd0ae1f6a934590356ce844ce9d0ef71993cab223f6c9371c2fdea98b23c334" dependencies = [ "serde", "sp-core", @@ -5845,9 +5850,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb1f98caf8bb20c7d69ba3097f3283ebc615f4a33e79ae0ca5934364be5776ac" +checksum = "0d37f6a2e111dd82dd194fa9ef77ba49b17e70162afc237f99e7c5dc6f95834f" dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", @@ -5867,37 +5872,38 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "289491386162a8d867d219f4f4dd3a7c11181c8ee9957e41b8747b555a9f4433" +checksum = "bc743ea280556cbaf82203ec63ade39f4167402cb571aaf012c6c43f092ccf33" dependencies = [ "parity-scale-codec", "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", + "sp-tracing", "sp-wasm-interface", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609529717f6c9cdd5bb6329c4ca9ddb1d36f698bd1f5dd2bdf0e94c064d7cc5b" +checksum = "be673dffcf1084e6a0da85712866afde7bbdefa152e9e3e5dbf4a04f1994a673" dependencies = [ "Inflector", "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sp-serializer" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b306e15eb54af25aef9d752c22778da3fa115945e47bf047545be2847cf814" +checksum = "747ed260860bde3b6b098caf3091905b1fcea95135fb73fb7fded7a7662ae622" dependencies = [ "serde", "serde_json 1.0.52", @@ -5905,9 +5911,9 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fca3ff8ddd14c5928536483d4b393bb795d55dcb5b576b1dceb3f5829216c76" +checksum = "fd4f193d095bb211ea75c14d924b97e03163e6807185b2ab45ff49a51d259fa8" dependencies = [ "sp-api", "sp-core", @@ -5917,9 +5923,9 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d7105e78848b8a8f6af3539a0cf7d9627b78a8776f61f43769da6406937ea9" +checksum = "d87f659f9742c456a35382af6ed58160cd1f23e0ddb51c38180b2cf80d5ac8a1" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -5928,9 +5934,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5de28eb08ce52f45ed32257b324766183dfe4d74a29242b934365ff80911ca" +checksum = "bd342d0b85891ea0e69c34483651df4e05420989b6fa74eb1982994118482985" dependencies = [ "hash-db", "log", @@ -5948,17 +5954,18 @@ dependencies = [ [[package]] name = "sp-std" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca806523d5df8082c89da042e31292f0c8f6e6ad9c3cfc312edfffde6a08490" +checksum = "6e32241a20350ba20f445c73fec53b4c904559756b922ca2c3dda87ab2c1be9e" [[package]] name = "sp-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2cb515df8b37fbdbb6769d2e992748b6134d592ec3b795b8e672621d754f94b" +checksum = "645dcf4a75d63a5494eabdc076d19a834c3cc46df65d84506fc40e67bd0bdd40" dependencies = [ "impl-serde 0.2.3", + "ref-cast", "serde", "sp-debug-derive", "sp-std", @@ -5966,9 +5973,9 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd289fc7dbbae54cfe4db93a204df6371d6f3b5b8d5819fa7287e7d44a83eb86" +checksum = "f981570875b33311c4ae95a721511951689d4d89e2f58bd0933dcbfe67230364" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -5979,11 +5986,20 @@ dependencies = [ "wasm-timer", ] +[[package]] +name = "sp-tracing" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11a4caabab12ba64d7e5d3ff6d2d5a698425227eb8c697f8b3dcac67813a192b" +dependencies = [ + "tracing", +] + [[package]] name = "sp-transaction-pool" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f62c89a439db3f248980da189811e45666b758bc3cb8a9eb587d73d2e91b3403" +checksum = "008ceb7db9fe134ced1e67226edb36db783e5f9434ca3544efcc94d8db9e1c99" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -5997,9 +6013,9 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4194817027eb92525e9279ec651160d709340d74b707f7648654c8eb2a626be3" +checksum = "1620f438771be44e7aee5445c348623c40bc32a15c875689ac9f2e3aecdc3aa3" dependencies = [ "hash-db", "memory-db", @@ -6012,9 +6028,9 @@ dependencies = [ [[package]] name = "sp-utils" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3cd7ac8f6d105dd1d9483f7d2d20e0e77cecdfe0a7fe6d0bd0616cebb80ce3" +checksum = "e3aa5acc361bb7ccab3940584d9c032a587b8b4414cd949a92a7b391e6f39384" dependencies = [ "futures 0.3.4", "futures-core", @@ -6024,9 +6040,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "319c37fa4aa91ee9ee9c20a3fab0d5b6b1bbe1dea997319c303f28a62f49765d" +checksum = "d032c1e5c3b484c0e88486a1a6e9bfb736cbe6cb68b074cf0436b2935d38372a" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -6037,9 +6053,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7584168f2785f6676727545a31a3cd97159d7023d968540b4881a98d73991900" +checksum = "0154beac23726c550f7fd68b9aad2fd97369221d5aa4b4e18d937e2eddc4246b" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6076,7 +6092,7 @@ dependencies = [ [[package]] name = "storage-cache" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -6104,7 +6120,7 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "struct-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -6134,9 +6150,9 @@ checksum = "d239ca4b13aee7a2142e6795cbd69e457665ff8037aed33b3effdc430d2f927a" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6155,9 +6171,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" dependencies = [ "heck", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6174,9 +6190,9 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0abd8ab46d560d0d5cffd8d016c6b75eb5df91885b1b226b819ab600f02237c" +checksum = "19b350e0eacbf0f7a5d6394417e3371e6f29b412ce95b4df02bab46db16d66a5" dependencies = [ "platforms", ] @@ -6192,9 +6208,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cad984ef1fec55fe46843630566f98cde0ad3de07efbbf8a4f857b36fedf30" +checksum = "2d0d8bbb7ede14a1d0212218945b83606e358878eac510685819d5c6394bcad9" dependencies = [ "async-std", "derive_more 0.99.5", @@ -6202,14 +6218,14 @@ dependencies = [ "hyper 0.13.5", "log", "prometheus", - "tokio 0.2.18", + "tokio 0.2.20", ] [[package]] name = "substrate-wasm-builder-runner" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30c70de7e7d5fd404fe26db1e7a4d6b553e2760b1ac490f249c04a960c483b8" +checksum = "d2a965994514ab35d3893e9260245f2947fd1981cdd4fffd2c6e6d1a9ce02e6a" [[package]] name = "subtle" @@ -6225,7 +6241,7 @@ checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" [[package]] name = "sum-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -6262,7 +6278,7 @@ dependencies = [ [[package]] name = "super-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "adding-machine", "basic-token", @@ -6338,12 +6354,12 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "410a7488c0a728c7ceb4ad59b9567eb4053d02e8cc7f5c0e0eeeb39518369213" +checksum = "e8e5aa70697bb26ee62214ae3288465ecec0000f05182f039b477001f08f5ae7" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", + "proc-macro2 1.0.12", + "quote 1.0.4", "unicode-xid 0.2.0", ] @@ -6353,9 +6369,9 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6373,17 +6389,17 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "unicode-xid 0.2.0", ] [[package]] name = "sysinfo" -version = "0.12.0" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccb41798287e8e299a701b5560d886d6ca2c3e7115e9ea2cb68c123aec339b7" +checksum = "1cac193374347e7c263c5f547524f36ff8ec6702d56c8799c8331d26dffe8c1e" dependencies = [ "cfg-if", "doc-comment", @@ -6434,22 +6450,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b3d3d2ff68104100ab257bb6bb0cb26c901abe4bd4ba15961f3bf867924012" +checksum = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca972988113b7715266f91250ddb98070d033c62a011fa0fcc57434a649310dd" +checksum = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6463,9 +6479,9 @@ dependencies = [ [[package]] name = "threadpool" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" +checksum = "e8dae184447c15d5a6916d973c642aec485105a13cd238192a6927ae3e077d66" dependencies = [ "num_cpus", ] @@ -6531,9 +6547,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ef16d072d2b6dc8b4a56c70f5c5ced1a37752116f8e7c1e80c659aa7cb6713" +checksum = "05c1d570eb1a36f0345a5ce9c6c6e665b70b73d11236912c0b477616aeec47b1" dependencies = [ "bytes 0.5.4", "fnv", @@ -6653,7 +6669,7 @@ checksum = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a" dependencies = [ "futures-core", "rustls", - "tokio 0.2.18", + "tokio 0.2.20", "webpki", ] @@ -6765,7 +6781,7 @@ dependencies = [ "futures-sink", "log", "pin-project-lite", - "tokio 0.2.18", + "tokio 0.2.20", ] [[package]] @@ -6800,8 +6816,8 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fbad39da2f9af1cae3016339ad7f2c7a9e870f12e8fd04c4fd7ef35b30c0d2b" dependencies = [ - "quote 1.0.3", - "syn 1.0.18", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6867,9 +6883,9 @@ checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] name = "uint" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75a4cdd7b87b28840dba13c483b9a88ee6bbf16ba5c951ee1ecfcf723078e0d" +checksum = "173cd16430c206dc1a430af8a89a0e9c076cf15cb42b4aedb10e8cc8fee73681" dependencies = [ "byteorder", "crunchy", @@ -6948,9 +6964,9 @@ dependencies = [ [[package]] name = "untrusted" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" @@ -6982,7 +6998,7 @@ checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" [[package]] name = "vec-set" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -6995,9 +7011,9 @@ dependencies = [ [[package]] name = "vec_map" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vergen" @@ -7050,9 +7066,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasm-bindgen" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f" +checksum = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -7060,24 +7076,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967d37bf6c16cca2973ca3af071d0a2523392e4a594548155d89a678f4237cd" +checksum = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94" dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7add542ea1ac7fdaa9dc25e031a6af33b7d63376292bd24140c637d00d1c312a" +checksum = "8a369c5e1dfb7569e14d62af4da642a3cbc2f9a3652fe586e26ac22222aa4b04" dependencies = [ "cfg-if", "js-sys", @@ -7087,32 +7103,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4" +checksum = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776" dependencies = [ - "quote 1.0.3", + "quote 1.0.4", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931" +checksum = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639" +checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad" [[package]] name = "wasm-timer" @@ -7155,9 +7171,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.37" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb" +checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642" dependencies = [ "js-sys", "wasm-bindgen", @@ -7193,7 +7209,7 @@ dependencies = [ [[package]] name = "weight-fee-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-executive", "frame-support", @@ -7227,7 +7243,7 @@ dependencies = [ [[package]] name = "weights" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "frame-support", "frame-system", @@ -7362,8 +7378,8 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "synstructure", ] diff --git a/README.md b/README.md index ea6b372c6..e1099dceb 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,4 @@ The Substrate Recipes are [GPL 3.0 Licensed](LICENSE) It is open source and [ope ## Using Recipes in External Projects -The pallets and runtimes provided here are tested and ready to be used in other Substrate-based blockchains. The big caveat is that you must use the same upstream Substrate version throughout the project. The recipes currently use Substrate@`v2.0.0-alpha.6`. +The pallets and runtimes provided here are tested and ready to be used in other Substrate-based blockchains. The big caveat is that you must use the same upstream Substrate version throughout the project. The recipes currently use Substrate@`v2.0.0-alpha.7`. diff --git a/nodes/babe-grandpa-node/Cargo.toml b/nodes/babe-grandpa-node/Cargo.toml index eaee66547..8d742063c 100644 --- a/nodes/babe-grandpa-node/Cargo.toml +++ b/nodes/babe-grandpa-node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "babe-grandpa-node" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" edition = "2018" authors = ['Joshy Orndorff', '4meta5', 'Jimmy Chu'] homepage = 'https://substrate.dev/recipes' @@ -23,24 +23,24 @@ tokio = "0.1.22" exit-future = "0.2.0" parking_lot = "0.9.0" trie-root = "0.15.2" -sp-io = '2.0.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client-api = '2.0.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-consensus-babe = '0.8.0-alpha.6' -sp-consensus-babe = '0.8.0-alpha.6' -sc-finality-grandpa = '0.8.0-alpha.6' -sp-finality-grandpa = '2.0.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-basic-authorship = '0.8.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' +sp-io = '2.0.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-client-api = '2.0.0-alpha.7' +sc-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-consensus-babe = '0.8.0-alpha.7' +sp-consensus-babe = '0.8.0-alpha.7' +sc-finality-grandpa = '0.8.0-alpha.7' +sp-finality-grandpa = '2.0.0-alpha.7' +sc-basic-authorship = '0.8.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' # This node only works with runtimes that can provide babe and grandpa authorities. # No other runtimes that come with the recipes provide these APIs, but the substrate demonstration @@ -50,12 +50,12 @@ runtime = { package = "babe-grandpa-runtime", path = "../../runtimes/babe-grandp # In theory the main Substrate node's runtime should work, but it is not published on crates.io # so a git dependency is necessary which leads to: # `perhaps two different versions of crate `sp_runtime` are being used?` -# runtime = { package = "node-runtime", git = "https://github.com/paritytech/substrate/", tag = "v2.0.0-alpha.6" } +# runtime = { package = "node-runtime", git = "https://github.com/paritytech/substrate/", tag = "v2.0.0-alpha.7" } [build-dependencies] vergen = "3.0.4" -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' [features] ocw = [] diff --git a/nodes/babe-grandpa-node/src/service.rs b/nodes/babe-grandpa-node/src/service.rs index 0abcff9c1..93591a42a 100644 --- a/nodes/babe-grandpa-node/src/service.rs +++ b/nodes/babe-grandpa-node/src/service.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use std::time::Duration; -use sc_client::LongestChain; +use sc_consensus::LongestChain; use sc_client_api::ExecutorProvider; use runtime::{self, opaque::Block, RuntimeApi}; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; @@ -36,13 +36,17 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, _fetcher| { + .with_transaction_pool(|config, client, _fetcher, prometheus_registry| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); - Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api))) + Ok(sc_transaction_pool::BasicPool::new( + config, + std::sync::Arc::new(pool_api), + prometheus_registry, + )) })? - .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { + .with_import_queue(|_config, client, mut select_chain, _transaction_pool, spawn_task_handle| { let select_chain = select_chain.take() .ok_or_else(|| sc_service::Error::SelectChainRequired)?; let (grandpa_block_import, grandpa_link) = @@ -64,6 +68,7 @@ macro_rules! new_full_start { None, client, inherent_data_providers.clone(), + spawn_task_handle, )?; import_setup = Some((babe_block_import, grandpa_link, babe_link)); @@ -160,6 +165,7 @@ pub fn new_full(config: Configuration) telemetry_on_connect: Some(service.telemetry_on_connect_stream()), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), prometheus_registry: service.prometheus_registry(), + shared_voter_state: sc_finality_grandpa::SharedVoterState::empty(), }; // the GRANDPA voter task is considered infallible, i.e. @@ -189,16 +195,19 @@ pub fn new_light(config: Configuration) .with_select_chain(|_config, backend| { Ok(LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, fetcher| { + .with_transaction_pool(|config, client, fetcher, prometheus_registry| { let fetcher = fetcher .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); let pool = sc_transaction_pool::BasicPool::with_revalidation_type( - config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, + config, + Arc::new(pool_api), + prometheus_registry, + sc_transaction_pool::RevalidationType::Light, ); Ok(pool) })? - .with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| { + .with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool, spawn_task_handle| { let fetch_checker = fetcher .map(|fetcher| fetcher.checker().clone()) .ok_or_else(|| "Trying to start light import queue without active fetch checker")?; @@ -223,6 +232,7 @@ pub fn new_light(config: Configuration) Some(Box::new(finality_proof_import)), client.clone(), inherent_data_providers.clone(), + spawn_task_handle, )?; Ok((import_queue, finality_proof_request_builder)) diff --git a/nodes/basic-pow/Cargo.toml b/nodes/basic-pow/Cargo.toml index 599b047d9..4618773a8 100644 --- a/nodes/basic-pow/Cargo.toml +++ b/nodes/basic-pow/Cargo.toml @@ -4,7 +4,7 @@ edition = '2018' homepage = 'https://substrate.dev/recipes' name = 'basic-pow' repository = 'https://github.com/substrate-developer-hub/recipes' -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" description = 'A Substrate node that demonstrates minimal proof of work consensus' license = "GPL-3.0-or-later" @@ -19,31 +19,31 @@ structopt = '0.3.8' parity-scale-codec = '1.3.0' sha3 = "0.8" rand = { version = "0.7", features = ["small_rng"] } -sc-consensus-pow = { version = '0.8.0-alpha.6' } -sp-consensus-pow = { version = '0.8.0-alpha.6' } -sc-client-api = { version = '2.0.0-alpha.6' } -sp-blockchain = { version = '2.0.0-alpha.6' } -sp-timestamp = '2.0.0-alpha.6' -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-consensus = '0.8.0-alpha.7' +sc-consensus-pow = '0.8.0-alpha.7' +sp-consensus-pow = '0.8.0-alpha.7' +sc-client-api = '2.0.0-alpha.7' +sp-blockchain = '2.0.0-alpha.7' +sp-timestamp = '2.0.0-alpha.7' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # This node is compatible with any of the runtimes below # --- # Common runtime configured with most Recipes pallets. -runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } +# runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. -# runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} +runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} # Runtime with custom runtime-api (custom API only used in rpc-node) # runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } @@ -51,4 +51,4 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } [build-dependencies] vergen = '3.0.4' -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' diff --git a/nodes/basic-pow/src/service.rs b/nodes/basic-pow/src/service.rs index 6d5880805..52bbaa91b 100644 --- a/nodes/basic-pow/src/service.rs +++ b/nodes/basic-pow/src/service.rs @@ -1,7 +1,7 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. use std::sync::Arc; -use sc_client::LongestChain; +use sc_consensus::LongestChain; use sc_client_api::ExecutorProvider; use runtime::{self, opaque::Block, RuntimeApi}; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; @@ -42,13 +42,17 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, _fetcher| { + .with_transaction_pool(|config, client, _fetcher, prometheus_registry| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); - Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api))) + Ok(sc_transaction_pool::BasicPool::new( + config, + std::sync::Arc::new(pool_api), + prometheus_registry, + )) })? - .with_import_queue(|_config, client, select_chain, _transaction_pool| { + .with_import_queue(|_config, client, select_chain, _transaction_pool, spawn_task_handle| { let pow_block_import = sc_consensus_pow::PowBlockImport::new( client.clone(), @@ -61,8 +65,11 @@ macro_rules! new_full_start { let import_queue = sc_consensus_pow::import_queue( Box::new(pow_block_import.clone()), + None, + None, crate::pow::Sha3Algorithm, inherent_data_providers.clone(), + spawn_task_handle, )?; import_setup = Some(pow_block_import); @@ -137,17 +144,20 @@ pub fn new_light(config: Configuration) .with_select_chain(|_config, backend| { Ok(LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, fetcher| { + .with_transaction_pool(|config, client, fetcher, prometheus_registry| { let fetcher = fetcher .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); let pool = sc_transaction_pool::BasicPool::with_revalidation_type( - config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, + config, + Arc::new(pool_api), + prometheus_registry, + sc_transaction_pool::RevalidationType::Light, ); Ok(pool) })? - .with_import_queue_and_fprb(|_config, client, _backend, _fetcher, select_chain, _tx_pool| { + .with_import_queue_and_fprb(|_config, client, _backend, _fetcher, select_chain, _tx_pool, spawn_task_handle| { let finality_proof_request_builder = Box::new(DummyFinalityProofRequestBuilder::default()) as Box<_>; @@ -162,8 +172,11 @@ pub fn new_light(config: Configuration) let import_queue = sc_consensus_pow::import_queue( Box::new(pow_block_import), + None, + None, Sha3Algorithm, build_inherent_data_providers()?, + spawn_task_handle, )?; Ok((import_queue, finality_proof_request_builder)) diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 2276a3c5a..72c4156b3 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitchen-node" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" edition = "2018" authors = ['Joshy Orndorff', '4meta5', 'Jimmy Chu'] homepage = 'https://substrate.dev/recipes' @@ -23,22 +23,21 @@ tokio = "0.1.22" exit-future = "0.2.0" parking_lot = "0.9.0" trie-root = "0.15.2" -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-client-db = '0.8.0-alpha.6' # This became necessary when converting to instant seal -sp-consensus = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-io = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-timestamp = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-client-db = '0.8.0-alpha.7' # This became necessary when converting to instant seal +sp-consensus = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-io = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-timestamp = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # This node is compatible with any of the runtimes below # --- @@ -59,7 +58,7 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } [build-dependencies] vergen = "3.0.4" -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' [features] ocw = [] diff --git a/nodes/kitchen-node/src/service.rs b/nodes/kitchen-node/src/service.rs index a5091e94d..a6f683ef9 100644 --- a/nodes/kitchen-node/src/service.rs +++ b/nodes/kitchen-node/src/service.rs @@ -1,7 +1,7 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // use std::sync::Arc; -// use sc_client::LongestChain; +// use sc_consensus::LongestChain; // use sc_client_api::ExecutorProvider; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration}; use sp_inherents::InherentDataProviders; @@ -26,7 +26,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/nodes/manual-seal/Cargo.toml b/nodes/manual-seal/Cargo.toml index 5a4714847..f381b9a3a 100644 --- a/nodes/manual-seal/Cargo.toml +++ b/nodes/manual-seal/Cargo.toml @@ -5,7 +5,7 @@ edition = '2018' homepage = 'https://substrate.dev' name = 'manual-seal' repository = 'https://github.com/paritytech/substrate/' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' description = 'A Substrate-based node that uses the instant-seal and manual-seal consensus engines' license = "GPL-3.0-or-later" @@ -22,24 +22,23 @@ sha3 = "0.8" rand = { version = "0.7", features = ["small_rng"] } jsonrpc-core = "14.0.5" -sc-client-db = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' -sc-rpc = '2.0.0-alpha.6' -sc-client-api = '2.0.0-alpha.6' -sp-blockchain = '2.0.0-alpha.6' -sp-timestamp = '2.0.0-alpha.6' -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-client-db = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' +sc-rpc = '2.0.0-alpha.7' +sc-client-api = '2.0.0-alpha.7' +sp-blockchain = '2.0.0-alpha.7' +sp-timestamp = '2.0.0-alpha.7' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # This node is compatible with any of the runtimes below # --- @@ -57,4 +56,4 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } [build-dependencies] vergen = '3.0.4' -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' diff --git a/nodes/manual-seal/src/service.rs b/nodes/manual-seal/src/service.rs index 7abf44bb8..8a8bc5a68 100644 --- a/nodes/manual-seal/src/service.rs +++ b/nodes/manual-seal/src/service.rs @@ -26,7 +26,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/nodes/rpc-node/Cargo.toml b/nodes/rpc-node/Cargo.toml index c93c0e6c3..3b794d0b5 100644 --- a/nodes/rpc-node/Cargo.toml +++ b/nodes/rpc-node/Cargo.toml @@ -3,7 +3,7 @@ authors = ['Anonymous'] build = 'build.rs' edition = '2018' name = 'rpc-node' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' homepage = 'https://substrate.dev/recipes' repository = 'https://github.com/substrate-developer-hub/recipes' description = 'A Substrate node that demonstrates a custom RPC endpoint' @@ -23,27 +23,26 @@ structopt = "0.3.8" jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sc-rpc = { version = '2.0.0-alpha.6' } -sc-client-api = '2.0.0-alpha.6' -sc-client-db = '0.8.0-alpha.6' +sc-rpc = { version = '2.0.0-alpha.7' } +sc-client-api = '2.0.0-alpha.7' +sc-client-db = '0.8.0-alpha.7' sum-storage-rpc = { path = "../../pallets/sum-storage/rpc" } ctrlc = { features = ['termination'], version = '3.1.3' } futures01 = { package = 'futures', version = '0.1.29'} -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-io = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-timestamp = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-io = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-timestamp = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # RPC Node only works with Runtime's that provide the sum-storage-runtime-api # That means it only works with the api-runtime @@ -51,4 +50,4 @@ runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } [build-dependencies] vergen = '3.0.4' -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' diff --git a/nodes/rpc-node/src/service.rs b/nodes/rpc-node/src/service.rs index d48661212..191ac8625 100644 --- a/nodes/rpc-node/src/service.rs +++ b/nodes/rpc-node/src/service.rs @@ -1,7 +1,11 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // use std::sync::Arc; +<<<<<<< HEAD +// use sc_consensus::LongestChain; +======= // use sc_client::LongestChain; +>>>>>>> master // use sc_client_api::ExecutorProvider; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration}; use sp_inherents::InherentDataProviders; @@ -29,7 +33,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/pallets/adding-machine/Cargo.toml b/pallets/adding-machine/Cargo.toml index 2fd64e039..ab1d0bd6b 100644 --- a/pallets/adding-machine/Cargo.toml +++ b/pallets/adding-machine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "adding-machine" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5, Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { package = "frame-support", version = '2.0.0-alpha.6', default_features = false } -system = { package = "frame-system", version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = "frame-support", version = '2.0.0-alpha.7', default_features = false } +system = { package = "frame-system", version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/adding-machine/src/lib.rs b/pallets/adding-machine/src/lib.rs index 481c7fcd9..9d991c421 100644 --- a/pallets/adding-machine/src/lib.rs +++ b/pallets/adding-machine/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_error, decl_module, decl_storage, ensure, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use system::ensure_signed; @@ -36,7 +35,7 @@ decl_module! { /// Adds the supplies value to the stored value. /// Checks for unlucky number 13. /// Checks for addition overflow using an explicit match - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add(origin, val_to_add: u32) -> DispatchResult { let _ = ensure_signed(origin)?; @@ -58,7 +57,7 @@ decl_module! { /// Adds the supplies value to the stored value. /// Checks for unlucky number 13. /// Checks for addition overflow concisely using `ok_or` - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_alternate(origin, val_to_add: u32) -> DispatchResult { let _ = ensure_signed(origin)?; @@ -73,7 +72,7 @@ decl_module! { } /// Resets the stoage value to zero - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn reset(origin) -> DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/basic-token/Cargo.toml b/pallets/basic-token/Cargo.toml index 87838a081..dff8a420b 100644 --- a/pallets/basic-token/Cargo.toml +++ b/pallets/basic-token/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "basic-token" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -15,10 +15,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/basic-token/src/lib.rs b/pallets/basic-token/src/lib.rs index c8ff9d910..3960d99c8 100644 --- a/pallets/basic-token/src/lib.rs +++ b/pallets/basic-token/src/lib.rs @@ -7,7 +7,6 @@ use frame_support::{ decl_event, decl_module, decl_error, decl_storage, ensure, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -20,11 +19,11 @@ pub trait Trait: system::Trait { decl_storage! { trait Store for Module as Token { - pub Balances get(get_balance): map hasher(blake2_128_concat) T::AccountId => u64; + pub Balances get(fn get_balance): map hasher(blake2_128_concat) T::AccountId => u64; - pub TotalSupply get(total_supply): u64 = 21000000; + pub TotalSupply get(fn total_supply): u64 = 21000000; - Init get(is_init): bool; + Init get(fn is_init): bool; } } @@ -55,7 +54,7 @@ decl_module! { /// Initialize the token /// transfers the total_supply amout to the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn init(origin) -> DispatchResult { let sender = ensure_signed(origin)?; ensure!(Self::is_init() == false, >::AlreadyInitialized); @@ -67,7 +66,7 @@ decl_module! { } /// Transfer tokens from one account to another - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn transfer(_origin, to: T::AccountId, value: u64) -> DispatchResult { let sender = ensure_signed(_origin)?; let sender_balance = Self::get_balance(&sender); diff --git a/pallets/charity/Cargo.toml b/pallets/charity/Cargo.toml index 7a8cf2124..09f5ebc9d 100644 --- a/pallets/charity/Cargo.toml +++ b/pallets/charity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "charity" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,35 +22,35 @@ parity-scale-codec = { version = "1.3.0", features = ["derive"], default-feature [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/charity/src/lib.rs b/pallets/charity/src/lib.rs index 09398655e..8007c6930 100644 --- a/pallets/charity/src/lib.rs +++ b/pallets/charity/src/lib.rs @@ -20,7 +20,6 @@ use frame_support::{ decl_storage, dispatch::{DispatchResult, DispatchError}, traits::{Currency, ExistenceRequirement::AllowDeath, OnUnbalanced, Imbalance}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed, ensure_root}; @@ -78,7 +77,7 @@ decl_module! { fn deposit_event() = default; /// Donate some funds to the charity - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn donate( origin, amount: BalanceOf @@ -96,7 +95,7 @@ decl_module! { /// /// Take funds from the Charity's pot and send them somewhere. This call requires root origin, /// which means it must come from a governance mechanism such as Substrate's Democracy pallet. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn allocate( origin, dest: T::AccountId, diff --git a/pallets/check-membership/Cargo.toml b/pallets/check-membership/Cargo.toml index 484204e70..32a21835d 100644 --- a/pallets/check-membership/Cargo.toml +++ b/pallets/check-membership/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "check-membership" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -17,8 +17,8 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-std = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-std = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/check-membership/src/lib.rs b/pallets/check-membership/src/lib.rs index 826f14d65..4fd2605b6 100644 --- a/pallets/check-membership/src/lib.rs +++ b/pallets/check-membership/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, ensure, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use sp_std::vec::Vec; @@ -39,20 +38,20 @@ decl_module! { fn deposit_event() = default; /// Adds the caller to the membership set unless the caller is already present - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_member(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; // Ensure that the caller is not already a member ensure!(!Self::is_member(&new_member), "already a member"); - >::append(&[new_member.clone()])?; + >::append(&new_member); Self::deposit_event(RawEvent::AddMember(new_member)); Ok(()) } /// Removes the caller from the membership set - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_member(origin) -> DispatchResult { let old_member = ensure_signed(origin)?; ensure!(Self::is_member(&old_member), "not a member so can't be taken out of the set"); diff --git a/pallets/child-trie/Cargo.toml b/pallets/child-trie/Cargo.toml index 7f26531d9..908eefdbb 100644 --- a/pallets/child-trie/Cargo.toml +++ b/pallets/child-trie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "child-trie" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,28 +22,28 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.system] default_features = false package = 'frame-system' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.runtime-primitives] default_features = false package = 'sp-runtime' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.rstd] default_features = false package = 'sp-std' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.primitives] default_features = false package = 'sp-core' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/compounding-interest/Cargo.toml b/pallets/compounding-interest/Cargo.toml index 92b0a2872..dee20e87e 100644 --- a/pallets/compounding-interest/Cargo.toml +++ b/pallets/compounding-interest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "compounding-interest" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -28,34 +28,34 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-arithmetic] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/compounding-interest/src/lib.rs b/pallets/compounding-interest/src/lib.rs index 535e3d9d6..b95001f8d 100644 --- a/pallets/compounding-interest/src/lib.rs +++ b/pallets/compounding-interest/src/lib.rs @@ -17,7 +17,6 @@ use frame_support::{ decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use substrate_fixed::{ @@ -72,7 +71,7 @@ decl_module! { fn deposit_event() = default; /// Deposit some funds into the compounding interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn deposit_continuous(origin, val_to_add: u64) -> DispatchResult { ensure_signed(origin)?; @@ -93,7 +92,7 @@ decl_module! { } /// Withdraw some funds from the compounding interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn withdraw_continuous(origin, val_to_take: u64) -> DispatchResult { ensure_signed(origin)?; @@ -114,7 +113,7 @@ decl_module! { } /// Deposit some funds into the discrete interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn deposit_discrete(origin, val_to_add: u64) -> DispatchResult { ensure_signed(origin)?; @@ -129,7 +128,7 @@ decl_module! { } /// Withdraw some funds from the discrete interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn withdraw_discrete(origin, val_to_take: u64) -> DispatchResult { ensure_signed(origin)?; diff --git a/pallets/constant-config/Cargo.toml b/pallets/constant-config/Cargo.toml index a235a93ad..068e16aaf 100644 --- a/pallets/constant-config/Cargo.toml +++ b/pallets/constant-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "constant-config" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,24 +22,24 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/constant-config/src/lib.rs b/pallets/constant-config/src/lib.rs index 45f377f5d..144ec8aa1 100644 --- a/pallets/constant-config/src/lib.rs +++ b/pallets/constant-config/src/lib.rs @@ -16,7 +16,6 @@ use frame_support::{ dispatch::{DispatchResult, DispatchError}, ensure, traits::Get, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -58,7 +57,7 @@ decl_module! { const ClearFrequency: T::BlockNumber = T::ClearFrequency::get(); /// Add to the stored value. The `val_to_add` parameter cannot exceed the specified manimum. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_value(origin, val_to_add: u32) -> DispatchResult { let _ = ensure_signed(origin)?; ensure!(val_to_add <= T::MaxAddend::get(), "value must be <= maximum add amount constant"); @@ -78,7 +77,7 @@ decl_module! { /// For testing purposes /// Sets the stored value to a given value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_value(origin, value: u32) -> DispatchResult { let _ = ensure_signed(origin)?; ::put(value); diff --git a/pallets/currency-imbalances/Cargo.toml b/pallets/currency-imbalances/Cargo.toml index dd14a2e9e..2c18dcb43 100644 --- a/pallets/currency-imbalances/Cargo.toml +++ b/pallets/currency-imbalances/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "currency-imbalances" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -21,20 +21,20 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/currency-imbalances/src/lib.rs b/pallets/currency-imbalances/src/lib.rs index 3fb12ea56..87399e61a 100644 --- a/pallets/currency-imbalances/src/lib.rs +++ b/pallets/currency-imbalances/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, traits::{Currency, OnUnbalanced, Imbalance, ReservableCurrency}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -46,7 +45,7 @@ decl_module! { fn deposit_event() = default; /// Slashes the specified amount of funds from the specified account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn slash_funds(origin, to_punish: T::AccountId, collateral: BalanceOf) { let _ = ensure_signed(origin)?; @@ -58,7 +57,7 @@ decl_module! { } /// Awards the specified amount of funds to the specified accoutn - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn reward_funds(origin, to_reward: T::AccountId, reward: BalanceOf) { let _ = ensure_signed(origin)?; diff --git a/pallets/default-instance/Cargo.toml b/pallets/default-instance/Cargo.toml index e4f1ec3dc..29e9b4ded 100644 --- a/pallets/default-instance/Cargo.toml +++ b/pallets/default-instance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "default-instance" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/default-instance/src/lib.rs b/pallets/default-instance/src/lib.rs index 95803905e..6a22b4e82 100644 --- a/pallets/default-instance/src/lib.rs +++ b/pallets/default-instance/src/lib.rs @@ -5,7 +5,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -47,7 +46,7 @@ decl_module! { /// The only dispatchable call, updates the single storage item, /// and emits an event. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call(origin) -> DispatchResult { let caller = ensure_signed(origin)?; diff --git a/pallets/double-map/Cargo.toml b/pallets/double-map/Cargo.toml index 1dac1dae8..efa2cb166 100644 --- a/pallets/double-map/Cargo.toml +++ b/pallets/double-map/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "double-map" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -23,29 +23,29 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/double-map/src/lib.rs b/pallets/double-map/src/lib.rs index 08e08039e..9ee9d7a26 100644 --- a/pallets/double-map/src/lib.rs +++ b/pallets/double-map/src/lib.rs @@ -15,7 +15,6 @@ use frame_support::{ dispatch::DispatchResult, ensure, storage::{StorageDoubleMap, StorageMap, StorageValue}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -58,18 +57,18 @@ decl_module! { fn deposit_event() = default; /// Join the `AllMembers` vec before joining a group - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn join_all_members(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; ensure!(!Self::is_member(&new_member), "already a member, can't join"); - >::append(vec!(new_member.clone())).map_err(|_e| "appending new member error")?; + >::append(&new_member.clone()); Self::deposit_event(RawEvent::NewMember(new_member)); Ok(()) } /// Put MemberScore (for testing purposes) - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn join_a_group(origin, index: GroupIndex, score: u32) -> DispatchResult { let member = ensure_signed(origin)?; ensure!(Self::is_member(&member), "not a member, can't remove"); @@ -81,7 +80,7 @@ decl_module! { } /// Remove a member - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_member(origin) -> DispatchResult { let member_to_remove = ensure_signed(origin)?; ensure!(Self::is_member(&member_to_remove), "not a member, can't remove"); @@ -93,7 +92,7 @@ decl_module! { } /// Remove group score - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_group_score(origin, group: GroupIndex) -> DispatchResult { let member = ensure_signed(origin)?; diff --git a/pallets/execution-schedule/Cargo.toml b/pallets/execution-schedule/Cargo.toml index 6fc6b9137..d1b8c01c1 100644 --- a/pallets/execution-schedule/Cargo.toml +++ b/pallets/execution-schedule/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "execution-schedule" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -23,24 +23,24 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies] rand = "0.7.2" -sp-core = { default_features = false, version = '2.0.0-alpha.6' } -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/execution-schedule/src/lib.rs b/pallets/execution-schedule/src/lib.rs index fbb58cf77..111c6b3f4 100644 --- a/pallets/execution-schedule/src/lib.rs +++ b/pallets/execution-schedule/src/lib.rs @@ -10,7 +10,7 @@ use frame_support::{ dispatch::{DispatchResult, DispatchError}, ensure, traits::Get, - weights::{SimpleDispatchInfo, Weight}, + weights::Weight, }; use frame_system::{self as system, ensure_signed}; @@ -125,7 +125,7 @@ decl_module! { /// /// - the task initially has no priority /// - only council members can schedule tasks - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn schedule_task(origin, data: Vec) -> DispatchResult { let proposer = ensure_signed(origin)?; ensure!(Self::is_on_council(&proposer), "only members of the council can schedule tasks"); @@ -154,7 +154,7 @@ decl_module! { /// /// - members of the council have limited voting power to increase the priority /// of tasks - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn signal_priority(origin, id: TaskId, signal: PriorityScore) -> DispatchResult { let voter = ensure_signed(origin)?; ensure!(Self::is_on_council(&voter), "The voting member must be on the council"); diff --git a/pallets/fixed-point/Cargo.toml b/pallets/fixed-point/Cargo.toml index e49bd97dd..cc13f7b69 100644 --- a/pallets/fixed-point/Cargo.toml +++ b/pallets/fixed-point/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fixed-point" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -28,34 +28,34 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-arithmetic] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/fixed-point/src/lib.rs b/pallets/fixed-point/src/lib.rs index 3a62134c7..ea0adb399 100644 --- a/pallets/fixed-point/src/lib.rs +++ b/pallets/fixed-point/src/lib.rs @@ -21,7 +21,6 @@ use frame_support::{ decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use substrate_fixed::types::U16F16; @@ -74,7 +73,7 @@ decl_module! { /// Update the Permill accumulator implementation's value by multiplying it /// by the new factor given in the extrinsic - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn update_permill(origin, new_factor: Permill) -> DispatchResult { ensure_signed(origin)?; @@ -94,7 +93,7 @@ decl_module! { /// Update the Substrate-fixed accumulator implementation's value by multiplying it /// by the new factor given in the extrinsic - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn update_fixed(origin, new_factor: U16F16) -> DispatchResult { ensure_signed(origin)?; @@ -114,7 +113,7 @@ decl_module! { /// Update the manually-implemented accumulator's value by multiplying it /// by the new factor given in the extrinsic - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn update_manual(origin, new_factor: u32) -> DispatchResult { ensure_signed(origin)?; diff --git a/pallets/generic-event/Cargo.toml b/pallets/generic-event/Cargo.toml index b51099f23..1af85ed21 100644 --- a/pallets/generic-event/Cargo.toml +++ b/pallets/generic-event/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generic-event" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { package = "frame-support", version = '2.0.0-alpha.6', default_features = false } -system = { package = "frame-system", version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = "frame-support", version = '2.0.0-alpha.7', default_features = false } +system = { package = "frame-system", version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/generic-event/src/lib.rs b/pallets/generic-event/src/lib.rs index 6ae214849..d4743e002 100644 --- a/pallets/generic-event/src/lib.rs +++ b/pallets/generic-event/src/lib.rs @@ -5,7 +5,6 @@ use frame_support::{ decl_event, decl_module, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use system::ensure_signed; @@ -21,7 +20,7 @@ decl_module! { fn deposit_event() = default; /// A simple call that does little more than emit an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn do_something(origin, input: u32) -> DispatchResult { let user = ensure_signed(origin)?; diff --git a/pallets/hello-substrate/Cargo.toml b/pallets/hello-substrate/Cargo.toml index 0468f6604..fd92cc367 100644 --- a/pallets/hello-substrate/Cargo.toml +++ b/pallets/hello-substrate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hello-substrate" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["shawntabrizi"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,17 +16,17 @@ std = [ [dependencies] parity-scale-codec = { version = '1.3.0', features = ['derive'], default-features = false} -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/hello-substrate/src/lib.rs b/pallets/hello-substrate/src/lib.rs index 7504d5f6d..a7692fc29 100644 --- a/pallets/hello-substrate/src/lib.rs +++ b/pallets/hello-substrate/src/lib.rs @@ -7,7 +7,6 @@ use frame_support::{ decl_module, dispatch::DispatchResult, debug, - weights::SimpleDispatchInfo, }; use frame_system::{ self as system, ensure_signed }; use sp_runtime::print; @@ -21,7 +20,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { /// A function that says hello to the user by printing messages to the node log - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn say_hello(origin) -> DispatchResult { // Ensure that the caller is a regular keypair account let caller = ensure_signed(origin)?; diff --git a/pallets/last-caller/Cargo.toml b/pallets/last-caller/Cargo.toml index 9331346fa..19381d4ba 100644 --- a/pallets/last-caller/Cargo.toml +++ b/pallets/last-caller/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "last-caller" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/last-caller/src/lib.rs b/pallets/last-caller/src/lib.rs index 933db58e7..01b735206 100644 --- a/pallets/last-caller/src/lib.rs +++ b/pallets/last-caller/src/lib.rs @@ -5,7 +5,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -45,7 +44,7 @@ decl_module! { // The only dispatchable call, updates the single storage item, // and emits an event. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call(origin) -> DispatchResult { let caller = ensure_signed(origin)?; diff --git a/pallets/lockable-currency/Cargo.toml b/pallets/lockable-currency/Cargo.toml index adb78c996..146487bce 100644 --- a/pallets/lockable-currency/Cargo.toml +++ b/pallets/lockable-currency/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lockable-currency" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,25 +22,25 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/lockable-currency/src/lib.rs b/pallets/lockable-currency/src/lib.rs index 3e1e3a4e6..4b92e9c29 100644 --- a/pallets/lockable-currency/src/lib.rs +++ b/pallets/lockable-currency/src/lib.rs @@ -7,7 +7,6 @@ use frame_support::{ traits::{ Currency, LockIdentifier, LockableCurrency, WithdrawReason, WithdrawReasons, }, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -40,7 +39,7 @@ decl_module! { fn deposit_event() = default; /// Locks the specified amount of tokens from the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn lock_capital(origin, amount: BalanceOf) -> DispatchResult { let user = ensure_signed(origin)?; @@ -56,7 +55,7 @@ decl_module! { } /// Extends the lock period - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn extend_lock(origin, amount: BalanceOf) -> DispatchResult { let user = ensure_signed(origin)?; @@ -72,7 +71,7 @@ decl_module! { } /// Releases all locked tokens - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn unlock_all(origin) -> DispatchResult { let user = ensure_signed(origin)?; diff --git a/pallets/offchain-demo/Cargo.toml b/pallets/offchain-demo/Cargo.toml index bdc13d2fe..884f1edff 100644 --- a/pallets/offchain-demo/Cargo.toml +++ b/pallets/offchain-demo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "offchain-demo" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Parity Technologies "] edition = "2018" homepage = "https://substrate.dev/recipes/" @@ -17,12 +17,12 @@ alt_serde = { version = "1", default-features = false, features = ["derive"] } serde_json = { version = "1", default-features = false, git = "https://github.com/Xanewok/json", branch = "no-std", features = ["alloc"] } # Substrate dependencies -frame-support = { default-features = false, version = '2.0.0-alpha.6' } -frame-system = { default-features = false, version = '2.0.0-alpha.6' } -sp-core = { default-features = false, version = '2.0.0-alpha.6' } -sp-io = { default-features = false, version = '2.0.0-alpha.6' } -sp-runtime = { default-features = false, version = '2.0.0-alpha.6' } -sp-std = { default-features = false, version = '2.0.0-alpha.6' } +frame-support = { default-features = false, version = '2.0.0-alpha.7' } +frame-system = { default-features = false, version = '2.0.0-alpha.7' } +sp-core = { default-features = false, version = '2.0.0-alpha.7' } +sp-io = { default-features = false, version = '2.0.0-alpha.7' } +sp-runtime = { default-features = false, version = '2.0.0-alpha.7' } +sp-std = { default-features = false, version = '2.0.0-alpha.7' } [features] default = ['std'] diff --git a/pallets/offchain-demo/src/lib.rs b/pallets/offchain-demo/src/lib.rs index 366fa9137..580274fbf 100644 --- a/pallets/offchain-demo/src/lib.rs +++ b/pallets/offchain-demo/src/lib.rs @@ -1,4 +1,4 @@ -//! A demonstration of an offchain worker that submits onchain callbacks +//! A demonstration of an offchain worker that sends onchain callbacks #![cfg_attr(not(feature = "std"), no_std)] @@ -8,7 +8,6 @@ mod tests; use frame_support::{ debug, dispatch::DispatchResult, decl_module, decl_storage, decl_event, decl_error, - weights::SimpleDispatchInfo, }; use parity_scale_codec::{Encode, Decode}; use core::{fmt, convert::TryInto}; @@ -89,10 +88,10 @@ pub trait Trait: system::Trait { type Call: From>; /// The overarching event type. type Event: From> + Into<::Event>; - /// The type to sign and submit transactions. - type SubmitSignedTransaction: offchain::SubmitSignedTransaction::Call>; - /// The type to submit unsigned transactions. - type SubmitUnsignedTransaction: offchain::SubmitUnsignedTransaction::Call>; + /// The type to sign and send transactions. + type SendSignedTransaction: offchain::SendSignedTransaction::Call>; + /// The type to send unsigned transactions. + type SendUnsignedTransaction: offchain::SendUnsignedTransaction::Call>; } // Custom data type @@ -136,14 +135,14 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { fn deposit_event() = default; - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn submit_number_signed(origin, number: u64) -> DispatchResult { debug::info!("submit_number_signed: {:?}", number); let who = ensure_signed(origin)?; Self::append_or_replace_number(Some(who), number) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn submit_number_unsigned(origin, _block: T::BlockNumber, number: u64) -> DispatchResult { debug::info!("submit_number_unsigned: {:?}", number); let _ = ensure_none(origin)?; @@ -193,8 +192,8 @@ impl Module { } fn choose_tx_type(block_number: T::BlockNumber) -> TransactionType { - // Decide what type of transaction to submit based on block number. - // Each block the offchain worker will submit one type of transaction back to the chain. + // Decide what type of transaction to send based on block number. + // Each block the offchain worker will send one type of transaction back to the chain. // First a signed transaction, then an unsigned transaction, then an http fetch and json parsing. match block_number.try_into().ok().unwrap() % 3 { 0 => TransactionType::SignedSubmitNumber, @@ -222,7 +221,7 @@ impl Module { // If we are using a get-check-set access pattern, we likely want to use `mutate` to access // the storage in one go. // - // Ref: https://substrate.dev/rustdocs/v2.0.0-alpha.6/sp_runtime/offchain/storage/struct.StorageValueRef.html + // Ref: https://substrate.dev/rustdocs/v2.0.0-alpha.7/sp_runtime/offchain/storage/struct.StorageValueRef.html if let Some(Some(gh_info)) = s_info.get::() { // gh-info has already been fetched. Return early. debug::info!("cached gh-info: {:?}", gh_info); @@ -333,8 +332,8 @@ impl Module { } fn signed_submit_number(block_number: T::BlockNumber) -> Result<(), Error> { - use offchain::SubmitSignedTransaction; - if !T::SubmitSignedTransaction::can_sign() { + use offchain::SendSignedTransaction; + if !T::SendSignedTransaction::can_sign() { debug::error!("No local account available"); return Err(>::SignedSubmitNumberError); } @@ -347,7 +346,7 @@ impl Module { // representing the call, we've just created. // Submit signed will return a vector of results for all accounts that were found in the // local keystore with expected `KEY_TYPE`. - let results = T::SubmitSignedTransaction::submit_signed(call); + let results = T::SendSignedTransaction::submit_signed(call); for (_acc, res) in &results { match res { Ok(()) => { debug::native::info!("off-chain send_signed: acc: {}| number: {}", _acc, submission); }, @@ -361,7 +360,7 @@ impl Module { } fn unsigned_submit_number(block_number: T::BlockNumber) -> Result<(), Error> { - use offchain::SubmitUnsignedTransaction; + use offchain::SendUnsignedTransaction; let submission: u64 = block_number.try_into().ok().unwrap() as u64; // Submitting the current block number back on-chain. diff --git a/pallets/randomness/Cargo.toml b/pallets/randomness/Cargo.toml index e7198813e..3264ba6a8 100644 --- a/pallets/randomness/Cargo.toml +++ b/pallets/randomness/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "randomness" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,17 +10,17 @@ license = "GPL-3.0-or-later" parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } # Substrate pallet/frame dependencies -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } -sp-std = { version = '2.0.0-alpha.6', default_features = false } -sp-core = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } +sp-std = { version = '2.0.0-alpha.7', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-io = { version = '2.0.0-alpha.6' } -pallet-randomness-collective-flip = { version = '2.0.0-alpha.6' } -pallet-babe = { version = '2.0.0-alpha.6' } -pallet-timestamp = { version = '2.0.0-alpha.6' } +sp-io = { version = '2.0.0-alpha.7' } +pallet-randomness-collective-flip = { version = '2.0.0-alpha.7' } +pallet-babe = { version = '2.0.0-alpha.7' } +pallet-timestamp = { version = '2.0.0-alpha.7' } [features] default = ['std'] diff --git a/pallets/randomness/src/lib.rs b/pallets/randomness/src/lib.rs index 48ae582e0..278fc9c61 100644 --- a/pallets/randomness/src/lib.rs +++ b/pallets/randomness/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, traits::Randomness, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use parity_scale_codec::Encode; @@ -45,7 +44,7 @@ decl_module! { fn deposit_event() = default; /// Grab a random seed and random value from the randomness collective flip pallet - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call_collective_flip(origin) -> DispatchResult { let _ = ensure_signed(origin)?; @@ -61,7 +60,7 @@ decl_module! { } /// Grab a random seed and random value from the babe pallet - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call_babe_vrf(origin) -> DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/reservable-currency/Cargo.toml b/pallets/reservable-currency/Cargo.toml index cf8f89f81..86306d2fe 100644 --- a/pallets/reservable-currency/Cargo.toml +++ b/pallets/reservable-currency/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reservable-currency" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,15 +22,15 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false @@ -39,8 +39,8 @@ version = '2.0.0-alpha.5' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/reservable-currency/src/lib.rs b/pallets/reservable-currency/src/lib.rs index 311dfddb6..4729805a4 100644 --- a/pallets/reservable-currency/src/lib.rs +++ b/pallets/reservable-currency/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, dispatch::DispatchResult, traits::{Currency, ReservableCurrency, ExistenceRequirement::AllowDeath}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -43,7 +42,7 @@ decl_module! { fn deposit_event() = default; /// Reserves the specified amount of funds from the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn reserve_funds(origin, amount: BalanceOf) -> DispatchResult { let locker = ensure_signed(origin)?; @@ -57,7 +56,7 @@ decl_module! { } /// Unreserves the specified amount of funds from the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn unreserve_funds(origin, amount: BalanceOf) -> DispatchResult { let unlocker = ensure_signed(origin)?; @@ -71,7 +70,7 @@ decl_module! { } /// Transfers funds. Essentially a wrapper around the Currency's own transfer method - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn transfer_funds(origin, dest: T::AccountId, amount: BalanceOf) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -85,7 +84,7 @@ decl_module! { /// Atomically unreserves funds and and transfers them. /// might be useful in closed economic systems - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn unreserve_and_transfer( origin, to_punish: T::AccountId, diff --git a/pallets/ringbuffer-queue/Cargo.toml b/pallets/ringbuffer-queue/Cargo.toml index 1b64df42d..7036c1649 100644 --- a/pallets/ringbuffer-queue/Cargo.toml +++ b/pallets/ringbuffer-queue/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ringbuffer-queue" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["apopiak"] edition = "2018" license = "GPL-3.0-or-later" @@ -15,11 +15,11 @@ std = [ [dependencies] codec = { package = 'parity-scale-codec', default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } -sp-std = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } +sp-std = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/ringbuffer-queue/src/lib.rs b/pallets/ringbuffer-queue/src/lib.rs index 6dfcbe817..d92f4b6b9 100644 --- a/pallets/ringbuffer-queue/src/lib.rs +++ b/pallets/ringbuffer-queue/src/lib.rs @@ -7,7 +7,6 @@ use codec::{Decode, Encode}; use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use sp_std::prelude::*; @@ -54,7 +53,7 @@ decl_module! { fn deposit_event() = default; /// Add an item to the queue - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn add_to_queue(origin, integer: i32, boolean: bool) -> DispatchResult { // only a user can push into the queue let _user = ensure_signed(origin)?; @@ -66,7 +65,7 @@ decl_module! { } /// Add several items to the queue - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn add_multiple(origin, integers: Vec, boolean: bool) -> DispatchResult { // only a user can push into the queue let _user = ensure_signed(origin)?; @@ -80,7 +79,7 @@ decl_module! { } /// Remove and return an item from the queue - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn pop_from_queue(origin) -> DispatchResult { // only a user can pop from the queue let _user = ensure_signed(origin)?; diff --git a/pallets/simple-crowdfund/Cargo.toml b/pallets/simple-crowdfund/Cargo.toml index 680b18013..afe345245 100644 --- a/pallets/simple-crowdfund/Cargo.toml +++ b/pallets/simple-crowdfund/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-crowdfund" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -27,37 +27,37 @@ version = '1.3.0' default_features = false package = 'frame-support' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.system] default_features = false package = 'frame-system' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-storage] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.rstd] default_features = false package = 'sp-std' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/simple-event/Cargo.toml b/pallets/simple-event/Cargo.toml index b45ece06d..309453925 100644 --- a/pallets/simple-event/Cargo.toml +++ b/pallets/simple-event/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-event" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { package = "frame-support", version = '2.0.0-alpha.6', default_features = false } -system = { package = "frame-system", version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = "frame-support", version = '2.0.0-alpha.7', default_features = false } +system = { package = "frame-system", version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/simple-event/src/lib.rs b/pallets/simple-event/src/lib.rs index f2a51daea..249eb6514 100644 --- a/pallets/simple-event/src/lib.rs +++ b/pallets/simple-event/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use system::ensure_signed; @@ -22,7 +21,7 @@ decl_module! { fn deposit_event() = default; /// A simple call that does little more than emit an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn do_something(origin, input: u32) -> DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/simple-map/Cargo.toml b/pallets/simple-map/Cargo.toml index 6965d9a2b..89fbe25a8 100644 --- a/pallets/simple-map/Cargo.toml +++ b/pallets/simple-map/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-map" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -15,10 +15,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/simple-map/src/lib.rs b/pallets/simple-map/src/lib.rs index bf2bca1dc..cea608f06 100644 --- a/pallets/simple-map/src/lib.rs +++ b/pallets/simple-map/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{decl_event, decl_module, decl_storage, decl_error, dispatch::DispatchResult, ensure, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -65,7 +64,7 @@ decl_module! { fn deposit_event() = default; /// Set the value stored at a particular key - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_single_entry(origin, entry: u32) -> DispatchResult { // A user can only set their own entry let user = ensure_signed(origin)?; @@ -77,7 +76,7 @@ decl_module! { } /// Read the value stored at a particular key and emit it in an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn get_single_entry(origin, account: T::AccountId) -> DispatchResult { // Any user can get any other user's entry let getter = ensure_signed(origin)?; @@ -90,7 +89,7 @@ decl_module! { /// Read the value stored at a particular key,while removing it from the map. /// Also emit the read value in an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn take_single_entry(origin) -> DispatchResult { // A user can only take (delete) their own entry let user = ensure_signed(origin)?; @@ -102,7 +101,7 @@ decl_module! { } /// Increase the value associated with a particular key - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn increase_single_entry(origin, add_this_val: u32) -> DispatchResult { // A user can only mutate their own entry let user = ensure_signed(origin)?; diff --git a/pallets/single-value/Cargo.toml b/pallets/single-value/Cargo.toml index 59ea6cf07..bde4eab7a 100644 --- a/pallets/single-value/Cargo.toml +++ b/pallets/single-value/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "single-value" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/single-value/src/lib.rs b/pallets/single-value/src/lib.rs index 11814529c..10c72660e 100644 --- a/pallets/single-value/src/lib.rs +++ b/pallets/single-value/src/lib.rs @@ -4,7 +4,6 @@ use frame_support::{ decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -24,7 +23,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { /// Set the storaged u32 value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_value(origin, value: u32) -> DispatchResult { ensure_signed(origin)?; @@ -36,7 +35,7 @@ decl_module! { /// Set the stored Account Id. The syntax is slightly more complex than it was for the /// stored u32 because the `AccountId` type comes from the pallet's configuration trait. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_account(origin) -> DispatchResult { let who = ensure_signed(origin)?; diff --git a/pallets/storage-cache/Cargo.toml b/pallets/storage-cache/Cargo.toml index ee5803ae6..8f376c831 100644 --- a/pallets/storage-cache/Cargo.toml +++ b/pallets/storage-cache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storage-cache" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,14 +10,14 @@ license = "GPL-3.0-or-later" parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } # Substrate pallet/frame dependencies -frame-support = { package = 'frame-support', version = '2.0.0-alpha.6', default_features = false } -frame-system = { package = 'frame-system', version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } -sp-std = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = 'frame-support', version = '2.0.0-alpha.7', default_features = false } +frame-system = { package = 'frame-system', version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } +sp-std = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } [features] default = ['std'] diff --git a/pallets/storage-cache/src/lib.rs b/pallets/storage-cache/src/lib.rs index 87e20c9e6..d84c2c979 100644 --- a/pallets/storage-cache/src/lib.rs +++ b/pallets/storage-cache/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -54,7 +53,7 @@ decl_module! { /// (Copy) inefficient way of updating value in storage /// /// storage value -> storage_value * 2 + input_val - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn increase_value_no_cache(origin, some_val: u32) -> DispatchResult { let _ = ensure_signed(origin)?; let original_call = ::get(); @@ -72,7 +71,7 @@ decl_module! { /// (Copy) more efficient value change /// /// storage value -> storage_value * 2 + input_val - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn increase_value_w_copy(origin, some_val: u32) -> DispatchResult { let _ = ensure_signed(origin)?; let original_call = ::get(); @@ -89,7 +88,7 @@ decl_module! { /// swaps the king account with Origin::signed() if /// (1) other account is member && /// (2) existing king isn't - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn swap_king_no_cache(origin) -> DispatchResult { let new_king = ensure_signed(origin)?; let existing_king = >::get(); @@ -113,7 +112,7 @@ decl_module! { /// swaps the king account with Origin::signed() if /// (1) other account is member && /// (2) existing king isn't - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn swap_king_with_cache(origin) -> DispatchResult { let new_king = ensure_signed(origin)?; let existing_king = >::get(); @@ -135,25 +134,25 @@ decl_module! { } // ---- for testing purposes ---- - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_copy(origin, val: u32) -> DispatchResult { let _ = ensure_signed(origin)?; ::put(val); Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_king(origin) -> DispatchResult { let user = ensure_signed(origin)?; >::put(user); Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn mock_add_member(origin) -> DispatchResult { let added = ensure_signed(origin)?; ensure!(!Self::is_member(&added), "member already in group"); - >::append(vec![added])?; + >::append(added); Ok(()) } } diff --git a/pallets/struct-storage/Cargo.toml b/pallets/struct-storage/Cargo.toml index cdcfa0347..9b47e0eee 100644 --- a/pallets/struct-storage/Cargo.toml +++ b/pallets/struct-storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "struct-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -23,31 +23,31 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.primitives] default_features = false package = 'sp-core' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/struct-storage/src/lib.rs b/pallets/struct-storage/src/lib.rs index 37c8312c6..cb33994ed 100644 --- a/pallets/struct-storage/src/lib.rs +++ b/pallets/struct-storage/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{ codec::{Decode, Encode}, decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -63,7 +62,7 @@ decl_module! { fn deposit_event() = default; /// Stores an `InnerThing` struct in the storage map - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn insert_inner_thing(origin, number: u32, hash: T::Hash, balance: T::Balance) -> DispatchResult { let _ = ensure_signed(origin)?; let thing = InnerThing { @@ -78,7 +77,7 @@ decl_module! { /// Stores a `SuperThing` struct in the storage map using an `InnerThing` that was already /// stored - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn insert_super_thing_with_existing_inner(origin, inner_number: u32, super_number: u32) -> DispatchResult { let _ = ensure_signed(origin)?; let inner_thing = Self::inner_things_by_numbers(inner_number); @@ -92,7 +91,7 @@ decl_module! { } /// Stores a `SuperThing` struct in the storage map using a new `InnerThing` - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn insert_super_thing_with_new_inner(origin, inner_number: u32, hash: T::Hash, balance: T::Balance, super_number: u32) -> DispatchResult { let _ = ensure_signed(origin)?; // construct and insert `inner_thing` first diff --git a/pallets/sum-storage/Cargo.toml b/pallets/sum-storage/Cargo.toml index acb17ce44..75e11ac54 100644 --- a/pallets/sum-storage/Cargo.toml +++ b/pallets/sum-storage/Cargo.toml @@ -1,21 +1,21 @@ [package] name = "sum-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -sp-std = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false} -frame-support = { version = '2.0.0-alpha.6', default_features = false} -frame-system = { version = '2.0.0-alpha.6', default_features = false} +sp-std = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false} +frame-support = { version = '2.0.0-alpha.7', default_features = false} +frame-system = { version = '2.0.0-alpha.7', default_features = false} [dev-dependencies] -sp-io = { version = '2.0.0-alpha.6', default_features = false} -sp-core = { version = '2.0.0-alpha.6', default_features = false} +sp-io = { version = '2.0.0-alpha.7', default_features = false} +sp-core = { version = '2.0.0-alpha.7', default_features = false} [features] default = ["std"] diff --git a/pallets/sum-storage/rpc/Cargo.toml b/pallets/sum-storage/rpc/Cargo.toml index c114084a8..eba01f405 100644 --- a/pallets/sum-storage/rpc/Cargo.toml +++ b/pallets/sum-storage/rpc/Cargo.toml @@ -12,10 +12,10 @@ jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" serde = { version = "1.0.101", features = ["derive"], optional = true } -sp-rpc = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false} -sp-blockchain = { version = '2.0.0-alpha.6', default_features = false} -sp-api = { version = '2.0.0-alpha.6', default_features = false } +sp-rpc = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false} +sp-blockchain = { version = '2.0.0-alpha.7', default_features = false} +sp-api = { version = '2.0.0-alpha.7', default_features = false } sum-storage-runtime-api = { version = "2.0.0", path = "../runtime-api", default_features = false } diff --git a/pallets/sum-storage/runtime-api/Cargo.toml b/pallets/sum-storage/runtime-api/Cargo.toml index a3f475735..7e5c00ed4 100644 --- a/pallets/sum-storage/runtime-api/Cargo.toml +++ b/pallets/sum-storage/runtime-api/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "GPL-3.0-or-later" [dependencies] -sp-api = { version = '2.0.0-alpha.6', default_features = false} +sp-api = { version = '2.0.0-alpha.7', default_features = false} [dev-dependencies] serde_json = "1.0.41" diff --git a/pallets/sum-storage/src/lib.rs b/pallets/sum-storage/src/lib.rs index 62e36d650..a7140a6ba 100644 --- a/pallets/sum-storage/src/lib.rs +++ b/pallets/sum-storage/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{ decl_module, decl_storage, decl_event, dispatch, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -35,7 +34,7 @@ decl_module! { fn deposit_event() = default; /// Sets the first simple storage value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn set_thing_1(origin, val: u32) -> dispatch::DispatchResult { let _ = ensure_signed(origin)?; @@ -46,7 +45,7 @@ decl_module! { } /// Sets the second stored value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn set_thing_2(origin, val: u32) -> dispatch::DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/vec-set/Cargo.toml b/pallets/vec-set/Cargo.toml index e49c6f373..166c6d9cf 100644 --- a/pallets/vec-set/Cargo.toml +++ b/pallets/vec-set/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vec-set" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -21,24 +21,24 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/vec-set/src/lib.rs b/pallets/vec-set/src/lib.rs index aa1fbe1c3..2b46bf984 100644 --- a/pallets/vec-set/src/lib.rs +++ b/pallets/vec-set/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -48,7 +47,7 @@ decl_module! { /// Appends an item to the vec using the `mutate` method /// Don't do this because it is slow /// (unless appending new entries AND mutating existing entries) - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn mutate_to_append(origin) -> DispatchResult { let user = ensure_signed(origin)?; @@ -60,26 +59,28 @@ decl_module! { /// Appends an item to the vec using the `append` method /// This method is faster, and therefore preferred, whenever possible - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn append_new_entries(origin) -> DispatchResult { let user = ensure_signed(origin)?; // this encodes the new values and appends them to the already encoded existing evc - ::append(Self::new_values())?; + Self::new_values() + .iter() + .for_each(CurrentValues::append); Self::deposit_event(RawEvent::AppendVec(user)); Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_member(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; ensure!(!Self::is_member(&new_member), "must not be a member to be added"); - >::append(vec![new_member.clone()])?; + >::append(new_member.clone()); Self::deposit_event(RawEvent::MemberAdded(new_member)); Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_member(origin) -> DispatchResult { let old_member = ensure_signed(origin)?; ensure!(Self::is_member(&old_member), "must be a member in order to leave"); diff --git a/pallets/weights/Cargo.toml b/pallets/weights/Cargo.toml index 982a15588..34bee1e04 100644 --- a/pallets/weights/Cargo.toml +++ b/pallets/weights/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "weights" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Anonymous"] edition = "2018" license = "GPL-3.0-or-later" @@ -21,16 +21,16 @@ version = '1.3.0' [dependencies.frame-support] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/weights/src/lib.rs b/pallets/weights/src/lib.rs index 52c18cbca..f25d0fb78 100644 --- a/pallets/weights/src/lib.rs +++ b/pallets/weights/src/lib.rs @@ -7,7 +7,7 @@ use frame_support::{ decl_module, decl_storage, dispatch::{DispatchResult, WeighData, PaysFee}, - weights::{ DispatchClass, Weight, ClassifyDispatch, SimpleDispatchInfo}, + weights::{ DispatchClass, Weight, ClassifyDispatch, Pays}, }; use frame_system as system; @@ -30,15 +30,15 @@ impl WeighData<(&u32,)> for Linear { // Use saturation so that an extremely large parameter value // Does not cause overflow. - x.saturating_mul(self.0) + x.saturating_mul(self.0).into() } } // The PaysFee trait indicates whether fees should actually be charged from the caller. If not, // the weights are still applied toward the block maximums. impl PaysFee for Linear { - fn pays_fee(&self, _: T) -> bool { - true + fn pays_fee(&self, _: T) -> Pays { + Pays::Yes } } @@ -63,7 +63,7 @@ impl WeighData<(&u32, &u32)> for Quadratic { let by = y.saturating_mul(self.1); let c = self.2; - ax2.saturating_add(by).saturating_add(c) + ax2.saturating_add(by).saturating_add(c).into() } } @@ -75,8 +75,8 @@ impl ClassifyDispatch for Quadratic { } impl PaysFee for Quadratic { - fn pays_fee(&self, _: T) -> bool { - true + fn pays_fee(&self, _: T) -> Pays { + Pays::Yes } } @@ -93,13 +93,13 @@ impl WeighData<(&bool, &u32)> for Conditional { } else { self.0 - } + }.into() } } impl PaysFee for Conditional { - fn pays_fee(&self, _: T) -> bool { - true + fn pays_fee(&self, _: T) -> Pays { + Pays::Yes } } @@ -114,9 +114,9 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { // Store value does not loop at all so a fixed weight is appropriate. Fixed weights can - // be assigned using types available in the Substrate framework. No custom coding is + // be assigned using integer constants. No custom coding is // necessary. - #[weight = SimpleDispatchInfo::FixedNormal(100)] + #[weight = 10_000] fn store_value(_origin, entry: u32) -> DispatchResult { StoredValue::put(entry); diff --git a/runtimes/api-runtime/Cargo.toml b/runtimes/api-runtime/Cargo.toml index 06b02a88b..2fa269a3c 100644 --- a/runtimes/api-runtime/Cargo.toml +++ b/runtimes/api-runtime/Cargo.toml @@ -1,35 +1,35 @@ [package] name = "api-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" [dependencies] -balances = { package = "pallet-balances", version = '2.0.0-alpha.6', default_features = false} -frame-support = { version = '2.0.0-alpha.6', default_features = false} -indices = { package = "pallet-indices", version = '2.0.0-alpha.6', default_features = false} -sudo = { package = "pallet-sudo", version = '2.0.0-alpha.6', default_features = false} -frame-system = { version = '2.0.0-alpha.6', default_features = false} -timestamp = { package = "pallet-timestamp", version = '2.0.0-alpha.6', default_features = false} -transaction-payment = { package = "pallet-transaction-payment", version = '2.0.0-alpha.6', default_features = false} -randomness-collective-flip = { package = "pallet-randomness-collective-flip", version = '2.0.0-alpha.6', default_features = false} +balances = { package = "pallet-balances", version = '2.0.0-alpha.7', default_features = false} +frame-support = { version = '2.0.0-alpha.7', default_features = false} +indices = { package = "pallet-indices", version = '2.0.0-alpha.7', default_features = false} +sudo = { package = "pallet-sudo", version = '2.0.0-alpha.7', default_features = false} +frame-system = { version = '2.0.0-alpha.7', default_features = false} +timestamp = { package = "pallet-timestamp", version = '2.0.0-alpha.7', default_features = false} +transaction-payment = { package = "pallet-transaction-payment", version = '2.0.0-alpha.7', default_features = false} +randomness-collective-flip = { package = "pallet-randomness-collective-flip", version = '2.0.0-alpha.7', default_features = false} parity-scale-codec = { version = "1.3.0", default-features = false, features = ["derive"] } -frame-executive = { version = '2.0.0-alpha.6', default_features = false} +frame-executive = { version = '2.0.0-alpha.7', default_features = false} safe-mix = { version = "1.0.0", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = '2.0.0-alpha.6', default_features = false} -sp-block-builder = { version = '2.0.0-alpha.6', default_features = false} -sp-core = { version = '2.0.0-alpha.6', default_features = false} -sp-inherents = { version = '2.0.0-alpha.6', default_features = false} -sp-io = { version = '2.0.0-alpha.6', default_features = false} -sp-offchain = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false} -sp-session = { version = '2.0.0-alpha.6', default_features = false} -sp-std = { version = '2.0.0-alpha.6', default_features = false} -sp-transaction-pool = { version = '2.0.0-alpha.6', default_features = false} -sp-version = { version = '2.0.0-alpha.6', default_features = false} +sp-api = { version = '2.0.0-alpha.7', default_features = false} +sp-block-builder = { version = '2.0.0-alpha.7', default_features = false} +sp-core = { version = '2.0.0-alpha.7', default_features = false} +sp-inherents = { version = '2.0.0-alpha.7', default_features = false} +sp-io = { version = '2.0.0-alpha.7', default_features = false} +sp-offchain = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false} +sp-session = { version = '2.0.0-alpha.7', default_features = false} +sp-std = { version = '2.0.0-alpha.7', default_features = false} +sp-transaction-pool = { version = '2.0.0-alpha.7', default_features = false} +sp-version = { version = '2.0.0-alpha.7', default_features = false} sum-storage = { default-features = false, path = "../../pallets/sum-storage" } sum-storage-runtime-api = { default-features = false, path = "../../pallets/sum-storage/runtime-api" } diff --git a/runtimes/api-runtime/src/lib.rs b/runtimes/api-runtime/src/lib.rs index 93e3dda6b..20e326173 100644 --- a/runtimes/api-runtime/src/lib.rs +++ b/runtimes/api-runtime/src/lib.rs @@ -44,7 +44,10 @@ pub use sp_runtime::{Permill, Perbill}; pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, }; /// An index to a block. @@ -94,6 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; /// The version infromation used to identify this runtime when compiled natively. @@ -107,7 +111,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -138,6 +142,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -189,14 +201,12 @@ impl sudo::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: Balance = 0; pub const TransactionByteFee: Balance = 1; } impl transaction_payment::Trait for Runtime { type Currency = balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); diff --git a/runtimes/babe-grandpa-runtime/Cargo.toml b/runtimes/babe-grandpa-runtime/Cargo.toml index f19af4d27..a191b5ea8 100644 --- a/runtimes/babe-grandpa-runtime/Cargo.toml +++ b/runtimes/babe-grandpa-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "babe-grandpa-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -11,34 +11,34 @@ parity-scale-codec = { version = "1.3.0", default-features = false, features = [ serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false } # Substrate Pallets -babe = { package = 'pallet-babe', version = '2.0.0-alpha.6', default_features = false} -balances = { package = 'pallet-balances', version = '2.0.0-alpha.6', default-features = false } -grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.6', default-features = false } -randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.6', default-features = false } -sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.6', default-features = false } -transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.6', default-features = false } -timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.6', default-features = false } +babe = { package = 'pallet-babe', version = '2.0.0-alpha.7', default_features = false} +balances = { package = 'pallet-balances', version = '2.0.0-alpha.7', default-features = false } +grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.7', default-features = false } +randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.7', default-features = false } +sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.7', default-features = false } +transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.7', default-features = false } +timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.7', default-features = false } # Recipe Pallets #TODO Maybe include Gautam's Validator Set allet here # Other Substrate dependencies -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-consensus-babe = { version = '0.8.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-finality-grandpa = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } [build-dependencies] diff --git a/runtimes/babe-grandpa-runtime/src/lib.rs b/runtimes/babe-grandpa-runtime/src/lib.rs index 793e19694..ac0aaa88c 100644 --- a/runtimes/babe-grandpa-runtime/src/lib.rs +++ b/runtimes/babe-grandpa-runtime/src/lib.rs @@ -43,7 +43,10 @@ pub use sp_runtime::{Perbill, Permill}; pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, debug, }; @@ -105,6 +108,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; pub const MILLISECS_PER_BLOCK: u64 = 6000; @@ -132,7 +136,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -163,6 +167,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -224,14 +236,12 @@ impl balances::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: u128 = 0; pub const TransactionByteFee: u128 = 1; } impl transaction_payment::Trait for Runtime { type Currency = balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); @@ -355,19 +365,19 @@ impl_runtime_apis! { } impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeConfiguration { + 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. // - sp_consensus_babe::BabeConfiguration { + sp_consensus_babe::BabeGenesisConfiguration { slot_duration: Babe::slot_duration(), epoch_length: EpochDuration::get(), c: PRIMARY_PROBABILITY, genesis_authorities: Babe::authorities(), randomness: Babe::randomness(), - secondary_slots: true, + allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots, } } diff --git a/runtimes/ocw-runtime/Cargo.toml b/runtimes/ocw-runtime/Cargo.toml index 8508322bd..f486c5d1f 100644 --- a/runtimes/ocw-runtime/Cargo.toml +++ b/runtimes/ocw-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ocw-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Anonymous"] edition = "2018" license = "GPL-3.0-or-later" @@ -11,26 +11,26 @@ safe-mix = { version = "1.0", default-features = false } parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } # Substrate pallets & dependencies -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -pallet-balances = { version = '2.0.0-alpha.6', default-features = false } -pallet-indices = { version = '2.0.0-alpha.6', default-features = false } -pallet-randomness-collective-flip = { version = '2.0.0-alpha.6', default-features = false } -pallet-sudo = { version = '2.0.0-alpha.6', default-features = false } -pallet-timestamp = { version = '2.0.0-alpha.6', default-features = false } -pallet-transaction-payment = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +pallet-balances = { version = '2.0.0-alpha.7', default-features = false } +pallet-indices = { version = '2.0.0-alpha.7', default-features = false } +pallet-randomness-collective-flip = { version = '2.0.0-alpha.7', default-features = false } +pallet-sudo = { version = '2.0.0-alpha.7', default-features = false } +pallet-timestamp = { version = '2.0.0-alpha.7', default-features = false } +pallet-transaction-payment = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } # Recipe Pallets offchain-demo = { path = "../../pallets/offchain-demo", default-features = false } diff --git a/runtimes/ocw-runtime/src/lib.rs b/runtimes/ocw-runtime/src/lib.rs index 9940cba68..110ad4dce 100644 --- a/runtimes/ocw-runtime/src/lib.rs +++ b/runtimes/ocw-runtime/src/lib.rs @@ -42,6 +42,7 @@ pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, weights::Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, debug, }; @@ -98,6 +99,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; /// The version infromation used to identify this runtime when compiled natively. @@ -111,7 +113,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -142,6 +144,14 @@ impl frame_system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -188,14 +198,12 @@ impl pallet_balances::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: u128 = 0; pub const TransactionByteFee: u128 = 1; } impl pallet_transaction_payment::Trait for Runtime { type Currency = pallet_balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); diff --git a/runtimes/super-runtime/Cargo.toml b/runtimes/super-runtime/Cargo.toml index 1527e1ec3..821d0f46d 100644 --- a/runtimes/super-runtime/Cargo.toml +++ b/runtimes/super-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "super-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,13 +10,13 @@ parity-scale-codec = { version = "1.3.0", default-features = false, features = [ serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false } # Substrate Pallets -babe = { package = 'pallet-babe', version = '2.0.0-alpha.6', default_features = false} -balances = { package = 'pallet-balances', version = '2.0.0-alpha.6', default-features = false } -grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.6', default-features = false } -randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.6', default-features = false } -sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.6', default-features = false } -transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.6', default-features = false } -timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.6', default-features = false } +babe = { package = 'pallet-babe', version = '2.0.0-alpha.7', default_features = false} +balances = { package = 'pallet-balances', version = '2.0.0-alpha.7', default-features = false } +grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.7', default-features = false } +randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.7', default-features = false } +sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.7', default-features = false } +transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.7', default-features = false } +timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.7', default-features = false } # Recipe Pallets adding-machine = { path = "../../pallets/adding-machine", default-features = false } @@ -42,22 +42,22 @@ struct-storage = { path = "../../pallets/struct-storage", default-features = fal vec-set = { path = "../../pallets/vec-set", default-features = false } # Other Substrate dependencies -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-consensus-babe = { version = '0.8.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-finality-grandpa = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } [build-dependencies] diff --git a/runtimes/super-runtime/src/lib.rs b/runtimes/super-runtime/src/lib.rs index 40ac69544..ffff69077 100644 --- a/runtimes/super-runtime/src/lib.rs +++ b/runtimes/super-runtime/src/lib.rs @@ -42,7 +42,10 @@ pub use sp_runtime::{Perbill, Permill}; pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, debug, }; @@ -97,6 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; pub const MILLISECS_PER_BLOCK: u64 = 6000; @@ -112,7 +116,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -143,6 +147,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -189,14 +201,12 @@ impl balances::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: u128 = 0; pub const TransactionByteFee: u128 = 1; } impl transaction_payment::Trait for Runtime { type Currency = balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); diff --git a/runtimes/weight-fee-runtime/Cargo.toml b/runtimes/weight-fee-runtime/Cargo.toml index c87884dd5..f17d34105 100644 --- a/runtimes/weight-fee-runtime/Cargo.toml +++ b/runtimes/weight-fee-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "weight-fee-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Anonymous"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,62 +10,62 @@ serde = { version = "1.0", optional = true, features = ["derive"] } weights = { path = "../../pallets/weights", default-features = false } parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-consensus-babe = { version = '0.8.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-finality-grandpa = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } [dependencies.balances] default-features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.generic-asset] default-features = false package = 'pallet-generic-asset' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.transaction-payment] default-features = false package = 'pallet-transaction-payment' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.babe] default-features = false package = 'pallet-babe' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.grandpa] default-features = false package = 'pallet-grandpa' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.randomness-collective-flip] default-features = false package = 'pallet-randomness-collective-flip' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.timestamp] default-features = false package = 'pallet-timestamp' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sudo] default-features = false package = 'pallet-sudo' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [build-dependencies] wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.4" } diff --git a/runtimes/weight-fee-runtime/src/lib.rs b/runtimes/weight-fee-runtime/src/lib.rs index 20385be6e..15e3b764f 100644 --- a/runtimes/weight-fee-runtime/src/lib.rs +++ b/runtimes/weight-fee-runtime/src/lib.rs @@ -34,7 +34,10 @@ use sp_runtime::traits::{ }; use frame_support::{ traits::Get, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, }; use sp_api::impl_runtime_apis; use sp_version::RuntimeVersion; @@ -108,6 +111,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; /// The version infromation used to identify this runtime when compiled natively. @@ -121,7 +125,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -152,6 +156,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -275,8 +287,7 @@ parameter_types! { pub const WeightFeeLinear: u128 = 100; pub const WeightFeeQuadratic : u128 = 10; - // Establish the base- and byte-fees. These are used in all configurations. - pub const TransactionBaseFee: u128 = 0; + // Establish the byte-fee. It is used in all configurations. pub const TransactionByteFee: u128 = 1; } @@ -292,9 +303,6 @@ impl transaction_payment::Trait for Runtime { // What to do when fees are paid. () means take no additional actions. type OnTransactionPayment = (); - // Base fee is a fixed amount applied to every transaction - type TransactionBaseFee = TransactionBaseFee; - // Byte fee is multiplied by the length of the // serialized transaction in bytes type TransactionByteFee = TransactionByteFee; diff --git a/text/2-appetizers/1-hello-substrate.md b/text/2-appetizers/1-hello-substrate.md index ee0fd272e..04d0e8111 100644 --- a/text/2-appetizers/1-hello-substrate.md +++ b/text/2-appetizers/1-hello-substrate.md @@ -42,7 +42,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { /// A function that says hello to the user by printing messages to the node log - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn say_hello(origin) -> DispatchResult { // --snip-- } @@ -55,7 +55,7 @@ decl_module! { As you can see, our `hello-substrate` pallet has a dispatchable call that takes a single argument, called `origin` which we'll investigate shortly. The call returns a [`DispatchResult`](https://substrate.dev/rustdocs/master/frame_support/dispatch/type.DispatchResult.html) which can be either `Ok(())` indicating that the call succeeded, or an `Err` which we'll investigate in the [appetizer about errors](./3-errors.md). ### Weight Annotations -Right before the `hello-substrate` function, we see the line `#[weight = SimpleDispatchInfo::default()]`. This line attaches a default weight to the call. Ultimately weights affect the fees a user will have to pay to call the function. Weights are a very interesting aspect of developing with Substrate, but they too shall be covered later in the section on [Weights](../3-entrees/weights.md). For now, and for may of the recipes pallets, we will simply use the default weight as we have done here. +Right before the `hello-substrate` function, we see the line `#[weight = 10_000]`. This line attaches a default weight to the call. Ultimately weights affect the fees a user will have to pay to call the function. Weights are a very interesting aspect of developing with Substrate, but they too shall be covered later in the section on [Weights](../3-entrees/weights.md). For now, and for may of the recipes pallets, we will simply use the default weight as we have done here. ## Inside a Dispatchable Call diff --git a/text/2-appetizers/4-events.md b/text/2-appetizers/4-events.md index 4082bbf74..f810e0895 100644 --- a/text/2-appetizers/4-events.md +++ b/text/2-appetizers/4-events.md @@ -64,9 +64,7 @@ This example also demonstrates how the `where` clause can be used to specify typ Events are emitted from dispatchable calls using the `deposit_event` method. -> Starting from -> [Substrate `v2.0.0-alpha.6`](https://github.com/paritytech/substrate/tree/v2.0.0-alpha.6), -> events are not emitted on block 0. So any dispatchable calls made during genesis block formation +> Events are not emitted on block 0. So any dispatchable calls made during genesis block formation > will have no events emitted. ### Simple Events diff --git a/text/3-entrees/custom-rpc.md b/text/3-entrees/custom-rpc.md index 73376d188..989e15df7 100644 --- a/text/3-entrees/custom-rpc.md +++ b/text/3-entrees/custom-rpc.md @@ -47,7 +47,7 @@ With our RPC written, we're ready to install it on our node. We begin with a few jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sc-rpc = { version = '2.0.0-alpha.6' } +sc-rpc = { version = '2.0.0-alpha.7' } ``` Next, in our `rpc-node`'s `service.rs` file, we extend the service with our RPC. We've chosen to install this RPC for full nodes, so we've included the code in the `new_full_start!` macro. You could also install the RPC on a light client by making the corresponding changes to `new_light`. diff --git a/text/3-entrees/kitchen-node.md b/text/3-entrees/kitchen-node.md index 498f1cd05..f38f1414b 100644 --- a/text/3-entrees/kitchen-node.md +++ b/text/3-entrees/kitchen-node.md @@ -63,9 +63,9 @@ The instant seal consensus engine, and its cousin the manual seal consensus engi Installing the instant seal engine has several dependencies whereas the runtime had only one. ```toml -sc-client-db = '0.8.0-alpha.6' # This became necessary when converting to instant seal -sp-consensus = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' +sc-client-db = '0.8.0-alpha.7' # This became necessary when converting to instant seal +sp-consensus = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' ``` The dependency on `sc-client-db` will become unnecessary once [issue #238](https://github.com/substrate-developer-hub/recipes/pull/238) is merged. diff --git a/text/3-entrees/off-chain-workers/storage.md b/text/3-entrees/off-chain-workers/storage.md index 8c1c0f6e2..368be983a 100644 --- a/text/3-entrees/off-chain-workers/storage.md +++ b/text/3-entrees/off-chain-workers/storage.md @@ -42,7 +42,7 @@ fn fetch_if_needed() -> Result<(), Error> { } ``` -Looking at the [API doc](https://substrate.dev/rustdocs/v2.0.0-alpha.6/sp_runtime/offchain/storage/struct.StorageValueRef.html), we see there are two type of StorageValueRef, created via `::persistent()` and `::local()`. `::local()` is not fully implemented yet and `::persistent()` is enough for this use cases. We passed in a key as our storage key. As storage keys are namespaced globally, a good practice would be to prepend our pallet name in front of our storage key. +Looking at the [API doc](https://substrate.dev/rustdocs/master/sp_runtime/offchain/storage/struct.StorageValueRef.html), we see there are two type of StorageValueRef, created via `::persistent()` and `::local()`. `::local()` is not fully implemented yet and `::persistent()` is enough for this use cases. We passed in a key as our storage key. As storage keys are namespaced globally, a good practice would be to prepend our pallet name in front of our storage key. ## Access diff --git a/text/3-entrees/permissioned-methods.md b/text/3-entrees/permissioned-methods.md index ead135a16..42a112b30 100644 --- a/text/3-entrees/permissioned-methods.md +++ b/text/3-entrees/permissioned-methods.md @@ -31,7 +31,7 @@ fn add_member(origin) -> DispatchResult { // Ensure that the caller is not already a member ensure!(!Self::is_member(&new_member), "already a member"); - >::append(&[new_member.clone()])?; + >::append(&new_member); Self::deposit_event(RawEvent::AddMember(new_member)); Ok(()) } diff --git a/text/3-entrees/testing/mock.md b/text/3-entrees/testing/mock.md index 980dc3754..48a0bd4ce 100644 --- a/text/3-entrees/testing/mock.md +++ b/text/3-entrees/testing/mock.md @@ -171,7 +171,7 @@ In the `Cargo.toml`, this only needs to be imported under `dev-dependencies` sin [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' ``` There is more than one pattern for building a mock runtime environment for testing pallet logic. Two patterns are presented below. The latter is generally favored for reasons discussed in [custom test environment](./externalities.md) @@ -313,9 +313,7 @@ pub trait Trait: 'static + Eq + Clone { ### Setting for Testing Event Emittances -Starting from -Substrate [`v2.0.0-alpha.6`](https://github.com/paritytech/substrate/tree/v2.0.0-alpha.6), -events are not emitted on block 0. So when testing for whether events are emitted, we manually +Events are not emitted on block 0. So when testing for whether events are emitted, we manually set the block number in the test environment from 0 to 1 as the following: ```rust