From 4478502c88342cfeb4fe82bbb41a2894405be3b6 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 3 Jun 2020 11:46:07 +0800 Subject: [PATCH] Upgrade Substrate Rc2 (#453) * update: support boot from file * add: `OffchainWorkerConfig` and `SharedConfig` * update: doc * add: `ImportConfig` * add: boot from file example * update: format * update: deps tag * update: substrate rc2 * update: suppress warning * update: bump version * update: deps * update: spec version * add: default bootnodes * fix: missing comma --- .maintain/boot_conf_example.toml | 182 +++++ Cargo.lock | 1312 ++++++++++++++++-------------- Cargo.toml | 2 +- cli/Cargo.toml | 28 +- cli/src/cli.rs | 2 +- cli/src/command/config.rs | 996 +++++++++++++++++++++-- cli/src/command/mod.rs | 21 +- primitives/Cargo.toml | 10 +- primitives/src/lib.rs | 78 +- rpc/Cargo.toml | 32 +- rpc/src/lib.rs | 12 +- runtime/common/Cargo.toml | 12 +- runtime/common/src/impls.rs | 19 +- runtime/common/src/lib.rs | 4 +- runtime/crab/Cargo.toml | 83 +- runtime/crab/src/constants.rs | 22 +- runtime/crab/src/lib.rs | 9 +- service/Cargo.toml | 60 +- service/res/crab.json | 7 +- service/src/lib.rs | 69 +- 20 files changed, 2076 insertions(+), 884 deletions(-) create mode 100644 .maintain/boot_conf_example.toml diff --git a/.maintain/boot_conf_example.toml b/.maintain/boot_conf_example.toml new file mode 100644 index 000000000..a6f8b4644 --- /dev/null +++ b/.maintain/boot_conf_example.toml @@ -0,0 +1,182 @@ +# Enable validator mode. +# +# The node will be started with the authority role and actively +# participate in any consensus task that it can (e.g. depending on +# availability of local keys). +validator = true + +# Enable sentry mode. +# +# The node will be started with the authority role and participate in +# consensus tasks as an "observer", it will never actively participate +# regardless of whether it could (e.g. keys are available locally). This +# mode is useful as a secure proxy for validators (which would run +# detached from the network), since we want this node to participate in +# the full consensus protocols in order to have all needed consensus data +# available to relay to private nodes. +#sentry = [] + +# Disable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer. +#no-grandpa = false + +# Experimental: Run in light client mode. +#light = false + +# Listen to all RPC interfaces. +# +# Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy +# server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. +# Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. +#rpc-external = false + +# Listen to all RPC interfaces. +# +# Same as `--rpc-external`. +unsafe-rpc-external = true + +# RPC methods to expose. +# +# - `Unsafe`: Exposes every RPC method. +# - `Safe`: Exposes only a safe subset of RPC methods, denying unsafe RPC methods. +# - `Auto`: Acts as `Safe` if RPC is served externally, e.g. when `--{rpc,ws}-external` is passed, +# otherwise acts as `Unsafe`. +#rpc-methods = "Auto" + +# Listen to all Websocket interfaces. +# +# Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy +# server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. +# Use `--unsafe-ws-external` to suppress the warning if you understand the risks. +#ws-external = false + +# Listen to all Websocket interfaces. +# +# Same as `--ws-external` but doesn't warn you about it. +unsafe-ws-external = true + +# Listen to all Prometheu +# +# Default is local. +prometheus-external = true + +# Specify HTTP RPC server TCP port. +#rpc-port = 9933 + +# Specify WebSockets RPC server TCP port. +#ws-port = 9944 + +# Maximum number of WS RPC server connections. +#ws-max-connections = 25 + +# Specify browser Origins allowed to access the HTTP & WS RPC servers. +# +# A comma-separated list of origins (protocol://domain or special `null` +# value). Value of `all` will disable origin validation. Default is to +# allow localhost and https://polkadot.js.org origins. When running in +# --dev mode the default is to allow all origins. +rpc-cors = "All" + +# Specify Prometheus data source server TCP Port. +#prometheus-port = 9615 + +# Do not expose a Prometheus metric endpoint. +# +# Prometheus metric endpoint is enabled by default. +#no-primetheus = true + +# The human-readable name for this node. +# +# The node name will be reported to the telemetry server, if enabled. +name = "Example" + +# Disable connecting to the Substrate telemetry server. +# +# Telemetry is on by default on global chains. +#no-telemetry = true + +# The URL of the telemetry server to connect to. +# +# This flag can be passed multiple times as a means to specify multiple +# telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting +# the least verbosity. +# Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'`. +#telemetry-url = ["wss://telemetry.polkadot.io/submit/ 0"] + +# Specify the chain specification (one of dev, local, or staging). +#chain = "crab" + +# Specify the development chain. +#dev = true + +# Specify custom base path. +base-path = "/tmp/data" + +# Sets a custom logging filter. Syntax is =, e.g. -lsync=debug. +# +# Log levels (least to most verbose) are error, warn, info, debug, and trace. +# By default, all targets log `info`. The global log level can be set with -l. +log = ["sync=trace"] + +# Specify the state pruning mode, a number of blocks to keep or 'archive'. +# +# Default is to keep all block states if the node is running as a +# validator (i.e. 'archive'), otherwise state is only kept for the last +# 256 blocks. +pruning = "32" + +# Force start with unsafe pruning settings. +# +# When running as a validator it is highly recommended to disable state +# pruning (i.e. 'archive') which is the default. The node will refuse to +# start as a validator if pruning is enabled unless this option is set. +unsafe-pruning = true + +# Method for executing Wasm runtime code. +#wasm_method = "Interpreted" + +# Specify the state cache size. +#state-cache-size = 67108864 + +# Comma separated list of targets for tracing. +#tracing-targets = "" + +# Receiver to process tracing messages. +#tracing-receiver = "Log" + +# Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore. +#alice = true + +# Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore. +#bob = true + +# Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to keystore. +#charlie = true + +# Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore. +#dave = true + +# Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore. +#eve = true + +# Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore. +#ferdie = true + +# Shortcut for `--name One --validator` with session keys for `One` added to keystore. +#one = true + +# Shortcut for `--name Two --validator` with session keys for `Two` added to keystore. +#two = true + +# Enable authoring even when offline. +#force_authoring = true + +# The size of the instances cache for each runtime. +# +# The default value is 8 and the values higher than 256 are ignored. +#max-runtime-instances = 8 + +# Specify a list of sentry node public addresses. +# +# Can't be used with --public-addr as the sentry node would take precedence over the public address +# specified there. +#sentry-nodes = [] diff --git a/Cargo.lock b/Cargo.lock index a661d4e0c..8ad1615e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,18 +118,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" @@ -147,10 +135,10 @@ checksum = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" [[package]] name = "array-bytes" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" 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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] @@ -190,7 +178,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]] @@ -212,20 +200,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", @@ -238,6 +236,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" @@ -248,6 +270,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" @@ -444,20 +472,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" @@ -475,9 +489,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5356f1d23ee24a1f785a56d1d1a5f0fd5b0f6a0c0fb2412ce11da71649ab78f6" +checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" [[package]] name = "byte-slice-cast" @@ -682,7 +696,7 @@ checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" [[package]] name = "crab-runtime" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances", "darwinia-balances-rpc-runtime-api", @@ -724,6 +738,7 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "serde", + "smallvec 1.4.0", "sp-api", "sp-authority-discovery", "sp-block-builder", @@ -734,7 +749,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "sp-transaction-pool", "sp-version", "static_assertions", @@ -842,13 +857,36 @@ dependencies = [ "cfg-if", ] +[[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", ] @@ -859,7 +897,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", ] @@ -871,7 +909,7 @@ checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ "autocfg 1.0.0", "cfg-if", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", "memoffset", @@ -880,12 +918,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 = "ab6bffe714b6bb07e42f201352c34f51fefd355ace793f9e638ebd52d23f98d2" +dependencies = [ + "cfg-if", + "crossbeam-utils 0.7.2", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" +checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" dependencies = [ "cfg-if", - "crossbeam-utils", + "lazy_static", ] [[package]] @@ -936,20 +984,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" -version = "0.6.0" +version = "0.6.1" dependencies = [ "assert_cmd", "darwinia-cli", @@ -962,8 +1010,8 @@ dependencies = [ [[package]] name = "darwinia-balances" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -972,15 +1020,14 @@ dependencies = [ "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-balances-rpc" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -994,8 +1041,8 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1006,8 +1053,8 @@ dependencies = [ [[package]] name = "darwinia-claims" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "array-bytes", "darwinia-support", @@ -1018,33 +1065,35 @@ dependencies = [ "serde_json", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-cli" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-service", "log", "sc-cli", "sc-client-api", "sc-executor", + "sc-network", "sc-service", + "sc-tracing", "serde", - "serde_json", "structopt", "substrate-browser-utils", "substrate-build-script-utils", "tokio 0.2.21", + "toml", "wasm-bindgen", "wasm-bindgen-futures", ] [[package]] name = "darwinia-elections-phragmen" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-support", "frame-support", @@ -1053,13 +1102,13 @@ dependencies = [ "serde", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-eth-backing" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "array-bytes", "darwinia-eth-relay", @@ -1072,13 +1121,13 @@ dependencies = [ "serde", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-eth-offchain" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "array-bytes", "darwinia-eth-relay", @@ -1090,13 +1139,13 @@ dependencies = [ "rlp 0.4.4", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-eth-relay" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "array-bytes", "darwinia-support", @@ -1112,13 +1161,13 @@ dependencies = [ "serde_json", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-header-mmr" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "ckb-merkle-mountain-range", "frame-support", @@ -1126,12 +1175,12 @@ dependencies = [ "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-primitives" -version = "0.6.0" +version = "0.6.1" dependencies = [ "frame-system", "parity-scale-codec", @@ -1142,7 +1191,7 @@ dependencies = [ [[package]] name = "darwinia-rpc" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances-rpc", "darwinia-primitives", @@ -1168,7 +1217,7 @@ dependencies = [ [[package]] name = "darwinia-runtime-common" -version = "0.6.0" +version = "0.6.1" dependencies = [ "darwinia-balances", "darwinia-primitives", @@ -1179,12 +1228,12 @@ dependencies = [ "pallet-authorship", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-service" -version = "0.6.0" +version = "0.6.1" dependencies = [ "array-bytes", "crab-runtime", @@ -1230,8 +1279,8 @@ dependencies = [ [[package]] name = "darwinia-staking" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-staking-rpc-runtime-api", "darwinia-support", @@ -1247,14 +1296,14 @@ 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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "static_assertions", ] [[package]] name = "darwinia-staking-rpc" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -1268,8 +1317,8 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1280,21 +1329,21 @@ dependencies = [ [[package]] name = "darwinia-support" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" 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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "darwinia-treasury" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "darwinia-support", "frame-support", @@ -1302,14 +1351,14 @@ dependencies = [ "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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" @@ -1319,7 +1368,7 @@ checksum = "2127768764f1556535c01b5326ef94bd60ff08dcfbdc544d53e69ed155610f5d" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -1421,7 +1470,7 @@ checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -1475,8 +1524,8 @@ dependencies = [ [[package]] name = "eth-primitives" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "array-bytes", "ethbloom", @@ -1491,7 +1540,7 @@ dependencies = [ "rlp-derive", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] @@ -1504,7 +1553,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-rc2 (git+https://github.com/darwinia-network/substrate.git?branch=darwinia-develop)", "tiny-keccak 1.5.0", ] @@ -1589,7 +1638,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "synstructure", ] @@ -1689,16 +1738,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", @@ -1709,13 +1758,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -1723,25 +1772,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -1752,53 +1801,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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", @@ -1807,14 +1857,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "sp-version", ] [[package]] name = "frame-system-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 = [ "parity-scale-codec", "sp-api", @@ -1965,7 +2015,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -1983,6 +2033,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" @@ -2264,9 +2324,9 @@ dependencies = [ [[package]] name = "hex-literal-impl" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d4c5c844e2fee0bf673d54c2c177f1713b3d2af2ff6e666b49cb7572e6cf42d" +checksum = "853f769599eb31de176303197b7ba4973299c38c7a7604a6bc88c3eef05b9b46" dependencies = [ "proc-macro-hack", ] @@ -2383,9 +2443,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", @@ -2397,8 +2457,8 @@ dependencies = [ "httparse", "itoa", "log", - "net2", "pin-project", + "socket2", "time", "tokio 0.2.21", "tower-service", @@ -2414,7 +2474,7 @@ dependencies = [ "bytes 0.5.4", "ct-logs", "futures-util", - "hyper 0.13.5", + "hyper 0.13.6", "log", "rustls", "rustls-native-certs", @@ -2504,14 +2564,14 @@ checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] name = "indexmap" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" +checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe" dependencies = [ "autocfg 1.0.0", ] @@ -2562,6 +2622,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.5" @@ -2600,9 +2669,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", ] @@ -2654,7 +2723,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -2741,9 +2810,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", ] @@ -2824,15 +2893,15 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[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", @@ -2864,9 +2933,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", @@ -2887,7 +2956,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", @@ -2896,9 +2965,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", @@ -2912,7 +2981,7 @@ dependencies = [ "log", "multihash", "multistream-select", - "parity-multiaddr 0.8.0", + "parity-multiaddr 0.9.0", "parking_lot 0.10.2", "pin-project", "prost", @@ -2930,19 +2999,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", @@ -2951,9 +3020,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", @@ -2967,9 +3036,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", @@ -2994,11 +3063,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", @@ -3016,9 +3085,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", @@ -3032,9 +3101,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", @@ -3053,9 +3122,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", @@ -3068,9 +3137,9 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a0509a7e47245259954fef58b85b81bf4d29ae33a4365e38d718a866698774" +checksum = "7b73f0cc119c83a5b619d6d11074a319fdb4aa4daf8088ade00d511418566e28" dependencies = [ "aes-ctr", "ctr", @@ -3098,9 +3167,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", @@ -3113,24 +3182,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", @@ -3142,9 +3212,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", @@ -3163,9 +3233,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", @@ -3198,7 +3268,7 @@ dependencies = [ "hmac-drbg", "rand 0.7.3", "sha2", - "subtle 2.2.2", + "subtle 2.2.3", "typenum", ] @@ -3260,18 +3330,18 @@ 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", ] [[package]] name = "mach" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" dependencies = [ "libc", ] @@ -3342,13 +3412,13 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" -version = "0.6.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#28099e52791df499f46a839d5ee3335848756efe" +version = "0.6.1" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=darwinia-master#24c5d6e47a9c3384c607f0f3e02facae7e12c923" dependencies = [ "hashbrown 0.7.2", "keccak-hash", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] @@ -3434,9 +3504,9 @@ checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[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", @@ -3455,9 +3525,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", @@ -3649,16 +3719,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" @@ -3691,8 +3751,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", @@ -3701,33 +3761,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3742,29 +3798,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3773,13 +3828,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3789,13 +3844,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3809,13 +3864,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "pallet-identity" -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 = [ "enumflags2", "frame-benchmarking", @@ -3825,13 +3880,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3844,13 +3899,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "pallet-indices" -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", @@ -3860,13 +3915,13 @@ dependencies = [ "sp-io", "sp-keyring", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "pallet-membership" -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", @@ -3874,13 +3929,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3889,26 +3944,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "pallet-recovery" -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 = [ "enumflags2", "frame-support", @@ -3917,13 +3972,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3931,33 +3986,31 @@ 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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "sp-trie", ] [[package]] name = "pallet-society" -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", "rand_chacha 0.2.2", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3965,13 +4018,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -3981,27 +4034,28 @@ 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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "pallet-transaction-payment-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 = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4018,21 +4072,21 @@ dependencies = [ [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] name = "pallet-utility" -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", @@ -4041,7 +4095,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[package]] @@ -4078,9 +4132,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", @@ -4131,7 +4185,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -4163,7 +4217,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", ] @@ -4225,9 +4279,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", @@ -4235,14 +4289,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]] @@ -4281,9 +4335,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", @@ -4306,14 +4360,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" @@ -4321,6 +4375,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" @@ -4413,7 +4479,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "version_check", ] @@ -4425,16 +4491,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" @@ -4444,9 +4510,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", ] @@ -4498,7 +4564,7 @@ checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" dependencies = [ "bytes 0.5.4", "heck", - "itertools", + "itertools 0.8.2", "log", "multimap", "petgraph", @@ -4515,10 +4581,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", - "itertools", + "itertools 0.8.2", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -4805,7 +4871,7 @@ checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" dependencies = [ "crossbeam-deque", "crossbeam-queue", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "lazy_static", "num_cpus", ] @@ -4853,7 +4919,7 @@ checksum = "602eb59cda66fcb9aec25841fb76bc01d2b34282dcdd705028da297db6f3eec8" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -4869,9 +4935,9 @@ dependencies = [ [[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", @@ -4881,15 +4947,15 @@ 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 = "region" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856" +checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" dependencies = [ "bitflags", "libc", @@ -4908,9 +4974,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", @@ -4951,7 +5017,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]] @@ -4983,7 +5049,7 @@ dependencies = [ "base64 0.11.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils", + "crossbeam-utils 0.7.2", ] [[package]] @@ -5051,9 +5117,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" @@ -5066,8 +5132,8 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -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 = [ "bytes 0.5.4", "derive_more", @@ -5093,8 +5159,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", @@ -5102,6 +5168,7 @@ dependencies = [ "parity-scale-codec", "sc-block-builder", "sc-client-api", + "sc-proposer-metrics", "sc-telemetry", "sp-api", "sp-blockchain", @@ -5110,13 +5177,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", @@ -5131,8 +5199,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", @@ -5147,26 +5215,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", @@ -5200,8 +5267,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", @@ -5225,7 +5292,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "sp-storage", "sp-transaction-pool", "sp-trie", @@ -5236,8 +5303,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", @@ -5265,8 +5332,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", @@ -5276,8 +5343,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", @@ -5318,8 +5385,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe-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", "futures 0.3.5", @@ -5329,6 +5396,7 @@ dependencies = [ "sc-consensus-babe", "sc-consensus-epochs", "sc-keystore", + "sc-rpc-api", "serde", "sp-api", "sp-blockchain", @@ -5340,8 +5408,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", @@ -5353,8 +5421,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", @@ -5375,8 +5443,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", @@ -5389,8 +5457,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", @@ -5417,8 +5485,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", @@ -5434,8 +5502,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", @@ -5449,8 +5517,8 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -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 = [ "cranelift-codegen", "cranelift-wasm", @@ -5470,8 +5538,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", @@ -5507,8 +5575,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", @@ -5524,8 +5592,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", @@ -5541,8 +5609,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", @@ -5551,15 +5619,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", @@ -5607,8 +5676,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", @@ -5622,14 +5691,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", @@ -5649,8 +5718,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", @@ -5660,10 +5729,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", @@ -5694,8 +5772,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", @@ -5718,8 +5796,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", @@ -5733,8 +5811,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", @@ -5791,8 +5869,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", @@ -5805,8 +5883,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", @@ -5827,8 +5905,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", @@ -5842,8 +5920,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", @@ -5862,8 +5940,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", @@ -5910,7 +5988,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2", - "subtle 2.2.2", + "subtle 2.2.3", "zeroize", ] @@ -5920,6 +5998,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +[[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" @@ -5943,7 +6027,7 @@ checksum = "e367622f934864ffa1c704ba2b82280aab856e3d8213c84c5720257eb34b15b9" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6014,22 +6098,22 @@ 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]] @@ -6063,9 +6147,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", @@ -6086,16 +6170,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" @@ -6159,7 +6233,7 @@ checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6177,6 +6251,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" @@ -6191,10 +6284,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" @@ -6217,20 +6322,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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", @@ -6238,87 +6343,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -6333,8 +6437,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", @@ -6342,8 +6446,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", @@ -6357,7 +6461,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "sp-utils", "sp-version", "substrate-prometheus-endpoint", @@ -6365,8 +6469,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", @@ -6376,26 +6480,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -6424,7 +6528,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "sp-storage", "substrate-bip39", "tiny-bip39", @@ -6436,8 +6540,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", @@ -6445,29 +6549,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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", @@ -6477,35 +6581,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -6517,15 +6621,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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", @@ -6535,8 +6639,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", @@ -6545,8 +6649,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", @@ -6554,31 +6658,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -6586,8 +6690,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", @@ -6602,19 +6706,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "sp-tracing", "sp-wasm-interface", "static_assertions", @@ -6622,20 +6726,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", @@ -6643,31 +6747,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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", @@ -6685,52 +6789,52 @@ 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" +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-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?branch=darwinia-develop#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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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", @@ -6744,22 +6848,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "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", @@ -6769,24 +6873,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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", ] [[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 (git+https://github.com/darwinia-network/substrate.git?tag=v2.0.0-rc.darwinia.1)", "wasmi", ] @@ -6871,7 +6975,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6892,7 +6996,7 @@ dependencies = [ "heck", "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -6909,8 +7013,8 @@ dependencies = [ [[package]] name = "substrate-browser-utils" -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 = [ "chrono", "clear_on_drop", @@ -6936,16 +7040,16 @@ 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-frame-rpc-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-system-rpc-runtime-api", "futures 0.3.5", @@ -6965,13 +7069,13 @@ dependencies = [ [[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", @@ -6980,7 +7084,7 @@ dependencies = [ [[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 = "substrate-wasmtime" @@ -7079,9 +7183,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" @@ -7096,9 +7200,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", @@ -7113,7 +7217,7 @@ checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -7133,7 +7237,7 @@ checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "unicode-xid 0.2.0", ] @@ -7213,7 +7317,7 @@ checksum = "893582086c2f98cde18f906265a65b5030a074b1046c674ae898be6519a7f479" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -7362,7 +7466,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", ] @@ -7405,7 +7509,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", @@ -7473,7 +7577,7 @@ checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" dependencies = [ "crossbeam-deque", "crossbeam-queue", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures 0.1.29", "lazy_static", "log", @@ -7488,7 +7592,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", @@ -7575,7 +7679,7 @@ checksum = "99bbad0de3fd923c9c3232ead88510b783e5a4d16a6154adffa3d53308de984c" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", ] [[package]] @@ -7763,9 +7867,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" @@ -7775,9 +7879,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" @@ -7823,9 +7927,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", @@ -7833,24 +7937,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", @@ -7860,9 +7964,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", @@ -7870,22 +7974,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" @@ -8003,9 +8107,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", @@ -8013,9 +8117,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", @@ -8039,6 +8143,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" @@ -8130,12 +8253,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" @@ -8167,24 +8284,24 @@ checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" dependencies = [ "proc-macro2", "quote 1.0.6", - "syn 1.0.23", + "syn 1.0.30", "synstructure", ] [[package]] name = "zstd" -version = "0.5.1+zstd.1.4.4" +version = "0.5.2+zstd.1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5d978b793ae64375b80baf652919b148f6a496ac8802922d9999f5a553194f" +checksum = "644352b10ce7f333d6e0af85bd4f5322dc449416dc1211c6308e95bca8923db4" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "2.0.3+zstd.1.4.4" +version = "2.0.4+zstd.1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee25eac9753cfedd48133fa1736cbd23b774e253d89badbeac7d12b23848d3f" +checksum = "7113c0c9aed2c55181f2d9f5b0a36e7d2c0183b11c058ab40b35987479efe4d7" dependencies = [ "libc", "zstd-sys", @@ -8192,11 +8309,12 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.15+zstd.1.4.4" +version = "1.4.16+zstd.1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89719b034dc22d240d5b407fb0a3fe6d29952c181cff9a9f95c0bd40b4f8f7d8" +checksum = "c442965efc45353be5a9b9969c9b0872fff6828c7e06d118dda2cb2d0bb11d5a" dependencies = [ "cc", "glob", + "itertools 0.9.0", "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 2101845c9..f7a2f17fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ path = "src/main.rs" [package] name = "darwinia" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Darwinia node implementation in Rust" edition = "2018" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 54daf61c3..322a6bec0 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-cli" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Darwinia Client Node" edition = "2018" @@ -20,27 +20,29 @@ crate-type = ["cdylib", "rlib"] [dependencies] # crates log = { version = "0.4.8" } -serde = { optional = true, version = "1.0.106" } -serde_json = { optional = true, version = "1.0.51" } +serde = { version = "1.0.106", optional = true } structopt = { version = "0.3.13" } tokio = { version = "0.2.18", features = ["rt-threaded"], optional = true } +toml = { version = "0.5.6", optional = true } wasm-bindgen = { version = "0.2.60", optional = true } wasm-bindgen-futures = { version = "0.4.10", optional = true } # substrate frame # TODO: benchmark -# frame-benchmarking-cli = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8", optional = true } +# frame-benchmarking-cli = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1", optional = true } # substrate client -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-executor = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-service = { 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-rc.darwinia.1" } +sc-client-api = { 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-network = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-service = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-tracing = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } # substrate utils -substrate-browser-utils = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +substrate-browser-utils = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } # darwinia service darwinia-service = { default-features = false, path = "../service" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +substrate-build-script-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = [ @@ -51,10 +53,12 @@ default = [ wasmtime = ["sc-cli/wasmtime"] db = ["darwinia-service/db"] cli = [ - "tokio", "serde", - "serde_json", + "tokio", + "toml", "sc-cli", + "sc-network", + "sc-tracing", # TODO: benchmark # "frame-benchmarking-cli", "darwinia-service/full-node", diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 136b7fff8..d778fa1f2 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -39,7 +39,7 @@ pub struct Cli { #[structopt(flatten)] pub run: RunCmd, - /// Load the boot configuration json file from . Command line input will overwrite these. + /// Load the boot configuration json file from . Command line input will be overwritten by this. #[structopt(long = "conf", value_name = "PATH")] pub conf: Option, } diff --git a/cli/src/command/config.rs b/cli/src/command/config.rs index 141b4dd16..7077fa4cf 100644 --- a/cli/src/command/config.rs +++ b/cli/src/command/config.rs @@ -1,89 +1,931 @@ +// --- std --- +use std::{io::Read, path::PathBuf}; // --- crates --- use serde::Deserialize; +// --- substrate --- +use sc_cli::{CliConfiguration, SubstrateCli}; +// --- custom --- +use crate::cli::Cli; /// Service configuration. #[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] pub struct Configuration { - /// Implementation name - pub impl_name: String, - /// Implementation version (see sc-cli to see an example of format) - pub impl_version: String, - // /// Node role. - // pub role: Role, - // /// How to spawn background tasks. Mandatory, otherwise creating a `Service` will error. - // pub task_executor: Arc + Send>>) + Send + Sync>, - // /// Extrinsic pool configuration. - // pub transaction_pool: TransactionPoolOptions, - // /// Network configuration. - // pub network: NetworkConfiguration, - // /// Configuration for the keystore. - // pub keystore: KeystoreConfig, - // /// Configuration for the database. - // pub database: DatabaseConfig, - // /// Size of internal state cache in Bytes - // pub state_cache_size: usize, - // /// Size in percent of cache size dedicated to child tries - // pub state_cache_child_ratio: Option, - // /// Pruning settings. - // pub pruning: PruningMode, - // /// Chain configuration. - // pub chain_spec: Box, - // /// Wasm execution method. - // pub wasm_method: WasmExecutionMethod, - // /// Execution strategies. - // pub execution_strategies: ExecutionStrategies, - // /// Whether potentially unsafe RPC is considered safe to be exposed. - // pub unsafe_rpc_expose: bool, - // /// RPC over HTTP binding address. `None` if disabled. - // pub rpc_http: Option, - // /// RPC over Websockets binding address. `None` if disabled. - // pub rpc_ws: Option, - // /// Maximum number of connections for WebSockets RPC server. `None` if default. - // pub rpc_ws_max_connections: Option, - // /// CORS settings for HTTP & WS servers. `None` if all origins are allowed. - // pub rpc_cors: Option>, - // /// Prometheus endpoint configuration. `None` if disabled. - // pub prometheus_config: Option, - // /// Telemetry service URL. `None` if disabled. - // pub telemetry_endpoints: Option, - // /// External WASM transport for the telemetry. If `Some`, when connection to a telemetry - // /// endpoint, this transport will be tried in priority before all others. - // pub telemetry_external_transport: Option, - // /// The default number of 64KB pages to allocate for Wasm execution - // pub default_heap_pages: Option, - // /// Should offchain workers be executed. - // pub offchain_worker: OffchainWorkerConfig, - // /// Enable authoring even when offline. - // pub force_authoring: bool, - // /// Disable GRANDPA when running in validator mode - // pub disable_grandpa: bool, - // /// Development key seed. - // /// - // /// When running in development mode, the seed will be used to generate authority keys by the keystore. - // /// - // /// Should only be set when `node` is running development mode. - // pub dev_key_seed: Option, - // /// Tracing targets - // pub tracing_targets: Option, - // /// Tracing receiver - // pub tracing_receiver: sc_tracing::TracingReceiver, - // /// The size of the instances cache. - // /// - // /// The default value is 8. - // pub max_runtime_instances: usize, - // /// Announce block automatically after they have been imported - // pub announce_block: bool, -} + /// Enable validator mode. + /// + /// The node will be started with the authority role and actively + /// participate in any consensus task that it can (e.g. depending on + /// availability of local keys). + validator: Option, + + /// Enable sentry mode. + /// + /// The node will be started with the authority role and participate in + /// consensus tasks as an "observer", it will never actively participate + /// regardless of whether it could (e.g. keys are available locally). This + /// mode is useful as a secure proxy for validators (which would run + /// detached from the network), since we want this node to participate in + /// the full consensus protocols in order to have all needed consensus data + /// available to relay to private nodes. + // #[structopt( + // long = "sentry", + // conflicts_with_all = &[ "validator", "light" ], + // parse(try_from_str) + // )] + sentry: Option>, + + /// Disable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer. + no_grandpa: Option, + + /// Experimental: Run in light client mode. + // #[structopt(long = "light", conflicts_with = "sentry")] + light: Option, + + /// Listen to all RPC interfaces. + /// + /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy + /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. + /// Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. + rpc_external: Option, + + /// Listen to all RPC interfaces. + /// + /// Same as `--rpc-external`. + unsafe_rpc_external: Option, + + /// RPC methods to expose. + /// + /// - `Unsafe`: Exposes every RPC method. + /// - `Safe`: Exposes only a safe subset of RPC methods, denying unsafe RPC methods. + /// - `Auto`: Acts as `Safe` if RPC is served externally, e.g. when `--{rpc,ws}-external` is passed, + /// otherwise acts as `Unsafe`. + rpc_methods: Option, + + /// Listen to all Websocket interfaces. + /// + /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy + /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. + /// Use `--unsafe-ws-external` to suppress the warning if you understand the risks. + ws_external: Option, + + /// Listen to all Websocket interfaces. + /// + /// Same as `--ws-external` but doesn't warn you about it. + unsafe_ws_external: Option, + + /// Listen to all Prometheus data source interfaces. + /// + /// Default is local. + prometheus_external: Option, + + /// Specify HTTP RPC server TCP port. + rpc_port: Option, + + /// Specify WebSockets RPC server TCP port. + ws_port: Option, + + /// Maximum number of WS RPC server connections. + ws_max_connections: Option, + + /// Specify browser Origins allowed to access the HTTP & WS RPC servers. + /// + /// A comma-separated list of origins (protocol://domain or special `null` + /// value). Value of `all` will disable origin validation. Default is to + /// allow localhost and https://polkadot.js.org origins. When running in + /// --dev mode the default is to allow all origins. + rpc_cors: Option, + + /// Specify Prometheus data source server TCP Port. + prometheus_port: Option, + + /// Do not expose a Prometheus metric endpoint. + /// + /// Prometheus metric endpoint is enabled by default. + no_prometheus: Option, + + /// The human-readable name for this node. + /// + /// The node name will be reported to the telemetry server, if enabled. + name: Option, + /// Disable connecting to the Substrate telemetry server. + /// + /// Telemetry is on by default on global chains. + no_telemetry: Option, + + /// The URL of the telemetry server to connect to. + /// + /// This flag can be passed multiple times as a means to specify multiple + /// telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting + /// the least verbosity. + /// Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'`. + #[serde(rename = "telemetry-url")] + telemetry_endpoints: Option>, + + #[allow(missing_docs)] + #[serde(flatten)] + offchain_worker_config: OffchainWorkerConfig, + + #[allow(missing_docs)] + #[serde(flatten)] + shared_config: SharedConfig, + + #[allow(missing_docs)] + #[serde(flatten)] + import_config: ImportConfig, + // + // #[allow(missing_docs)] + // #[serde(flatten)] + // network_config: NetworkConfig, + // + // #[allow(missing_docs)] + // #[structopt(flatten)] + // pub pool_config: TransactionPoolParams, + // + /// Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore. + // #[structopt(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two"])] + alice: Option, + + /// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore. + // #[structopt(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two"])] + bob: Option, + + /// Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to keystore. + // #[structopt(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two"])] + charlie: Option, + + /// Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore. + // #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two"])] + dave: Option, + + /// Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore. + // #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two"])] + eve: Option, + + /// Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore. + // #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two"])] + ferdie: Option, + + /// Shortcut for `--name One --validator` with session keys for `One` added to keystore. + // #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two"])] + one: Option, + + /// Shortcut for `--name Two --validator` with session keys for `Two` added to keystore. + // #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one"])] + two: Option, + + /// Enable authoring even when offline. + force_authoring: Option, + // + // #[allow(missing_docs)] + // #[structopt(flatten)] + // pub keystore_params: KeystoreParams, + // + /// The size of the instances cache for each runtime. + /// + /// The default value is 8 and the values higher than 256 are ignored. + max_runtime_instances: Option, + + /// Specify a list of sentry node public addresses. + /// + /// Can't be used with --public-addr as the sentry node would take precedence over the public address + /// specified there. + // #[structopt( + // long = "sentry-nodes", + // value_name = "ADDR", + // conflicts_with_all = &[ "sentry", "public-addr" ] + // )] + sentry_nodes: Option>, +} impl Configuration { - pub fn load_config(path: &std::path::PathBuf) -> Self { - serde_json::from_reader(std::fs::File::open(path).unwrap()).unwrap() + pub fn create_runner_from_cli(cli: Cli) -> sc_cli::Result> { + if let Some(path) = &cli.conf { + Ok(Self::load_config(path).update_config(cli)?) + } else { + Ok(cli.create_runner(&cli.run.base)?) + } + } + + fn load_config(path: &PathBuf) -> Self { + let mut s = String::new(); + let mut f = std::fs::File::open(path).unwrap(); + f.read_to_string(&mut s).unwrap(); + + toml::from_str(&s).unwrap() } - pub fn update_config(self, config: &mut sc_service::config::Configuration) { - let Self { - impl_name, - impl_version, - } = self; + fn update_config(self, mut cli: Cli) -> sc_cli::Result> { + macro_rules! quick_if_let { + ($($source:tt).+, $($target:tt).+, $field:ident) => { + if let Some($field) = $($target).+.$field.clone() { + $($source).+.$field = $field.into(); + } + }; + ($($source:tt).+, $($target:tt).+, Some($field:ident)) => { + if $($target).+.$field.is_some() { + $($source).+.$field = $($target).+.$field.clone().into(); + } + }; + // ($($source:tt).+, $($target:ident$(($($params:expr),*))?).+, $field:ident) => { + // if let Some($field) = $($target$(($($params),*))?).+ { + // $($source).+.$field = $field.into(); + // } + // }; + } + + { + let cmd = &mut cli.run.base; + + quick_if_let!(cmd, self, validator); + quick_if_let!(cmd, self, sentry); + quick_if_let!(cmd, self, no_grandpa); + quick_if_let!(cmd, self, light); + quick_if_let!(cmd, self, rpc_external); + quick_if_let!(cmd, self, unsafe_rpc_external); + quick_if_let!(cmd, self, ws_external); + quick_if_let!(cmd, self, unsafe_ws_external); + quick_if_let!(cmd, self, prometheus_external); + quick_if_let!(cmd, self, Some(rpc_port)); + quick_if_let!(cmd, self, Some(ws_port)); + quick_if_let!(cmd, self, Some(ws_max_connections)); + quick_if_let!(cmd, self, Some(prometheus_port)); + quick_if_let!(cmd, self, no_prometheus); + quick_if_let!(cmd, self, Some(name)); + quick_if_let!(cmd, self, no_telemetry); + if let Some(telemetry_endpoints) = &self.telemetry_endpoints { + for telemetry_endpoint in telemetry_endpoints { + cmd.telemetry_endpoints + .push(parse_telemetry_endpoints(telemetry_endpoint)); + } + } + + quick_if_let!(cmd.shared_params, self.shared_config, Some(chain)); + quick_if_let!(cmd.shared_params, self.shared_config, dev); + quick_if_let!(cmd.shared_params, self.shared_config, Some(base_path)); + quick_if_let!(cmd.shared_params, self.shared_config, log); + + quick_if_let!( + cmd.import_params.pruning_params, + self.import_config.pruning_config, + Some(pruning) + ); + quick_if_let!(cmd.import_params, self.import_config, unsafe_pruning); + quick_if_let!(cmd.import_params, self.import_config, state_cache_size); + quick_if_let!(cmd.import_params, self.import_config, Some(tracing_targets)); + + // cmd.network_params.bootnodes = self.network_config.bootnodes; + // cmd.network_params.reserved_nodes = self.network_config.reserved_nodes; + // cmd.network_params.reserved_only = self.network_config.reserved_only; + // cmd.network_params.public_addr = self.network_config.public_addr; + // cmd.network_params.listen_addr = self.network_config.listen_addr; + // cmd.network_params.port = self.network_config.port; + // cmd.network_params.no_private_ipv4 = self.network_config.no_private_ipv4; + // cmd.network_params.out_peers = self.network_config.out_peers; + // cmd.network_params.in_peers = self.network_config.in_peers; + // cmd.network_params.no_mdns = self.network_config.no_mdns; + // cmd.network_params.max_parallel_downloads = self.network_config.max_parallel_downloads; + // cmd.network_params.no_yamux_flow_control = self.network_config.no_yamux_flow_control; + // cmd.network_params.discover_local = self.network_config.discover_local; + // cmd.network_params.legacy_network_protocol = + // self.network_config.legacy_network_protocol; + // + quick_if_let!(cmd, self, alice); + quick_if_let!(cmd, self, bob); + quick_if_let!(cmd, self, charlie); + quick_if_let!(cmd, self, dave); + quick_if_let!(cmd, self, eve); + quick_if_let!(cmd, self, ferdie); + quick_if_let!(cmd, self, one); + quick_if_let!(cmd, self, two); + quick_if_let!(cmd, self, force_authoring); + quick_if_let!(cmd, self, Some(max_runtime_instances)); + quick_if_let!(cmd, self, sentry_nodes); + } + + let mut runner = cli.create_runner(&cli.run.base)?; + { + let config = runner.config_mut(); + let is_dev = cli.run.base.is_dev().unwrap(); + let role = config.role.clone(); + // let base_path = self + // .base_path() + // .unwrap() + // .unwrap_or_else(|| { + // app_dirs::get_app_root( + // AppDataType::UserData, + // &AppInfo { + // name: cli.executable_name(), + // author: cli.author(), + // }, + // ) + // .expect("app directories exist on all supported platforms; qed") + // }) + // .join("chains") + // .join(chain_spec.id()); + + // config.rpc_methods = self.rpc_methods.into(); + // + + config.rpc_cors = self + .rpc_cors + .map(|s| parse_cors(&s).into()) + .unwrap_or_else(|| { + if is_dev { + None + } else { + Some(vec![ + "http://localhost:*".into(), + "http://127.0.0.1:*".into(), + "https://localhost:*".into(), + "https://127.0.0.1:*".into(), + "https://polkadot.js.org".into(), + ]) + } + }); + + config.offchain_worker = self + .offchain_worker_config + .offchain_worker(&config.offchain_worker, &role); + // + // config.database = match self.import_config.database_config { + // DatabaseConfig::RocksDb => sc_service::config::DatabaseConfig::RocksDb { + // path: base_path.join("db"), + // cache_size: self + // .import_config + // .database_config + // .database_cache_size + // .unwrap_or(128), + // }, + // DatabaseConfig::SubDb => sc_service::config::DatabaseConfig::SubDb { + // path: base_path.join("subdb"), + // }, + // DatabaseConfig::ParityDb => sc_service::config::DatabaseConfig::ParityDb { + // path: base_path.join("paritydb"), + // }, + // }; + // + quick_if_let!(config, self.import_config, wasm_method); + config.execution_strategies = self + .import_config + .execution_strategies(&config.execution_strategies, is_dev); + quick_if_let!(config, self.import_config, tracing_receiver); + } + + Ok(runner) + } +} + +/// Available RPC methods. +#[derive(Deserialize)] +#[serde(rename_all = "PascalCase")] +enum RpcMethods { + /// Expose every RPC method only when RPC is listening on `localhost`, + /// otherwise serve only safe RPC methods. + Auto, + /// Allow only a safe subset of RPC methods. + Safe, + /// Expose every RPC method (even potentially unsafe ones). + Unsafe, +} +impl Into for RpcMethods { + fn into(self) -> sc_service::config::RpcMethods { + match self { + RpcMethods::Auto => sc_service::config::RpcMethods::Auto, + RpcMethods::Safe => sc_service::config::RpcMethods::Safe, + RpcMethods::Unsafe => sc_service::config::RpcMethods::Unsafe, + } + } +} + +/// CORS setting +/// +/// The type is introduced to overcome `Option>` +/// handling of `structopt`. +enum Cors { + /// All hosts allowed. + All, + /// Only hosts on the list are allowed. + List(Vec), +} +impl From for Option> { + fn from(cors: Cors) -> Self { + match cors { + Cors::All => None, + Cors::List(list) => Some(list), + } } } + +/// Configuration of the database of the client. +#[derive(Deserialize)] +struct OffchainWorkerConfig { + /// Should execute offchain workers on every block. + /// + /// By default it's only enabled for nodes that are authoring new blocks. + #[serde(rename = "offchain-worker")] + enabled: Option, + /// allow writes from the runtime to the offchain worker database. + /// Enable Offchain Indexing API, which allows block import to write to Offchain DB. + /// + /// Enables a runtime to write directly to a offchain workers + /// DB during block import. + #[serde(rename = "enable-offchain-indexing")] + indexing_enabled: Option, +} +impl OffchainWorkerConfig { + /// Load spec to `Configuration` from `OffchainWorkerParams` and spec factory. + fn offchain_worker( + &self, + origin_config: &sc_service::config::OffchainWorkerConfig, + role: &sc_service::Role, + ) -> sc_service::config::OffchainWorkerConfig { + let enabled = if let Some(enabled) = &self.enabled { + match (enabled, role) { + (OffchainWorkerEnabled::WhenValidating, sc_service::Role::Authority { .. }) => true, + (OffchainWorkerEnabled::Always, _) => true, + (OffchainWorkerEnabled::Never, _) => false, + (OffchainWorkerEnabled::WhenValidating, _) => false, + } + } else { + origin_config.enabled + }; + let indexing_enabled = if let Some(indexing_enabled) = self.indexing_enabled { + indexing_enabled + } else { + origin_config.indexing_enabled + }; + + sc_service::config::OffchainWorkerConfig { + enabled, + indexing_enabled: enabled && indexing_enabled, + } + } +} +/// Whether off-chain workers are enabled. +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +enum OffchainWorkerEnabled { + Always, + Never, + WhenValidating, +} + +/// Shared parameters used by all `CoreParams`. +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +struct SharedConfig { + /// Specify the chain specification (one of dev, local, or staging). + chain: Option, + + /// Specify the development chain. + dev: Option, + + /// Specify custom base path. + base_path: Option, + + /// Sets a custom logging filter. Syntax is =, e.g. -lsync=debug. + /// + /// Log levels (least to most verbose) are error, warn, info, debug, and trace. + /// By default, all targets log `info`. The global log level can be set with -l. + log: Option>, +} + +/// Parameters for block import. +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +struct ImportConfig { + #[allow(missing_docs)] + #[serde(flatten)] + pruning_config: PruningConfig, + + #[allow(missing_docs)] + #[serde(flatten)] + database_config: DatabaseConfig, + + /// Force start with unsafe pruning settings. + /// + /// When running as a validator it is highly recommended to disable state + /// pruning (i.e. 'archive') which is the default. The node will refuse to + /// start as a validator if pruning is enabled unless this option is set. + unsafe_pruning: Option, + + /// Method for executing Wasm runtime code. + wasm_method: Option, + + #[allow(missing_docs)] + #[serde(flatten)] + execution_strategies: ExecutionStrategiesConfig, + + /// Specify the state cache size. + state_cache_size: Option, + + /// Comma separated list of targets for tracing. + tracing_targets: Option, + + /// Receiver to process tracing messages. + tracing_receiver: Option, +} +impl ImportConfig { + fn execution_strategies( + &self, + origin_execution_strategies: &sc_client_api::execution_extensions::ExecutionStrategies, + is_dev: bool, + ) -> sc_client_api::execution_extensions::ExecutionStrategies { + /// Default value for the `--execution-syncing` parameter. + const DEFAULT_EXECUTION_SYNCING: ExecutionStrategy = ExecutionStrategy::NativeElseWasm; + /// Default value for the `--execution-import-block` parameter. + const DEFAULT_EXECUTION_IMPORT_BLOCK: ExecutionStrategy = ExecutionStrategy::NativeElseWasm; + /// Default value for the `--execution-block-construction` parameter. + const DEFAULT_EXECUTION_BLOCK_CONSTRUCTION: ExecutionStrategy = ExecutionStrategy::Wasm; + /// Default value for the `--execution-offchain-worker` parameter. + const DEFAULT_EXECUTION_OFFCHAIN_WORKER: ExecutionStrategy = ExecutionStrategy::Native; + /// Default value for the `--execution-other` parameter. + const DEFAULT_EXECUTION_OTHER: ExecutionStrategy = ExecutionStrategy::Native; + + let exec = &self.execution_strategies; + let exec_all_or = |strat: ExecutionStrategy, default: ExecutionStrategy| { + exec.execution + .clone() + .unwrap_or(if strat == default && is_dev { + ExecutionStrategy::Native + } else { + strat + }) + .into() + }; + + sc_client_api::execution_extensions::ExecutionStrategies { + syncing: if let Some(syncing) = exec.execution_syncing.clone() { + exec_all_or(syncing, DEFAULT_EXECUTION_SYNCING) + } else { + origin_execution_strategies.syncing + }, + importing: if let Some(importing) = exec.execution_import_block.clone() { + exec_all_or(importing, DEFAULT_EXECUTION_IMPORT_BLOCK) + } else { + origin_execution_strategies.importing + }, + block_construction: if let Some(block_construction) = + exec.execution_block_construction.clone() + { + exec_all_or(block_construction, DEFAULT_EXECUTION_BLOCK_CONSTRUCTION) + } else { + origin_execution_strategies.block_construction + }, + offchain_worker: if let Some(offchain_worker) = exec.execution_offchain_worker.clone() { + exec_all_or(offchain_worker, DEFAULT_EXECUTION_OFFCHAIN_WORKER) + } else { + origin_execution_strategies.offchain_worker + }, + other: if let Some(other) = exec.execution_other.clone() { + exec_all_or(other, DEFAULT_EXECUTION_OTHER) + } else { + origin_execution_strategies.other + }, + } + } +} +/// Parameters to define the pruning mode +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +struct PruningConfig { + /// Specify the state pruning mode, a number of blocks to keep or 'archive'. + /// + /// Default is to keep all block states if the node is running as a + /// validator (i.e. 'archive'), otherwise state is only kept for the last + /// 256 blocks. + pruning: Option, +} +/// Parameters for block import. +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +struct DatabaseConfig { + #[serde(rename = "db")] + database: Option, + + /// Limit the memory the database cache can use. + #[serde(rename = "db-cache")] + database_cache_size: Option, +} +/// Database backend +#[derive(Deserialize)] +#[serde(rename_all = "PascalCase")] +enum Database { + // Facebooks RocksDB + RocksDb, + // Subdb. https://github.com/paritytech/subdb/ + SubDb, + // ParityDb. https://github.com/paritytech/parity-db/ + ParityDb, +} +/// How to execute Wasm runtime code +#[derive(Clone, Deserialize)] +#[serde(rename_all = "PascalCase")] +enum WasmExecutionMethod { + // Uses an interpreter. + Interpreted, + // Uses a compiled runtime. + Compiled, +} +impl Into for WasmExecutionMethod { + fn into(self) -> sc_service::config::WasmExecutionMethod { + match self { + WasmExecutionMethod::Interpreted => { + sc_service::config::WasmExecutionMethod::Interpreted + } + #[cfg(feature = "wasmtime")] + WasmExecutionMethod::Compiled => sc_service::config::WasmExecutionMethod::Compiled, + #[cfg(not(feature = "wasmtime"))] + WasmExecutionMethod::Compiled => panic!( + "Substrate must be compiled with \"wasmtime\" feature for compiled Wasm execution" + ), + } + } +} +/// Execution strategies parameters. +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +pub struct ExecutionStrategiesConfig { + /// The means of execution used when calling into the runtime while syncing blocks. + // #[structopt( + // long = "execution-syncing", + // value_name = "STRATEGY", + // possible_values = &ExecutionStrategy::variants(), + // case_insensitive = true, + // default_value = DEFAULT_EXECUTION_SYNCING.as_str(), + // )] + execution_syncing: Option, + + /// The means of execution used when calling into the runtime while importing blocks. + // #[structopt( + // long = "execution-import-block", + // value_name = "STRATEGY", + // possible_values = &ExecutionStrategy::variants(), + // case_insensitive = true, + // default_value = DEFAULT_EXECUTION_IMPORT_BLOCK.as_str(), + // )] + execution_import_block: Option, + + /// The means of execution used when calling into the runtime while constructing blocks. + // #[structopt( + // long = "execution-block-construction", + // value_name = "STRATEGY", + // possible_values = &ExecutionStrategy::variants(), + // case_insensitive = true, + // default_value = DEFAULT_EXECUTION_BLOCK_CONSTRUCTION.as_str(), + // )] + execution_block_construction: Option, + + /// The means of execution used when calling into the runtime while using an off-chain worker. + // #[structopt( + // long = "execution-offchain-worker", + // value_name = "STRATEGY", + // possible_values = &ExecutionStrategy::variants(), + // case_insensitive = true, + // default_value = DEFAULT_EXECUTION_OFFCHAIN_WORKER.as_str(), + // )] + execution_offchain_worker: Option, + + /// The means of execution used when calling into the runtime while not syncing, importing or constructing blocks. + // #[structopt( + // long = "execution-other", + // value_name = "STRATEGY", + // possible_values = &ExecutionStrategy::variants(), + // case_insensitive = true, + // default_value = DEFAULT_EXECUTION_OTHER.as_str(), + // )] + execution_other: Option, + + /// The execution strategy that should be used by all execution contexts. + // #[structopt( + // long = "execution", + // value_name = "STRATEGY", + // possible_values = &ExecutionStrategy::variants(), + // case_insensitive = true, + // conflicts_with_all = &[ + // "execution-other", + // "execution-offchain-worker", + // "execution-block-construction", + // "execution-import-block", + // "execution-syncing", + // ] + // )] + execution: Option, +} +/// How to execute blocks +#[derive(Clone, PartialEq, Deserialize)] +#[serde(rename_all = "PascalCase")] +enum ExecutionStrategy { + // Execute with native build (if available, WebAssembly otherwise). + Native, + // Only execute with the WebAssembly build. + Wasm, + // Execute with both native (where available) and WebAssembly builds. + Both, + // Execute with the native build if possible; if it fails, then execute with WebAssembly. + NativeElseWasm, +} +impl Into for ExecutionStrategy { + fn into(self) -> sc_client_api::ExecutionStrategy { + match self { + ExecutionStrategy::Native => sc_client_api::ExecutionStrategy::NativeWhenPossible, + ExecutionStrategy::Wasm => sc_client_api::ExecutionStrategy::AlwaysWasm, + ExecutionStrategy::Both => sc_client_api::ExecutionStrategy::Both, + ExecutionStrategy::NativeElseWasm => sc_client_api::ExecutionStrategy::NativeElseWasm, + } + } +} +#[derive(Clone, Deserialize)] +#[serde(rename_all = "PascalCase")] +enum TracingReceiver { + Log, + Telemetry, +} +impl Into for TracingReceiver { + fn into(self) -> sc_tracing::TracingReceiver { + match self { + TracingReceiver::Log => sc_tracing::TracingReceiver::Log, + TracingReceiver::Telemetry => sc_tracing::TracingReceiver::Telemetry, + } + } +} + +/// Parameters used to create the network configuration. +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +struct NetworkConfig { + /// Specify a list of bootnodes. + bootnodes: Vec, + + /// Specify a list of reserved node addresses. + reserved_nodes: Vec, + + /// Whether to only allow connections to/from reserved nodes. + /// + /// If you are a validator your node might still connect to other validator + /// nodes regardless of whether they are defined as reserved nodes. + reserved_only: bool, + + /// The public address that other nodes will use to connect to it. + /// This can be used if there's a proxy in front of this node. + public_addr: Vec, + + /// Listen on this multiaddress. + listen_addr: Vec, + + /// Specify p2p protocol TCP port. + port: Option, + + /// Forbid connecting to private IPv4 addresses (as specified in + /// [RFC1918](https://tools.ietf.org/html/rfc1918)), unless the address was passed with + /// `--reserved-nodes` or `--bootnodes`. + no_private_ipv4: bool, + + /// Specify the number of outgoing connections we're trying to maintain. + out_peers: u32, + + /// Specify the maximum number of incoming connections we're accepting. + in_peers: u32, + + /// Disable mDNS discovery. + /// + /// By default, the network will use mDNS to discover other nodes on the + /// local network. This disables it. Automatically implied when using --dev. + no_mdns: bool, + + /// Maximum number of peers from which to ask for the same blocks in parallel. + /// + /// This allows downloading announced blocks from multiple peers. Decrease to save + /// traffic and risk increased latency. + max_parallel_downloads: u32, + + #[allow(missing_docs)] + #[serde(flatten)] + node_key_config: NodeKeyConfig, + + /// Disable the yamux flow control. This option will be removed in the future once there is + /// enough confidence that this feature is properly working. + no_yamux_flow_control: bool, + + /// Enable peer discovery on local networks. + /// + /// By default this option is true for `--dev` and false otherwise. + discover_local: bool, + + /// Use the legacy "pre-mainnet-launch" networking protocol. Enable if things seem broken. + /// This option will be removed in the future. + legacy_network_protocol: bool, +} +/// Parameters used to create the `NodeKeyConfig`, which determines the keypair +/// used for libp2p networking. +#[derive(Deserialize)] +#[serde(rename_all = "kebab-case")] +struct NodeKeyConfig { + /// The secret key to use for libp2p networking. + /// + /// The value is a string that is parsed according to the choice of + /// `--node-key-type` as follows: + /// + /// `ed25519`: + /// The value is parsed as a hex-encoded Ed25519 32 byte secret key, + /// i.e. 64 hex characters. + /// + /// The value of this option takes precedence over `--node-key-file`. + /// + /// WARNING: Secrets provided as command-line arguments are easily exposed. + /// Use of this option should be limited to development and testing. To use + /// an externally managed secret key, use `--node-key-file` instead. + node_key: Option, + + /// The type of secret key to use for libp2p networking. + /// + /// The secret key of the node is obtained as follows: + /// + /// * If the `--node-key` option is given, the value is parsed as a secret key + /// according to the type. See the documentation for `--node-key`. + /// + /// * If the `--node-key-file` option is given, the secret key is read from the + /// specified file. See the documentation for `--node-key-file`. + /// + /// * Otherwise, the secret key is read from a file with a predetermined, + /// type-specific name from the chain-specific network config directory + /// inside the base directory specified by `--base-dir`. If this file does + /// not exist, it is created with a newly generated secret key of the + /// chosen type. + /// + /// The node's secret key determines the corresponding public key and hence the + /// node's peer ID in the context of libp2p. + node_key_type: NodeKeyType, + + /// The file from which to read the node's secret key to use for libp2p networking. + /// + /// The contents of the file are parsed according to the choice of `--node-key-type` + /// as follows: + /// + /// `ed25519`: + /// The file must contain an unencoded 32 byte Ed25519 secret key. + /// + /// If the file does not exist, it is created with a newly generated secret key of + /// the chosen type. + pub node_key_file: Option, +} +// impl NodeKeyConfig { +// /// Create a `NodeKeyConfig` from the given `NodeKeyParams` in the context +// /// of an optional network config storage directory. +// fn node_key(&self, net_config_dir: &PathBuf) -> sc_service::config::NodeKeyConfig { +// /// The file name of the node's Ed25519 secret key inside the chain-specific +// /// network config directory, if neither `--node-key` nor `--node-key-file` +// /// is specified in combination with `--node-key-type=ed25519`. +// const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; +// +// match self.node_key_type { +// NodeKeyType::Ed25519 => { +// let secret = if let Some(node_key) = self.node_key.as_ref() { +// parse_ed25519_secret(node_key)? +// } else { +// let path = self +// .node_key_file +// .clone() +// .unwrap_or_else(|| net_config_dir.join(NODE_KEY_ED25519_FILE)); +// +// sc_network::config::Secret::File(path) +// }; +// +// NodeKeyConfig::Ed25519(secret) +// } +// } +// } +// } +#[derive(Deserialize)] +#[serde(rename_all = "PascalCase")] +enum NodeKeyType { + Ed25519, +} + +fn parse_cors(s: &str) -> Cors { + let mut is_all = false; + let mut origins = Vec::new(); + for part in s.split(',') { + match part { + "All" | "*" => { + is_all = true; + break; + } + other => origins.push(other.to_owned()), + } + } + + if is_all { + Cors::All + } else { + Cors::List(origins) + } +} + +fn parse_telemetry_endpoints(s: &str) -> (String, u8) { + let pos = s.find(' ').unwrap(); + let url = s[..pos].to_string(); + let verbosity = s[pos + 1..].parse().unwrap(); + + (url, verbosity) +} diff --git a/cli/src/command/mod.rs b/cli/src/command/mod.rs index 3fcf5dad5..f1149db39 100644 --- a/cli/src/command/mod.rs +++ b/cli/src/command/mod.rs @@ -1,5 +1,5 @@ -// TODO: https://github.com/paritytech/substrate/issues/5936 -// mod config; +#[allow(unused)] +mod config; // --- crates --- use log::info; @@ -8,8 +8,7 @@ use sc_cli::SubstrateCli; use sc_executor::NativeExecutionDispatch; // --- darwinia --- use crate::cli::{Cli, Subcommand}; -// TODO: https://github.com/paritytech/substrate/issues/5936 -// use config::Configuration; +use config::Configuration; use darwinia_service::{crab_runtime, IdentifyVariant}; impl SubstrateCli for Cli { @@ -42,7 +41,7 @@ impl SubstrateCli for Cli { } fn load_spec(&self, id: &str) -> std::result::Result, String> { - Ok(match id { + Ok(match id.to_lowercase().as_ref() { "crab-dev" | "dev" => Box::new(darwinia_service::chain_spec::crab_development_config()), "crab-local" => Box::new(darwinia_service::chain_spec::crab_local_testnet_config()), "crab-genesis" => Box::new(darwinia_service::chain_spec::crab_build_spec_config()), @@ -59,16 +58,8 @@ pub fn run() -> sc_cli::Result<()> { let cli = Cli::from_args(); match &cli.subcommand { None => { - let mut runtime = cli.create_runner(&cli.run.base)?; - let config = runtime.config_mut(); - - // TODO: https://github.com/paritytech/substrate/issues/5936 - // if let Some(path) = &cli.conf { - // if path.is_file() { - // let darwinia_config = Configuration::load_config(path); - // darwinia_config.update_config(config); - // } - // } + let runtime = Configuration::create_runner_from_cli(cli)?; + let config = runtime.config(); info!(" _____ _ _ "); info!(" | __ \\ (_) (_) "); diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 8cbe2eb63..06dd83500 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-primitives" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Darwinia node runtime primitives" edition = "2018" @@ -12,11 +12,11 @@ repository = "https://github.com/darwinia-network/darwinia/" # crates codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } # substrate primitives -sp-application-crypto = { 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-application-crypto = { 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" } # substrate frame -frame-system = { 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-rc.darwinia.1" } [features] default = ["std"] diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 03490fee2..cae175db1 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -3,6 +3,39 @@ #![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs)] +/// App-specific crypto used for reporting equivocation/misbehavior in BABE, +/// GRANDPA and Parachains, described in the white paper as the fisherman role. +/// Any rewards for misbehavior reporting will be paid out to this account. +pub mod fisherman { + // --- substrate --- + use sp_core::crypto::KeyTypeId; + // --- crates --- + use super::{Signature, Verify}; + + /// Key type for the reporting module. Used for reporting BABE, GRANDPA + /// and Parachain equivocations. + pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b"fish"); + + mod app { + use sp_application_crypto::{app_crypto, sr25519}; + app_crypto!(sr25519, super::KEY_TYPE); + } + + /// Identity of the equivocation/misbehavior reporter. + pub type FishermanId = app::Public; + + /// An `AppCrypto` type to allow submitting signed transactions using the fisherman + /// application key as signer. + pub struct FishermanAppCrypto; + impl frame_system::offchain::AppCrypto<::Signer, Signature> + for FishermanAppCrypto + { + type RuntimeAppPublic = FishermanId; + type GenericPublic = sp_core::sr25519::Public; + type GenericSignature = sp_core::sr25519::Signature; + } +} + // --- substrate --- pub use sp_runtime::traits::{BlakeTwo256, Hash as HashT, IdentifyAccount, Verify}; /// Opaque, encoded, unchecked extrinsic. @@ -59,35 +92,20 @@ pub type Block = generic::Block; /// Block ID. pub type BlockId = generic::BlockId; -/// App-specific crypto used for reporting equivocation/misbehavior in BABE, -/// GRANDPA and Parachains, described in the white paper as the fisherman role. -/// Any rewards for misbehavior reporting will be paid out to this account. -pub mod fisherman { +#[ignore] +#[test] +fn print_module_account() { // --- substrate --- - use sp_core::crypto::KeyTypeId; - // --- crates --- - use super::{Signature, Verify}; - - /// Key type for the reporting module. Used for reporting BABE, GRANDPA - /// and Parachain equivocations. - pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b"fish"); - - mod app { - use sp_application_crypto::{app_crypto, sr25519}; - app_crypto!(sr25519, super::KEY_TYPE); - } - - /// Identity of the equivocation/misbehavior reporter. - pub type FishermanId = app::Public; - - /// An `AppCrypto` type to allow submitting signed transactions using the fisherman - /// application key as signer. - pub struct FishermanAppCrypto; - impl frame_system::offchain::AppCrypto<::Signer, Signature> - for FishermanAppCrypto - { - type RuntimeAppPublic = FishermanId; - type GenericSignature = sp_core::sr25519::Signature; - type GenericPublic = sp_core::sr25519::Public; - } + use sp_runtime::{traits::AccountIdConversion, ModuleId}; + + let old_module_id = ModuleId(*b"py/trsry"); + let new_module_id = ModuleId(*b"da/trsry"); + println!( + "old_module_id: {}", + >::into_account(&old_module_id) + ); + println!( + "new_module_id: {}", + >::into_account(&new_module_id) + ); } diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index f0a20120d..bd5b532aa 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-rpc" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Darwinia node rpc" edition = "2018" @@ -13,25 +13,25 @@ repository = "https://github.com/darwinia-network/darwinia/" codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } jsonrpc-core = { version = "14.0.5" } # substrate primitives -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-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-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-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-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } # darwinia primitives darwinia-primitives = { path = "../primitives" } # substrate frame -pallet-transaction-payment-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -substrate-frame-rpc-system = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +pallet-transaction-payment-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +substrate-frame-rpc-system = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } # darwinia frame darwinia-balances-rpc = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } darwinia-staking-rpc = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } # substrate client -sc-client-api = { 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-consensus-babe-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-consensus-epochs = { 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-keystore = { 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-client-api = { 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-consensus-babe-rpc = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-consensus-epochs = { 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-keystore = { 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" } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 82c7c7d5a..53b437d55 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -6,7 +6,7 @@ use std::sync::Arc; // --- substrate --- use sp_api::ProvideRuntimeApi; -use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_blockchain::{HeaderBackend, HeaderMetadata}; // --- darwinia --- use darwinia_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce, Power}; @@ -52,6 +52,8 @@ pub struct FullDeps { pub pool: Arc

, /// The SelectChain Strategy pub select_chain: SC, + /// Whether to deny unsafe calls + pub deny_unsafe: sc_rpc::DenyUnsafe, /// BABE specific dependencies. pub babe: BabeDeps, /// GRANDPA specific dependencies. @@ -62,7 +64,7 @@ pub struct FullDeps { pub fn create_full(deps: FullDeps) -> RpcExtension where C: ProvideRuntimeApi, - C: HeaderBackend + HeaderMetadata, + C: HeaderBackend + HeaderMetadata, C: 'static + Send + Sync, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, @@ -75,7 +77,7 @@ where { // --- substrate --- use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; - use sc_consensus_babe_rpc::{BabeApi, BabeRPCHandler}; + use sc_consensus_babe_rpc::{BabeApi, BabeRpcHandler}; use sc_finality_grandpa_rpc::{GrandpaApi, GrandpaRpcHandler}; use substrate_frame_rpc_system::{FullSystem, SystemApi}; // --- darwinia --- @@ -86,6 +88,7 @@ where client, pool, select_chain, + deny_unsafe, babe, grandpa, } = deps; @@ -104,12 +107,13 @@ where babe_config, shared_epoch_changes, } = babe; - io.extend_with(BabeApi::to_delegate(BabeRPCHandler::new( + io.extend_with(BabeApi::to_delegate(BabeRpcHandler::new( client.clone(), shared_epoch_changes, keystore, babe_config, select_chain, + deny_unsafe, ))); } { diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index da556ada5..c89fb80ce 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-runtime-common" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Darwinia node runtime common" edition = "2018" @@ -12,14 +12,14 @@ repository = "https://github.com/darwinia-network/darwinia/" # crates codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } # substrate primitives -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" } # darwinia primitives darwinia-primitives = { default-features = false, path = "../../primitives" } # substrate frame -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" } +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" } # darwinia frame darwinia-balances = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } darwinia-staking = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } diff --git a/runtime/common/src/impls.rs b/runtime/common/src/impls.rs index 75e2d980d..1ff05ab1b 100644 --- a/runtime/common/src/impls.rs +++ b/runtime/common/src/impls.rs @@ -1,14 +1,12 @@ //! Auxillary struct/enums for Darwinia runtime. -// --- core --- -use core::num::NonZeroI128; // --- crates --- use codec::{Decode, Encode}; // --- substrate --- use frame_support::traits::{Currency, Get, Imbalance, OnUnbalanced}; use sp_runtime::{ traits::{Convert, Saturating}, - RuntimeDebug, {Fixed128, Perquintill}, + Fixed128, FixedPointNumber, Perquintill, RuntimeDebug, }; // --- darwinia --- use crate::*; @@ -110,7 +108,7 @@ impl, R: frame_system::Trait> Convert { fn convert(multiplier: Fixed128) -> Fixed128 { let max_weight = MaximumBlockWeight::get(); - let block_weight = >::all_extrinsics_weight() + let block_weight = >::block_weight() .total() .min(max_weight); let target_weight = (T::get() * max_weight) as u128; @@ -120,17 +118,14 @@ impl, R: frame_system::Trait> Convert 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(), - ); + // `Fixed128::saturating_from_rational`. + 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); @@ -150,7 +145,7 @@ impl, R: frame_system::Trait> Convert // 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)) } } } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index f9bcd3c52..a615c937a 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -22,7 +22,7 @@ use frame_support::{ traits::Currency, weights::{constants::WEIGHT_PER_SECOND, Weight}, }; -use sp_runtime::Perbill; +use sp_runtime::{traits::Saturating, Perbill}; // --- darwinia --- use darwinia_primitives::BlockNumber; @@ -36,6 +36,8 @@ pub type NegativeImbalance = as C parameter_types! { pub const BlockHashCount: BlockNumber = 2400; pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; + 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); } diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index b9cbca278..c314732e8 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crab-runtime" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Darwinia node runtime for Crab network" edition = "2018" @@ -13,50 +13,51 @@ build = "build.rs" # crates codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } serde = { version = "1.0.106", optional = true } +smallvec = { version = "1.4.0" } static_assertions = { version = "1.1.0" } # substrate primitives -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-consensus-babe = { 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-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-offchain = { 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-session = { 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" } -sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sp-version = { 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-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-consensus-babe = { 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-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-offchain = { 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-session = { 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" } +sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sp-version = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } # darwinia primitives darwinia-primitives = { default-features = false, path = "../../primitives" } # substrate frame -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -frame-executive = { 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" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-authority-discovery = { 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-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-collective = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -# #pallet-democracy = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-finality-tracker = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-im-online = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-indices = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-identity = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-membership = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-offences = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-recovery = { 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" } -pallet-society = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -pallet-utility = { 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-executive = { 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" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-authority-discovery = { 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-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-collective = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +# #pallet-democracy = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-finality-tracker = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-im-online = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-indices = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-identity = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-membership = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-offences = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-recovery = { 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" } +pallet-society = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +pallet-utility = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } # darwinia frame darwinia-balances = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } darwinia-balances-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } @@ -73,7 +74,7 @@ darwinia-header-mmr = { default-features = false, git = "https://github.com/darw darwinia-runtime-common = { default-features = false, path = "../common" } [build-dependencies] -wasm-builder-runner = { package = "substrate-wasm-builder-runner", git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +wasm-builder-runner = { package = "substrate-wasm-builder-runner", git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } [features] default = ["std"] diff --git a/runtime/crab/src/constants.rs b/runtime/crab/src/constants.rs index d5ecd5861..9de91d2fd 100644 --- a/runtime/crab/src/constants.rs +++ b/runtime/crab/src/constants.rs @@ -51,9 +51,13 @@ pub mod time { /// Fee-related. pub mod fee { + // --- crates --- + use smallvec::smallvec; // --- substrate --- - use frame_support::weights::Weight; - use sp_runtime::{traits::Convert, Perbill}; + use frame_support::weights::{ + WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + }; + use sp_runtime::Perbill; // --- darwinia --- use super::currency::MILLI; use darwinia_primitives::Balance; @@ -73,10 +77,18 @@ pub mod fee { /// - Setting it to `0` will essentially disable the weight fee. /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. pub struct WeightToFee; - impl Convert for WeightToFee { - fn convert(x: Weight) -> Balance { + impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { // in Crab, extrinsic base weight (smallest non-zero weight) is mapped to 100 MILLI: - Balance::from(x).saturating_mul(100 * MILLI) / Balance::from(ExtrinsicBaseWeight::get()) + let p = 100 * MILLI; + let q = Balance::from(ExtrinsicBaseWeight::get()); + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational_approximation(p % q, q), + coeff_integer: p / q, + }] } } } diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index 579c9d3de..c97e85734 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -23,6 +23,7 @@ use static_assertions::const_assert; use frame_support::{ construct_runtime, debug, parameter_types, traits::{Imbalance, KeyOwnerProofSystem, LockIdentifier, OnUnbalanced, Randomness}, + weights::Weight, }; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; @@ -68,7 +69,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("Crab"), impl_name: create_runtime_str!("Crab"), authoring_version: 0, - spec_version: 2, + spec_version: 3, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -102,6 +103,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; @@ -180,10 +182,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 { @@ -348,6 +354,7 @@ impl pallet_utility::Trait for Runtime { type MultisigDepositBase = MultisigDepositBase; type MultisigDepositFactor = MultisigDepositFactor; type MaxSignatories = MaxSignatories; + type IsCallable = (); } parameter_types! { diff --git a/service/Cargo.toml b/service/Cargo.toml index b903bdab6..f3cb9c33f 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "darwinia-service" -version = "0.6.0" +version = "0.6.1" authors = ["Darwinia Network "] description = "Darwinia node service" edition = "2018" @@ -16,43 +16,43 @@ log = { version = "0.4.8" } serde = { version = "1.0.106", features = ["derive"] } serde_json = { version = "1.0.51" } # substrate primitives -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-block-builder = { 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-offchain = { 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-session = { 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" } +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-block-builder = { 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-offchain = { 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-session = { 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" } # darwinia primitives darwinia-primitives = { path = "../primitives" } # substrate frame -frame-system-rpc-runtime-api = { 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" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -substrate-prometheus-endpoint = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } +frame-system-rpc-runtime-api = { 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" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +substrate-prometheus-endpoint = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } # darwinia frame array-bytes = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } darwinia-balances-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } darwinia-staking-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "darwinia-master" } # substrate client -sc-authority-discovery = { 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-chain-spec = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-client-db = { 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-network = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-service = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-alpha.darwinia.8" } -sc-telemetry = { 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" } +sc-authority-discovery = { 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-chain-spec = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-client-db = { 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-network = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-service = { git = "https://github.com/darwinia-network/substrate.git", tag = "v2.0.0-rc.darwinia.1" } +sc-telemetry = { 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" } # darwinia runtime crab-runtime = { path = "../runtime/crab" } # darwinia rpc diff --git a/service/res/crab.json b/service/res/crab.json index 19ceb3076..a15c89471 100644 --- a/service/res/crab.json +++ b/service/res/crab.json @@ -2,7 +2,10 @@ "name": "Crab", "id": "crab", "chainType": "Live", - "bootNodes": [], + "bootNodes": [ + "/dns4/p2p.crab.darwinia.network/tcp/43567/p2p/12D3KooWAke1oeub6EqData2Y2J7reDmcCnXuuAV3J117UC1HPAg", + "/dns4/p2p-2.crab.darwinia.network/tcp/30333/p2p/12D3KooWMCTzZVwJCafwPVQGxr8CkSK1VKmg5pbhjKjqgEwhywSe" + ], "telemetryEndpoints": [ [ "/dns4/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F", @@ -7175,4 +7178,4 @@ "childrenDefault": {} } } -} \ No newline at end of file +} diff --git a/service/src/lib.rs b/service/src/lib.rs index 4e3751b3c..a55f4986f 100644 --- a/service/src/lib.rs +++ b/service/src/lib.rs @@ -161,39 +161,52 @@ macro_rules! new_full_start { Ok(import_queue) }, )? - .with_rpc_extensions(|builder| -> Result { - let babe_link = import_setup - .as_ref() - .map(|s| &s.2) - .expect("BabeLink is present for full services or set up faile; qed."); + .with_rpc_extensions_builder(|builder| { let grandpa_link = import_setup .as_ref() .map(|s| &s.1) .expect("GRANDPA LinkHalf is present for full services or set up failed; qed."); - let shared_authority_set = grandpa_link.shared_authority_set(); + + let shared_authority_set = grandpa_link.shared_authority_set().clone(); let shared_voter_state = SharedVoterState::empty(); - let deps = darwinia_rpc::FullDeps { - client: builder.client().clone(), - pool: builder.pool(), - select_chain: builder - .select_chain() - .cloned() - .expect("SelectChain is present for full services or set up failed; qed."), - babe: darwinia_rpc::BabeDeps { - keystore: builder.keystore(), - babe_config: sc_consensus_babe::BabeLink::config(babe_link).clone(), - shared_epoch_changes: sc_consensus_babe::BabeLink::epoch_changes(babe_link) - .clone(), - }, - grandpa: darwinia_rpc::GrandpaDeps { - shared_voter_state: shared_voter_state.clone(), - shared_authority_set: shared_authority_set.clone(), - }, - }; - rpc_setup = Some((shared_voter_state)); + rpc_setup = Some((shared_voter_state.clone())); - Ok(darwinia_rpc::create_full(deps)) + let babe_link = import_setup + .as_ref() + .map(|s| &s.2) + .expect("BabeLink is present for full services or set up faile; qed."); + + let babe_config = babe_link.config().clone(); + let shared_epoch_changes = babe_link.epoch_changes().clone(); + + let client = builder.client().clone(); + let pool = builder.pool().clone(); + let select_chain = builder + .select_chain() + .cloned() + .expect("SelectChain is present for full services or set up failed; qed."); + let keystore = builder.keystore().clone(); + + Ok(move |deny_unsafe| -> darwinia_rpc::RpcExtension { + let deps = darwinia_rpc::FullDeps { + client: client.clone(), + pool: pool.clone(), + select_chain: select_chain.clone(), + deny_unsafe, + babe: darwinia_rpc::BabeDeps { + babe_config: babe_config.clone(), + shared_epoch_changes: shared_epoch_changes.clone(), + keystore: keystore.clone(), + }, + grandpa: darwinia_rpc::GrandpaDeps { + shared_voter_state: shared_voter_state.clone(), + shared_authority_set: shared_authority_set.clone(), + }, + }; + + darwinia_rpc::create_full(deps) + }) })?; (builder, import_setup, inherent_data_providers, rpc_setup) @@ -243,6 +256,7 @@ macro_rules! new_full { let proposer = sc_basic_authorship::ProposerFactory::new( service.client(), service.transaction_pool(), + service.prometheus_registry().as_ref(), ); let select_chain = service.select_chain().ok_or(ServiceError::SelectChainRequired)?; @@ -422,7 +436,7 @@ macro_rules! new_light { backend, provider, )) as _) })? - .with_rpc_extensions(|builder| -> Result { + .with_rpc_extensions(|builder| { let fetcher = builder .fetcher() .ok_or_else(|| "Trying to start node RPC without active fetcher")?; @@ -436,7 +450,6 @@ macro_rules! new_light { client: builder.client().clone(), pool: builder.pool(), }; - Ok(darwinia_rpc::create_light(light_deps)) })? .build()