From 373b319c6f082a6cdce2bd5dcf7a983b09d2d64e Mon Sep 17 00:00:00 2001 From: wangjj9219 <183318287@qq.com> Date: Wed, 19 Feb 2020 14:56:48 +0800 Subject: [PATCH] update substrate (#114) --- Cargo.lock | 667 ++++++++++++++----------- Cargo.toml | 3 + modules/accounts/Cargo.toml | 7 +- modules/accounts/src/mock.rs | 8 +- modules/auction_manager/src/mock.rs | 4 + modules/cdp_engine/src/mock.rs | 9 +- modules/cdp_treasury/src/mock.rs | 9 +- modules/dex/Cargo.toml | 3 +- modules/dex/src/lib.rs | 4 +- modules/dex/src/mock.rs | 7 +- modules/emergency_shutdown/src/mock.rs | 9 +- modules/honzon/Cargo.toml | 3 +- modules/honzon/src/mock.rs | 9 +- modules/loans/Cargo.toml | 3 +- modules/loans/src/lib.rs | 6 +- modules/loans/src/mock.rs | 9 +- modules/prices/src/mock.rs | 3 + orml | 2 +- runtime/src/lib.rs | 45 +- src/chain_spec.rs | 16 +- src/executor.rs | 10 + src/main.rs | 1 + src/rpc.rs | 129 +++-- src/service.rs | 69 +-- 24 files changed, 609 insertions(+), 426 deletions(-) create mode 100644 src/executor.rs diff --git a/Cargo.lock b/Cargo.lock index e5f1c0a1c9..3e16e7d519 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,8 +31,11 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus-babe", + "sc-consensus-babe-rpc", + "sc-consensus-epochs", "sc-executor", "sc-finality-grandpa", + "sc-keystore", "sc-network", "sc-offchain", "sc-rpc", @@ -282,7 +285,7 @@ dependencies = [ "mio", "mio-uds", "num_cpus", - "once_cell 1.3.1", + "once_cell", "pin-project-lite", "pin-utils", "slab", @@ -584,6 +587,15 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "chacha20-poly1305-aead" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d2058ba29594f69c75e8a9018e0485e3914ca5084e3613cd64529042f5423b" +dependencies = [ + "constant_time_eq", +] + [[package]] name = "chrono" version = "0.4.10" @@ -666,6 +678,22 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "core-foundation" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" + [[package]] name = "crc32fast" version = "1.2.0" @@ -705,7 +733,7 @@ dependencies = [ "crossbeam-utils", "lazy_static", "memoffset", - "scopeguard 1.0.0", + "scopeguard", ] [[package]] @@ -1022,7 +1050,7 @@ checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "fork-tree" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", ] @@ -1030,7 +1058,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -1044,7 +1072,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "11.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "serde", @@ -1055,14 +1083,14 @@ dependencies = [ [[package]] name = "frame-support" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "bitmask", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "log", - "once_cell 0.2.4", + "once_cell", "parity-scale-codec", "paste", "serde", @@ -1079,7 +1107,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support-procedural-tools", "proc-macro2 1.0.8", @@ -1090,7 +1118,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1102,7 +1130,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "proc-macro2 1.0.8", "quote 1.0.2", @@ -1112,7 +1140,7 @@ dependencies = [ [[package]] name = "frame-system" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1128,7 +1156,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "sp-api", @@ -1296,9 +1324,9 @@ checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" [[package]] name = "futures-timer" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de1a2b2a2a33d9e60e17980b60ee061eeaae96a5abe9121db0fdb9af167a1c5" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" @@ -1424,12 +1452,12 @@ dependencies = [ [[package]] name = "grafana-data-source" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "async-std", "chrono", "derive_more", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "futures-util", "hyper 0.13.2", "lazy_static", @@ -1492,16 +1520,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" -dependencies = [ - "byteorder 1.3.4", - "scopeguard 0.3.3", -] - [[package]] name = "hashbrown" version = "0.5.0" @@ -1529,18 +1547,18 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" +checksum = "e2c55f143919fbc0bc77e427fe2d74cf23786d7c1875666f2fde3ac3c659bb67" dependencies = [ "libc", ] [[package]] name = "hex" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cdda6bf525062a0c9e8f14ee2b37935c86b8efb6c8b69b3c83dfb518a914af" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" [[package]] name = "hex-literal" @@ -1687,6 +1705,7 @@ dependencies = [ "httparse", "itoa", "log", + "net2", "pin-project", "time", "tokio 0.2.11", @@ -1696,19 +1715,19 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.17.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719d85c7df4a7f309a77d145340a063ea929dcb2e025bae46a80345cffec2952" +checksum = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" dependencies = [ - "bytes 0.4.12", + "bytes 0.5.4", "ct-logs", - "futures 0.1.29", - "hyper 0.12.35", + "futures-util", + "hyper 0.13.2", "rustls", - "tokio-io", + "rustls-native-certs", + "tokio 0.2.11", "tokio-rustls", "webpki", - "webpki-roots 0.17.0", ] [[package]] @@ -2043,9 +2062,9 @@ dependencies = [ [[package]] name = "libp2p" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84847789ab24b3fc5971a68656ac85886df640986d9ce3264c0327694eae471" +checksum = "f6bf152b510950e1030f2d3dcca5f0b4017892be50348a15fd3eec8b90c826fb" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -2063,6 +2082,7 @@ dependencies = [ "libp2p-noise", "libp2p-ping", "libp2p-plaintext", + "libp2p-pnet", "libp2p-secio", "libp2p-swarm", "libp2p-tcp", @@ -2080,16 +2100,16 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbafb2706b8082233f66dc13e196f9cf9b4c229f2cd7c96b2b16617ad6ee330b" +checksum = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", "fnv", "futures 0.3.4", - "futures-timer 2.0.2", + "futures-timer 3.0.2", "lazy_static", "libsecp256k1", "log", @@ -2107,16 +2127,15 @@ dependencies = [ "smallvec 1.2.0", "thiserror", "unsigned-varint", - "untrusted", "void", "zeroize 1.1.0", ] [[package]] name = "libp2p-core-derive" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c320266be0a7760e23484d635acdb83844b2d74d3612d93b41c393c9bcf004e" +checksum = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b" dependencies = [ "quote 1.0.2", "syn", @@ -2124,9 +2143,9 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.7.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be32697b42d040b325c3737f827ea04ede569ec956b7807700dd8d89d8210f9" +checksum = "2e25004d4d9837b44b22c5f1a69be1724a5168fef6cff1716b5176a972c3aa62" dependencies = [ "flate2", "futures 0.3.4", @@ -2135,9 +2154,9 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c979b882f25d85726b15637d5bbc722dfa1be576605c54e99b8cf56906be3" +checksum = "b99e552f9939b606eb4b59f7f64d9b01e3f96752f47e350fc3c5fc646ed3f649" dependencies = [ "futures 0.3.4", "libp2p-core", @@ -2146,11 +2165,10 @@ dependencies = [ [[package]] name = "libp2p-floodsub" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bdf6fba9272ad47dde94bade89540fdb16e24ae9ff7fb714c1c80a035165f28" +checksum = "1d3234f12e44f9a50351a9807b97fe7de11eb9ae4482370392ba10da6dc90722" dependencies = [ - "bs58", "cuckoofilter", "fnv", "futures 0.3.4", @@ -2164,12 +2182,11 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e6ecd058bf769d27ebec530544b081e08b0a1088e3186da8cc58d59915784d0" +checksum = "d46cb3e0841bd951cbf4feae56cdc081e6347836a644fb260c3ec554149b4006" dependencies = [ "base64 0.11.0", - "bs58", "byteorder 1.3.4", "bytes 0.5.4", "fnv", @@ -2190,9 +2207,9 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1a6261b804111c2dbf53f8ca03f66edc5ad1c29b78a61cf0cc5354052e28e9" +checksum = "bfeb935a9bd41263e4f3a24b988e9f4a044f3ae89ac284e83c17fe2f84e0d66b" dependencies = [ "futures 0.3.4", "libp2p-core", @@ -2206,9 +2223,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6ea6fece0d99599afb1b2082ca8937944cdd6b0946a88d54cb3ae7a38d1253" +checksum = "76c260a92309112fff855ab2bd8f26c246c1dd380b87021abe61358dedb9748d" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2233,9 +2250,9 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074312353355df310affa105ec71b16fd7e52f5c6ae61d3dcbb3e79e8fdc9e5f" +checksum = "881fcfb360c2822db9f0e6bb6f89529621556ed9a8b038313414eda5107334de" dependencies = [ "async-std", "data-encoding", @@ -2255,9 +2272,9 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d0b44dfdef80cc2be4b42d127de1c793905eca2459415a5c57d6b4fbd8ec30" +checksum = "d8507b37ad0eed275efcde67a023c3d85af6c80768b193845b9288e848e1af95" dependencies = [ "bytes 0.5.4", "fnv", @@ -2271,9 +2288,9 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.13.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845e8208d814cd41c26c90a6a2f2b720c31b588209cecc49a44c881a09f417f" +checksum = "ac7d33809afdf6794f09fdb2f9f94e1550ae230be5bae6430a078eb96fc9e5a6" dependencies = [ "curve25519-dalek 1.2.3", "futures 0.3.4", @@ -2283,17 +2300,18 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "ring", + "sha2", "snow", - "x25519-dalek", + "static_assertions", + "x25519-dalek 0.5.2", "zeroize 1.1.0", ] [[package]] name = "libp2p-ping" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ecced2949ae93b6ff29565303ecd1bef15c4e4efb689033ee744922561a36b" +checksum = "33d22f2f228b3a828dca1cb8aa9fa331e0bc9c36510cb2c1916956e20dc85e8c" dependencies = [ "futures 0.3.4", "libp2p-core", @@ -2306,9 +2324,9 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195fda6b6a948a242fd30570e0e3418ae8e0a20055ea75d45458e1079a8efb05" +checksum = "56126a204d7b3382bac163143ff4125a14570b3ba76ba979103d1ae1abed1923" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -2322,11 +2340,25 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-pnet" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b916938a8868f75180aeeffcc6a516a922d165e8fa2a90b57bad989d1ccbb57a" +dependencies = [ + "futures 0.3.4", + "log", + "pin-project", + "rand 0.7.3", + "salsa20", + "sha3", +] + [[package]] name = "libp2p-secio" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceef68ca377b264f84d64c88739a8fa118b5db1e8f18297351dff75314504a5f" +checksum = "1219e9ecb4945d7331a05f5ffe96a1f6e28051bfa1223d4c60353c251de0354e" dependencies = [ "aes-ctr", "ctr", @@ -2354,9 +2386,9 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.5.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ea00be81bc3985e36abad263ce2ad1b6aeb862aa743563eb70ad42880c05ae" +checksum = "275471e7c0e88ae004660866cd54f603bd8bd1f4caef541a27f50dd8640c4d4c" dependencies = [ "futures 0.3.4", "libp2p-core", @@ -2368,13 +2400,13 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e65ef381570df31cb047dfbc11483ab0fe7e6abbdcf2bdc2c60b5d11133d241" +checksum = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10" dependencies = [ "async-std", "futures 0.3.4", - "futures-timer 2.0.2", + "futures-timer 3.0.2", "get_if_addrs", "ipnet", "libp2p-core", @@ -2383,9 +2415,9 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4f4f7989b35f33d4b9738aab2f031310eb20fec513cab44d12b1bc985a8074" +checksum = "76d329564a43da9d0e055a5b938633c4a8ceab1f59cec133fbc4647917c07341" dependencies = [ "async-std", "futures 0.3.4", @@ -2395,9 +2427,9 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.8.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b4d457adb91a5e2212343218a554394cd8ced64a79fb8e36e7aed2a16d49495" +checksum = "7d40c95ac1a9b7fb7770616e4165f34559885337f3be485b32acdd085261be3a" dependencies = [ "futures 0.3.4", "js-sys", @@ -2409,9 +2441,9 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bba425f2af1fdb7dece88b9ae05ca9430dfb0b72b2c078e73ded6f1556084509" +checksum = "5351ca9eea122081c1c0f9323164d2918cac29b5a6bfe5054d4ba8ec9447cf42" dependencies = [ "async-tls", "bytes 0.5.4", @@ -2430,13 +2462,12 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca25b3aac78a3c93c2a567622abd3cfc16f96f26ae1bf6134f0056203d62d86" +checksum = "f72aa5a7273c29c6eaea09108a49feaefc7456164863f64f86a193f9e78a4b7f" dependencies = [ "futures 0.3.4", "libp2p-core", - "log", "parking_lot 0.10.0", "thiserror", "yamux", @@ -2497,22 +2528,13 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "lock_api" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -dependencies = [ - "scopeguard 0.3.3", -] - [[package]] name = "lock_api" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" dependencies = [ - "scopeguard 1.0.0", + "scopeguard", ] [[package]] @@ -2556,9 +2578,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" +checksum = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" [[package]] name = "memoffset" @@ -2930,9 +2952,9 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "nohash-hasher" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721a2bf1c26159ebf17e0a980bc4ce61f4b2fec5ec3b42d42fddd7a84a9e538f" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" @@ -3006,26 +3028,14 @@ dependencies = [ "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 = "once_cell" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" +dependencies = [ + "parking_lot 0.9.0", +] [[package]] name = "opaque-debug" @@ -3033,6 +3043,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" + [[package]] name = "orml-auction" version = "0.0.1" @@ -3199,7 +3215,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3216,7 +3232,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3237,7 +3253,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3251,7 +3267,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3266,7 +3282,7 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3282,7 +3298,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3300,7 +3316,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3316,7 +3332,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3330,7 +3346,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3343,7 +3359,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "enumflags2", "frame-support", @@ -3358,7 +3374,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3376,7 +3392,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3395,7 +3411,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.8", @@ -3406,7 +3422,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3420,7 +3436,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3437,7 +3453,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3450,7 +3466,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -3468,7 +3484,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "parity-scale-codec", @@ -3481,7 +3497,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3495,7 +3511,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-support", "frame-system", @@ -3515,9 +3531,9 @@ checksum = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a" [[package]] name = "parity-multiaddr" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80878c27f90dd162d3143333d672e80b194d6b080f05c83440e3dfda42e409f2" +checksum = "26df883298bc3f4e92528b4c5cc9f806b791955b136da3e5e939ed9de0fd958b" dependencies = [ "arrayref", "bs58", @@ -3533,9 +3549,9 @@ dependencies = [ [[package]] name = "parity-multihash" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b11f42bbd3a021c5061b77154bd3334d5a57e1a03eb162de0b962681cc25800d" +checksum = "7a1cd2ba02391b81367bec529fb209019d718684fdc8ad6a712c2b536e46f775" dependencies = [ "blake2", "bytes 0.5.4", @@ -3609,23 +3625,13 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" -[[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.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" dependencies = [ - "lock_api 0.3.3", + "lock_api", "parking_lot_core 0.6.2", "rustc_version", ] @@ -3636,23 +3642,10 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" dependencies = [ - "lock_api 0.3.3", + "lock_api", "parking_lot_core 0.7.0", ] -[[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.6.2" @@ -3815,9 +3808,9 @@ dependencies = [ [[package]] name = "proc-macro-error" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a" +checksum = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.8", @@ -3828,9 +3821,9 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a" +checksum = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" dependencies = [ "proc-macro2 1.0.8", "quote 1.0.2", @@ -4237,6 +4230,12 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -4265,6 +4264,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls-native-certs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" +dependencies = [ + "openssl-probe", + "rustls", + "schannel", + "security-framework", +] + [[package]] name = "rustversion" version = "1.0.2" @@ -4302,15 +4313,35 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "salsa20" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2324b0e8c3bb9a586a571fdb3136f70e7e2c748de00a78043f86e0cff91f91fe" +dependencies = [ + "byteorder 1.3.4", + "salsa20-core", + "stream-cipher", +] + +[[package]] +name = "salsa20-core" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fe6cc1b9f5a5867853ade63099de70f042f7679e408d1ffe52821c9248e6e69" +dependencies = [ + "stream-cipher", +] + [[package]] name = "sc-authority-discovery" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "bytes 0.4.12", "derive_more", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log", "parity-scale-codec", @@ -4331,7 +4362,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "futures 0.3.4", "log", @@ -4353,7 +4384,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -4369,7 +4400,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -4384,7 +4415,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.8", @@ -4395,7 +4426,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "ansi_term 0.12.1", "app_dirs", @@ -4433,7 +4464,7 @@ dependencies = [ [[package]] name = "sc-client" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "fnv", @@ -4466,7 +4497,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "fnv", @@ -4497,7 +4528,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "hash-db", "kvdb", @@ -4524,12 +4555,12 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "fork-tree", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "log", "merlin", "num-bigint", @@ -4547,6 +4578,7 @@ dependencies = [ "sc-keystore", "sc-telemetry", "schnorrkel", + "serde", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -4561,10 +4593,32 @@ dependencies = [ "sp-version", ] +[[package]] +name = "sc-consensus-babe-rpc" +version = "0.8.0" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" +dependencies = [ + "derive_more", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-keystore", + "serde", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-runtime", +] + [[package]] name = "sc-consensus-epochs" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "fork-tree", "parity-scale-codec", @@ -4577,10 +4631,10 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "log", "parity-scale-codec", "parking_lot 0.10.0", @@ -4598,7 +4652,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "log", "sc-client-api", @@ -4612,7 +4666,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "lazy_static", @@ -4638,7 +4692,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "log", @@ -4654,7 +4708,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "log", "parity-scale-codec", @@ -4670,13 +4724,13 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "assert_matches", "finality-grandpa", "fork-tree", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "log", "parity-scale-codec", "parking_lot 0.10.0", @@ -4702,7 +4756,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "ansi_term 0.12.1", "futures 0.3.4", @@ -4719,7 +4773,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "hex", @@ -4734,7 +4788,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "bitflags", "bytes 0.5.4", @@ -4744,7 +4798,7 @@ dependencies = [ "fnv", "fork-tree", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "futures_codec", "libp2p", "linked-hash-map", @@ -4777,18 +4831,17 @@ dependencies = [ "unsigned-varint", "void", "wasm-timer", - "yamux", "zeroize 1.1.0", ] [[package]] name = "sc-network-gossip" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log", "lru 0.1.17", @@ -4801,14 +4854,13 @@ dependencies = [ [[package]] name = "sc-offchain" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ - "bytes 0.4.12", + "bytes 0.5.4", "fnv", - "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.1", - "hyper 0.12.35", + "futures-timer 3.0.2", + "hyper 0.13.2", "hyper-rustls", "log", "num_cpus", @@ -4828,7 +4880,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "futures 0.3.4", "libp2p", @@ -4840,7 +4892,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "futures 0.3.4", "hash-db", @@ -4870,7 +4922,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "futures 0.3.4", @@ -4885,6 +4937,7 @@ dependencies = [ "serde_json", "sp-core", "sp-rpc", + "sp-runtime", "sp-transaction-pool", "sp-version", ] @@ -4892,7 +4945,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -4907,14 +4960,14 @@ dependencies = [ [[package]] name = "sc-service" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "exit-future", "futures 0.1.29", "futures 0.3.4", "futures-diagnose", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "grafana-data-source", "lazy_static", "log", @@ -4949,7 +5002,6 @@ dependencies = [ "sp-transaction-pool", "sysinfo", "target_info", - "tokio-executor 0.1.10", "tracing", "wasm-timer", ] @@ -4957,7 +5009,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "log", "parity-scale-codec", @@ -4968,11 +5020,11 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "bytes 0.5.4", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log", "parking_lot 0.10.0", @@ -4990,7 +5042,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "erased-serde", "grafana-data-source", @@ -5006,14 +5058,16 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "futures 0.3.4", + "linked-hash-map", "log", "parity-util-mem", "parking_lot 0.10.0", "serde", + "sp-blockchain", "sp-core", "sp-runtime", "sp-transaction-pool", @@ -5023,11 +5077,12 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "futures 0.3.4", "futures-diagnose", + "futures-timer 2.0.2", "log", "parity-scale-codec", "parity-util-mem", @@ -5042,6 +5097,16 @@ dependencies = [ "wasm-timer", ] +[[package]] +name = "schannel" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" +dependencies = [ + "lazy_static", + "winapi 0.3.8", +] + [[package]] name = "schnorrkel" version = "0.8.5" @@ -5061,15 +5126,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - -[[package]] -name = "scopeguard" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" @@ -5081,6 +5140,27 @@ dependencies = [ "untrusted", ] +[[package]] +name = "security-framework" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" +dependencies = [ + "core-foundation-sys", +] + [[package]] name = "semver" version = "0.9.0" @@ -5124,9 +5204,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15913895b61e0be854afd32fd4163fcd2a3df34142cf2cb961b310ce694cbf90" +checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" dependencies = [ "itoa", "ryu", @@ -5274,10 +5354,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" dependencies = [ "arrayref", + "blake2-rfc", + "chacha20-poly1305-aead", + "rand 0.7.3", "rand_core 0.5.1", "ring", "rustc_version", + "sha2", "subtle 2.2.2", + "x25519-dalek 0.6.0", ] [[package]] @@ -5309,7 +5394,7 @@ checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "sp-allocator" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "log", @@ -5321,7 +5406,7 @@ dependencies = [ [[package]] name = "sp-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "hash-db", "parity-scale-codec", @@ -5336,7 +5421,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -5348,7 +5433,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "serde", @@ -5360,7 +5445,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "integer-sqrt", "num-traits", @@ -5373,7 +5458,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "sp-api", @@ -5385,7 +5470,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -5396,7 +5481,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "sp-api", @@ -5408,7 +5493,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "log", @@ -5424,12 +5509,12 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "futures 0.3.4", "futures-diagnose", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log", "parity-scale-codec", @@ -5446,7 +5531,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -5462,7 +5547,7 @@ dependencies = [ [[package]] name = "sp-core" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "base58", "blake2-rfc", @@ -5471,7 +5556,7 @@ dependencies = [ "hash-db", "hash256-std-hasher", "hex", - "impl-serde 0.2.3", + "impl-serde 0.3.0", "lazy_static", "libsecp256k1", "log", @@ -5502,7 +5587,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "proc-macro2 1.0.8", "quote 1.0.2", @@ -5512,7 +5597,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "environmental", "sp-std", @@ -5522,7 +5607,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "serde", @@ -5535,7 +5620,7 @@ dependencies = [ [[package]] name = "sp-finality-tracker" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -5545,7 +5630,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "parity-scale-codec", @@ -5557,7 +5642,7 @@ dependencies = [ [[package]] name = "sp-io" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "hash-db", "libsecp256k1", @@ -5575,7 +5660,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "lazy_static", "sp-core", @@ -5586,7 +5671,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "sp-api", "sp-runtime", @@ -5595,7 +5680,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "backtrace", "log", @@ -5604,7 +5689,7 @@ dependencies = [ [[package]] name = "sp-phragmen" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "serde", "sp-runtime", @@ -5614,7 +5699,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "serde", "sp-core", @@ -5623,7 +5708,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "impl-trait-for-tuples", "log", @@ -5643,7 +5728,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "primitive-types", @@ -5657,7 +5742,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "Inflector", "proc-macro-crate", @@ -5669,7 +5754,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "serde", "serde_json", @@ -5678,7 +5763,7 @@ dependencies = [ [[package]] name = "sp-session" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "sp-api", "sp-core", @@ -5689,7 +5774,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -5699,7 +5784,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "hash-db", "log", @@ -5718,12 +5803,12 @@ dependencies = [ [[package]] name = "sp-std" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" [[package]] name = "sp-storage" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "impl-serde 0.2.3", "serde", @@ -5734,7 +5819,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -5748,7 +5833,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "derive_more", "futures 0.3.4", @@ -5762,7 +5847,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "hash-db", "memory-db", @@ -5776,7 +5861,7 @@ dependencies = [ [[package]] name = "sp-version" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -5788,7 +5873,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -5898,12 +5983,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" [[package]] name = "substrate-frame-rpc-system" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git#47076a93246de20cf35c655ddcde430306b33f9d" +source = "git+https://github.com/paritytech/substrate.git#dc92587bea4032e0a0fc96785bfd9aa17c95459e" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.4", @@ -6032,18 +6117,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "205684fd018ca14432b12cce6ea3d46763311a571c3d294e71ba3f01adcf1aad" +checksum = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e4d2e50ca050ed44fb58309bdce3efa79948f84f9993ad1978de5eebdce5a7" +checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" dependencies = [ "proc-macro2 1.0.8", "quote 1.0.2", @@ -6081,16 +6166,16 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" +checksum = "1cd1fb03fe8e07d17cd851a624a9fff74642a997b67fbd1ccd77533241640d92" dependencies = [ "failure", - "hashbrown 0.1.8", "hmac", - "once_cell 0.1.8", + "once_cell", "pbkdf2", - "rand 0.6.5", + "rand 0.7.3", + "rustc-hash", "sha2", ] @@ -6135,6 +6220,7 @@ checksum = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" dependencies = [ "bytes 0.5.4", "fnv", + "iovec", "lazy_static", "libc", "memchr", @@ -6143,6 +6229,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "signal-hook-registry", + "slab", "winapi 0.3.8", ] @@ -6242,15 +6329,13 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.10.3" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7cf08f990090abd6c6a73cab46fed62f85e8aef8b99e4b918a9f4a637f0676" +checksum = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "iovec", + "futures-core", "rustls", - "tokio-io", + "tokio 0.2.11", "webpki", ] @@ -6529,13 +6614,12 @@ checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" [[package]] name = "unsigned-varint" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c689459fbaeb50e56c6749275f084decfd02194ac5852e6617d95d0d3cf02eaf" +checksum = "3b7ffb36714206d2f5f05d61a2bc350415c642f2c54433f0ebf829afbe41d570" dependencies = [ "bytes 0.5.4", "futures_codec", - "tokio-util", ] [[package]] @@ -6906,6 +6990,17 @@ dependencies = [ "rand_core 0.3.1", ] +[[package]] +name = "x25519-dalek" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" +dependencies = [ + "curve25519-dalek 2.0.0", + "rand_core 0.5.1", + "zeroize 1.1.0", +] + [[package]] name = "xdg" version = "2.2.0" @@ -6914,9 +7009,9 @@ checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" [[package]] name = "yamux" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902f4cee32c401c211b6b69f4a3f6f4cf3515644db5bd822cf685a7dbd6201f9" +checksum = "d73295bc9d9acf89dd9336b3b5f5b57731ee72b587857dd4312721a0196b48e5" dependencies = [ "bytes 0.5.4", "futures 0.3.4", diff --git a/Cargo.toml b/Cargo.toml index f86cf631c0..8862b38e13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,9 @@ sc-chain-spec = { git = "https://github.com/paritytech/substrate.git" } sc-consensus-babe = { git = "https://github.com/paritytech/substrate.git" } sc-client-api = { git = "https://github.com/paritytech/substrate.git" } sc-authority-discovery = { git = "https://github.com/paritytech/substrate.git" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate.git" } +sc-keystore = { git = "https://github.com/paritytech/substrate.git" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate.git" } frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate" } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate" } diff --git a/modules/accounts/Cargo.toml b/modules/accounts/Cargo.toml index 55dec2f4df..f0f56654fb 100644 --- a/modules/accounts/Cargo.toml +++ b/modules/accounts/Cargo.toml @@ -16,13 +16,12 @@ orml-tokens = { package = "orml-tokens", path = "../../orml/tokens", default-fea orml-currencies = { package = "orml-currencies", path = "../../orml/currencies", default-features = false } support = { package = "module-support", path = "../support", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", default-features = false } +pallet-balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } +pallet-timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate.git", default-features = false } [dev-dependencies] primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate.git", default-features = false } runtime-io = { package = "sp-io", git = "https://github.com/paritytech/substrate.git", default-features = false } -pallet-balances= { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } -pallet-timestamp= { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate.git", default-features = false } - [features] default = ["std"] @@ -38,4 +37,6 @@ std = [ "orml-currencies/std", "support/std", "pallet-transaction-payment/std", + "pallet-balances/std", + "pallet-timestamp/std", ] diff --git a/modules/accounts/src/mock.rs b/modules/accounts/src/mock.rs index 6bd85556a4..5dc878632f 100644 --- a/modules/accounts/src/mock.rs +++ b/modules/accounts/src/mock.rs @@ -63,6 +63,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } impl orml_tokens::Trait for Runtime { @@ -77,13 +80,10 @@ pub type Tokens = orml_tokens::Module; impl pallet_balances::Trait for Runtime { type Balance = Balance; - type OnNewAccount = (); - type OnReapAccount = (); - type TransferPayment = (); type DustRemoval = (); type Event = (); type ExistentialDeposit = ExistentialDeposit; - type CreationFee = CreationFee; + type AccountStore = system::Module; } pub type PalletBalances = pallet_balances::Module; diff --git a/modules/auction_manager/src/mock.rs b/modules/auction_manager/src/mock.rs index bcb0a7405f..474f4fd436 100644 --- a/modules/auction_manager/src/mock.rs +++ b/modules/auction_manager/src/mock.rs @@ -19,6 +19,7 @@ mod auction_manager { impl_outer_event! { pub enum TestEvent for Runtime { + system, auction_manager, orml_tokens, orml_auction, @@ -68,6 +69,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } pub type System = system::Module; diff --git a/modules/cdp_engine/src/mock.rs b/modules/cdp_engine/src/mock.rs index 21dd3600ff..fab0ec6272 100644 --- a/modules/cdp_engine/src/mock.rs +++ b/modules/cdp_engine/src/mock.rs @@ -15,6 +15,7 @@ mod cdp_engine { impl_outer_event! { pub enum TestEvent for Runtime { + system, cdp_engine, orml_tokens, loans, @@ -83,6 +84,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } pub type System = system::Module; @@ -98,13 +102,10 @@ pub type Tokens = orml_tokens::Module; impl pallet_balances::Trait for Runtime { type Balance = Balance; - type OnNewAccount = (); - type OnReapAccount = (); - type TransferPayment = (); type DustRemoval = (); type Event = TestEvent; type ExistentialDeposit = ExistentialDeposit; - type CreationFee = CreationFee; + type AccountStore = system::Module; } pub type PalletBalances = pallet_balances::Module; diff --git a/modules/cdp_treasury/src/mock.rs b/modules/cdp_treasury/src/mock.rs index 294ea6f1f2..2281e53f9d 100644 --- a/modules/cdp_treasury/src/mock.rs +++ b/modules/cdp_treasury/src/mock.rs @@ -19,6 +19,7 @@ impl_outer_origin! { impl_outer_event! { pub enum TestEvent for Runtime { + system, cdp_treasury, orml_tokens, pallet_balances, @@ -71,6 +72,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } pub type System = system::Module; @@ -86,13 +90,10 @@ pub type Tokens = orml_tokens::Module; impl pallet_balances::Trait for Runtime { type Balance = Balance; - type OnNewAccount = (); - type OnReapAccount = (); - type TransferPayment = (); type DustRemoval = (); type Event = TestEvent; type ExistentialDeposit = ExistentialDeposit; - type CreationFee = CreationFee; + type AccountStore = system::Module; } pub type PalletBalances = pallet_balances::Module; diff --git a/modules/dex/Cargo.toml b/modules/dex/Cargo.toml index 11065d9a89..25b965ee0d 100644 --- a/modules/dex/Cargo.toml +++ b/modules/dex/Cargo.toml @@ -15,11 +15,11 @@ orml-traits = { package = "orml-traits", path = "../../orml/traits", default-fea orml-utilities = { package = "orml-utilities", path = "../../orml/utilities", default-features = false } orml-tokens = { package = "orml-tokens", path = "../../orml/tokens", default-features = false } support = { package = "module-support", path = "../support", default-features = false } +pallet-balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } [dev-dependencies] primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate.git", default-features = false } runtime-io = { package = "sp-io", git = "https://github.com/paritytech/substrate.git", default-features = false } -pallet-balances= { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } orml-currencies = { package = "orml-currencies", path = "../../orml/currencies", default-features = false } [features] @@ -35,4 +35,5 @@ std = [ "orml-utilities/std", "orml-tokens/std", "support/std", + "pallet-balances/std", ] diff --git a/modules/dex/src/lib.rs b/modules/dex/src/lib.rs index 6bbb239ac1..0b92a25c98 100644 --- a/modules/dex/src/lib.rs +++ b/modules/dex/src/lib.rs @@ -4,7 +4,7 @@ use frame_support::{decl_error, decl_event, decl_module, decl_storage, ensure, t use orml_traits::{MultiCurrency, MultiCurrencyExtended}; use sp_runtime::{ traits::{ - AccountIdConversion, CheckedAdd, CheckedSub, MaybeSerializeDeserialize, Member, Saturating, SimpleArithmetic, + AccountIdConversion, AtLeast32Bit, CheckedAdd, CheckedSub, MaybeSerializeDeserialize, Member, Saturating, UniqueSaturatedInto, Zero, }, DispatchResult, ModuleId, @@ -23,7 +23,7 @@ type CurrencyIdOf = <::Currency as MultiCurrency<> + Into<::Event>; type Currency: MultiCurrencyExtended; - type Share: Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize; + type Share: Parameter + Member + AtLeast32Bit + Default + Copy + MaybeSerializeDeserialize; type GetBaseCurrencyId: Get>; type GetExchangeFee: Get; } diff --git a/modules/dex/src/mock.rs b/modules/dex/src/mock.rs index 1969dcfaf4..0a45b602d5 100644 --- a/modules/dex/src/mock.rs +++ b/modules/dex/src/mock.rs @@ -14,7 +14,9 @@ mod dex { impl_outer_event! { pub enum TestEvent for Runtime { - dex, orml_tokens, + system, + dex, + orml_tokens, } } impl_outer_origin! { @@ -58,6 +60,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } pub type System = system::Module; diff --git a/modules/emergency_shutdown/src/mock.rs b/modules/emergency_shutdown/src/mock.rs index d28047cfee..7e54d9a513 100644 --- a/modules/emergency_shutdown/src/mock.rs +++ b/modules/emergency_shutdown/src/mock.rs @@ -16,6 +16,7 @@ mod emergency_shutdown { impl_outer_event! { pub enum TestEvent for Runtime { + system, emergency_shutdown, cdp_engine, orml_tokens, @@ -85,6 +86,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } pub type System = system::Module; @@ -100,13 +104,10 @@ pub type Tokens = orml_tokens::Module; impl pallet_balances::Trait for Runtime { type Balance = Balance; - type OnNewAccount = (); - type OnReapAccount = (); - type TransferPayment = (); type DustRemoval = (); type Event = TestEvent; type ExistentialDeposit = ExistentialDeposit; - type CreationFee = CreationFee; + type AccountStore = system::Module; } pub type PalletBalances = pallet_balances::Module; diff --git a/modules/honzon/Cargo.toml b/modules/honzon/Cargo.toml index e5de9e2ebb..f30c8138a6 100644 --- a/modules/honzon/Cargo.toml +++ b/modules/honzon/Cargo.toml @@ -17,11 +17,11 @@ orml-tokens = { package = "orml-tokens", path = "../../orml/tokens", default-fea cdp-engine = { package = "module-cdp-engine", path = "../cdp_engine", default-features = false } loans = { package = "module-loans", path = "../loans", default-features = false } support = { package = "module-support", path = "../support", default-features = false } +pallet-balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } [dev-dependencies] runtime-io = { package = "sp-io", git = "https://github.com/paritytech/substrate.git", default-features = false } primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate.git", default-features = false } -pallet-balances= { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } orml-currencies = { package = "orml-currencies", path = "../../orml/currencies", default-features = false } cdp-treasury = { package = "module-cdp-treasury", path = "../cdp_treasury", default-features = false } @@ -39,4 +39,5 @@ std = [ "loans/std", "cdp-engine/std", "support/std", + "pallet-balances/std", ] diff --git a/modules/honzon/src/mock.rs b/modules/honzon/src/mock.rs index 7fe846957c..b2ed2f81da 100644 --- a/modules/honzon/src/mock.rs +++ b/modules/honzon/src/mock.rs @@ -16,6 +16,7 @@ mod honzon { impl_outer_event! { pub enum TestEvent for Runtime { + system, honzon, cdp_engine, orml_tokens, @@ -84,6 +85,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } pub type System = system::Module; @@ -99,13 +103,10 @@ pub type Tokens = orml_tokens::Module; impl pallet_balances::Trait for Runtime { type Balance = Balance; - type OnNewAccount = (); - type OnReapAccount = (); - type TransferPayment = (); type DustRemoval = (); type Event = TestEvent; type ExistentialDeposit = ExistentialDeposit; - type CreationFee = CreationFee; + type AccountStore = system::Module; } pub type PalletBalances = pallet_balances::Module; diff --git a/modules/loans/Cargo.toml b/modules/loans/Cargo.toml index bdf5c859f2..ef9986f14a 100644 --- a/modules/loans/Cargo.toml +++ b/modules/loans/Cargo.toml @@ -15,11 +15,11 @@ primitives = { package = "module-primitives", path = "../primitives", default-fe orml-traits = { package = "orml-traits", path = "../../orml/traits", default-features = false } orml-tokens = { package = "orml-tokens", path = "../../orml/tokens", default-features = false } support = { package = "module-support", path = "../support", default-features = false } +pallet-balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } [dev-dependencies] su-primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate.git", default-features = false } runtime-io = { package = "sp-io", git = "https://github.com/paritytech/substrate.git", default-features = false } -pallet-balances= { package = "pallet-balances", git = "https://github.com/paritytech/substrate.git", default-features = false } orml-currencies = { package = "orml-currencies", path = "../../orml/currencies", default-features = false } cdp-treasury = { package = "module-cdp-treasury", path = "../cdp_treasury", default-features = false } @@ -36,4 +36,5 @@ std = [ "primitives/std", "support/std", "orml-tokens/std", + "pallet-balances/std", ] diff --git a/modules/loans/src/lib.rs b/modules/loans/src/lib.rs index 2d00335512..bd85f2a315 100644 --- a/modules/loans/src/lib.rs +++ b/modules/loans/src/lib.rs @@ -7,9 +7,7 @@ use orml_traits::{ }; use rstd::convert::{TryFrom, TryInto}; use sp_runtime::{ - traits::{ - AccountIdConversion, CheckedAdd, CheckedSub, Convert, MaybeSerializeDeserialize, Member, SimpleArithmetic, - }, + traits::{AccountIdConversion, AtLeast32Bit, CheckedAdd, CheckedSub, Convert, MaybeSerializeDeserialize, Member}, DispatchResult, ModuleId, }; use support::{CDPTreasury, RiskManager}; @@ -28,7 +26,7 @@ pub trait Trait: system::Trait { type Convert: Convert<(CurrencyIdOf, Self::DebitBalance), BalanceOf>; type Currency: MultiCurrencyExtended; type RiskManager: RiskManager, AmountOf, Self::DebitAmount>; - type DebitBalance: Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize; + type DebitBalance: Parameter + Member + AtLeast32Bit + Default + Copy + MaybeSerializeDeserialize; type DebitAmount: Signed + TryInto + TryFrom diff --git a/modules/loans/src/mock.rs b/modules/loans/src/mock.rs index 46434fdbb3..860609f49f 100644 --- a/modules/loans/src/mock.rs +++ b/modules/loans/src/mock.rs @@ -16,6 +16,7 @@ mod loans { impl_outer_event! { pub enum TestEvent for Runtime { + system, loans, orml_tokens, pallet_balances, @@ -68,6 +69,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (); } pub type System = system::Module; @@ -95,13 +99,10 @@ parameter_types! { impl pallet_balances::Trait for Runtime { type Balance = Balance; - type OnNewAccount = (); - type OnReapAccount = (); - type TransferPayment = (); type DustRemoval = (); type Event = TestEvent; type ExistentialDeposit = ExistentialDeposit; - type CreationFee = CreationFee; + type AccountStore = system::Module; } pub type PalletBalances = pallet_balances::Module; diff --git a/modules/prices/src/mock.rs b/modules/prices/src/mock.rs index 67d0759650..8065b512f8 100644 --- a/modules/prices/src/mock.rs +++ b/modules/prices/src/mock.rs @@ -52,6 +52,9 @@ impl system::Trait for Runtime { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); + type AccountData = (); + type OnNewAccount = (); + type OnReapAccount = (); } pub struct MockDataProvider; diff --git a/orml b/orml index dbcbf6db28..387976044d 160000 --- a/orml +++ b/orml @@ -1 +1 @@ -Subproject commit dbcbf6db2805057cd6841acf6d7decf62948d7b0 +Subproject commit 387976044d8a7d636c360c4c41fd69f057ace76d diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index e77177ea41..8e506d81ff 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -134,6 +134,9 @@ impl system::Trait for Runtime { /// Version of the runtime. type Version = Version; type ModuleToIndex = ModuleToIndex; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnReapAccount = (Balances, Staking, Session, Recovery); } parameter_types! { @@ -151,16 +154,15 @@ impl pallet_grandpa::Trait for Runtime { type Event = Event; } +parameter_types! { + pub const IndexDeposit: Balance = 100 * MILLICENTS; +} + impl pallet_indices::Trait for Runtime { - /// The type for recording indexing into the account enumeration. If this ever overflows, there - /// will be problems! type AccountIndex = AccountIndex; - /// Use the standard means of resolving an index hint from an id. - type ResolveHint = pallet_indices::SimpleResolveHint; - /// Determine whether an account is dead. - type IsDeadAccount = Balances; - /// The ubiquitous event type. type Event = Event; + type Currency = Balances; + type Deposit = IndexDeposit; } parameter_types! { @@ -176,21 +178,14 @@ impl pallet_timestamp::Trait for Runtime { parameter_types! { pub const AcaExistentialDeposit: Balance = 100 * MILLICENTS; - pub const CreationFee: Balance = 50 * MILLICENTS; } impl pallet_balances::Trait for Runtime { - /// The type for recording an account's balance. type Balance = Balance; - /// What to do if a new account is created. - type OnNewAccount = Indices; - type OnReapAccount = (System, Recovery); - /// The ubiquitous event type. - type Event = Event; type DustRemoval = (); - type TransferPayment = (); + type Event = Event; type ExistentialDeposit = AcaExistentialDeposit; - type CreationFee = CreationFee; + type AccountStore = system::Module; } parameter_types! { @@ -209,7 +204,7 @@ impl pallet_transaction_payment::Trait for Runtime { impl pallet_sudo::Trait for Runtime { type Event = Event; - type Proposal = Call; + type Call = Call; } type GeneralCouncilInstance = pallet_collective::Instance1; @@ -605,14 +600,14 @@ construct_runtime!( NodeBlock = opaque::Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: system::{Module, Call, Storage, Config, Event}, + System: system::{Module, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent}, Babe: pallet_babe::{Module, Call, Storage, Config, Inherent(Timestamp)}, Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event}, - Indices: pallet_indices, + Indices: pallet_indices::{Module, Call, Storage, Config, Event}, Balances: pallet_balances::{Module, Storage, Config, Event}, TransactionPayment: pallet_transaction_payment::{Module, Storage}, - Sudo: pallet_sudo, + Sudo: pallet_sudo::{Module, Call, Config, Storage, Event}, RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage}, GeneralCouncil: pallet_collective::::{Module, Call, Storage, Origin, Event, Config}, GeneralCouncilMembership: pallet_membership::::{Module, Call, Storage, Event, Config}, @@ -622,7 +617,7 @@ construct_runtime!( OperatorMembership: pallet_membership::::{Module, Call, Storage, Event, Config}, Utility: pallet_utility::{Module, Call, Storage, Event}, PalletTreasury: pallet_treasury::{Module, Call, Storage, Config, Event}, - Staking: pallet_staking, + Staking: pallet_staking::{Module, Call, Config, Storage, Event}, Session: pallet_session::{Module, Call, Storage, Event, Config}, Recovery: pallet_recovery::{Module, Call, Storage, Event}, @@ -695,6 +690,10 @@ impl_runtime_apis! { Executive::apply_extrinsic(extrinsic) } + fn apply_trusted_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_trusted_extrinsic(extrinsic) + } + fn finalize_block() -> ::Header { Executive::finalize_block() } @@ -743,6 +742,10 @@ impl_runtime_apis! { secondary_slots: true, } } + + fn current_epoch_start() -> sp_consensus_babe::SlotNumber { + Babe::current_epoch_start() + } } impl sp_session::SessionKeys for Runtime { diff --git a/src/chain_spec.rs b/src/chain_spec.rs index f9c0205c50..2acd408bec 100644 --- a/src/chain_spec.rs +++ b/src/chain_spec.rs @@ -238,13 +238,7 @@ fn testnet_genesis( code: WASM_BINARY.to_vec(), changes_trie_config: Default::default(), }), - pallet_indices: Some(IndicesConfig { - ids: endowed_accounts - .iter() - .cloned() - .chain(initial_authorities.iter().map(|x| x.0.clone())) - .collect::>(), - }), + pallet_indices: Some(IndicesConfig { indices: vec![] }), pallet_balances: Some(BalancesConfig { balances: initial_authorities .iter() @@ -343,13 +337,7 @@ fn mandala_genesis( code: WASM_BINARY.to_vec(), changes_trie_config: Default::default(), }), - pallet_indices: Some(IndicesConfig { - ids: endowed_accounts - .iter() - .cloned() - .chain(initial_authorities.iter().map(|x| x.0.clone())) - .collect::>(), - }), + pallet_indices: Some(IndicesConfig { indices: vec![] }), pallet_balances: Some(BalancesConfig { balances: initial_authorities .iter() diff --git a/src/executor.rs b/src/executor.rs new file mode 100644 index 0000000000..35fa7533c8 --- /dev/null +++ b/src/executor.rs @@ -0,0 +1,10 @@ +use sc_executor::native_executor_instance; + +// Declare an instance of the native executor named `Executor`. Include the wasm binary as the +// equivalent wasm code. +native_executor_instance!( + pub Executor, + runtime::api::dispatch, + runtime::native_version, + sp_io::benchmarking::HostFunctions, +); diff --git a/src/main.rs b/src/main.rs index c6f3509d3c..c2489a007c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ mod rpc; mod service; mod cli; mod command; +mod executor; pub use sc_cli::{error, VersionInfo}; diff --git a/src/rpc.rs b/src/rpc.rs index b9cf778ee7..20b3709856 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -1,72 +1,125 @@ #![warn(missing_docs)] -use std::sync::Arc; +use std::{fmt, sync::Arc}; +use frame_rpc_system::AccountNonceApi; use runtime::{opaque::Block, AccountId, Balance, CurrencyId, Index, TimeStampedPrice, UncheckedExtrinsic}; +use sc_client::blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sc_consensus_babe::{Config, Epoch}; +use sc_consensus_babe_rpc::BabeRPCHandler; +use sc_consensus_epochs::SharedEpochChanges; +use sc_keystore::KeyStorePtr; use sp_api::ProvideRuntimeApi; +use sp_consensus::SelectChain; +use sp_consensus_babe::BabeApi; use sp_transaction_pool::TransactionPool; /// Light client extra dependencies. -pub struct LightDeps { +pub struct LightDeps { + /// The client instance to use. + pub client: Arc, + /// Transaction pool instance. + pub pool: Arc

, /// Remote access to the blockchain (async). pub remote_blockchain: Arc>, /// Fetcher instance. pub fetcher: Arc, } -impl LightDeps { - /// Create empty `LightDeps` with given `F` type. - /// - /// This is a convenience method to be used in the service builder, - /// to make sure the type of the `LightDeps` is matching. - pub fn none(_: Option>) -> Option { - None - } +/// Extra dependencies for BABE. +pub struct BabeDeps { + /// BABE protocol config. + pub babe_config: Config, + /// BABE pending epoch changes. + pub shared_epoch_changes: SharedEpochChanges, + /// The keystore that manages the keys of the node. + pub keystore: KeyStorePtr, } -/// Instantiate all RPC extensions. -/// -/// If you provide `LightDeps`, the system is configured for light client. -pub fn create(client: Arc, pool: Arc

, light_deps: Option>) -> jsonrpc_core::IoHandler +/// Full client dependencies. +pub struct FullDeps { + /// The client instance to use. + pub client: Arc, + /// Transaction pool instance. + pub pool: Arc

, + /// The SelectChain Strategy + pub select_chain: SC, + /// BABE specific dependencies. + pub babe: BabeDeps, +} + +/// Instantiate all Full RPC extensions. +pub fn create_full(deps: FullDeps) -> jsonrpc_core::IoHandler where C: ProvideRuntimeApi, - C: sc_client::blockchain::HeaderBackend, + C: HeaderBackend + HeaderMetadata + 'static, C: Send + Sync + 'static, - C::Api: frame_rpc_system::AccountNonceApi, + C::Api: AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: BabeApi, C::Api: orml_oracle_rpc::OracleRuntimeApi, - F: sc_client::light::fetcher::Fetcher + 'static, + ::Error: fmt::Debug, P: TransactionPool + 'static, M: jsonrpc_core::Metadata + Default, + SC: SelectChain + 'static, { - use frame_rpc_system::{FullSystem, LightSystem, SystemApi}; + use frame_rpc_system::{FullSystem, SystemApi}; use orml_oracle_rpc::{Oracle, OracleApi}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; let mut io = jsonrpc_core::IoHandler::default(); + let FullDeps { + client, + pool, + select_chain, + babe, + } = deps; + let BabeDeps { + keystore, + babe_config, + shared_epoch_changes, + } = babe; + + io.extend_with(SystemApi::to_delegate(FullSystem::new(client.clone(), pool))); + io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new( + client.clone(), + ))); + io.extend_with(sc_consensus_babe_rpc::BabeApi::to_delegate(BabeRPCHandler::new( + client.clone(), + shared_epoch_changes, + keystore, + babe_config, + select_chain, + ))); + io.extend_with(OracleApi::to_delegate(Oracle::new(client))); + + io +} + +/// Instantiate all Light RPC extensions. +pub fn create_light(deps: LightDeps) -> jsonrpc_core::IoHandler +where + C: HeaderBackend, + C: Send + Sync + 'static, + F: sc_client::light::fetcher::Fetcher + 'static, + P: TransactionPool + 'static, + M: jsonrpc_core::Metadata + Default, +{ + use frame_rpc_system::{LightSystem, SystemApi}; - if let Some(LightDeps { + let LightDeps { + client, + pool, remote_blockchain, fetcher, - }) = light_deps - { - io.extend_with(SystemApi::::to_delegate(LightSystem::new( - client, - remote_blockchain, - fetcher, - pool, - ))); - } else { - io.extend_with(SystemApi::to_delegate(FullSystem::new(client.clone(), pool))); - - // Making synchronous calls in light client freezes the browser currently, - // more context: https://github.com/paritytech/substrate/pull/3480 - // These RPCs should use an asynchronous caller instead. - io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new( - client.clone(), - ))); + } = deps; + let mut io = jsonrpc_core::IoHandler::default(); + io.extend_with(SystemApi::::to_delegate(LightSystem::new( + client, + remote_blockchain, + fetcher, + pool, + ))); - io.extend_with(OracleApi::to_delegate(Oracle::new(client))); - } io } diff --git a/src/service.rs b/src/service.rs index 016bf5b27d..3e25c2a51d 100644 --- a/src/service.rs +++ b/src/service.rs @@ -10,18 +10,9 @@ use sc_network::construct_simple_protocol; use sc_service::{config::Configuration, error::Error as ServiceError, AbstractService, ServiceBuilder}; use sp_inherents::InherentDataProviders; -use sc_executor::native_executor_instance; - +use crate::executor::Executor; use crate::rpc; -// Declare an instance of the native executor named `Executor`. Include the wasm binary as the -// equivalent wasm code. -native_executor_instance!( - pub Executor, - runtime::api::dispatch, - runtime::native_version, -); - construct_simple_protocol! { /// Demo protocol attachment for substrate. pub struct NodeProtocol where Block = Block { } @@ -40,7 +31,7 @@ macro_rules! new_full_start { let builder = sc_service::ServiceBuilder::new_full::< runtime::opaque::Block, runtime::RuntimeApi, - crate::service::Executor, + crate::executor::Executor, >($config)? .with_select_chain(|_config, backend| Ok(sc_client::LongestChain::new(backend.clone())))? .with_transaction_pool(|config, client, _fetcher| { @@ -75,11 +66,27 @@ macro_rules! new_full_start { import_setup = Some((block_import, grandpa_link, babe_link)); Ok(import_queue) })? - .with_rpc_extensions( - |client, pool, _backend, fetcher, _remote_blockchain| -> Result { - Ok(crate::rpc::create(client, pool, crate::rpc::LightDeps::none(fetcher))) - }, - )?; + .with_rpc_extensions(|builder| -> Result { + let babe_link = import_setup + .as_ref() + .map(|s| &s.2) + .expect("BabeLink is present for full services or set up failed; qed."); + let deps = crate::rpc::FullDeps { + client: builder.client().clone(), + pool: builder.pool(), + select_chain: builder + .select_chain() + .cloned() + .expect("SelectChain is present for full services or set up failed; qed."), + babe: crate::rpc::BabeDeps { + keystore: builder.keystore(), + babe_config: sc_consensus_babe::BabeLink::config(babe_link).clone(), + shared_epoch_changes: sc_consensus_babe::BabeLink::epoch_changes(babe_link).clone(), + }, + }; + + Ok(crate::rpc::create_full(deps)) + })?; (builder, import_setup, inherent_data_providers) }}; @@ -245,18 +252,22 @@ pub fn new_light(config: NodeConfiguration) -> Result Result { - let fetcher = fetcher.ok_or_else(|| "Trying to start node RPC without active fetcher")?; - let remote_blockchain = - remote_blockchain.ok_or_else(|| "Trying to start node RPC without active remote blockchain")?; - - let light_deps = rpc::LightDeps { - remote_blockchain, - fetcher, - }; - Ok(crate::rpc::create(client, pool, Some(light_deps))) - }, - )? + .with_rpc_extensions(|builder| -> Result { + let fetcher = builder + .fetcher() + .ok_or_else(|| "Trying to start node RPC without active fetcher")?; + let remote_blockchain = builder + .remote_backend() + .ok_or_else(|| "Trying to start node RPC without active remote blockchain")?; + + let light_deps = rpc::LightDeps { + remote_blockchain, + fetcher, + client: builder.client().clone(), + pool: builder.pool(), + }; + + Ok(rpc::create_light(light_deps)) + })? .build() }