diff --git a/Cargo.lock b/Cargo.lock index e287d39..718d0c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,16 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ - "gimli", + "gimli 0.23.0", +] + +[[package]] +name = "addr2line" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" +dependencies = [ + "gimli 0.24.0", ] [[package]] @@ -83,9 +92,14 @@ dependencies = [ [[package]] name = "ahash" -version = "0.4.7" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" +checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +dependencies = [ + "getrandom 0.2.1", + "once_cell", + "version_check", +] [[package]] name = "aho-corasick" @@ -122,9 +136,9 @@ checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "approx" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" dependencies = [ "num-traits", ] @@ -151,23 +165,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] -name = "asn1_der" -version = "0.6.3" +name = "arrayvec" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fce6b6a0ffdafebd82c87e79e3f40e8d2c523e5fea5566ff6b90509bf98d638" -dependencies = [ - "asn1_der_derive", -] +checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" [[package]] -name = "asn1_der_derive" -version = "0.1.2" +name = "asn1_der" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" -dependencies = [ - "quote", - "syn", -] +checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-channel" @@ -281,6 +288,20 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "async-std-resolver" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed4e2c3da14d8ad45acb1e3191db7a918e9505b6f155b218e70a7c9a1a48c638" +dependencies = [ + "async-std", + "async-trait", + "futures-io", + "futures-util", + "pin-utils", + "trust-dns-resolver", +] + [[package]] name = "async-task" version = "4.0.3" @@ -289,9 +310,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.42" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" dependencies = [ "proc-macro2", "quote", @@ -311,6 +332,19 @@ dependencies = [ "pin-project-lite 0.2.4", ] +[[package]] +name = "asynchronous-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" +dependencies = [ + "bytes 1.0.1", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite 0.2.4", +] + [[package]] name = "atomic" version = "0.5.0" @@ -349,11 +383,11 @@ version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" dependencies = [ - "addr2line", + "addr2line 0.14.1", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.22.0", "rustc-demangle", ] @@ -393,26 +427,21 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.54.0" +version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36" +checksum = "453c49e5950bb0eb63bb3df640e31618846c89d5b7faa54040d76e98e0134375" dependencies = [ "bitflags", "cexpr", - "cfg-if 0.1.10", "clang-sys", - "clap", - "env_logger", "lazy_static", "lazycell", - "log", "peeking_take_while", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "which 3.1.1", ] [[package]] @@ -421,6 +450,18 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "bitvec" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" +dependencies = [ + "funty", + "radium 0.5.3", + "tap", + "wyz", +] + [[package]] name = "bitvec" version = "0.20.1" @@ -428,7 +469,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5011ffc90248764d7005b0e10c7294f5aa1bd87d9dd7248f4ad475b347c294d" dependencies = [ "funty", - "radium", + "radium 0.6.2", "tap", "wyz", ] @@ -628,6 +669,15 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +[[package]] +name = "camino" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52d74260d9bf6944e2208aa46841b4b8f0d7ffc0849a06837b2f510337f86b2b" +dependencies = [ + "serde", +] + [[package]] name = "cargo-platform" version = "0.1.1" @@ -639,10 +689,11 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.12.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a47b6286279a9998588ef7050d1ebc2500c69892a557c90fe5d071c64415dc" +checksum = "081e3f0755c1f380c2d010481b6fa2e02973586d5f2b24eebb7a2a1d98b143d8" dependencies = [ + "camino", "cargo-platform", "semver 0.11.0", "semver-parser 0.10.2", @@ -661,9 +712,9 @@ dependencies = [ [[package]] name = "cexpr" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +checksum = "db507a7679252d2276ed0dd8113c6875ec56d3089f9225b2b42c30cc1f8e5c89" dependencies = [ "nom", ] @@ -738,13 +789,13 @@ dependencies = [ [[package]] name = "clang-sys" -version = "0.29.3" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a" +checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.7.0", ] [[package]] @@ -832,38 +883,36 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "cranelift-bforest" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4066fd63b502d73eb8c5fa6bcab9c7962b05cd580f6b149ee83a8e730d8ce7fb" +checksum = "c8ca3560686e7c9c7ed7e0fe77469f2410ba5d7781b1acaa9adc8d8deea28e3e" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a54e4beb833a3c873a18a8fe735d73d732044004c7539a072c8faa35ccb0c60" +checksum = "baf9bf1ffffb6ce3d2e5ebc83549bd2436426c99b31cc550d521364cbe35d276" dependencies = [ - "byteorder", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.24.0", "log", "regalloc", "serde", "smallvec 1.6.1", "target-lexicon", - "thiserror", ] [[package]] name = "cranelift-codegen-meta" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54cac7cacb443658d8f0ff36a3545822613fa202c946c0891897843bc933810" +checksum = "4cc21936a5a6d07e23849ffe83e5c1f6f50305c074f4b2970ca50c13bf55b821" dependencies = [ "cranelift-codegen-shared", "cranelift-entity", @@ -871,24 +920,27 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a109760aff76788b2cdaeefad6875a73c2b450be13906524f6c2a81e05b8d83c" +checksum = "ca5b6ffaa87560bebe69a5446449da18090b126037920b0c1c6d5945f72faf6b" +dependencies = [ + "serde", +] [[package]] name = "cranelift-entity" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b044234aa32531f89a08b487630ddc6744696ec04c8123a1ad388de837f5de3" +checksum = "7d6b4a8bef04f82e4296782646f733c641d09497df2fabf791323fefaa44c64c" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5452b3e4e97538ee5ef2cc071301c69a86c7adf2770916b9d04e9727096abd93" +checksum = "c31b783b351f966fce33e3c03498cb116d16d97a8f9978164a60920bd0d3a99c" dependencies = [ "cranelift-codegen", "log", @@ -898,25 +950,24 @@ dependencies = [ [[package]] name = "cranelift-native" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f68035c10b2e80f26cc29c32fa824380877f38483504c2a47b54e7da311caaf3" +checksum = "a77c88d3dd48021ff1e37e978a00098524abd3513444ae252c08d37b310b3d2a" dependencies = [ "cranelift-codegen", - "raw-cpuid", "target-lexicon", ] [[package]] name = "cranelift-wasm" -version = "0.69.0" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a530eb9d1c95b3309deb24c3d179d8b0ba5837ed98914a429787c395f614949d" +checksum = "edb6d408e2da77cdbbd65466298d44c86ae71c1785d2ab0d8657753cdb4d9d89" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.1", "log", "serde", "smallvec 1.6.1", @@ -1062,6 +1113,16 @@ dependencies = [ "sct", ] +[[package]] +name = "ctor" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8f45d9ad417bcef4817d614a501ab55cdd96a6fdb24f49aab89a54acfd66b19" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "cuckoofilter" version = "0.5.0" @@ -1101,9 +1162,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993a608597367c6377b258c25d7120740f00ed23a2252b729b1932dd7866f908" +checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" [[package]] name = "data-encoding-macro" @@ -1205,6 +1266,12 @@ dependencies = [ "quick-error 1.2.3", ] +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -1261,6 +1328,18 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "enum-as-inner" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "env_logger" version = "0.7.1" @@ -1276,9 +1355,9 @@ dependencies = [ [[package]] name = "environmental" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e" +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] name = "erased-serde" @@ -1322,7 +1401,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", ] [[package]] @@ -1389,17 +1468,18 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.13.0" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd795898c348a8ec9edc66ec9e014031c764d4c88cc26d09b492cd93eb41339" +checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" dependencies = [ "either", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "log", "num-traits", "parity-scale-codec", "parking_lot 0.11.1", + "scale-info", ] [[package]] @@ -1409,7 +1489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ "byteorder", - "rand 0.8.2", + "rand 0.8.4", "rustc-hex", "static_assertions", ] @@ -1442,8 +1522,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632b95f97f332b2ff5bc3a42bc8e28772b067e333830e03fd046504f11cd0fb8" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", ] @@ -1460,15 +1539,15 @@ dependencies = [ [[package]] name = "frame-benchmarking" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2aa956a2120c0393fa03d1767cfd5eda8544935cee89c7a18096f34173b39cd" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", "linregress", + "log", "parity-scale-codec", - "paste 1.0.4", + "paste", "sp-api", "sp-io", "sp-runtime", @@ -1479,13 +1558,13 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2921b7890c5e4421a0b2eafbf835417eed8127b1cec3e1a0389515069f11d219" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "Inflector", "chrono", "frame-benchmarking", + "frame-support", "handlebars", "parity-scale-codec", "sc-cli", @@ -1501,16 +1580,27 @@ dependencies = [ "structopt", ] +[[package]] +name = "frame-election-provider-support" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-arithmetic", + "sp-npos-elections", + "sp-std", +] + [[package]] name = "frame-executive" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1da8fd471442bee91b9b3f587ec832e3f47800374fdb89b4a66591cd7c42b29f" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -1520,9 +1610,8 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "073f7bef18421362441a1708f8528e442234954611f95bdc554b313fb321948e" +version = "14.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "serde", @@ -1532,9 +1621,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e521e6214615bd82ba6b5fc7fd40a9cc14fdeb40f83da5eba12aa2f8179fb8" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "bitflags", "frame-metadata", @@ -1543,7 +1631,7 @@ dependencies = [ "log", "once_cell", "parity-scale-codec", - "paste 1.0.4", + "paste", "serde", "smallvec 1.6.1", "sp-arithmetic", @@ -1559,9 +1647,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2668e24cbaba7f0e91d0c92a94bd1ae425a942608ad0b775db32477f5df4da9e" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1572,12 +1659,11 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f88cfd111e004590f4542b75e6d3302137b9067d7e7219e4ac47a535c3b5c1" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -1586,8 +1672,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79285388b120ac96c15a791c56b26b9264f7231324fbe0fd05026acd92bf2e6a" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "proc-macro2", "quote", @@ -1596,12 +1681,12 @@ dependencies = [ [[package]] name = "frame-system" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fedbff05d665c00bf4e089b4377fcb15b8bd37ebc3e5fc06665474cf6e25d7" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "impl-trait-for-tuples", + "log", "parity-scale-codec", "serde", "sp-core", @@ -1613,9 +1698,8 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93602f58cdab9820b6d607b7b50834d9b878efa33405a65c89ebfb5a596b584" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-benchmarking", "frame-support", @@ -1628,9 +1712,8 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb9d2f86a903fdee4ca3d660c767e69a743cee8aeb103563a14ea52e9f0001d" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "sp-api", @@ -1638,13 +1721,23 @@ dependencies = [ [[package]] name = "fs-swap" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5839fda247e24ca4919c87c71dd5ca658f1f39e4f06829f80e3f15c3bafcfc2c" +checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" dependencies = [ "lazy_static", "libc", - "libloading", + "libloading 0.5.2", + "winapi 0.3.9", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", "winapi 0.3.9", ] @@ -1684,9 +1777,9 @@ checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed" [[package]] name = "futures" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fa4cc29d25b0687b8570b0da86eac698dcb525110ad8b938fe6712baa711ec" +checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" dependencies = [ "futures-channel", "futures-core", @@ -1699,9 +1792,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ebc390c6913de330e418add60e1a7e5af4cb5ec600d19111b339cafcdcc027" +checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" dependencies = [ "futures-core", "futures-sink", @@ -1709,9 +1802,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "089bd0baf024d3216916546338fffe4fc8dfffdd901e33c278abb091e0d52111" +checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" [[package]] name = "futures-cpupool" @@ -1723,27 +1816,11 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "futures-diagnose" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9" -dependencies = [ - "futures 0.1.30", - "futures 0.3.11", - "lazy_static", - "log", - "parking_lot 0.9.0", - "pin-project 0.4.27", - "serde", - "serde_json", -] - [[package]] name = "futures-executor" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0cb59f15119671c94cd9cc543dc9a50b8d5edc468b4ff5f0bb8567f66c6b48a" +checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" dependencies = [ "futures-core", "futures-task", @@ -1753,9 +1830,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3868967e4e5ab86614e2176c99949eeef6cbcacaee737765f6ae693988273997" +checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" [[package]] name = "futures-lite" @@ -1774,10 +1851,11 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95778720c3ee3c179cd0d8fd5a0f9b40aa7d745c080f86a8f8bed33c4fd89758" +checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" dependencies = [ + "autocfg", "proc-macro-hack", "proc-macro2", "quote", @@ -1797,18 +1875,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e0f6be0ec0357772fd58fb751958dd600bd0b3edfd429e77793e4282831360" +checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" [[package]] name = "futures-task" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "868090f28a925db6cb7462938c51d807546e298fb314088239f0e52fb4338b96" -dependencies = [ - "once_cell", -] +checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" [[package]] name = "futures-timer" @@ -1824,10 +1899,11 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad5e82786df758d407932aded1235e24d8e2eb438b6adafd37930c2462fb5d1" +checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" dependencies = [ + "autocfg", "futures 0.1.30", "futures-channel", "futures-core", @@ -1858,15 +1934,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "generic-array" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.4" @@ -1914,6 +1981,12 @@ name = "gimli" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" + +[[package]] +name = "gimli" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" dependencies = [ "fallible-iterator", "indexmap", @@ -2024,6 +2097,12 @@ name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ "ahash", ] @@ -2095,6 +2174,17 @@ dependencies = [ "hmac 0.7.1", ] +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi 0.3.9", +] + [[package]] name = "http" version = "0.1.21" @@ -2207,7 +2297,7 @@ dependencies = [ "httpdate", "itoa", "pin-project 1.0.4", - "socket2", + "socket2 0.3.19", "tokio 0.2.24", "tower-service", "tracing", @@ -2277,12 +2367,12 @@ dependencies = [ [[package]] name = "if-watch" -version = "0.1.8" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b8538953a3f0d0d3868f0a706eb4273535e10d72acb5c82c1c23ae48835c85" +checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179" dependencies = [ "async-io", - "futures 0.3.11", + "futures 0.3.17", "futures-lite", "if-addrs", "ipnet", @@ -2293,9 +2383,9 @@ dependencies = [ [[package]] name = "impl-codec" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df170efa359aebdd5cb7fe78edcc67107748e4737bdca8a8fb40d15ea7a877ed" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" dependencies = [ "parity-scale-codec", ] @@ -2327,7 +2417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.9.1", "serde", ] @@ -2355,7 +2445,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "futures-timer 2.0.2", ] @@ -2374,6 +2464,18 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f" +[[package]] +name = "ipconfig" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" +dependencies = [ + "socket2 0.3.19", + "widestring", + "winapi 0.3.9", + "winreg", +] + [[package]] name = "ipnet" version = "2.3.0" @@ -2389,6 +2491,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.7" @@ -2406,9 +2517,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.46" +version = "0.3.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" +checksum = "e4bf49d50e2961077d9c99f4b7997d770a1114f087c3c2e0069b36c13fc2979d" dependencies = [ "wasm-bindgen", ] @@ -2457,7 +2568,7 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -2562,9 +2673,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8891bd853eff90e33024195d79d578dc984c82f9e0715fcd2b525a0c19d52811" +checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" dependencies = [ "parity-util-mem", "smallvec 1.6.1", @@ -2572,9 +2683,9 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a0da8e08caf08d384a620ec19bb6c9b85c84137248e202617fb91881f25912" +checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" dependencies = [ "kvdb", "parity-util-mem", @@ -2583,9 +2694,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34446c373ccc494c2124439281c198c7636ccdc2752c06722bbffd56d459c1e4" +checksum = "0d169dbb316aa0fa185d02d847c047f1aa20e292cf1563d790c13536a2a732c8" dependencies = [ "fs-swap", "kvdb", @@ -2611,17 +2722,11 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "leb128" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" - [[package]] name = "libc" -version = "0.2.82" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" +checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" [[package]] name = "libloading" @@ -2633,6 +2738,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "libloading" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +dependencies = [ + "cfg-if 1.0.0", + "winapi 0.3.9", +] + [[package]] name = "libm" version = "0.2.1" @@ -2641,16 +2756,15 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.34.0" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5133112ce42be9482f6a87be92a605dd6bbc9e93c297aee77d172ff06908f3a" +checksum = "08053fbef67cd777049ef7a95ebaca2ece370b4ed7712c3fa404d69a88cb741b" dependencies = [ "atomic", "bytes 1.0.1", - "futures 0.3.11", + "futures 0.3.17", "lazy_static", "libp2p-core", - "libp2p-core-derive", "libp2p-deflate", "libp2p-dns", "libp2p-floodsub", @@ -2663,8 +2777,10 @@ dependencies = [ "libp2p-ping", "libp2p-plaintext", "libp2p-pnet", + "libp2p-relay", "libp2p-request-response", "libp2p-swarm", + "libp2p-swarm-derive", "libp2p-tcp", "libp2p-uds", "libp2p-wasm-ext", @@ -2679,16 +2795,16 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.27.0" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad04d3cef6c1df366a6ab58c9cf8b06497699e335d83ac2174783946ff847d6" +checksum = "554d3e7e9e65f939d66b75fd6a4c67f258fe250da61b91f46c545fc4a89b51d9" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", "either", "fnv", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "lazy_static", "libsecp256k1", @@ -2706,52 +2822,45 @@ dependencies = [ "sha2 0.9.2", "smallvec 1.6.1", "thiserror", - "unsigned-varint 0.6.0", + "unsigned-varint 0.7.0", "void", "zeroize", ] -[[package]] -name = "libp2p-core-derive" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4bc40943156e42138d22ed3c57ff0e1a147237742715937622a99b10fbe0156" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "libp2p-deflate" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d42eed63305f0420736fa487f9acef720c4528bd7852a6a760f5ccde4813345" +checksum = "a2181a641cd15f9b6ba71b1335800f309012a0a97a29ffaabbbf40e9d3d58f08" dependencies = [ "flate2", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", ] [[package]] name = "libp2p-dns" -version = "0.27.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5153b6db68fd4baa3b304e377db744dd8fea8ff4e4504509ee636abcde88d3e3" +checksum = "62e63dab8b5ff35e0c101a3e51e843ba782c07bbb1682f5fd827622e0d02b98b" dependencies = [ - "futures 0.3.11", + "async-std-resolver", + "futures 0.3.17", "libp2p-core", "log", + "smallvec 1.6.1", + "trust-dns-resolver", ] [[package]] name = "libp2p-floodsub" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c63dfa06581b24b1d12bf9815b43689a784424be217d6545c800c7c75a207f" +checksum = "48a9b570f6766301d9c4aa00fce3554cad1598e2f466debbc4dde909028417cf" dependencies = [ "cuckoofilter", "fnv", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "libp2p-swarm", "log", @@ -2763,16 +2872,16 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12451ba9493e87c91baf2a6dffce9ddf1fbc807a0861532d7cf477954f8ebbee" +checksum = "e7b0c8506a6ec3344b9e706d7c7a6dba826f8ede735cfe13dde12a8c263c4af9" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.0", "base64 0.13.0", "byteorder", "bytes 1.0.1", "fnv", - "futures 0.3.11", + "futures 0.3.17", "hex_fmt", "libp2p-core", "libp2p-swarm", @@ -2783,17 +2892,17 @@ dependencies = [ "regex", "sha2 0.9.2", "smallvec 1.6.1", - "unsigned-varint 0.6.0", + "unsigned-varint 0.7.0", "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40fb36a059b7a8cce1514bd8b546fa612e006c9937caa7f5950cb20021fe91e" +checksum = "5f668f00efd9883e8b7bcc582eaf0164615792608f886f6577da18bcbeea0a46" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "libp2p-swarm", "log", @@ -2805,16 +2914,16 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456f5de8e283d7800ca848b9b9a4e2a578b790bd8ae582b885e831353cf0e5df" +checksum = "b07312ebe5ee4fd2404447a0609814574df55c65d4e20838b957bbd34907d820" dependencies = [ "arrayvec 0.5.2", - "asynchronous-codec", + "asynchronous-codec 0.6.0", "bytes 1.0.1", "either", "fnv", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "libp2p-swarm", "log", @@ -2824,59 +2933,59 @@ dependencies = [ "sha2 0.9.2", "smallvec 1.6.1", "uint", - "unsigned-varint 0.6.0", + "unsigned-varint 0.7.0", "void", "wasm-timer", ] [[package]] name = "libp2p-mdns" -version = "0.28.0" +version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b974db63233fc0e199f4ede7794294aae285c96f4b6010f853eac4099ef08590" +checksum = "4efa70c1c3d2d91237f8546e27aeb85e287d62c066a7b4f3ea6a696d43ced714" dependencies = [ "async-io", "data-encoding", "dns-parser", - "futures 0.3.11", + "futures 0.3.17", "if-watch", "lazy_static", "libp2p-core", "libp2p-swarm", "log", - "rand 0.7.3", + "rand 0.8.4", "smallvec 1.6.1", - "socket2", + "socket2 0.4.1", "void", ] [[package]] name = "libp2p-mplex" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2705dc94b01ab9e3779b42a09bbf3712e637ed213e875c30face247291a85af0" +checksum = "85e9b544335d1ed30af71daa96edbefadef6f19c7a55f078b9fc92c87163105d" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.0", "bytes 1.0.1", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "log", "nohash-hasher", "parking_lot 0.11.1", "rand 0.7.3", "smallvec 1.6.1", - "unsigned-varint 0.6.0", + "unsigned-varint 0.7.0", ] [[package]] name = "libp2p-noise" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aca322b52a0c5136142a7c3971446fb1e9964923a526c9cc6ef3b7c94e57778" +checksum = "36db0f0db3b0433f5b9463f1c0cd9eadc0a3734a9170439ce501ff99733a88bd" dependencies = [ "bytes 1.0.1", "curve25519-dalek 3.0.2", - "futures 0.3.11", + "futures 0.3.17", "lazy_static", "libp2p-core", "log", @@ -2892,11 +3001,11 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3813276d0708c8db0f500d8beda1bda9ad955723b9cb272c41f4727256f73c" +checksum = "bf4bfaffac63bf3c7ec11ed9d8879d455966ddea7e78ee14737f0b6dce0d1cd1" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "libp2p-swarm", "log", @@ -2907,18 +3016,18 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e8c1ec305c9949351925cdc7196b9570f4330477f5e47fbf5bb340b57e26ed" +checksum = "0c8c37b4d2a075b4be8442760a5f8c037180f0c8dd5b5734b9978ab868b3aa11" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.0", "bytes 1.0.1", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "log", "prost", "prost-build", - "unsigned-varint 0.6.0", + "unsigned-varint 0.7.0", "void", ] @@ -2928,7 +3037,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "log", "pin-project 1.0.4", "rand 0.7.3", @@ -2936,15 +3045,38 @@ dependencies = [ "sha3", ] +[[package]] +name = "libp2p-relay" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8786aca3f18671d8776289706a5521f6c9124a820f69e358de214b9939440d" +dependencies = [ + "asynchronous-codec 0.6.0", + "bytes 1.0.1", + "futures 0.3.17", + "futures-timer 3.0.2", + "libp2p-core", + "libp2p-swarm", + "log", + "pin-project 1.0.4", + "prost", + "prost-build", + "rand 0.7.3", + "smallvec 1.6.1", + "unsigned-varint 0.7.0", + "void", + "wasm-timer", +] + [[package]] name = "libp2p-request-response" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37637a4b33b5390322ccc068a33897d0aa541daf4fec99f6a7efbf37295346e" +checksum = "1cdbe172f08e6d0f95fa8634e273d4c4268c4063de2e33e7435194b0130c62e3" dependencies = [ "async-trait", "bytes 1.0.1", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "libp2p-swarm", "log", @@ -2952,18 +3084,18 @@ dependencies = [ "minicbor", "rand 0.7.3", "smallvec 1.6.1", - "unsigned-varint 0.6.0", + "unsigned-varint 0.7.0", "wasm-timer", ] [[package]] name = "libp2p-swarm" -version = "0.27.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7955b973e1fd2bd61ffd43ce261c1223f61f4aacd5bae362a924993f9a25fd98" +checksum = "1e04d8e1eef675029ec728ba14e8d0da7975d84b6679b699b4ae91a1de9c3a92" dependencies = [ "either", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "log", "rand 0.7.3", @@ -2972,42 +3104,52 @@ dependencies = [ "wasm-timer", ] +[[package]] +name = "libp2p-swarm-derive" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "365b0a699fea5168676840567582a012ea297b1ca02eee467e58301b9c9c5eed" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "libp2p-tcp" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dbd3d7076a478ac5a6aca55e74bdc250ac539b95de09b9d09915e0b8d01a6b2" +checksum = "2b1a27d21c477951799e99d5c105d78868258502ce092988040a808d5a19bbd9" dependencies = [ "async-io", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "if-watch", "ipnet", "libc", "libp2p-core", "log", - "socket2", + "socket2 0.4.1", ] [[package]] name = "libp2p-uds" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80ac51ce419f60be966e02103c17f67ff5dc4422ba83ba54d251d6c62a4ed487" +checksum = "ffd6564bb3b7ff203661ccbb69003c2b551e34cef974f2d6c6a28306a12170b5" dependencies = [ "async-std", - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "log", ] [[package]] name = "libp2p-wasm-ext" -version = "0.27.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6149c46cb76935c80bc8be6ec6e3ebd5f5e1679765a255fb34331d54610f15dd" +checksum = "e2d413e4cf9b8e5dfbcd2a60d3dc5a3391308bdb463684093d4f67137b7113de" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -3017,12 +3159,12 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b1c6a3431045da8b925ed83384e4c5163e14b990572307fca9c507435d4d22" +checksum = "cace60995ef6f637e4752cccbb2590f6bc358e8741a0d066307636c69a4b3a74" dependencies = [ "either", - "futures 0.3.11", + "futures 0.3.17", "futures-rustls", "libp2p-core", "log", @@ -3035,11 +3177,11 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490b8b27fc40fe35212df1b6a3d14bffaa4117cbff956fdc2892168a371102ad" +checksum = "f35da42cfc6d5cb0dcf3ad6881bc68d146cdf38f98655e09e33fbba4d13eabc4" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "libp2p-core", "parking_lot 0.11.1", "thiserror", @@ -3048,9 +3190,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "6.11.4" +version = "6.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b56f651c204634b936be2f92dbb42c36867e00ff7fe2405591f3b9fa66f09" +checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d" dependencies = [ "bindgen", "cc", @@ -3102,9 +3244,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.4.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0ad4b5cc8385a881c561fac3501353d63d2a2b7a357b5064d71815c9a92724" +checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" dependencies = [ "nalgebra", "statrs", @@ -3130,20 +3272,30 @@ dependencies = [ [[package]] name = "log" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", + "value-bag", ] [[package]] name = "lru" -version = "0.6.3" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" +dependencies = [ + "hashbrown 0.11.2", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aae342b73d57ad0b8b364bd12584819f2c1fe9114285dfcf8b0722607671635" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" dependencies = [ - "hashbrown", + "linked-hash-map", ] [[package]] @@ -3161,6 +3313,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "matchers" version = "0.0.1" @@ -3178,9 +3336,9 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "matrixmultiply" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" dependencies = [ "rawpointer", ] @@ -3226,12 +3384,12 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814bbecfc0451fc314eeea34f05bbcd5b98a7ad7af37faee088b86a1e633f1d4" +checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.11.2", "parity-util-mem", ] @@ -3255,18 +3413,18 @@ dependencies = [ [[package]] name = "minicbor" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3265a9f5210bb726f81ef9c456ae0aff5321cd95748c0e71889b0e19d8f0332b" +checksum = "51aa5bb0ca22415daca596a227b507f880ad1b2318a87fa9325312a5d285ca0d" dependencies = [ "minicbor-derive", ] [[package]] name = "minicbor-derive" -version = "0.6.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "130b9455e28a3f308f6579671816a6f2621e2e0cbf55dc2f886345bef699481e" +checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" dependencies = [ "proc-macro2", "quote", @@ -3355,7 +3513,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ - "socket2", + "socket2 0.3.19", "winapi 0.3.9", ] @@ -3399,7 +3557,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85ee3c48cb9d9b275ad967a0e96715badc13c6029adb92f34fa17b9ff28fd81f" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro-error", "proc-macro2", "quote", @@ -3420,7 +3578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10ddc0eb0117736f19d556355464fc87efc8ad98b29e3fd84f02531eb6e90840" dependencies = [ "bytes 1.0.1", - "futures 0.3.11", + "futures 0.3.17", "log", "pin-project 1.0.4", "smallvec 1.6.1", @@ -3429,22 +3587,33 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.21.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6147c3d50b4f3cdabfe2ecc94a0191fd3d6ad58aefd9664cf396285883486" +checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" dependencies = [ "approx", - "generic-array 0.13.2", "matrixmultiply", + "nalgebra-macros", "num-complex", - "num-rational", + "num-rational 0.4.0", "num-traits", - "rand 0.7.3", + "rand 0.8.4", "rand_distr", "simba", "typenum", ] +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "names" version = "0.11.0" @@ -3477,14 +3646,15 @@ dependencies = [ [[package]] name = "node-template" -version = "3.0.0" +version = "3.0.0-monthly-2021-08" dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "jsonrpc-core", "node-template-runtime", - "pallet-tasking-rpc", + "pallet-tasking", "pallet-tasking-runtime-api", + "pallet-tasking-v2", "pallet-transaction-payment-rpc", "sc-basic-authorship", "sc-cli", @@ -3497,7 +3667,9 @@ dependencies = [ "sc-rpc", "sc-rpc-api", "sc-service", + "sc-telemetry", "sc-transaction-pool", + "sc-transaction-pool-api", "sp-api", "sp-block-builder", "sp-blockchain", @@ -3507,7 +3679,7 @@ dependencies = [ "sp-finality-grandpa", "sp-inherents", "sp-runtime", - "sp-transaction-pool", + "sp-timestamp", "structopt", "substrate-build-script-utils", "substrate-frame-rpc-system", @@ -3515,7 +3687,7 @@ dependencies = [ [[package]] name = "node-template-runtime" -version = "3.0.0" +version = "3.0.0-monthly-2021-08" dependencies = [ "frame-benchmarking", "frame-executive", @@ -3531,11 +3703,11 @@ dependencies = [ "pallet-sudo", "pallet-tasking", "pallet-tasking-runtime-api", + "pallet-tasking-v2", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "serde", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -3564,10 +3736,12 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" -version = "5.1.2" +version = "6.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" dependencies = [ + "bitvec 0.19.5", + "funty", "memchr", "version_check", ] @@ -3585,11 +3759,10 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.2.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" dependencies = [ - "autocfg", "num-traits", ] @@ -3615,6 +3788,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.14" @@ -3640,6 +3824,12 @@ name = "object" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" + +[[package]] +name = "object" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" dependencies = [ "crc32fast", "indexmap", @@ -3683,85 +3873,77 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e4ad8ad50df73d1bc99f6a67bfbe84e8be1554019a798ba37db958f9ad4cc9" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", - "serde", "sp-runtime", "sp-std", ] [[package]] name = "pallet-aura" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ff6054e982e7841a2519c988680620a85c1da5cd32363998a30302ed47f6f9" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", "pallet-session", "pallet-timestamp", "parity-scale-codec", - "serde", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", "sp-std", - "sp-timestamp", ] [[package]] name = "pallet-authorship" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47433a94141451e7079aabf3ca28f2bde8c642d84b568be9626e9b7cae8b11b1" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "sp-authorship", - "sp-inherents", "sp-runtime", "sp-std", ] [[package]] name = "pallet-balances" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41aaeaf084e594273f82bcbf96416ef1fcab602e15dd1df04b9930eceb2eb518" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", - "serde", "sp-runtime", "sp-std", ] [[package]] name = "pallet-grandpa" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c012cb0337ce1eaf0685be2777bce1ef8c5d7b7be77ea33916c316b40af43fa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-authorship", "pallet-session", "parity-scale-codec", - "serde", "sp-application-crypto", "sp-core", "sp-finality-grandpa", + "sp-io", "sp-runtime", "sp-session", "sp-staking", @@ -3770,9 +3952,8 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3ea6fa9aa36735ec11d7ec4d97dd6472650c0656fdc6d4adaca2578bd71134" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", @@ -3784,16 +3965,15 @@ dependencies = [ [[package]] name = "pallet-session" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d243c3ccac56a4c55fade6be5c5af1de07fac374fa7856377980a76b0c193cf" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", + "log", "pallet-timestamp", "parity-scale-codec", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -3805,19 +3985,20 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95853affe89b7b755b2e7d1fcf7f8804b074dea53d98703f9b8b6ebf28dfb32" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "frame-election-provider-support", "frame-support", "frame-system", + "log", "pallet-authorship", "pallet-session", "parity-scale-codec", + "paste", "serde", "sp-application-crypto", "sp-io", - "sp-npos-elections", "sp-runtime", "sp-staking", "sp-std", @@ -3826,14 +4007,12 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a96774302e3824b7924c2465935ca4d558ea5f6a762c043fbc45fd2646ce89" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", - "serde", "sp-io", "sp-runtime", "sp-std", @@ -3857,41 +4036,38 @@ dependencies = [ ] [[package]] -name = "pallet-tasking-rpc" +name = "pallet-tasking-runtime-api" version = "3.0.0" dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "pallet-tasking-runtime-api", "parity-scale-codec", - "serde", "sp-api", - "sp-blockchain", - "sp-rpc", - "sp-runtime", ] [[package]] -name = "pallet-tasking-runtime-api" -version = "3.0.0" +name = "pallet-tasking-v2" +version = "1.0.0" dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", - "sp-api", + "serde", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-timestamp" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17dd274716a55a2c3e34d9c0ed66aaac3d7e0393ec9fd985e2b8532d697a7f3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", + "log", "parity-scale-codec", - "serde", "sp-inherents", "sp-io", "sp-runtime", @@ -3901,9 +4077,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e10dc1a10dd3f52edb20d3885cf5b2b16f26273a4d93e61331c6691fb13ab3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-support", "frame-system", @@ -3918,9 +4093,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7835717b7d8fb59c33dd73f083c68a6d143a1dbe6029364c63ea7f4cb0ba3f9c" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -3936,9 +4110,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a92d3383260d0d19d9a36f40766d48d779fd19baccba8b20c3e7d2670a26ee1" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -3948,25 +4121,26 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111e193c96758d476d272093a853882668da17489f76bf4361b8decae0b6c515" +checksum = "2e337f62db341435f0da05b8f6b97e984ef4ea5800510cd07c2d624688c40b47" dependencies = [ "blake2-rfc", "crc32fast", + "fs2", "hex", "libc", "log", "memmap2", "parking_lot 0.11.1", - "rand 0.8.2", + "rand 0.8.4", ] [[package]] name = "parity-multiaddr" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bfda2e46fc5e14122649e2645645a81ee5844e0fb2e727ef560cc71a8b2d801" +checksum = "58341485071825827b7f03cf7efd1cb21e6a709bea778fb50227fd45d2f361b4" dependencies = [ "arrayref", "bs58", @@ -3976,30 +4150,31 @@ dependencies = [ "percent-encoding 2.1.0", "serde", "static_assertions", - "unsigned-varint 0.6.0", + "unsigned-varint 0.7.0", "url 2.2.0", ] [[package]] name = "parity-scale-codec" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c823fdae1bb5ff5708ee61a62697e6296175dc671710876871c853f48592b3" +checksum = "8975095a2a03bbbdc70a74ab11a4f76a6d0b84680d87c68d722531b0ac28e8a9" dependencies = [ - "arrayvec 0.5.2", - "bitvec", + "arrayvec 0.7.1", + "bitvec 0.20.1", "byte-slice-cast", + "impl-trait-for-tuples", "parity-scale-codec-derive", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9029e65297c7fd6d7013f0579e193ec2b34ae78eabca854c9417504ad8a2d214" +checksum = "40dbbfef7f0a1143c5b06e0d76a6278e25dac0bc1af4be51a0fbb73f07e7ad09" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -4032,12 +4207,12 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664a8c6b8e62d8f9f2f937e391982eb433ab285b4cd9545b342441e04a906e42" +checksum = "7ad6f1acec69b95caf435bbd158d486e5a0a44fcf51531e84922c59ff09e8457" dependencies = [ "cfg-if 1.0.0", - "hashbrown", + "hashbrown 0.11.2", "impl-trait-for-tuples", "parity-util-mem-derive", "parking_lot 0.11.1", @@ -4068,9 +4243,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "parity-ws" @@ -4171,31 +4346,12 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "paste" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] - [[package]] name = "paste" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1" -[[package]] -name = "paste-impl" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" -dependencies = [ - "proc-macro-hack", -] - [[package]] name = "pbkdf2" version = "0.3.0" @@ -4404,9 +4560,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "primitive-types" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", "impl-codec", @@ -4423,6 +4579,16 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +dependencies = [ + "thiserror", + "toml", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4461,9 +4627,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" dependencies = [ "unicode-xid", ] @@ -4500,14 +4666,14 @@ checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" dependencies = [ "bytes 1.0.1", "heck", - "itertools", + "itertools 0.9.0", "log", "multimap", "petgraph", "prost", "prost-types", "tempfile", - "which 4.0.2", + "which", ] [[package]] @@ -4517,7 +4683,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" dependencies = [ "anyhow", - "itertools", + "itertools 0.9.0", "proc-macro2", "quote", "syn", @@ -4544,13 +4710,13 @@ dependencies = [ [[package]] name = "pwasm-utils" -version = "0.14.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f53bc2558e8376358ebdc28301546471d67336584f6438ed4b7c7457a055fd7" +checksum = "f0c1a2f10b47d446372a4f397c58b329aaea72b2daf9395a623a411cb8ccb54f" dependencies = [ "byteorder", "log", - "parity-wasm 0.41.0", + "parity-wasm 0.42.2", ] [[package]] @@ -4585,6 +4751,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" + [[package]] name = "radium" version = "0.6.2" @@ -4630,9 +4802,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ "libc", "rand_chacha 0.3.0", @@ -4695,11 +4867,12 @@ dependencies = [ [[package]] name = "rand_distr" -version = "0.2.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2" +checksum = "051b398806e42b9cd04ad9ec8f81e355d0a382c543ac6672c62f5a5b452ef142" dependencies = [ - "rand 0.7.3", + "num-traits", + "rand 0.8.4", ] [[package]] @@ -4729,17 +4902,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "raw-cpuid" -version = "8.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fdf7d9dbd43f3d81d94a49c1c3df73cc2b3827995147e6cf7f89d4ec5483e73" -dependencies = [ - "bitflags", - "cc", - "rustc_version", -] - [[package]] name = "rawpointer" version = "0.2.1" @@ -4844,6 +5006,7 @@ checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" dependencies = [ "log", "rustc-hash", + "serde", "smallvec 1.6.1", ] @@ -4896,11 +5059,21 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error 1.2.3", +] + [[package]] name = "retain_mut" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53552c6c49e1e13f1a203ef0080ab3bbef0beb570a528993e83df057a9d9bba1" +checksum = "e9c17925a9027d298a4603d286befe3f9dc0e8ed02523141914eb628798d6e5b" [[package]] name = "ring" @@ -4919,9 +5092,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6" +checksum = "7a62eca5cacf2c8261128631bed9f045598d40bfbe4b29f5163f0f802f8f44a7" dependencies = [ "libc", "librocksdb-sys", @@ -5014,13 +5187,23 @@ dependencies = [ "security-framework", ] +[[package]] +name = "ruzstd" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cada0ef59efa6a5f4dc5e491f93d9f31e3fc7758df421ff1de8a706338e1100" +dependencies = [ + "byteorder", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "pin-project 0.4.27", "static_assertions", ] @@ -5058,13 +5241,23 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sc-allocator" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +dependencies = [ + "log", + "sp-core", + "sp-wasm-interface", + "thiserror", +] + [[package]] name = "sc-basic-authorship" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de86afb63617599821312bda08882451ff2b49d9c45e22513ddff5a07c6d966e" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "log", "parity-scale-codec", @@ -5072,28 +5265,26 @@ dependencies = [ "sc-client-api", "sc-proposer-metrics", "sc-telemetry", + "sc-transaction-pool-api", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-inherents", "sp-runtime", - "sp-transaction-pool", "substrate-prometheus-endpoint", ] [[package]] name = "sc-block-builder" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9862161f9d09d870401c7256c89ad1eb3afa56a61f7d7135c2bac76ff7152955" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", - "sp-consensus", "sp-core", "sp-inherents", "sp-runtime", @@ -5102,9 +5293,8 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d97030776b49bc9c109e2d349212d8f2500637761048e1af5b7ce2dfd994c7" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -5116,7 +5306,6 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-chain-spec", "sp-consensus-babe", "sp-core", "sp-runtime", @@ -5124,11 +5313,10 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f14985513db9798fcedea58bdc8a08f1c6b3a515d6546ced7467b059b7982c4" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -5136,13 +5324,12 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ec1647b5c1483fa05f7f32e436d0e378e2f3d5696a5a30bddf66f5faf28acb4" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "chrono", "fdlimit", - "futures 0.3.11", + "futures 0.3.17", "hex", "libp2p", "log", @@ -5175,13 +5362,12 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d8b2c8dc0cee9ac56e87ad50c980edbdeb35bdd5b5d9da4ae90567423363be" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "derive_more", "fnv", - "futures 0.3.11", + "futures 0.3.17", "hash-db", "kvdb", "lazy_static", @@ -5189,6 +5375,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", "sc-executor", + "sc-transaction-pool-api", "sp-api", "sp-blockchain", "sp-consensus", @@ -5201,7 +5388,6 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-storage", - "sp-transaction-pool", "sp-trie", "sp-utils", "sp-version", @@ -5210,9 +5396,8 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5741e447d71ff36c147f961b2271b6b3fad0cc347e96936bc8b63ddffa594b27" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "blake2-rfc", "hash-db", @@ -5230,7 +5415,6 @@ dependencies = [ "sc-state-db", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-database", "sp-runtime", @@ -5241,30 +5425,43 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99f20cc8b8a74e218365ac4187bce26ea631d58d221caa1797bc6ec8056dba33" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", + "futures 0.3.17", + "futures-timer 3.0.2", + "libp2p", + "log", + "parking_lot 0.11.1", "sc-client-api", + "serde", + "sp-api", "sp-blockchain", "sp-consensus", + "sp-core", "sp-runtime", + "sp-state-machine", + "sp-utils", + "substrate-prometheus-endpoint", + "thiserror", + "wasm-timer", ] [[package]] name = "sc-consensus-aura" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e0d32ccddef567a0fe373729aa4da51b2d437cbb102b9810400c9e77e040c1d" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", "derive_more", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.11.1", "sc-block-builder", "sc-client-api", + "sc-consensus", "sc-consensus-slots", "sc-telemetry", "sp-api", @@ -5279,25 +5476,24 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-timestamp", "sp-version", "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus-babe" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d52048476e0fcb53feae8ca919a602104f1ba0b89a729b496440f36b332961" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", "derive_more", "fork-tree", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "log", "merlin", "num-bigint", - "num-rational", + "num-rational 0.2.4", "num-traits", "parity-scale-codec", "parking_lot 0.11.1", @@ -5305,6 +5501,7 @@ dependencies = [ "rand 0.7.3", "retain_mut", "sc-client-api", + "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", "sc-consensus-uncles", @@ -5325,7 +5522,6 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-timestamp", "sp-utils", "sp-version", "substrate-prometheus-endpoint", @@ -5333,30 +5529,30 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "326313ffb249a526e8ee8e08af9fdf0c4459cebeaa760b934e9df3985b68e4df" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "fork-tree", "parity-scale-codec", - "parking_lot 0.11.1", "sc-client-api", + "sc-consensus", "sp-blockchain", "sp-runtime", ] [[package]] name = "sc-consensus-slots" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e09ff8b680d449102da9717a70c3bbbbb981fd4cf1bfbafc1739d954eb0898" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "async-trait", + "futures 0.3.17", "futures-timer 3.0.2", + "impl-trait-for-tuples", "log", "parity-scale-codec", - "parking_lot 0.11.1", "sc-client-api", + "sc-consensus", "sc-telemetry", "sp-api", "sp-application-crypto", @@ -5368,37 +5564,33 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", + "sp-timestamp", "sp-trie", "thiserror", ] [[package]] name = "sc-consensus-uncles" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37294bae6d787eecf2b15255dc75cd559b4ad813e0efcf28cd4423e218931b80" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "log", "sc-client-api", "sp-authorship", - "sp-consensus", - "sp-core", - "sp-inherents", "sp-runtime", + "thiserror", ] [[package]] name = "sc-executor" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bace6a35999d2da7311d8fb98a29c1e89dbf0d14e50ac14140f2c38089819f46" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "derive_more", "lazy_static", "libsecp256k1", "log", "parity-scale-codec", - "parity-wasm 0.41.0", + "parity-wasm 0.42.2", "parking_lot 0.11.1", "sc-executor-common", "sc-executor-wasmi", @@ -5419,15 +5611,15 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87004102a8e95f432f1c624c7fa7fb0edc5995db2e0fcbabbb697f1955e7c1d2" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "derive_more", "parity-scale-codec", - "parity-wasm 0.41.0", - "sp-allocator", + "pwasm-utils", + "sc-allocator", "sp-core", + "sp-maybe-compressed-blob", "sp-serializer", "sp-wasm-interface", "thiserror", @@ -5436,14 +5628,13 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3d7b6db2df5f2c24848883a855a8276363f00cef5b49744974f7e1203bf274" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "log", "parity-scale-codec", + "sc-allocator", "sc-executor-common", - "sp-allocator", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -5452,17 +5643,18 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24673c981fad2dff4398a09a1086579e2774f18d81639fa2bd9cb215e6dd9e36" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "cfg-if 1.0.0", + "libc", "log", "parity-scale-codec", - "parity-wasm 0.41.0", + "parity-wasm 0.42.2", "pwasm-utils", + "sc-allocator", "sc-executor-common", "scoped-tls", - "sp-allocator", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -5471,14 +5663,15 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e87e63c57933e173a8643ff197b579e3fc5c91b16ca006096f482de8159318" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", "derive_more", + "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "linked-hash-map", "log", @@ -5506,36 +5699,35 @@ dependencies = [ "sp-runtime", "sp-utils", "substrate-prometheus-endpoint", + "wasm-timer", ] [[package]] name = "sc-informant" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4c8994853e1158dc4f448b014aa83eef56ced214ec0af316eecf4a6ca3268f" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "ansi_term 0.12.1", - "futures 0.3.11", + "futures 0.3.17", + "futures-timer 3.0.2", "log", "parity-util-mem", "sc-client-api", "sc-network", + "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", - "sp-transaction-pool", - "sp-utils", "wasm-timer", ] [[package]] name = "sc-keystore" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d966ed36c404eced656bd63aad8a30d2c1a14633f07cd1d7d9c11b62f75a7905" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "async-trait", "derive_more", - "futures 0.3.11", + "futures 0.3.17", "futures-util", "hex", "merlin", @@ -5550,9 +5742,8 @@ dependencies = [ [[package]] name = "sc-light" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e8dbcb2951f7cf76ddf97ed26dcef0dab79d76745de4a8f169d58236ea8704" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "hash-db", "lazy_static", @@ -5570,13 +5761,12 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20fb4ed5d6b86faafb0743c8c2fd1c89b52cde7697373b254c7553800efaebbf" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "async-std", "async-trait", - "asynchronous-codec", + "asynchronous-codec 0.5.0", "bitflags", "bs58", "bytes 1.0.1", @@ -5586,7 +5776,7 @@ dependencies = [ "erased-serde", "fnv", "fork-tree", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "hex", "ip_network", @@ -5604,6 +5794,7 @@ dependencies = [ "rand 0.7.3", "sc-block-builder", "sc-client-api", + "sc-consensus", "sc-peerset", "serde", "serde_json", @@ -5624,11 +5815,10 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2cd5487d6f8051863a186e2aea4c233a07bb691780d3b117c9d6ffe1ff9a8fe" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "libp2p", "log", @@ -5636,19 +5826,20 @@ dependencies = [ "sc-network", "sp-runtime", "substrate-prometheus-endpoint", + "tracing", "wasm-timer", ] [[package]] name = "sc-offchain" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc91fc71c128748a3393cb3421e12a7759ccffcc1cc4a9e6ff4ead6cc68ba48" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "bytes 0.5.6", "fnv", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", + "hex", "hyper 0.13.9", "hyper-rustls", "log", @@ -5669,11 +5860,10 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce454e528e7797a239e734d0d66bf904d48be47aa92691ac7546a45ec32a64cf" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "libp2p", "log", "serde_json", @@ -5684,8 +5874,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfc2c6cc5dc0ecb1109cce9773b50ad9a3cdbf239dc702ef9071949244dcf3e" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -5693,11 +5882,10 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "750397c6aa5a4f922cac99599ad74a4082e3e87553d51ceb4c48abfa056ff32c" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", @@ -5705,15 +5893,16 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-executor", "sc-keystore", "sc-rpc-api", "sc-tracing", + "sc-transaction-pool-api", "serde_json", "sp-api", "sp-blockchain", - "sp-chain-spec", "sp-core", "sp-keystore", "sp-offchain", @@ -5721,19 +5910,18 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-transaction-pool", + "sp-tracing", "sp-utils", "sp-version", ] [[package]] name = "sc-rpc-api" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8393410297df2885efec20d0629a9833b4fd9e4ad83a92471e1ea0c11a0a54" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "derive_more", - "futures 0.3.11", + "futures 0.3.17", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -5741,21 +5929,21 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.11.1", + "sc-chain-spec", + "sc-transaction-pool-api", "serde", "serde_json", - "sp-chain-spec", "sp-core", "sp-rpc", "sp-runtime", - "sp-transaction-pool", + "sp-tracing", "sp-version", ] [[package]] name = "sc-rpc-server" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c76164897bd3b0d04c2d6aeeb4d3492c86e324b0b08f408b847ea35421b589" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "futures 0.1.30", "jsonrpc-core", @@ -5772,14 +5960,14 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9315b44eb991ca4f477d889bbd649a2b4b557f963fe48ec5a36c3422518e4a0" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", "directories", "exit-future", "futures 0.1.30", - "futures 0.3.11", + "futures 0.3.17", "futures-timer 3.0.2", "hash-db", "jsonrpc-core", @@ -5795,6 +5983,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-client-db", + "sc-consensus", "sc-executor", "sc-informant", "sc-keystore", @@ -5806,6 +5995,7 @@ dependencies = [ "sc-telemetry", "sc-tracing", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -5821,8 +6011,10 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", + "sp-storage", "sp-tracing", "sp-transaction-pool", + "sp-transaction-storage-proof", "sp-trie", "sp-utils", "sp-version", @@ -5836,9 +6028,8 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f144043d5860ce133f701fa78679d6278f2dfc698686beb5f6d892c267e9d92" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "log", "parity-scale-codec", @@ -5852,12 +6043,11 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05040c594b331d90d7341e82c6dc6a3eb7bb2afb4e5dc9c36a79a6754166057" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "chrono", - "futures 0.3.11", + "futures 0.3.17", "libp2p", "log", "parking_lot 0.11.1", @@ -5865,19 +6055,16 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "sp-utils", "take_mut", - "tracing", - "tracing-subscriber", + "thiserror", "void", "wasm-timer", ] [[package]] name = "sc-tracing" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0a4aa327b8bc89d9c5ae57a2f493d8f54ccd706f6763614ab522559fe481d8" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "ansi_term 0.12.1", "atty", @@ -5888,80 +6075,107 @@ dependencies = [ "parking_lot 0.11.1", "regex", "rustc-hash", + "sc-client-api", + "sc-rpc-server", "sc-telemetry", "sc-tracing-proc-macro", "serde", "serde_json", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-storage", "sp-tracing", "thiserror", "tracing", - "tracing-core", "tracing-log", "tracing-subscriber", "wasm-bindgen", + "wasm-timer", "web-sys", ] [[package]] name = "sc-tracing-proc-macro" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec18b0506911e6d624d9ea8f8cc5f503e7944a0fe7d37de95ee84033cf160ebc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", ] [[package]] -name = "sc-transaction-graph" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b385b8f66cce185478c500ad3de8f4775ab0e948c31561aeac78a27bedc654" +name = "sc-transaction-pool" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "derive_more", - "futures 0.3.11", + "futures 0.3.17", + "intervalier", "linked-hash-map", "log", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.1", "retain_mut", + "sc-client-api", + "sc-transaction-pool-api", "serde", + "sp-api", "sp-blockchain", "sp-core", "sp-runtime", + "sp-tracing", "sp-transaction-pool", "sp-utils", + "substrate-prometheus-endpoint", "thiserror", "wasm-timer", ] [[package]] -name = "sc-transaction-pool" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f4331ea8da2ff45a9466637f90f5cc89f9d31fcd1cd20f74f2520b33bff069" +name = "sc-transaction-pool-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", - "futures-diagnose", - "intervalier", + "derive_more", + "futures 0.3.17", "log", "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.11.1", - "sc-client-api", - "sc-transaction-graph", - "sp-api", + "serde", "sp-blockchain", - "sp-core", "sp-runtime", - "sp-tracing", - "sp-transaction-pool", - "sp-utils", - "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", +] + +[[package]] +name = "scale-info" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +dependencies = [ + "bitvec 0.20.1", + "cfg-if 1.0.0", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +dependencies = [ + "proc-macro-crate 1.0.0", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -5987,7 +6201,6 @@ dependencies = [ "merlin", "rand 0.7.3", "rand_core 0.5.1", - "serde", "sha2 0.8.2", "subtle 2.4.0", "zeroize", @@ -6005,26 +6218,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scroll" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12bd20b94c7cdfda8c7ba9b92ad0d9a56e3fa018c25fca83b51aa664c9b4c0d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sct" version = "0.6.0" @@ -6112,18 +6305,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.119" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bdd36f49e35b61d49efd8aa7fc068fd295961fd2286d0b2ee9a4c7a14e99cc3" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.119" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552954ce79a059ddd5fd68c271592374bd15cab2274970380c000118aeffe1cd" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2", "quote", @@ -6214,9 +6407,9 @@ dependencies = [ [[package]] name = "shlex" -version = "0.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook" @@ -6245,14 +6438,14 @@ checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" [[package]] name = "simba" -version = "0.1.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb931b1367faadea6b1ab1c306a860ec17aaa5fa39f367d0c744e69d971a1fb2" +checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" dependencies = [ "approx", "num-complex", "num-traits", - "paste 0.1.18", + "paste", ] [[package]] @@ -6261,6 +6454,15 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] + [[package]] name = "smallvec" version = "0.6.14" @@ -6305,6 +6507,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "socket2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "soketto" version = "0.4.2" @@ -6314,33 +6526,20 @@ dependencies = [ "base64 0.12.3", "bytes 0.5.6", "flate2", - "futures 0.3.11", + "futures 0.3.17", "httparse", "log", "rand 0.7.3", "sha-1 0.9.2", ] -[[package]] -name = "sp-allocator" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec5f988ad0cabdb646318cb515a91e9d89062debc9728f9b634d73acab3f3f39" -dependencies = [ - "log", - "sp-core", - "sp-std", - "sp-wasm-interface", - "thiserror", -] - [[package]] name = "sp-api" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63c3460d5daecf67df542c34c2bbd636214a5a200d4bddcfa2ffb9e72c346af" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "hash-db", + "log", "parity-scale-codec", "sp-api-proc-macro", "sp-core", @@ -6353,12 +6552,11 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "289624f4fe0f61e63a5019ed26c3bc732b5145eb52796ac6053cd72656d947a1" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "blake2-rfc", - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -6366,9 +6564,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52e2e6d43036b97c4fce1ed87c5262c1ffdc78c655ada4d3024a3f8094bdd2c" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "serde", @@ -6379,9 +6576,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f1c69966c192d1dee8521f0b29ece2b14db07b9b44d801a94e295234761645" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "integer-sqrt", "num-traits", @@ -6389,14 +6585,15 @@ dependencies = [ "serde", "sp-debug-derive", "sp-std", + "static_assertions", ] [[package]] name = "sp-authorship" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec68fb8e5a37548b06c14ee91a9c574cc330324c86d37810ec29dd4f8bc68d7" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", "parity-scale-codec", "sp-inherents", "sp-runtime", @@ -6405,9 +6602,8 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0adc979dbe619f56d664ebd1293dce13fcad6b8a47bcdd620ed53a454d330d12" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "sp-api", @@ -6418,11 +6614,10 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8007c1ad8e9fb6cd8eed4e0fc91504a9ca4b228e1315302a2fbb0ac7f509f1b" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "log", "lru", "parity-scale-codec", @@ -6435,25 +6630,14 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sp-chain-spec" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a24beb11980d0c755ead0c05f3f966c490e4a3730785c04c03855fada65d697" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "sp-consensus" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884db6c4b03f0f2fb2993127a2db95fc740fcd3496746dcaa6829c9868e7dc75" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "async-trait", + "futures 0.3.17", "futures-timer 3.0.2", - "libp2p", "log", "parity-scale-codec", "parking_lot 0.11.1", @@ -6474,13 +6658,14 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd00fc95b26393522be1394fb67cc536736cc5a902dec0d3e2827909b7c1118" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", "parity-scale-codec", "sp-api", "sp-application-crypto", + "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -6490,12 +6675,13 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a153085b1542b5cbe23686433cd36d1a634964f1b707671d0ffb01d8d9313047" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", "merlin", "parity-scale-codec", + "serde", "sp-api", "sp-application-crypto", "sp-consensus", @@ -6511,9 +6697,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32bd501ab76c827d74f145063cd8cb993a9f634dac93c9b0d909111cd5900a6a" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -6522,9 +6707,8 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030895d70bf3095c857f4727a7cce7c43af29efe3413bb547ee28700f7d78766" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -6535,16 +6719,15 @@ dependencies = [ [[package]] name = "sp-core" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbc8d4e9b8a7d5819ed26f1374017bb32833ef4890e4ff065e1da30669876bc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "base58", "blake2-rfc", "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.11", + "futures 0.3.17", "hash-db", "hash256-std-hasher", "hex", @@ -6580,9 +6763,8 @@ dependencies = [ [[package]] name = "sp-database" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8c3f018913eef191d95c824657c5759c459d28670e654fa34f5d9bd5e6f0492" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -6591,8 +6773,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e80275f23b4e7ba8f54dec5f90f016530e7307d2ee9445f617ab986cbe97f31e" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "proc-macro2", "quote", @@ -6601,9 +6782,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fdc625f8c7b13b9a136d334888b21b5743d2081cb666cb03efca1dc9b8f74d1" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "environmental", "parity-scale-codec", @@ -6613,9 +6793,8 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702e0be150e1b557df42326ec9b82c2010366631d03be27c69912d446abbf87a" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "finality-grandpa", "log", @@ -6631,24 +6810,24 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2542380b535c6941502a0a3069a657eb5abb70fd67b11afa164d4a4b038ba73a" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "async-trait", + "impl-trait-for-tuples", "parity-scale-codec", - "parking_lot 0.11.1", "sp-core", + "sp-runtime", "sp-std", "thiserror", ] [[package]] name = "sp-io" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fd69f0a6e91bedc2fb1c5cc3689c212474b6c918274cb4cb14dbbe3c428c14" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "hash-db", "libsecp256k1", "log", @@ -6657,6 +6836,7 @@ dependencies = [ "sp-core", "sp-externalities", "sp-keystore", + "sp-maybe-compressed-blob", "sp-runtime-interface", "sp-state-machine", "sp-std", @@ -6669,9 +6849,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b59f2b0e94b2048d4984aa6eb40eef2e4c05d3adf27a083dd3c9b0fce74ef7a" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "lazy_static", "sp-core", @@ -6681,13 +6860,12 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6ccd2baf189112355338e8b224dc513cd239b974dbd717f12b3dc7a7248c3b" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "async-trait", "derive_more", - "futures 0.3.11", + "futures 0.3.17", "merlin", "parity-scale-codec", "parking_lot 0.11.1", @@ -6697,11 +6875,19 @@ dependencies = [ "sp-externalities", ] +[[package]] +name = "sp-maybe-compressed-blob" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +dependencies = [ + "ruzstd", + "zstd", +] + [[package]] name = "sp-npos-elections" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e6e8b84ee0dc7bb65b55beba55ffbc17803222ab7c746a74f72fc5869c7320" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "serde", @@ -6713,11 +6899,10 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "085fbb1aa72d85a17524047fc1e708bc3bd038b02b46dc7ac601fa39c8af93d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -6725,9 +6910,8 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd80eedcedcc8342e77c26d59ad90b6904715a862731fa16616650773570e63" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "sp-api", "sp-core", @@ -6737,27 +6921,26 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54702e109f1c8a870dd4065a497d2612d42cec5817126e96cc0658c5ea975784" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "backtrace", ] [[package]] name = "sp-rpc" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e5b1ed655d11449073b914b048895f45241e02b3919d1d0187f315435fee18" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "rustc-hash", "serde", "sp-core", + "tracing-core", ] [[package]] name = "sp-runtime" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa4b353b76f04616dbdb8d269d58dcac47acb31c006d3b70e7b64233e68695e" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "either", "hash256-std-hasher", @@ -6765,7 +6948,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "paste 1.0.4", + "paste", "rand 0.7.3", "serde", "sp-application-crypto", @@ -6777,9 +6960,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e5c88b4bc8d607e4e2ff767a85db58cf7101f3dd6064f06929342ea67fe8fb" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6795,12 +6977,11 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a6c7c2251512c9e533d15db8a863b06ece1cbee778130dd9adbe44b6b39aa9" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -6809,8 +6990,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d793f01eb9eea9f30ffc63b821170068b9f0d9edf715d8ba77dc4de9c300f" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "serde", "serde_json", @@ -6818,9 +6998,8 @@ dependencies = [ [[package]] name = "sp-session" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7cf161533725a78083b04f3269effe4c3b4b6ce5f655019b3eec3e729ba4d4" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "sp-api", @@ -6832,9 +7011,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc729eb10f8809c61a1fe439ac118a4413de004aaf863003ee8752ac0b596e73" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -6843,9 +7021,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fa4143e58e9130f726d4e8a9b86f3530a8bd19a2eedcdcf4af205f4b5a6d4f" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "hash-db", "log", @@ -6860,21 +7037,20 @@ dependencies = [ "sp-std", "sp-trie", "thiserror", + "tracing", "trie-db", "trie-root", ] [[package]] name = "sp-std" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35391ea974fa5ee869cb094d5b437688fbf3d8127d64d1b9fed5822a1ed39b12" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" [[package]] name = "sp-storage" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86af458d4a0251c490cdde9dcaaccb88d398f3b97ac6694cdd49ed9337e6b961" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "impl-serde", "parity-scale-codec", @@ -6886,9 +7062,8 @@ dependencies = [ [[package]] name = "sp-tasks" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c585340cbee96c53a9b43fd07d81edf6cebeb80e4ca7c0ee79b856c0b1883a0e" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "log", "sp-core", @@ -6900,27 +7075,33 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27387c541197b9f47f3d9ddcab5649a3ecdca582d2f2ea2b511af24a3d3cbf83" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "impl-trait-for-tuples", + "async-trait", + "futures-timer 3.0.2", + "log", "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", "sp-std", + "thiserror", "wasm-timer", ] [[package]] name = "sp-tracing" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567382d8d4e14fb572752863b5cd57a78f9e9a6583332b590b726f061f3ea957" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ + "erased-serde", "log", "parity-scale-codec", + "parking_lot 0.10.2", + "serde", + "serde_json", + "slog", "sp-std", "tracing", "tracing-core", @@ -6929,26 +7110,32 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3264d3b7ea31483eddffa2cc7f28c4d9c022598e456a985fd1cb5879a4609853" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "derive_more", - "futures 0.3.11", + "sp-api", + "sp-runtime", +] + +[[package]] +name = "sp-transaction-storage-proof" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +dependencies = [ + "async-trait", "log", "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", + "sp-core", + "sp-inherents", "sp-runtime", - "thiserror", + "sp-std", + "sp-trie", ] [[package]] name = "sp-trie" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85b7f745da41ef825c6f7b93f1fdc897b03df94a4884adfbb70fbcd0aed1298" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "hash-db", "memory-db", @@ -6961,11 +7148,10 @@ dependencies = [ [[package]] name = "sp-utils" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ec2a5f924f7affd1e959f8f3c02bd87cdfa0e11c71a4cbc075f955ead8c1a1" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "futures-core", "futures-timer 3.0.2", "lazy_static", @@ -6974,22 +7160,35 @@ dependencies = [ [[package]] name = "sp-version" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbeffa538a13d715d30e01d57a2636ba32845b737a29a3ea32403576588222e7" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "impl-serde", "parity-scale-codec", + "parity-wasm 0.42.2", "serde", "sp-runtime", "sp-std", + "sp-version-proc-macro", + "thiserror", +] + +[[package]] +name = "sp-version-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +dependencies = [ + "parity-scale-codec", + "proc-macro-crate 1.0.0", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "sp-wasm-interface" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b214e125666a6416cf30a70cc6a5dacd34a4e5197f8a3d479f714af7e1dc7a47" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7017,11 +7216,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "statrs" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce16f6de653e88beca7bd13780d08e09d4489dbca1f9210e041bc4852481382" +checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" dependencies = [ - "rand 0.7.3", + "approx", + "lazy_static", + "nalgebra", + "num-traits", + "rand 0.8.4", ] [[package]] @@ -7110,20 +7313,18 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd540ba72520174c2c73ce96bf507eeba3cc8a481f58be92525b69110e1fa645" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "platforms", ] [[package]] name = "substrate-frame-rpc-system" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e46123ec4a690d91967de07cd6af4dde90d14519a1a8d43f61bd3f78dd3d0ef" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.11", + "futures 0.3.17", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -7131,20 +7332,19 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-rpc-api", + "sc-transaction-pool-api", "serde", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-runtime", - "sp-transaction-pool", ] [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb561c19a121e1c89daa79dbfa67a55080f813caa47fd231833a0669696d508" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "async-std", "derive_more", @@ -7157,14 +7357,14 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a3d51ad6abbc408b03ea962062bfcc959b438a318d7d4bedd181e1effd0610" +version = "5.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" dependencies = [ "ansi_term 0.12.1", "atty", "build-helper", "cargo_metadata", + "sp-maybe-compressed-blob", "tempfile", "toml", "walkdir", @@ -7185,9 +7385,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.58" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" +checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" dependencies = [ "proc-macro2", "quote", @@ -7220,9 +7420,9 @@ checksum = "36474e732d1affd3a6ed582781b3683df3d0563714c59c39591e8ff707cf078e" [[package]] name = "target-lexicon" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee5a98e506fb7231a304c3a1bd7c132a55016cf65001e0282480665870dfcb9" +checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" [[package]] name = "tempfile" @@ -7232,7 +7432,7 @@ checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ "cfg-if 1.0.0", "libc", - "rand 0.8.2", + "rand 0.8.4", "redox_syscall 0.2.4", "remove_dir_all", "winapi 0.3.9", @@ -7258,18 +7458,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.23" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +checksum = "283d5230e63df9608ac7d9691adc1dfb6e701225436eb64d0b9a7f0a5a04f6ec" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.23" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +checksum = "fa3884228611f5cd3608e2d409bf7dce832e4eb3135e3f11addbd7e41bd68e71" dependencies = [ "proc-macro2", "quote", @@ -7334,9 +7534,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" +checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" dependencies = [ "tinyvec_macros", ] @@ -7627,9 +7827,9 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ "cfg-if 1.0.0", "log", @@ -7640,9 +7840,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" dependencies = [ "proc-macro2", "quote", @@ -7651,9 +7851,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" dependencies = [ "lazy_static", ] @@ -7670,9 +7870,9 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" dependencies = [ "lazy_static", "log", @@ -7691,9 +7891,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.2.15" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fa8f0c8f4c594e4fc9debc1990deab13238077271ba84dd853d54902ee3401" +checksum = "b9cbe87a2fa7e35900ce5de20220a582a9483a7063811defce79d7cbd59d4cfe" dependencies = [ "ansi_term 0.12.1", "chrono", @@ -7713,12 +7913,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.22.2" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc176c377eb24d652c9c69c832c832019011b6106182bf84276c66b66d5c9a6" +checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.11.2", "log", "rustc-hex", "smallvec 1.6.1", @@ -7733,6 +7933,49 @@ dependencies = [ "hash-db", ] +[[package]] +name = "trust-dns-proto" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0d7f5db438199a6e2609debe3f69f808d074e0a2888ee0bccb45fe234d03f4" +dependencies = [ + "async-trait", + "cfg-if 1.0.0", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.2.0", + "ipnet", + "lazy_static", + "log", + "rand 0.8.4", + "smallvec 1.6.1", + "thiserror", + "tinyvec", + "url 2.2.0", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770" +dependencies = [ + "cfg-if 1.0.0", + "futures-util", + "ipconfig", + "lazy_static", + "log", + "lru-cache", + "parking_lot 0.11.1", + "resolv-conf", + "smallvec 1.6.1", + "thiserror", + "trust-dns-proto", +] + [[package]] name = "try-lock" version = "0.2.3" @@ -7841,7 +8084,19 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.5.0", + "bytes 1.0.1", + "futures-io", + "futures-util", +] + +[[package]] +name = "unsigned-varint" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f8d425fafb8cd76bc3f22aace4af471d3156301d7508f2107e98fbeae10bc7f" +dependencies = [ + "asynchronous-codec 0.6.0", "bytes 1.0.1", "futures-io", "futures-util", @@ -7876,6 +8131,16 @@ dependencies = [ "percent-encoding 2.1.0", ] +[[package]] +name = "value-bag" +version = "1.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae" +dependencies = [ + "ctor", + "version_check", +] + [[package]] name = "vcpkg" version = "0.2.11" @@ -7914,9 +8179,9 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", "winapi 0.3.9", @@ -7958,9 +8223,9 @@ checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasm-bindgen" -version = "0.2.69" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" +checksum = "8ce9b1b516211d33767048e5d47fa2a381ed8b76fc48d2ce4aa39877f9f183e0" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -7968,9 +8233,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.69" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" +checksum = "cfe8dc78e2326ba5f845f4b5bf548401604fa20b1dd1d365fb73b6c1d6364041" dependencies = [ "bumpalo", "lazy_static", @@ -7995,9 +8260,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.69" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" +checksum = "44468aa53335841d9d6b6c023eaab07c0cd4bddbcfdee3e2bb1e8d2cb8069fef" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8005,9 +8270,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.69" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" +checksum = "0195807922713af1e67dc66132c7328206ed9766af3858164fb583eedc25fbad" dependencies = [ "proc-macro2", "quote", @@ -8018,9 +8283,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.69" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" +checksum = "acdb075a845574a1fa5f09fd77e43f7747599301ea3417a9fbffdeedfc1f4a29" [[package]] name = "wasm-gc-api" @@ -8039,7 +8304,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "js-sys", "parking_lot 0.11.1", "pin-utils", @@ -8050,38 +8315,39 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.6.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +checksum = "d2ee05bba3d1d994652079893941a2ef9324d2b58a63c31b40678fb7eddd7a5a" dependencies = [ + "downcast-rs", "libc", "memory_units", - "num-rational", + "num-rational 0.2.4", "num-traits", - "parity-wasm 0.41.0", + "parity-wasm 0.42.2", "wasmi-validation", ] [[package]] name = "wasmi-validation" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +checksum = "a2eb8e860796d8be48efef530b60eebf84e74a88bce107374fffb0da97d504b8" dependencies = [ - "parity-wasm 0.41.0", + "parity-wasm 0.42.2", ] [[package]] name = "wasmparser" -version = "0.71.0" +version = "0.78.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a30c99437829ede826802bfcf28500cf58df00e66cb9114df98813bc145ff1" +checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" [[package]] name = "wasmtime" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7426055cb92bd9a1e9469b48154d8d6119cd8c498c8b70284e420342c05dc45d" +checksum = "b310b9d20fcf59385761d1ade7a3ef06aecc380e3d3172035b919eaf7465d9f7" dependencies = [ "anyhow", "backtrace", @@ -8089,8 +8355,11 @@ dependencies = [ "cfg-if 1.0.0", "cpp_demangle", "indexmap", + "lazy_static", "libc", "log", + "paste", + "psm", "region", "rustc-demangle", "serde", @@ -8102,15 +8371,14 @@ dependencies = [ "wasmtime-jit", "wasmtime-profiling", "wasmtime-runtime", - "wat", "winapi 0.3.9", ] [[package]] name = "wasmtime-cache" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c01d9287e36921e46f5887a47007824ae5dbb9b7517a2d565660ab4471478709" +checksum = "d14d500d5c3dc5f5c097158feee123d64b3097f0d836a2a27dff9c761c73c843" dependencies = [ "anyhow", "base64 0.13.0", @@ -8129,27 +8397,29 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4134ed3a4316cd0de0e546c6004850afe472b0fa3fcdc2f2c15f8d449562d962" +checksum = "c525b39f062eada7db3c1298287b96dcb6e472b9f6b22501300b28d9fa7582f6" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "cranelift-wasm", + "target-lexicon", + "wasmparser", "wasmtime-environ", ] [[package]] name = "wasmtime-debug" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91fa931df6dd8af2b02606307674d3bad23f55473d5f4c809dddf7e4c4dc411" +checksum = "c5d2a763e7a6fc734218e0e463196762a4f409c483063d81e0e85f96343b2e0a" dependencies = [ "anyhow", - "gimli", + "gimli 0.24.0", "more-asserts", - "object", + "object 0.24.0", "target-lexicon", "thiserror", "wasmparser", @@ -8158,16 +8428,15 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1098871dc3120aaf8190d79153e470658bb79f63ee9ca31716711e123c28220" +checksum = "f64d0c2d881c31b0d65c1f2695e022d71eb60b9fbdd336aacca28208b58eac90" dependencies = [ - "anyhow", "cfg-if 1.0.0", "cranelift-codegen", "cranelift-entity", "cranelift-wasm", - "gimli", + "gimli 0.24.0", "indexmap", "log", "more-asserts", @@ -8178,11 +8447,11 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738bfcd1561ede8bb174215776fd7d9a95d5f0a47ca3deabe0282c55f9a89f68" +checksum = "4d4539ea734422b7c868107e2187d7746d8affbcaa71916d72639f53757ad707" dependencies = [ - "addr2line", + "addr2line 0.15.2", "anyhow", "cfg-if 1.0.0", "cranelift-codegen", @@ -8190,10 +8459,10 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.24.0", "log", "more-asserts", - "object", + "object 0.24.0", "rayon", "region", "serde", @@ -8211,13 +8480,13 @@ dependencies = [ [[package]] name = "wasmtime-obj" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e96d77f1801131c5e86d93e42a3cf8a35402107332c202c245c83f34888a906" +checksum = "8e1a8ff85246d091828e2225af521a6208ed28c997bb5c39eb697366dc2e2f2b" dependencies = [ "anyhow", "more-asserts", - "object", + "object 0.24.0", "target-lexicon", "wasmtime-debug", "wasmtime-environ", @@ -8225,17 +8494,14 @@ dependencies = [ [[package]] name = "wasmtime-profiling" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60bb672c9d894776d7b9250dd9b4fe890f8760201ee4f53e5f2da772b6c4debb" +checksum = "e24364d522dcd67c897c8fffc42e5bdfc57207bbb6d7eeade0da9d4a7d70105b" dependencies = [ "anyhow", "cfg-if 1.0.0", - "gimli", "lazy_static", "libc", - "object", - "scroll", "serde", "target-lexicon", "wasmtime-environ", @@ -8244,10 +8510,11 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978086740949eeedfefcee667b57a9e98d9a7fc0de382fcfa0da30369e3530d" +checksum = "c51e57976e8a19a18a18e002c6eb12e5769554204238e47ff155fda1809ef0f7" dependencies = [ + "anyhow", "backtrace", "cc", "cfg-if 1.0.0", @@ -8255,33 +8522,16 @@ dependencies = [ "lazy_static", "libc", "log", + "mach", "memoffset 0.6.1", "more-asserts", - "psm", + "rand 0.8.4", "region", "thiserror", "wasmtime-environ", "winapi 0.3.9", ] -[[package]] -name = "wast" -version = "31.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9beb1f6b63f08c523a1e8e76fc70058af4d2a34ef1c504f56cdac7b6970228b9" -dependencies = [ - "leb128", -] - -[[package]] -name = "wat" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b3044da73d3b84a822d955afad356759b2fee454b6882722008dace80b68e" -dependencies = [ - "wast", -] - [[package]] name = "web-sys" version = "0.3.46" @@ -8320,15 +8570,6 @@ dependencies = [ "cc", ] -[[package]] -name = "which" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" -dependencies = [ - "libc", -] - [[package]] name = "which" version = "4.0.2" @@ -8339,6 +8580,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "widestring" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" + [[package]] name = "winapi" version = "0.2.8" @@ -8382,6 +8629,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "winreg" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -8411,15 +8667,15 @@ dependencies = [ [[package]] name = "yamux" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aeb8c4043cac71c3c299dff107171c220d179492350ea198e109a414981b83c" +checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" dependencies = [ - "futures 0.3.11", + "futures 0.3.17", "log", "nohash-hasher", "parking_lot 0.11.1", - "rand 0.7.3", + "rand 0.8.4", "static_assertions", ] @@ -8446,18 +8702,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.5.4+zstd.1.4.7" +version = "0.6.1+zstd.1.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910" +checksum = "5de55e77f798f205d8561b8fe2ef57abfb6e0ff2abe7fd3c089e119cdb5631a3" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "2.0.6+zstd.1.4.7" +version = "3.0.1+zstd.1.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e" +checksum = "1387cabcd938127b30ce78c4bf00b30387dddf704e3f0881dbc4ff62b5566f8c" dependencies = [ "libc", "zstd-sys", @@ -8465,12 +8721,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.18+zstd.1.4.7" +version = "1.4.20+zstd.1.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" +checksum = "ebd5b733d7cf2d9447e2c3e76a5589b4f5e5ae065c22a2bc0b023cbc331b6c8e" dependencies = [ "cc", - "glob", - "itertools", "libc", ] diff --git a/Cargo.toml b/Cargo.toml index a200aae..465a552 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,5 +5,5 @@ panic = 'unwind' members = [ 'node', 'pallets/*', - 'runtime/api-runtime', + 'runtime' ] diff --git a/node/Cargo.toml b/node/Cargo.toml index 9d33b54..9bd41ad 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,60 +1,192 @@ [package] authors = ['Substrate DevHub '] -build = 'build.rs' description = 'A fresh FRAME-based Substrate node, ready for hacking.' edition = '2018' homepage = 'https://substrate.dev' license = 'Unlicense' name = 'node-template' +publish = false repository = 'https://github.com/substrate-developer-hub/substrate-node-template/' -version = '3.0.0' +version = '3.0.0-monthly-2021-08' +build = 'build.rs' + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] [[bin]] name = 'node-template' -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] +[build-dependencies.substrate-build-script-utils] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '3.0.0' -[build-dependencies] -substrate-build-script-utils = '3.0.0' +[dependencies.node-template-runtime] +path = '../runtime' +version = '3.0.0-monthly-2021-08' [dependencies] jsonrpc-core = '15.1.0' structopt = '0.3.8' +[dependencies.frame-benchmarking] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-benchmarking-cli] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-transaction-payment-rpc] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sc-basic-authorship] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-cli] +features = ['wasmtime'] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-client-api] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sc-consensus] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-consensus-aura] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-executor] +features = ['wasmtime'] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-finality-grandpa] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-keystore] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sc-rpc] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sc-rpc-api] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-service] +features = ['wasmtime'] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sc-telemetry] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sc-transaction-pool] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sc-transaction-pool-api] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-api] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-block-builder] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-blockchain] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-consensus] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sp-consensus-aura] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sp-core] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-finality-grandpa] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-inherents] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-runtime] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-timestamp] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.substrate-frame-rpc-system] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + # local dependencies -node-template-runtime = { path = '../runtime/api-runtime', version = '3.0.0' } -pallet-tasking-rpc = { path = '../pallets/pallet-tasking/rpc', version = '3.0.0'} -pallet-tasking-runtime-api = { path = '../pallets/pallet-tasking/runtime-api', default-features = false, version = '3.0.0'} - -# Substrate dependencies -frame-benchmarking = '3.0.0' -frame-benchmarking-cli = '3.0.0' -pallet-transaction-payment-rpc = '3.0.0' -sc-basic-authorship = '0.9.0' -sc-cli = { features = ['wasmtime'], version = '0.9.0' } -sc-client-api = '3.0.0' -sc-consensus = '0.9.0' -sc-consensus-aura = '0.9.0' -sc-executor = { features = ['wasmtime'], version = '0.9.0' } -sc-finality-grandpa = '0.9.0' -sc-keystore = '3.0.0' -sc-rpc = '3.0.0' -sc-rpc-api = '0.9.0' -sc-service = { features = ['wasmtime'], version = '0.9.0' } -sc-transaction-pool = '3.0.0' -sp-api = '3.0.0' -sp-block-builder = '3.0.0' -sp-blockchain = '3.0.0' -sp-consensus = '0.9.0' -sp-consensus-aura = '0.9.0' -sp-core = '3.0.0' -sp-finality-grandpa = '3.0.0' -sp-inherents = '3.0.0' -sp-runtime = '3.0.0' -sp-transaction-pool = '3.0.0' -substrate-frame-rpc-system = '3.0.0' +[dependencies.pallet-tasking] +path = '../pallets/pallet-tasking' +default-features = false +version = '3.0.0' + +[dependencies.pallet-tasking-v2] +path = '../pallets/pallet-tasking-v2' +default-features = false +version = '1.0.0' + +[dependencies.pallet-tasking-runtime-api] +path = '../pallets/pallet-tasking/runtime-api' +default-features = false +version = '3.0.0' [features] default = [] -runtime-benchmarks = ['node-template-runtime/runtime-benchmarks'] diff --git a/node/build.rs b/node/build.rs index e3bfe31..f9d839f 100644 --- a/node/build.rs +++ b/node/build.rs @@ -1,7 +1,7 @@ use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; fn main() { - generate_cargo_keys(); + generate_cargo_keys(); - rerun_if_git_head_changed(); + rerun_if_git_head_changed(); } diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 2dfab9b..0223405 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -1,12 +1,12 @@ -use sp_core::{Pair, Public, sr25519}; use node_template_runtime::{ - AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, - SudoConfig, SystemConfig, WASM_BINARY, Signature, + AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig, + SystemConfig, WASM_BINARY, }; +use sc_service::ChainType; use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{sr25519, Pair, Public}; use sp_finality_grandpa::AuthorityId as GrandpaId; -use sp_runtime::traits::{Verify, IdentifyAccount}; -use sc_service::ChainType; +use sp_runtime::traits::{IdentifyAccount, Verify}; // The URL for the telemetry server. // const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; @@ -16,142 +16,151 @@ pub type ChainSpec = sc_service::GenericChainSpec; /// Generate a crypto pair from seed. pub fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() } type AccountPublic = ::Signer; /// Generate an account ID from seed. -pub fn get_account_id_from_seed(seed: &str) -> AccountId where - AccountPublic: From<::Public> +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, { - AccountPublic::from(get_from_seed::(seed)).into_account() + AccountPublic::from(get_from_seed::(seed)).into_account() } /// Generate an Aura authority key. pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) { - ( - get_from_seed::(s), - get_from_seed::(s), - ) + (get_from_seed::(s), get_from_seed::(s)) } pub fn development_config() -> Result { - let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm binary not available".to_string())?; + let wasm_binary = + WASM_BINARY.ok_or_else(|| "Development wasm binary not available".to_string())?; - Ok(ChainSpec::from_genesis( - // Name - "Development", - // ID - "dev", - ChainType::Development, - move || testnet_genesis( - wasm_binary, - // Initial PoA authorities - vec![ - authority_keys_from_seed("Alice"), - ], - // Sudo account - get_account_id_from_seed::("Alice"), - // Pre-funded accounts - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - ], - true, - ), - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Properties - None, - // Extensions - None, - )) + Ok(ChainSpec::from_genesis( + // Name + "Development", + // ID + "dev", + ChainType::Development, + move || { + testnet_genesis( + wasm_binary, + // Initial PoA authorities + vec![authority_keys_from_seed("Alice")], + // Sudo account + get_account_id_from_seed::("Alice"), + // Pre-funded accounts + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + ], + true, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + None, + // Properties + None, + // Extensions + None, + )) } pub fn local_testnet_config() -> Result { - let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm binary not available".to_string())?; + let wasm_binary = + WASM_BINARY.ok_or_else(|| "Development wasm binary not available".to_string())?; - Ok(ChainSpec::from_genesis( - // Name - "Local Testnet", - // ID - "local_testnet", - ChainType::Local, - move || testnet_genesis( - wasm_binary, - // Initial PoA authorities - vec![ - authority_keys_from_seed("Alice"), - authority_keys_from_seed("Bob"), - ], - // Sudo account - get_account_id_from_seed::("Alice"), - // Pre-funded accounts - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - ], - true, - ), - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Properties - None, - // Extensions - None, - )) + Ok(ChainSpec::from_genesis( + // Name + "Local Testnet", + // ID + "local_testnet", + ChainType::Local, + move || { + testnet_genesis( + wasm_binary, + // Initial PoA authorities + vec![ + authority_keys_from_seed("Alice"), + authority_keys_from_seed("Bob"), + ], + // Sudo account + get_account_id_from_seed::("Alice"), + // Pre-funded accounts + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ], + true, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + None, + // Properties + None, + // Extensions + None, + )) } /// Configure initial storage state for FRAME modules. fn testnet_genesis( - wasm_binary: &[u8], - initial_authorities: Vec<(AuraId, GrandpaId)>, - root_key: AccountId, - endowed_accounts: Vec, - _enable_println: bool, + wasm_binary: &[u8], + initial_authorities: Vec<(AuraId, GrandpaId)>, + root_key: AccountId, + endowed_accounts: Vec, + _enable_println: bool, ) -> GenesisConfig { - GenesisConfig { - frame_system: Some(SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary.to_vec(), - changes_trie_config: Default::default(), - }), - pallet_balances: Some(BalancesConfig { - // Configure endowed accounts with initial balance of 1 << 60. - balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(), - }), - pallet_aura: Some(AuraConfig { - authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), - }), - pallet_grandpa: Some(GrandpaConfig { - authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), - }), - pallet_sudo: Some(SudoConfig { - // Assign network admin rights. - key: root_key, - }), - } + GenesisConfig { + frame_system: Some(SystemConfig { + // Add Wasm runtime to storage. + code: wasm_binary.to_vec(), + changes_trie_config: Default::default(), + }), + pallet_balances: Some(BalancesConfig { + // Configure endowed accounts with initial balance of 1 << 60. + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, 1 << 60)) + .collect(), + }), + pallet_aura: Some(AuraConfig { + authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), + }), + pallet_grandpa: Some(GrandpaConfig { + authorities: initial_authorities + .iter() + .map(|x| (x.1.clone(), 1)) + .collect(), + }), + pallet_sudo: Some(SudoConfig { + // Assign network admin rights. + key: root_key, + }), + } } diff --git a/node/src/cli.rs b/node/src/cli.rs index 947123a..c6f3515 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -1,41 +1,41 @@ -use structopt::StructOpt; use sc_cli::RunCmd; +use structopt::StructOpt; #[derive(Debug, StructOpt)] pub struct Cli { - #[structopt(subcommand)] - pub subcommand: Option, + #[structopt(subcommand)] + pub subcommand: Option, - #[structopt(flatten)] - pub run: RunCmd, + #[structopt(flatten)] + pub run: RunCmd, } #[derive(Debug, StructOpt)] pub enum Subcommand { - /// Key management cli utilities - Key(sc_cli::KeySubcommand), - /// Build a chain specification. - BuildSpec(sc_cli::BuildSpecCmd), + /// Key management cli utilities + Key(sc_cli::KeySubcommand), + /// Build a chain specification. + BuildSpec(sc_cli::BuildSpecCmd), - /// Validate blocks. - CheckBlock(sc_cli::CheckBlockCmd), + /// Validate blocks. + CheckBlock(sc_cli::CheckBlockCmd), - /// Export blocks. - ExportBlocks(sc_cli::ExportBlocksCmd), + /// Export blocks. + ExportBlocks(sc_cli::ExportBlocksCmd), - /// Export the state of a given block into a chain spec. - ExportState(sc_cli::ExportStateCmd), + /// Export the state of a given block into a chain spec. + ExportState(sc_cli::ExportStateCmd), - /// Import blocks. - ImportBlocks(sc_cli::ImportBlocksCmd), + /// Import blocks. + ImportBlocks(sc_cli::ImportBlocksCmd), - /// Remove the whole chain. - PurgeChain(sc_cli::PurgeChainCmd), + /// Remove the whole chain. + PurgeChain(sc_cli::PurgeChainCmd), - /// Revert the chain to a previous state. - Revert(sc_cli::RevertCmd), + /// Revert the chain to a previous state. + Revert(sc_cli::RevertCmd), - /// The custom benchmark subcommmand benchmarking runtime pallets. - #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")] - Benchmark(frame_benchmarking_cli::BenchmarkCmd), + /// The custom benchmark subcommmand benchmarking runtime pallets. + #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")] + Benchmark(frame_benchmarking_cli::BenchmarkCmd), } diff --git a/node/src/command.rs b/node/src/command.rs index e61dd86..9626515 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -15,124 +15,144 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{chain_spec, service}; use crate::cli::{Cli, Subcommand}; -use sc_cli::{SubstrateCli, RuntimeVersion, Role, ChainSpec}; -use sc_service::PartialComponents; +use crate::{chain_spec, service}; use node_template_runtime::Block; +use sc_cli::{ChainSpec, Role, RuntimeVersion, SubstrateCli}; +use sc_service::PartialComponents; impl SubstrateCli for Cli { - fn impl_name() -> String { - "Substrate Node".into() - } + fn impl_name() -> String { + "Substrate Node".into() + } - fn impl_version() -> String { - env!("SUBSTRATE_CLI_IMPL_VERSION").into() - } + fn impl_version() -> String { + env!("SUBSTRATE_CLI_IMPL_VERSION").into() + } - fn description() -> String { - env!("CARGO_PKG_DESCRIPTION").into() - } + fn description() -> String { + env!("CARGO_PKG_DESCRIPTION").into() + } - fn author() -> String { - env!("CARGO_PKG_AUTHORS").into() - } + fn author() -> String { + env!("CARGO_PKG_AUTHORS").into() + } - fn support_url() -> String { - "support.anonymous.an".into() - } + fn support_url() -> String { + "support.anonymous.an".into() + } - fn copyright_start_year() -> i32 { - 2017 - } + fn copyright_start_year() -> i32 { + 2017 + } - fn load_spec(&self, id: &str) -> Result, String> { - Ok(match id { - "dev" => Box::new(chain_spec::development_config()?), - "" | "local" => Box::new(chain_spec::local_testnet_config()?), - path => Box::new(chain_spec::ChainSpec::from_json_file( - std::path::PathBuf::from(path), - )?), - }) - } + fn load_spec(&self, id: &str) -> Result, String> { + Ok(match id { + "dev" => Box::new(chain_spec::development_config()?), + "" | "local" => Box::new(chain_spec::local_testnet_config()?), + path => Box::new(chain_spec::ChainSpec::from_json_file( + std::path::PathBuf::from(path), + )?), + }) + } - fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { - &node_template_runtime::VERSION - } + fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { + &node_template_runtime::VERSION + } } /// Parse and run command line arguments pub fn run() -> sc_cli::Result<()> { - let cli = Cli::from_args(); + let cli = Cli::from_args(); - match &cli.subcommand { - Some(Subcommand::Key(cmd)) => cmd.run(&cli), - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, - Some(Subcommand::CheckBlock(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, import_queue, ..} - = service::new_partial(&config)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }, - Some(Subcommand::ExportBlocks(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, ..} - = service::new_partial(&config)?; - Ok((cmd.run(client, config.database), task_manager)) - }) - }, - Some(Subcommand::ExportState(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, ..} - = service::new_partial(&config)?; - Ok((cmd.run(client, config.chain_spec), task_manager)) - }) - }, - Some(Subcommand::ImportBlocks(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, import_queue, ..} - = service::new_partial(&config)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }, - Some(Subcommand::PurgeChain(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.database)) - }, - Some(Subcommand::Revert(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, backend, ..} - = service::new_partial(&config)?; - Ok((cmd.run(client, backend), task_manager)) - }) - }, - Some(Subcommand::Benchmark(cmd)) => { - if cfg!(feature = "runtime-benchmarks") { - let runner = cli.create_runner(cmd)?; + match &cli.subcommand { + Some(Subcommand::Key(cmd)) => cmd.run(&cli), + Some(Subcommand::BuildSpec(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) + } + Some(Subcommand::CheckBlock(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { + client, + task_manager, + import_queue, + .. + } = service::new_partial(&config)?; + Ok((cmd.run(client, import_queue), task_manager)) + }) + } + Some(Subcommand::ExportBlocks(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { + client, + task_manager, + .. + } = service::new_partial(&config)?; + Ok((cmd.run(client, config.database), task_manager)) + }) + } + Some(Subcommand::ExportState(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { + client, + task_manager, + .. + } = service::new_partial(&config)?; + Ok((cmd.run(client, config.chain_spec), task_manager)) + }) + } + Some(Subcommand::ImportBlocks(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { + client, + task_manager, + import_queue, + .. + } = service::new_partial(&config)?; + Ok((cmd.run(client, import_queue), task_manager)) + }) + } + Some(Subcommand::PurgeChain(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|config| cmd.run(config.database)) + } + Some(Subcommand::Revert(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.async_run(|config| { + let PartialComponents { + client, + task_manager, + backend, + .. + } = service::new_partial(&config)?; + Ok((cmd.run(client, backend), task_manager)) + }) + } + Some(Subcommand::Benchmark(cmd)) => { + if cfg!(feature = "runtime-benchmarks") { + let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run::(config)) - } else { - Err("Benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`.".into()) - } - }, - None => { - let runner = cli.create_runner(&cli.run)?; - runner.run_node_until_exit(|config| async move { - match config.role { - Role::Light => service::new_light(config), - _ => service::new_full(config), - }.map_err(sc_cli::Error::Service) - }) - } - } + runner.sync_run(|config| cmd.run::(config)) + } else { + Err("Benchmarking wasn't enabled when building the node. \ + You can enable it with `--features runtime-benchmarks`." + .into()) + } + } + None => { + let runner = cli.create_runner(&cli.run)?; + runner.run_node_until_exit(|config| async move { + match config.role { + Role::Light => service::new_light(config), + _ => service::new_full(config), + } + .map_err(sc_cli::Error::Service) + }) + } + } } diff --git a/node/src/lib.rs b/node/src/lib.rs index 777c4f0..f117b8a 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -1,3 +1,3 @@ pub mod chain_spec; -pub mod service; pub mod rpc; +pub mod service; diff --git a/node/src/main.rs b/node/src/main.rs index 4449d28..a4182cd 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -9,5 +9,5 @@ mod command; mod rpc; fn main() -> sc_cli::Result<()> { - command::run() + command::run() } diff --git a/node/src/rpc.rs b/node/src/rpc.rs index cd734da..c77a7ce 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -8,62 +8,62 @@ use std::sync::Arc; use node_template_runtime::{opaque::Block, AccountId, Balance, Index}; +pub use sc_rpc_api::DenyUnsafe; use sp_api::ProvideRuntimeApi; -use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend}; use sp_block_builder::BlockBuilder; -pub use sc_rpc_api::DenyUnsafe; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_transaction_pool::TransactionPool; - /// Full client dependencies. pub struct FullDeps { - /// The client instance to use. - pub client: Arc, - /// Transaction pool instance. - pub pool: Arc

, - /// Whether to deny unsafe calls - pub deny_unsafe: DenyUnsafe, + /// The client instance to use. + pub client: Arc, + /// Transaction pool instance. + pub pool: Arc

, + /// Whether to deny unsafe calls + pub deny_unsafe: DenyUnsafe, } /// Instantiate all full RPC extensions. -pub fn create_full( - deps: FullDeps, -) -> jsonrpc_core::IoHandler where - C: ProvideRuntimeApi, - C: HeaderBackend + HeaderMetadata + 'static, - C: Send + Sync + 'static, - C::Api: substrate_frame_rpc_system::AccountNonceApi, - C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, - C::Api: BlockBuilder, - P: TransactionPool + 'static, +pub fn create_full(deps: FullDeps) -> jsonrpc_core::IoHandler +where + C: ProvideRuntimeApi, + C: HeaderBackend + HeaderMetadata + 'static, + C: Send + Sync + 'static, + C::Api: substrate_frame_rpc_system::AccountNonceApi, + C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: BlockBuilder, + P: TransactionPool + 'static, { - use substrate_frame_rpc_system::{FullSystem, SystemApi}; - use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; - use pallet_tasking_rpc::{TaskStore, PalletTaskingApi}; + use pallet_tasking_rpc::{PalletTaskingApi, TaskStore}; + use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; + use substrate_frame_rpc_system::{FullSystem, SystemApi}; - let mut io = jsonrpc_core::IoHandler::default(); - let FullDeps { - client, - pool, - deny_unsafe, - } = deps; + let mut io = jsonrpc_core::IoHandler::default(); + let FullDeps { + client, + pool, + deny_unsafe, + } = deps; - io.extend_with( - SystemApi::to_delegate(FullSystem::new(client.clone(), pool, deny_unsafe)) - ); + io.extend_with(SystemApi::to_delegate(FullSystem::new( + client.clone(), + pool, + deny_unsafe, + ))); - io.extend_with( - TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone())) - ); + io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new( + client.clone(), + ))); - // io.extend_with( - // PalletTaskingApi::to_delegate(TaskStore::new(client.clone())) - // ); + // io.extend_with( + // PalletTaskingApi::to_delegate(TaskStore::new(client.clone())) + // ); - // Extend this RPC with a custom API by using the following syntax. - // `YourRpcStruct` should have a reference to a client, which is needed - // to call into the runtime. - // `io.extend_with(YourRpcTrait::to_delegate(YourRpcStruct::new(ReferenceToClient, ...)));` + // Extend this RPC with a custom API by using the following syntax. + // `YourRpcStruct` should have a reference to a client, which is needed + // to call into the runtime. + // `io.extend_with(YourRpcTrait::to_delegate(YourRpcStruct::new(ReferenceToClient, ...)));` - io + io } diff --git a/node/src/service.rs b/node/src/service.rs index 4ee78c3..1771b76 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -1,321 +1,366 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. -use std::sync::Arc; -use std::time::Duration; -use sc_client_api::{ExecutorProvider, RemoteBackend}; use node_template_runtime::{self, opaque::Block, RuntimeApi}; -use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; -use sp_inherents::InherentDataProviders; +use sc_client_api::{ExecutorProvider, RemoteBackend}; use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; -use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; +use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; +use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; +use sp_inherents::InherentDataProviders; +use std::sync::Arc; +use std::time::Duration; // Our native executor instance. native_executor_instance!( - pub Executor, - node_template_runtime::api::dispatch, - node_template_runtime::native_version, - frame_benchmarking::benchmarking::HostFunctions, + pub Executor, + node_template_runtime::api::dispatch, + node_template_runtime::native_version, + frame_benchmarking::benchmarking::HostFunctions, ); type FullClient = sc_service::TFullClient; type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; -pub fn new_partial(config: &Configuration) -> Result, - sc_transaction_pool::FullPool, - ( - sc_consensus_aura::AuraBlockImport< - Block, - FullClient, - sc_finality_grandpa::GrandpaBlockImport, - AuraPair - >, - sc_finality_grandpa::LinkHalf, - ) ->, ServiceError> { - if config.keystore_remote.is_some() { - return Err(ServiceError::Other( - format!("Remote Keystores are not supported."))) - } - let inherent_data_providers = sp_inherents::InherentDataProviders::new(); - - let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts::(&config)?; - let client = Arc::new(client); - - let select_chain = sc_consensus::LongestChain::new(backend.clone()); - - let transaction_pool = sc_transaction_pool::BasicPool::new_full( - config.transaction_pool.clone(), - config.role.is_authority().into(), - config.prometheus_registry(), - task_manager.spawn_handle(), - client.clone(), - ); - - let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( - client.clone(), &(client.clone() as Arc<_>), select_chain.clone(), - )?; - - let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( - grandpa_block_import.clone(), client.clone(), - ); - - let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( - sc_consensus_aura::slot_duration(&*client)?, - aura_block_import.clone(), - Some(Box::new(grandpa_block_import.clone())), - client.clone(), - inherent_data_providers.clone(), - &task_manager.spawn_handle(), - config.prometheus_registry(), - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()), - )?; - - Ok(sc_service::PartialComponents { - client, backend, task_manager, import_queue, keystore_container, select_chain, transaction_pool, - inherent_data_providers, - other: (aura_block_import, grandpa_link), - }) +pub fn new_partial( + config: &Configuration, +) -> Result< + sc_service::PartialComponents< + FullClient, + FullBackend, + FullSelectChain, + sp_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool, + ( + sc_consensus_aura::AuraBlockImport< + Block, + FullClient, + sc_finality_grandpa::GrandpaBlockImport< + FullBackend, + Block, + FullClient, + FullSelectChain, + >, + AuraPair, + >, + sc_finality_grandpa::LinkHalf, + ), + >, + ServiceError, +> { + if config.keystore_remote.is_some() { + return Err(ServiceError::Other(format!( + "Remote Keystores are not supported." + ))); + } + let inherent_data_providers = sp_inherents::InherentDataProviders::new(); + + let (client, backend, keystore_container, task_manager) = + sc_service::new_full_parts::(&config)?; + let client = Arc::new(client); + + let select_chain = sc_consensus::LongestChain::new(backend.clone()); + + let transaction_pool = sc_transaction_pool::BasicPool::new_full( + config.transaction_pool.clone(), + config.role.is_authority().into(), + config.prometheus_registry(), + task_manager.spawn_handle(), + client.clone(), + ); + + let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( + client.clone(), + &(client.clone() as Arc<_>), + select_chain.clone(), + )?; + + let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( + grandpa_block_import.clone(), + client.clone(), + ); + + let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( + sc_consensus_aura::slot_duration(&*client)?, + aura_block_import.clone(), + Some(Box::new(grandpa_block_import.clone())), + client.clone(), + inherent_data_providers.clone(), + &task_manager.spawn_handle(), + config.prometheus_registry(), + sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()), + )?; + + Ok(sc_service::PartialComponents { + client, + backend, + task_manager, + import_queue, + keystore_container, + select_chain, + transaction_pool, + inherent_data_providers, + other: (aura_block_import, grandpa_link), + }) } fn remote_keystore(_url: &String) -> Result, &'static str> { - // FIXME: here would the concrete keystore be built, - // must return a concrete type (NOT `LocalKeystore`) that - // implements `CryptoStore` and `SyncCryptoStore` - Err("Remote Keystore not supported.") + // FIXME: here would the concrete keystore be built, + // must return a concrete type (NOT `LocalKeystore`) that + // implements `CryptoStore` and `SyncCryptoStore` + Err("Remote Keystore not supported.") } /// Builds a new service for a full client. pub fn new_full(mut config: Configuration) -> Result { - let sc_service::PartialComponents { - client, backend, mut task_manager, import_queue, mut keystore_container, select_chain, transaction_pool, - inherent_data_providers, - other: (block_import, grandpa_link), - } = new_partial(&config)?; - - if let Some(url) = &config.keystore_remote { - match remote_keystore(url) { - Ok(k) => keystore_container.set_remote_keystore(k), - Err(e) => { - return Err(ServiceError::Other( - format!("Error hooking up remote keystore for {}: {}", url, e))) - } - }; - } - - config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config()); - - let (network, network_status_sinks, system_rpc_tx, network_starter) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: &config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue, - on_demand: None, - block_announce_validator_builder: None, - })?; - - if config.offchain_worker.enabled { - sc_service::build_offchain_workers( - &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(), - ); - } - - let role = config.role.clone(); - let force_authoring = config.force_authoring; - let backoff_authoring_blocks: Option<()> = None; - let name = config.network.node_name.clone(); - let enable_grandpa = !config.disable_grandpa; - let prometheus_registry = config.prometheus_registry().cloned(); - - let rpc_extensions_builder = { - let client = client.clone(); - let pool = transaction_pool.clone(); - - Box::new(move |deny_unsafe, _| { - let deps = crate::rpc::FullDeps { - client: client.clone(), - pool: pool.clone(), - deny_unsafe, - }; - - crate::rpc::create_full(deps) - }) - }; - - let (_rpc_handlers, telemetry_connection_notifier) = sc_service::spawn_tasks( - sc_service::SpawnTasksParams { - network: network.clone(), - client: client.clone(), - keystore: keystore_container.sync_keystore(), - task_manager: &mut task_manager, - transaction_pool: transaction_pool.clone(), - rpc_extensions_builder, - on_demand: None, - remote_blockchain: None, - backend, - network_status_sinks, - system_rpc_tx, - config, - }, - )?; - - if role.is_authority() { - let proposer = sc_basic_authorship::ProposerFactory::new( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry.as_ref(), - ); - - let can_author_with = - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - - let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _, _>( - sc_consensus_aura::slot_duration(&*client)?, - client.clone(), - select_chain, - block_import, - proposer, - network.clone(), - inherent_data_providers.clone(), - force_authoring, - backoff_authoring_blocks, - keystore_container.sync_keystore(), - can_author_with, - )?; - - // the AURA authoring task is considered essential, i.e. if it - // fails we take down the service with it. - task_manager.spawn_essential_handle().spawn_blocking("aura", aura); - } - - // if the node isn't actively participating in consensus then it doesn't - // need a keystore, regardless of which protocol we use below. - let keystore = if role.is_authority() { - Some(keystore_container.sync_keystore()) - } else { - None - }; - - let grandpa_config = sc_finality_grandpa::Config { - // FIXME #1578 make this available through chainspec - gossip_duration: Duration::from_millis(333), - justification_period: 512, - name: Some(name), - observer_enabled: false, - keystore, - is_authority: role.is_network_authority(), - }; - - if enable_grandpa { - // start the full GRANDPA voter - // NOTE: non-authorities could run the GRANDPA observer protocol, but at - // this point the full voter should provide better guarantees of block - // and vote data availability than the observer. The observer has not - // been tested extensively yet and having most nodes in a network run it - // could lead to finality stalls. - let grandpa_config = sc_finality_grandpa::GrandpaParams { - config: grandpa_config, - link: grandpa_link, - network, - telemetry_on_connect: telemetry_connection_notifier.map(|x| x.on_connect_stream()), - voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), - prometheus_registry, - shared_voter_state: SharedVoterState::empty(), - }; - - // the GRANDPA voter task is considered infallible, i.e. - // if it fails we take down the service with it. - task_manager.spawn_essential_handle().spawn_blocking( - "grandpa-voter", - sc_finality_grandpa::run_grandpa_voter(grandpa_config)? - ); - } - - network_starter.start_network(); - Ok(task_manager) + let sc_service::PartialComponents { + client, + backend, + mut task_manager, + import_queue, + mut keystore_container, + select_chain, + transaction_pool, + inherent_data_providers, + other: (block_import, grandpa_link), + } = new_partial(&config)?; + + if let Some(url) = &config.keystore_remote { + match remote_keystore(url) { + Ok(k) => keystore_container.set_remote_keystore(k), + Err(e) => { + return Err(ServiceError::Other(format!( + "Error hooking up remote keystore for {}: {}", + url, e + ))) + } + }; + } + + config + .network + .extra_sets + .push(sc_finality_grandpa::grandpa_peers_set_config()); + + let (network, network_status_sinks, system_rpc_tx, network_starter) = + sc_service::build_network(sc_service::BuildNetworkParams { + config: &config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + on_demand: None, + block_announce_validator_builder: None, + })?; + + if config.offchain_worker.enabled { + sc_service::build_offchain_workers( + &config, + backend.clone(), + task_manager.spawn_handle(), + client.clone(), + network.clone(), + ); + } + + let role = config.role.clone(); + let force_authoring = config.force_authoring; + let backoff_authoring_blocks: Option<()> = None; + let name = config.network.node_name.clone(); + let enable_grandpa = !config.disable_grandpa; + let prometheus_registry = config.prometheus_registry().cloned(); + + let rpc_extensions_builder = { + let client = client.clone(); + let pool = transaction_pool.clone(); + + Box::new(move |deny_unsafe, _| { + let deps = crate::rpc::FullDeps { + client: client.clone(), + pool: pool.clone(), + deny_unsafe, + }; + + crate::rpc::create_full(deps) + }) + }; + + let (_rpc_handlers, telemetry_connection_notifier) = + sc_service::spawn_tasks(sc_service::SpawnTasksParams { + network: network.clone(), + client: client.clone(), + keystore: keystore_container.sync_keystore(), + task_manager: &mut task_manager, + transaction_pool: transaction_pool.clone(), + rpc_extensions_builder, + on_demand: None, + remote_blockchain: None, + backend, + network_status_sinks, + system_rpc_tx, + config, + })?; + + if role.is_authority() { + let proposer = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), + client.clone(), + transaction_pool, + prometheus_registry.as_ref(), + ); + + let can_author_with = + sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); + + let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _, _>( + sc_consensus_aura::slot_duration(&*client)?, + client.clone(), + select_chain, + block_import, + proposer, + network.clone(), + inherent_data_providers.clone(), + force_authoring, + backoff_authoring_blocks, + keystore_container.sync_keystore(), + can_author_with, + )?; + + // the AURA authoring task is considered essential, i.e. if it + // fails we take down the service with it. + task_manager + .spawn_essential_handle() + .spawn_blocking("aura", aura); + } + + // if the node isn't actively participating in consensus then it doesn't + // need a keystore, regardless of which protocol we use below. + let keystore = if role.is_authority() { + Some(keystore_container.sync_keystore()) + } else { + None + }; + + let grandpa_config = sc_finality_grandpa::Config { + // FIXME #1578 make this available through chainspec + gossip_duration: Duration::from_millis(333), + justification_period: 512, + name: Some(name), + observer_enabled: false, + keystore, + is_authority: role.is_network_authority(), + }; + + if enable_grandpa { + // start the full GRANDPA voter + // NOTE: non-authorities could run the GRANDPA observer protocol, but at + // this point the full voter should provide better guarantees of block + // and vote data availability than the observer. The observer has not + // been tested extensively yet and having most nodes in a network run it + // could lead to finality stalls. + let grandpa_config = sc_finality_grandpa::GrandpaParams { + config: grandpa_config, + link: grandpa_link, + network, + telemetry_on_connect: telemetry_connection_notifier.map(|x| x.on_connect_stream()), + voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), + prometheus_registry, + shared_voter_state: SharedVoterState::empty(), + }; + + // the GRANDPA voter task is considered infallible, i.e. + // if it fails we take down the service with it. + task_manager.spawn_essential_handle().spawn_blocking( + "grandpa-voter", + sc_finality_grandpa::run_grandpa_voter(grandpa_config)?, + ); + } + + network_starter.start_network(); + Ok(task_manager) } /// Builds a new service for a light client. pub fn new_light(mut config: Configuration) -> Result { - let (client, backend, keystore_container, mut task_manager, on_demand) = - sc_service::new_light_parts::(&config)?; - - config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config()); - - let select_chain = sc_consensus::LongestChain::new(backend.clone()); - - let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( - config.transaction_pool.clone(), - config.prometheus_registry(), - task_manager.spawn_handle(), - client.clone(), - on_demand.clone(), - )); - - let (grandpa_block_import, _) = sc_finality_grandpa::block_import( - client.clone(), - &(client.clone() as Arc<_>), - select_chain.clone(), - )?; - - let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( - grandpa_block_import.clone(), - client.clone(), - ); - - let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( - sc_consensus_aura::slot_duration(&*client)?, - aura_block_import, - Some(Box::new(grandpa_block_import)), - client.clone(), - InherentDataProviders::new(), - &task_manager.spawn_handle(), - config.prometheus_registry(), - sp_consensus::NeverCanAuthor, - )?; - - let (network, network_status_sinks, system_rpc_tx, network_starter) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: &config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue, - on_demand: Some(on_demand.clone()), - block_announce_validator_builder: None, - })?; - - if config.offchain_worker.enabled { - sc_service::build_offchain_workers( - &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(), - ); - } - - sc_service::spawn_tasks(sc_service::SpawnTasksParams { - remote_blockchain: Some(backend.remote_blockchain()), - transaction_pool, - task_manager: &mut task_manager, - on_demand: Some(on_demand), - rpc_extensions_builder: Box::new(|_, _| ()), - config, - client, - keystore: keystore_container.sync_keystore(), - backend, - network, - network_status_sinks, - system_rpc_tx, - })?; - - network_starter.start_network(); - - Ok(task_manager) + let (client, backend, keystore_container, mut task_manager, on_demand) = + sc_service::new_light_parts::(&config)?; + + config + .network + .extra_sets + .push(sc_finality_grandpa::grandpa_peers_set_config()); + + let select_chain = sc_consensus::LongestChain::new(backend.clone()); + + let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( + config.transaction_pool.clone(), + config.prometheus_registry(), + task_manager.spawn_handle(), + client.clone(), + on_demand.clone(), + )); + + let (grandpa_block_import, _) = sc_finality_grandpa::block_import( + client.clone(), + &(client.clone() as Arc<_>), + select_chain.clone(), + )?; + + let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( + grandpa_block_import.clone(), + client.clone(), + ); + + let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( + sc_consensus_aura::slot_duration(&*client)?, + aura_block_import, + Some(Box::new(grandpa_block_import)), + client.clone(), + InherentDataProviders::new(), + &task_manager.spawn_handle(), + config.prometheus_registry(), + sp_consensus::NeverCanAuthor, + )?; + + let (network, network_status_sinks, system_rpc_tx, network_starter) = + sc_service::build_network(sc_service::BuildNetworkParams { + config: &config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + on_demand: Some(on_demand.clone()), + block_announce_validator_builder: None, + })?; + + if config.offchain_worker.enabled { + sc_service::build_offchain_workers( + &config, + backend.clone(), + task_manager.spawn_handle(), + client.clone(), + network.clone(), + ); + } + + sc_service::spawn_tasks(sc_service::SpawnTasksParams { + remote_blockchain: Some(backend.remote_blockchain()), + transaction_pool, + task_manager: &mut task_manager, + on_demand: Some(on_demand), + rpc_extensions_builder: Box::new(|_, _| ()), + config, + client, + keystore: keystore_container.sync_keystore(), + backend, + network, + network_status_sinks, + system_rpc_tx, + })?; + + network_starter.start_network(); + + Ok(task_manager) } diff --git a/pallets/pallet-tasking-v2/Cargo.toml b/pallets/pallet-tasking-v2/Cargo.toml new file mode 100644 index 0000000..25032af --- /dev/null +++ b/pallets/pallet-tasking-v2/Cargo.toml @@ -0,0 +1,67 @@ +[package] +authors = ['Tejas Sanap'] +edition = '2018' +name = 'pallet-tasking-v2' +publish = false +version = '1.0.0' +readme = 'README.md' + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] + +[dev-dependencies.serde] +version = '1.0.126' + +[dev-dependencies.sp-core] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dev-dependencies.sp-io] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dev-dependencies.sp-runtime] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.codec] +default-features = false +features = ['derive'] +package = 'parity-scale-codec' +version = '2.0.0' + +[dependencies.frame-benchmarking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +optional = true +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-support] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-system] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[features] +default = ['std'] +runtime-benchmarks = ['frame-benchmarking'] +std = [ + 'codec/std', + 'frame-support/std', + 'frame-system/std', + 'frame-benchmarking/std', +] +try-runtime = ['frame-support/try-runtime'] diff --git a/pallets/pallet-tasking-v2/README.md b/pallets/pallet-tasking-v2/README.md new file mode 100644 index 0000000..8d751a4 --- /dev/null +++ b/pallets/pallet-tasking-v2/README.md @@ -0,0 +1 @@ +License: Unlicense \ No newline at end of file diff --git a/pallets/pallet-tasking-v2/src/benchmarking.rs b/pallets/pallet-tasking-v2/src/benchmarking.rs new file mode 100644 index 0000000..beb217d --- /dev/null +++ b/pallets/pallet-tasking-v2/src/benchmarking.rs @@ -0,0 +1,20 @@ +//! Benchmarking setup for pallet-template + +use super::*; + +#[allow(unused)] +use crate::Pallet as Template; +use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller}; +use frame_system::RawOrigin; + +benchmarks! { + do_something { + let s in 0 .. 100; + let caller: T::AccountId = whitelisted_caller(); + }: _(RawOrigin::Signed(caller), s) + verify { + assert_eq!(Something::::get(), Some(s)); + } +} + +impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test); diff --git a/pallets/pallet-tasking-v2/src/lib.rs b/pallets/pallet-tasking-v2/src/lib.rs new file mode 100644 index 0000000..0f7a25e --- /dev/null +++ b/pallets/pallet-tasking-v2/src/lib.rs @@ -0,0 +1,103 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +/// Edit this file to define custom logic or remove it if it is not needed. +/// Learn more about FRAME and the core library of Substrate FRAME pallets: +/// +pub use pallet::*; + +#[cfg(test)] +mod mock; + +#[cfg(test)] +mod tests; + +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; + +#[frame_support::pallet] +pub mod pallet { + use frame_support::{dispatch::DispatchResult, pallet_prelude::*}; + use frame_system::pallet_prelude::*; + + /// Configure the pallet by specifying the parameters and types on which it depends. + #[pallet::config] + pub trait Config: frame_system::Config { + /// Because this pallet emits events, it depends on the runtime's definition of an event. + type Event: From> + IsType<::Event>; + } + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + pub struct Pallet(_); + + // The pallet's runtime storage items. + // https://substrate.dev/docs/en/knowledgebase/runtime/storage + #[pallet::storage] + #[pallet::getter(fn something)] + // Learn more about declaring storage items: + // https://substrate.dev/docs/en/knowledgebase/runtime/storage#declaring-storage-items + pub type Something = StorageValue<_, u32>; + + // Pallets use events to inform users when important changes are made. + // https://substrate.dev/docs/en/knowledgebase/runtime/events + #[pallet::event] + #[pallet::metadata(T::AccountId = "AccountId")] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// Event documentation should end with an array that provides descriptive names for event + /// parameters. [something, who] + SomethingStored(u32, T::AccountId), + } + + // Errors inform users that something went wrong. + #[pallet::error] + pub enum Error { + /// Error names should be descriptive. + NoneValue, + /// Errors should have helpful documentation associated with them. + StorageOverflow, + } + + // Dispatchable functions allows users to interact with the pallet and invoke state changes. + // These functions materialize as "extrinsics", which are often compared to transactions. + // Dispatchable functions must be annotated with a weight and must return a DispatchResult. + #[pallet::call] + impl Pallet { + /// An example dispatchable that takes a singles value as a parameter, writes the value to + /// storage and emits an event. This function must be dispatched by a signed extrinsic. + #[pallet::weight(10_000 + T::DbWeight::get().writes(1))] + pub fn do_something(origin: OriginFor, something: u32) -> DispatchResult { + // Check that the extrinsic was signed and get the signer. + // This function will return an error if the extrinsic is not signed. + // https://substrate.dev/docs/en/knowledgebase/runtime/origin + let who = ensure_signed(origin)?; + + // Update storage. + >::put(something); + + // Emit an event. + Self::deposit_event(Event::SomethingStored(something, who)); + // Return a successful DispatchResultWithPostInfo + Ok(()) + } + + /// An example dispatchable that may throw a custom error. + #[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))] + pub fn cause_error(origin: OriginFor) -> DispatchResult { + let _who = ensure_signed(origin)?; + + // Read a value from storage. + match >::get() { + // Return an error if the value has not been set. + None => Err(Error::::NoneValue)?, + Some(old) => { + // Increment the value read from storage; will error in the event of overflow. + let new = old.checked_add(1).ok_or(Error::::StorageOverflow)?; + // Update the value in storage with the incremented result. + >::put(new); + Ok(()) + } + } + } + } +} diff --git a/pallets/pallet-tasking-v2/src/mock.rs b/pallets/pallet-tasking-v2/src/mock.rs new file mode 100644 index 0000000..4d5ea87 --- /dev/null +++ b/pallets/pallet-tasking-v2/src/mock.rs @@ -0,0 +1,66 @@ +use crate as pallet_template; +use frame_support::parameter_types; +use frame_system as system; +use sp_core::H256; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, +}; + +type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; +type Block = frame_system::mocking::MockBlock; + +// Configure a mock runtime to test the pallet. +frame_support::construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + TemplateModule: pallet_template::{Pallet, Call, Storage, Event}, + } +); + +parameter_types! { + pub const BlockHashCount: u64 = 250; + pub const SS58Prefix: u8 = 42; +} + +impl system::Config for Test { + type BaseCallFilter = frame_support::traits::AllowAll; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type Origin = Origin; + type Call = Call; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type Event = Event; + type BlockHashCount = BlockHashCount; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = SS58Prefix; + type OnSetCode = (); +} + +impl pallet_template::Config for Test { + type Event = Event; +} + +// Build genesis storage according to the mock runtime. +pub fn new_test_ext() -> sp_io::TestExternalities { + system::GenesisConfig::default() + .build_storage::() + .unwrap() + .into() +} diff --git a/pallets/pallet-tasking-v2/src/tests.rs b/pallets/pallet-tasking-v2/src/tests.rs new file mode 100644 index 0000000..39c2180 --- /dev/null +++ b/pallets/pallet-tasking-v2/src/tests.rs @@ -0,0 +1,23 @@ +use crate::{mock::*, Error}; +use frame_support::{assert_noop, assert_ok}; + +#[test] +fn it_works_for_default_value() { + new_test_ext().execute_with(|| { + // Dispatch a signed extrinsic. + assert_ok!(TemplateModule::do_something(Origin::signed(1), 42)); + // Read pallet storage and assert an expected result. + assert_eq!(TemplateModule::something(), Some(42)); + }); +} + +#[test] +fn correct_error_for_none_value() { + new_test_ext().execute_with(|| { + // Ensure the expected error is thrown when no value is present. + assert_noop!( + TemplateModule::cause_error(Origin::signed(1)), + Error::::NoneValue + ); + }); +} diff --git a/pallets/pallet-tasking/Cargo.toml b/pallets/pallet-tasking/Cargo.toml index 54f0fd5..beaada3 100644 --- a/pallets/pallet-tasking/Cargo.toml +++ b/pallets/pallet-tasking/Cargo.toml @@ -18,19 +18,62 @@ features = ['derive'] package = 'parity-scale-codec' version = '2.0.0' -[dependencies] -frame-support = { default-features = false, version = '3.0.0' } -frame-system = { default-features = false, version = '3.0.0' } -sp-std = { default-features = false, version = '3.0.0' } -pallet-balances = {default-features = false, version = '3.0.0'} -pallet-staking = {default-features = false, version = '3.0.0'} -pallet-assets = {default-features = false, version = '3.0.0'} -sp-runtime = { default-features = false, version = '3.0.0' } - -[dev-dependencies] -serde = { version = "1.0.119" } -sp-core = { default-features = false, version = '3.0.0' } -sp-io = { default-features = false, version = '3.0.0' } +[dependencies.pallet-balances] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-staking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-assets] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-support] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-system] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-runtime] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dev-dependencies.serde] +version = '1.0.126' + +[dev-dependencies.sp-core] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dev-dependencies.sp-io] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' [features] default = ['std'] diff --git a/pallets/pallet-tasking/runtime-api/Cargo.toml b/pallets/pallet-tasking/runtime-api/Cargo.toml index 7b787c9..11ee536 100644 --- a/pallets/pallet-tasking/runtime-api/Cargo.toml +++ b/pallets/pallet-tasking/runtime-api/Cargo.toml @@ -15,12 +15,15 @@ features = ['derive'] package = 'parity-scale-codec' version = '2.0.0' -[dependencies] -sp-api = { version = '3.0.0', default-features = false} +[dependencies.sp-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' [features] default = ["std"] std = [ 'codec/std', "sp-api/std", -] \ No newline at end of file +] diff --git a/pallets/pallet-tasking/runtime-api/src/lib.rs b/pallets/pallet-tasking/runtime-api/src/lib.rs index 595eb9e..ff57a8b 100644 --- a/pallets/pallet-tasking/runtime-api/src/lib.rs +++ b/pallets/pallet-tasking/runtime-api/src/lib.rs @@ -1,9 +1,9 @@ #![cfg_attr(not(feature = "std"), no_std)] sp_api::decl_runtime_apis! { - /// The API to get one - pub trait PalletTaskingApi { - /// Verify get one - fn get_one() -> u128; - } -} \ No newline at end of file + /// The API to get one + pub trait PalletTaskingApi { + /// Verify get one + fn get_one() -> u128; + } +} diff --git a/pallets/pallet-tasking/src/lib.rs b/pallets/pallet-tasking/src/lib.rs index ffad9a3..f8a9458 100644 --- a/pallets/pallet-tasking/src/lib.rs +++ b/pallets/pallet-tasking/src/lib.rs @@ -11,7 +11,7 @@ use frame_support::sp_runtime::{ /// Learn more about FRAME and the core library of Substrate FRAME pallets: /// https://substrate.dev/docs/en/knowledgebase/runtime/frame use frame_support::{ - debug, decl_error, decl_event, decl_module, decl_storage, dispatch, ensure, + decl_error, decl_event, decl_module, decl_storage, dispatch, ensure, runtime_print, traits::{ Currency, ExistenceRequirement, Get, LockIdentifier, LockableCurrency, ReservableCurrency, WithdrawReasons, @@ -71,7 +71,7 @@ pub struct User { impl User { pub fn new(account_id: AccountId, user_type: UserType, ratings_vec: Vec) -> Self { let rating = Some(Self::get_list_average(ratings_vec.clone())); - debug::info!("Ratings clac for new User struct: {:#?}", rating.clone()); + runtime_print!("Ratings clac for new User struct: {:#?}", rating.clone()); Self { account_id, @@ -82,7 +82,7 @@ impl User { } pub fn get_list_average(list: Vec) -> u8 { - debug::info!("List: {:#?}", list.clone()); + runtime_print!("List: {:#?}", list.clone()); let list_len: u8 = list.len() as u8; if list_len == 1 { @@ -93,9 +93,9 @@ impl User { for item in list.iter() { total_sum += item; } - debug::info!("Total sum of Rating: {:#?}", total_sum.clone()); + runtime_print!("Total sum of Rating: {:#?}", total_sum.clone()); let average = total_sum / list_len; - debug::info!("Average Rating: {:#?}", average.clone()); + runtime_print!("Average Rating: {:#?}", average.clone()); average } } @@ -222,7 +222,7 @@ decl_module! { let current_count = Self::get_task_count(); let result_from_locking = T::Currency::set_lock(LOCKSECRET, &sender, task_cost.clone(), WithdrawReasons::TRANSACTION_PAYMENT); - debug::info!("result_from_locking : {:#?}", result_from_locking); + runtime_print!("result_from_locking : {:#?}", result_from_locking); let temp= TaskDetails { task_id: current_count.clone(), @@ -259,14 +259,14 @@ decl_module! { Self::deposit_event(RawEvent::TaskIsBidded(bidder.clone(), task_id.clone())); let task_details_by_helper = Self::get_task(task_id.clone()); - debug::info!("task_details_by_helper : {:#?}", task_details_by_helper); + runtime_print!("task_details_by_helper : {:#?}", task_details_by_helper); } #[weight = 10_000] pub fn approve_task(origin,task_id: u128, rating_for_the_worker: u8) { let publisher=ensure_signed(origin)?; ensure!(Self::task_exist(task_id.clone()), Error::::TaskDoesNotExist); - + let mut task_struct = TaskStorage::::get(&task_id); let status = task_struct.status; ensure!(status == Status::PendingApproval, Error::::TaskIsNotPendingApproval); @@ -277,27 +277,27 @@ decl_module! { // Inserting Worker Rating to RatingMap let existing_bidder_ratings: User = WorkerRatings::::get(&bidder); - debug::info!("existing_bidder_ratings: {:#?}", existing_bidder_ratings.clone()); + runtime_print!("existing_bidder_ratings: {:#?}", existing_bidder_ratings.clone()); let mut temp_rating_vec = Vec::::new(); for rating in existing_bidder_ratings.ratings_vec { temp_rating_vec.push(rating); } temp_rating_vec.push(rating_for_the_worker); - debug::info!("Temp Rating Vec: {:#?}", temp_rating_vec.clone()); + runtime_print!("Temp Rating Vec: {:#?}", temp_rating_vec.clone()); let curr_bidder_ratings = User::new(bidder.clone(), UserType::Worker, temp_rating_vec); WorkerRatings::::insert(bidder.clone(), curr_bidder_ratings.clone()); - debug::info!("Calculated Rating: {:#?}", curr_bidder_ratings.rating); - - + runtime_print!("Calculated Rating: {:#?}", curr_bidder_ratings.rating); + + // Updating Task Status task_struct.status = Status::Completed; TaskStorage::::insert(&task_id,task_struct.clone()); - + Self::deposit_event(RawEvent::TaskApproved(task_id.clone())); } - + // Worker provies the rating for the customer // Funds from Escrow gets unlocked // and the funds get transfered @@ -305,25 +305,25 @@ decl_module! { pub fn provide_customer_rating(origin, task_id: u128, rating_for_customer: u8) { let bidder = ensure_signed(origin)?; let task_struct=TaskStorage::::get(&task_id); - + let customer = task_struct.publisher; ensure!(customer != bidder.clone(), Error::::UnauthorisedToProvideCustomerRating); - + // Handling Rating // Inserting Worker Rating to RatingMap let existing_customer_rating: User = CustomerRatings::::get(&customer); - debug::info!("existing_customer_ratings: {:#?}", existing_customer_rating.clone()); + runtime_print!("existing_customer_ratings: {:#?}", existing_customer_rating.clone()); let mut temp_rating_vec = Vec::::new(); for rating in existing_customer_rating.ratings_vec { temp_rating_vec.push(rating); } temp_rating_vec.push(rating_for_customer); - debug::info!("Temp Rating Vec: {:#?}", temp_rating_vec.clone()); + runtime_print!("Temp Rating Vec: {:#?}", temp_rating_vec.clone()); let curr_customer_ratings = User::new(customer.clone(), UserType::Customer, temp_rating_vec); CustomerRatings::::insert(customer.clone(), curr_customer_ratings.clone()); - debug::info!("Calculated Rating: {:#?}", curr_customer_ratings.rating); + runtime_print!("Calculated Rating: {:#?}", curr_customer_ratings.rating); // Unlocking funds from escrow and transfer let transfer_amount = task_struct.cost; @@ -360,7 +360,7 @@ decl_module! { ensure!(TaskStorage::::contains_key(&task_id), Error::::TaskDoesNotExist); let mut temp_staker_list = Self::staker_list(&task_id); - debug::info!("Calling function using get method {:?}", &temp_staker_list); + runtime_print!("Calling function using get method {:?}", &temp_staker_list); match temp_staker_list.binary_search(&staker) { // If the search succeeds, the caller is already a member, so just return @@ -398,7 +398,7 @@ decl_module! { current_balance = AccountBalances::::get(&sender); } - debug::info!("Account Balance: {:?}", current_balance); + runtime_print!("Account Balance: {:?}", current_balance); Self::deposit_event(RawEvent::AccBalance(sender, current_balance)); Ok(()) } @@ -409,13 +409,13 @@ decl_module! { let acc_balance = T::Currency::total_balance(&sender); // let acc_balance = AccountBalances::::get(&sender); - debug::info!("get_data_from_store balance: {:?}", acc_balance); + runtime_print!("get_data_from_store balance: {:?}", acc_balance); let task_details = TaskStorage::::get(&task_id); - debug::info!("get_data_from_store taskstore: {:#?}", task_details); + runtime_print!("get_data_from_store taskstore: {:#?}", task_details); let task_details_by_helper = Self::get_task(task_id.clone()); - debug::info!("task_details_by_helper : {:#?}", task_details_by_helper); + runtime_print!("task_details_by_helper : {:#?}", task_details_by_helper); Ok(()) } @@ -438,13 +438,13 @@ decl_module! { let sender_account_balance = T::Currency::total_balance(&sender); // let is_valid_to_transfer = sender_account_balance.clone() < transfer_amount.clone(); - // debug::info!("is_valid_to_transfer {:?}", is_valid_to_transfer); + // runtime_print!("is_valid_to_transfer {:?}", is_valid_to_transfer); // ensure!(!is_valid_to_transfer, Error::::NotEnoughBalance); let to_account_balance = T::Currency::total_balance(&to); let result = T::Currency::transfer(&sender, &to, transfer_amount, ExistenceRequirement::KeepAlive)?; - debug::info!("Transfer Result {:?}", result); + runtime_print!("Transfer Result {:?}", result); let updated_sender_account_balance = T::Currency::total_balance(&sender); let updated_to_account_balance = T::Currency::total_balance(&to); @@ -462,14 +462,14 @@ decl_module! { }; details.push(transfer_details); Transfers::::put(details); - debug::info!("Transfer Details Sender: {:#?}", &sender); - debug::info!("Transfer Details Before Balance{:#?}", sender_account_balance.clone()); - debug::info!("Transfer Details After Balance: {:#?}", updated_sender_account_balance.clone()); - debug::info!("Transfer Details To Account: {:#?}", &to); - debug::info!("Transfer Details Before Balance {:#?}", to_account_balance.clone()); - debug::info!("Transfer Details After Balance: {:#?}", updated_to_account_balance.clone()); + runtime_print!("Transfer Details Sender: {:#?}", &sender); + runtime_print!("Transfer Details Before Balance{:#?}", sender_account_balance.clone()); + runtime_print!("Transfer Details After Balance: {:#?}", updated_sender_account_balance.clone()); + runtime_print!("Transfer Details To Account: {:#?}", &to); + runtime_print!("Transfer Details Before Balance {:#?}", to_account_balance.clone()); + runtime_print!("Transfer Details After Balance: {:#?}", updated_to_account_balance.clone()); let transfers_in_store = Self::get_transfers(); - debug::info!("Transfer Details From Vec: {:#?}", &transfers_in_store[0]); + runtime_print!("Transfer Details From Vec: {:#?}", &transfers_in_store[0]); Self::deposit_event(RawEvent::TransferMoney(sender.clone(), sender_account_balance.clone(), updated_sender_account_balance.clone(), to.clone(), to_account_balance.clone(), updated_to_account_balance.clone())); Ok(()) } diff --git a/pallets/pallet-tasking/src/mock.rs b/pallets/pallet-tasking/src/mock.rs index 2d58f9e..8ed6f74 100644 --- a/pallets/pallet-tasking/src/mock.rs +++ b/pallets/pallet-tasking/src/mock.rs @@ -76,7 +76,7 @@ impl pallet_tasking::Config for Test { type Currency = Balances; } -// Implementing the ExtBuilder to initialize balances +// Implementing the ExtBuilder to initialize balances pub(crate) struct ExtBuilder { // endowed accounts with balances balances: Vec<(AccountId, Balance)>, diff --git a/pallets/pallet-tasking/src/tests.rs b/pallets/pallet-tasking/src/tests.rs index ef323ad..6d719f1 100644 --- a/pallets/pallet-tasking/src/tests.rs +++ b/pallets/pallet-tasking/src/tests.rs @@ -1,7 +1,7 @@ +use crate::mock::ExtBuilder; use crate::{mock::*, Error, Status, TaskDetails}; use frame_support::{assert_noop, assert_ok, dispatch::DispatchError}; use frame_system::{ensure_signed, RawOrigin}; -use crate::mock::ExtBuilder; #[test] fn correct_error_for_unsigned_origin_while_creating_task_with_correct_() { @@ -205,8 +205,8 @@ fn correct_error_for_providing_customer_rating_with_publisher_id() { // Success for provide customer rating #[test] fn it_works_for_providing_customer_rating_with_correct_details() { - ExtBuilder::default().with_balances( - vec![ + ExtBuilder::default() + .with_balances(vec![ (1, 100000), (2, 100000), (3, 100000), @@ -214,17 +214,18 @@ fn it_works_for_providing_customer_rating_with_correct_details() { (5, 100000), (6, 100000), (7, 100000), - ] - ).build().execute_with(|| { - PalletTasking::create_task(Origin::signed(1), 50, 500, b"Backend Systems".to_vec()) - .unwrap(); - PalletTasking::bid_for_task(Origin::signed(3), 0).unwrap(); - PalletTasking::task_completed(Origin::signed(3), 0).unwrap(); - PalletTasking::approve_task(Origin::signed(1), 0, 5).unwrap(); - assert_ok!(PalletTasking::provide_customer_rating( - Origin::signed(3), - 0, - 5 - )); - }); + ]) + .build() + .execute_with(|| { + PalletTasking::create_task(Origin::signed(1), 50, 500, b"Backend Systems".to_vec()) + .unwrap(); + PalletTasking::bid_for_task(Origin::signed(3), 0).unwrap(); + PalletTasking::task_completed(Origin::signed(3), 0).unwrap(); + PalletTasking::approve_task(Origin::signed(1), 0, 5).unwrap(); + assert_ok!(PalletTasking::provide_customer_rating( + Origin::signed(3), + 0, + 5 + )); + }); } diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml new file mode 100644 index 0000000..058ee50 --- /dev/null +++ b/runtime/Cargo.toml @@ -0,0 +1,236 @@ +[package] +authors = [''] +edition = '2018' +homepage = 'https://substrate.dev' +license = 'Unlicense' +name = 'node-template-runtime' +repository = 'https://github.com/substrate-developer-hub/substrate-node-template/' +version = '3.0.0-monthly-2021-08' + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] + +[build-dependencies.substrate-wasm-builder] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '5.0.0-dev' + +[dependencies.codec] +default-features = false +features = ['derive'] +package = 'parity-scale-codec' +version = '2.0.0' + +[dependencies.frame-benchmarking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +optional = true +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-executive] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-support] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-system] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-system-benchmarking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +optional = true +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.frame-system-rpc-runtime-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.hex-literal] +optional = true +version = '0.3.1' + +[dependencies.pallet-aura] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-balances] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-grandpa] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-randomness-collective-flip] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-sudo] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-timestamp] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-transaction-payment] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.pallet-transaction-payment-rpc-runtime-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-block-builder] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-consensus-aura] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '0.10.0-dev' + +[dependencies.sp-core] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-inherents] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-offchain] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-runtime] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-session] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-transaction-pool] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +[dependencies.sp-version] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-08' +version = '4.0.0-dev' + +# local dependencies +[dependencies.pallet-tasking] +path = '../pallets/pallet-tasking' +default-features = false +version = '3.0.0' + +[dependencies.pallet-tasking-v2] +path = '../pallets/pallet-tasking-v2' +default-features = false +version = '1.0.0' + +[dependencies.pallet-tasking-runtime-api] +path = '../pallets/pallet-tasking/runtime-api' +default-features = false +version = '3.0.0' + +[features] +default = ['std'] +runtime-benchmarks = [ + 'frame-benchmarking', + 'frame-support/runtime-benchmarks', + 'frame-system-benchmarking', + 'frame-system/runtime-benchmarks', + 'hex-literal', + 'pallet-balances/runtime-benchmarks', + 'pallet-timestamp/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', +] +std = [ + 'codec/std', + 'frame-executive/std', + 'frame-support/std', + 'frame-system-rpc-runtime-api/std', + 'frame-system/std', + 'pallet-aura/std', + 'pallet-balances/std', + 'pallet-grandpa/std', + 'pallet-randomness-collective-flip/std', + 'pallet-sudo/std', + 'pallet-timestamp/std', + 'pallet-transaction-payment-rpc-runtime-api/std', + 'pallet-transaction-payment/std', + 'sp-api/std', + 'sp-block-builder/std', + 'sp-consensus-aura/std', + 'sp-core/std', + 'sp-inherents/std', + 'sp-offchain/std', + 'sp-runtime/std', + 'sp-session/std', + 'sp-std/std', + 'sp-transaction-pool/std', + 'sp-version/std', + 'pallet-tasking/std', + 'pallet-tasking-v2/std', + 'pallet-tasking-runtime-api/std', +] diff --git a/runtime/api-runtime/Cargo.toml b/runtime/api-runtime/Cargo.toml deleted file mode 100644 index 32da0cf..0000000 --- a/runtime/api-runtime/Cargo.toml +++ /dev/null @@ -1,98 +0,0 @@ -[package] -authors = [''] -edition = '2018' -homepage = 'https://substrate.dev' -license = 'Unlicense' -name = 'node-template-runtime' -repository = 'https://github.com/substrate-developer-hub/substrate-node-template/' -version = '3.0.0' - -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] - -[build-dependencies] -substrate-wasm-builder = '4.0.0' - -# alias "parity-scale-code" to "codec" -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.0.0' - -[dependencies] -hex-literal = { optional = true, version = '0.3.1' } -serde = { features = ['derive'], optional = true, version = '1.0.119' } - -# local dependencies -pallet-tasking = { path = '../../pallets/pallet-tasking', default-features = false, version = '3.0.0' } -pallet-tasking-runtime-api = { path = '../../pallets/pallet-tasking/runtime-api', default-features = false, version = '3.0.0'} - -# Substrate dependencies -frame-benchmarking = { default-features = false, optional = true, version = '3.0.0' } -frame-executive = { default-features = false, version = '3.0.0' } -frame-support = { default-features = false, version = '3.0.0' } -frame-system = { default-features = false, version = '3.0.0' } -frame-system-benchmarking = { default-features = false, optional = true, version = '3.0.0' } -frame-system-rpc-runtime-api = { default-features = false, version = '3.0.0' } -pallet-aura = { default-features = false, version = '3.0.0' } -pallet-balances = { default-features = false, version = '3.0.0' } -pallet-grandpa = { default-features = false, version = '3.0.0' } -pallet-randomness-collective-flip = { default-features = false, version = '3.0.0' } -pallet-sudo = { default-features = false, version = '3.0.0' } -pallet-timestamp = { default-features = false, version = '3.0.0' } -pallet-transaction-payment = { default-features = false, version = '3.0.0' } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = '3.0.0' } -sp-api = { default-features = false, version = '3.0.0' } -sp-block-builder = { default-features = false, version = '3.0.0' } -sp-consensus-aura = { default-features = false, version = '0.9.0' } -sp-core = { default-features = false, version = '3.0.0' } -sp-inherents = { default-features = false, version = '3.0.0' } -sp-offchain = { default-features = false, version = '3.0.0' } -sp-runtime = { default-features = false, version = '3.0.0' } -sp-session = { default-features = false, version = '3.0.0' } -sp-std = { default-features = false, version = '3.0.0' } -sp-transaction-pool = { default-features = false, version = '3.0.0' } -sp-version = { default-features = false, version = '3.0.0' } - -[features] -default = ['std'] -runtime-benchmarks = [ - 'hex-literal', - 'frame-benchmarking', - 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', - 'frame-system/runtime-benchmarks', - 'pallet-balances/runtime-benchmarks', - 'pallet-timestamp/runtime-benchmarks', - 'sp-runtime/runtime-benchmarks', -] -std = [ - 'codec/std', - 'serde', - 'frame-executive/std', - 'frame-support/std', - 'frame-system/std', - 'frame-system-rpc-runtime-api/std', - 'pallet-aura/std', - 'pallet-balances/std', - 'pallet-grandpa/std', - 'pallet-randomness-collective-flip/std', - 'pallet-sudo/std', - 'pallet-timestamp/std', - 'pallet-transaction-payment/std', - 'pallet-transaction-payment-rpc-runtime-api/std', - 'sp-api/std', - 'sp-block-builder/std', - 'sp-consensus-aura/std', - 'sp-core/std', - 'sp-inherents/std', - 'sp-offchain/std', - 'sp-runtime/std', - 'sp-session/std', - 'sp-std/std', - 'sp-transaction-pool/std', - 'sp-version/std', - 'pallet-tasking/std', - 'pallet-tasking-runtime-api/std', -] diff --git a/runtime/api-runtime/src/lib.rs b/runtime/api-runtime/src/lib.rs deleted file mode 100644 index ad4643e..0000000 --- a/runtime/api-runtime/src/lib.rs +++ /dev/null @@ -1,500 +0,0 @@ -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -use pallet_grandpa::fg_primitives; -use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; -use sp_api::impl_runtime_apis; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; -use sp_runtime::traits::{ - AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, Verify, -}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, MultiSignature, -}; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; - -// A few exports that help ease life for downstream crates. -pub use frame_support::{ - construct_runtime, parameter_types, - traits::{KeyOwnerProofSystem, Randomness}, - weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - IdentityFee, Weight, - }, - StorageValue, -}; -pub use pallet_balances::Call as BalancesCall; -pub use pallet_timestamp::Call as TimestampCall; -use pallet_transaction_payment::CurrencyAdapter; -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -pub use sp_runtime::{Perbill, Permill}; - -/// Import the template pallet. -pub use pallet_tasking; - -/// An index to a block. -pub type BlockNumber = u32; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -/// The type for looking up accounts. We don't expect more than 4 billion of them, but you -/// never know... -pub type AccountIndex = u32; - -/// Balance of an account. -pub type Balance = u128; - -/// Index of a transaction in the chain. -pub type Index = u32; - -/// A hash of some data used by the chain. -pub type Hash = sp_core::H256; - -/// Digest item type. -pub type DigestItem = generic::DigestItem; - -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core data structures. -pub mod opaque { - use super::*; - - pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - - /// Opaque block header type. - pub type Header = generic::Header; - /// Opaque block type. - pub type Block = generic::Block; - /// Opaque block identifier type. - pub type BlockId = generic::BlockId; - - impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - pub grandpa: Grandpa, - } - } -} - -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("node-template"), - impl_name: create_runtime_str!("node-template"), - authoring_version: 1, - spec_version: 100, - impl_version: 1, - apis: RUNTIME_API_VERSIONS, - transaction_version: 1, -}; - -/// This determines the average expected block time that we are targeting. -/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. -/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked -/// up by `pallet_aura` to implement `fn slot_duration()`. -/// -/// Change this to adjust the block time. -pub const MILLISECS_PER_BLOCK: u64 = 6000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// Time is measured by number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { - runtime_version: VERSION, - can_author_with: Default::default(), - } -} - -const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - -parameter_types! { - pub const Version: RuntimeVersion = VERSION; - pub const BlockHashCount: BlockNumber = 2400; - /// We allow for 2 seconds of compute with a 6 second average block time. - pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights - ::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); - pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength - ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub const SS58Prefix: u8 = 42; -} - -// Configure FRAME pallets to include in runtime. - -impl frame_system::Config for Runtime { - /// The basic call filter to use in dispatchable. - type BaseCallFilter = (); - /// Block & extrinsics weights: base values and limits. - type BlockWeights = BlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = BlockLength; - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type Event = Event; - /// The ubiquitous origin type. - type Origin = Origin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// Version of the runtime. - type Version = Version; - /// Converts a module to the index of the module in `construct_runtime!`. - /// - /// This type is being generated by `construct_runtime!`. - type PalletInfo = PalletInfo; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); - /// This is used as an identifier of the chain. 42 is the generic substrate prefix. - type SS58Prefix = SS58Prefix; -} - -impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; -} - -impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; - - type KeyOwnerProofSystem = (); - - type KeyOwnerProof = - >::Proof; - - type KeyOwnerIdentification = >::IdentificationTuple; - - type HandleEquivocation = (); - - type WeightInfo = (); -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = u64; - type OnTimestampSet = Aura; - type MinimumPeriod = MinimumPeriod; - type WeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: u128 = 500; - pub const MaxLocks: u32 = 50; -} - -impl pallet_balances::Config for Runtime { - type MaxLocks = MaxLocks; - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type Event = Event; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; -} - -parameter_types! { - pub const TransactionByteFee: Balance = 1; -} - -impl pallet_transaction_payment::Config for Runtime { - type OnChargeTransaction = CurrencyAdapter; - type TransactionByteFee = TransactionByteFee; - type WeightToFee = IdentityFee; - type FeeMultiplierUpdate = (); -} - -impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; -} - -/// Configure the template pallet in pallets/template. -impl pallet_tasking::Config for Runtime { - type Event = Event; - type Currency = Balances; -} - -// Create the runtime by composing the FRAME pallets that were previously configured. -construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { - System: frame_system::{Module, Call, Config, Storage, Event}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage}, - Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent}, - Aura: pallet_aura::{Module, Config}, - Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event}, - Balances: pallet_balances::{Module, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Module, Storage}, - Sudo: pallet_sudo::{Module, Call, Config, Storage, Event}, - // Include the custom logic from the template pallet in the runtime. - PalletTasking: pallet_tasking::{Module, Call, Storage, Event}, - } -); - -/// The address format for describing accounts. -pub type Address = sp_runtime::MultiAddress; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, -); -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllModules, ->; - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> - Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - - fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> u64 { - Aura::slot_duration() - } - - fn authorities() -> Vec { - Aura::authorities() - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - opaque::SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl fg_primitives::GrandpaApi for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() - } - - fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: fg_primitives::EquivocationProof< - ::Hash, - NumberFor, - >, - _key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - None - } - - fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, - _authority_id: GrandpaId, - ) -> Option { - // NOTE: this is the only implementation possible since we've - // defined our key owner proof type as a bottom type (i.e. a type - // with no values). - None - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi - for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - } - - // Implementing pallet tasking custom runtime api - impl pallet_tasking_runtime_api::PalletTaskingApi for Runtime { - fn get_one() -> u128 { - PalletTasking::get_one() - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; - - use frame_system_benchmarking::Module as SystemBench; - impl frame_system_benchmarking::Config for Runtime {} - - let whitelist: Vec = vec![ - // Block Number - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac") - .to_vec().into(), - // Total Issuance - hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80") - .to_vec().into(), - // Execution Phase - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a") - .to_vec().into(), - // Event Count - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850") - .to_vec().into(), - // System Events - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7") - .to_vec().into(), - ]; - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmark!(params, batches, frame_system, SystemBench::); - add_benchmark!(params, batches, pallet_balances, Balances); - add_benchmark!(params, batches, pallet_timestamp, Timestamp); - - if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) - } - } -} diff --git a/runtime/api-runtime/build.rs b/runtime/build.rs similarity index 100% rename from runtime/api-runtime/build.rs rename to runtime/build.rs index 9dcfddb..18a76f7 100644 --- a/runtime/api-runtime/build.rs +++ b/runtime/build.rs @@ -3,7 +3,7 @@ use substrate_wasm_builder::WasmBuilder; fn main() { WasmBuilder::new() .with_current_project() - .import_memory() .export_heap_base() + .import_memory() .build() } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs new file mode 100644 index 0000000..6ddbd01 --- /dev/null +++ b/runtime/src/lib.rs @@ -0,0 +1,499 @@ +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +use pallet_grandpa::{ + fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, +}; +use sp_api::impl_runtime_apis; +use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, Verify}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, MultiSignature, +}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; + +// A few exports that help ease life for downstream crates. +pub use frame_support::{ + construct_runtime, parameter_types, + traits::{KeyOwnerProofSystem, Randomness, StorageInfo}, + weights::{ + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + IdentityFee, Weight, + }, + StorageValue, +}; +pub use pallet_balances::Call as BalancesCall; +pub use pallet_timestamp::Call as TimestampCall; +use pallet_transaction_payment::CurrencyAdapter; +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +pub use sp_runtime::{Perbill, Permill}; + +/// Import the template pallet. +pub use pallet_tasking; + +/// An index to a block. +pub type BlockNumber = u32; + +/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. +pub type Signature = MultiSignature; + +/// Some way of identifying an account on the chain. We intentionally make it equivalent +/// to the public key of our transaction signing scheme. +pub type AccountId = <::Signer as IdentifyAccount>::AccountId; + +/// Balance of an account. +pub type Balance = u128; + +/// Index of a transaction in the chain. +pub type Index = u32; + +/// A hash of some data used by the chain. +pub type Hash = sp_core::H256; + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core data structures. +pub mod opaque { + use super::*; + + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + + /// Opaque block header type. + pub type Header = generic::Header; + /// Opaque block type. + pub type Block = generic::Block; + /// Opaque block identifier type. + pub type BlockId = generic::BlockId; + + impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + pub grandpa: Grandpa, + } + } +} + +// To learn more about runtime versioning and what each of the following value means: +// https://substrate.dev/docs/en/knowledgebase/runtime/upgrades#runtime-versioning +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("node-template"), + impl_name: create_runtime_str!("node-template"), + authoring_version: 1, + // The version of the runtime specification. A full node will not attempt to use its native + // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + // `spec_version`, and `authoring_version` are the same between Wasm and native. + // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use + // the compatible custom types. + spec_version: 100, + impl_version: 1, + apis: RUNTIME_API_VERSIONS, + transaction_version: 1, +}; + +/// This determines the average expected block time that we are targeting. +/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. +/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked +/// up by `pallet_aura` to implement `fn slot_duration()`. +/// +/// Change this to adjust the block time. +pub const MILLISECS_PER_BLOCK: u64 = 6000; + +// NOTE: Currently it is not possible to change the slot duration after the chain has started. +// Attempting to do so will brick block production. +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +// Time is measured by number of blocks. +pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); +pub const HOURS: BlockNumber = MINUTES * 60; +pub const DAYS: BlockNumber = HOURS * 24; + +/// The version information used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { + runtime_version: VERSION, + can_author_with: Default::default(), + } +} + +const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); + +parameter_types! { + pub const Version: RuntimeVersion = VERSION; + pub const BlockHashCount: BlockNumber = 2400; + /// We allow for 2 seconds of compute with a 6 second average block time. + pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights + ::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength + ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub const SS58Prefix: u8 = 42; +} + +// Configure FRAME pallets to include in runtime. + +impl frame_system::Config for Runtime { + /// The basic call filter to use in dispatchable. + type BaseCallFilter = frame_support::traits::AllowAll; + /// Block & extrinsics weights: base values and limits. + type BlockWeights = BlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = BlockLength; + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type Call = Call; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup; + /// The index type for storing how many extrinsics an account has signed. + type Index = Index; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = generic::Header; + /// The ubiquitous event type. + type Event = Event; + /// The ubiquitous origin type. + type Origin = Origin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// Version of the runtime. + type Version = Version; + /// Converts a module to the index of the module in `construct_runtime!`. + /// + /// This type is being generated by `construct_runtime!`. + type PalletInfo = PalletInfo; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = (); + /// This is used as an identifier of the chain. 42 is the generic substrate prefix. + type SS58Prefix = SS58Prefix; + /// The set code logic, just the default since we're not a parachain. + type OnSetCode = (); +} + +impl pallet_randomness_collective_flip::Config for Runtime {} + +impl pallet_aura::Config for Runtime { + type AuthorityId = AuraId; +} + +impl pallet_grandpa::Config for Runtime { + type Event = Event; + type Call = Call; + + type KeyOwnerProofSystem = (); + + type KeyOwnerProof = + >::Proof; + + type KeyOwnerIdentification = >::IdentificationTuple; + + type HandleEquivocation = (); + + type WeightInfo = (); +} + +parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = (); +} + +parameter_types! { + pub const ExistentialDeposit: u128 = 500; + pub const MaxLocks: u32 = 50; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = pallet_balances::weights::SubstrateWeight; +} + +parameter_types! { + pub const TransactionByteFee: Balance = 1; +} + +impl pallet_transaction_payment::Config for Runtime { + type OnChargeTransaction = CurrencyAdapter; + type TransactionByteFee = TransactionByteFee; + type WeightToFee = IdentityFee; + type FeeMultiplierUpdate = (); +} + +impl pallet_sudo::Config for Runtime { + type Event = Event; + type Call = Call; +} + +/// Configure the pallet-tasking in pallets/pallets-tasking +impl pallet_tasking::Config for Runtime { + type Event = Event; + type Currency = Balances; +} + +// Create the runtime by composing the FRAME pallets that were previously configured. +construct_runtime!( + pub enum Runtime where + Block = Block, + NodeBlock = opaque::Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + Aura: pallet_aura::{Pallet, Config}, + Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event}, + // Include the custom logic from the tasking pallet in the runtime. + PalletTasking: pallet_tasking::{Pallet, Call, Storage, Event}, + } +); + +/// The address format for describing accounts. +pub type Address = sp_runtime::MultiAddress; +/// Block header type as expected by this runtime. +pub type Header = generic::Header; +/// Block type as expected by this runtime. +pub type Block = generic::Block; +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + frame_system::CheckSpecVersion, + frame_system::CheckTxVersion, + frame_system::CheckGenesis, + frame_system::CheckEra, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_transaction_payment::ChargeTransactionPayment, +); +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPallets, +>; + +impl_runtime_apis! { + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block); + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + Runtime::metadata().into() + } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) + } + + fn authorities() -> Vec { + Aura::authorities() + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + opaque::SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, KeyTypeId)>> { + opaque::SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl fg_primitives::GrandpaApi for Runtime { + fn grandpa_authorities() -> GrandpaAuthorityList { + Grandpa::grandpa_authorities() + } + + fn submit_report_equivocation_unsigned_extrinsic( + _equivocation_proof: fg_primitives::EquivocationProof< + ::Hash, + NumberFor, + >, + _key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + None + } + + fn generate_key_ownership_proof( + _set_id: fg_primitives::SetId, + _authority_id: GrandpaId, + ) -> Option { + // NOTE: this is the only implementation possible since we've + // defined our key owner proof type as a bottom type (i.e. a type + // with no values). + None + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Index { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { + fn query_info( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + } + + // Implementing pallet tasking custom runtime api + impl pallet_tasking_runtime_api::PalletTaskingApi for Runtime { + fn get_one() -> u128 { + PalletTasking::get_one() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result< + (Vec, Vec), + sp_runtime::RuntimeString, + > { + use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; + use frame_support::traits::StorageInfoTrait; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime {} + + let whitelist: Vec = vec![ + // Block Number + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), + // Total Issuance + hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), + // Execution Phase + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), + // Event Count + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), + // System Events + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), + ]; + + let storage_info = AllPalletsWithSystem::storage_info(); + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + + add_benchmark!(params, batches, frame_system, SystemBench::); + add_benchmark!(params, batches, pallet_balances, Balances); + add_benchmark!(params, batches, pallet_timestamp, Timestamp); + add_benchmark!(params, batches, pallet_template, TemplateModule); + + if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } + Ok((batches, storage_info)) + } + } +}