diff --git a/Cargo.lock b/Cargo.lock index dc5576c395..3c80417ae8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,18 +84,6 @@ version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f" -[[package]] -name = "app_dirs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" -dependencies = [ - "ole32-sys", - "shell32-sys", - "winapi 0.2.8", - "xdg", -] - [[package]] name = "approx" version = "0.3.2" @@ -113,9 +101,9 @@ checksum = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" [[package]] name = "array-bytes" -version = "0.6.0" +version = "0.6.1" dependencies = [ - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] @@ -155,7 +143,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" dependencies = [ "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -164,20 +152,30 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" +[[package]] +name = "async-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421d59b24c1feea2496e409b3e0a8de23e5fc130a2ddc0b012e551f3b272bba" +dependencies = [ + "futures-core-preview", + "pin-utils", +] + [[package]] name = "async-std" -version = "1.5.0" +version = "0.99.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267" +checksum = "44501a9f7961bb539b67be0c428b3694e26557046a52759ca7eaf790030a64cc" dependencies = [ - "async-task", - "broadcaster", - "crossbeam-channel", + "async-macros", + "async-task 1.3.1", + "crossbeam-channel 0.3.9", "crossbeam-deque", - "crossbeam-utils", + "crossbeam-utils 0.6.6", "futures-core", "futures-io", - "futures-timer 2.0.2", + "futures-timer 1.0.3", "kv-log-macro", "log", "memchr", @@ -190,6 +188,30 @@ dependencies = [ "slab", ] +[[package]] +name = "async-std" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a45cee2749d880d7066e328a7e161c7470ced883b2fd000ca4643e9f1dd5083a" +dependencies = [ + "async-task 3.0.0", + "crossbeam-utils 0.7.2", + "futures-channel", + "futures-core", + "futures-io", + "futures-timer 3.0.2", + "kv-log-macro", + "log", + "memchr", + "num_cpus", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "smol", + "wasm-bindgen-futures", +] + [[package]] name = "async-task" version = "1.3.1" @@ -200,6 +222,12 @@ dependencies = [ "winapi 0.3.8", ] +[[package]] +name = "async-task" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17772156ef2829aadc587461c7753af20b7e8db1529bc66855add962a3b35d3" + [[package]] name = "async-tls" version = "0.7.0" @@ -371,20 +399,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "broadcaster" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "futures-util", - "parking_lot 0.10.2", - "slab", -] - [[package]] name = "bs58" version = "0.3.1" @@ -641,13 +655,36 @@ dependencies = [ "itertools 0.9.0", ] +[[package]] +name = "crossbeam" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" +dependencies = [ + "cfg-if", + "crossbeam-channel 0.4.2", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils 0.7.2", +] + +[[package]] +name = "crossbeam-channel" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" +dependencies = [ + "crossbeam-utils 0.6.6", +] + [[package]] name = "crossbeam-channel" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "maybe-uninit", ] @@ -658,7 +695,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" dependencies = [ "crossbeam-epoch", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "maybe-uninit", ] @@ -670,7 +707,7 @@ checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ "autocfg 1.0.0", "cfg-if", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", "memoffset", @@ -679,12 +716,22 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" +checksum = "ab6bffe714b6bb07e42f201352c34f51fefd355ace793f9e638ebd52d23f98d2" dependencies = [ "cfg-if", - "crossbeam-utils", + "crossbeam-utils 0.7.2", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +dependencies = [ + "cfg-if", + "lazy_static", ] [[package]] @@ -747,20 +794,20 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" +checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" dependencies = [ "byteorder", "digest", "rand_core 0.5.1", - "subtle 2.2.2", + "subtle 2.2.3", "zeroize", ] [[package]] name = "darwinia-balances" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -773,12 +820,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "darwinia-balances-rpc" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -792,7 +839,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -803,7 +850,7 @@ dependencies = [ [[package]] name = "darwinia-claims" -version = "0.6.0" +version = "0.6.1" dependencies = [ "array-bytes", "darwinia-balances", @@ -817,13 +864,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "tiny-keccak 1.5.0", ] [[package]] name = "darwinia-elections-phragmen" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances", "darwinia-support", @@ -836,13 +883,13 @@ dependencies = [ "sp-io", "sp-phragmen", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "substrate-test-utils", ] [[package]] name = "darwinia-eth-backing" -version = "0.6.0" +version = "0.6.1" dependencies = [ "array-bytes", "darwinia-balances", @@ -862,12 +909,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "darwinia-eth-offchain" -version = "0.6.0" +version = "0.6.1" dependencies = [ "array-bytes", "darwinia-balances", @@ -882,12 +929,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "darwinia-eth-relay" -version = "0.6.0" +version = "0.6.1" dependencies = [ "array-bytes", "darwinia-balances", @@ -905,12 +952,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "darwinia-header-mmr" -version = "0.6.0" +version = "0.6.1" dependencies = [ "ckb-merkle-mountain-range", "frame-support", @@ -921,12 +968,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "darwinia-staking" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances", "darwinia-staking-rpc-runtime-api", @@ -947,7 +994,7 @@ dependencies = [ "sp-phragmen", "sp-runtime", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-storage", "static_assertions 1.1.0", "substrate-test-utils", @@ -955,7 +1002,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -969,7 +1016,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -980,19 +1027,19 @@ dependencies = [ [[package]] name = "darwinia-support" -version = "0.6.0" +version = "0.6.1" dependencies = [ "frame-support", "impl-trait-for-tuples", "num-traits 0.2.11", "parity-scale-codec", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "darwinia-treasury" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances", "darwinia-support", @@ -1003,14 +1050,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "data-encoding" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" +checksum = "72aa14c04dfae8dd7d8a2b1cb7ca2152618cd01336dbfe704b8dcbf8d41dbd69" [[package]] name = "derive_more" @@ -1020,7 +1067,7 @@ checksum = "2127768764f1556535c01b5326ef94bd60ff08dcfbdc544d53e69ed155610f5d" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -1032,6 +1079,28 @@ dependencies = [ "generic-array", ] +[[package]] +name = "directories" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" +dependencies = [ + "cfg-if", + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" +dependencies = [ + "cfg-if", + "libc", + "redox_users", + "winapi 0.3.8", +] + [[package]] name = "dns-parser" version = "0.8.0" @@ -1107,7 +1176,7 @@ dependencies = [ [[package]] name = "eth-primitives" -version = "0.6.0" +version = "0.6.1" dependencies = [ "array-bytes", "ethash", @@ -1126,7 +1195,7 @@ dependencies = [ "serde", "serde_json", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "triehash", ] @@ -1140,7 +1209,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?branch=darwinia-develop)", + "sp-std 2.0.0-alpha.8", "tiny-keccak 1.5.0", ] @@ -1246,7 +1315,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "synstructure", ] @@ -1343,16 +1412,16 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", ] [[package]] name = "frame-benchmarking" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -1363,13 +1432,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "frame-benchmarking-cli" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-benchmarking", "parity-scale-codec", @@ -1386,8 +1455,8 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -1395,25 +1464,25 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-tracing", ] [[package]] name = "frame-metadata" -version = "11.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "11.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "serde", "sp-core", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "frame-support" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "bitmask", "frame-metadata", @@ -1424,53 +1493,54 @@ dependencies = [ "parity-scale-codec", "paste", "serde", + "smallvec 1.4.0", "sp-arithmetic", "sp-core", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-tracing", ] [[package]] name = "frame-support-procedural" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support-procedural-tools", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "frame-system" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1479,7 +1549,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-version", ] @@ -1622,7 +1692,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -1640,6 +1710,16 @@ dependencies = [ "once_cell", ] +[[package]] +name = "futures-timer" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7946248e9429ff093345d3e8fdf4eb0f9b2d79091611c9c14f744971a6f8be45" +dependencies = [ + "futures-core-preview", + "pin-utils", +] + [[package]] name = "futures-timer" version = "2.0.2" @@ -1651,6 +1731,10 @@ name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] [[package]] name = "futures-util" @@ -1770,6 +1854,19 @@ dependencies = [ "regex", ] +[[package]] +name = "gloo-timers" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "h2" version = "0.1.26" @@ -2006,9 +2103,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96816e1d921eca64d208a85aab4f7798455a8e34229ee5a88c935bdee1b78b14" +checksum = "a6e7655b9594024ad0ee439f3b5a7299369dc2a3f459b47c696f9ff676f9aa1f" dependencies = [ "bytes 0.5.4", "futures-channel", @@ -2020,8 +2117,8 @@ dependencies = [ "httparse", "itoa", "log", - "net2", "pin-project", + "socket2", "time", "tokio 0.2.21", "tower-service", @@ -2037,7 +2134,7 @@ dependencies = [ "bytes 0.5.4", "ct-logs", "futures-util", - "hyper 0.13.5", + "hyper 0.13.6", "log", "rustls", "rustls-native-certs", @@ -2136,7 +2233,7 @@ checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -2220,9 +2317,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.39" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7" +checksum = "ce10c23ad2ea25ceca0093bd3192229da4c5b3c0f2de499c1ecac0d98d452177" dependencies = [ "wasm-bindgen", ] @@ -2274,7 +2371,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -2372,9 +2469,9 @@ dependencies = [ [[package]] name = "kv-log-macro" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2d3beed37e5483887d81eb39de6de03a8346531410e1306ca48a9a89bd3a51" +checksum = "4ff57d6d215f7ca7eb35a9a64d656ba4d9d2bef114d741dc08048e75e2f5d418" dependencies = [ "log", ] @@ -2432,15 +2529,15 @@ checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" [[package]] name = "libc" -version = "0.2.70" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" +checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" [[package]] name = "libflate" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fbe6b967a94346446d37ace319ae85be7eca261bb8149325811ac435d35d64" +checksum = "784f4ec5908a9d7f4e53658906386667e8b02e9389a47cfebf45d324ba9e8d25" dependencies = [ "adler32", "crc32fast", @@ -2472,9 +2569,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.18.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ea742c86405b659c358223a8f0f9f5a9eb27bb6083894c6340959b05269662" +checksum = "057eba5432d3e740e313c6e13c9153d0cb76b4f71bfc2e5242ae5bdb7d41af67" dependencies = [ "bytes 0.5.4", "futures 0.3.5", @@ -2494,7 +2591,7 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "multihash", - "parity-multiaddr 0.8.0", + "parity-multiaddr 0.9.0", "parking_lot 0.10.2", "pin-project", "smallvec 1.4.0", @@ -2503,9 +2600,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d2c17158c4dca984a77a5927aac6f0862d7f50c013470a415f93be498b5739" +checksum = "4f5e30dcd8cb13a02ad534e214da234eca1595a76b5788b645dfa5c734d2124b" dependencies = [ "asn1_der", "bs58", @@ -2519,7 +2616,7 @@ dependencies = [ "log", "multihash", "multistream-select", - "parity-multiaddr 0.8.0", + "parity-multiaddr 0.9.0", "parking_lot 0.10.2", "pin-project", "prost", @@ -2537,19 +2634,19 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329127858e4728db5ab60c33d5ae352a999325fdf190ed022ec7d3a4685ae2e6" +checksum = "f09548626b737ed64080fde595e06ce1117795b8b9fc4d2629fa36561c583171" dependencies = [ "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "libp2p-dns" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d0993481203d68e5ce2f787d033fb0cac6b850659ed6c784612db678977c71" +checksum = "3cc186d9a941fd0207cf8f08ef225a735e2d7296258f570155e525f6ee732f87" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2558,9 +2655,9 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38ca3eb807789e26f41c82ca7cd2b3843c66c5587b8b5f709a2f421f3061414" +checksum = "6438ed8ca240c7635c9caa3be6c5258bc0058553ae97ba81737f04e5d33804f5" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2574,9 +2671,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92cda1fb8149ea64d092a2b99d2bd7a2c309eee38ea322d02e4480bd6ee1759" +checksum = "41d6c1d5100973527ae70d82687465b17049c1b717a7964de38b8e65000878ff" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2601,11 +2698,11 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41e908d2aaf8ff0ec6ad1f02fe1844fd777fb0b03a68a226423630750ab99471" +checksum = "51b00163d13f705aae67c427bea0575f8aaf63da6524f9bd4a5a093b8bda0b38" dependencies = [ - "async-std", + "async-std 0.99.12", "data-encoding", "dns-parser", "either", @@ -2623,9 +2720,9 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0832882b06619b2e81d74e71447753ea3c068164a0bca67847d272e856a04a02" +checksum = "34ce63313ad4bce2d76e54c292a1293ea47a0ebbe16708f1513fa62184992f53" dependencies = [ "bytes 0.5.4", "fnv", @@ -2639,9 +2736,9 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918e94a649e1139c24ee9f1f8c1f2adaba6d157b9471af787f2d9beac8c29c77" +checksum = "84fd504e27b0eadd451e06b67694ef714bd8374044e7db339bb0cdb83755ddf4" dependencies = [ "curve25519-dalek", "futures 0.3.5", @@ -2660,9 +2757,9 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9bfbf87eebb492d040f9899c5c81c9738730465ac5e78d9b7a7d086d0f07230" +checksum = "c189cf1dfe4b3f01e2c0fe5e97a6f5df8aeb6f3569e26981015eb7c08015ce5f" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2675,9 +2772,9 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44ab289ae44cc691da0a6fe96aefa43f26c86c6c7813998e203f6d80f1860f18" +checksum = "b4a8101a0e0d5f04562137a476bf5f5423cd5bdab2f7e43a75909668e63cb102" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2690,24 +2787,25 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b37ea44823d3ed223e4605da94b50177bc520f05ae2452286700549a32d81669" +checksum = "309f95fce9bec755eff5406f8b822fd3969990830c2b54f752e1fc181d5ace3e" dependencies = [ - "async-std", + "async-std 0.99.12", "futures 0.3.5", "futures-timer 3.0.2", "get_if_addrs", "ipnet", "libp2p-core", "log", + "socket2", ] [[package]] name = "libp2p-wasm-ext" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ac7dbde0f88cad191dcdfd073b8bae28d01823e8ca313f117b6ecb914160c3" +checksum = "f59fdbb5706f2723ca108c088b1c7a37f735a8c328021f0508007162627e9885" dependencies = [ "futures 0.3.5", "js-sys", @@ -2719,9 +2817,9 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6874c9069ce93d899df9dc7b29f129c706b2a0fdc048f11d878935352b580190" +checksum = "085fbe4c05c4116c2164ab4d5a521eb6e00516c444f61b3ee9f68c7b1e53580b" dependencies = [ "async-tls", "bytes 0.5.4", @@ -2740,9 +2838,9 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f91aea50f6571e0bc6c058dc0e9b270afd41ec28dd94e9e4bf607e78b9ab87" +checksum = "0b305d3a8981e68f11c0e17f2d11d5c52fae95e0d7c283f9e462b5b2dab413b2" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2775,7 +2873,7 @@ dependencies = [ "hmac-drbg", "rand 0.7.3", "sha2", - "subtle 2.2.2", + "subtle 2.2.3", "typenum", ] @@ -2837,9 +2935,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348b828e43d7d1d7a247a6ece0c041d95fb0e34d5496bb4c308428face25df6b" +checksum = "9e488db3a9e108382265a30764f43cfc87517322e5d04ae0603b32a33461dca3" dependencies = [ "hashbrown 0.6.3", ] @@ -2910,7 +3008,7 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" -version = "0.6.0" +version = "0.6.1" dependencies = [ "criterion", "ethereum-types 0.5.2", @@ -2919,7 +3017,7 @@ dependencies = [ "keccak-hash", "rand 0.7.3", "rlp 0.4.4", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "uuid", ] @@ -3000,9 +3098,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47fbc227f7e2b1cb701f95404579ecb2668abbdd3c7ef7a6cbb3cc0d3b236869" +checksum = "f75db05d738947aa5389863aadafbcf2e509d7ba099dc2ddcdf4fc66bf7a9e03" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -3021,9 +3119,9 @@ checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" [[package]] name = "multistream-select" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74cdcf7cfb3402881e15a1f95116cb033d69b33c83d481e1234777f5ef0c3d2c" +checksum = "991c33683908c588b8f2cf66c221d8f390818c1bdcd13fce55208408e027a796" dependencies = [ "bytes 0.5.4", "futures 0.3.5", @@ -3099,7 +3197,7 @@ dependencies = [ [[package]] name = "node-template" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances-rpc", "darwinia-claims", @@ -3140,7 +3238,7 @@ dependencies = [ [[package]] name = "node-template-runtime" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances", "darwinia-balances-rpc-runtime-api", @@ -3185,7 +3283,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-transaction-pool", "sp-version", "static_assertions 1.1.0", @@ -3301,16 +3399,6 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" -[[package]] -name = "ole32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "once_cell" version = "1.4.0" @@ -3349,8 +3437,8 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3359,33 +3447,29 @@ dependencies = [ "serde", "sp-application-crypto", "sp-authority-discovery", - "sp-core", - "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-authorship" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "sp-authorship", - "sp-core", "sp-inherents", - "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-babe" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3400,29 +3484,28 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-timestamp", ] [[package]] name = "pallet-balances" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "serde", - "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-collective" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3431,13 +3514,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-finality-tracker" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3447,13 +3530,13 @@ dependencies = [ "sp-finality-tracker", "sp-inherents", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-grandpa" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3467,13 +3550,13 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-im-online" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3486,13 +3569,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-offences" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3501,26 +3584,26 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "safe-mix", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-session" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3528,18 +3611,17 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "serde", - "sp-io", "sp-runtime", "sp-session", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-trie", ] [[package]] name = "pallet-sudo" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", @@ -3547,13 +3629,13 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-timestamp" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-benchmarking", "frame-support", @@ -3563,34 +3645,35 @@ dependencies = [ "serde", "sp-inherents", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "frame-system", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", + "smallvec 1.4.0", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "frame-support", "parity-scale-codec", "serde", "sp-api", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] @@ -3627,9 +3710,9 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db35e222f783ef4e6661873f6c165c4eb7b65e0c408349818517d5705c2d7d3" +checksum = "12ca96399f4a01aa89c59220c4f52ac371940eb4e53e3ce990da796f364bdf69" dependencies = [ "arrayref", "bs58", @@ -3680,7 +3763,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -3711,7 +3794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ "proc-macro2", - "syn 1.0.23", + "syn 1.0.30", "synstructure", ] @@ -3773,9 +3856,9 @@ dependencies = [ [[package]] name = "paste" -version = "0.1.12" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a229b1c58c692edcaa5b9b0948084f130f55d2dcc15b02fcc5340b2b4521476" +checksum = "d53181dcd37421c08d3b69f887784956674d09c3f9a47a04fece2b130a5b346b" dependencies = [ "paste-impl", "proc-macro-hack", @@ -3783,14 +3866,14 @@ dependencies = [ [[package]] name = "paste-impl" -version = "0.1.12" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0bf239e447e67ff6d16a8bb5e4d4bd2343acf5066061c0e8e06ac5ba8ca68c" +checksum = "05ca490fa1c034a71412b4d1edcb904ec5a0981a4426c9eb2128c0fda7a68d17" dependencies = [ "proc-macro-hack", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -3829,9 +3912,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "petgraph" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c127eea4a29ec6c85d153c59dc1213f33ec74cead30fe4730aecc88cc1fd92" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" dependencies = [ "fixedbitset", "indexmap", @@ -3854,14 +3937,14 @@ checksum = "e58db2081ba5b4c93bd6be09c40fd36cb9193a8336c384f3b40012e531aa7e40" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "pin-project-lite" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" +checksum = "9df32da11d84f3a7d70205549562966279adb900e080fad3dccd8e64afccf0ad" [[package]] name = "pin-utils" @@ -3869,6 +3952,18 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01608bfa680dafb103f9207fa944facf572e4e3e708d10de19a0d0c3d36e5f18" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures-io", + "futures-sink", + "futures-util", +] + [[package]] name = "pkg-config" version = "0.3.17" @@ -3883,9 +3978,9 @@ checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e" [[package]] name = "plotters" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9b1d9ca091d370ea3a78d5619145d1b59426ab0c9eedbad2514a4cee08bf389" +checksum = "0d1685fbe7beba33de0330629da9d955ac75bd54f33d7b79f9a895590124f6bb" dependencies = [ "js-sys", "num-traits 0.2.11", @@ -3941,7 +4036,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "version_check", ] @@ -3953,16 +4048,16 @@ checksum = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "syn-mid", "version_check", ] [[package]] name = "proc-macro-hack" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" +checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" [[package]] name = "proc-macro-nested" @@ -3972,9 +4067,9 @@ checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" [[package]] name = "proc-macro2" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de40dd4ff82d9c9bab6dae29dbab1167e515f8df9ed17d2987cb6012db206933" +checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" dependencies = [ "unicode-xid 0.2.0", ] @@ -4046,7 +4141,7 @@ dependencies = [ "itertools 0.8.2", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -4321,7 +4416,7 @@ checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" dependencies = [ "crossbeam-deque", "crossbeam-queue", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "lazy_static", "num_cpus", ] @@ -4341,6 +4436,17 @@ version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +[[package]] +name = "redox_users" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +dependencies = [ + "getrandom", + "redox_syscall", + "rust-argon2", +] + [[package]] name = "ref-cast" version = "1.0.1" @@ -4358,14 +4464,14 @@ checksum = "602eb59cda66fcb9aec25841fb76bc01d2b34282dcdd705028da297db6f3eec8" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "regex" -version = "1.3.7" +version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" dependencies = [ "aho-corasick", "memchr", @@ -4384,9 +4490,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.17" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" [[package]] name = "remove_dir_all" @@ -4399,9 +4505,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.13" +version = "0.16.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703516ae74571f24b465b4a1431e81e2ad51336cb0ded733a55a1aa3eccac196" +checksum = "06b3fefa4f12272808f809a0af618501fdaba41a58963c5fb72238ab0be09603" dependencies = [ "cc", "libc", @@ -4442,7 +4548,7 @@ source = "git+https://github.com/darwinia-network/parity-common.git#12a86aa8af8f dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -4465,6 +4571,18 @@ dependencies = [ "winapi 0.3.8", ] +[[package]] +name = "rust-argon2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +dependencies = [ + "base64", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils 0.7.2", +] + [[package]] name = "rustc-demangle" version = "0.1.16" @@ -4530,9 +4648,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "safe-mix" @@ -4554,8 +4672,8 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -4563,6 +4681,7 @@ dependencies = [ "parity-scale-codec", "sc-block-builder", "sc-client-api", + "sc-proposer-metrics", "sc-telemetry", "sp-api", "sp-blockchain", @@ -4571,13 +4690,14 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-transaction-pool", + "substrate-prometheus-endpoint", "tokio-executor 0.2.0-alpha.6", ] [[package]] name = "sc-block-builder" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -4592,8 +4712,8 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -4608,26 +4728,25 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "sc-cli" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "ansi_term 0.12.1", - "app_dirs", "atty", "chrono", - "clap", "derive_more", + "directories", "env_logger", "fdlimit", "futures 0.3.5", @@ -4661,8 +4780,8 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "fnv", @@ -4686,7 +4805,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-storage", "sp-transaction-pool", "sp-trie", @@ -4697,8 +4816,8 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "blake2-rfc", "hash-db", @@ -4726,8 +4845,8 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "sc-client-api", "sp-blockchain", @@ -4737,8 +4856,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "fork-tree", @@ -4779,8 +4898,8 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -4792,8 +4911,8 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -4814,8 +4933,8 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "log", "sc-client-api", @@ -4828,8 +4947,8 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "lazy_static", @@ -4855,8 +4974,8 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "log", @@ -4872,8 +4991,8 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "log", "parity-scale-codec", @@ -4887,8 +5006,8 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "assert_matches", "derive_more", @@ -4924,8 +5043,8 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "finality-grandpa", @@ -4941,8 +5060,8 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "ansi_term 0.12.1", "futures 0.3.5", @@ -4958,8 +5077,8 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "hex", @@ -4968,15 +5087,16 @@ dependencies = [ "serde_json", "sp-application-crypto", "sp-core", - "subtle 2.2.2", + "subtle 2.2.3", ] [[package]] name = "sc-network" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "bitflags", + "bs58", "bytes 0.5.4", "derive_more", "either", @@ -5024,8 +5144,8 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -5039,14 +5159,14 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "bytes 0.5.4", "fnv", "futures 0.3.5", "futures-timer 3.0.2", - "hyper 0.13.5", + "hyper 0.13.6", "hyper-rustls", "log", "num_cpus", @@ -5066,8 +5186,8 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "futures 0.3.5", "libp2p", @@ -5077,10 +5197,19 @@ dependencies = [ "wasm-timer", ] +[[package]] +name = "sc-proposer-metrics" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" +dependencies = [ + "log", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-rpc" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "futures 0.3.5", "hash-db", @@ -5111,8 +5240,8 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "futures 0.3.5", @@ -5135,8 +5264,8 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -5150,8 +5279,8 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "exit-future", @@ -5208,8 +5337,8 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "log", "parity-scale-codec", @@ -5222,8 +5351,8 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "bytes 0.5.4", "futures 0.3.5", @@ -5244,8 +5373,8 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "erased-serde", "log", @@ -5259,8 +5388,8 @@ dependencies = [ [[package]] name = "sc-transaction-graph" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "futures 0.3.5", @@ -5279,8 +5408,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "futures 0.3.5", @@ -5327,10 +5456,16 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2", - "subtle 2.2.2", + "subtle 2.2.3", "zeroize", ] +[[package]] +name = "scoped-tls-hkt" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e9d7eaddb227e8fbaaa71136ae0e1e913ca159b86c7da82f3e8f0044ad3a63" + [[package]] name = "scopeguard" version = "1.1.0" @@ -5391,24 +5526,30 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "serde" -version = "1.0.110" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c" +checksum = "c9124df5b40cbd380080b2cc6ab894c040a3070d995f5c9dc77e18c34a8ae37d" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.110" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984" +checksum = "3f2c3ac8e6ca1e9c80b8be1023940162bf81ae3cffbb1809474152f2ce1eb250" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -5442,9 +5583,9 @@ checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" [[package]] name = "sha2" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" dependencies = [ "block-buffer", "digest", @@ -5465,16 +5606,6 @@ dependencies = [ "opaque-debug", ] -[[package]] -name = "shell32-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "shlex" version = "0.1.1" @@ -5538,7 +5669,7 @@ checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -5556,6 +5687,25 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" +[[package]] +name = "smol" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686c634ad1873fffef6aed20f180eede424fbf3bb31802394c90fd7335a661b7" +dependencies = [ + "async-task 3.0.0", + "crossbeam", + "futures-io", + "futures-util", + "nix", + "once_cell", + "piper", + "scoped-tls-hkt", + "slab", + "socket2", + "wepoll-binding", +] + [[package]] name = "snow" version = "0.6.2" @@ -5570,10 +5720,22 @@ dependencies = [ "ring", "rustc_version", "sha2", - "subtle 2.2.2", + "subtle 2.2.3", "x25519-dalek", ] +[[package]] +name = "socket2" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.8", +] + [[package]] name = "soketto" version = "0.3.2" @@ -5596,20 +5758,20 @@ dependencies = [ [[package]] name = "sp-allocator" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "log", "sp-core", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-wasm-interface", ] [[package]] name = "sp-api" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "hash-db", "parity-scale-codec", @@ -5617,87 +5779,86 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-version", ] [[package]] name = "sp-api-proc-macro" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "blake2-rfc", "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "sp-application-crypto" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "serde", "sp-core", "sp-io", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-arithmetic" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "integer-sqrt", "num-traits 0.2.11", "parity-scale-codec", - "primitive-types 0.7.2", "serde", "sp-debug-derive", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-authority-discovery" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-authorship" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-block-builder" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-blockchain" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "log", @@ -5712,8 +5873,8 @@ dependencies = [ [[package]] name = "sp-chain-spec" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "serde", "serde_json", @@ -5721,8 +5882,8 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "futures 0.3.5", @@ -5736,7 +5897,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-utils", "sp-version", "substrate-prometheus-endpoint", @@ -5744,8 +5905,8 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "merlin", "parity-scale-codec", @@ -5755,26 +5916,26 @@ dependencies = [ "sp-consensus-vrf", "sp-inherents", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-timestamp", ] [[package]] name = "sp-consensus-vrf" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "schnorrkel", "sp-core", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-core" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "base58", "blake2-rfc", @@ -5803,7 +5964,7 @@ dependencies = [ "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-storage", "substrate-bip39", "tiny-bip39", @@ -5815,8 +5976,8 @@ dependencies = [ [[package]] name = "sp-database" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "kvdb", "parking_lot 0.10.2", @@ -5824,29 +5985,29 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "sp-externalities" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-storage", ] [[package]] name = "sp-finality-grandpa" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "finality-grandpa", "log", @@ -5856,35 +6017,35 @@ dependencies = [ "sp-application-crypto", "sp-core", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-finality-tracker" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "sp-inherents", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-inherents" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "parity-scale-codec", "parking_lot 0.10.2", "sp-core", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-io" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "futures 0.3.5", "hash-db", @@ -5896,15 +6057,15 @@ dependencies = [ "sp-externalities", "sp-runtime-interface", "sp-state-machine", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-trie", "sp-wasm-interface", ] [[package]] name = "sp-keyring" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "lazy_static", "sp-core", @@ -5914,8 +6075,8 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "sp-api", "sp-core", @@ -5924,8 +6085,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "backtrace", "log", @@ -5933,31 +6094,31 @@ dependencies = [ [[package]] name = "sp-phragmen" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "serde", "sp-arithmetic", "sp-phragmen-compact", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-phragmen-compact" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "sp-rpc" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "serde", "sp-core", @@ -5965,8 +6126,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", @@ -5981,19 +6142,19 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-runtime-interface" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "primitive-types 0.7.2", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "sp-tracing", "sp-wasm-interface", "static_assertions 1.1.0", @@ -6001,20 +6162,20 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "sp-serializer" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "serde", "serde_json", @@ -6022,31 +6183,31 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "sp-api", "sp-core", "sp-runtime", "sp-staking", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-staking" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "parity-scale-codec", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-state-machine" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "hash-db", "log", @@ -6065,51 +6226,51 @@ dependencies = [ [[package]] name = "sp-std" version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-develop#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" [[package]] name = "sp-std" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-develop#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" [[package]] name = "sp-storage" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "impl-serde 0.2.3", "ref-cast", "serde", "sp-debug-derive", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-timestamp" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "wasm-timer", ] [[package]] name = "sp-tracing" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "tracing", ] [[package]] name = "sp-transaction-pool" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "derive_more", "futures 0.3.5", @@ -6123,22 +6284,22 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", "sp-core", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "trie-db", "trie-root", ] [[package]] name = "sp-utils" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "futures 0.3.5", "futures-core", @@ -6148,24 +6309,24 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", "serde", "sp-runtime", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", ] [[package]] name = "sp-wasm-interface" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", - "sp-std 2.0.0-alpha.8 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8)", + "sp-std 2.0.0-rc2", "wasmi", ] @@ -6238,7 +6399,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6259,7 +6420,7 @@ dependencies = [ "heck", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6276,21 +6437,21 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ "platforms", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.8.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "0.8.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" dependencies = [ - "async-std", + "async-std 1.6.0", "derive_more", "futures-util", - "hyper 0.13.5", + "hyper 0.13.6", "log", "prometheus", "tokio 0.2.21", @@ -6298,13 +6459,13 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "2.0.0-alpha.8" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +version = "2.0.0-rc2" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" [[package]] name = "substrate-wasm-builder-runner" version = "1.0.6" -source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-alpha.darwinia.8#7e9a2ae78d27cc56e053fbec3b34a1a258b89561" +source = "git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1#45b9f0a9cbf901abaa9f1fca5fe8baeed029133d" [[package]] name = "subtle" @@ -6314,9 +6475,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" +checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" [[package]] name = "syn" @@ -6331,9 +6492,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.23" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b5f192649e48a5302a13f2feb224df883b98933222369e4b3b0fe2a5447269" +checksum = "93a56fabc59dce20fe48b6c832cc249c713e7ed88fa28b0ee0a3bfcaae5fe4e2" dependencies = [ "proc-macro2", "quote 1.0.6", @@ -6348,7 +6509,7 @@ checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6368,7 +6529,7 @@ checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "unicode-xid 0.2.0", ] @@ -6442,7 +6603,7 @@ checksum = "893582086c2f98cde18f906265a65b5030a074b1046c674ae898be6519a7f479" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6509,9 +6670,9 @@ dependencies = [ [[package]] name = "tinytemplate" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e4bc5ac99433e0dcb8b9f309dd271a165ae37dde129b9e0ce1bfdd8bfe4891" +checksum = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" dependencies = [ "serde", "serde_json", @@ -6601,7 +6762,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures 0.1.29", ] @@ -6644,7 +6805,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures 0.1.29", "lazy_static", "log", @@ -6712,7 +6873,7 @@ checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" dependencies = [ "crossbeam-deque", "crossbeam-queue", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures 0.1.29", "lazy_static", "log", @@ -6727,7 +6888,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures 0.1.29", "slab", "tokio-executor 0.1.10", @@ -6814,7 +6975,7 @@ checksum = "99bbad0de3fd923c9c3232ead88510b783e5a4d16a6154adffa3d53308de984c" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -7016,9 +7177,9 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" +checksum = "55d1e41d56121e07f1e223db0a4def204e45c85425f6a16d462fd07c8d10d74c" [[package]] name = "vec_map" @@ -7028,9 +7189,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "void" @@ -7078,9 +7239,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasm-bindgen" -version = "0.2.62" +version = "0.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551" +checksum = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -7088,24 +7249,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.62" +version = "0.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94" +checksum = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101" dependencies = [ "bumpalo", "lazy_static", "log", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a369c5e1dfb7569e14d62af4da642a3cbc2f9a3652fe586e26ac22222aa4b04" +checksum = "64487204d863f109eb77e8462189d111f27cb5712cc9fdb3461297a76963a2f6" dependencies = [ "cfg-if", "js-sys", @@ -7115,9 +7276,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.62" +version = "0.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776" +checksum = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3" dependencies = [ "quote 1.0.6", "wasm-bindgen-macro-support", @@ -7125,22 +7286,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.62" +version = "0.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a" +checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.62" +version = "0.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad" +checksum = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd" [[package]] name = "wasm-timer" @@ -7152,7 +7313,7 @@ dependencies = [ "js-sys", "parking_lot 0.9.0", "pin-utils", - "send_wrapper", + "send_wrapper 0.2.0", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -7183,9 +7344,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.39" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642" +checksum = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17" dependencies = [ "js-sys", "wasm-bindgen", @@ -7193,9 +7354,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" +checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" dependencies = [ "ring", "untrusted", @@ -7219,6 +7380,25 @@ dependencies = [ "webpki", ] +[[package]] +name = "wepoll-binding" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374fff4ff9701ff8b6ad0d14bacd3156c44063632d8c136186ff5967d48999a7" +dependencies = [ + "bitflags", + "wepoll-sys", +] + +[[package]] +name = "wepoll-sys" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9082a777aed991f6769e2b654aa0cb29f1c3d615daf009829b07b66c7aff6a24" +dependencies = [ + "cc", +] + [[package]] name = "which" version = "3.1.1" @@ -7310,12 +7490,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "xdg" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" - [[package]] name = "yamux" version = "0.4.5" @@ -7347,6 +7521,6 @@ checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "synstructure", ] diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml index 94882cfc73..b59bd70ea1 100644 --- a/bin/node-template/node/Cargo.toml +++ b/bin/node-template/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-template" -version = "0.6.0" +version = "0.6.1" authors = ["Anonymous"] description = "Darwinia Node template" edition = "2018" @@ -27,36 +27,36 @@ darwinia-eth-relay = { path = "../../../frame/bridge/eth/relay" } darwinia-staking = { path = "../../../frame/staking" } darwinia-staking-rpc = { path = "../../../frame/staking/rpc" } # substrate -frame-benchmarking-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-im-online = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-basic-authorship = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-client-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-executor = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-finality-grandpa-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-network = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-service = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-authority-discovery = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-inherents = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-benchmarking-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-im-online = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-basic-authorship = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-client-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-executor = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-finality-grandpa-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-network = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-service = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-authority-discovery = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-inherents = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [build-dependencies] # substrate structopt = { version = "0.3.14", optional = true } -frame-benchmarking-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -substrate-build-script-utils = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-benchmarking-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +substrate-build-script-utils = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = [ diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index 2edb4e89eb..40b803aab7 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -145,8 +145,11 @@ pub fn new_full(config: Configuration) -> Result(sp_std::marker::PhantomData); - impl> Convert for LinearWeightToFee { - fn convert(w: Weight) -> Balance { - // setting this to zero will disable the weight fee. - let coefficient = C::get(); - Balance::from(w).saturating_mul(coefficient) - } - } - /// Update the given multiplier based on the following formula /// /// diff = (previous_block_weight - target_weight)/max_weight @@ -89,25 +70,21 @@ pub mod impls { impl> Convert for TargetedFeeAdjustment { fn convert(multiplier: Fixed128) -> Fixed128 { let max_weight = MaximumBlockWeight::get(); - let block_weight = System::all_extrinsics_weight().total().min(max_weight); + let block_weight = System::block_weight().total().min(max_weight); let target_weight = (T::get() * max_weight) as u128; let block_weight = block_weight as u128; // determines if the first_term is positive let positive = block_weight >= target_weight; let diff_abs = block_weight.max(target_weight) - block_weight.min(target_weight); - // safe, diff_abs cannot exceed u64 and it can always be computed safely even with the lossy - // `Fixed128::from_rational`. - let diff = Fixed128::from_rational( - diff_abs as i128, - NonZeroI128::new(max_weight.max(1) as i128).unwrap(), - ); + // safe, diff_abs cannot exceed u64. + let diff = Fixed128::saturating_from_rational(diff_abs, max_weight.max(1)); let diff_squared = diff.saturating_mul(diff); // 0.00004 = 4/100_000 = 40_000/10^9 - let v = Fixed128::from_rational(4, NonZeroI128::new(100_000).unwrap()); + let v = Fixed128::saturating_from_rational(4, 100_000); // 0.00004^2 = 16/10^10 Taking the future /2 into account... 8/10^10 - let v_squared_2 = Fixed128::from_rational(8, NonZeroI128::new(10_000_000_000).unwrap()); + let v_squared_2 = Fixed128::saturating_from_rational(8, 10_000_000_000u64); let first_term = v.saturating_mul(diff); let second_term = v_squared_2.saturating_mul(diff_squared); @@ -127,7 +104,7 @@ pub mod impls { // multiplier. While at -1, it means that the network is so un-congested that all // transactions have no weight fee. We stop here and only increase if the network // became more busy. - .max(Fixed128::from_natural(-1)) + .max(Fixed128::saturating_from_integer(-1)) } } } @@ -310,7 +287,7 @@ use frame_support::{ traits::{KeyOwnerProofSystem, LockIdentifier, Randomness}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - Weight, + IdentityFee, Weight, }, }; use pallet_grandpa::{ @@ -329,6 +306,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ BlakeTwo256, Block as BlockT, IdentityLookup, NumberFor, OpaqueKeys, SaturatedConversion, + Saturating, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, ModuleId, Perbill, Percent, Permill, Perquintill, RuntimeDebug, @@ -395,9 +373,12 @@ pub fn native_version() -> NativeVersion { } parameter_types! { - pub const BlockHashCount: BlockNumber = 250; + pub const BlockHashCount: BlockNumber = 2400; /// We allow for 2 seconds of compute with a 6 second average block time. pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; + /// Assume 10% of weight for average on_initialize calls. + pub const MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get() + .saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get(); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const Version: RuntimeVersion = VERSION; @@ -418,6 +399,7 @@ impl frame_system::Trait for Runtime { type DbWeight = RocksDbWeight; type BlockExecutionWeight = BlockExecutionWeight; type ExtrinsicBaseWeight = ExtrinsicBaseWeight; + type MaximumExtrinsicWeight = MaximumExtrinsicWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = Version; @@ -449,9 +431,6 @@ impl pallet_timestamp::Trait for Runtime { parameter_types! { pub const TransactionByteFee: Balance = 10 * MICRO; - // In the Substrate node, a weight of 10_000_000 (smallest non-zero weight) - // is mapped to 10_000_000 units of fees, hence: - pub const WeightFeeCoefficient: Balance = 1; // for a sane configuration, this should always be less than `AvailableBlockRatio`. pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); } @@ -459,7 +438,7 @@ impl pallet_transaction_payment::Trait for Runtime { type Currency = Ring; type OnTransactionPayment = DealWithFees; type TransactionByteFee = TransactionByteFee; - type WeightToFee = LinearWeightToFee; + type WeightToFee = IdentityFee; type FeeMultiplierUpdate = TargetedFeeAdjustment; } @@ -473,10 +452,14 @@ impl pallet_authorship::Trait for Runtime { type EventHandler = (Staking, ImOnline); } +parameter_types! { + pub const OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get(); +} impl pallet_offences::Trait for Runtime { type Event = Event; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; + type WeightSoftLimit = OffencesWeightSoftLimit; } impl pallet_session::historical::Trait for Runtime { @@ -647,8 +630,8 @@ parameter_types! { pub const TermDuration: BlockNumber = 24 * HOURS; } impl darwinia_elections_phragmen::Trait for Runtime { - type ModuleId = ElectionsPhragmenModuleId; type Event = Event; + type ModuleId = ElectionsPhragmenModuleId; type Currency = Ring; type ChangeMembers = Council; // NOTE: this implies that council's genesis members cannot be set directly and must come from diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index a446605ca7..e2acc8fd71 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-balances" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME pallet to manage RING" edition = "2018" @@ -16,17 +16,17 @@ serde = { version = "1.0.106", optional = true } darwinia-balances-rpc-runtime-api = { default-features = false, path = "./rpc/runtime-api" } darwinia-support = { default-features = false, path = "../support" } # substrate -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # substrate -pallet-transaction-payment = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +pallet-transaction-payment = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] @@ -42,7 +42,6 @@ std = [ "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "sp-io/std", "sp-runtime/std", "sp-std/std", ] diff --git a/frame/balances/rpc/Cargo.toml b/frame/balances/rpc/Cargo.toml index 51e89a018d..f26c9fcf8c 100644 --- a/frame/balances/rpc/Cargo.toml +++ b/frame/balances/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-balances-rpc" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Node-specific RPC methods for interaction with balances." edition = "2018" @@ -17,6 +17,6 @@ jsonrpc-derive = "14.0.3" # darwinia darwinia-balances-rpc-runtime-api = { path = "./runtime-api" } # substrate -sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } diff --git a/frame/balances/rpc/runtime-api/Cargo.toml b/frame/balances/rpc/runtime-api/Cargo.toml index 8ad22750b7..2245ffac37 100644 --- a/frame/balances/rpc/runtime-api/Cargo.toml +++ b/frame/balances/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-balances-rpc-runtime-api" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Runtime API definition required by balances RPC extensions." edition = "2018" @@ -15,8 +15,8 @@ serde = { version = "1.0.106", optional = true, features = ["derive"] } # darwinia darwinia-support = { default-features = false, path = "../../../support" } # substrate -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index efdca6a76a..ef12f1d11f 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -803,6 +803,7 @@ impl, I: Instance> frame_system::Trait for ElevatedTrait { type DbWeight = T::DbWeight; type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = T::MaximumBlockWeight; type MaximumBlockLength = T::MaximumBlockLength; type AvailableBlockRatio = T::AvailableBlockRatio; type Version = T::Version; diff --git a/frame/balances/src/tests.rs b/frame/balances/src/tests.rs index af0b48271e..058c3fd9ec 100644 --- a/frame/balances/src/tests.rs +++ b/frame/balances/src/tests.rs @@ -21,10 +21,7 @@ macro_rules! decl_tests { }; use frame_system::RawOrigin; use pallet_transaction_payment::ChargeTransactionPayment; - use sp_runtime::{ - traits::{BadOrigin, SignedExtension}, - Fixed128, - }; + use sp_runtime::{FixedPointNumber, Fixed128, traits::{SignedExtension, BadOrigin}}; pub type System = frame_system::Module<$test>; @@ -190,7 +187,7 @@ macro_rules! decl_tests { .monied(true) .build() .execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::put(Fixed128::from_natural(1)); + pallet_transaction_payment::NextFeeMultiplier::put(Fixed128::saturating_from_integer(1)); Ring::set_lock( ID_1, &1, diff --git a/frame/balances/src/tests_local.rs b/frame/balances/src/tests_local.rs index eda1238695..df9e728029 100644 --- a/frame/balances/src/tests_local.rs +++ b/frame/balances/src/tests_local.rs @@ -8,15 +8,11 @@ use codec::{Decode, Encode}; use frame_support::{ impl_outer_origin, parameter_types, traits::{Get, StorageMapShim}, - weights::{DispatchInfo, Weight}, + weights::{DispatchInfo, IdentityFee, Weight}, }; use frame_system as system; use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{ConvertInto, IdentityLookup}, - Perbill, RuntimeDebug, -}; +use sp_runtime::{testing::Header, traits::IdentityLookup, Perbill, RuntimeDebug}; // --- darwinia --- use crate::{tests::*, *}; @@ -82,6 +78,7 @@ impl frame_system::Trait for Test { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); @@ -97,7 +94,7 @@ impl pallet_transaction_payment::Trait for Test { type Currency = Ring; type OnTransactionPayment = (); type TransactionByteFee = TransactionByteFee; - type WeightToFee = ConvertInto; + type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); } impl Trait for Test { diff --git a/frame/bridge/eth/backing/Cargo.toml b/frame/bridge/eth/backing/Cargo.toml index 986d070f6c..ccbb7605d8 100644 --- a/frame/bridge/eth/backing/Cargo.toml +++ b/frame/bridge/eth/backing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-eth-backing" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME pallet to backing Ethereum assets" edition = "2018" @@ -20,11 +20,11 @@ eth-primitives = { default-features = false, path = "../../../../primitives/eth- # github ethabi = { default-features = false, git = "https://github.com/darwinia-network/ethabi.git", branch = "with_no_std" } # substrate -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # darwinia @@ -34,10 +34,10 @@ eth-primitives = { features = ["easy-testing"], path = "../../../../primitives/e # github rlp = { package = "rlp", git = "https://github.com/darwinia-network/parity-common.git" } # substrate -pallet-session = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-timestamp = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-staking = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +pallet-session = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-timestamp = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-staking = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/bridge/eth/backing/src/mock.rs b/frame/bridge/eth/backing/src/mock.rs index c148d2c6a0..9988487f7d 100644 --- a/frame/bridge/eth/backing/src/mock.rs +++ b/frame/bridge/eth/backing/src/mock.rs @@ -113,6 +113,7 @@ impl frame_system::Trait for Test { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/frame/bridge/eth/offchain/Cargo.toml b/frame/bridge/eth/offchain/Cargo.toml index c6fd5dddf2..23ff27a81a 100644 --- a/frame/bridge/eth/offchain/Cargo.toml +++ b/frame/bridge/eth/offchain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-eth-offchain" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME pallet to relay Ethereum header automactically" edition = "2018" @@ -19,11 +19,11 @@ eth-primitives = { default-features = false, path = "../../../../primitives/eth- # github rlp = { default-features = false, git = "https://github.com/darwinia-network/parity-common.git" } # substrate -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # crates @@ -32,8 +32,8 @@ serde_json = { version = "1.0.51" } darwinia-balances = { path = "../../../../frame/balances" } eth-primitives = { features = ["easy-testing"], path = "../../../../primitives/eth-primitives" } # substrate -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/bridge/eth/offchain/src/mock.rs b/frame/bridge/eth/offchain/src/mock.rs index e74ba9792a..26874b633b 100644 --- a/frame/bridge/eth/offchain/src/mock.rs +++ b/frame/bridge/eth/offchain/src/mock.rs @@ -83,6 +83,7 @@ impl frame_system::Trait for Test { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/frame/bridge/eth/relay/Cargo.toml b/frame/bridge/eth/relay/Cargo.toml index f831e93878..b0a2b8d104 100644 --- a/frame/bridge/eth/relay/Cargo.toml +++ b/frame/bridge/eth/relay/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-eth-relay" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME pallet to relay Ethereum headers" edition = "2018" @@ -24,18 +24,18 @@ merkle-patricia-trie = { default-features = false, path = "../../../../primitive ethereum-types = { default-features = false, git = "https://github.com/darwinia-network/parity-common.git" } rlp = { default-features = false, git = "https://github.com/darwinia-network/parity-common.git" } # substrate -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # darwinia darwinia-balances = { path = "../../../../frame/balances" } eth-primitives = { features = ["easy-testing"], path = "../../../../primitives/eth-primitives" } # substrate -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/bridge/eth/relay/src/mock.rs b/frame/bridge/eth/relay/src/mock.rs index cacc6d0d77..befdd44759 100644 --- a/frame/bridge/eth/relay/src/mock.rs +++ b/frame/bridge/eth/relay/src/mock.rs @@ -204,6 +204,7 @@ impl frame_system::Trait for Test { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/frame/claims/Cargo.toml b/frame/claims/Cargo.toml index 3984373806..bc0cb5333d 100644 --- a/frame/claims/Cargo.toml +++ b/frame/claims/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-claims" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME to claim airdrop" edition = "2018" @@ -17,11 +17,11 @@ serde_json = { version = "1.0.51", optional = true } array-bytes = { default-features = false, path = "../../primitives/array-bytes" } darwinia-support = { default-features = false, path = "../support" } # substrate -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # crates @@ -30,7 +30,7 @@ tiny-keccak = { version = "1.5.0" } # darwinia darwinia-balances = { path = "../balances" } # substrate -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/claims/src/lib.rs b/frame/claims/src/lib.rs index 7fe27c1152..49baa8ff1b 100644 --- a/frame/claims/src/lib.rs +++ b/frame/claims/src/lib.rs @@ -490,6 +490,7 @@ mod tests { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index fbaf179c66..a10c6232a5 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-elections-phragmen" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME election pallet for PHRAGMEN" edition = "2018" @@ -15,11 +15,11 @@ serde = { version = "1.0.106", optional = true } # darwinia darwinia-support = { default-features = false, path = "../support" } # substrate -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-phragmen = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-phragmen = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # crates @@ -27,9 +27,9 @@ hex-literal = { version = "0.2.1" } # darwinia darwinia-balances = { path = "../balances" } # substrate -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -substrate-test-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +substrate-test-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index 01e3ec7d88..5d8dc8c33b 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -185,6 +185,8 @@ decl_storage! { pub ElectionRounds get(fn election_rounds): u32 = Zero::zero(); /// Votes and locked stake of a particular voter. + /// + /// TWOX-NOTE: SAFE as `AccountId` is a crypto hash pub Voting get(fn voting): map hasher(twox_64_concat) T::AccountId => (BalanceOf, Vec); /// The present candidate list. Sorted based on account-id. A current member or runner-up @@ -1122,6 +1124,7 @@ mod tests { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/frame/header-mmr/Cargo.toml b/frame/header-mmr/Cargo.toml index 1b86cb31fc..d9f2520ba5 100644 --- a/frame/header-mmr/Cargo.toml +++ b/frame/header-mmr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-header-mmr" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Pallet for logging MMR into header digest" edition = "2018" @@ -15,17 +15,17 @@ serde = { version = "1.0.106", optional = true } # github merkle-mountain-range = { package = "ckb-merkle-mountain-range", default-features = false, git = "https://github.com/nervosnetwork/merkle-mountain-range.git" } # substrate -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # crates serde_json = { version = "1.0.51" } # substrate -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/header-mmr/src/mock.rs b/frame/header-mmr/src/mock.rs index ea97595dfd..1d0016de0e 100644 --- a/frame/header-mmr/src/mock.rs +++ b/frame/header-mmr/src/mock.rs @@ -49,6 +49,7 @@ impl frame_system::Trait for Test { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index 0fecc4ffd4..80193b3dc0 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-staking" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME pallet staking" edition = "2018" @@ -19,17 +19,17 @@ static_assertions = { version = "1.1.0" } darwinia-staking-rpc-runtime-api = { default-features = false, path = "./rpc/runtime-api" } darwinia-support = { default-features = false, path = "../support" } # substrate -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-session = { default-features = false, features = ["historical"], git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-phragmen = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-session = { default-features = false, features = ["historical"], git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-phragmen = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # crates @@ -39,10 +39,10 @@ rand_chacha = { version = "0.2" } darwinia-balances = { path = "../../frame/balances" } darwinia-support = { features = ["easy-testing"], path = "../support" } # substrate -frame-benchmarking = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-timestamp = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-storage = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -substrate-test-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-benchmarking = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-timestamp = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-storage = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +substrate-test-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/staking/rpc/Cargo.toml b/frame/staking/rpc/Cargo.toml index 18a944c983..86e3ff98dc 100644 --- a/frame/staking/rpc/Cargo.toml +++ b/frame/staking/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-staking-rpc" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Node-specific RPC methods for interaction with staking." edition = "2018" @@ -17,6 +17,6 @@ jsonrpc-derive = "14.0.3" # darwinia darwinia-staking-rpc-runtime-api = { path = "./runtime-api" } # substrate -sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } diff --git a/frame/staking/rpc/runtime-api/Cargo.toml b/frame/staking/rpc/runtime-api/Cargo.toml index 7e34d97ec0..1d00edda4d 100644 --- a/frame/staking/rpc/runtime-api/Cargo.toml +++ b/frame/staking/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-staking-rpc-runtime-api" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Runtime API definition required by staking RPC extensions." edition = "2018" @@ -15,8 +15,8 @@ serde = { version = "1.0.106", optional = true, features = ["derive"] } # darwinia darwinia-support = { default-features = false, path = "../../../support" } # substrate -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 7a89fdce94..30cddeb616 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -334,6 +334,76 @@ mod types { type KtonCurrency = ::KtonCurrency; } +pub mod weight { + // --- custom --- + use super::*; + + /// All weight notes are pertaining to the case of a better solution, in which we execute + /// the longest code path. + /// Weight: 0 + (0.63 μs * v) + (0.36 μs * n) + (96.53 μs * a ) + (8 μs * w ) with: + /// * v validators in snapshot validators, + /// * n nominators in snapshot nominators, + /// * a assignment in the submitted solution + /// * w winners in the submitted solution + /// + /// State reads: + /// - Initial checks: + /// - ElectionState, CurrentEra, QueuedScore + /// - SnapshotValidators.len() + SnapShotNominators.len() + /// - ValidatorCount + /// - SnapshotValidators + /// - SnapshotNominators + /// - Iterate over nominators: + /// - compact.len() * Nominators(who) + /// - (non_self_vote_edges) * SlashingSpans + /// - For `assignment_ratio_to_staked`: Basically read the staked value of each stash. + /// - (winners.len() + compact.len()) * (Ledger + Bonded) + /// - TotalIssuance (read a gzillion times potentially, but well it is cached.) + /// - State writes: + /// - QueuedElected, QueuedScore + pub fn weight_for_submit_solution( + winners: &Vec, + compact: &CompactAssignments, + size: &ElectionSize, + ) -> Weight { + (630 * WEIGHT_PER_NANOS) + .saturating_mul(size.validators as Weight) + .saturating_add((360 * WEIGHT_PER_NANOS).saturating_mul(size.nominators as Weight)) + .saturating_add((96 * WEIGHT_PER_MICROS).saturating_mul(compact.len() as Weight)) + .saturating_add((8 * WEIGHT_PER_MICROS).saturating_mul(winners.len() as Weight)) + // Initial checks + .saturating_add(T::DbWeight::get().reads(8)) + // Nominators + .saturating_add(T::DbWeight::get().reads(compact.len() as Weight)) + // SlashingSpans (upper bound for invalid solution) + .saturating_add(T::DbWeight::get().reads(compact.edge_count() as Weight)) + // `assignment_ratio_to_staked` + .saturating_add( + T::DbWeight::get().reads(2 * ((winners.len() + compact.len()) as Weight)), + ) + .saturating_add(T::DbWeight::get().reads(1)) + // write queued score and elected + .saturating_add(T::DbWeight::get().writes(2)) + } + + /// Weight of `submit_solution` in case of a correct submission. + /// + /// refund: we charged compact.len() * read(1) for SlashingSpans. A valid solution only reads + /// winners.len(). + pub fn weight_for_correct_submit_solution( + winners: &Vec, + compact: &CompactAssignments, + size: &ElectionSize, + ) -> Weight { + // NOTE: for consistency, we re-compute the original weight to maintain their relation and + // prevent any foot-guns. + let original_weight = weight_for_submit_solution::(winners, compact, size); + original_weight + .saturating_sub(T::DbWeight::get().reads(compact.edge_count() as Weight)) + .saturating_add(T::DbWeight::get().reads(winners.len() as Weight)) + } +} + // --- darwinia --- pub use types::EraIndex; @@ -341,8 +411,8 @@ pub use types::EraIndex; use codec::{Decode, Encode, HasCompact}; // --- substrate --- use frame_support::{ - debug, decl_error, decl_event, decl_module, decl_storage, - dispatch::IsSubType, + decl_error, decl_event, decl_module, decl_storage, + dispatch::{DispatchResultWithPostInfo, IsSubType, WithPostDispatchInfo}, ensure, storage::IterableStorageMap, traits::{ @@ -393,13 +463,14 @@ use darwinia_support::{ }; use types::*; -// syntactic sugar for logging -#[cfg(feature = "std")] -const LOG_TARGET: &'static str = "staking"; +pub(crate) const LOG_TARGET: &'static str = "staking"; + +// syntactic sugar for logging. +#[macro_export] macro_rules! log { ($level:tt, $patter:expr $(, $values:expr)* $(,)?) => { - debug::native::$level!( - target: LOG_TARGET, + frame_support::debug::$level!( + target: crate::LOG_TARGET, $patter $(, $values)* ) }; @@ -540,7 +611,7 @@ where pub struct ActiveEraInfo { /// Index of era. pub index: EraIndex, - /// Moment of start expresed as millisecond from `$UNIX_EPOCH`. + /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. /// /// Start can be none if start hasn't been set for the era yet, /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. @@ -822,6 +893,21 @@ pub struct UnappliedSlash { payout: slashing::RK, } +/// Some indications about the size of the election. This must be submitted with the solution. +/// +/// Note that these values must reflect the __total__ number, not only those that are present in the +/// solution. In short, these should be the same size as the size of the values dumped in +/// `SnapshotValidators` and `SnapshotNominators`. +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Default)] +pub struct ElectionSize { + /// Number of validators in the snapshot of the current election round. + #[codec(compact)] + pub validators: ValidatorIndex, + /// Number of nominators in the snapshot of the current election round. + #[codec(compact)] + pub nominators: NominatorIndex, +} + /// The result of an election round. #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] pub struct ElectionResult { @@ -1220,6 +1306,9 @@ decl_event!( /// A new set of stakers was elected with the given computation method. StakingElection(ElectionCompute), + /// A new solution for the upcoming election has been stored. + SolutionStored(ElectionCompute), + /// Bond succeed. /// `amount` in `RingBalance`, `start_time` in `TsInMs`, `expired_time` in `TsInMs` BondRing(RingBalance, TsInMs, TsInMs), @@ -1297,6 +1386,8 @@ decl_error! { PhragmenBogusEdge, /// The claimed score does not match with the one computed from the data. PhragmenBogusScore, + /// The election size is invalid. + PhragmenBogusElectionSize, /// The call is not allowed at the given time due to restrictions of election period. CallNotAllowed, /// Incorrect previous history depth input provided. @@ -1394,7 +1485,7 @@ decl_module! { ); } else { if let Err(e) = compute_offchain_election::() { - log!(warn, "💸 Error in phragmen offchain worker: {:?}", e); + log!(error, "💸 Error in phragmen offchain worker: {:?}", e); } else { log!(debug, "Executed offchain worker thread without errors."); } @@ -2361,51 +2452,26 @@ decl_module! { /// minimized (to ensure less variance) /// /// # - /// E: number of edges. m: size of winner committee. n: number of nominators. d: edge degree - /// (16 for now) v: number of on-chain validator candidates. - /// - /// NOTE: given a solution which is reduced, we can enable a new check the ensure `|E| < n + - /// m`. We don't do this _yet_, but our offchain worker code executes it nonetheless. - /// - /// major steps (all done in `check_and_replace_solution`): - /// - /// - Storage: O(1) read `ElectionStatus`. - /// - Storage: O(1) read `PhragmenScore`. - /// - Storage: O(1) read `ValidatorCount`. - /// - Storage: O(1) length read from `SnapshotValidators`. - /// - /// - Storage: O(v) reads of `AccountId` to fetch `snapshot_validators`. - /// - Memory: O(m) iterations to map winner index to validator id. - /// - Storage: O(n) reads `AccountId` to fetch `snapshot_nominators`. - /// - Memory: O(n + m) reads to map index to `AccountId` for un-compact. - /// - /// - Storage: O(e) accountid reads from `Nomination` to read correct nominations. - /// - Storage: O(e) calls into `slashable_balance_of_vote_weight` to convert ratio to staked. - /// - /// - Memory: build_support_map. O(e). - /// - Memory: evaluate_support: O(E). - /// - /// - Storage: O(e) writes to `QueuedElected`. - /// - Storage: O(1) write to `QueuedScore` - /// - /// The weight of this call is 1/10th of the blocks total weight. + /// See `crate::weight` module. /// # - #[weight = 100_000_000_000] + #[weight = weight::weight_for_submit_solution::(winners, compact, size)] pub fn submit_election_solution( origin, winners: Vec, - compact_assignments: CompactAssignments, + compact: CompactAssignments, score: PhragmenScore, era: EraIndex, - ) { + size: ElectionSize, + ) -> DispatchResultWithPostInfo { let _who = ensure_signed(origin)?; Self::check_and_replace_solution( winners, - compact_assignments, + compact, ElectionCompute::Signed, score, era, - )? + size, + ) } /// Unsigned version of `submit_election_solution`. @@ -2413,22 +2479,28 @@ decl_module! { /// Note that this must pass the [`ValidateUnsigned`] check which only allows transactions /// from the local node to be included. In other words, only the block author can include a /// transaction in the block. - #[weight = 100_000_000_000] + /// + /// # + /// See `crate::weight` module. + /// # + #[weight = weight::weight_for_submit_solution::(winners, compact, size)] pub fn submit_election_solution_unsigned( origin, winners: Vec, - compact_assignments: CompactAssignments, + compact: CompactAssignments, score: PhragmenScore, era: EraIndex, - ) { + size: ElectionSize, + ) -> DispatchResultWithPostInfo { ensure_none(origin)?; Self::check_and_replace_solution( winners, - compact_assignments, + compact, ElectionCompute::Unsigned, score, era, - )? + size, + ) // TODO: instead of returning an error, panic. This makes the entire produced block // invalid. // This ensures that block authors will not ever try and submit a solution which is not @@ -2535,6 +2607,7 @@ impl Module { /// The total power that can be slashed from a stash account as of right now. pub fn power_of(stash: &T::AccountId) -> Power { + // Weight note: consider making the stake accessible through stash. Self::bonded(stash) .and_then(Self::ledger) .map(|l| { @@ -2561,6 +2634,7 @@ impl Module { } pub fn stake_of(stash: &T::AccountId) -> (RingBalance, KtonBalance) { + // Weight note: consider making the stake accessible through stash. Self::bonded(stash) .and_then(Self::ledger) .map(|l| (l.active_ring, l.active_kton)) @@ -2571,7 +2645,7 @@ impl Module { /// /// This data is used to efficiently evaluate election results. returns `true` if the operation /// is successful. - fn create_stakers_snapshot() -> (bool, Weight) { + pub fn create_stakers_snapshot() -> (bool, Weight) { let mut consumed_weight = 0; let mut add_db_reads_writes = |reads, writes| { consumed_weight += T::DbWeight::get().reads_writes(reads, writes); @@ -2813,28 +2887,36 @@ impl Module { } /// Basic and cheap checks that we perform in validate unsigned, and in the execution. - pub fn pre_dispatch_checks(score: PhragmenScore, era: EraIndex) -> Result<(), Error> { + /// + /// State reads: ElectionState, CurrentEr, QueuedScore. + /// + /// This function does weight refund in case of errors, which is based upon the fact that it is + /// called at the very beginning of the call site's function. + pub fn pre_dispatch_checks(score: PhragmenScore, era: EraIndex) -> DispatchResultWithPostInfo { // discard solutions that are not in-time // check window open ensure!( Self::era_election_status().is_open(), - >::PhragmenEarlySubmission, + >::PhragmenEarlySubmission.with_weight(T::DbWeight::get().reads(1)), ); // check current era. if let Some(current_era) = Self::current_era() { - ensure!(current_era == era, >::PhragmenEarlySubmission,) + ensure!( + current_era == era, + >::PhragmenEarlySubmission.with_weight(T::DbWeight::get().reads(2)), + ) } // assume the given score is valid. Is it better than what we have on-chain, if we have any? if let Some(queued_score) = Self::queued_score() { ensure!( is_score_better(queued_score, score), - >::PhragmenWeakSubmission, + >::PhragmenWeakSubmission.with_weight(T::DbWeight::get().reads(3)), ) } - Ok(()) + Ok(None.into()) } /// Checks a given solution and if correct and improved, writes it on chain as the queued result @@ -2845,24 +2927,49 @@ impl Module { compute: ElectionCompute, claimed_score: PhragmenScore, era: EraIndex, - ) -> Result<(), Error> { + election_size: ElectionSize, + ) -> DispatchResultWithPostInfo { // Do the basic checks. era, claimed score and window open. Self::pre_dispatch_checks(claimed_score, era)?; + // the weight that we will refund in case of a correct submission. We compute this now + // because the data needed for it will be consumed further down. + let adjusted_weight = weight::weight_for_correct_submit_solution::( + &winners, + &compact_assignments, + &election_size, + ); // Check that the number of presented winners is sane. Most often we have more candidates - // that we need. Then it should be Self::validator_count(). Else it should be all the + // than we need. Then it should be `Self::validator_count()`. Else it should be all the // candidates. - let snapshot_length = - >::decode_len().ok_or_else(|| >::SnapshotUnavailable)?; + let snapshot_validators_length = >::decode_len() + .map(|l| l as u32) + .ok_or_else(|| Error::::SnapshotUnavailable)?; + + // size of the solution must be correct. + ensure!( + snapshot_validators_length == u32::from(election_size.validators), + >::PhragmenBogusElectionSize, + ); // check the winner length only here and when we know the length of the snapshot validators // length. - let desired_winners = Self::validator_count().min(snapshot_length as u32); + let desired_winners = Self::validator_count().min(snapshot_validators_length); ensure!( winners.len() as u32 == desired_winners, >::PhragmenBogusWinnerCount ); + let snapshot_nominators_len = >::decode_len() + .map(|l| l as u32) + .ok_or_else(|| >::SnapshotUnavailable)?; + + // rest of the size of the solution must be correct. + ensure!( + snapshot_nominators_len == election_size.nominators, + >::PhragmenBogusElectionSize, + ); + // decode snapshot validators. let snapshot_validators = Self::snapshot_validators().ok_or(>::SnapshotUnavailable)?; @@ -2883,7 +2990,7 @@ impl Module { // decode the rest of the snapshot. let snapshot_nominators = - >::snapshot_nominators().ok_or(>::SnapshotUnavailable)?; + Self::snapshot_nominators().ok_or(>::SnapshotUnavailable)?; // helpers let nominator_at = |i: NominatorIndex| -> Option { @@ -2918,7 +3025,7 @@ impl Module { "💸 detected an error in the staking locking and snapshot." ); // abort. - return Err(>::PhragmenBogusNominator); + return Err(>::PhragmenBogusNominator.into()); } if !is_validator { @@ -2935,13 +3042,13 @@ impl Module { // each target in the provided distribution must be actually nominated by the // nominator after the last non-zero slash. if nomination.targets.iter().find(|&tt| tt == t).is_none() { - return Err(>::PhragmenBogusNomination); + return Err(>::PhragmenBogusNomination.into()); } if ::SlashingSpans::get(&t).map_or(false, |spans| { nomination.submitted_in < spans.last_nonzero_slash() }) { - return Err(>::PhragmenSlashedNomination); + return Err(>::PhragmenSlashedNomination.into()); } } } else { @@ -2980,8 +3087,9 @@ impl Module { let exposures = Self::collect_exposure(supports); log!( info, - "💸 A better solution (with compute {:?}) has been validated and stored on chain.", + "💸 A better solution (with compute {:?} and score {:?}) has been validated and stored on chain.", compute, + submitted_score, ); // write new results. @@ -2992,7 +3100,10 @@ impl Module { }); QueuedScore::put(submitted_score); - Ok(()) + // emit event. + Self::deposit_event(RawEvent::SolutionStored(compute)); + + Ok(Some(adjusted_weight).into()) } /// Start a session potentially starting an era. @@ -3317,7 +3428,7 @@ impl Module { let mut own_kton_balance: KtonBalance = Zero::zero(); let mut own_power = 0; let mut total_power = 0; - let mut others = vec![]; + let mut others = Vec::with_capacity(support.voters.len()); support.voters.into_iter().for_each(|(nominator, weight)| { let origin_weight = Self::power_of(&nominator) as ExtendedBalance; let (origin_ring_balance, origin_kton_balance) = Self::stake_of(&nominator); @@ -3329,8 +3440,8 @@ impl Module { ) { ring_balance.saturated_into() } else { - debug::error!( - target: "staking", + log!( + error, "[staking] Origin RING: {:?}, Weight: {:?}, Origin Weight: {:?}", origin_ring_balance, weight, @@ -3345,8 +3456,8 @@ impl Module { ) { kton_balance.saturated_into() } else { - debug::error!( - target: "staking", + log!( + error, "[staking] Origin KTON: {:?}, Weight: {:?}, Origin Weight: {:?}", origin_kton_balance, weight, @@ -3580,7 +3691,8 @@ impl Convert>> for ExposureOf { } /// This is intended to be used with `FilterHistoricalOffences`. -impl OnOffenceHandler> +impl + OnOffenceHandler, Weight> for Module where T: pallet_session::Trait>, @@ -3599,18 +3711,23 @@ where >], slash_fraction: &[Perbill], slash_session: SessionIndex, - ) -> Result<(), ()> { + ) -> Result { if !Self::can_report() { return Err(()); } let reward_proportion = SlashRewardFraction::get(); + let mut consumed_weight: Weight = 0; + let mut add_db_reads_writes = |reads, writes| { + consumed_weight += T::DbWeight::get().reads_writes(reads, writes); + }; let active_era = { let active_era = Self::active_era(); + add_db_reads_writes(1, 0); if active_era.is_none() { // this offence need not be re-submitted. - return Ok(()); + return Ok(consumed_weight); } active_era .expect("value checked not to be `None`; qed") @@ -3621,6 +3738,7 @@ where frame_support::print("Error: start_session_index must be set for current_era"); 0 }); + add_db_reads_writes(1, 0); let window_start = active_era.saturating_sub(T::BondingDurationInEra::get()); @@ -3630,6 +3748,7 @@ where active_era } else { let eras = BondedEras::get(); + add_db_reads_writes(1, 0); // reverse because it's more likely to find reports from recent eras. match eras @@ -3638,8 +3757,9 @@ where .filter(|&&(_, ref sesh)| sesh <= &slash_session) .next() { - None => return Ok(()), // before bonding period. defensive - should be filtered out. Some(&(ref slash_era, _)) => *slash_era, + // before bonding period. defensive - should be filtered out. + None => return Ok(consumed_weight), } }; @@ -3648,14 +3768,18 @@ where *earliest = Some(active_era) } }); + add_db_reads_writes(1, 1); let slash_defer_duration = T::SlashDeferDuration::get(); + let invulnerables = Self::invulnerables(); + add_db_reads_writes(1, 0); + for (details, slash_fraction) in offenders.iter().zip(slash_fraction) { let (stash, exposure) = &details.offender; // Skip if the validator is invulnerable. - if Self::invulnerables().contains(stash) { + if invulnerables.contains(stash) { continue; } @@ -3670,20 +3794,39 @@ where }); if let Some(mut unapplied) = unapplied { + let nominators_len = unapplied.others.len() as u64; + let reporters_len = details.reporters.len() as u64; + + { + let upper_bound = 1 /* Validator/NominatorSlashInEra */ + 2 /* fetch_spans */; + let rw = upper_bound + nominators_len * upper_bound; + add_db_reads_writes(rw, rw); + } unapplied.reporters = details.reporters.clone(); if slash_defer_duration == 0 { // apply right away. slashing::apply_slash::(unapplied); + { + let slash_cost = (6, 5); + let reward_cost = (2, 2); + add_db_reads_writes( + (1 + nominators_len) * slash_cost.0 + reward_cost.0 * reporters_len, + (1 + nominators_len) * slash_cost.1 + reward_cost.1 * reporters_len, + ); + } } else { // defer to end of some `slash_defer_duration` from now. ::UnappliedSlashes::mutate(active_era, move |for_later| { for_later.push(unapplied) }); + add_db_reads_writes(1, 1); } + } else { + add_db_reads_writes(4 /* fetch_spans */, 5 /* kick_out_if_recent */) } } - Ok(()) + Ok(consumed_weight) } fn can_report() -> bool { @@ -3760,18 +3903,14 @@ impl OnDepositRedeem for Module { } } -impl From> for InvalidTransaction { - fn from(e: Error) -> Self { - InvalidTransaction::Custom(e.as_u8()) - } -} - #[allow(deprecated)] impl frame_support::unsigned::ValidateUnsigned for Module { type Call = Call; fn validate_unsigned(source: TransactionSource, call: &Self::Call) -> TransactionValidity { - if let Call::submit_election_solution_unsigned(_, _, score, era) = call { + if let Call::submit_election_solution_unsigned(_, _, score, era, _) = call { + // --- substrate --- use offchain_election::DEFAULT_LONGEVITY; + use sp_runtime::DispatchError; // discard solution not coming from the local OCW. match source { @@ -3785,13 +3924,18 @@ impl frame_support::unsigned::ValidateUnsigned for Module { } } - if let Err(e) = Self::pre_dispatch_checks(*score, *era) { + if let Err(error_with_post_info) = Self::pre_dispatch_checks(*score, *era) { + let error = error_with_post_info.error; + let error_number = match error { + DispatchError::Module { error, .. } => error, + _ => 0, + }; log!( debug, - "validate unsigned pre dispatch checks failed due to {:?}.", - e + "validate unsigned pre dispatch checks failed due to module error #{:?}.", + error, ); - return InvalidTransaction::from(e).into(); + return InvalidTransaction::Custom(error_number).into(); } log!( diff --git a/frame/staking/src/mock.rs b/frame/staking/src/mock.rs index 0983c19fe4..520d2537df 100644 --- a/frame/staking/src/mock.rs +++ b/frame/staking/src/mock.rs @@ -248,6 +248,7 @@ impl frame_system::Trait for Test { type DbWeight = RocksDbWeight; type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/frame/staking/src/offchain_election.rs b/frame/staking/src/offchain_election.rs index a31558dd59..bbd2721d91 100644 --- a/frame/staking/src/offchain_election.rs +++ b/frame/staking/src/offchain_election.rs @@ -3,7 +3,7 @@ // --- crates --- use codec::Decode; // --- substrate --- -use frame_support::{debug, traits::Get}; +use frame_support::traits::Get; use frame_system::offchain::SubmitTransaction; use sp_phragmen::{ build_support_map, equalize, evaluate_support, reduce, Assignment, ExtendedBalance, @@ -17,7 +17,8 @@ use sp_runtime::{ use sp_std::{convert::TryInto, prelude::*}; // --- darwinia --- use crate::{ - Call, CompactAssignments, Module, NominatorIndex, OffchainAccuracy, Trait, ValidatorIndex, + Call, CompactAssignments, ElectionSize, Module, NominatorIndex, OffchainAccuracy, Trait, + ValidatorIndex, }; /// Error types related to the offchain election machinery. @@ -101,13 +102,14 @@ pub(crate) fn compute_offchain_election() -> Result<(), OffchainElecti } = >::do_phragmen::().ok_or(OffchainElectionError::ElectionFailed)?; // process and prepare it for submission. - let (winners, compact, score) = prepare_submission::(assignments, winners, true)?; + let (winners, compact, score, size) = prepare_submission::(assignments, winners, true)?; // defensive-only: current era can never be none except genesis. let current_era = >::current_era().unwrap_or_default(); // send it. - let call = Call::submit_election_solution_unsigned(winners, compact, score, current_era).into(); + let call = + Call::submit_election_solution_unsigned(winners, compact, score, current_era, size).into(); >>::submit_unsigned_transaction(call) .map_err(|_| OffchainElectionError::PoolSubmissionFailed) @@ -120,7 +122,15 @@ pub fn prepare_submission( assignments: Vec>, winners: Vec<(T::AccountId, ExtendedBalance)>, do_reduce: bool, -) -> Result<(Vec, CompactAssignments, PhragmenScore), OffchainElectionError> +) -> Result< + ( + Vec, + CompactAssignments, + PhragmenScore, + ElectionSize, + ), + OffchainElectionError, +> where ExtendedBalance: From<::Inner>, { @@ -220,12 +230,18 @@ where } } - debug::native::debug!( - target: "staking", + // both conversions are safe; snapshots are not created if they exceed. + let size = ElectionSize { + validators: snapshot_validators.len() as ValidatorIndex, + nominators: snapshot_nominators.len() as NominatorIndex, + }; + + crate::log!( + info, "prepared solution after {} equalization iterations with score {:?}", iterations_executed, score, ); - Ok((winners_indexed, compact, score)) + Ok((winners_indexed, compact, score, size)) } diff --git a/frame/staking/src/substrate_tests.rs b/frame/staking/src/substrate_tests.rs index a0982920cb..5bfe23bbd4 100644 --- a/frame/staking/src/substrate_tests.rs +++ b/frame/staking/src/substrate_tests.rs @@ -3564,6 +3564,67 @@ fn bond_during_era_correctly_populates_claimed_rewards() { }); } +#[test] +fn offences_weight_calculated_correctly() { + ExtBuilder::default().nominate(true).build_and_execute(|| { + // On offence with zero offenders: 4 Reads, 1 Write + let zero_offence_weight = ::DbWeight::get().reads_writes(4, 1); + assert_eq!( + Staking::on_offence(&[], &[Perbill::from_percent(50)], 0), + Ok(zero_offence_weight) + ); + + // On Offence with N offenders, Unapplied: 4 Reads, 1 Write + 4 Reads, 5 Writes + let n_offence_unapplied_weight = ::DbWeight::get() + .reads_writes(4, 1) + + ::DbWeight::get().reads_writes(4, 5); + + let offenders: Vec< + OffenceDetails< + ::AccountId, + pallet_session::historical::IdentificationTuple, + >, + > = (1..10) + .map(|i| OffenceDetails { + offender: ( + i, + Staking::eras_stakers(Staking::active_era().unwrap().index, i), + ), + reporters: vec![], + }) + .collect(); + assert_eq!( + Staking::on_offence(&offenders, &[Perbill::from_percent(50)], 0), + Ok(n_offence_unapplied_weight) + ); + + // On Offence with one offenders, Applied + let one_offender = [OffenceDetails { + offender: ( + 11, + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), + ), + reporters: vec![1], + }]; + + let n = 1; // Number of offenders + let rw = 3 + 3 * n; // rw reads and writes + let one_offence_unapplied_weight = ::DbWeight::get().reads_writes(4, 1) + + ::DbWeight::get().reads_writes(rw, rw) + // One `slash_cost` + + ::DbWeight::get().reads_writes(6, 5) + // `slash_cost` * nominators (1) + + ::DbWeight::get().reads_writes(6, 5) + // `reward_cost` * reporters (1) + + ::DbWeight::get().reads_writes(2, 2); + + assert_eq!( + Staking::on_offence(&one_offender, &[Perbill::from_percent(50)], 0), + Ok(one_offence_unapplied_weight) + ); + }); +} + #[test] fn on_initialize_weight_is_correct() { ExtBuilder::default() diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index fdfb542065..ba30fb8488 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-support" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Support code for Darwinia runtime" edition = "2018" @@ -14,9 +14,9 @@ codec = { package = "parity-scale-codec", version = "1.3.0", default-features = num-traits = { version = "0.2.11", default-features = false } impl-trait-for-tuples = { version = "0.1.3" } # substrate -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/support/src/tests.rs b/frame/support/src/tests.rs index 3f7bacc0aa..45f2f7d37e 100644 --- a/frame/support/src/tests.rs +++ b/frame/support/src/tests.rs @@ -1,3 +1,4 @@ +// --- custom --- use crate::*; /// Extract value from JSON response diff --git a/frame/support/src/traits.rs b/frame/support/src/traits.rs index 8bdda2134e..f70210a599 100644 --- a/frame/support/src/traits.rs +++ b/frame/support/src/traits.rs @@ -79,14 +79,14 @@ pub trait DustCollector { } #[impl_for_tuples(15)] -impl DustCollector for Balances { +impl DustCollector for Currencies { fn check(who: &AccountId) -> Result<(), ()> { - for_tuples!( #( Balances::check(who)?; )* ); + for_tuples!( #( Currencies::check(who)?; )* ); Ok(()) } fn collect(who: &AccountId) { - for_tuples!( #( Balances::collect(who); )* ); + for_tuples!( #( Currencies::collect(who); )* ); } } diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index 5da36f4cfb..6887aebc7d 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-treasury" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "FRAME pallet to manage treasury" edition = "2018" @@ -16,18 +16,18 @@ serde = { version = "1.0.106", optional = true, features = ["derive"] } darwinia-support = { default-features = false, path = "../support" } # substrate # TODO: benchmark -# frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +# frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # darwinia darwinia-balances = { path = "../balances" } # substrate -sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-io = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/frame/treasury/src/mock.rs b/frame/treasury/src/mock.rs index debfe5dff2..73d17a21e1 100644 --- a/frame/treasury/src/mock.rs +++ b/frame/treasury/src/mock.rs @@ -86,6 +86,7 @@ impl frame_system::Trait for Test { type DbWeight = (); type BlockExecutionWeight = (); type ExtrinsicBaseWeight = (); + type MaximumExtrinsicWeight = MaximumBlockWeight; type MaximumBlockLength = MaximumBlockLength; type AvailableBlockRatio = AvailableBlockRatio; type Version = (); diff --git a/primitives/array-bytes/Cargo.toml b/primitives/array-bytes/Cargo.toml index 31ab09bd61..ad8f5b6c20 100644 --- a/primitives/array-bytes/Cargo.toml +++ b/primitives/array-bytes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "array-bytes" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Minimal array/bytes operation for runtime" edition = "2018" @@ -10,7 +10,7 @@ repository = "https://github.com/darwinia-network/darwinia/" [dependencies] # substrate -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/primitives/eth-primitives/Cargo.toml b/primitives/eth-primitives/Cargo.toml index 7c694a1643..b8e9716563 100644 --- a/primitives/eth-primitives/Cargo.toml +++ b/primitives/eth-primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "eth-primitives" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Ethereum primitives for Darwinia Relay" edition = "2018" @@ -25,8 +25,8 @@ primitive-types = { default-features = false, features = ["codec", "rlp"], git = rlp = { default-features = false, git = "https://github.com/darwinia-network/parity-common.git" } rlp-derive = { git = "https://github.com/darwinia-network/parity-common.git" } # substrate -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # crates @@ -36,7 +36,7 @@ serde_json = { version = "1.0.51" } # github triehash = { git = "https://github.com/darwinia-network/parity-common.git" } # substrate -frame-support = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-support = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/primitives/merkle-patricia-trie/Cargo.toml b/primitives/merkle-patricia-trie/Cargo.toml index 4c8fe3f803..cb72c6afb9 100644 --- a/primitives/merkle-patricia-trie/Cargo.toml +++ b/primitives/merkle-patricia-trie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "merkle-patricia-trie" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Merkle-Patricia Trie (Ethereum Style)" edition = "2018" @@ -15,7 +15,7 @@ hashbrown = { version = "0.7.1" } hash = { package = "keccak-hash", default-features = false, git = "https://github.com/darwinia-network/parity-common.git" } rlp = { default-features = false, git = "https://github.com/darwinia-network/parity-common.git" } # substrate -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [dev-dependencies] # crates