diff --git a/Cargo.lock b/Cargo.lock index 20ba30c600..42fa55e9e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,43 +1,13 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] -name = "adler32" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" - -[[package]] -name = "aes-ctr" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" -dependencies = [ - "aes-soft", - "aesni", - "ctr", - "stream-cipher", -] - -[[package]] -name = "aes-soft" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" -dependencies = [ - "block-cipher-trait", - "byteorder 1.3.4", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.6.0" +name = "Inflector" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" dependencies = [ - "block-cipher-trait", - "opaque-debug", - "stream-cipher", + "lazy_static", + "regex", ] [[package]] @@ -59,41 +29,25 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi 0.3.8", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" +name = "alga" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" dependencies = [ - "winapi 0.3.8", + "approx", + "num-complex", + "num-traits", ] [[package]] -name = "app_dirs" -version = "1.2.1" +name = "approx" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" dependencies = [ - "ole32-sys", - "shell32-sys", - "winapi 0.2.8", - "xdg", + "num-traits", ] -[[package]] -name = "arc-swap" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d663a8e9a99154b5fb793032533f6328da35e23aac63d5c152279aa8ba356825" - [[package]] name = "arrayref" version = "0.3.6" @@ -115,36 +69,6 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" -[[package]] -name = "asn1_der" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fce6b6a0ffdafebd82c87e79e3f40e8d2c523e5fea5566ff6b90509bf98d638" -dependencies = [ - "asn1_der_derive", -] - -[[package]] -name = "asn1_der_derive" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" -dependencies = [ - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.8", -] - [[package]] name = "autocfg" version = "0.1.7" @@ -185,37 +109,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" -[[package]] -name = "base64" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -dependencies = [ - "byteorder 1.3.4", -] - -[[package]] -name = "bindgen" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df683a55b54b41d5ea8ebfaebb5aa7e6b84e3f3006a78f010dadc9ca88469260" -dependencies = [ - "bitflags", - "cexpr", - "cfg-if", - "clang-sys", - "clap", - "env_logger 0.6.2", - "hashbrown 0.1.8", - "lazy_static", - "log", - "peeking_take_while", - "proc-macro2 0.4.30", - "quote 0.6.13", - "regex", - "which", -] - [[package]] name = "bitflags" version = "1.2.1" @@ -238,18 +131,6 @@ dependencies = [ "radium", ] -[[package]] -name = "blake2" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" -dependencies = [ - "byte-tools", - "crypto-mac", - "digest", - "opaque-debug", -] - [[package]] name = "blake2-rfc" version = "0.2.18" @@ -268,16 +149,7 @@ checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ "block-padding", "byte-tools", - "byteorder 1.3.4", - "generic-array", -] - -[[package]] -name = "block-cipher-trait" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" -dependencies = [ + "byteorder", "generic-array", ] @@ -290,27 +162,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "bs58" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188" - -[[package]] -name = "bs58" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b170cd256a3f9fa6b9edae3e44a7dfdfc77e8124dbc3e2612d75f9c3e2396dae" - -[[package]] -name = "bstr" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2889e6d50f394968c8bf4240dc3f2a7eb4680844d27308f798229ac9d4725f41" -dependencies = [ - "memchr", -] - [[package]] name = "bumpalo" version = "3.2.1" @@ -329,58 +180,17 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -[[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" - [[package]] name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder 1.3.4", - "either", - "iovec", -] - -[[package]] -name = "bytes" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" - -[[package]] -name = "c_linked_list" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" - [[package]] name = "cc" version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" -dependencies = [ - "jobserver", -] - -[[package]] -name = "cexpr" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" -dependencies = [ - "nom", -] [[package]] name = "cfg-if" @@ -388,56 +198,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -[[package]] -name = "chain-spec-builder" -version = "2.0.0-alpha.3" -dependencies = [ - "ansi_term 0.12.1", - "joystream-node", - "rand 0.7.3", - "structopt", - "substrate-keystore", - "substrate-primitives", - "substrate-telemetry", -] - -[[package]] -name = "chrono" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" -dependencies = [ - "num-integer", - "num-traits", - "time", -] - -[[package]] -name = "clang-sys" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "2.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -dependencies = [ - "ansi_term 0.11.0", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - [[package]] name = "clear_on_drop" version = "0.2.3" @@ -463,7 +223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" dependencies = [ "const-random-macro", - "proc-macro-hack 0.5.15", + "proc-macro-hack", ] [[package]] @@ -473,7 +233,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" dependencies = [ "getrandom", - "proc-macro-hack 0.5.15", + "proc-macro-hack", ] [[package]] @@ -483,5502 +243,1961 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "crc32fast" -version = "1.2.0" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -dependencies = [ - "cfg-if", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "crossbeam-channel" -version = "0.3.9" +name = "crypto-mac" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" dependencies = [ - "crossbeam-utils 0.6.6", + "generic-array", + "subtle 1.0.0", ] [[package]] -name = "crossbeam-deque" -version = "0.7.3" +name = "curve25519-dalek" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +checksum = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "byteorder", + "digest", + "rand_core 0.5.1", + "subtle 2.2.2", + "zeroize", ] [[package]] -name = "crossbeam-epoch" -version = "0.8.2" +name = "derive_more" +version = "0.99.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +checksum = "298998b1cf6b5b2c8a7b023dfd45821825ce3ba8a8af55c921a0e734e4653f76" dependencies = [ - "autocfg 1.0.0", - "cfg-if", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard 1.1.0", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "crossbeam-queue" -version = "0.2.1" +name = "difference" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" -dependencies = [ - "cfg-if", - "crossbeam-utils 0.7.2", -] +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] -name = "crossbeam-utils" -version = "0.6.6" +name = "digest" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "cfg-if", - "lazy_static", + "generic-array", ] [[package]] -name = "crossbeam-utils" -version = "0.7.2" +name = "downcast" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb454f0228b18c7f4c3b0ebbee346ed9c52e7443b0999cd543ff3571205701d" + +[[package]] +name = "ed25519-dalek" +version = "1.0.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" dependencies = [ - "autocfg 1.0.0", - "cfg-if", - "lazy_static", + "clear_on_drop", + "curve25519-dalek", + "rand 0.7.3", + "sha2", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "either" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] -name = "crypto-mac" -version = "0.7.0" +name = "environmental" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -dependencies = [ - "generic-array", - "subtle 1.0.0", -] +checksum = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4" [[package]] -name = "ct-logs" -version = "0.6.0" +name = "failure" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" +checksum = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b" dependencies = [ - "sct", + "backtrace", + "failure_derive", ] [[package]] -name = "ctr" -version = "0.3.2" +name = "failure_derive" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" +checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231" dependencies = [ - "block-cipher-trait", - "stream-cipher", + "proc-macro2", + "quote", + "syn", + "synstructure", ] [[package]] -name = "ctrlc" -version = "3.1.4" +name = "fake-simd" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a4ba686dff9fa4c1c9636ce1010b0cf98ceb421361b0bb3d6faeec43bd217a7" -dependencies = [ - "nix", - "winapi 0.3.8", -] +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] -name = "cuckoofilter" -version = "0.3.2" +name = "fixed-hash" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" +checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" dependencies = [ - "byteorder 0.5.3", - "rand 0.3.23", + "byteorder", + "rand 0.7.3", + "rustc-hex", + "static_assertions", ] [[package]] -name = "curve25519-dalek" -version = "1.2.3" +name = "float-cmp" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d" +checksum = "da62c4f1b81918835a8c6a484a397775fff5953fe83529afd51b05f5c6a6617d" dependencies = [ - "byteorder 1.3.4", - "clear_on_drop", - "digest", - "rand_core 0.3.1", - "subtle 2.2.2", + "num-traits", ] [[package]] -name = "curve25519-dalek" -version = "2.0.0" +name = "fragile" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" +checksum = "69a039c3498dc930fe810151a34ba0c1c70b02b8625035592e74432f678591f2" + +[[package]] +name = "frame-benchmarking" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "byteorder 1.3.4", - "digest", - "rand_core 0.5.1", - "subtle 2.2.2", - "zeroize 1.1.0", + "frame-support", + "frame-system", + "linregress", + "parity-scale-codec", + "paste", + "sp-api", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", ] [[package]] -name = "data-encoding" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" - -[[package]] -name = "derivative" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eae4d76b7cefedd1b4f8cc24378b2fbd1ac1b66e3bbebe8e2192d3be81cb355" +name = "frame-metadata" +version = "11.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", + "parity-scale-codec", + "serde", + "sp-core", + "sp-std", ] [[package]] -name = "derive_more" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d944ac6003ed268757ef1ee686753b57efc5fcf0ebe7b64c9fc81e7e32ff839" +name = "frame-support" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "rustc_version", - "syn 0.15.44", + "bitmask", + "frame-metadata", + "frame-support-procedural", + "impl-trait-for-tuples", + "log", + "once_cell", + "parity-scale-codec", + "paste", + "serde", + "smallvec 1.4.1", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-tracing", ] [[package]] -name = "derive_more" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a141330240c921ec6d074a3e188a7c7ef95668bb95e7d44fa0e5778ec2a7afe" +name = "frame-support-procedural" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "lazy_static", - "proc-macro2 0.4.30", - "quote 0.6.13", - "regex", - "rustc_version", - "syn 0.15.44", + "frame-support-procedural-tools", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +name = "frame-support-procedural-tools" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "generic-array", + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "dns-parser" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" +name = "frame-support-procedural-tools-derive" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "byteorder 1.3.4", - "quick-error", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +name = "frame-system" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" +dependencies = [ + "frame-support", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", +] [[package]] -name = "downcast" -version = "0.10.0" +name = "fuchsia-cprng" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb454f0228b18c7f4c3b0ebbee346ed9c52e7443b0999cd543ff3571205701d" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] -name = "ed25519-dalek" -version = "0.9.1" +name = "futures" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d07e8b8a8386c3b89a7a4b329fdfa4cb545de2545e9e2ebbc3dd3929253e426" +checksum = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" dependencies = [ - "clear_on_drop", - "curve25519-dalek 1.2.3", - "failure", - "rand 0.6.5", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "ed25519-dalek" -version = "1.0.0-pre.3" +name = "futures-channel" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" +checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" dependencies = [ - "clear_on_drop", - "curve25519-dalek 2.0.0", - "rand 0.7.3", - "sha2", + "futures-core", + "futures-sink", ] [[package]] -name = "either" -version = "1.5.3" +name = "futures-core" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" [[package]] -name = "elastic-array" -version = "0.10.3" +name = "futures-executor" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "580f3768bd6465780d063f5b8213a2ebd506e139b345e4a81eb301ceae3d61e1" +checksum = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" dependencies = [ - "heapsize", + "futures-core", + "futures-task", + "futures-util", + "num_cpus", ] [[package]] -name = "env_logger" -version = "0.6.2" +name = "futures-io" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] +checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" [[package]] -name = "env_logger" -version = "0.7.1" +name = "futures-macro" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "environmental" -version = "1.1.1" +name = "futures-sink" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4" +checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" [[package]] -name = "erased-serde" -version = "0.3.11" +name = "futures-task" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88b6d1705e16a4d62e05ea61cc0496c2bd190f4fa8e5c1f11ce747be6bcf3d1" -dependencies = [ - "serde", -] +checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" [[package]] -name = "exit-future" -version = "0.1.4" +name = "futures-util" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8013f441e38e31c670e7f34ec8f1d5d3a2bd9d303c1ff83976ca886005e8f48" +checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" dependencies = [ - "futures 0.1.29", - "parking_lot 0.7.1", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", ] [[package]] -name = "failure" -version = "0.1.7" +name = "generic-array" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ - "backtrace", - "failure_derive", + "typenum", ] [[package]] -name = "failure_derive" -version = "0.1.7" +name = "getrandom" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", - "synstructure", + "cfg-if", + "libc", + "wasi", ] [[package]] -name = "fake-simd" -version = "0.1.2" +name = "hash-db" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" [[package]] -name = "fdlimit" -version = "0.1.4" +name = "hash256-std-hasher" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da54a593b34c71b889ee45f5b5bb900c74148c5f7f8c6a9479ee7899f69603c" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" dependencies = [ - "libc", + "crunchy", ] [[package]] -name = "finality-grandpa" -version = "0.9.1" +name = "hashbrown" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34754852da8d86bc509715292c73140a5b678656d0b16132acd6737bdb5fd5f8" +checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" dependencies = [ - "futures 0.1.29", - "hashbrown 0.6.3", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot 0.9.0", + "ahash", + "autocfg 0.1.7", ] [[package]] -name = "fixed-hash" -version = "0.5.2" +name = "hermit-abi" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3367952ceb191f4ab95dd5685dc163ac539e36202f9fcfd0cb22f9f9c542fefc" +checksum = "725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e" dependencies = [ - "byteorder 1.3.4", "libc", - "rand 0.7.3", - "rustc-hex", - "static_assertions", ] [[package]] -name = "fixedbitset" -version = "0.1.9" +name = "hex" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" [[package]] -name = "flate2" -version = "1.0.14" +name = "hmac" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" dependencies = [ - "cfg-if", - "crc32fast", - "futures 0.1.29", - "libc", - "libz-sys", - "miniz_oxide", - "tokio-io", + "crypto-mac", + "digest", ] [[package]] -name = "float-cmp" -version = "0.6.0" +name = "hmac-drbg" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62c4f1b81918835a8c6a484a397775fff5953fe83529afd51b05f5c6a6617d" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" dependencies = [ - "num-traits", + "digest", + "generic-array", + "hmac", ] [[package]] -name = "fnv" -version = "1.0.6" +name = "impl-codec" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +dependencies = [ + "parity-scale-codec", +] [[package]] -name = "fork-tree" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "impl-serde" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" dependencies = [ - "parity-scale-codec", + "serde", ] [[package]] -name = "fragile" +name = "impl-serde" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f8140122fa0d5dcb9fc8627cfce2b37cc1500f752636d46ea28bc26785c2f9" +checksum = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" +dependencies = [ + "serde", +] [[package]] -name = "fs-swap" -version = "0.2.4" +name = "impl-trait-for-tuples" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb" +checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ - "lazy_static", - "libc", - "libloading", - "winapi 0.3.8", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "fuchsia-cprng" -version = "0.1.1" +name = "integer-sqrt" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +checksum = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b" [[package]] -name = "fuchsia-zircon" -version = "0.3.3" +name = "itertools" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ - "bitflags", - "fuchsia-zircon-sys", + "either", ] [[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" +name = "js-sys" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055" +dependencies = [ + "wasm-bindgen", +] [[package]] -name = "futures" -version = "0.1.29" +name = "keccak" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] -name = "futures" -version = "0.3.4" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" -dependencies = [ - "futures-core", - "futures-sink", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "futures-channel-preview" -version = "0.3.0-alpha.19" +name = "libc" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" -dependencies = [ - "futures-core-preview", - "futures-sink-preview", -] +checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0" [[package]] -name = "futures-core" -version = "0.3.4" +name = "libm" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] -name = "futures-core-preview" -version = "0.3.0-alpha.19" +name = "libsecp256k1" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest", + "hmac-drbg", + "rand 0.7.3", + "sha2", + "subtle 2.2.2", + "typenum", +] [[package]] -name = "futures-cpupool" -version = "0.1.8" +name = "linregress" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +checksum = "9290cf6f928576eeb9c096c6fad9d8d452a0a1a70a2bbffa6e36064eedc0aac9" dependencies = [ - "futures 0.1.29", - "num_cpus", + "failure", + "nalgebra", + "statrs", ] [[package]] -name = "futures-executor" -version = "0.3.4" +name = "lock_api" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" +checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" dependencies = [ - "futures-core", - "futures-task", - "futures-util", - "num_cpus", + "scopeguard", ] [[package]] -name = "futures-executor-preview" -version = "0.3.0-alpha.19" +name = "log" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75236e88bd9fe88e5e8bfcd175b665d0528fe03ca4c5207fabc028c8f9d93e98" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "futures-core-preview", - "futures-util-preview", - "num_cpus", + "cfg-if", ] [[package]] -name = "futures-io" -version = "0.3.4" +name = "matrixmultiply" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f" +dependencies = [ + "rawpointer", +] [[package]] -name = "futures-io-preview" -version = "0.3.0-alpha.19" +name = "maybe-uninit" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4914ae450db1921a56c91bde97a27846287d062087d4a652efc09bb3a01ebda" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] -name = "futures-macro" -version = "0.3.4" +name = "memchr" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" -dependencies = [ - "proc-macro-hack 0.5.15", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] -name = "futures-preview" -version = "0.3.0-alpha.19" +name = "memory-db" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1dce2a0267ada5c6ff75a8ba864b4e679a9e2aa44262af7a3b5516d530d76e" +checksum = "fb2999ff7a65d5a1d72172f6d51fa2ea03024b51aee709ba5ff81c3c629a2410" dependencies = [ - "futures-channel-preview", - "futures-core-preview", - "futures-executor-preview", - "futures-io-preview", - "futures-sink-preview", - "futures-util-preview", + "ahash", + "hash-db", + "hashbrown", + "parity-util-mem", ] [[package]] -name = "futures-sink" -version = "0.3.4" +name = "memory_units" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] -name = "futures-sink-preview" -version = "0.3.0-alpha.19" +name = "merlin" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec" +checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] [[package]] -name = "futures-task" -version = "0.3.4" +name = "mockall" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +checksum = "256489d4d106cd2bc9e98ed0337402db0044de0621745d5d9eb70a14295ff77b" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] [[package]] -name = "futures-timer" -version = "0.4.0" +name = "mockall_derive" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878f1d2fc31355fa02ed2372e741b0c17e58373341e6a122569b4623a14a7d33" +checksum = "826e14e8643cb12103b56efb963e5f9640b69b0f7bdcc460002092df4b0e959f" dependencies = [ - "futures-core-preview", - "futures-util-preview", - "pin-utils", + "cfg-if", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "futures-util" -version = "0.3.4" +name = "nalgebra" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" +checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-utils", - "proc-macro-hack 0.5.15", - "proc-macro-nested", - "slab", + "alga", + "approx", + "generic-array", + "matrixmultiply", + "num-complex", + "num-rational", + "num-traits", + "rand 0.6.5", + "typenum", ] [[package]] -name = "futures-util-preview" -version = "0.3.0-alpha.19" +name = "nodrop" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" -dependencies = [ - "futures 0.1.29", - "futures-channel-preview", - "futures-core-preview", - "futures-io-preview", - "futures-sink-preview", - "memchr", - "pin-utils", - "slab", -] +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] -name = "gcc" -version = "0.3.55" +name = "normalize-line-endings" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "generic-array" -version = "0.12.3" +name = "num-bigint" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "typenum", + "autocfg 1.0.0", + "num-integer", + "num-traits", ] [[package]] -name = "get_if_addrs" -version = "0.5.3" +name = "num-complex" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" dependencies = [ - "c_linked_list", - "get_if_addrs-sys", - "libc", - "winapi 0.2.8", + "autocfg 1.0.0", + "num-traits", ] [[package]] -name = "get_if_addrs-sys" -version = "0.1.1" +name = "num-integer" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" +checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" dependencies = [ - "gcc", - "libc", + "autocfg 1.0.0", + "num-traits", ] [[package]] -name = "getrandom" -version = "0.1.14" +name = "num-rational" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "cfg-if", - "libc", - "wasi", + "autocfg 1.0.0", + "num-bigint", + "num-integer", + "num-traits", ] [[package]] -name = "glob" +name = "num-traits" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +dependencies = [ + "autocfg 1.0.0", + "libm", +] [[package]] -name = "globset" -version = "0.4.5" +name = "num_cpus" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120" +checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", + "hermit-abi", + "libc", ] [[package]] -name = "h2" -version = "0.1.26" +name = "once_cell" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" dependencies = [ - "byteorder 1.3.4", - "bytes 0.4.12", - "fnv", - "futures 0.1.29", - "http", - "indexmap", - "log", - "slab", - "string", - "tokio-io", + "parking_lot 0.10.0", ] [[package]] -name = "hash-db" -version = "0.15.2" +name = "opaque-debug" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] -name = "hash256-std-hasher" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +name = "pallet-balances" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "crunchy", + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-runtime", + "sp-std", ] [[package]] -name = "hashbrown" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" +name = "pallet-common" +version = "3.0.0" dependencies = [ - "byteorder 1.3.4", - "scopeguard 0.3.3", + "frame-support", + "frame-system", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-runtime", ] [[package]] -name = "hashbrown" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" +name = "pallet-hiring" +version = "3.0.0" dependencies = [ - "ahash", - "autocfg 0.1.7", + "frame-support", + "frame-system", + "mockall", + "pallet-balances", + "pallet-stake", + "parity-scale-codec", + "serde", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] -name = "heapsize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" +name = "pallet-membership" +version = "3.0.0" dependencies = [ - "winapi 0.3.8", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-common", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +name = "pallet-memo" +version = "3.0.0" dependencies = [ - "unicode-segmentation", + "frame-support", + "frame-system", + "pallet-common", + "parity-scale-codec", + "sp-arithmetic", ] [[package]] -name = "hermit-abi" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e" +name = "pallet-recurring-reward" +version = "3.0.0" dependencies = [ - "libc", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-token-mint", + "parity-scale-codec", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "hex" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" - -[[package]] -name = "hex" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +name = "pallet-stake" +version = "3.0.0" +dependencies = [ + "frame-support", + "frame-system", + "pallet-balances", + "pallet-timestamp", + "parity-scale-codec", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] [[package]] -name = "hex-literal" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc2928beef125e519d69ae1baa8c37ea2e0d3848545217f6db0179c5eb1d639" +name = "pallet-timestamp" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "hex-literal-impl 0.1.2", - "proc-macro-hack 0.4.2", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] -name = "hex-literal" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" +name = "pallet-token-mint" +version = "3.0.0" dependencies = [ - "hex-literal-impl 0.2.1", - "proc-macro-hack 0.5.15", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] -name = "hex-literal-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520870c3213943eb8d7803e80180d12a6c7ceb4ae74602544529d1643dc4ddda" +name = "pallet-versioned-store" +version = "3.0.0" dependencies = [ - "proc-macro-hack 0.4.2", + "frame-support", + "frame-system", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] -name = "hex-literal-impl" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d4c5c844e2fee0bf673d54c2c177f1713b3d2af2ff6e666b49cb7572e6cf42d" +name = "pallet-versioned-store-permissions" +version = "3.0.0" dependencies = [ - "proc-macro-hack 0.5.15", + "frame-support", + "frame-system", + "pallet-timestamp", + "pallet-versioned-store", + "parity-scale-codec", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] -name = "hmac" -version = "0.7.1" +name = "parity-scale-codec" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +checksum = "a74f02beb35d47e0706155c9eac554b50c671e0d868fe8296bcdf44a9a4847bf" dependencies = [ - "crypto-mac", - "digest", + "arrayvec 0.5.1", + "bitvec", + "byte-slice-cast", + "parity-scale-codec-derive", + "serde", ] [[package]] -name = "hmac-drbg" -version = "0.2.0" +name = "parity-scale-codec-derive" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245" dependencies = [ - "digest", - "generic-array", - "hmac", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "http" -version = "0.1.21" +name = "parity-util-mem" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" +checksum = "2c6e2583649a3ca84894d1d71da249abcfda54d5aca24733d72ca10d0f02361c" dependencies = [ - "bytes 0.4.12", - "fnv", - "itoa", + "cfg-if", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "parking_lot 0.10.0", + "primitive-types", + "winapi", ] [[package]] -name = "http-body" +name = "parity-util-mem-derive" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "http", - "tokio-buf", + "proc-macro2", + "syn", + "synstructure", ] [[package]] -name = "httparse" -version = "1.3.4" +name = "parity-wasm" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" [[package]] -name = "humantime" -version = "1.3.0" +name = "parking_lot" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" dependencies = [ - "quick-error", + "lock_api", + "parking_lot_core 0.6.2", + "rustc_version", ] [[package]] -name = "hyper" -version = "0.12.35" +name = "parking_lot" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" +checksum = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "futures-cpupool", - "h2", - "http", - "http-body", - "httparse", - "iovec", - "itoa", - "log", - "net2", - "rustc_version", - "time", - "tokio", - "tokio-buf", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "want", + "lock_api", + "parking_lot_core 0.7.0", ] [[package]] -name = "hyper-rustls" -version = "0.17.1" +name = "parking_lot_core" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719d85c7df4a7f309a77d145340a063ea929dcb2e025bae46a80345cffec2952" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ - "bytes 0.4.12", - "ct-logs", - "futures 0.1.29", - "hyper", - "rustls", - "tokio-io", - "tokio-rustls", - "webpki", - "webpki-roots 0.17.0", + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "rustc_version", + "smallvec 0.6.13", + "winapi", ] [[package]] -name = "idna" -version = "0.1.5" +name = "parking_lot_core" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +checksum = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "smallvec 1.4.1", + "winapi", ] [[package]] -name = "idna" -version = "0.2.0" +name = "paste" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "ab4fb1930692d1b6a9cfabdde3d06ea0a7d186518e2f4d67660d8970e2fa647a" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "paste-impl", + "proc-macro-hack", ] [[package]] -name = "impl-codec" -version = "0.4.2" +name = "paste-impl" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +checksum = "a62486e111e571b1e93b710b61e8f493c0013be39629b714cb166bdb06aa5a8a" dependencies = [ - "parity-scale-codec", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "impl-serde" -version = "0.2.3" +name = "pbkdf2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" dependencies = [ - "serde", + "byteorder", + "crypto-mac", ] [[package]] -name = "impl-serde" -version = "0.3.0" +name = "pin-utils" +version = "0.1.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" -dependencies = [ - "serde", -] +checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" [[package]] -name = "impl-trait-for-tuples" -version = "0.1.3" +name = "ppv-lite86" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] +checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] -name = "indexmap" -version = "1.3.2" +name = "predicates" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" +checksum = "347a1b6f0b21e636bc9872fb60b83b8e185f6f5516298b8238699f7f9a531030" dependencies = [ - "autocfg 1.0.0", + "difference", + "float-cmp", + "normalize-line-endings", + "predicates-core", + "regex", ] [[package]] -name = "integer-sqrt" -version = "0.1.3" +name = "predicates-core" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b" +checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" [[package]] -name = "interleaved-ordered" -version = "0.1.1" +name = "predicates-tree" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "141340095b15ed7491bd3d4ced9d20cebfb826174b6bb03386381f62b01e3d77" +checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" +dependencies = [ + "predicates-core", + "treeline", +] [[package]] -name = "iovec" -version = "0.1.4" +name = "primitive-types" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +checksum = "d3dedac218327b6b55fff5ef05f63ce5127024e1a36342836da7e92cbfac4531" dependencies = [ - "libc", + "fixed-hash", + "impl-codec", + "impl-serde 0.3.0", + "uint", ] [[package]] -name = "ipnet" -version = "2.3.0" +name = "proc-macro-crate" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" +checksum = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" +dependencies = [ + "toml", +] [[package]] -name = "itertools" -version = "0.8.2" +name = "proc-macro-hack" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] +checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" [[package]] -name = "itoa" -version = "0.4.5" +name = "proc-macro-nested" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" [[package]] -name = "jobserver" -version = "0.1.21" +name = "proc-macro2" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" +checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" dependencies = [ - "libc", + "unicode-xid", ] [[package]] -name = "joystream-node" -version = "2.6.0" -dependencies = [ - "ctrlc", - "derive_more 0.14.1", - "exit-future", - "futures 0.1.29", - "hex 0.4.2", - "hex-literal 0.2.1", - "joystream-node-runtime", - "jsonrpc-core 13.2.0", - "libp2p", - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "rand 0.7.3", - "serde", - "serde_json", - "sr-io", - "sr-primitives", - "srml-im-online", - "structopt", - "substrate-authority-discovery", - "substrate-basic-authorship", - "substrate-cli", - "substrate-client", - "substrate-client-db", - "substrate-consensus-babe", - "substrate-consensus-babe-primitives", - "substrate-executor", - "substrate-finality-grandpa", - "substrate-finality-grandpa-primitives", - "substrate-inherents", - "substrate-network", - "substrate-offchain", - "substrate-primitives", - "substrate-rpc", - "substrate-service", - "substrate-telemetry", - "substrate-transaction-pool", - "tokio", - "vergen", -] - -[[package]] -name = "joystream-node-runtime" -version = "6.20.0" +name = "quote" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" dependencies = [ - "parity-scale-codec", - "safe-mix", - "serde", - "sr-io", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "sr-version", - "srml-authority-discovery", - "srml-authorship", - "srml-babe", - "srml-balances", - "srml-executive", - "srml-finality-tracker", - "srml-grandpa", - "srml-im-online", - "srml-indices", - "srml-offences", - "srml-randomness-collective-flip", - "srml-session", - "srml-staking", - "srml-staking-reward-curve", - "srml-sudo", - "srml-support", - "srml-system", - "srml-system-rpc-runtime-api", - "srml-timestamp", - "srml-transaction-payment", - "substrate-authority-discovery-primitives", - "substrate-client", - "substrate-common-module", - "substrate-consensus-babe-primitives", - "substrate-content-working-group-module", - "substrate-forum-module", - "substrate-governance-module", - "substrate-hiring-module", - "substrate-membership-module", - "substrate-memo-module", - "substrate-offchain-primitives", - "substrate-primitives", - "substrate-proposals-codex-module", - "substrate-proposals-discussion-module", - "substrate-proposals-engine-module", - "substrate-recurring-reward-module", - "substrate-service-discovery-module", - "substrate-session", - "substrate-stake-module", - "substrate-storage-module", - "substrate-token-mint-module", - "substrate-versioned-store", - "substrate-versioned-store-permissions-module", - "substrate-wasm-builder-runner", - "substrate-working-group-module", + "proc-macro2", ] [[package]] -name = "js-sys" -version = "0.3.37" +name = "radium" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055" -dependencies = [ - "wasm-bindgen", -] +checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" [[package]] -name = "jsonrpc-client-transports" -version = "14.0.5" +name = "rand" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a9ae166c4d1f702d297cd76d4b55758ace80272ffc6dbb139fdc1bf810de40b" +checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" dependencies = [ - "failure", - "futures 0.1.29", - "jsonrpc-core 14.0.5", - "jsonrpc-pubsub", - "log", - "serde", - "serde_json", - "url 1.7.2", + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "winapi", ] [[package]] -name = "jsonrpc-core" -version = "13.2.0" +name = "rand" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d767c183a7e58618a609499d359ce3820700b3ebb4823a18c343b4a2a41a0d" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "futures 0.1.29", - "log", - "serde", - "serde_derive", - "serde_json", + "autocfg 0.1.7", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg 0.1.2", + "rand_xorshift", + "winapi", ] [[package]] -name = "jsonrpc-core" -version = "14.0.5" +name = "rand" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe3b688648f1ef5d5072229e2d672ecb92cbff7d1c79bcf3fd5898f3f3df0970" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "futures 0.1.29", - "log", - "serde", - "serde_derive", - "serde_json", + "getrandom", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", + "rand_pcg 0.2.1", ] [[package]] -name = "jsonrpc-core-client" -version = "14.0.5" +name = "rand_chacha" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080dc110be17701097df238fad3c816d4a478a1899dfbcf8ec8957dd40ec7304" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "jsonrpc-client-transports", + "autocfg 0.1.7", + "rand_core 0.3.1", ] [[package]] -name = "jsonrpc-derive" -version = "14.0.5" +name = "rand_chacha" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] -name = "jsonrpc-http-server" -version = "14.0.6" +name = "rand_core" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816d63997ea45d3634608edbef83ddb35e661f7c0b27b5b72f237e321f0e9807" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" dependencies = [ - "hyper", - "jsonrpc-core 14.0.5", - "jsonrpc-server-utils", - "log", - "net2", - "parking_lot 0.10.0", - "unicase", + "rand_core 0.4.2", ] [[package]] -name = "jsonrpc-pubsub" -version = "14.0.6" +name = "rand_core" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b31c9b90731276fdd24d896f31bb10aecf2e5151733364ae81123186643d939" -dependencies = [ - "jsonrpc-core 14.0.5", - "log", - "parking_lot 0.10.0", - "serde", -] +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" [[package]] -name = "jsonrpc-server-utils" -version = "14.0.5" +name = "rand_core" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b7635e618a0edbbe0d2a2bbbc69874277c49383fcf6c3c0414491cfb517d22" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "bytes 0.4.12", - "globset", - "jsonrpc-core 14.0.5", - "lazy_static", - "log", - "tokio", - "tokio-codec", - "unicase", + "getrandom", ] [[package]] -name = "jsonrpc-ws-server" -version = "14.0.6" +name = "rand_hc" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94e5773b2ae66e0e02c80775ce6bbba6f15d5bb47c14ec36a36fcf94f8df851" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" dependencies = [ - "jsonrpc-core 14.0.5", - "jsonrpc-server-utils", - "log", - "parking_lot 0.10.0", - "slab", - "ws", + "rand_core 0.3.1", ] [[package]] -name = "keccak" -version = "0.1.0" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] [[package]] -name = "kernel32-sys" -version = "0.2.2" +name = "rand_isaac" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "rand_core 0.3.1", ] [[package]] -name = "kvdb" -version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f649ab2c665b7987b8475878fc4d2e1f81d" -dependencies = [ - "elastic-array", - "parity-bytes", -] - -[[package]] -name = "kvdb-memorydb" -version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f649ab2c665b7987b8475878fc4d2e1f81d" -dependencies = [ - "kvdb", - "parking_lot 0.6.4", -] - -[[package]] -name = "kvdb-rocksdb" +name = "rand_jitter" version = "0.1.4" -source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f649ab2c665b7987b8475878fc4d2e1f81d" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" dependencies = [ - "elastic-array", - "fs-swap", - "interleaved-ordered", - "kvdb", - "log", - "num_cpus", - "parking_lot 0.6.4", - "regex", - "rocksdb", + "libc", + "rand_core 0.4.2", + "winapi", ] [[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" - -[[package]] -name = "libc" -version = "0.2.68" +name = "rand_os" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi", +] [[package]] -name = "libloading" -version = "0.5.2" +name = "rand_pcg" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "cc", - "winapi 0.3.8", + "autocfg 0.1.7", + "rand_core 0.4.2", ] [[package]] -name = "libp2p" -version = "0.13.2" +name = "rand_pcg" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4674c6738fdd8b1cf7104dd046abcef78dc932fe25f8eb40f3a8e71341717d" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "lazy_static", - "libp2p-core", - "libp2p-core-derive", - "libp2p-deflate", - "libp2p-dns", - "libp2p-floodsub", - "libp2p-identify", - "libp2p-kad", - "libp2p-mdns", - "libp2p-mplex", - "libp2p-noise", - "libp2p-ping", - "libp2p-plaintext", - "libp2p-secio", - "libp2p-swarm", - "libp2p-tcp", - "libp2p-uds", - "libp2p-wasm-ext", - "libp2p-websocket", - "libp2p-yamux", - "parity-multiaddr 0.6.0", - "parity-multihash 0.2.3", - "parking_lot 0.9.0", - "smallvec 0.6.13", - "tokio-codec", - "tokio-executor", - "tokio-io", - "wasm-timer", + "rand_core 0.5.1", ] [[package]] -name = "libp2p-core" -version = "0.13.2" +name = "rand_xorshift" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01efc769c392d0d8863a7160d266f9b9f794968554f87490c8af4aa34ccaa94f" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" dependencies = [ - "asn1_der", - "bs58 0.3.0", - "bytes 0.4.12", - "ed25519-dalek 1.0.0-pre.3", - "failure", - "fnv", - "futures 0.1.29", - "lazy_static", - "libsecp256k1", - "log", - "multistream-select", - "parity-multiaddr 0.6.0", - "parity-multihash 0.2.3", - "parking_lot 0.9.0", - "protobuf", - "quick-error", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2", - "smallvec 0.6.13", - "tokio-executor", - "tokio-io", - "unsigned-varint 0.2.3", - "untrusted", - "void", - "wasm-timer", - "zeroize 1.1.0", + "rand_core 0.3.1", ] [[package]] -name = "libp2p-core-derive" -version = "0.13.0" +name = "rawpointer" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eeb2704ac14c60f31967e351ed928b848526a5fc6db4104520020665012826f" -dependencies = [ - "quote 0.6.13", - "syn 0.15.44", -] +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] -name = "libp2p-deflate" -version = "0.5.0" +name = "rdrand" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b0bf5d37692ac90e2bffa436bec26c0b0def6c0cab7ea85ff67a353d58aaa" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" dependencies = [ - "flate2", - "futures 0.1.29", - "libp2p-core", - "tokio-io", + "rand_core 0.3.1", ] [[package]] -name = "libp2p-dns" -version = "0.13.0" +name = "redox_syscall" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3175fb0fc9016c95c8517a297bbdb5fb6bfbd5665bacd2eb23495d1cbdeb033" -dependencies = [ - "futures 0.1.29", - "libp2p-core", - "log", - "tokio-dns-unofficial", -] +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" [[package]] -name = "libp2p-floodsub" -version = "0.13.1" +name = "ref-cast" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b360bbaad2560d6b8a905bd63528273d933fe54475a44def47f31e23108b3683" +checksum = "745c1787167ddae5569661d5ffb8b25ae5fedbf46717eaa92d652221cec72623" dependencies = [ - "bs58 0.3.0", - "bytes 0.4.12", - "cuckoofilter", - "fnv", - "futures 0.1.29", - "libp2p-core", - "libp2p-swarm", - "protobuf", - "rand 0.6.5", - "smallvec 0.6.13", - "tokio-io", + "ref-cast-impl", ] [[package]] -name = "libp2p-identify" -version = "0.13.2" +name = "ref-cast-impl" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c087bcd044a6f67a994573a92a109487a902a31555e4e63bcc4ae144c45594fe" +checksum = "7d21b475ab879ef0e315ad99067fa25778c3b0377f57f1b00207448dac1a3144" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "libp2p-core", - "libp2p-swarm", - "log", - "parity-multiaddr 0.6.0", - "protobuf", - "smallvec 0.6.13", - "tokio-codec", - "tokio-io", - "unsigned-varint 0.2.3", - "wasm-timer", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "libp2p-kad" -version = "0.13.2" +name = "regex" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcaf76a5b33b6c0203e85d450ae1855cae6860dc82eb0174ac1fee8bf68f7af5" +checksum = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3" dependencies = [ - "arrayvec 0.5.1", - "bytes 0.4.12", - "either", - "fnv", - "futures 0.1.29", - "libp2p-core", - "libp2p-swarm", - "log", - "parity-multiaddr 0.6.0", - "parity-multihash 0.2.3", - "protobuf", - "rand 0.7.3", - "sha2", - "smallvec 0.6.13", - "tokio-codec", - "tokio-io", - "uint", - "unsigned-varint 0.2.3", - "void", - "wasm-timer", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] -name = "libp2p-mdns" -version = "0.13.1" +name = "regex-syntax" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4c2e225a7dfc571c3ad77a0a5ecccc9537afe42d72289ac9f19768567cd677d" -dependencies = [ - "data-encoding", - "dns-parser", - "futures 0.1.29", - "libp2p-core", - "libp2p-swarm", - "log", - "net2", - "parity-multiaddr 0.6.0", - "rand 0.6.5", - "smallvec 0.6.13", - "tokio-io", - "tokio-reactor", - "tokio-udp", - "void", - "wasm-timer", -] +checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" [[package]] -name = "libp2p-mplex" -version = "0.13.0" +name = "rental" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2fe584816d993dc0f893396521a3c93191d78a6f28a892b150baa714a12c3e5" +checksum = "8545debe98b2b139fb04cad8618b530e9b07c152d99a5de83c860b877d67847f" dependencies = [ - "bytes 0.4.12", - "fnv", - "futures 0.1.29", - "libp2p-core", - "log", - "parking_lot 0.8.0", - "tokio-codec", - "tokio-io", - "unsigned-varint 0.2.3", + "rental-impl", + "stable_deref_trait", ] [[package]] -name = "libp2p-noise" -version = "0.11.1" +name = "rental-impl" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50494fcba7cdab08390d72b3cb9d2c72fcf178e6a0c1043855ab259d818b972" +checksum = "475e68978dc5b743f2f40d8e0a8fdc83f1c5e78cbf4b8fa5e74e73beebc340de" dependencies = [ - "bytes 0.4.12", - "curve25519-dalek 1.2.3", - "futures 0.1.29", - "lazy_static", - "libp2p-core", - "log", - "protobuf", - "rand 0.7.3", - "ring", - "snow", - "tokio-io", - "x25519-dalek", - "zeroize 1.1.0", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "libp2p-ping" -version = "0.13.1" +name = "rustc-demangle" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b975ad345eb9bb29ddc64670664a50a8ab3e66e28357abb0f83cfc0a9ca2d78" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "libp2p-core", - "libp2p-swarm", - "log", - "parity-multiaddr 0.6.0", - "rand 0.7.3", - "tokio-io", - "void", - "wasm-timer", -] +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" [[package]] -name = "libp2p-plaintext" -version = "0.13.1" +name = "rustc-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f07be6983e1c00e8f6a5676da54ed3a8cae7fb50f1fb6ea163414613ca656cc" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "libp2p-core", - "log", - "protobuf", - "rw-stream-sink", - "tokio-io", - "void", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "libp2p-secio" -version = "0.13.1" +name = "rustc-hex" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04aa6d67a5fb2b36241a1ba54037a13deb2594cf141e43b597ce379521d530a8" -dependencies = [ - "aes-ctr", - "bytes 0.4.12", - "ctr", - "futures 0.1.29", - "hmac", - "js-sys", - "lazy_static", - "libp2p-core", - "log", - "parity-send-wrapper", - "protobuf", - "rand 0.6.5", - "ring", - "rw-stream-sink", - "sha2", - "tokio-codec", - "tokio-io", - "twofish", - "untrusted", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] -name = "libp2p-swarm" -version = "0.3.0" +name = "rustc_version" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd55bc9f5f9eac2bb1ff24ca3c8a655810a566ac38c7a6ee1f30aced5a62905b" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "futures 0.1.29", - "libp2p-core", - "smallvec 0.6.13", - "tokio-io", - "void", - "wasm-timer", + "semver", ] [[package]] -name = "libp2p-tcp" -version = "0.13.0" +name = "schnorrkel" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234a7093d05651ab5630db926a4a42ca8978a65bab8c27c2ce2b66b200c76989" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "get_if_addrs", - "ipnet", - "libp2p-core", - "log", - "tokio-io", - "tokio-tcp", - "tokio-timer", + "arrayref", + "arrayvec 0.5.1", + "curve25519-dalek", + "getrandom", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2", + "subtle 2.2.2", + "zeroize", ] [[package]] -name = "libp2p-uds" -version = "0.13.0" +name = "scopeguard" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2fe0648967da3e56e4a55055c857c8c48326b66be0047d0e04c8ca60d34630" -dependencies = [ - "futures 0.1.29", - "libp2p-core", - "log", - "tokio-uds", -] +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] -name = "libp2p-wasm-ext" -version = "0.6.0" +name = "semver" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f7b8f2bd81fb356e81352d4513856bc21215ecf91502aa1f55b6449642a9acf" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "futures 0.1.29", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "tokio-io", - "wasm-bindgen", - "wasm-bindgen-futures", + "semver-parser", ] [[package]] -name = "libp2p-websocket" -version = "0.13.0" +name = "semver-parser" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d74d4fc229ad7e8d1a973178786bdcd5dadbdd7b9822c4477c8687df6f82f66" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "libp2p-core", - "log", - "rw-stream-sink", - "soketto", - "tokio-codec", - "tokio-io", - "tokio-rustls", - "url 2.1.1", - "webpki-roots 0.18.0", -] +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] -name = "libp2p-yamux" -version = "0.13.0" +name = "send_wrapper" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1913eb7dd6eb5515957b6f1770296f6921968db87bc9b985f0e974b6657e1003" -dependencies = [ - "futures 0.1.29", - "libp2p-core", - "log", - "tokio-io", - "yamux", -] +checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" [[package]] -name = "librocksdb-sys" -version = "5.18.3" +name = "serde" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19778314deaa7048f2ea7d07b8aa12e1c227acebe975a37eeab6d2f8c74e41b" +checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" dependencies = [ - "bindgen", - "cc", - "glob", - "libc", + "serde_derive", ] [[package]] -name = "libsecp256k1" -version = "0.3.5" +name = "serde_derive" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" dependencies = [ - "arrayref", - "crunchy", - "digest", - "hmac-drbg", - "rand 0.7.3", - "sha2", - "subtle 2.2.2", - "typenum", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "libz-sys" -version = "1.0.25" +name = "sha2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" +checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", ] [[package]] -name = "linked-hash-map" -version = "0.5.2" +name = "slab" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] -name = "linked_hash_set" -version = "0.1.3" +name = "smallvec" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" +checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" dependencies = [ - "linked-hash-map", + "maybe-uninit", ] [[package]] -name = "lock_api" -version = "0.1.5" +name = "smallvec" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -dependencies = [ - "owning_ref", - "scopeguard 0.3.3", -] +checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" [[package]] -name = "lock_api" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" +name = "sp-api" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "scopeguard 1.1.0", + "hash-db", + "parity-scale-codec", + "sp-api-proc-macro", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-version", ] [[package]] -name = "lock_api" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" +name = "sp-api-proc-macro" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "scopeguard 1.1.0", + "blake2-rfc", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "log" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +name = "sp-application-crypto" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "cfg-if", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-std", ] [[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +name = "sp-arithmetic" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "linked-hash-map", + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "serde", + "sp-debug-derive", + "sp-std", ] [[package]] -name = "malloc_size_of_derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37c5d4cd9473c5f4c9c111f033f15d4df9bd378fdf615944e360a4f55a05f0b" -dependencies = [ - "proc-macro2 1.0.10", - "syn 1.0.17", - "synstructure", -] - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" - -[[package]] -name = "memoffset" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" -dependencies = [ - "autocfg 1.0.0", -] - -[[package]] -name = "memory-db" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dabfe0a8c69954ae3bcfc5fc14260a85fb80e1bf9f86a155f668d10a67e93dd" -dependencies = [ - "ahash", - "hash-db", - "hashbrown 0.6.3", - "parity-util-mem", -] - -[[package]] -name = "memory_units" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" - -[[package]] -name = "merlin" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0942b357c1b4d0dc43ba724674ec89c3218e6ca2b3e8269e7cb53bcecd2f6e" -dependencies = [ - "byteorder 1.3.4", - "keccak", - "rand_core 0.4.2", - "zeroize 1.1.0", -] - -[[package]] -name = "miniz_oxide" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" -dependencies = [ - "adler32", -] - -[[package]] -name = "mio" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" -dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio", - "slab", -] - -[[package]] -name = "mio-uds" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" -dependencies = [ - "iovec", - "libc", - "mio", -] - -[[package]] -name = "miow" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "mockall" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95a7e7cfbce0e99ebbf5356a085d3b5e320a7ef300f77cd50a7148aa362e7c2" -dependencies = [ - "cfg-if", - "downcast", - "fragile", - "lazy_static", - "mockall_derive", - "predicates", - "predicates-tree", -] - -[[package]] -name = "mockall_derive" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5a615a1ad92048ad5d9633251edb7492b8abc057d7a679a9898476aef173935" -dependencies = [ - "cfg-if", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "multimap" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04b9f127583ed176e163fb9ec6f3e793b87e21deedd5734a69386a18a0151" - -[[package]] -name = "multistream-select" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc3ef54aab1b2e37e911bcb99e376dbe4c1e0710afcdb8428608e4f993b39c47" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "log", - "smallvec 0.6.13", - "tokio-io", - "unsigned-varint 0.2.3", -] - -[[package]] -name = "names" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" -dependencies = [ - "rand 0.3.23", -] - -[[package]] -name = "net2" -version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.8", -] - -[[package]] -name = "nix" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "void", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nohash-hasher" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721a2bf1c26159ebf17e0a980bc4ce61f4b2fec5ec3b42d42fddd7a84a9e538f" - -[[package]] -name = "nom" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -dependencies = [ - "memchr", - "version_check 0.1.5", -] - -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg 1.0.0", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" -dependencies = [ - "autocfg 1.0.0", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg 1.0.0", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" -dependencies = [ - "autocfg 1.0.0", -] - -[[package]] -name = "num_cpus" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" -dependencies = [ - "derivative", - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "ole32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "once_cell" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" -dependencies = [ - "parking_lot 0.7.1", -] - -[[package]] -name = "once_cell" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d584f08c2d717d5c23a6414fc2822b71c651560713e54fa7eace675f758a355e" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "owning_ref" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] - -[[package]] -name = "parity-bytes" -version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f649ab2c665b7987b8475878fc4d2e1f81d" - -[[package]] -name = "parity-multiaddr" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7" -dependencies = [ - "arrayref", - "bs58 0.2.5", - "byteorder 1.3.4", - "bytes 0.4.12", - "data-encoding", - "parity-multihash 0.1.3", - "percent-encoding 1.0.1", - "serde", - "unsigned-varint 0.2.3", - "url 1.7.2", -] - -[[package]] -name = "parity-multiaddr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82afcb7461eae5d122543d8be1c57d306ed89af2d6ff7f8b0f5a3cc8f7e511bc" -dependencies = [ - "arrayref", - "bs58 0.3.0", - "byteorder 1.3.4", - "bytes 0.4.12", - "data-encoding", - "parity-multihash 0.2.3", - "percent-encoding 2.1.0", - "serde", - "unsigned-varint 0.2.3", - "url 2.1.1", -] - -[[package]] -name = "parity-multihash" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3" -dependencies = [ - "blake2", - "bytes 0.4.12", - "rand 0.6.5", - "sha-1", - "sha2", - "sha3", - "unsigned-varint 0.2.3", -] - -[[package]] -name = "parity-multihash" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a1cd2ba02391b81367bec529fb209019d718684fdc8ad6a712c2b536e46f775" -dependencies = [ - "blake2", - "bytes 0.5.4", - "rand 0.7.3", - "sha-1", - "sha2", - "sha3", - "unsigned-varint 0.3.2", -] - -[[package]] -name = "parity-scale-codec" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329c8f7f4244ddb5c37c103641027a76c530e65e8e4b8240b29f81ea40508b17" -dependencies = [ - "arrayvec 0.5.1", - "bitvec", - "byte-slice-cast", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - -[[package]] -name = "parity-util-mem" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570093f39f786beea92dcc09e45d8aae7841516ac19a50431953ac82a0e8f85c" -dependencies = [ - "cfg-if", - "malloc_size_of_derive", - "winapi 0.3.8", -] - -[[package]] -name = "parity-wasm" -version = "0.40.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e39faaa292a687ea15120b1ac31899b13586446521df6c149e46f1584671e0f" - -[[package]] -name = "parking_lot" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" -dependencies = [ - "lock_api 0.1.5", - "parking_lot_core 0.3.1", -] - -[[package]] -name = "parking_lot" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -dependencies = [ - "lock_api 0.1.5", - "parking_lot_core 0.4.0", -] - -[[package]] -name = "parking_lot" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" -dependencies = [ - "lock_api 0.2.0", - "parking_lot_core 0.5.0", - "rustc_version", -] - -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.3", - "parking_lot_core 0.6.2", - "rustc_version", -] - -[[package]] -name = "parking_lot" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" -dependencies = [ - "lock_api 0.3.3", - "parking_lot_core 0.7.0", -] - -[[package]] -name = "parking_lot_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" -dependencies = [ - "libc", - "rand 0.5.6", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -dependencies = [ - "libc", - "rand 0.6.5", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "rand 0.6.5", - "redox_syscall", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "smallvec 1.2.0", - "winapi 0.3.8", -] - -[[package]] -name = "paste" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4fb1930692d1b6a9cfabdde3d06ea0a7d186518e2f4d67660d8970e2fa647a" -dependencies = [ - "paste-impl", - "proc-macro-hack 0.5.15", -] - -[[package]] -name = "paste-impl" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62486e111e571b1e93b710b61e8f493c0013be39629b714cb166bdb06aa5a8a" -dependencies = [ - "proc-macro-hack 0.5.15", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "pbkdf2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -dependencies = [ - "byteorder 1.3.4", - "crypto-mac", -] - -[[package]] -name = "pdqselect" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "petgraph" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" -dependencies = [ - "fixedbitset", -] - -[[package]] -name = "pin-utils" -version = "0.1.0-alpha.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" - -[[package]] -name = "pkg-config" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" - -[[package]] -name = "ppv-lite86" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" - -[[package]] -name = "predicates" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347a1b6f0b21e636bc9872fb60b83b8e185f6f5516298b8238699f7f9a531030" -dependencies = [ - "difference", - "float-cmp", - "normalize-line-endings", - "predicates-core", - "regex", -] - -[[package]] -name = "predicates-core" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" - -[[package]] -name = "predicates-tree" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -dependencies = [ - "predicates-core", - "treeline", -] - -[[package]] -name = "primitive-types" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-serde 0.3.0", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-error" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeccfe4d5d8ea175d5f0e4a2ad0637e0f4121d63bd99d356fb1f39ab2e7c6097" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "proc-macro-hack" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463bf29e7f11344e58c9e01f171470ab15c925c6822ad75028cc1c0e1d1eb63b" -dependencies = [ - "proc-macro-hack-impl", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" - -[[package]] -name = "proc-macro-hack-impl" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c47dcb1594802de8c02f3b899e2018c78291168a22c281be21ea0fb4796842" - -[[package]] -name = "proc-macro-nested" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" -dependencies = [ - "unicode-xid 0.2.0", -] - -[[package]] -name = "prost" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d14b1c185652833d24aaad41c5832b0be5616a590227c1fbff57c616754b23" -dependencies = [ - "byteorder 1.3.4", - "bytes 0.4.12", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb788126ea840817128183f8f603dce02cb7aea25c2a0b764359d8e20010702e" -dependencies = [ - "bytes 0.4.12", - "heck", - "itertools", - "log", - "multimap", - "petgraph", - "prost", - "prost-types", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e7dc378b94ac374644181a2247cebf59a6ec1c88b49ac77f3a94b86b79d0e11" -dependencies = [ - "failure", - "itertools", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "prost-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de482a366941c8d56d19b650fac09ca08508f2a696119ee7513ad590c8bac6f" -dependencies = [ - "bytes 0.4.12", - "prost", -] - -[[package]] -name = "protobuf" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40361836defdd5871ff7e84096c6f6444af7fc157f8ef1789f54f147687caa20" - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" -dependencies = [ - "proc-macro2 1.0.10", -] - -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi 0.3.8", -] - -[[package]] -name = "rand" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "winapi 0.3.8", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi 0.3.8", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.8", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.8", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rayon" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" -dependencies = [ - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" -dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "lazy_static", - "num_cpus", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "redox_syscall" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" - -[[package]] -name = "regex" -version = "1.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local 1.0.1", -] - -[[package]] -name = "regex-syntax" -version = "0.6.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" - -[[package]] -name = "remove_dir_all" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -dependencies = [ - "winapi 0.3.8", -] - -[[package]] -name = "ring" -version = "0.16.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" -dependencies = [ - "cc", - "lazy_static", - "libc", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.8", -] - -[[package]] -name = "rocksdb" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1651697fefd273bfb4fd69466cc2a9d20de557a0213b97233b22b5e95924b5e" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "rpassword" -version = "4.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" -dependencies = [ - "libc", - "winapi 0.3.8", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -dependencies = [ - "base64", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rw-stream-sink" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9cbe61c20455d3015b2bb7be39e1872310283b8e5a52f5b242b0ac7581fe78" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "tokio-io", -] - -[[package]] -name = "ryu" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" - -[[package]] -name = "safe-mix" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" -dependencies = [ - "rustc_version", -] - -[[package]] -name = "schnorrkel" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eacd8381b3c37840c9c9f40472af529e49975bdcbc24f83c31059fd6539023d3" -dependencies = [ - "curve25519-dalek 1.2.3", - "failure", - "merlin", - "rand 0.6.5", - "rand_core 0.4.2", - "rand_os", - "sha2", - "subtle 2.2.2", - "zeroize 0.9.3", -] - -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "send_wrapper" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" - -[[package]] -name = "serde" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "serde_json" -version = "1.0.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha-1" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -dependencies = [ - "block-buffer", - "digest", - "fake-simd", - "opaque-debug", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "sha2" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" -dependencies = [ - "block-buffer", - "digest", - "fake-simd", - "opaque-debug", -] - -[[package]] -name = "sha3" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" -dependencies = [ - "block-buffer", - "byte-tools", - "digest", - "keccak", - "opaque-debug", -] - -[[package]] -name = "shell32-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "slog" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" -dependencies = [ - "erased-serde", -] - -[[package]] -name = "slog-async" -version = "2.3.0" -source = "git+https://github.com/paritytech/slog-async#0329dc74feb3afe93d0cd2533a472b7ceab44aaf" -dependencies = [ - "crossbeam-channel", - "slog", - "take_mut", - "thread_local 0.3.6", -] - -[[package]] -name = "slog-json" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" -dependencies = [ - "chrono", - "erased-serde", - "serde", - "serde_json", - "slog", -] - -[[package]] -name = "slog-scope" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6" -dependencies = [ - "arc-swap", - "lazy_static", - "slog", -] - -[[package]] -name = "slog_derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eff3b513cf2e0d1a60e1aba152dc72bedc5b05585722bb3cebd7bcb1e31b98f" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -dependencies = [ - "maybe-uninit", -] - -[[package]] -name = "smallvec" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" - -[[package]] -name = "snow" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" -dependencies = [ - "arrayref", - "rand_core 0.5.1", - "ring", - "rustc_version", - "subtle 2.2.2", -] - -[[package]] -name = "soketto" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bceb1a3a15232d013d9a3b7cac9e5ce8e2313f348f01d4bc1097e5e53aa07095" -dependencies = [ - "base64", - "bytes 0.4.12", - "flate2", - "futures 0.1.29", - "http", - "httparse", - "log", - "rand 0.6.5", - "sha1", - "smallvec 0.6.13", - "tokio-codec", - "tokio-io", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "sr-api-macros" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "blake2-rfc", - "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "sr-arithmetic" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "serde", - "sr-std", - "substrate-debug-derive", -] - -[[package]] -name = "sr-io" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "hash-db", - "libsecp256k1", - "log", - "parity-scale-codec", - "rustc_version", - "sr-std", - "substrate-externalities", - "substrate-primitives", - "substrate-state-machine", - "substrate-trie", - "tiny-keccak", -] - -[[package]] -name = "sr-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "paste", - "rand 0.7.3", - "serde", - "sr-arithmetic", - "sr-io", - "sr-std", - "substrate-application-crypto", - "substrate-primitives", -] - -[[package]] -name = "sr-staking-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "sr-primitives", - "sr-std", -] - -[[package]] -name = "sr-std" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "rustc_version", -] - -[[package]] -name = "sr-version" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-serde 0.2.3", - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-std", -] - -[[package]] -name = "srml-authority-discovery" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-session", - "srml-support", - "srml-system", - "substrate-application-crypto", - "substrate-primitives", -] - -[[package]] -name = "srml-authorship" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "sr-io", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", - "substrate-inherents", - "substrate-primitives", -] - -[[package]] -name = "srml-babe" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "hex-literal 0.2.1", - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "srml-session", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-consensus-babe-primitives", - "substrate-inherents", -] - -[[package]] -name = "srml-balances" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "safe-mix", - "serde", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", - "substrate-keyring", -] - -[[package]] -name = "srml-executive" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", -] - -[[package]] -name = "srml-finality-tracker" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", - "substrate-inherents", -] - -[[package]] -name = "srml-grandpa" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "srml-finality-tracker", - "srml-session", - "srml-support", - "srml-system", - "substrate-finality-grandpa-primitives", - "substrate-primitives", -] - -[[package]] -name = "srml-im-online" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "srml-authorship", - "srml-session", - "srml-support", - "srml-system", - "substrate-application-crypto", - "substrate-primitives", -] - -[[package]] -name = "srml-indices" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "safe-mix", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", - "substrate-keyring", - "substrate-primitives", -] - -[[package]] -name = "srml-metadata" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-std", - "substrate-primitives", -] - -[[package]] -name = "srml-offences" -version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", -] - -[[package]] -name = "srml-randomness-collective-flip" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "safe-mix", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", -] - -[[package]] -name = "srml-session" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "safe-mix", - "serde", - "sr-io", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-trie", -] - -[[package]] -name = "srml-staking" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "safe-mix", - "serde", - "sr-io", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "srml-authorship", - "srml-session", - "srml-support", - "srml-system", - "substrate-keyring", - "substrate-phragmen", -] - -[[package]] -name = "srml-staking-reward-curve" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "srml-sudo" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", -] - -[[package]] -name = "srml-support" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "bitmask", - "impl-trait-for-tuples", - "log", - "once_cell 0.2.4", - "parity-scale-codec", - "paste", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-metadata", - "srml-support-procedural", - "substrate-inherents", - "substrate-primitives", -] - -[[package]] -name = "srml-support-procedural" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "sr-api-macros", - "srml-support-procedural-tools", - "syn 1.0.17", -] - -[[package]] -name = "srml-support-procedural-tools" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "srml-support-procedural-tools-derive", - "syn 1.0.17", -] - -[[package]] -name = "srml-support-procedural-tools-derive" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "srml-system" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "safe-mix", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "sr-version", - "srml-support", - "substrate-primitives", -] - -[[package]] -name = "srml-system-rpc-runtime-api" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "substrate-client", -] - -[[package]] -name = "srml-timestamp" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", - "substrate-inherents", -] - -[[package]] -name = "srml-transaction-payment" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", - "srml-transaction-payment-rpc-runtime-api", -] - -[[package]] -name = "srml-transaction-payment-rpc-runtime-api" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-std", - "substrate-client", -] - -[[package]] -name = "stable_deref_trait" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stream-cipher" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" -dependencies = [ - "generic-array", -] - -[[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -dependencies = [ - "bytes 0.4.12", -] - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "structopt" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b3a3e93f5ad553c38b3301c8a0a0cec829a36783f6a0c467fc4bf553a5f5bf" -dependencies = [ - "clap", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea692d40005b3ceba90a9fe7a78fa8d4b82b0ce627eebbffc329aab850f3410e" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "strum" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d1c33039533f051704951680f1adfd468fd37ac46816ded0d9ee068e60f05f" - -[[package]] -name = "strum_macros" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47cd23f5c7dee395a00fa20135e2ec0fffcdfa151c56182966d7a3261343432e" -dependencies = [ - "heck", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "substrate-application-crypto" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-std", - "substrate-primitives", -] - -[[package]] -name = "substrate-authority-discovery" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "bytes 0.4.12", - "derive_more 0.15.0", - "futures-preview", - "futures-timer", - "libp2p", - "log", - "parity-scale-codec", - "prost", - "prost-build", - "serde_json", - "sr-primitives", - "substrate-authority-discovery-primitives", - "substrate-client", - "substrate-network", - "substrate-primitives", -] - -[[package]] -name = "substrate-authority-discovery-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "sr-primitives", - "sr-std", - "substrate-client", -] - -[[package]] -name = "substrate-basic-authorship" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "futures-preview", - "log", - "parity-scale-codec", - "sr-primitives", - "substrate-client", - "substrate-consensus-common", - "substrate-inherents", - "substrate-primitives", - "substrate-telemetry", - "substrate-transaction-pool", -] - -[[package]] -name = "substrate-bip39" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5" -dependencies = [ - "hmac", - "pbkdf2", - "schnorrkel", - "sha2", -] - -[[package]] -name = "substrate-chain-spec" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-trait-for-tuples", - "serde", - "serde_json", - "sr-primitives", - "substrate-chain-spec-derive", - "substrate-network", - "substrate-primitives", - "substrate-telemetry", -] - -[[package]] -name = "substrate-chain-spec-derive" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "substrate-cli" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "ansi_term 0.12.1", - "app_dirs", - "atty", - "clap", - "derive_more 0.15.0", - "env_logger 0.7.1", - "exit-future", - "fdlimit", - "futures 0.1.29", - "futures-preview", - "lazy_static", - "log", - "names", - "regex", - "rpassword", - "serde_json", - "sr-primitives", - "structopt", - "substrate-client", - "substrate-header-metadata", - "substrate-keyring", - "substrate-network", - "substrate-panic-handler", - "substrate-primitives", - "substrate-service", - "substrate-state-machine", - "substrate-telemetry", - "time", - "tokio", -] - -[[package]] -name = "substrate-client" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "derive_more 0.15.0", - "fnv", - "futures 0.1.29", - "futures-preview", - "hash-db", - "hex-literal 0.2.1", - "kvdb", - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "sr-api-macros", - "sr-primitives", - "sr-std", - "sr-version", - "substrate-consensus-common", - "substrate-executor", - "substrate-header-metadata", - "substrate-inherents", - "substrate-keyring", - "substrate-primitives", - "substrate-state-machine", - "substrate-telemetry", - "substrate-trie", -] - -[[package]] -name = "substrate-client-db" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "hash-db", - "kvdb", - "kvdb-memorydb", - "kvdb-rocksdb", - "linked-hash-map", - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "sr-primitives", - "substrate-client", - "substrate-consensus-common", - "substrate-executor", - "substrate-header-metadata", - "substrate-primitives", - "substrate-state-db", - "substrate-state-machine", - "substrate-trie", -] - -[[package]] -name = "substrate-common-module" -version = "1.2.0" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-primitives", - "srml-support", - "srml-system", - "srml-timestamp", -] - -[[package]] -name = "substrate-consensus-babe" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "derive_more 0.15.0", - "fork-tree", - "futures 0.1.29", - "futures-preview", - "futures-timer", - "log", - "merlin", - "num-bigint", - "num-rational", - "num-traits", - "parity-scale-codec", - "parking_lot 0.9.0", - "pdqselect", - "rand 0.7.3", - "schnorrkel", - "sr-io", - "sr-primitives", - "sr-version", - "srml-babe", - "srml-support", - "substrate-application-crypto", - "substrate-client", - "substrate-consensus-babe-primitives", - "substrate-consensus-common", - "substrate-consensus-slots", - "substrate-consensus-uncles", - "substrate-header-metadata", - "substrate-inherents", - "substrate-keystore", - "substrate-primitives", - "substrate-telemetry", -] - -[[package]] -name = "substrate-consensus-babe-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "schnorrkel", - "sr-primitives", - "sr-std", - "substrate-application-crypto", - "substrate-client", - "substrate-consensus-slots", -] - -[[package]] -name = "substrate-consensus-common" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "derive_more 0.15.0", - "futures-preview", - "futures-timer", - "libp2p", - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "sr-primitives", - "sr-std", - "sr-version", - "substrate-inherents", - "substrate-primitives", -] - -[[package]] -name = "substrate-consensus-slots" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "futures-preview", - "futures-timer", - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "sr-primitives", - "substrate-client", - "substrate-consensus-common", - "substrate-inherents", - "substrate-primitives", - "substrate-telemetry", -] - -[[package]] -name = "substrate-consensus-uncles" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "log", - "sr-primitives", - "srml-authorship", - "substrate-client", - "substrate-consensus-common", - "substrate-inherents", - "substrate-primitives", -] - -[[package]] -name = "substrate-content-working-group-module" -version = "1.1.0" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-forum-module", - "substrate-hiring-module", - "substrate-membership-module", - "substrate-primitives", - "substrate-recurring-reward-module", - "substrate-stake-module", - "substrate-token-mint-module", - "substrate-versioned-store", - "substrate-versioned-store-permissions-module", -] - -[[package]] -name = "substrate-debug-derive" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", -] - -[[package]] -name = "substrate-executor" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "derive_more 0.15.0", - "lazy_static", - "libsecp256k1", - "log", - "parity-scale-codec", - "parity-wasm", - "parking_lot 0.9.0", - "sr-io", - "sr-version", - "substrate-externalities", - "substrate-panic-handler", - "substrate-primitives", - "substrate-serializer", - "substrate-trie", - "substrate-wasm-interface", - "tiny-keccak", - "wasmi", -] - -[[package]] -name = "substrate-externalities" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "environmental", - "primitive-types", - "sr-std", - "substrate-primitives-storage", -] - -[[package]] -name = "substrate-finality-grandpa" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "finality-grandpa", - "fork-tree", - "futures 0.1.29", - "futures-preview", - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "rand 0.7.3", - "serde_json", - "sr-primitives", - "srml-finality-tracker", - "substrate-client", - "substrate-consensus-common", - "substrate-finality-grandpa-primitives", - "substrate-header-metadata", - "substrate-inherents", - "substrate-keystore", - "substrate-network", - "substrate-primitives", - "substrate-telemetry", - "tokio-executor", - "tokio-timer", -] - -[[package]] -name = "substrate-finality-grandpa-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-std", - "substrate-application-crypto", - "substrate-client", -] - -[[package]] -name = "substrate-forum-module" -version = "1.2.2" -dependencies = [ - "hex-literal 0.1.4", - "parity-scale-codec", - "quote 0.6.13", - "serde", - "serde_derive", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-support-procedural", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-primitives", -] - -[[package]] -name = "substrate-governance-module" -version = "1.0.0" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-membership-module", - "substrate-primitives", - "substrate-recurring-reward-module", - "substrate-token-mint-module", -] - -[[package]] -name = "substrate-header-metadata" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "lru-cache", - "parking_lot 0.9.0", - "sr-primitives", -] - -[[package]] -name = "substrate-hiring-module" -version = "1.0.2" -dependencies = [ - "hex-literal 0.1.4", - "mockall", - "parity-scale-codec", - "quote 0.6.13", - "serde", - "serde_derive", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-support-procedural", - "srml-system", - "srml-timestamp", - "substrate-primitives", - "substrate-stake-module", -] - -[[package]] -name = "substrate-inherents" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "parity-scale-codec", - "parking_lot 0.9.0", - "sr-primitives", - "sr-std", -] - -[[package]] -name = "substrate-keyring" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "lazy_static", - "sr-primitives", - "strum", - "strum_macros", - "substrate-primitives", -] - -[[package]] -name = "substrate-keystore" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "derive_more 0.15.0", - "hex 0.3.2", - "parking_lot 0.9.0", - "rand 0.7.3", - "serde_json", - "substrate-application-crypto", - "substrate-primitives", - "subtle 2.2.2", -] - -[[package]] -name = "substrate-membership-module" -version = "1.1.0" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-primitives", -] - -[[package]] -name = "substrate-memo-module" -version = "1.0.0" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-primitives", - "sr-std", - "srml-support", - "srml-system", - "substrate-common-module", -] - -[[package]] -name = "substrate-network" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "bitflags", - "bytes 0.4.12", - "derive_more 0.15.0", - "either", - "erased-serde", - "fnv", - "fork-tree", - "futures 0.1.29", - "futures-preview", - "futures-timer", - "libp2p", - "linked-hash-map", - "linked_hash_set", - "log", - "lru-cache", - "parity-scale-codec", - "parking_lot 0.9.0", - "rand 0.7.3", - "rustc-hex", - "serde", - "serde_json", - "slog", - "slog_derive", - "smallvec 0.6.13", - "sr-primitives", - "substrate-client", - "substrate-consensus-babe-primitives", - "substrate-consensus-common", - "substrate-header-metadata", - "substrate-peerset", - "substrate-primitives", - "tokio-io", - "unsigned-varint 0.2.3", - "void", - "zeroize 0.10.1", -] - -[[package]] -name = "substrate-offchain" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "bytes 0.4.12", - "fnv", - "futures 0.1.29", - "futures-preview", - "futures-timer", - "hyper", - "hyper-rustls", - "log", - "num_cpus", - "parity-scale-codec", - "parking_lot 0.9.0", - "rand 0.7.3", - "sr-primitives", - "substrate-client", - "substrate-keystore", - "substrate-network", - "substrate-offchain-primitives", - "substrate-primitives", - "substrate-transaction-pool", - "threadpool", -] - -[[package]] -name = "substrate-offchain-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "sr-primitives", - "substrate-client", -] - -[[package]] -name = "substrate-panic-handler" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "backtrace", - "log", -] - -[[package]] -name = "substrate-peerset" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "futures-preview", - "libp2p", - "linked-hash-map", - "log", - "lru-cache", - "serde_json", -] - -[[package]] -name = "substrate-phragmen" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "serde", - "sr-primitives", - "sr-std", -] - -[[package]] -name = "substrate-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-core" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ "base58", "blake2-rfc", - "byteorder 1.3.4", - "ed25519-dalek 0.9.1", + "byteorder", + "derive_more", + "ed25519-dalek", + "futures", "hash-db", "hash256-std-hasher", - "hex 0.4.2", - "impl-serde 0.2.3", + "hex", + "impl-serde 0.3.0", "lazy_static", "libsecp256k1", "log", + "merlin", "num-traits", "parity-scale-codec", - "parking_lot 0.9.0", + "parity-util-mem", + "parking_lot 0.10.0", "primitive-types", "rand 0.7.3", "regex", - "rustc-hex", "schnorrkel", "serde", "sha2", - "sr-std", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "substrate-bip39", - "substrate-debug-derive", - "substrate-externalities", - "substrate-primitives-storage", "tiny-bip39", "tiny-keccak", "twox-hash", - "wasmi", - "zeroize 0.10.1", -] - -[[package]] -name = "substrate-primitives-storage" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "impl-serde 0.2.3", - "serde", - "sr-std", - "substrate-debug-derive", + "wasmi", + "zeroize", ] [[package]] -name = "substrate-proposals-codex-module" -version = "2.1.0" -dependencies = [ - "num_enum", - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-staking-primitives", - "sr-std", - "srml-balances", - "srml-staking", - "srml-staking-reward-curve", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-content-working-group-module", - "substrate-governance-module", - "substrate-hiring-module", - "substrate-membership-module", - "substrate-primitives", - "substrate-proposals-discussion-module", - "substrate-proposals-engine-module", - "substrate-recurring-reward-module", - "substrate-stake-module", - "substrate-token-mint-module", - "substrate-versioned-store", - "substrate-versioned-store-permissions-module", - "substrate-working-group-module", -] - -[[package]] -name = "substrate-proposals-discussion-module" -version = "2.0.0" +name = "sp-debug-derive" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "num_enum", - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-membership-module", - "substrate-primitives", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "substrate-proposals-engine-module" -version = "2.0.0" +name = "sp-externalities" +version = "0.8.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "mockall", - "num_enum", + "environmental", "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-membership-module", - "substrate-primitives", - "substrate-stake-module", + "sp-std", + "sp-storage", ] [[package]] -name = "substrate-recurring-reward-module" -version = "1.0.1" +name = "sp-inherents" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "hex-literal 0.1.4", + "derive_more", "parity-scale-codec", - "quote 0.6.13", - "serde", - "serde_derive", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-support-procedural", - "srml-system", - "srml-timestamp", - "substrate-primitives", - "substrate-token-mint-module", + "parking_lot 0.10.0", + "sp-core", + "sp-std", ] [[package]] -name = "substrate-rpc" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-io" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "futures-preview", + "futures", "hash-db", - "jsonrpc-core 14.0.5", - "jsonrpc-pubsub", - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "serde_json", - "sr-primitives", - "sr-version", - "substrate-client", - "substrate-executor", - "substrate-keystore", - "substrate-primitives", - "substrate-rpc-api", - "substrate-rpc-primitives", - "substrate-session", - "substrate-state-machine", - "substrate-transaction-pool", -] - -[[package]] -name = "substrate-rpc-api" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "derive_more 0.15.0", - "futures-preview", - "jsonrpc-core 14.0.5", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-pubsub", + "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.9.0", - "serde", - "serde_json", - "sr-version", - "substrate-primitives", - "substrate-rpc-primitives", - "substrate-transaction-graph", -] - -[[package]] -name = "substrate-rpc-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "serde", - "substrate-primitives", + "parking_lot 0.10.0", + "sp-core", + "sp-externalities", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-wasm-interface", ] [[package]] -name = "substrate-rpc-servers" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-panic-handler" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "jsonrpc-core 14.0.5", - "jsonrpc-http-server", - "jsonrpc-pubsub", - "jsonrpc-ws-server", + "backtrace", "log", - "serde", - "serde_json", - "sr-primitives", -] - -[[package]] -name = "substrate-serializer" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "serde", - "serde_json", ] [[package]] -name = "substrate-service" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-runtime" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "derive_more 0.15.0", - "exit-future", - "futures 0.1.29", - "futures-preview", - "lazy_static", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", "log", - "parity-multiaddr 0.5.0", - "parity-scale-codec", - "parking_lot 0.9.0", - "serde", - "serde_json", - "slog", - "sr-io", - "sr-primitives", - "substrate-application-crypto", - "substrate-chain-spec", - "substrate-client", - "substrate-client-db", - "substrate-consensus-common", - "substrate-executor", - "substrate-keystore", - "substrate-network", - "substrate-offchain", - "substrate-primitives", - "substrate-rpc", - "substrate-rpc-servers", - "substrate-session", - "substrate-telemetry", - "substrate-transaction-pool", - "sysinfo", - "target_info", - "tokio-executor", - "tokio-timer", -] - -[[package]] -name = "substrate-service-discovery-module" -version = "2.0.0" -dependencies = [ "parity-scale-codec", + "parity-util-mem", + "paste", + "rand 0.7.3", "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-hiring-module", - "substrate-membership-module", - "substrate-primitives", - "substrate-recurring-reward-module", - "substrate-stake-module", - "substrate-token-mint-module", - "substrate-working-group-module", -] - -[[package]] -name = "substrate-session" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "sr-primitives", - "sr-std", - "substrate-client", - "substrate-primitives", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-std", ] [[package]] -name = "substrate-stake-module" -version = "2.0.0" +name = "sp-runtime-interface" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "hex-literal 0.1.4", "parity-scale-codec", - "quote 0.6.13", - "serde", - "serde_derive", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-support-procedural", - "srml-system", - "srml-timestamp", - "substrate-primitives", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", ] [[package]] -name = "substrate-state-db" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-runtime-interface-proc-macro" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "substrate-primitives", + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "substrate-state-machine" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-state-machine" +version = "0.8.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ "hash-db", + "itertools", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.9.0", + "parking_lot 0.10.0", "rand 0.7.3", - "substrate-externalities", - "substrate-panic-handler", - "substrate-primitives", - "substrate-trie", + "smallvec 1.4.1", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-trie", "trie-db", "trie-root", ] [[package]] -name = "substrate-storage-module" -version = "2.0.0" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-hiring-module", - "substrate-membership-module", - "substrate-primitives", - "substrate-recurring-reward-module", - "substrate-stake-module", - "substrate-token-mint-module", - "substrate-working-group-module", -] - -[[package]] -name = "substrate-telemetry" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "futures-preview", - "futures-timer", - "libp2p", - "log", - "parking_lot 0.9.0", - "rand 0.7.3", - "serde", - "slog", - "slog-async", - "slog-json", - "slog-scope", - "tokio-io", - "void", -] +name = "sp-std" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" [[package]] -name = "substrate-token-mint-module" -version = "1.0.1" +name = "sp-storage" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "hex-literal 0.1.4", - "parity-scale-codec", - "quote 0.6.13", + "impl-serde 0.2.3", + "ref-cast", "serde", - "serde_derive", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-support-procedural", - "srml-system", - "srml-timestamp", - "substrate-primitives", + "sp-debug-derive", + "sp-std", ] [[package]] -name = "substrate-transaction-graph" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-timestamp" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "derive_more 0.15.0", - "futures-preview", - "log", - "parking_lot 0.9.0", - "serde", - "sr-primitives", - "substrate-primitives", + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", + "wasm-timer", ] [[package]] -name = "substrate-transaction-pool" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-tracing" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "derive_more 0.15.0", - "futures 0.3.4", "log", - "parity-scale-codec", - "parking_lot 0.9.0", - "sr-primitives", - "substrate-client", - "substrate-primitives", - "substrate-transaction-graph", + "rental", + "tracing", ] [[package]] -name = "substrate-trie" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" +name = "sp-trie" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", - "sr-std", - "substrate-primitives", + "sp-core", + "sp-std", "trie-db", "trie-root", ] [[package]] -name = "substrate-versioned-store" -version = "1.0.1" +name = "sp-version" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "hex-literal 0.1.4", + "impl-serde 0.2.3", "parity-scale-codec", - "quote 0.6.13", "serde", - "serde_derive", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-support-procedural", - "srml-system", - "srml-timestamp", - "substrate-primitives", + "sp-runtime", + "sp-std", ] [[package]] -name = "substrate-versioned-store-permissions-module" -version = "1.0.1" +name = "sp-wasm-interface" +version = "2.0.0-rc4" +source = "git+https://github.com/paritytech/substrate.git?rev=00768a1f21a579c478fe5d4f51e1fa71f7db9fd4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4" dependencies = [ - "hex-literal 0.1.4", + "impl-trait-for-tuples", "parity-scale-codec", - "quote 0.6.13", - "serde", - "serde_derive", - "sr-io", - "sr-primitives", - "sr-std", - "srml-support", - "srml-support-procedural", - "srml-system", - "srml-timestamp", - "substrate-primitives", - "substrate-versioned-store", -] - -[[package]] -name = "substrate-wasm-builder-runner" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30c70de7e7d5fd404fe26db1e7a4d6b553e2760b1ac490f249c04a960c483b8" - -[[package]] -name = "substrate-wasm-interface" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=c37bb08535c49a12320af7facfd555ce05cce2e8#c37bb08535c49a12320af7facfd555ce05cce2e8" -dependencies = [ + "sp-std", "wasmi", ] [[package]] -name = "substrate-working-group-module" -version = "1.1.0" -dependencies = [ - "parity-scale-codec", - "serde", - "sr-io", - "sr-primitives", - "sr-std", - "srml-balances", - "srml-support", - "srml-system", - "srml-timestamp", - "substrate-common-module", - "substrate-hiring-module", - "substrate-membership-module", - "substrate-primitives", - "substrate-recurring-reward-module", - "substrate-stake-module", - "substrate-token-mint-module", -] - -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - -[[package]] -name = "subtle" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - -[[package]] -name = "syn" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "unicode-xid 0.2.0", -] - -[[package]] -name = "synstructure" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" -dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", - "unicode-xid 0.2.0", -] - -[[package]] -name = "sysinfo" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" -dependencies = [ - "cfg-if", - "doc-comment", - "libc", - "rayon", - "winapi 0.3.8", -] - -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - -[[package]] -name = "target_info" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" - -[[package]] -name = "tempfile" -version = "3.1.0" +name = "stable_deref_trait" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -dependencies = [ - "cfg-if", - "libc", - "rand 0.7.3", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.8", -] +checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" [[package]] -name = "termcolor" +name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "thread_local" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "thread_local" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "threadpool" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -dependencies = [ - "libc", - "redox_syscall", - "winapi 0.3.8", -] - -[[package]] -name = "tiny-bip39" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" -dependencies = [ - "failure", - "hashbrown 0.1.8", - "hmac", - "once_cell 0.1.8", - "pbkdf2", - "rand 0.6.5", - "sha2", -] - -[[package]] -name = "tiny-keccak" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "mio", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -dependencies = [ - "bytes 0.4.12", - "either", - "futures 0.1.29", -] - -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "tokio-io", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures 0.1.29", - "tokio-executor", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "tokio-dns-unofficial" -version = "0.4.0" +name = "statrs" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c65483db54eb91b4ef3a9389a3364558590faf30ce473141707c0e16fda975" +checksum = "10102ac8d55e35db2b3fafc26f81ba8647da2e15879ab686a67e6d19af2685e8" dependencies = [ - "futures 0.1.29", - "futures-cpupool", - "lazy_static", - "tokio", + "rand 0.5.6", ] [[package]] -name = "tokio-executor" -version = "0.1.10" +name = "substrate-bip39" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +checksum = "c004e8166d6e0aa3a9d5fa673e5b7098ff25f930de1013a21341988151e681bb" dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.29", + "hmac", + "pbkdf2", + "schnorrkel", + "sha2", ] [[package]] -name = "tokio-fs" -version = "0.1.7" +name = "subtle" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures 0.1.29", - "tokio-io", - "tokio-threadpool", -] +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] -name = "tokio-io" -version = "0.1.13" +name = "subtle" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "log", -] +checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" [[package]] -name = "tokio-reactor" -version = "0.1.12" +name = "syn" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +checksum = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03" dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.29", - "lazy_static", - "log", - "mio", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] -name = "tokio-rustls" -version = "0.10.3" +name = "synstructure" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7cf08f990090abd6c6a73cab46fed62f85e8aef8b99e4b918a9f4a637f0676" +checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "iovec", - "rustls", - "tokio-io", - "webpki", + "proc-macro2", + "quote", + "syn", + "unicode-xid", ] [[package]] -name = "tokio-sync" -version = "0.1.8" +name = "thread_local" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "fnv", - "futures 0.1.29", + "lazy_static", ] [[package]] -name = "tokio-tcp" -version = "0.1.4" +name = "tiny-bip39" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "iovec", - "mio", - "tokio-io", - "tokio-reactor", + "failure", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2", + "unicode-normalization", ] [[package]] -name = "tokio-threadpool" -version = "0.1.18" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures 0.1.29", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", + "crunchy", ] [[package]] -name = "tokio-timer" -version = "0.2.13" +name = "toml" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.29", - "slab", - "tokio-executor", + "serde", ] [[package]] -name = "tokio-udp" -version = "0.1.6" +name = "tracing" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" +checksum = "c2e2a2de6b0d5cbb13fc21193a2296888eaab62b6044479aafb3c54c01c29fcd" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "log", - "mio", - "tokio-codec", - "tokio-io", - "tokio-reactor", + "cfg-if", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "tokio-uds" -version = "0.2.6" +name = "tracing-attributes" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798" +checksum = "f0693bf8d6f2bf22c690fc61a9d21ac69efdbb894a17ed596b9af0f01e64b84b" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "iovec", - "libc", - "log", - "mio", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "toml" -version = "0.5.6" +name = "tracing-core" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +checksum = "94ae75f0d28ae10786f3b1895c55fe72e79928fd5ccdebb5438c75e93fec178f" dependencies = [ - "serde", + "lazy_static", ] [[package]] @@ -5989,43 +2208,26 @@ checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" [[package]] name = "trie-db" -version = "0.15.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b62d27e8aa1c07414549ac872480ac82380bab39e730242ab08d82d7cc098a" +checksum = "cb230c24c741993b04cfccbabb45acff6f6480c5f00d3ed8794ea43db3a9d727" dependencies = [ - "elastic-array", "hash-db", - "hashbrown 0.6.3", + "hashbrown", "log", - "rand 0.6.5", + "rustc-hex", + "smallvec 1.4.1", ] [[package]] name = "trie-root" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b779f7c1c8fe9276365d9d5be5c4b5adeacf545117bb3f64c974305789c5c0b" +checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" dependencies = [ "hash-db", ] -[[package]] -name = "try-lock" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" - -[[package]] -name = "twofish" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" -dependencies = [ - "block-cipher-trait", - "byteorder 1.3.4", - "opaque-debug", -] - [[package]] name = "twox-hash" version = "1.5.0" @@ -6043,162 +2245,31 @@ checksum = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" [[package]] name = "uint" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75a4cdd7b87b28840dba13c483b9a88ee6bbf16ba5c951ee1ecfcf723078e0d" +checksum = "173cd16430c206dc1a430af8a89a0e9c076cf15cb42b4aedb10e8cc8fee73681" dependencies = [ - "byteorder 1.3.4", + "byteorder", "crunchy", "rustc-hex", "static_assertions", ] -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check 0.9.1", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - [[package]] name = "unicode-normalization" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" dependencies = [ - "smallvec 1.2.0", + "smallvec 1.4.1", ] -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" - -[[package]] -name = "unicode-width" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -[[package]] -name = "unsigned-varint" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f0023a96687fe169081e8adce3f65e3874426b7886e9234d490af2dc077959" -dependencies = [ - "bytes 0.4.12", - "tokio-codec", -] - -[[package]] -name = "unsigned-varint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38e01ad4b98f042e166c1bf9a13f9873a99d79eaa171ce7ca81e6dd0f895d8a" - -[[package]] -name = "untrusted" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" - -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - -[[package]] -name = "url" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -dependencies = [ - "idna 0.2.0", - "matches", - "percent-encoding 2.1.0", -] - -[[package]] -name = "vcpkg" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" - -[[package]] -name = "vec_map" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" - -[[package]] -name = "vergen" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce50d8996df1f85af15f2cd8d33daae6e479575123ef4314a51a70a230739cb" -dependencies = [ - "bitflags", - "chrono", -] - -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - -[[package]] -name = "version_check" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "want" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -dependencies = [ - "futures 0.1.29", - "log", - "try-lock", -] - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -6224,20 +2295,19 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.3.27" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c" +checksum = "7add542ea1ac7fdaa9dc25e031a6af33b7d63376292bd24140c637d00d1c312a" dependencies = [ "cfg-if", - "futures 0.1.29", "js-sys", "wasm-bindgen", "web-sys", @@ -6249,7 +2319,7 @@ version = "0.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4" dependencies = [ - "quote 1.0.3", + "quote", "wasm-bindgen-macro-support", ] @@ -6259,9 +2329,9 @@ version = "0.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6274,23 +2344,25 @@ checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639" [[package]] name = "wasm-timer" -version = "0.1.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa3e01d234bb71760e685cfafa5e2c96f8ad877c161a721646356651069e26ac" +checksum = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54" dependencies = [ - "futures 0.1.29", + "futures", "js-sys", + "parking_lot 0.9.0", + "pin-utils", "send_wrapper", - "tokio-timer", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] name = "wasmi" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31d26deb2d9a37e6cfed420edce3ed604eab49735ba89035e13c98f9a528313" +checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" dependencies = [ "libc", "memory_units", @@ -6302,9 +2374,9 @@ dependencies = [ [[package]] name = "wasmi-validation" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bc0356e3df56e639fc7f7d8a99741915531e27ed735d911ed83d7e1339c8188" +checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" dependencies = [ "parity-wasm", ] @@ -6319,50 +2391,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a262ae37dd9d60f60dd473d1158f9fbebf110ba7b6a5051c8160460f6043718b" -dependencies = [ - "webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" -dependencies = [ - "webpki", -] - -[[package]] -name = "which" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" -dependencies = [ - "failure", - "libc", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.8" @@ -6373,107 +2401,18 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa515c5163a99cc82bab70fd3bfdd36d827be85de63737b40fcef2ce084a436e" -dependencies = [ - "winapi 0.3.8", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "ws" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94" -dependencies = [ - "byteorder 1.3.4", - "bytes 0.4.12", - "httparse", - "log", - "mio", - "mio-extras", - "rand 0.7.3", - "sha-1", - "slab", - "url 2.1.1", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "x25519-dalek" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" -dependencies = [ - "clear_on_drop", - "curve25519-dalek 1.2.3", - "rand_core 0.3.1", -] - -[[package]] -name = "xdg" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" - -[[package]] -name = "yamux" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2758f29014c1cb7a6e74c1b1160ac8c8203be342d35b73462fc6a13cc6385423" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "log", - "nohash-hasher", - "parking_lot 0.9.0", - "quick-error", - "rand 0.7.3", - "tokio-codec", - "tokio-io", -] - -[[package]] -name = "zeroize" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" - -[[package]] -name = "zeroize" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4090487fa66630f7b166fba2bbb525e247a5449f41c468cc1d98f8ae6ac03120" - [[package]] name = "zeroize" version = "1.1.0" @@ -6489,8 +2428,8 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.17", + "proc-macro2", + "quote", + "syn", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 2db388f05e..a0ab514644 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,26 +1,26 @@ [workspace] members = [ - "runtime", - "runtime-modules/proposals/engine", - "runtime-modules/proposals/codex", - "runtime-modules/proposals/discussion", +# "runtime", +# "runtime-modules/proposals/engine", +# "runtime-modules/proposals/codex", +# "runtime-modules/proposals/discussion", "runtime-modules/common", - "runtime-modules/content-working-group", - "runtime-modules/forum", - "runtime-modules/governance", +# "runtime-modules/content-working-group", +# "runtime-modules/forum", +# "runtime-modules/governance", "runtime-modules/hiring", "runtime-modules/membership", "runtime-modules/memo", "runtime-modules/recurring-reward", - "runtime-modules/service-discovery", +# "runtime-modules/service-discovery", "runtime-modules/stake", - "runtime-modules/storage", +# "runtime-modules/storage", "runtime-modules/token-minting", "runtime-modules/versioned-store", "runtime-modules/versioned-store-permissions", - "runtime-modules/working-group", - "node", - "utils/chain-spec-builder/" +# "runtime-modules/working-group", +# "node", +# "utils/chain-spec-builder/" ] [profile.release] diff --git a/runtime-modules/common/Cargo.toml b/runtime-modules/common/Cargo.toml index df598a6ca8..ede768bb87 100644 --- a/runtime-modules/common/Cargo.toml +++ b/runtime-modules/common/Cargo.toml @@ -1,52 +1,24 @@ [package] -name = 'substrate-common-module' -version = '1.2.0' +name = 'pallet-common' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' +[dependencies] +serde = { version = "1.0.101", optional = true, features = ["derive"] } +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} + [features] default = ['std'] std = [ - 'sr-primitives/std', - 'srml-support/std', + 'serde', + 'codec/std', + 'sp-runtime/std', + 'frame-support/std', 'system/std', 'timestamp/std', - 'codec/std', - 'serde' ] - - -[dependencies.sr-primitives] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-primitives' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.srml-support] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-support' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.system] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-system' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '1.0.0' - -[dependencies.serde] -features = ['derive'] -optional = true -version = '1.0.101' - -[dependencies.timestamp] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-timestamp' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' \ No newline at end of file diff --git a/runtime-modules/common/src/currency.rs b/runtime-modules/common/src/currency.rs index 50d9ebaef0..2daa057358 100644 --- a/runtime-modules/common/src/currency.rs +++ b/runtime-modules/common/src/currency.rs @@ -1,5 +1,5 @@ -use sr_primitives::traits::Convert; -use srml_support::traits::{Currency, LockableCurrency, ReservableCurrency}; +use frame_support::traits::{Currency, LockableCurrency, ReservableCurrency}; +use sp_runtime::traits::Convert; pub trait GovernanceCurrency: system::Trait + Sized { type Currency: Currency diff --git a/runtime-modules/hiring/Cargo.toml b/runtime-modules/hiring/Cargo.toml index 6fa631e827..9bc13958b6 100755 --- a/runtime-modules/hiring/Cargo.toml +++ b/runtime-modules/hiring/Cargo.toml @@ -1,60 +1,34 @@ [package] -name = 'substrate-hiring-module' -version = '1.0.2' +name = 'pallet-hiring' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' [dependencies] -hex-literal = '0.1.0' -serde = { version = '1.0', optional = true } -serde_derive = { version = '1.0', optional = true } -rstd = { package = 'sr-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -runtime-primitives = { package = 'sr-primitives', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support = { package = 'srml-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support-procedural = { package = 'srml-support-procedural', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -system = { package = 'srml-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -balances = { package = 'srml-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -codec = { package = 'parity-scale-codec', version = '1.0.0', default-features = false, features = ['derive'] } -mockall = {version = "0.6.0", optional = true} -# https://users.rust-lang.org/t/failure-derive-compilation-error/39062 -quote = '<=1.0.2' - -[dependencies.stake] -default_features = false -package = 'substrate-stake-module' -path = '../stake' - -[dependencies.timestamp] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-timestamp' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.runtime-io] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-io' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' +serde = { version = "1.0.101", optional = true, features = ["derive"] } +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +rstd = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +stake = { package = 'pallet-stake', default-features = false, path = '../stake'} [dev-dependencies] -runtime-io = { package = 'sr-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -primitives = { package = 'substrate-primitives', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -mockall = "0.6.0" - +mockall = "0.7.1" +sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [features] default = ['std'] -test = ['mockall'] std = [ 'serde', - 'serde_derive', 'codec/std', 'rstd/std', - 'runtime-io/std', - 'runtime-primitives/std', - 'srml-support/std', + 'frame-support/std', 'system/std', - 'balances/std', - 'timestamp/std', + 'sp-arithmetic/std', + 'sp-runtime/std', 'stake/std', -] +] \ No newline at end of file diff --git a/runtime-modules/hiring/src/hiring/opening.rs b/runtime-modules/hiring/src/hiring/opening.rs index f04e796c66..bca1047b0e 100644 --- a/runtime-modules/hiring/src/hiring/opening.rs +++ b/runtime-modules/hiring/src/hiring/opening.rs @@ -191,8 +191,6 @@ pub enum OpeningStage { /// Deactivated at any time for any cause. deactivated_application_count: u32, - // Removed at any time. - //removed_application_count: u32 }, } @@ -401,6 +399,4 @@ pub enum ActivateOpeningAt { pub struct ApplicationRationingPolicy { /// The maximum number of applications that can be on the list at any time. pub max_active_applicants: u32, - // How applicants will be ranked, in order to respect the maximum simultaneous application limit - //pub applicant_ranking: ApplicationRankingPolicy } diff --git a/runtime-modules/hiring/src/lib.rs b/runtime-modules/hiring/src/lib.rs index cbfd7595b6..c09eab0792 100755 --- a/runtime-modules/hiring/src/lib.rs +++ b/runtime-modules/hiring/src/lib.rs @@ -18,31 +18,25 @@ // Do not delete! Cannot be uncommented by default, because of Parity decl_module! issue. //#![warn(missing_docs)] -// Test feature dependencies -#[cfg(all(any(test, feature = "test"), not(target_arch = "wasm32")))] +// Test dependencies +#[cfg(all(test, not(target_arch = "wasm32")))] use mockall::predicate::*; -#[cfg(all(any(test, feature = "test"), not(target_arch = "wasm32")))] +#[cfg(all(test, not(target_arch = "wasm32")))] use mockall::*; -use stake::{InitiateUnstakingError, Stake, StakeActionError, StakingError, Trait as StakeTrait}; - use codec::Codec; - -use runtime_primitives::traits::Zero; -use runtime_primitives::traits::{MaybeSerialize, Member, One, SimpleArithmetic}; - -use srml_support::traits::Currency; -use srml_support::{decl_module, decl_storage, ensure, Parameter}; - +use frame_support::storage::IterableStorageMap; +use frame_support::traits::{Currency, Imbalance}; +use frame_support::{decl_module, decl_storage, ensure, Parameter}; +use rstd::cell::RefCell; use rstd::collections::btree_map::BTreeMap; use rstd::collections::btree_set::BTreeSet; use rstd::iter::Iterator; -use rstd::prelude::*; - -use rstd::cell::RefCell; use rstd::rc::Rc; +use sp_arithmetic::traits::{BaseArithmetic, One, Zero}; +use sp_runtime::traits::{MaybeSerialize, Member}; -use crate::sr_api_hidden_includes_decl_storage::hidden_include::traits::Imbalance; +use stake::{InitiateUnstakingError, Stake, StakeActionError, StakingError, Trait as StakeTrait}; mod hiring; #[macro_use] @@ -57,7 +51,7 @@ pub trait Trait: system::Trait + stake::Trait + Sized { /// OpeningId type type OpeningId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -67,7 +61,7 @@ pub trait Trait: system::Trait + stake::Trait + Sized { /// ApplicationId type type ApplicationId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -83,21 +77,23 @@ pub trait Trait: system::Trait + stake::Trait + Sized { decl_storage! { trait Store for Module as Hiring { - /// Openings. - pub OpeningById get(opening_by_id): linked_map T::OpeningId => Opening, T::BlockNumber, T::ApplicationId>; + pub OpeningById get(fn opening_by_id): map hasher(blake2_128_concat) + T::OpeningId => Opening, T::BlockNumber, T::ApplicationId>; /// Identifier for next opening to be added. - pub NextOpeningId get(next_opening_id): T::OpeningId; + pub NextOpeningId get(fn next_opening_id): T::OpeningId; /// Applications - pub ApplicationById get(application_by_id): linked_map T::ApplicationId => Application; + pub ApplicationById get(fn application_by_id): map hasher(blake2_128_concat) + T::ApplicationId => Application; /// Identifier for next application to be added. - pub NextApplicationId get(next_application_id): T::ApplicationId; + pub NextApplicationId get(fn next_application_id): T::ApplicationId; /// Internal purpose of given stake, i.e. fro what application, and whether for the role or for the application. - pub ApplicationIdByStakingId get(stake_purpose_by_staking_id): linked_map T::StakeId => T::ApplicationId; + pub ApplicationIdByStakingId get(fn stake_purpose_by_staking_id): map hasher(blake2_128_concat) + T::StakeId => T::ApplicationId; } } @@ -769,14 +765,14 @@ impl Module { /// The stake, with the given id, was unstaked. pub fn unstaked(stake_id: T::StakeId) -> UnstakedResult { // Ignore unstaked - if !>::exists(stake_id) { + if !>::contains_key(stake_id) { return UnstakedResult::StakeIdNonExistent; } // Get application let application_id = >::get(stake_id); - assert!(>::exists(application_id)); + assert!(>::contains_key(application_id)); let application = >::get(application_id); @@ -1005,7 +1001,7 @@ impl Module { Opening, T::BlockNumber, T::ApplicationId>, ), > { - >::enumerate().filter_map(move |(opening_id, opening)| { + >::iter().filter_map(move |(opening_id, opening)| { if let hiring::OpeningStage::WaitingToBegin { begins_at_block } = opening.stage { if begins_at_block == now { Some((opening_id, opening)) @@ -1028,7 +1024,7 @@ impl Module { (BTreeSet, T::BlockNumber, T::BlockNumber), ), > { - >::enumerate().filter_map(move |(opening_id, opening)| { + >::iter().filter_map(move |(opening_id, opening)| { if let hiring::OpeningStage::Active { ref stage, ref applications_added, @@ -1282,7 +1278,7 @@ impl Module { // MUST never already be a key for new stake, false means code is broken. // But should we do panic in runtime? Is there safer way? - assert!(!>::exists(new_stake_id)); + assert!(!>::contains_key(new_stake_id)); >::insert(new_stake_id, application_id); @@ -1476,10 +1472,7 @@ impl Module { */ /// Defines stake module interface -#[cfg_attr( - all(any(test, feature = "test"), not(target_arch = "wasm32")), - automock -)] +#[cfg_attr(all(test, not(target_arch = "wasm32")), automock)] pub trait StakeHandler { /// Adds a new Stake which is NotStaked, created at given block, into stakes map. fn create_stake(&self) -> T::StakeId; @@ -1536,7 +1529,7 @@ impl StakeHandler for HiringStakeHandler { } fn stake_exists(&self, stake_id: T::StakeId) -> bool { - >::exists(stake_id) + >::contains_key(stake_id) } fn get_stake(&self, stake_id: T::StakeId) -> Stake, T::SlashId> { diff --git a/runtime-modules/hiring/src/macroes.rs b/runtime-modules/hiring/src/macroes.rs index 4d4c9726d0..a2cde79fe4 100644 --- a/runtime-modules/hiring/src/macroes.rs +++ b/runtime-modules/hiring/src/macroes.rs @@ -10,7 +10,7 @@ macro_rules! ensure_eq { /// Ensure that a storage map, with a given name, has mapping for the given key value. macro_rules! ensure_map_key { ($map_variable_name:ident , $runtime_trait:tt, $key:expr, $error:expr) => {{ - if <$map_variable_name<$runtime_trait>>::exists($key) { + if <$map_variable_name<$runtime_trait>>::contains_key($key) { let value = <$map_variable_name<$runtime_trait>>::get($key); Ok(value) diff --git a/runtime-modules/hiring/src/mock.rs b/runtime-modules/hiring/src/mock.rs index 27d7f3bfe4..7f260bda9a 100644 --- a/runtime-modules/hiring/src/mock.rs +++ b/runtime-modules/hiring/src/mock.rs @@ -1,23 +1,21 @@ #![cfg(test)] -use primitives::H256; -use runtime_primitives::{ +use frame_support::{impl_outer_origin, parameter_types}; +use rstd::cell::{Cell, RefCell}; +use rstd::rc::Rc; +use sp_core::H256; +use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, Perbill, }; -use srml_support::{impl_outer_origin, parameter_types}; +use std::panic; use crate::hiring::ApplicationDeactivationCause; use crate::{Module, Trait}; use balances; use stake; -use std::cell::Cell; -use std::cell::RefCell; -use std::panic; -use std::rc::Rc; - impl_outer_origin! { pub enum Origin for Test {} } @@ -27,7 +25,6 @@ parameter_types! { pub const MaximumBlockWeight: u32 = 1024; pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); - pub const MinimumPeriod: u64 = 5; } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. @@ -35,10 +32,11 @@ parameter_types! { pub struct Test; impl system::Trait for Test { + type BaseCallFilter = (); type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; - type Call = (); type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -47,44 +45,36 @@ impl system::Trait for Test { type Event = (); type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = (); type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); + type ModuleToIndex = (); + type AccountData = balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u32 = 100; - pub const TransferFee: u32 = 0; - pub const CreationFee: u32 = 0; - pub const TransactionBaseFee: u32 = 1; - pub const TransactionByteFee: u32 = 0; pub const StakePoolId: [u8; 8] = *b"joystake"; } impl balances::Trait for Test { - /// The type for recording an account's balance. type Balance = u64; - /// What to do if an account's free balance gets zeroed. - type OnFreeBalanceZero = (); - /// What to do if a new account is created. - type OnNewAccount = (); - /// The ubiquitous event type. - type Event = (); - type DustRemoval = (); - type TransferPayment = (); + type Event = (); type ExistentialDeposit = ExistentialDeposit; - type TransferFee = TransferFee; - type CreationFee = CreationFee; + type AccountStore = System; } impl Trait for Test { type OpeningId = u64; - type ApplicationId = u64; - type ApplicationDeactivatedHandler = TestApplicationDeactivatedHandler; - type StakeHandlerProvider = TestStakeHandlerProvider; } @@ -148,7 +138,7 @@ pub(crate) fn test_expectation_and_clear_mock() { set_stake_handler_impl(Rc::new(RefCell::new(crate::HiringStakeHandler {}))); } -pub fn build_test_externalities() -> runtime_io::TestExternalities { +pub fn build_test_externalities() -> sp_io::TestExternalities { let t = system::GenesisConfig::default() .build_storage::() .unwrap(); @@ -201,3 +191,6 @@ impl TestApplicationDeactivatedHandler { ); } } + +// Test fixtures starting block. +pub(crate) static FIRST_BLOCK_HEIGHT: ::BlockNumber = 0; diff --git a/runtime-modules/hiring/src/test/public_api/add_application.rs b/runtime-modules/hiring/src/test/public_api/add_application.rs index 6708c90ac9..1df06bd3b3 100644 --- a/runtime-modules/hiring/src/test/public_api/add_application.rs +++ b/runtime-modules/hiring/src/test/public_api/add_application.rs @@ -66,12 +66,16 @@ impl AddApplicationFixture { // Check next application id has been updated assert_eq!(Hiring::next_application_id(), expected_application_id + 1); // Check application exists - assert!(>::exists(expected_application_id)); + assert!(>::contains_key( + expected_application_id + )); } else { // Check next application id has not been updated assert_eq!(Hiring::next_application_id(), expected_application_id); // Check application does not exist - assert!(!>::exists(expected_application_id)); + assert!(!>::contains_key( + expected_application_id + )); }; //Check application content @@ -115,7 +119,7 @@ impl AddApplicationFixture { let expected_application = Application { opening_id: self.opening_id, application_index_in_opening: expected_application_index_in_opening, - add_to_opening_in_block: 1, + add_to_opening_in_block: 0, active_role_staking_id: expected_active_role_staking_id, active_application_staking_id: expected_active_application_staking_id, stage: ApplicationStage::Active, @@ -166,7 +170,7 @@ impl AddApplicationFixture { let expected_opening = Opening { stage: OpeningStage::Active { stage: ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, }, applications_added: expected_added_apps_in_opening, active_application_count: expected_active_application_count, @@ -289,7 +293,7 @@ fn add_application_succeeds_with_created_application_stake() { let stake = Hiring::staking().get_stake(application_stake_id); let expected_stake = stake::Stake { - created: 1, + created: FIRST_BLOCK_HEIGHT, staking_status: stake::StakingStatus::Staked(stake::StakedState { staked_amount: 100, staked_status: stake::StakedStatus::Normal, diff --git a/runtime-modules/hiring/src/test/public_api/add_opening.rs b/runtime-modules/hiring/src/test/public_api/add_opening.rs index bbbf69df0b..e3cbf2d01f 100644 --- a/runtime-modules/hiring/src/test/public_api/add_opening.rs +++ b/runtime-modules/hiring/src/test/public_api/add_opening.rs @@ -1,4 +1,4 @@ -use crate::mock::{build_test_externalities, Hiring, Test}; +use crate::mock::{build_test_externalities, Hiring, Test, FIRST_BLOCK_HEIGHT}; use crate::test::{BlockNumber, OpeningId}; use crate::StakingAmountLimitMode::Exact; use crate::*; @@ -8,7 +8,6 @@ use crate::{ }; use rstd::collections::btree_set::BTreeSet; -static FIRST_BLOCK_HEIGHT: ::BlockNumber = 1; pub static HUMAN_READABLE_TEXT: &[u8] = b"HUMAN_READABLE_TEXT!!!!"; pub struct AddOpeningFixture { @@ -44,12 +43,12 @@ impl AddOpeningFixture { // Check next opening id has been updated assert_eq!(Hiring::next_opening_id(), expected_opening_id + 1); // Check opening exists - assert!(>::exists(expected_opening_id)); + assert!(>::contains_key(expected_opening_id)); } else { // Check next opening id has not been updated assert_eq!(Hiring::next_opening_id(), expected_opening_id); // Check opening does not exist - assert!(!>::exists(expected_opening_id)); + assert!(!>::contains_key(expected_opening_id)); }; //Check opening content @@ -75,7 +74,7 @@ impl AddOpeningFixture { }; let expected_opening = Opening { - created: FIRST_BLOCK_HEIGHT, + created: mock::FIRST_BLOCK_HEIGHT, stage: expected_opening_stage, max_review_period_length: self.max_review_period_length, application_rationing_policy: self.application_rationing_policy.clone(), diff --git a/runtime-modules/hiring/src/test/public_api/begin_accepting_applications.rs b/runtime-modules/hiring/src/test/public_api/begin_accepting_applications.rs index a660da8203..ba226fde0f 100644 --- a/runtime-modules/hiring/src/test/public_api/begin_accepting_applications.rs +++ b/runtime-modules/hiring/src/test/public_api/begin_accepting_applications.rs @@ -42,10 +42,10 @@ fn begin_accepting_applications_succeeds() { let updated_opening = >::get(opening_id); let expected_opening_state = Opening { - created: 1, + created: FIRST_BLOCK_HEIGHT, stage: OpeningStage::Active { stage: ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, }, applications_added: BTreeSet::new(), active_application_count: 0, diff --git a/runtime-modules/hiring/src/test/public_api/begin_review.rs b/runtime-modules/hiring/src/test/public_api/begin_review.rs index 25dc74ad0c..5a5e5d9bfc 100644 --- a/runtime-modules/hiring/src/test/public_api/begin_review.rs +++ b/runtime-modules/hiring/src/test/public_api/begin_review.rs @@ -46,8 +46,8 @@ fn begin_review_succeeds() { let expected_opening_state = old_opening.clone_with_new_active_opening_stage(ActiveOpeningStage::ReviewPeriod { - started_accepting_applicants_at_block: 1, - started_review_period_at_block: 1, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, + started_review_period_at_block: FIRST_BLOCK_HEIGHT, }); assert_eq!(updated_opening, expected_opening_state); diff --git a/runtime-modules/hiring/src/test/public_api/cancel_opening.rs b/runtime-modules/hiring/src/test/public_api/cancel_opening.rs index 19f32b9324..04deac8f54 100644 --- a/runtime-modules/hiring/src/test/public_api/cancel_opening.rs +++ b/runtime-modules/hiring/src/test/public_api/cancel_opening.rs @@ -96,7 +96,7 @@ impl CancelOpeningFixture { started_accepting_applicants_at_block, } => ActiveOpeningStage::Deactivated { cause: OpeningDeactivationCause::CancelledAcceptingApplications, - deactivated_at_block: 1, + deactivated_at_block: FIRST_BLOCK_HEIGHT, started_accepting_applicants_at_block, started_review_period_at_block: None, }, @@ -105,7 +105,7 @@ impl CancelOpeningFixture { started_review_period_at_block, } => ActiveOpeningStage::Deactivated { cause: OpeningDeactivationCause::CancelledInReviewPeriod, - deactivated_at_block: 1, + deactivated_at_block: FIRST_BLOCK_HEIGHT, started_accepting_applicants_at_block, started_review_period_at_block: Some(started_review_period_at_block), }, diff --git a/runtime-modules/hiring/src/test/public_api/deactivate_application.rs b/runtime-modules/hiring/src/test/public_api/deactivate_application.rs index effce30ed4..cd23b06693 100644 --- a/runtime-modules/hiring/src/test/public_api/deactivate_application.rs +++ b/runtime-modules/hiring/src/test/public_api/deactivate_application.rs @@ -67,7 +67,7 @@ impl DeactivateApplicationFixture { { Application { stage: ApplicationStage::Unstaking { - deactivation_initiated: 1, + deactivation_initiated: FIRST_BLOCK_HEIGHT, cause: ApplicationDeactivationCause::External, }, ..old_application_state @@ -75,8 +75,8 @@ impl DeactivateApplicationFixture { } else { Application { stage: ApplicationStage::Inactive { - deactivation_initiated: 1, - deactivated: 1, + deactivation_initiated: FIRST_BLOCK_HEIGHT, + deactivated: FIRST_BLOCK_HEIGHT, cause: ApplicationDeactivationCause::External, }, ..old_application_state @@ -98,7 +98,7 @@ impl DeactivateApplicationFixture { // invalid opening stages are not supported // check for opening existence - if !>::exists(opening_id) { + if !>::contains_key(opening_id) { return; } @@ -131,7 +131,7 @@ impl DeactivateApplicationFixture { let expected_opening = Opening { stage: OpeningStage::Active { stage: ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, }, applications_added, active_application_count: expected_active_application_count, diff --git a/runtime-modules/hiring/src/test/public_api/ensure_can_add_application.rs b/runtime-modules/hiring/src/test/public_api/ensure_can_add_application.rs index b2413ee6a2..78ccfba5b1 100644 --- a/runtime-modules/hiring/src/test/public_api/ensure_can_add_application.rs +++ b/runtime-modules/hiring/src/test/public_api/ensure_can_add_application.rs @@ -239,10 +239,10 @@ fn ensure_can_add_application_succeeds() { ensure_can_add_application_result, Ok(DestructuredApplicationCanBeAddedEvaluation { opening: Opening { - created: 1, + created: FIRST_BLOCK_HEIGHT, stage: hiring::OpeningStage::Active { stage: hiring::ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1 + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT }, applications_added: BTreeSet::new(), active_application_count: 0, @@ -266,7 +266,7 @@ fn ensure_can_add_application_succeeds() { human_readable_text: HUMAN_READABLE_TEXT.to_vec() }, active_stage: hiring::ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1 + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT }, applications_added: BTreeSet::new(), active_application_count: 0, diff --git a/runtime-modules/hiring/src/test/public_api/fill_opening.rs b/runtime-modules/hiring/src/test/public_api/fill_opening.rs index 562115b00f..f2cc62427d 100644 --- a/runtime-modules/hiring/src/test/public_api/fill_opening.rs +++ b/runtime-modules/hiring/src/test/public_api/fill_opening.rs @@ -89,9 +89,9 @@ impl FillOpeningFixture { // compose expected stage let expected_active_stage = ActiveOpeningStage::Deactivated { cause: OpeningDeactivationCause::Filled, - deactivated_at_block: 1, - started_accepting_applicants_at_block: 1, - started_review_period_at_block: Some(1), + deactivated_at_block: FIRST_BLOCK_HEIGHT, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, + started_review_period_at_block: Some(FIRST_BLOCK_HEIGHT), }; // calculate application counters diff --git a/runtime-modules/hiring/src/test/public_api/on_finalize.rs b/runtime-modules/hiring/src/test/public_api/on_finalize.rs index 379fd42c09..8b0d4aadcc 100644 --- a/runtime-modules/hiring/src/test/public_api/on_finalize.rs +++ b/runtime-modules/hiring/src/test/public_api/on_finalize.rs @@ -1,7 +1,7 @@ use crate::mock::*; use crate::test::*; -use runtime_primitives::traits::{OnFinalize, OnInitialize}; +use frame_support::traits::{OnFinalize, OnInitialize}; // Recommendation from Parity on testing on_finalize // https://substrate.dev/docs/en/next/development/module/tests diff --git a/runtime-modules/hiring/src/test/public_api/unstaked.rs b/runtime-modules/hiring/src/test/public_api/unstaked.rs index e6f4343d08..8afddf85a9 100644 --- a/runtime-modules/hiring/src/test/public_api/unstaked.rs +++ b/runtime-modules/hiring/src/test/public_api/unstaked.rs @@ -62,7 +62,7 @@ impl UnstakedFixture { { let expected_application_stage = ApplicationStage::Inactive { deactivation_initiated, - deactivated: 1, + deactivated: FIRST_BLOCK_HEIGHT, cause, }; diff --git a/runtime-modules/hiring/src/test/smoke.rs b/runtime-modules/hiring/src/test/smoke.rs index 6ea087a94d..c8c5ebfe19 100644 --- a/runtime-modules/hiring/src/test/smoke.rs +++ b/runtime-modules/hiring/src/test/smoke.rs @@ -1,8 +1,6 @@ use super::*; use crate::mock::*; -static FIRST_BLOCK_HEIGHT: ::BlockNumber = 1; - use rstd::collections::btree_set::BTreeSet; /** @@ -52,7 +50,7 @@ fn full_hiring_workflow_successful_path() { assert_eq!(Hiring::next_opening_id(), expected_opening_id + 1); // Check that our opening actually was added - assert!(>::exists(expected_opening_id)); + assert!(>::contains_key(expected_opening_id)); let found_opening = Hiring::opening_by_id(expected_opening_id); @@ -90,10 +88,10 @@ fn full_hiring_workflow_successful_path() { let destructured_app_data = ensure_can_add_application_result.unwrap(); let expected = DestructuredApplicationCanBeAddedEvaluation { opening: Opening { - created: 1, + created: FIRST_BLOCK_HEIGHT, stage: OpeningStage::Active { stage: ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, }, applications_added: BTreeSet::new(), active_application_count: 0, @@ -107,7 +105,7 @@ fn full_hiring_workflow_successful_path() { human_readable_text: human_readable_text.clone(), }, active_stage: ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, }, applications_added: BTreeSet::new(), active_application_count: 0, @@ -136,7 +134,7 @@ fn full_hiring_workflow_successful_path() { let new_application_id = app_added.application_id_added; // Check that our application actually was added - assert!(>::exists(new_application_id)); + assert!(>::contains_key(new_application_id)); let new_application = Hiring::application_by_id(new_application_id); @@ -146,7 +144,7 @@ fn full_hiring_workflow_successful_path() { Application { opening_id: 0, application_index_in_opening: 0, - add_to_opening_in_block: 1, + add_to_opening_in_block: FIRST_BLOCK_HEIGHT, active_role_staking_id: None, active_application_staking_id: None, stage: ApplicationStage::Active, @@ -169,11 +167,11 @@ fn full_hiring_workflow_successful_path() { assert_eq!( updated_opening_after_begin_review, Opening { - created: 1, + created: FIRST_BLOCK_HEIGHT, stage: OpeningStage::Active { stage: ActiveOpeningStage::ReviewPeriod { - started_accepting_applicants_at_block: 1, - started_review_period_at_block: 1 + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, + started_review_period_at_block: FIRST_BLOCK_HEIGHT }, applications_added: expected_added_apps_in_opening.clone(), active_application_count: 1, @@ -204,13 +202,13 @@ fn full_hiring_workflow_successful_path() { assert_eq!( updated_opening_fill_opening, Opening { - created: 1, + created: FIRST_BLOCK_HEIGHT, stage: OpeningStage::Active { stage: ActiveOpeningStage::Deactivated { cause: OpeningDeactivationCause::Filled, - deactivated_at_block: 1, - started_accepting_applicants_at_block: 1, - started_review_period_at_block: Some(1) + deactivated_at_block: FIRST_BLOCK_HEIGHT, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, + started_review_period_at_block: Some(FIRST_BLOCK_HEIGHT) }, applications_added: expected_added_apps_in_opening, active_application_count: 0, @@ -234,12 +232,12 @@ fn full_hiring_workflow_successful_path() { Application { opening_id: 0, application_index_in_opening: 0, - add_to_opening_in_block: 1, + add_to_opening_in_block: FIRST_BLOCK_HEIGHT, active_role_staking_id: None, active_application_staking_id: None, stage: ApplicationStage::Inactive { - deactivation_initiated: 1, - deactivated: 1, + deactivation_initiated: FIRST_BLOCK_HEIGHT, + deactivated: FIRST_BLOCK_HEIGHT, cause: ApplicationDeactivationCause::Hired }, human_readable_text: application_readable_text.clone() diff --git a/runtime-modules/hiring/src/test/staking_module/try_to_initiate_application_deactivation.rs b/runtime-modules/hiring/src/test/staking_module/try_to_initiate_application_deactivation.rs index c7069d3106..b2cfc96b1a 100644 --- a/runtime-modules/hiring/src/test/staking_module/try_to_initiate_application_deactivation.rs +++ b/runtime-modules/hiring/src/test/staking_module/try_to_initiate_application_deactivation.rs @@ -56,15 +56,15 @@ impl<'a> TryToInitiateApplicationDeactivationFixture<'a> { let expected_application_state = match result { ApplicationDeactivationInitiationResult::Deactivated => Application { stage: ApplicationStage::Inactive { - deactivation_initiated: 1, - deactivated: 1, + deactivation_initiated: FIRST_BLOCK_HEIGHT, + deactivated: FIRST_BLOCK_HEIGHT, cause: self.cause, }, ..old_application_state }, ApplicationDeactivationInitiationResult::Unstaking => Application { stage: ApplicationStage::Unstaking { - deactivation_initiated: 1, + deactivation_initiated: FIRST_BLOCK_HEIGHT, cause: self.cause, }, ..old_application_state @@ -84,7 +84,7 @@ impl<'a> TryToInitiateApplicationDeactivationFixture<'a> { // invalid opening stages are not supported // check for opening existence - if !>::exists(opening_id) { + if !>::contains_key(opening_id) { return; } @@ -118,7 +118,7 @@ impl<'a> TryToInitiateApplicationDeactivationFixture<'a> { let expected_opening = Opening { stage: OpeningStage::Active { stage: ActiveOpeningStage::AcceptingApplications { - started_accepting_applicants_at_block: 1, + started_accepting_applicants_at_block: FIRST_BLOCK_HEIGHT, }, applications_added, active_application_count: expected_active_application_count, diff --git a/runtime-modules/membership/Cargo.toml b/runtime-modules/membership/Cargo.toml index b67c46eef5..f5521592ed 100644 --- a/runtime-modules/membership/Cargo.toml +++ b/runtime-modules/membership/Cargo.toml @@ -1,83 +1,33 @@ [package] -name = 'substrate-membership-module' -version = '1.1.0' +name = 'pallet-membership' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' +[dependencies] +serde = { version = "1.0.101", optional = true, features = ["derive"] } +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +common = { package = 'pallet-common', default-features = false, path = '../common'} + +[dev-dependencies] +sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} + [features] default = ['std'] std = [ - 'sr-primitives/std', - 'srml-support/std', - 'system/std', - 'rstd/std', - 'codec/std', 'serde', + 'codec/std', + 'frame-support/std', + 'system/std', + 'sp-arithmetic/std', + 'sp-runtime/std', 'timestamp/std', - 'primitives/std', 'common/std', -] - -[dependencies.sr-primitives] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-primitives' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.srml-support] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-support' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.system] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-system' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.rstd] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-std' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '1.0.0' - -[dependencies.serde] -features = ['derive'] -optional = true -version = '1.0.101' - -[dependencies.timestamp] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-timestamp' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.primitives] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'substrate-primitives' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.common] -default_features = false -package = 'substrate-common-module' -path = '../common' - -[dev-dependencies.runtime-io] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-io' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dev-dependencies.balances] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-balances' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' \ No newline at end of file +] \ No newline at end of file diff --git a/runtime-modules/membership/src/genesis.rs b/runtime-modules/membership/src/genesis.rs index b871777eb9..1856dbf8c5 100644 --- a/runtime-modules/membership/src/genesis.rs +++ b/runtime-modules/membership/src/genesis.rs @@ -1,7 +1,6 @@ #![cfg(test)] use common::currency::BalanceOf; -use rstd::prelude::*; use crate::{GenesisConfig, Trait}; diff --git a/runtime-modules/membership/src/lib.rs b/runtime-modules/membership/src/lib.rs index 5dc816f941..7e9e96ccdf 100644 --- a/runtime-modules/membership/src/lib.rs +++ b/runtime-modules/membership/src/lib.rs @@ -10,21 +10,24 @@ pub(crate) mod mock; mod tests; use codec::{Codec, Decode, Encode}; -use rstd::borrow::ToOwned; -use rstd::prelude::*; -use sr_primitives::traits::{MaybeSerialize, Member, One, SimpleArithmetic}; -use srml_support::traits::Currency; -use srml_support::{decl_event, decl_module, decl_storage, dispatch, ensure, Parameter}; +use frame_support::traits::Currency; +use frame_support::{decl_event, decl_module, decl_storage, ensure, Parameter}; +use sp_arithmetic::traits::{BaseArithmetic, One}; +use sp_runtime::traits::{MaybeSerialize, Member}; use system::{self, ensure_root, ensure_signed}; use common::currency::{BalanceOf, GovernanceCurrency}; +//TODO: Convert errors to the Substrate decl_error! macro. +/// Result with string error message. This exists for backward compatibility purpose. +pub type DispatchResult = Result<(), &'static str>; + pub trait Trait: system::Trait + GovernanceCurrency + timestamp::Trait { type Event: From> + Into<::Event>; type MemberId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -33,7 +36,7 @@ pub trait Trait: system::Trait + GovernanceCurrency + timestamp::Trait { type PaidTermId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -42,7 +45,7 @@ pub trait Trait: system::Trait + GovernanceCurrency + timestamp::Trait { type SubscriptionId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -52,7 +55,7 @@ pub trait Trait: system::Trait + GovernanceCurrency + timestamp::Trait { /// Describes the common type for the working group members (workers). type ActorId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -61,10 +64,10 @@ pub trait Trait: system::Trait + GovernanceCurrency + timestamp::Trait { + Ord; } -const FIRST_PAID_TERMS_ID: u32 = 1; +const FIRST_PAID_TERMS_ID: u8 = 1; // Default paid membership terms -pub const DEFAULT_PAID_TERM_ID: u32 = 0; +pub const DEFAULT_PAID_TERM_ID: u8 = 0; // Default user info constraints const DEFAULT_MIN_HANDLE_LENGTH: u32 = 5; @@ -154,27 +157,32 @@ decl_storage! { trait Store for Module as Membership { /// MemberId to assign to next member that is added to the registry, and is also the /// total number of members created. MemberIds start at Zero. - pub NextMemberId get(members_created) : T::MemberId; + pub NextMemberId get(fn members_created) : T::MemberId; /// Mapping of member's id to their membership profile - pub MembershipById get(membership) : map T::MemberId => Membership; + pub MembershipById get(fn membership) : map hasher(blake2_128_concat) + T::MemberId => Membership; /// Mapping of a root account id to vector of member ids it controls. - pub(crate) MemberIdsByRootAccountId : map T::AccountId => Vec; + pub(crate) MemberIdsByRootAccountId : map hasher(blake2_128_concat) + T::AccountId => Vec; /// Mapping of a controller account id to vector of member ids it controls - pub(crate) MemberIdsByControllerAccountId : map T::AccountId => Vec; + pub(crate) MemberIdsByControllerAccountId : map hasher(blake2_128_concat) + T::AccountId => Vec; /// Registered unique handles and their mapping to their owner - pub MemberIdByHandle get(handles) : map Vec => T::MemberId; + pub MemberIdByHandle get(fn handles) : map hasher(blake2_128_concat) + Vec => T::MemberId; /// Next paid membership terms id - pub NextPaidMembershipTermsId get(next_paid_membership_terms_id) : T::PaidTermId = T::PaidTermId::from(FIRST_PAID_TERMS_ID); + pub NextPaidMembershipTermsId get(fn next_paid_membership_terms_id) : + T::PaidTermId = T::PaidTermId::from(FIRST_PAID_TERMS_ID); /// Paid membership terms record // Remember to add _genesis_phantom_data: std::marker::PhantomData{} to membership // genesis config if not providing config() or extra_genesis - pub PaidMembershipTermsById get(paid_membership_terms_by_id) build(|config: &GenesisConfig| { + pub PaidMembershipTermsById get(fn paid_membership_terms_by_id) build(|config: &GenesisConfig| { // This method only gets called when initializing storage, and is // compiled as native code. (Will be called when building `raw` chainspec) // So it can't be relied upon to initialize storage for runtimes updates. @@ -184,22 +192,23 @@ decl_storage! { text: Vec::default(), }; vec![(T::PaidTermId::from(DEFAULT_PAID_TERM_ID), terms)] - }) : map T::PaidTermId => PaidMembershipTerms>; + }) : map hasher(blake2_128_concat) T::PaidTermId => PaidMembershipTerms>; /// Active Paid membership terms - pub ActivePaidMembershipTerms get(active_paid_membership_terms) : Vec = vec![T::PaidTermId::from(DEFAULT_PAID_TERM_ID)]; + pub ActivePaidMembershipTerms get(fn active_paid_membership_terms) : + Vec = vec![T::PaidTermId::from(DEFAULT_PAID_TERM_ID)]; /// Is the platform is accepting new members or not - pub NewMembershipsAllowed get(new_memberships_allowed) : bool = true; + pub NewMembershipsAllowed get(fn new_memberships_allowed) : bool = true; - pub ScreeningAuthority get(screening_authority) : T::AccountId; + pub ScreeningAuthority get(fn screening_authority) : T::AccountId; // User Input Validation parameters - do these really need to be state variables // I don't see a need to adjust these in future? - pub MinHandleLength get(min_handle_length) : u32 = DEFAULT_MIN_HANDLE_LENGTH; - pub MaxHandleLength get(max_handle_length) : u32 = DEFAULT_MAX_HANDLE_LENGTH; - pub MaxAvatarUriLength get(max_avatar_uri_length) : u32 = DEFAULT_MAX_AVATAR_URI_LENGTH; - pub MaxAboutTextLength get(max_about_text_length) : u32 = DEFAULT_MAX_ABOUT_TEXT_LENGTH; + pub MinHandleLength get(fn min_handle_length) : u32 = DEFAULT_MIN_HANDLE_LENGTH; + pub MaxHandleLength get(fn max_handle_length) : u32 = DEFAULT_MAX_HANDLE_LENGTH; + pub MaxAvatarUriLength get(fn max_avatar_uri_length) : u32 = DEFAULT_MAX_AVATAR_URI_LENGTH; + pub MaxAboutTextLength get(fn max_about_text_length) : u32 = DEFAULT_MAX_ABOUT_TEXT_LENGTH; } add_extra_genesis { @@ -238,6 +247,7 @@ decl_module! { fn deposit_event() = default; /// Non-members can buy membership + #[weight = 10_000_000] // TODO: adjust weight pub fn buy_membership( origin, paid_terms_id: T::PaidTermId, @@ -268,6 +278,7 @@ decl_module! { } /// Change member's about text + #[weight = 10_000_000] // TODO: adjust weight pub fn change_member_about_text(origin, member_id: T::MemberId, text: Vec) { let sender = ensure_signed(origin)?; @@ -279,6 +290,7 @@ decl_module! { } /// Change member's avatar + #[weight = 10_000_000] // TODO: adjust weight pub fn change_member_avatar(origin, member_id: T::MemberId, uri: Vec) { let sender = ensure_signed(origin)?; @@ -291,6 +303,7 @@ decl_module! { /// Change member's handle. Will ensure new handle is unique and old one will be available /// for other members to use. + #[weight = 10_000_000] // TODO: adjust weight pub fn change_member_handle(origin, member_id: T::MemberId, handle: Vec) { let sender = ensure_signed(origin)?; @@ -302,6 +315,7 @@ decl_module! { } /// Update member's all or some of handle, avatar and about text. + #[weight = 10_000_000] // TODO: adjust weight pub fn update_membership( origin, member_id: T::MemberId, @@ -326,6 +340,7 @@ decl_module! { } } + #[weight = 10_000_000] // TODO: adjust weight pub fn set_controller_account(origin, member_id: T::MemberId, new_controller_account: T::AccountId) { let sender = ensure_signed(origin)?; @@ -349,6 +364,7 @@ decl_module! { } } + #[weight = 10_000_000] // TODO: adjust weight pub fn set_root_account(origin, member_id: T::MemberId, new_root_account: T::AccountId) { let sender = ensure_signed(origin)?; @@ -371,6 +387,7 @@ decl_module! { } } + #[weight = 10_000_000] // TODO: adjust weight pub fn add_screened_member( origin, new_member_account: T::AccountId, @@ -385,7 +402,7 @@ decl_module! { ensure!(sender == Self::screening_authority(), "not screener"); } else { // no screening authority defined. Cannot accept this request - return Err("no screening authority defined"); + return Err("no screening authority defined".into()); } // make sure we are accepting new memberships @@ -401,6 +418,7 @@ decl_module! { Self::deposit_event(RawEvent::MemberRegistered(member_id, new_member_account)); } + #[weight = 10_000_000] // TODO: adjust weight pub fn set_screening_authority(origin, authority: T::AccountId) { ensure_root(origin)?; >::put(authority); @@ -432,7 +450,7 @@ pub enum MemberRootAccountMismatch { impl Module { /// Provided that the member_id exists return its membership. Returns error otherwise. pub fn ensure_membership(id: T::MemberId) -> Result, &'static str> { - if >::exists(&id) { + if >::contains_key(&id) { Ok(Self::membership(&id)) } else { Err("member profile not found") @@ -444,7 +462,7 @@ impl Module { member_id: &T::MemberId, account: &T::AccountId, ) -> Result, ControllerAccountForMemberCheckFailed> { - if MembershipById::::exists(member_id) { + if MembershipById::::contains_key(member_id) { let membership = MembershipById::::get(member_id); if membership.controller_account == *account { @@ -459,8 +477,8 @@ impl Module { /// Returns true if account is either a member's root or controller account pub fn is_member_account(who: &T::AccountId) -> bool { - >::exists(who) - || >::exists(who) + >::contains_key(who) + || >::contains_key(who) } fn ensure_active_terms_id( @@ -472,7 +490,7 @@ impl Module { "paid terms id not active" ); - if >::exists(terms_id) { + if >::contains_key(terms_id) { Ok(Self::paid_membership_terms_by_id(terms_id)) } else { Err("paid membership term id does not exist") @@ -480,15 +498,15 @@ impl Module { } #[allow(clippy::ptr_arg)] // cannot change to the "&[u8]" suggested by clippy - fn ensure_unique_handle(handle: &Vec) -> dispatch::Result { + fn ensure_unique_handle(handle: &Vec) -> DispatchResult { ensure!( - !>::exists(handle), + !>::contains_key(handle), "handle already registered" ); Ok(()) } - fn validate_handle(handle: &[u8]) -> dispatch::Result { + fn validate_handle(handle: &[u8]) -> DispatchResult { ensure!( handle.len() >= Self::min_handle_length() as usize, "handle too short" @@ -506,7 +524,7 @@ impl Module { text } - fn validate_avatar(uri: &[u8]) -> dispatch::Result { + fn validate_avatar(uri: &[u8]) -> DispatchResult { ensure!( uri.len() <= Self::max_avatar_uri_length() as usize, "avatar uri too long" @@ -569,7 +587,7 @@ impl Module { new_member_id } - fn _change_member_about_text(id: T::MemberId, text: &[u8]) -> dispatch::Result { + fn _change_member_about_text(id: T::MemberId, text: &[u8]) -> DispatchResult { let mut membership = Self::ensure_membership(id)?; let text = Self::validate_text(text); membership.about = text; @@ -578,7 +596,7 @@ impl Module { Ok(()) } - fn _change_member_avatar(id: T::MemberId, uri: &[u8]) -> dispatch::Result { + fn _change_member_avatar(id: T::MemberId, uri: &[u8]) -> DispatchResult { let mut membership = Self::ensure_membership(id)?; Self::validate_avatar(uri)?; membership.avatar_uri = uri.to_owned(); @@ -587,7 +605,7 @@ impl Module { Ok(()) } - fn _change_member_handle(id: T::MemberId, handle: Vec) -> dispatch::Result { + fn _change_member_handle(id: T::MemberId, handle: Vec) -> DispatchResult { let mut membership = Self::ensure_membership(id)?; Self::validate_handle(&handle)?; Self::ensure_unique_handle(&handle)?; diff --git a/runtime-modules/membership/src/mock.rs b/runtime-modules/membership/src/mock.rs index b6a0186f58..53a86ffdcf 100644 --- a/runtime-modules/membership/src/mock.rs +++ b/runtime-modules/membership/src/mock.rs @@ -1,19 +1,18 @@ #![cfg(test)] pub use crate::{GenesisConfig, Trait, DEFAULT_PAID_TERM_ID}; -pub use common::currency::GovernanceCurrency; -pub use srml_support::traits::Currency; -pub use system; -pub use primitives::{Blake2Hasher, H256}; -pub use sr_primitives::{ - testing::{Digest, DigestItem, Header, UintAuthorityId}, - traits::{BlakeTwo256, Convert, IdentityLookup, OnFinalize}, - weights::Weight, - BuildStorage, Perbill, +pub use frame_support::traits::Currency; +use frame_support::{impl_outer_origin, parameter_types}; +use sp_core::H256; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, + Perbill, }; +pub use system; -use srml_support::{impl_outer_origin, parameter_types}; +pub use common::currency::GovernanceCurrency; impl_outer_origin! { pub enum Origin for Test {} @@ -31,10 +30,11 @@ parameter_types! { } impl system::Trait for Test { + type BaseCallFilter = (); type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; - type Call = (); type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -43,9 +43,17 @@ impl system::Trait for Test { type Event = (); type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = (); type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); + type ModuleToIndex = (); + type AccountData = balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); } impl timestamp::Trait for Test { @@ -56,27 +64,14 @@ impl timestamp::Trait for Test { parameter_types! { pub const ExistentialDeposit: u32 = 0; - pub const TransferFee: u32 = 0; - pub const CreationFee: u32 = 0; - pub const TransactionBaseFee: u32 = 1; - pub const TransactionByteFee: u32 = 0; } impl balances::Trait for Test { - /// The type for recording an account's balance. type Balance = u64; - /// What to do if an account's free balance gets zeroed. - type OnFreeBalanceZero = (); - /// What to do if a new account is created. - type OnNewAccount = (); - /// The ubiquitous event type. - type Event = (); - type DustRemoval = (); - type TransferPayment = (); + type Event = (); type ExistentialDeposit = ExistentialDeposit; - type TransferFee = TransferFee; - type CreationFee = CreationFee; + type AccountStore = System; } impl GovernanceCurrency for Test { @@ -106,17 +101,11 @@ impl Default for TestExternalitiesBuilder { } impl TestExternalitiesBuilder { - /* - pub fn set_system_config(mut self, system_config: system::GenesisConfig) -> Self { - self.system_config = Some(system_config); - self - } - */ pub fn set_membership_config(mut self, membership_config: GenesisConfig) -> Self { self.membership_config = Some(membership_config); self } - pub fn build(self) -> runtime_io::TestExternalities { + pub fn build(self) -> sp_io::TestExternalities { // Add system let mut t = self .system_config @@ -136,3 +125,4 @@ impl TestExternalitiesBuilder { pub type Balances = balances::Module; pub type Members = crate::Module; +pub type System = system::Module; diff --git a/runtime-modules/membership/src/tests.rs b/runtime-modules/membership/src/tests.rs index 5252fd60ce..1809612c22 100644 --- a/runtime-modules/membership/src/tests.rs +++ b/runtime-modules/membership/src/tests.rs @@ -3,10 +3,10 @@ use super::genesis; use super::mock::*; -use srml_support::*; +use frame_support::*; fn get_membership_by_id(member_id: u32) -> crate::Membership { - if >::exists(member_id) { + if >::contains_key(member_id) { Members::membership(member_id) } else { panic!("member profile not created"); @@ -52,15 +52,16 @@ fn get_bob_info() -> TestUserInfo { const ALICE_ACCOUNT_ID: u64 = 1; -fn buy_default_membership_as_alice() -> dispatch::Result { +fn buy_default_membership_as_alice() -> crate::DispatchResult { let info = get_alice_info(); Members::buy_membership( Origin::signed(ALICE_ACCOUNT_ID), - DEFAULT_PAID_TERM_ID, + DEFAULT_PAID_TERM_ID as u32, info.handle, info.avatar_uri, info.about, ) + .map_err(|err| err.into()) } fn set_alice_free_balance(balance: u64) { @@ -81,12 +82,13 @@ fn initial_state() { ) .build() .execute_with(|| { - let default_terms = - if >::exists(DEFAULT_PAID_TERM_ID) { - Members::paid_membership_terms_by_id(DEFAULT_PAID_TERM_ID) - } else { - panic!("default terms not initialized"); - }; + let default_terms = if >::contains_key( + DEFAULT_PAID_TERM_ID as u32, + ) { + Members::paid_membership_terms_by_id(DEFAULT_PAID_TERM_ID as u32) + } else { + panic!("default terms not initialized"); + }; assert_eq!(default_terms.fee, DEFAULT_FEE); }); diff --git a/runtime-modules/memo/Cargo.toml b/runtime-modules/memo/Cargo.toml index 1ec371433a..5179cde23e 100644 --- a/runtime-modules/memo/Cargo.toml +++ b/runtime-modules/memo/Cargo.toml @@ -1,58 +1,22 @@ [package] -name = 'substrate-memo-module' -version = '1.0.0' +name = 'pallet-memo' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' +[dependencies] +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +common = { package = 'pallet-common', default-features = false, path = '../common'} [features] default = ['std'] std = [ - 'sr-primitives/std', - 'srml-support/std', - 'system/std', - 'rstd/std', 'codec/std', - 'serde', + 'sp-arithmetic/std', + 'frame-support/std', + 'system/std', 'common/std', -] - -[dependencies.sr-primitives] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-primitives' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.srml-support] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-support' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.system] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-system' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.rstd] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-std' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '1.0.0' - -[dependencies.serde] -features = ['derive'] -optional = true -version = '1.0.101' - -[dependencies.common] -default_features = false -package = 'substrate-common-module' -path = '../common' \ No newline at end of file +] \ No newline at end of file diff --git a/runtime-modules/memo/src/lib.rs b/runtime-modules/memo/src/lib.rs index 7c3b876ffa..7c831a0a00 100644 --- a/runtime-modules/memo/src/lib.rs +++ b/runtime-modules/memo/src/lib.rs @@ -1,14 +1,13 @@ // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -use common::currency::GovernanceCurrency; -use rstd::prelude::*; -use sr_primitives::traits::Zero; -use srml_support::traits::Currency; -use srml_support::{decl_event, decl_module, decl_storage, ensure}; - +use frame_support::traits::Currency; +use frame_support::{decl_event, decl_module, decl_storage, ensure}; +use sp_arithmetic::traits::Zero; use system::{self, ensure_signed}; +use common::currency::GovernanceCurrency; + pub trait Trait: system::Trait + GovernanceCurrency { type Event: From> + Into<::Event>; } @@ -17,8 +16,8 @@ pub type MemoText = Vec; decl_storage! { trait Store for Module as Memo { - Memo get(memo) : map T::AccountId => MemoText; - MaxMemoLength get(max_memo_length) : u32 = 4096; + Memo get(fn memo) : map hasher(blake2_128_concat) T::AccountId => MemoText; + MaxMemoLength get(fn max_memo_length) : u32 = 4096; } } @@ -32,6 +31,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { fn deposit_event() = default; + #[weight = 10_000_000] // TODO: adjust weight fn update_memo(origin, memo: MemoText) { let sender = ensure_signed(origin)?; diff --git a/runtime-modules/proposals/engine/Cargo.toml b/runtime-modules/proposals/engine/Cargo.toml index 552887ccda..6c7b2a6e08 100644 --- a/runtime-modules/proposals/engine/Cargo.toml +++ b/runtime-modules/proposals/engine/Cargo.toml @@ -96,7 +96,7 @@ package = 'substrate-common-module' path = '../../common' [dev-dependencies] -mockall = "0.6.0" +mockall = "0.7.1" [dev-dependencies.runtime-io] default_features = false diff --git a/runtime-modules/recurring-reward/Cargo.toml b/runtime-modules/recurring-reward/Cargo.toml index 10caf40b43..401f4824fb 100755 --- a/runtime-modules/recurring-reward/Cargo.toml +++ b/runtime-modules/recurring-reward/Cargo.toml @@ -1,56 +1,29 @@ [package] -name = 'substrate-recurring-reward-module' -version = '1.0.1' +name = 'pallet-recurring-reward' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' [dependencies] -hex-literal = '0.1.0' -serde = { version = '1.0', optional = true } -serde_derive = { version = '1.0', optional = true } -rstd = { package = 'sr-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -runtime-primitives = { package = 'sr-primitives', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support = { package = 'srml-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support-procedural = { package = 'srml-support-procedural', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -system = { package = 'srml-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -balances = { package = 'srml-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -codec = { package = 'parity-scale-codec', version = '1.0.0', default-features = false, features = ['derive'] } -# https://users.rust-lang.org/t/failure-derive-compilation-error/39062 -quote = '<=1.0.2' - -[dependencies.timestamp] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-timestamp' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.runtime-io] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-io' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.minting] -default_features = false -package = 'substrate-token-mint-module' -path = '../token-minting' +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +minting = { package = 'pallet-token-mint', default-features = false, path = '../token-minting'} [dev-dependencies] -runtime-io = { package = 'sr-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -primitives = { package = 'substrate-primitives', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} +sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [features] default = ['std'] std = [ - 'serde', - 'serde_derive', 'codec/std', - 'rstd/std', - 'runtime-io/std', - 'runtime-primitives/std', - 'srml-support/std', + 'sp-arithmetic/std', + 'sp-runtime/std', + 'frame-support/std', 'system/std', - 'balances/std', - 'timestamp/std', 'minting/std', ] diff --git a/runtime-modules/recurring-reward/src/lib.rs b/runtime-modules/recurring-reward/src/lib.rs index 946e0b75a3..ebdc157407 100755 --- a/runtime-modules/recurring-reward/src/lib.rs +++ b/runtime-modules/recurring-reward/src/lib.rs @@ -7,11 +7,12 @@ // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -use rstd::prelude::*; use codec::{Codec, Decode, Encode}; -use runtime_primitives::traits::{MaybeSerialize, Member, One, SimpleArithmetic, Zero}; -use srml_support::{decl_module, decl_storage, ensure, Parameter}; +use frame_support::storage::IterableStorageMap; +use frame_support::{decl_module, decl_storage, ensure, Parameter}; +use sp_arithmetic::traits::{BaseArithmetic, One, Zero}; +use sp_runtime::traits::{MaybeSerialize, Member}; use minting::{self, BalanceOf}; @@ -24,7 +25,7 @@ pub trait Trait: system::Trait + minting::Trait { /// Type of identifier for recipients. type RecipientId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -34,7 +35,7 @@ pub trait Trait: system::Trait + minting::Trait { /// Type for identifier for relationship representing that a recipient recieves recurring reward from a token mint type RewardRelationshipId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -142,13 +143,15 @@ impl as RecurringReward { - Recipients get(recipients): linked_map T::RecipientId => Recipient>; + Recipients get(fn recipients): map hasher(blake2_128_concat) + T::RecipientId => Recipient>; - RecipientsCreated get(recipients_created): T::RecipientId; + RecipientsCreated get(fn recipients_created): T::RecipientId; - pub RewardRelationships get(reward_relationships): linked_map T::RewardRelationshipId => RewardRelationship, T::BlockNumber, T::MintId, T::RecipientId>; + pub RewardRelationships get(fn reward_relationships): map hasher(blake2_128_concat) + T::RewardRelationshipId => RewardRelationship, T::BlockNumber, T::MintId, T::RecipientId>; - RewardRelationshipsCreated get(reward_relationships_created): T::RewardRelationshipId; + RewardRelationshipsCreated get(fn reward_relationships_created): T::RewardRelationshipId; } } @@ -192,7 +195,7 @@ impl Module { RewardsError::RewardSourceNotFound ); ensure!( - >::exists(recipient), + >::contains_key(recipient), RewardsError::RecipientNotFound ); ensure!( @@ -220,7 +223,7 @@ impl Module { /// Removes a relationship from RewardRelashionships and its recipient. pub fn remove_reward_relationship(id: T::RewardRelationshipId) { - if >::exists(&id) { + if >::contains_key(&id) { >::remove(>::take(&id).recipient); } } @@ -282,7 +285,7 @@ impl Module { new_payout_interval: Option>, ) -> Result<(), RewardsError> { ensure!( - >::exists(&id), + >::contains_key(&id), RewardsError::RewardRelationshipNotFound ); @@ -320,8 +323,8 @@ impl Module { Otherwise, analogous steps for failure. */ fn do_payouts(now: T::BlockNumber) { - for (relationship_id, ref mut relationship) in >::enumerate() { - assert!(>::exists(&relationship.recipient)); + for (relationship_id, ref mut relationship) in >::iter() { + assert!(>::contains_key(&relationship.recipient)); let mut recipient = Self::recipients(relationship.recipient); @@ -394,7 +397,7 @@ impl Module { RewardRelationship, T::BlockNumber, T::MintId, T::RecipientId>, (), > { - ensure!(RewardRelationships::::exists(id), ()); + ensure!(RewardRelationships::::contains_key(id), ()); let relationship = RewardRelationships::::get(id); diff --git a/runtime-modules/recurring-reward/src/mock/mod.rs b/runtime-modules/recurring-reward/src/mock/mod.rs index de454a72cc..0f54d38462 100644 --- a/runtime-modules/recurring-reward/src/mock/mod.rs +++ b/runtime-modules/recurring-reward/src/mock/mod.rs @@ -1,18 +1,16 @@ #![cfg(test)] -// use crate::*; use crate::{Module, Trait}; -use primitives::H256; - use balances; +use frame_support::{impl_outer_origin, parameter_types}; use minting; -use runtime_primitives::{ +use sp_core::H256; +use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, Perbill, }; -use srml_support::{impl_outer_origin, parameter_types}; mod status_handler; pub use status_handler::MockStatusHandler; @@ -33,10 +31,11 @@ parameter_types! { } impl system::Trait for Test { + type BaseCallFilter = (); type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; - type Call = (); type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -45,34 +44,29 @@ impl system::Trait for Test { type Event = (); type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = (); type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); + type ModuleToIndex = (); + type AccountData = balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u32 = 0; - pub const TransferFee: u32 = 0; - pub const CreationFee: u32 = 0; - pub const TransactionBaseFee: u32 = 1; - pub const TransactionByteFee: u32 = 0; } impl balances::Trait for Test { - /// The type for recording an account's balance. type Balance = u64; - /// What to do if an account's free balance gets zeroed. - type OnFreeBalanceZero = (); - /// What to do if a new account is created. - type OnNewAccount = (); - /// The ubiquitous event type. - type Event = (); - type DustRemoval = (); - type TransferPayment = (); + type Event = (); type ExistentialDeposit = ExistentialDeposit; - type TransferFee = TransferFee; - type CreationFee = CreationFee; + type AccountStore = System; } impl Trait for Test { @@ -86,7 +80,7 @@ impl minting::Trait for Test { type MintId = u64; } -pub fn build_test_externalities() -> runtime_io::TestExternalities { +pub fn build_test_externalities() -> sp_io::TestExternalities { MockStatusHandler::reset(); let t = system::GenesisConfig::default() diff --git a/runtime-modules/recurring-reward/src/tests.rs b/runtime-modules/recurring-reward/src/tests.rs index 8326682b68..3546602dbd 100644 --- a/runtime-modules/recurring-reward/src/tests.rs +++ b/runtime-modules/recurring-reward/src/tests.rs @@ -2,7 +2,7 @@ use super::*; use crate::mock::*; -use srml_support::traits::Currency; +use frame_support::traits::Currency; fn create_new_mint_with_capacity(capacity: u64) -> u64 { let mint_id = Minting::add_mint(capacity, None).ok().unwrap(); @@ -15,9 +15,9 @@ fn create_new_mint_with_capacity(capacity: u64) -> u64 { fn adding_recipients() { build_test_externalities().execute_with(|| { let next_id = Rewards::recipients_created(); - assert!(!>::exists(&next_id)); + assert!(!>::contains_key(&next_id)); let recipient_id = Rewards::add_recipient(); - assert!(>::exists(&next_id)); + assert!(>::contains_key(&next_id)); assert_eq!(recipient_id, next_id); assert_eq!(Rewards::recipients_created(), next_id + 1); }); @@ -49,7 +49,7 @@ fn adding_relationships() { Rewards::reward_relationships_created(), next_relationship_id + 1 ); - assert!(>::exists(&relationship_id)); + assert!(>::contains_key(&relationship_id)); let relationship = Rewards::reward_relationships(&relationship_id); assert_eq!(relationship.next_payment_at_block, Some(next_payment_at)); assert_eq!(relationship.amount_per_payout, payout); diff --git a/runtime-modules/stake/Cargo.toml b/runtime-modules/stake/Cargo.toml index d8de052e4c..74b3605d21 100755 --- a/runtime-modules/stake/Cargo.toml +++ b/runtime-modules/stake/Cargo.toml @@ -1,50 +1,30 @@ [package] -name = 'substrate-stake-module' -version = '2.0.0' +name = 'pallet-stake' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' [dependencies] -hex-literal = '0.1.0' -serde = { version = '1.0', optional = true } -serde_derive = { version = '1.0', optional = true } -rstd = { package = 'sr-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -runtime-primitives = { package = 'sr-primitives', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support = { package = 'srml-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support-procedural = { package = 'srml-support-procedural', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -system = { package = 'srml-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -balances = { package = 'srml-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -codec = { package = 'parity-scale-codec', version = '1.0.0', default-features = false, features = ['derive'] } -# https://users.rust-lang.org/t/failure-derive-compilation-error/39062 -quote = '<=1.0.2' - -[dependencies.timestamp] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-timestamp' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.runtime-io] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-io' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +rstd = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [dev-dependencies] -runtime-io = { package = 'sr-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -primitives = { package = 'substrate-primitives', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} +sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [features] default = ['std'] std = [ - 'serde', - 'serde_derive', 'codec/std', 'rstd/std', - 'runtime-io/std', - 'runtime-primitives/std', - 'srml-support/std', + 'frame-support/std', 'system/std', - 'balances/std', - 'timestamp/std', -] + 'sp-arithmetic/std', + 'sp-runtime/std', +] \ No newline at end of file diff --git a/runtime-modules/stake/src/lib.rs b/runtime-modules/stake/src/lib.rs index 572175ef3c..e98dd8467f 100755 --- a/runtime-modules/stake/src/lib.rs +++ b/runtime-modules/stake/src/lib.rs @@ -1,17 +1,15 @@ // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -use rstd::prelude::*; - use codec::{Codec, Decode, Encode}; -use runtime_primitives::traits::{ - AccountIdConversion, MaybeSerialize, Member, One, SimpleArithmetic, Zero, -}; -use runtime_primitives::ModuleId; -use srml_support::traits::{Currency, ExistenceRequirement, Get, Imbalance, WithdrawReasons}; -use srml_support::{decl_module, decl_storage, ensure, Parameter}; - +use frame_support::storage::IterableStorageMap; +use frame_support::traits::{Currency, ExistenceRequirement, Get, Imbalance, WithdrawReasons}; +use frame_support::{decl_module, decl_storage, ensure, Parameter}; use rstd::collections::btree_map::BTreeMap; +use rstd::prelude::*; +use sp_arithmetic::traits::{BaseArithmetic, One, Zero}; +use sp_runtime::traits::{AccountIdConversion, MaybeSerialize, Member}; +use sp_runtime::ModuleId; mod errors; pub use errors::*; @@ -38,7 +36,7 @@ pub trait Trait: system::Trait + Sized { /// The type used as a stake identifier. type StakeId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -48,7 +46,7 @@ pub trait Trait: system::Trait + Sized { /// The type used as slash identifier. type SlashId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -201,8 +199,8 @@ pub struct StakedState { impl StakedState where - BlockNumber: SimpleArithmetic + Copy, - Balance: SimpleArithmetic + Copy, + BlockNumber: BaseArithmetic + Copy, + Balance: BaseArithmetic + Copy, SlashId: Ord + Copy, { /// Iterates over all ongoing slashes and decrements blocks_remaining_in_active_period_for_slashing of active slashes (advancing the timer). @@ -268,7 +266,7 @@ where /// For all slahes that should be executed, will apply the Slash to the staked amount, and drop it from the ongoing slashes map. /// Returns a vector of the executed slashes outcome: (SlashId, Slashed Amount, Remaining Staked Amount) fn finalize_slashes(&mut self, minimum_balance: Balance) -> Vec<(SlashId, Balance, Balance)> { - let mut finalized_slashes: Vec<(SlashId, Balance, Balance)> = vec![]; + let mut finalized_slashes: Vec<(SlashId, Balance, Balance)> = Vec::new(); for (slash_id, slash) in self.get_slashes_to_finalize().iter() { // apply the slashing and get back actual amount slashed @@ -305,8 +303,8 @@ pub struct Stake { impl Stake where - BlockNumber: Copy + SimpleArithmetic + Zero, - Balance: Copy + SimpleArithmetic, + BlockNumber: Copy + BaseArithmetic + Zero, + Balance: Copy + BaseArithmetic, SlashId: Copy + Ord + Zero + One, { fn new(created_at: BlockNumber) -> Self { @@ -638,7 +636,7 @@ where (did_update, slashed) } - _ => (false, vec![]), + _ => (false, Vec::new()), } } @@ -711,11 +709,12 @@ pub struct SlashImmediateOutcome { decl_storage! { trait Store for Module as StakePool { /// Maps identifiers to a stake. - pub Stakes get(stakes): linked_map T::StakeId => Stake, T::SlashId>; + pub Stakes get(fn stakes): map hasher(blake2_128_concat) + T::StakeId => Stake, T::SlashId>; /// Identifier value for next stake, and count of total stakes created (not necessarily the number of current /// stakes in the Stakes map as stakes can be removed.) - pub StakesCreated get(stakes_created): T::StakeId; + pub StakesCreated get(fn stakes_created): T::StakeId; } } @@ -900,14 +899,11 @@ impl Module { source_account_id: &T::AccountId, value: BalanceOf, ) -> Result, StakeActionError> { - // Compiler error when using macro: cannot infer type for `ErrorType` - // let mut stake = ensure_stake_exists!(T, stake_id, StakeActionError::StakeNotFound)?; - ensure!( - >::exists(stake_id), - StakeActionError::StakeNotFound - ); - - let mut stake = Self::stakes(stake_id); + let mut stake = ensure_stake_exists!( + T, + stake_id, + >::StakeNotFound + )?; let total_staked_amount = stake.increase_stake(value)?; @@ -1141,7 +1137,7 @@ impl Module { /// Finalised slashing results in the staked_balance in the given stake being correspondingly reduced, and the imbalance /// is provided to the slashed() hook in the StakingEventsHandler. fn finalize_slashing_and_unstaking() { - for (stake_id, ref mut stake) in >::enumerate() { + for (stake_id, ref mut stake) in >::iter() { let (updated, slashed, unstaked) = stake.finalize_slashing_and_unstaking(T::Currency::minimum_balance()); diff --git a/runtime-modules/stake/src/macroes.rs b/runtime-modules/stake/src/macroes.rs index 56d76e4787..02ba974a37 100644 --- a/runtime-modules/stake/src/macroes.rs +++ b/runtime-modules/stake/src/macroes.rs @@ -1,7 +1,7 @@ #[macro_export] macro_rules! ensure_map_has_mapping_with_key { ($map_variable_name:ident , $runtime_trait:tt, $key:expr, $error:expr) => {{ - if <$map_variable_name<$runtime_trait>>::exists($key) { + if <$map_variable_name<$runtime_trait>>::contains_key($key) { let value = <$map_variable_name<$runtime_trait>>::get($key); Ok(value) diff --git a/runtime-modules/stake/src/mock.rs b/runtime-modules/stake/src/mock.rs index 44f85398d0..5ce19e87b3 100644 --- a/runtime-modules/stake/src/mock.rs +++ b/runtime-modules/stake/src/mock.rs @@ -1,17 +1,15 @@ #![cfg(test)] use crate::*; - -use primitives::H256; - use crate::{Module, Trait}; use balances; -use runtime_primitives::{ +use frame_support::{impl_outer_origin, parameter_types}; +use sp_core::H256; +use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, Perbill, }; -use srml_support::{impl_outer_origin, parameter_types}; impl_outer_origin! { pub enum Origin for Test {} @@ -25,14 +23,14 @@ parameter_types! { pub const MaximumBlockWeight: u32 = 1024; pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); - pub const MinimumPeriod: u64 = 5; } impl system::Trait for Test { + type BaseCallFilter = (); type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; - type Call = (); type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -41,35 +39,30 @@ impl system::Trait for Test { type Event = (); type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = (); type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); + type ModuleToIndex = (); + type AccountData = balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u32 = 500; - pub const TransferFee: u32 = 5; - pub const CreationFee: u32 = 5; - pub const TransactionBaseFee: u32 = 5; - pub const TransactionByteFee: u32 = 0; pub const StakePoolId: [u8; 8] = *b"joystake"; } impl balances::Trait for Test { - /// The type for recording an account's balance. type Balance = u64; - /// What to do if an account's free balance gets zeroed. - type OnFreeBalanceZero = (); - /// What to do if a new account is created. - type OnNewAccount = (); - /// The ubiquitous event type. - type Event = (); - type DustRemoval = (); - type TransferPayment = (); + type Event = (); type ExistentialDeposit = ExistentialDeposit; - type TransferFee = TransferFee; - type CreationFee = CreationFee; + type AccountStore = System; } impl Trait for Test { @@ -80,7 +73,7 @@ impl Trait for Test { type SlashId = u64; } -pub fn build_test_externalities() -> runtime_io::TestExternalities { +pub fn build_test_externalities() -> sp_io::TestExternalities { let t = system::GenesisConfig::default() .build_storage::() .unwrap(); @@ -99,17 +92,4 @@ pub mod fixtures { ::SlashId, Slash<::BlockNumber, BalanceOf>, >; - // pub enum StakeInState { - // NotStaked, - // StakedNormal(BalanceOf, OngoingSlashes), - // StakedUnstaking(BalanceOf, OngoingSlashes, ::BlockNumber), - // } - // fn get_next_slash_id() -> SlashId { - // } - // pub fn make_stake(state: StakeInState) -> StakeId { - // let id = StakePool::create_stake(); - // >::mutate(id, |stake| {}); - // id - // } - // fn stake_in_state_to_stake(StakeInState) -> StakedState {} } diff --git a/runtime-modules/stake/src/tests.rs b/runtime-modules/stake/src/tests.rs index daf23d7c49..e46d0181d3 100644 --- a/runtime-modules/stake/src/tests.rs +++ b/runtime-modules/stake/src/tests.rs @@ -2,8 +2,8 @@ use super::*; use crate::mock::*; -use runtime_primitives::traits::OnFinalize; -use srml_support::{assert_err, assert_ok}; +use frame_support::traits::OnFinalize; +use frame_support::{assert_err, assert_ok}; #[test] fn stake_pool_works() { @@ -70,7 +70,7 @@ fn create_stake() { build_test_externalities().execute_with(|| { let stake_id = StakePool::create_stake(); assert_eq!(stake_id, 0); - assert!(>::exists(&stake_id)); + assert!(>::contains_key(&stake_id)); assert_eq!(StakePool::stakes_created(), stake_id + 1); @@ -91,7 +91,7 @@ fn remove_stake_in_not_staked_state() { }, ); assert_ok!(StakePool::remove_stake(&100)); - assert!(!>::exists(&100)); + assert!(!>::contains_key(&100)); // when status is Staked, removing should fail >::insert( @@ -106,7 +106,7 @@ fn remove_stake_in_not_staked_state() { StakePool::remove_stake(&200), StakeActionError::Error(StakingError::AlreadyStaked) ); - assert!(>::exists(&200)); + assert!(>::contains_key(&200)); }); } diff --git a/runtime-modules/token-minting/Cargo.toml b/runtime-modules/token-minting/Cargo.toml index ec9d8afb97..ac868264d8 100755 --- a/runtime-modules/token-minting/Cargo.toml +++ b/runtime-modules/token-minting/Cargo.toml @@ -1,50 +1,27 @@ [package] -name = 'substrate-token-mint-module' -version = '1.0.1' +name = 'pallet-token-mint' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' [dependencies] -hex-literal = '0.1.0' -serde = { version = '1.0.101', optional = true} -serde_derive = { version = '1.0.101', optional = true } -rstd = { package = 'sr-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -runtime-primitives = { package = 'sr-primitives', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support = { package = 'srml-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support-procedural = { package = 'srml-support-procedural', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -system = { package = 'srml-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -balances = { package = 'srml-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -codec = { package = 'parity-scale-codec', version = '1.0.0', default-features = false, features = ['derive'] } -# https://users.rust-lang.org/t/failure-derive-compilation-error/39062 -quote = '<=1.0.2' - -[dependencies.timestamp] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-timestamp' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.runtime-io] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-io' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [dev-dependencies] -runtime-io = { package = 'sr-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -primitives = { package = 'substrate-primitives', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} +sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [features] default = ['std'] std = [ - 'serde', - 'serde_derive', 'codec/std', - 'rstd/std', - 'runtime-io/std', - 'runtime-primitives/std', - 'srml-support/std', + 'sp-arithmetic/std', + 'sp-runtime/std', + 'frame-support/std', 'system/std', - 'balances/std', - 'timestamp/std', ] diff --git a/runtime-modules/token-minting/src/lib.rs b/runtime-modules/token-minting/src/lib.rs index 1604762b02..a1c31089e8 100755 --- a/runtime-modules/token-minting/src/lib.rs +++ b/runtime-modules/token-minting/src/lib.rs @@ -6,13 +6,12 @@ // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -#[cfg(feature = "std")] -use rstd::prelude::*; - use codec::{Codec, Decode, Encode}; -use runtime_primitives::traits::{MaybeSerialize, Member, One, SimpleArithmetic, Zero}; -use srml_support::traits::Currency; -use srml_support::{decl_module, decl_storage, ensure, Parameter}; +use frame_support::storage::IterableStorageMap; +use frame_support::traits::Currency; +use frame_support::{decl_module, decl_storage, ensure, Parameter}; +use sp_arithmetic::traits::{BaseArithmetic, One, Zero}; +use sp_runtime::traits::{MaybeSerialize, Member}; mod mint; mod mock; @@ -27,7 +26,7 @@ pub trait Trait: system::Trait { /// The type used as a mint identifier. type MintId: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -107,13 +106,13 @@ pub enum Adjustment { decl_storage! { trait Store for Module as TokenMint { /// Mints - pub Mints get(mints) : linked_map T::MintId => Mint, T::BlockNumber>; + pub Mints get(fn mints) : map hasher(blake2_128_concat) T::MintId => Mint, T::BlockNumber>; /// The number of mints created. - pub MintsCreated get(mints_created): T::MintId; + pub MintsCreated get(fn mints_created): T::MintId; } } - +// pub Account: map hasher(blake2_128_concat) T::AccountId => AccountData; decl_module! { pub struct Module for enum Call where origin: T::Origin { fn on_finalize(now: T::BlockNumber) { @@ -125,7 +124,7 @@ decl_module! { impl Module { fn update_mints(now: T::BlockNumber) { // Are we reading value from storage twice? - for (mint_id, ref mut mint) in >::enumerate() { + for (mint_id, ref mut mint) in >::iter() { if mint.maybe_do_capacity_adjustment(now) { >::insert(&mint_id, mint); } @@ -199,7 +198,10 @@ impl Module { return Ok(()); } - ensure!(>::exists(&mint_id), TransferError::MintNotFound); + ensure!( + >::contains_key(&mint_id), + TransferError::MintNotFound + ); let mut mint = Self::mints(&mint_id); @@ -219,7 +221,10 @@ impl Module { mint_id: T::MintId, capacity: BalanceOf, ) -> Result<(), GeneralError> { - ensure!(>::exists(&mint_id), GeneralError::MintNotFound); + ensure!( + >::contains_key(&mint_id), + GeneralError::MintNotFound + ); >::mutate(&mint_id, |mint| { mint.set_capacity(capacity); @@ -237,11 +242,11 @@ impl Module { capacity_to_transfer: BalanceOf, ) -> Result<(), CapacityTransferError> { ensure!( - >::exists(&source), + >::contains_key(&source), CapacityTransferError::SourceMintNotFound ); ensure!( - >::exists(&destination), + >::contains_key(&destination), CapacityTransferError::DestinationMintNotFound ); @@ -256,7 +261,10 @@ impl Module { /// Returns a mint's capacity if it exists, error otherwise. pub fn get_mint_capacity(mint_id: T::MintId) -> Result, GeneralError> { - ensure!(>::exists(&mint_id), GeneralError::MintNotFound); + ensure!( + >::contains_key(&mint_id), + GeneralError::MintNotFound + ); let mint = Self::mints(&mint_id); Ok(mint.capacity()) @@ -266,7 +274,10 @@ impl Module { pub fn get_mint_next_adjustment( mint_id: T::MintId, ) -> Result, T::BlockNumber>>, GeneralError> { - ensure!(>::exists(&mint_id), GeneralError::MintNotFound); + ensure!( + >::contains_key(&mint_id), + GeneralError::MintNotFound + ); let mint = Self::mints(&mint_id); @@ -275,6 +286,6 @@ impl Module { /// Returns true if a mint exists. pub fn mint_exists(mint_id: T::MintId) -> bool { - >::exists(&mint_id) + >::contains_key(&mint_id) } } diff --git a/runtime-modules/token-minting/src/mint.rs b/runtime-modules/token-minting/src/mint.rs index 9ec438a1bd..e76614925f 100644 --- a/runtime-modules/token-minting/src/mint.rs +++ b/runtime-modules/token-minting/src/mint.rs @@ -1,6 +1,6 @@ use codec::{Decode, Encode}; -use runtime_primitives::traits::{SimpleArithmetic, Zero}; -use srml_support::ensure; +use frame_support::ensure; +use sp_arithmetic::traits::{BaseArithmetic, Zero}; #[derive(Encode, Decode, Copy, Clone, Debug, Eq, PartialEq)] pub enum AdjustCapacityBy { @@ -30,8 +30,8 @@ pub struct NextAdjustment { // We want Default trait on TokenMint so we can use it as value in StorageMap without needing to wrap it in an Option pub struct Mint where - Balance: Copy + SimpleArithmetic + Zero, - BlockNumber: Copy + SimpleArithmetic, + Balance: Copy + BaseArithmetic + Zero, + BlockNumber: Copy + BaseArithmetic, { capacity: Balance, @@ -51,8 +51,8 @@ pub enum MintingError { impl Mint where - Balance: Copy + SimpleArithmetic + Zero, - BlockNumber: Copy + SimpleArithmetic, + Balance: Copy + BaseArithmetic + Zero, + BlockNumber: Copy + BaseArithmetic, { pub fn new( initial_capacity: Balance, diff --git a/runtime-modules/token-minting/src/mock.rs b/runtime-modules/token-minting/src/mock.rs index fb839f9537..591d2589fa 100644 --- a/runtime-modules/token-minting/src/mock.rs +++ b/runtime-modules/token-minting/src/mock.rs @@ -1,17 +1,14 @@ #![cfg(test)] -use crate::*; - -use primitives::H256; - use crate::{Module, Trait}; use balances; -use runtime_primitives::{ +use frame_support::{impl_outer_origin, parameter_types}; +use sp_core::H256; +use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, Perbill, }; -use srml_support::{impl_outer_origin, parameter_types}; impl_outer_origin! { pub enum Origin for Test {} @@ -25,14 +22,14 @@ parameter_types! { pub const MaximumBlockWeight: u32 = 1024; pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); - pub const MinimumPeriod: u64 = 5; } impl system::Trait for Test { + type BaseCallFilter = (); type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; - type Call = (); type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -41,9 +38,17 @@ impl system::Trait for Test { type Event = (); type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = (); type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); + type ModuleToIndex = (); + type AccountData = balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); } parameter_types! { @@ -55,20 +60,11 @@ parameter_types! { } impl balances::Trait for Test { - /// The type for recording an account's balance. type Balance = u64; - /// What to do if an account's free balance gets zeroed. - type OnFreeBalanceZero = (); - /// What to do if a new account is created. - type OnNewAccount = (); - /// The ubiquitous event type. - type Event = (); - type DustRemoval = (); - type TransferPayment = (); + type Event = (); type ExistentialDeposit = ExistentialDeposit; - type TransferFee = TransferFee; - type CreationFee = CreationFee; + type AccountStore = System; } impl Trait for Test { @@ -76,7 +72,7 @@ impl Trait for Test { type MintId = u64; } -pub fn build_test_externalities() -> runtime_io::TestExternalities { +pub fn build_test_externalities() -> sp_io::TestExternalities { let t = system::GenesisConfig::default() .build_storage::() .unwrap(); diff --git a/runtime-modules/versioned-store-permissions/Cargo.toml b/runtime-modules/versioned-store-permissions/Cargo.toml index f49cbf390a..b973cf2178 100755 --- a/runtime-modules/versioned-store-permissions/Cargo.toml +++ b/runtime-modules/versioned-store-permissions/Cargo.toml @@ -1,44 +1,31 @@ [package] -name = 'substrate-versioned-store-permissions-module' -version = '1.0.1' +name = 'pallet-versioned-store-permissions' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' [dependencies] -hex-literal = '0.1.0' -serde = { version = '1.0', optional = true } -serde_derive = { version = '1.0', optional = true } -codec = { package = 'parity-scale-codec', version = '1.0.0', default-features = false, features = ['derive'] } -rstd = { package = 'sr-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -runtime-primitives = { package = 'sr-primitives', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support = { package = 'srml-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support-procedural = { package = 'srml-support-procedural', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -system = { package = 'srml-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -timestamp = { package = 'srml-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -runtime-io = { package = 'sr-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -# https://users.rust-lang.org/t/failure-derive-compilation-error/39062 -quote = '<=1.0.2' - -[dependencies.versioned-store] -default_features = false -package ='substrate-versioned-store' -path = '../versioned-store' +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +rstd = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +versioned-store = { package = 'pallet-versioned-store', default-features = false, path = '../versioned-store'} [dev-dependencies] -runtime-io = { package = 'sr-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -primitives = { package = 'substrate-primitives', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} +sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [features] default = ['std'] std = [ - 'serde', - 'serde_derive', 'codec/std', 'rstd/std', - 'runtime-io/std', - 'runtime-primitives/std', - 'srml-support/std', + 'frame-support/std', 'system/std', - 'timestamp/std', - 'versioned-store/std', -] + 'sp-arithmetic/std', + 'sp-runtime/std', + 'versioned-store/std', +] \ No newline at end of file diff --git a/runtime-modules/versioned-store-permissions/src/credentials.rs b/runtime-modules/versioned-store-permissions/src/credentials.rs index f31978dd07..bf3dbcc36e 100644 --- a/runtime-modules/versioned-store-permissions/src/credentials.rs +++ b/runtime-modules/versioned-store-permissions/src/credentials.rs @@ -1,6 +1,5 @@ use codec::{Decode, Encode}; use rstd::collections::btree_set::BTreeSet; -use rstd::prelude::*; #[derive(Encode, Decode, Eq, PartialEq, Clone, Debug)] pub struct CredentialSet(BTreeSet); diff --git a/runtime-modules/versioned-store-permissions/src/lib.rs b/runtime-modules/versioned-store-permissions/src/lib.rs index 69ba3d50f2..8dbcfa07c4 100755 --- a/runtime-modules/versioned-store-permissions/src/lib.rs +++ b/runtime-modules/versioned-store-permissions/src/lib.rs @@ -2,10 +2,14 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::Codec; +use frame_support::{decl_module, decl_storage, ensure, Parameter}; use rstd::collections::btree_map::BTreeMap; -use rstd::prelude::*; -use runtime_primitives::traits::{MaybeSerialize, Member, SimpleArithmetic}; -use srml_support::{decl_module, decl_storage, dispatch, ensure, Parameter}; +use sp_arithmetic::traits::BaseArithmetic; +use sp_runtime::traits::{MaybeSerialize, Member}; + +//TODO: Convert errors to the Substrate decl_error! macro. +/// Result with string error message. This exists for backward compatibility purpose. +pub type DispatchResult = Result<(), &'static str>; // EntityId, ClassId -> should be configured on versioned_store::Trait pub use versioned_store::{ClassId, ClassPropertyValue, EntityId, Property, PropertyValue}; @@ -60,13 +64,10 @@ pub type ClassPermissionsType = ClassPermissions::Credential, u16, ::BlockNumber>; pub trait Trait: system::Trait + versioned_store::Trait { - // type Event: ... - // Do we need Events? - /// Type that represents an actor or group of actors in the system. type Credential: Parameter + Member - + SimpleArithmetic + + BaseArithmetic + Codec + Default + Copy @@ -86,10 +87,12 @@ pub trait Trait: system::Trait + versioned_store::Trait { decl_storage! { trait Store for Module as VersionedStorePermissions { /// ClassPermissions of corresponding Classes in the versioned store - pub ClassPermissionsByClassId get(class_permissions_by_class_id): linked_map ClassId => ClassPermissionsType; + pub ClassPermissionsByClassId get(fn class_permissions_by_class_id): map hasher(blake2_128_concat) + ClassId => ClassPermissionsType; /// Owner of an entity in the versioned store. If it is None then it is owned by the system. - pub EntityMaintainerByEntityId get(entity_maintainer_by_entity_id): linked_map EntityId => Option; + pub EntityMaintainerByEntityId get(fn entity_maintainer_by_entity_id): map hasher(blake2_128_concat) + EntityId => Option; } } @@ -97,11 +100,12 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { /// Sets the admins for a class + #[weight = 10_000_000] // TODO: adjust weight fn set_class_admins( origin, class_id: ClassId, admins: CredentialSet - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::mutate_class_permissions( @@ -117,13 +121,13 @@ decl_module! { } // Methods for updating concrete permissions - + #[weight = 10_000_000] // TODO: adjust weight fn set_class_entity_permissions( origin, with_credential: Option, class_id: ClassId, entity_permissions: EntityPermissions - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::mutate_class_permissions( @@ -138,12 +142,13 @@ decl_module! { ) } + #[weight = 10_000_000] // TODO: adjust weight fn set_class_entities_can_be_created( origin, with_credential: Option, class_id: ClassId, can_be_created: bool - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::mutate_class_permissions( @@ -158,12 +163,13 @@ decl_module! { ) } + #[weight = 10_000_000] // TODO: adjust weight fn set_class_add_schemas_set( origin, with_credential: Option, class_id: ClassId, credential_set: CredentialSet - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::mutate_class_permissions( @@ -178,12 +184,13 @@ decl_module! { ) } + #[weight = 10_000_000] // TODO: adjust weight fn set_class_create_entities_set( origin, with_credential: Option, class_id: ClassId, credential_set: CredentialSet - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::mutate_class_permissions( @@ -198,12 +205,13 @@ decl_module! { ) } + #[weight = 10_000_000] // TODO: adjust weight fn set_class_reference_constraint( origin, with_credential: Option, class_id: ClassId, constraint: ReferenceConstraint - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::mutate_class_permissions( @@ -224,7 +232,7 @@ decl_module! { // origin, // entity_id: EntityId, // new_maintainer: Option - // ) -> dispatch::Result { + // ) -> DispatchResult { // ensure_root(origin)?; // // ensure entity exists in the versioned store @@ -238,13 +246,13 @@ decl_module! { // } // Permissioned proxy calls to versioned store - + #[weight = 10_000_000] // TODO: adjust weight pub fn create_class( origin, name: Vec, description: Vec, class_permissions: ClassPermissionsType - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; let can_create_class = match raw_origin { @@ -268,21 +276,23 @@ decl_module! { } } + #[weight = 10_000_000] // TODO: adjust weight pub fn create_class_with_default_permissions( origin, name: Vec, description: Vec - ) -> dispatch::Result { + ) -> DispatchResult { Self::create_class(origin, name, description, ClassPermissions::default()) } + #[weight = 10_000_000] // TODO: adjust weight pub fn add_class_schema( origin, with_credential: Option, class_id: ClassId, existing_properties: Vec, new_properties: Vec - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::if_class_permissions_satisfied( @@ -304,16 +314,18 @@ decl_module! { /// Creates a new entity of type class_id. The maintainer is set to be either None if the origin is root, or the provided credential /// associated with signer. + #[weight = 10_000_000] // TODO: adjust weight pub fn create_entity( origin, with_credential: Option, class_id: ClassId - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; let _entity_id = Self::do_create_entity(&raw_origin, with_credential, class_id)?; Ok(()) } + #[weight = 10_000_000] // TODO: adjust weight pub fn add_schema_support_to_entity( origin, with_credential: Option, @@ -321,23 +333,25 @@ decl_module! { entity_id: EntityId, schema_id: u16, // Do not type alias u16!! - u16, property_values: Vec - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::do_add_schema_support_to_entity(&raw_origin, with_credential, as_entity_maintainer, entity_id, schema_id, property_values) } + #[weight = 10_000_000] // TODO: adjust weight pub fn update_entity_property_values( origin, with_credential: Option, as_entity_maintainer: bool, entity_id: EntityId, property_values: Vec - ) -> dispatch::Result { + ) -> DispatchResult { let raw_origin = Self::ensure_root_or_signed(origin)?; Self::do_update_entity_property_values(&raw_origin, with_credential, as_entity_maintainer, entity_id, property_values) } - pub fn transaction(origin, operations: Vec>) -> dispatch::Result { + #[weight = 10_000_000] // TODO: adjust weight + pub fn transaction(origin, operations: Vec>) -> DispatchResult { // This map holds the EntityId of the entity created as a result of executing a CreateEntity Operation // keyed by the indexed of the operation, in the operations vector. let mut entity_created_in_operation: BTreeMap = BTreeMap::new(); @@ -415,7 +429,7 @@ impl Module { as_entity_maintainer: bool, entity_id: EntityId, property_values: Vec, - ) -> dispatch::Result { + ) -> DispatchResult { let class_id = Self::get_class_id_by_entity_id(entity_id)?; Self::ensure_internal_property_values_permitted(class_id, &property_values)?; @@ -448,7 +462,7 @@ impl Module { entity_id: EntityId, schema_id: u16, property_values: Vec, - ) -> dispatch::Result { + ) -> DispatchResult { // class id of the entity being updated let class_id = Self::get_class_id_by_entity_id(entity_id)?; @@ -491,7 +505,7 @@ impl Module { if let Some(entity_id) = as_entity_maintainer { // is entity maintained by system ensure!( - >::exists(entity_id), + >::contains_key(entity_id), "NotEnityMaintainer" ); // ensure entity maintainer matches @@ -522,7 +536,7 @@ impl Module { class_id: ClassId, ) -> Result, &'static str> { ensure!( - >::exists(class_id), + >::contains_key(class_id), "ClassPermissionsNotFoundByClassId" ); Ok(Self::class_permissions_by_class_id(class_id)) @@ -539,11 +553,10 @@ impl Module { class_id: ClassId, // actual mutation to apply. mutate: Mutate, - ) -> dispatch::Result + ) -> DispatchResult where - Predicate: - FnOnce(&ClassPermissionsType, &AccessLevel) -> dispatch::Result, - Mutate: FnOnce(&mut ClassPermissionsType) -> dispatch::Result, + Predicate: FnOnce(&ClassPermissionsType, &AccessLevel) -> DispatchResult, + Mutate: FnOnce(&mut ClassPermissionsType) -> DispatchResult, { let access_level = Self::derive_access_level(raw_origin, with_credential, None)?; let mut class_permissions = Self::ensure_class_permissions(class_id)?; @@ -558,7 +571,7 @@ impl Module { fn is_system( _: &ClassPermissionsType, access_level: &AccessLevel, - ) -> dispatch::Result { + ) -> DispatchResult { if *access_level == AccessLevel::System { Ok(()) } else { @@ -581,8 +594,7 @@ impl Module { callback: Callback, ) -> Result where - Predicate: - FnOnce(&ClassPermissionsType, &AccessLevel) -> dispatch::Result, + Predicate: FnOnce(&ClassPermissionsType, &AccessLevel) -> DispatchResult, Callback: FnOnce( &ClassPermissionsType, &AccessLevel, @@ -599,7 +611,7 @@ impl Module { fn get_class_id_by_entity_id(entity_id: EntityId) -> Result { // use a utility method on versioned_store module ensure!( - versioned_store::EntityById::exists(entity_id), + versioned_store::EntityById::contains_key(entity_id), "EntityNotFound" ); let entity = >::entity_by_id(entity_id); @@ -611,7 +623,7 @@ impl Module { fn ensure_internal_property_values_permitted( source_class_id: ClassId, property_values: &[ClassPropertyValue], - ) -> dispatch::Result { + ) -> DispatchResult { for property_value in property_values.iter() { if let PropertyValue::Internal(ref target_entity_id) = property_value.value { // get the class permissions for target class diff --git a/runtime-modules/versioned-store-permissions/src/mock.rs b/runtime-modules/versioned-store-permissions/src/mock.rs index 750bc16ee7..7ff0c4b840 100644 --- a/runtime-modules/versioned-store-permissions/src/mock.rs +++ b/runtime-modules/versioned-store-permissions/src/mock.rs @@ -3,13 +3,13 @@ use crate::*; use crate::{Module, Trait}; -use primitives::H256; -use runtime_primitives::{ +use frame_support::{impl_outer_origin, parameter_types}; +use sp_core::H256; +use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, Perbill, }; -use srml_support::{impl_outer_origin, parameter_types}; use versioned_store::InputValidationLengthConstraint; impl_outer_origin! { @@ -28,10 +28,11 @@ parameter_types! { } impl system::Trait for Runtime { + type BaseCallFilter = (); type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; - type Call = (); type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -40,9 +41,17 @@ impl system::Trait for Runtime { type Event = (); type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = (); type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); + type ModuleToIndex = (); + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); } impl timestamp::Trait for Runtime { @@ -141,9 +150,7 @@ fn default_versioned_store_genesis_config() -> versioned_store::GenesisConfig { } } -fn build_test_externalities( - config: versioned_store::GenesisConfig, -) -> runtime_io::TestExternalities { +fn build_test_externalities(config: versioned_store::GenesisConfig) -> sp_io::TestExternalities { let mut t = system::GenesisConfig::default() .build_storage::() .unwrap(); diff --git a/runtime-modules/versioned-store-permissions/src/operations.rs b/runtime-modules/versioned-store-permissions/src/operations.rs index db020125df..88b28b9fde 100644 --- a/runtime-modules/versioned-store-permissions/src/operations.rs +++ b/runtime-modules/versioned-store-permissions/src/operations.rs @@ -1,6 +1,5 @@ use codec::{Decode, Encode}; use rstd::collections::btree_map::BTreeMap; -use rstd::prelude::*; use versioned_store::{ClassId, ClassPropertyValue, EntityId, PropertyValue}; #[derive(Encode, Decode, Eq, PartialEq, Clone, Debug)] diff --git a/runtime-modules/versioned-store-permissions/src/permissions.rs b/runtime-modules/versioned-store-permissions/src/permissions.rs index 3d0c3759d6..33afde168f 100644 --- a/runtime-modules/versioned-store-permissions/src/permissions.rs +++ b/runtime-modules/versioned-store-permissions/src/permissions.rs @@ -1,8 +1,8 @@ use codec::{Decode, Encode}; -use srml_support::dispatch; use crate::constraint::*; use crate::credentials::*; +use crate::DispatchResult; /// Permissions for an instance of a Class in the versioned store. #[derive(Encode, Decode, Default, Eq, PartialEq, Clone, Debug)] @@ -48,7 +48,7 @@ where pub fn is_admin( class_permissions: &Self, access_level: &AccessLevel, - ) -> dispatch::Result { + ) -> DispatchResult { match access_level { AccessLevel::System => Ok(()), AccessLevel::Credential(credential) => { @@ -66,7 +66,7 @@ where pub fn can_add_class_schema( class_permissions: &Self, access_level: &AccessLevel, - ) -> dispatch::Result { + ) -> DispatchResult { match access_level { AccessLevel::System => Ok(()), AccessLevel::Credential(credential) => { @@ -84,7 +84,7 @@ where pub fn can_create_entity( class_permissions: &Self, access_level: &AccessLevel, - ) -> dispatch::Result { + ) -> DispatchResult { match access_level { AccessLevel::System => Ok(()), AccessLevel::Credential(credential) => { @@ -104,7 +104,7 @@ where pub fn can_update_entity( class_permissions: &Self, access_level: &AccessLevel, - ) -> dispatch::Result { + ) -> DispatchResult { match access_level { AccessLevel::System => Ok(()), AccessLevel::Credential(credential) => { diff --git a/runtime-modules/versioned-store-permissions/src/tests.rs b/runtime-modules/versioned-store-permissions/src/tests.rs index 07b5fb54ad..6e785f7523 100644 --- a/runtime-modules/versioned-store-permissions/src/tests.rs +++ b/runtime-modules/versioned-store-permissions/src/tests.rs @@ -5,7 +5,7 @@ use crate::mock::*; use rstd::collections::btree_set::BTreeSet; use versioned_store::PropertyType; -use srml_support::{assert_err, assert_ok}; +use frame_support::{assert_err, assert_ok}; fn simple_test_schema() -> Vec { vec![Property { @@ -77,7 +77,7 @@ fn create_class_then_entity_with_default_class_permissions() { let class_id = create_simple_class_with_default_permissions(); - assert!(>::exists(class_id)); + assert!(>::contains_key(class_id)); // default class permissions have empty add_schema acl assert_err!( @@ -94,7 +94,7 @@ fn create_class_then_entity_with_default_class_permissions() { // give members of GROUP_ZERO permission to add schemas let add_schema_set = CredentialSet::from(vec![0]); assert_ok!(Permissions::set_class_add_schemas_set( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, add_schema_set @@ -111,9 +111,15 @@ fn create_class_then_entity_with_default_class_permissions() { // System can always create entities (provided class exists) bypassing any permissions let entity_id_1 = next_entity_id(); - assert_ok!(Permissions::create_entity(Origin::ROOT, None, class_id,)); + assert_ok!(Permissions::create_entity( + system::RawOrigin::Root.into(), + None, + class_id, + )); // entities created by system are "un-owned" - assert!(!>::exists(entity_id_1)); + assert!(!>::contains_key( + entity_id_1 + )); assert_eq!( Permissions::entity_maintainer_by_entity_id(entity_id_1), None @@ -130,7 +136,7 @@ fn create_class_then_entity_with_default_class_permissions() { ); assert_ok!(Permissions::set_class_entities_can_be_created( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, true @@ -148,7 +154,7 @@ fn create_class_then_entity_with_default_class_permissions() { // give members of GROUP_ONE permission to create entities let create_entities_set = CredentialSet::from(vec![1]); assert_ok!(Permissions::set_class_create_entities_set( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, create_entities_set @@ -160,7 +166,9 @@ fn create_class_then_entity_with_default_class_permissions() { Some(1), class_id, )); - assert!(>::exists(entity_id_2)); + assert!(>::contains_key( + entity_id_2 + )); assert_eq!( Permissions::entity_maintainer_by_entity_id(entity_id_2), Some(1) @@ -216,7 +224,7 @@ fn class_permissions_set_admins() { ); assert_err!( Permissions::set_class_admins( - Origin::NONE, //unsigned inherent? + system::RawOrigin::None.into(), //unsigned inherent? class_id, credential_set.clone() ), @@ -225,7 +233,7 @@ fn class_permissions_set_admins() { // root origin can set admins assert_ok!(Permissions::set_class_admins( - Origin::ROOT, + system::RawOrigin::Root.into(), class_id, credential_set.clone() )); @@ -250,7 +258,7 @@ fn class_permissions_set_add_schemas_set() { // root assert_ok!(Permissions::set_class_add_schemas_set( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, credential_set1.clone() @@ -296,7 +304,7 @@ fn class_permissions_set_class_create_entities_set() { // root assert_ok!(Permissions::set_class_create_entities_set( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, credential_set1.clone() @@ -339,7 +347,7 @@ fn class_permissions_set_class_entities_can_be_created() { // root assert_ok!(Permissions::set_class_entities_can_be_created( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, true @@ -387,7 +395,7 @@ fn class_permissions_set_class_entity_permissions() { //root assert_ok!(Permissions::set_class_entity_permissions( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, entity_permissions1.clone() @@ -441,7 +449,7 @@ fn class_permissions_set_class_reference_constraint() { //root assert_ok!(Permissions::set_class_reference_constraint( - Origin::ROOT, + system::RawOrigin::Root.into(), None, class_id, reference_constraint1.clone() @@ -505,7 +513,7 @@ fn batch_transaction_simple() { }]; assert_ok!(Permissions::add_class_schema( - Origin::ROOT, + system::RawOrigin::Root.into(), None, new_class_id, vec![], @@ -564,8 +572,8 @@ fn batch_transaction_simple() { )); // two entities created - assert!(versioned_store::EntityById::exists(entity_id)); - assert!(versioned_store::EntityById::exists(entity_id + 1)); + assert!(versioned_store::EntityById::contains_key(entity_id)); + assert!(versioned_store::EntityById::contains_key(entity_id + 1)); }) } @@ -589,7 +597,7 @@ fn batch_transaction_vector_of_entities() { }]; assert_ok!(Permissions::add_class_schema( - Origin::ROOT, + system::RawOrigin::Root.into(), None, new_class_id, vec![], @@ -645,9 +653,9 @@ fn batch_transaction_vector_of_entities() { )); // three entities created - assert!(versioned_store::EntityById::exists(entity_id)); - assert!(versioned_store::EntityById::exists(entity_id + 1)); - assert!(versioned_store::EntityById::exists(entity_id + 2)); + assert!(versioned_store::EntityById::contains_key(entity_id)); + assert!(versioned_store::EntityById::contains_key(entity_id + 1)); + assert!(versioned_store::EntityById::contains_key(entity_id + 2)); assert_eq!( versioned_store::EntityById::get(entity_id), diff --git a/runtime-modules/versioned-store/Cargo.toml b/runtime-modules/versioned-store/Cargo.toml index 3bae748ff9..71730a1cc3 100755 --- a/runtime-modules/versioned-store/Cargo.toml +++ b/runtime-modules/versioned-store/Cargo.toml @@ -1,50 +1,29 @@ [package] -name = 'substrate-versioned-store' -version = '1.0.1' +name = 'pallet-versioned-store' +version = '3.0.0' authors = ['Joystream contributors'] edition = '2018' [dependencies] -hex-literal = '0.1.0' -serde = { version = '1.0', optional = true } -serde_derive = { version = '1.0', optional = true } -rstd = { package = 'sr-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -runtime-primitives = { package = 'sr-primitives', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support = { package = 'srml-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -srml-support-procedural = { package = 'srml-support-procedural', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -system = { package = 'srml-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -balances = { package = 'srml-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -codec = { package = 'parity-scale-codec', version = '1.0.0', default-features = false, features = ['derive'] } -# https://users.rust-lang.org/t/failure-derive-compilation-error/39062 -quote = '<=1.0.2' - -[dependencies.timestamp] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'srml-timestamp' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' - -[dependencies.runtime-io] -default_features = false -git = 'https://github.com/paritytech/substrate.git' -package = 'sr-io' -rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8' +serde = { version = "1.0.101", optional = true, features = ["derive"] } +codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] } +rstd = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} [dev-dependencies] -runtime-io = { package = 'sr-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} -primitives = { package = 'substrate-primitives', git = 'https://github.com/paritytech/substrate.git', rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'} +sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} +timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'} + [features] default = ['std'] std = [ 'serde', - 'serde_derive', 'codec/std', 'rstd/std', - 'runtime-io/std', - 'runtime-primitives/std', - 'srml-support/std', + 'frame-support/std', 'system/std', - 'balances/std', - 'timestamp/std', -] +] \ No newline at end of file diff --git a/runtime-modules/versioned-store/src/example.rs b/runtime-modules/versioned-store/src/example.rs index 032d5ff4ab..98fc705f5c 100644 --- a/runtime-modules/versioned-store/src/example.rs +++ b/runtime-modules/versioned-store/src/example.rs @@ -3,7 +3,7 @@ use super::*; use crate::mock::*; -use srml_support::assert_ok; +use frame_support::assert_ok; /// This example uses Class, Properties, Schema and Entity structures /// to describe the Staked podcast channel and its second episode. diff --git a/runtime-modules/versioned-store/src/lib.rs b/runtime-modules/versioned-store/src/lib.rs index 310750080e..9d76e9928c 100755 --- a/runtime-modules/versioned-store/src/lib.rs +++ b/runtime-modules/versioned-store/src/lib.rs @@ -12,17 +12,20 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "std")] -use serde_derive::{Deserialize, Serialize}; +use serde::{Deserialize, Serialize}; use codec::{Decode, Encode}; +use frame_support::{decl_event, decl_module, decl_storage, ensure}; use rstd::collections::btree_set::BTreeSet; -use rstd::prelude::*; -use srml_support::{decl_event, decl_module, decl_storage, dispatch, ensure}; mod example; mod mock; mod tests; +//TODO: Convert errors to the Substrate decl_error! macro. +/// Result with string error message. This exists for backward compatibility purpose. +pub type DispatchResult = Result<(), &'static str>; + // Validation errors // -------------------------------------- @@ -135,7 +138,6 @@ pub struct Entity { /// Values for properties on class that are used by some schema used by this entity! /// Length is no more than Class.properties. pub values: Vec, - // pub deleted: bool, } /// A schema defines what properties describe an entity @@ -253,24 +255,24 @@ decl_storage! { trait Store for Module as VersionedStore { - pub ClassById get(class_by_id) config(): map ClassId => Class; + pub ClassById get(fn class_by_id) config(): map hasher(blake2_128_concat) ClassId => Class; - pub EntityById get(entity_by_id) config(): map EntityId => Entity; + pub EntityById get(fn entity_by_id) config(): map hasher(blake2_128_concat) EntityId => Entity; - pub NextClassId get(next_class_id) config(): ClassId; + pub NextClassId get(fn next_class_id) config(): ClassId; - pub NextEntityId get(next_entity_id) config(): EntityId; + pub NextEntityId get(fn next_entity_id) config(): EntityId; - pub PropertyNameConstraint get(property_name_constraint) + pub PropertyNameConstraint get(fn property_name_constraint) config(): InputValidationLengthConstraint; - pub PropertyDescriptionConstraint get(property_description_constraint) + pub PropertyDescriptionConstraint get(fn property_description_constraint) config(): InputValidationLengthConstraint; - pub ClassNameConstraint get(class_name_constraint) + pub ClassNameConstraint get(fn class_name_constraint) config(): InputValidationLengthConstraint; - pub ClassDescriptionConstraint get(class_description_constraint) + pub ClassDescriptionConstraint get(fn class_description_constraint) config(): InputValidationLengthConstraint; } } @@ -375,7 +377,7 @@ impl Module { // Check validity of Internal(ClassId) for new_properties. let has_unknown_internal_id = new_properties.iter().any(|prop| match prop.prop_type { - PropertyType::Internal(other_class_id) => !ClassById::exists(other_class_id), + PropertyType::Internal(other_class_id) => !ClassById::contains_key(other_class_id), _ => false, }); ensure!( @@ -434,7 +436,7 @@ impl Module { entity_id: EntityId, schema_id: u16, property_values: Vec, - ) -> dispatch::Result { + ) -> DispatchResult { Self::ensure_known_entity_id(entity_id)?; let (entity, class) = Self::get_entity_and_class(entity_id); @@ -521,7 +523,7 @@ impl Module { pub fn update_entity_property_values( entity_id: EntityId, new_property_values: Vec, - ) -> dispatch::Result { + ) -> DispatchResult { Self::ensure_known_entity_id(entity_id)?; let (entity, class) = Self::get_entity_and_class(entity_id); @@ -580,7 +582,7 @@ impl Module { } // Commented out for now <- requested by Bedeho. - // pub fn delete_entity(entity_id: EntityId) -> dispatch::Result { + // pub fn delete_entity(entity_id: EntityId) -> DispatchResult { // Self::ensure_known_entity_id(entity_id)?; // let is_deleted = EntityById::get(entity_id).deleted; @@ -597,17 +599,17 @@ impl Module { // Helper functions: // ---------------------------------------------------------------- - pub fn ensure_known_class_id(class_id: ClassId) -> dispatch::Result { - ensure!(ClassById::exists(class_id), ERROR_CLASS_NOT_FOUND); + pub fn ensure_known_class_id(class_id: ClassId) -> DispatchResult { + ensure!(ClassById::contains_key(class_id), ERROR_CLASS_NOT_FOUND); Ok(()) } - pub fn ensure_known_entity_id(entity_id: EntityId) -> dispatch::Result { - ensure!(EntityById::exists(entity_id), ERROR_ENTITY_NOT_FOUND); + pub fn ensure_known_entity_id(entity_id: EntityId) -> DispatchResult { + ensure!(EntityById::contains_key(entity_id), ERROR_ENTITY_NOT_FOUND); Ok(()) } - pub fn ensure_valid_internal_prop(value: PropertyValue, prop: Property) -> dispatch::Result { + pub fn ensure_valid_internal_prop(value: PropertyValue, prop: Property) -> DispatchResult { match (value, prop.prop_type) { (PV::Internal(entity_id), PT::Internal(class_id)) => { Self::ensure_known_class_id(class_id)?; @@ -625,7 +627,7 @@ impl Module { pub fn is_unknown_internal_entity_id(id: PropertyValue) -> bool { if let PropertyValue::Internal(entity_id) = id { - !EntityById::exists(entity_id) + !EntityById::contains_key(entity_id) } else { false } @@ -637,10 +639,7 @@ impl Module { (entity, class) } - pub fn ensure_property_value_is_valid( - value: PropertyValue, - prop: Property, - ) -> dispatch::Result { + pub fn ensure_property_value_is_valid(value: PropertyValue, prop: Property) -> DispatchResult { Self::ensure_prop_value_matches_its_type(value.clone(), prop.clone())?; Self::ensure_valid_internal_prop(value.clone(), prop.clone())?; Self::validate_max_len_if_text_prop(value.clone(), prop.clone())?; @@ -648,14 +647,14 @@ impl Module { Ok(()) } - pub fn validate_max_len_if_text_prop(value: PropertyValue, prop: Property) -> dispatch::Result { + pub fn validate_max_len_if_text_prop(value: PropertyValue, prop: Property) -> DispatchResult { match (value, prop.prop_type) { (PV::Text(text), PT::Text(max_len)) => Self::validate_max_len_of_text(text, max_len), _ => Ok(()), } } - pub fn validate_max_len_of_text(text: Vec, max_len: u16) -> dispatch::Result { + pub fn validate_max_len_of_text(text: Vec, max_len: u16) -> DispatchResult { if text.len() <= max_len as usize { Ok(()) } else { @@ -667,7 +666,7 @@ impl Module { pub fn validate_max_len_if_vec_prop( value: PropertyValue, prop: Property, - ) -> dispatch::Result { + ) -> DispatchResult { fn validate_vec_len(vec: Vec, max_len: u16) -> bool { vec.len() <= max_len as usize @@ -724,7 +723,7 @@ impl Module { pub fn ensure_prop_value_matches_its_type( value: PropertyValue, prop: Property, - ) -> dispatch::Result { + ) -> DispatchResult { if Self::does_prop_value_match_type(value, prop) { Ok(()) } else { @@ -774,7 +773,7 @@ impl Module { } } - pub fn ensure_property_name_is_valid(text: &[u8]) -> dispatch::Result { + pub fn ensure_property_name_is_valid(text: &[u8]) -> DispatchResult { PropertyNameConstraint::get().ensure_valid( text.len(), ERROR_PROPERTY_NAME_TOO_SHORT, @@ -782,7 +781,7 @@ impl Module { ) } - pub fn ensure_property_description_is_valid(text: &[u8]) -> dispatch::Result { + pub fn ensure_property_description_is_valid(text: &[u8]) -> DispatchResult { PropertyDescriptionConstraint::get().ensure_valid( text.len(), ERROR_PROPERTY_DESCRIPTION_TOO_SHORT, @@ -790,7 +789,7 @@ impl Module { ) } - pub fn ensure_class_name_is_valid(text: &[u8]) -> dispatch::Result { + pub fn ensure_class_name_is_valid(text: &[u8]) -> DispatchResult { ClassNameConstraint::get().ensure_valid( text.len(), ERROR_CLASS_NAME_TOO_SHORT, @@ -798,7 +797,7 @@ impl Module { ) } - pub fn ensure_class_description_is_valid(text: &[u8]) -> dispatch::Result { + pub fn ensure_class_description_is_valid(text: &[u8]) -> DispatchResult { ClassDescriptionConstraint::get().ensure_valid( text.len(), ERROR_CLASS_DESCRIPTION_TOO_SHORT, diff --git a/runtime-modules/versioned-store/src/mock.rs b/runtime-modules/versioned-store/src/mock.rs index 5bd79e3691..29fc62a307 100644 --- a/runtime-modules/versioned-store/src/mock.rs +++ b/runtime-modules/versioned-store/src/mock.rs @@ -3,13 +3,13 @@ use crate::*; use crate::{GenesisConfig, Module, Trait}; -use primitives::H256; -use runtime_primitives::{ +use frame_support::{assert_err, assert_ok, impl_outer_origin, parameter_types}; +use sp_core::H256; +use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, Perbill, }; -use srml_support::{assert_err, assert_ok, impl_outer_origin, parameter_types}; impl_outer_origin! { pub enum Origin for Runtime {} @@ -27,10 +27,11 @@ parameter_types! { } impl system::Trait for Runtime { + type BaseCallFilter = (); type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; - type Call = (); type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; @@ -39,9 +40,17 @@ impl system::Trait for Runtime { type Event = (); type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = (); type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); + type ModuleToIndex = (); + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); } impl timestamp::Trait for Runtime { @@ -60,15 +69,9 @@ pub const UNKNOWN_ENTITY_ID: EntityId = 222; pub const UNKNOWN_PROP_ID: u16 = 333; -// pub const UNKNOWN_SCHEMA_ID: u16 = 444; - pub const SCHEMA_ID_0: u16 = 0; pub const SCHEMA_ID_1: u16 = 1; -// pub fn generate_text(len: usize) -> Vec { -// vec![b'x'; len] -// } - pub fn good_class_name() -> Vec { b"Name of a class".to_vec() } @@ -206,7 +209,7 @@ pub fn assert_class_schemas(class_id: ClassId, expected_schema_prop_ids: Vec GenesisConfig { } } -fn build_test_externalities(config: GenesisConfig) -> runtime_io::TestExternalities { +fn build_test_externalities(config: GenesisConfig) -> sp_io::TestExternalities { let mut t = system::GenesisConfig::default() .build_storage::() .unwrap(); @@ -253,7 +256,5 @@ pub fn with_test_externalities R>(f: F) -> R { build_test_externalities(config).execute_with(f) } -// pub type System = system::Module; - /// Export module on a test runtime pub type TestModule = Module; diff --git a/runtime-modules/versioned-store/src/tests.rs b/runtime-modules/versioned-store/src/tests.rs index 3e2fee162a..506f31007d 100644 --- a/runtime-modules/versioned-store/src/tests.rs +++ b/runtime-modules/versioned-store/src/tests.rs @@ -3,7 +3,7 @@ use super::*; use crate::mock::*; -use srml_support::{assert_err, assert_ok}; +use frame_support::{assert_err, assert_ok}; // Create class // --------------------------------------