diff --git a/.gitignore b/.gitignore
index aadaa13912c19dbc056245784442d8b4c9de2a82..6398c09fe796278130978c2a8598ee9270399388 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,5 @@ rls*.log
*.rej
**/wip/*.stderr
.local
+**/hfuzz_target/
+**/hfuzz_workspace/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 962ecbe3e476880510c295cd93df19fdfc93247f..2c141c51d129617d06ad73eeecb7d652a1a876fa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,6 +24,7 @@
stages:
- test
- build
+ - post-build-test
- publish
- kubernetes
- flaming-fir
@@ -31,7 +32,7 @@ stages:
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: 100
- CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
+ CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
CARGO_INCREMENTAL: 0
CI_SERVER_NAME: "GitLab CI"
@@ -39,7 +40,7 @@ variables:
ARCH: "x86_64"
# FIXME set to release
CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.10"
- CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
+ CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder sp-arithmetic-fuzzer"
.collect-artifacts: &collect-artifacts
@@ -127,11 +128,13 @@ check-line-width:
allow_failure: true
-check-polkadot:
+
+
+check-polkadot-companion-build:
stage: build
<<: *docker-env
script:
- - ./.maintain/gitlab/check_polkadot.sh
+ - ./.maintain/gitlab/check_polkadot_companion_build.sh
interruptible: true
allow_failure: true
@@ -145,6 +148,20 @@ cargo-audit:
- cargo audit
allow_failure: true
+cargo-deny:
+ stage: test
+ <<: *docker-env
+ script:
+ - cargo deny check --hide-inclusion-graph -c .maintain/deny.toml
+ after_script:
+ - echo "___The complete log is in the artifacts___"
+ - cargo deny check -c .maintain/deny.toml 2> deny.log
+ artifacts:
+ name: $CI_COMMIT_SHORT_SHA
+ expire_in: 3 days
+ when: always
+ paths:
+ - deny.log
cargo-check-benches:
stage: test
@@ -176,17 +193,17 @@ test-linux-stable: &test-linux
variables:
- $DEPLOY_TAG
script:
- - WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked |
+ - WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked |&
tee output.log
- sccache -s
- after_script:
- - echo "___Collecting warnings for check_warnings job___"
+ - echo "____Test job successful, checking for warnings____"
- awk '/^warning:/,/^$/ { print }' output.log > ${CI_COMMIT_SHORT_SHA}_warnings.log
- artifacts:
- name: $CI_COMMIT_SHORT_SHA
- expire_in: 3 days
- paths:
- - ${CI_COMMIT_SHORT_SHA}_warnings.log
+ - if [ -s ${CI_COMMIT_SHORT_SHA}_warnings.log ]; then
+ cat ${CI_COMMIT_SHORT_SHA}_warnings.log;
+ exit 1;
+ else
+ echo "___No warnings___";
+ fi
test-dependency-rules:
stage: test
@@ -270,7 +287,7 @@ test-runtime-benchmarks:
- $DEPLOY_TAG
script:
- cd bin/node/cli
- - BUILD_DUMMY_WASM_BINARY=1 time cargo check --verbose --features runtime-benchmarks
+ - WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features runtime-benchmarks
- sccache -s
test-linux-stable-int:
@@ -314,7 +331,7 @@ check-web-wasm:
- time cargo build --target=wasm32-unknown-unknown -p sp-consensus
- time cargo build --target=wasm32-unknown-unknown -p sc-telemetry
# Note: the command below is a bit weird because several Cargo issues prevent us from compiling the node in a more straight-forward way.
- - time cargo build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown
+ - time cargo +nightly build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown -Z features=itarget
- sccache -s
test-full-crypto-feature:
@@ -400,24 +417,15 @@ build-rust-doc-release:
- echo "" > ./crate-docs/index.html
- sccache -s
-check_warnings:
- stage: build
- <<: *docker-env
- except:
- variables:
- - $DEPLOY_TAG
- variables:
- GIT_STRATEGY: none
- needs:
- - job: test-linux-stable
- artifacts: true
+check-polkadot-companion-status:
+ stage: post-build-test
+ image: parity/tools:latest
+ <<: *kubernetes-build
+ only:
+ - /^[0-9]+$/
script:
- - if [ -s ${CI_COMMIT_SHORT_SHA}_warnings.log ]; then
- cat ${CI_COMMIT_SHORT_SHA}_warnings.log;
- exit 1;
- else
- echo "___No warnings___";
- fi
+ - ./.maintain/gitlab/check_polkadot_companion_status.sh
+
trigger-contracts-ci:
diff --git a/.maintain/deny.toml b/.maintain/deny.toml
new file mode 100644
index 0000000000000000000000000000000000000000..8cc7635d5049be795e994b0ba740d9273b2f520f
--- /dev/null
+++ b/.maintain/deny.toml
@@ -0,0 +1,193 @@
+# This template contains all of the possible sections and their default values
+
+# Note that all fields that take a lint level have these possible values:
+# * deny - An error will be produced and the check will fail
+# * warn - A warning will be produced, but the check will not fail
+# * allow - No warning or error will be produced, though in some cases a note
+# will be
+
+# The values provided in this template are the default values that will be used
+# when any section or field is not specified in your own configuration
+
+# If 1 or more target triples (and optionally, target_features) are specified,
+# only the specified targets will be checked when running `cargo deny check`.
+# This means, if a particular package is only ever used as a target specific
+# dependency, such as, for example, the `nix` crate only being used via the
+# `target_family = "unix"` configuration, that only having windows targets in
+# this list would mean the nix crate, as well as any of its exclusive
+# dependencies not shared by any other crates, would be ignored, as the target
+# list here is effectively saying which targets you are building for.
+targets = [
+ # The triple can be any string, but only the target triples built in to
+ # rustc (as of 1.40) can be checked against actual config expressions
+ #{ triple = "x86_64-unknown-linux-musl" },
+ # You can also specify which target_features you promise are enabled for a
+ # particular target. target_features are currently not validated against
+ # the actual valid features supported by the target architecture.
+ #{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
+]
+
+# This section is considered when running `cargo deny check advisories`
+# More documentation for the advisories section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
+[advisories]
+# The path where the advisory database is cloned/fetched into
+db-path = "~/.cargo/advisory-db"
+# The url of the advisory database to use
+db-url = "https://github.com/rustsec/advisory-db"
+# The lint level for security vulnerabilities
+vulnerability = "deny"
+# The lint level for unmaintained crates
+unmaintained = "warn"
+# The lint level for crates that have been yanked from their source registry
+yanked = "warn"
+# The lint level for crates with security notices. Note that as of
+# 2019-12-17 there are no security notice advisories in
+# https://github.com/rustsec/advisory-db
+notice = "warn"
+# A list of advisory IDs to ignore. Note that ignored advisories will still
+# output a note when they are encountered.
+ignore = [
+ #"RUSTSEC-0000-0000",
+]
+# Threshold for security vulnerabilities, any vulnerability with a CVSS score
+# lower than the range specified will be ignored. Note that ignored advisories
+# will still output a note when they are encountered.
+# * None - CVSS Score 0.0
+# * Low - CVSS Score 0.1 - 3.9
+# * Medium - CVSS Score 4.0 - 6.9
+# * High - CVSS Score 7.0 - 8.9
+# * Critical - CVSS Score 9.0 - 10.0
+#severity-threshold =
+
+# This section is considered when running `cargo deny check licenses`
+# More documentation for the licenses section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
+[licenses]
+# The lint level for crates which do not have a detectable license
+unlicensed = "deny"
+# List of explictly allowed licenses
+# See https://spdx.org/licenses/ for list of possible licenses
+# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
+allow = [
+ #"MIT",
+ #"Apache-2.0",
+ #"Apache-2.0 WITH LLVM-exception",
+]
+# List of explictly disallowed licenses
+# See https://spdx.org/licenses/ for list of possible licenses
+# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
+deny = [
+ #"Nokia",
+]
+# Lint level for licenses considered copyleft
+copyleft = "allow"
+# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
+# * both - The license will be approved if it is both OSI-approved *AND* FSF
+# * either - The license will be approved if it is either OSI-approved *OR* FSF
+# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
+# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
+# * neither - This predicate is ignored and the default lint level is used
+allow-osi-fsf-free = "either"
+# Lint level used when no other predicates are matched
+# 1. License isn't in the allow or deny lists
+# 2. License isn't copyleft
+# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
+default = "deny"
+# The confidence threshold for detecting a license from license text.
+# The higher the value, the more closely the license text must be to the
+# canonical license text of a valid SPDX license file.
+# [possible values: any between 0.0 and 1.0].
+confidence-threshold = 0.9
+# Allow 1 or more licenses on a per-crate basis, so that particular licenses
+# aren't accepted for every possible crate as with the normal allow list
+exceptions = [
+ # Each entry is the crate and version constraint, and its specific allow
+ # list
+ #{ allow = ["Zlib"], name = "adler32", version = "*" },
+]
+
+# Some crates don't have (easily) machine readable licensing information,
+# adding a clarification entry for it allows you to manually specify the
+# licensing information
+[[licenses.clarify]]
+# The name of the crate the clarification applies to
+name = "ring"
+# THe optional version constraint for the crate
+#version = "*"
+# The SPDX expression for the license requirements of the crate
+expression = "OpenSSL"
+# One or more files in the crate's source used as the "source of truth" for
+# the license expression. If the contents match, the clarification will be used
+# when running the license check, otherwise the clarification will be ignored
+# and the crate will be checked normally, which may produce warnings or errors
+# depending on the rest of your configuration
+license-files = [
+ # Each entry is a crate relative path, and the (opaque) hash of its contents
+ { path = "LICENSE", hash = 0xbd0eed23 }
+]
+[[licenses.clarify]]
+name = "webpki"
+expression = "ISC"
+license-files = [{ path = "LICENSE", hash = 0x001c7e6c }]
+
+[licenses.private]
+# If true, ignores workspace crates that aren't published, or are only
+# published to private registries
+ignore = false
+# One or more private registries that you might publish crates to, if a crate
+# is only published to private registries, and ignore is true, the crate will
+# not have its license(s) checked
+registries = [
+ #"https://sekretz.com/registry
+]
+
+# This section is considered when running `cargo deny check bans`.
+# More documentation about the 'bans' section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
+[bans]
+# Lint level for when multiple versions of the same crate are detected
+multiple-versions = "warn"
+# The graph highlighting used when creating dotgraphs for crates
+# with multiple versions
+# * lowest-version - The path to the lowest versioned duplicate is highlighted
+# * simplest-path - The path to the version with the fewest edges is highlighted
+# * all - Both lowest-version and simplest-path are used
+highlight = "lowest-version"
+# List of crates that are allowed. Use with care!
+allow = [
+ #{ name = "ansi_term", version = "=0.11.0" },
+]
+# List of crates to deny
+deny = [
+ { name = "parity-util-mem", version = "<0.6" }
+ # Each entry the name of a crate and a version range. If version is
+ # not specified, all versions will be matched.
+]
+# Certain crates/versions that will be skipped when doing duplicate detection.
+skip = [
+ #{ name = "ansi_term", version = "=0.11.0" },
+]
+# Similarly to `skip` allows you to skip certain crates during duplicate
+# detection. Unlike skip, it also includes the entire tree of transitive
+# dependencies starting at the specified crate, up to a certain depth, which is
+# by default infinite
+skip-tree = [
+ #{ name = "ansi_term", version = "=0.11.0", depth = 20 },
+]
+
+# This section is considered when running `cargo deny check sources`.
+# More documentation about the 'sources' section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
+[sources]
+# Lint level for what to happen when a crate from a crate registry that is not
+# in the allow list is encountered
+unknown-registry = "deny"
+# Lint level for what to happen when a crate from a git repository that is not
+# in the allow list is encountered
+unknown-git = "warn"
+# List of URLs for allowed crate registries. Defaults to the crates.io index
+# if not specified. If it is specified but empty, no registries are allowed.
+allow-registry = ["https://github.com/rust-lang/crates.io-index"]
+# List of URLs for allowed Git repositories
+allow-git = []
diff --git a/.maintain/gitlab/check_polkadot.sh b/.maintain/gitlab/check_polkadot_companion_build.sh
similarity index 50%
rename from .maintain/gitlab/check_polkadot.sh
rename to .maintain/gitlab/check_polkadot_companion_build.sh
index 6087d86cdea475dcb5ac703879b22d91ea25e212..eb4c6440f46c9fcafbd6a9ea9d78102518a4e619 100755
--- a/.maintain/gitlab/check_polkadot.sh
+++ b/.maintain/gitlab/check_polkadot_companion_build.sh
@@ -3,9 +3,11 @@
# check if a pr is compatible with polkadot companion pr or master if not
# available
#
-# mark companion pr in the body of the polkadot pr like
+# to override one that was just mentioned mark companion pr in the body of the
+# polkadot pr like
#
# polkadot companion: paritytech/polkadot#567
+#
github_api_substrate_pull_url="https://api.github.com/repos/paritytech/substrate/pulls"
@@ -20,22 +22,24 @@ boldcat () { printf "|\n"; while read l; do printf "| \033[1m${l}\033[0m\n"; don
boldcat <<-EOT
-check_polkadot
-==============
+check_polkadot_companion_build
+==============================
this job checks if there is a string in the description of the pr like
polkadot companion: paritytech/polkadot#567
-it will then run cargo check from this polkadot's branch with substrate code
-from this pull request.
+it will then run cargo check from this polkadot's branch with substrate code
+from this pull request. in absence of that string it will check if a polkadot
+pr is mentioned and will use the last one instead. if none of the above can be
+found it will check if polkadot has a branch of the exact same name than the
+substrate's branch. if it can't find anything, it will uses master instead
EOT
-
SUBSTRATE_PATH=$(pwd)
# Clone the current Polkadot master branch into ./polkadot.
@@ -48,17 +52,43 @@ cd polkadot
if expr match "${CI_COMMIT_REF_NAME}" '^[0-9]\+$' >/dev/null
then
boldprint "this is pull request no ${CI_COMMIT_REF_NAME}"
+
+ pr_data_file="$(mktemp)"
# get the last reference to a pr in polkadot
- comppr="$(curl -H "${github_header}" -s ${github_api_substrate_pull_url}/${CI_COMMIT_REF_NAME} \
- | sed -n -r 's;^[[:space:]]+"body":[[:space:]]+".*polkadot companion: paritytech/polkadot#([0-9]+).*"[^"]+$;\1;p;$!d')"
- if [ "${comppr}" ]
+ curl -sSL -H "${github_header}" -o "${pr_data_file}" \
+ "${github_api_substrate_pull_url}/${CI_COMMIT_REF_NAME}"
+
+ pr_body="$(sed -n -r 's/^[[:space:]]+"body": (".*")[^"]+$/\1/p' "${pr_data_file}")"
+
+ pr_companion="$(echo "${pr_body}" | sed -n -r \
+ -e 's;^.*polkadot companion: paritytech/polkadot#([0-9]+).*$;\1;p' \
+ -e 's;^.*polkadot companion: https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+
+ if [ -z "${pr_companion}" ]
+ then
+ pr_companion="$(echo "${pr_body}" | sed -n -r \
+ -e 's;^.*paritytech/polkadot/#([0-9]+).*$;\1;p' \
+ -e 's;^.*https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+ fi
+
+ if [ "${pr_companion}" ]
then
- boldprint "companion pr specified: #${comppr}"
- git fetch --depth 1 origin refs/pull/${comppr}/head:pr/${comppr}
- git checkout pr/${comppr}
+ boldprint "companion pr specified/detected: #${pr_companion}"
+ git fetch --depth 1 origin refs/pull/${pr_companion}/head:pr/${pr_companion}
+ git checkout pr/${pr_companion}
else
- boldprint "no companion pr declared - building polkadot:master"
+ pr_ref="$(grep -Po '"ref"\s*:\s*"\K(?!master)[^"]*' "${pr_data_file}")"
+ if git fetch --depth 1 origin "$pr_ref":branch/"$pr_ref" 2>/dev/null
+ then
+ boldprint "companion branch detected: $pr_ref"
+ git checkout branch/"$pr_ref"
+ else
+ boldprint "no companion branch found - building polkadot:master"
+ fi
fi
+ rm -f "${pr_data_file}"
else
boldprint "this is not a pull request - building polkadot:master"
fi
diff --git a/.maintain/gitlab/check_polkadot_companion_status.sh b/.maintain/gitlab/check_polkadot_companion_status.sh
new file mode 100755
index 0000000000000000000000000000000000000000..5387e68f25cbba284433b8946f20f6eacfc76b9f
--- /dev/null
+++ b/.maintain/gitlab/check_polkadot_companion_status.sh
@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+# check for a polkadot companion pr and ensure it has approvals and is
+# mergeable
+#
+
+github_api_substrate_pull_url="https://api.github.com/repos/paritytech/substrate/pulls"
+github_api_polkadot_pull_url="https://api.github.com/repos/paritytech/polkadot/pulls"
+# use github api v3 in order to access the data without authentication
+github_header="Accept: application/vnd.github.v3+json"
+
+boldprint () { printf "|\n| \033[1m${@}\033[0m\n|\n" ; }
+boldcat () { printf "|\n"; while read l; do printf "| \033[1m${l}\033[0m\n"; done; printf "|\n" ; }
+
+
+
+boldcat <<-EOT
+
+
+check_polkadot_companion_status
+===============================
+
+this job checks if there is a string in the description of the pr like
+
+polkadot companion: paritytech/polkadot#567
+
+or any other polkadot pr is mentioned in this pr's description and checks its
+status.
+
+
+EOT
+
+
+if ! [ "${CI_COMMIT_REF_NAME}" -gt 0 2>/dev/null ]
+then
+ boldprint "this doesn't seem to be a pull request"
+ exit 1
+fi
+
+boldprint "this is pull request no ${CI_COMMIT_REF_NAME}"
+
+pr_body="$(curl -H "${github_header}" -s ${github_api_substrate_pull_url}/${CI_COMMIT_REF_NAME} \
+ | sed -n -r 's/^[[:space:]]+"body": (".*")[^"]+$/\1/p')"
+
+# get companion if explicitly specified
+pr_companion="$(echo "${pr_body}" | sed -n -r \
+ -e 's;^.*polkadot companion: paritytech/polkadot#([0-9]+).*$;\1;p' \
+ -e 's;^.*polkadot companion: https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+
+# get companion mentioned in the description
+if [ -z "${pr_companion}" ]
+then
+ pr_companion="$(echo "${pr_body}" | sed -n -r \
+ 's;^.*https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+fi
+
+if [ -z "${pr_companion}" ]
+then
+ boldprint "no companion pr found"
+ exit 0
+fi
+
+boldprint "companion pr: #${pr_companion}"
+
+# check the status of that pull request - needs to be
+# mergable and approved
+
+curl -H "${github_header}" -sS -o companion_pr.json \
+ ${github_api_polkadot_pull_url}/${pr_companion}
+
+if jq -e .merged < companion_pr.json >/dev/null
+then
+ boldprint "polkadot pr #${pr_companion} already merged"
+ exit 0
+fi
+
+if jq -e '.mergeable' < companion_pr.json >/dev/null
+then
+ boldprint "polkadot pr #${pr_companion} mergeable"
+else
+ boldprint "polkadot pr #${pr_companion} not mergeable"
+ exit 1
+fi
+
+curl -H "${github_header}" -sS -o companion_pr_reviews.json \
+ ${github_api_polkadot_pull_url}/${pr_companion}/reviews
+
+if [ -n "$(jq -r -e '.[].state | select(. == "CHANGES_REQUESTED")' < companion_pr_reviews.json)" ] && \
+ [ -z "$(jq -r -e '.[].state | select(. == "APPROVED")' < companion_pr_reviews.json)" ]
+then
+ boldprint "polkadot pr #${pr_companion} not APPROVED"
+ exit 1
+fi
+
+boldprint "polkadot pr #${pr_companion} state APPROVED"
+exit 0
+
+
diff --git a/.maintain/node-template-release/Cargo.toml b/.maintain/node-template-release/Cargo.toml
index 606def19bb99f1002058d1d868181cbc9c0fbb56..dd3166d58ddf463580474a02ea70efdcdbf00228 100644
--- a/.maintain/node-template-release/Cargo.toml
+++ b/.maintain/node-template-release/Cargo.toml
@@ -16,3 +16,6 @@ git2 = "0.8"
flate2 = "1.0"
[workspace]
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/Cargo.lock b/Cargo.lock
index 4f1e5a4c566d80e5f80965722a12427a289b2c31..de2b174826e02f89887efd4b17258dea9722d9a2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -70,14 +70,13 @@ dependencies = [
[[package]]
name = "alga"
-version = "0.9.2"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "658f9468113d34781f6ca9d014d174c74b73de870f1e0e3ad32079bbab253b19"
+checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2"
dependencies = [
"approx",
- "libm",
"num-complex",
- "num-traits",
+ "num-traits 0.2.11",
]
[[package]]
@@ -100,9 +99,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.26"
+version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c"
+checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff"
[[package]]
name = "app_dirs"
@@ -122,14 +121,20 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"
dependencies = [
- "num-traits",
+ "num-traits 0.2.11",
]
+[[package]]
+name = "arbitrary"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75153c95fdedd7db9732dfbfc3702324a1627eec91ba56e37cd0ac78314ab2ed"
+
[[package]]
name = "arc-swap"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff"
+checksum = "d663a8e9a99154b5fb793032533f6328da35e23aac63d5c152279aa8ba356825"
[[package]]
name = "arrayref"
@@ -167,21 +172,21 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502"
dependencies = [
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "assert_cmd"
-version = "0.12.0"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6283bac8dd7226470d491bc4737816fea4ca1fba7a2847f2e9097fd6bfb4624c"
+checksum = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da"
dependencies = [
"doc-comment",
- "escargot",
"predicates",
"predicates-core",
"predicates-tree",
+ "wait-timeout",
]
[[package]]
@@ -205,7 +210,7 @@ dependencies = [
"futures-io",
"futures-timer 2.0.2",
"kv-log-macro",
- "log 0.4.8",
+ "log",
"memchr",
"mio",
"mio-uds",
@@ -263,9 +268,9 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "backtrace"
-version = "0.3.45"
+version = "0.3.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad235dabf00f36301792cfe82499880ba54c6486be094d1047b02bacb67c14e8"
+checksum = "b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e"
dependencies = [
"backtrace-sys",
"cfg-if",
@@ -275,9 +280,9 @@ dependencies = [
[[package]]
name = "backtrace-sys"
-version = "0.1.34"
+version = "0.1.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca797db0057bae1a7aa2eef3283a874695455cecf08a43bfb8507ee0ebc1ed69"
+checksum = "7de8aba10a69c8e8d7622c5710229485ec32e9d55fdad160ea559c086fdcd118"
dependencies = [
"cc",
"libc",
@@ -289,16 +294,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83"
-[[package]]
-name = "base64"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643"
-dependencies = [
- "byteorder 1.3.4",
- "safemem",
-]
-
[[package]]
name = "base64"
version = "0.10.1"
@@ -338,10 +333,10 @@ dependencies = [
"env_logger 0.7.1",
"lazy_static",
"lazycell",
- "log 0.4.8",
+ "log",
"peeking_take_while",
"proc-macro2",
- "quote",
+ "quote 1.0.3",
"regex",
"rustc-hash",
"shlex",
@@ -362,9 +357,13 @@ checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead"
[[package]]
name = "bitvec"
-version = "0.15.2"
+version = "0.17.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6"
+checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c"
+dependencies = [
+ "either",
+ "radium",
+]
[[package]]
name = "blake2"
@@ -399,6 +398,17 @@ dependencies = [
"constant_time_eq",
]
+[[package]]
+name = "blake2s_simd"
+version = "0.5.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab9e07352b829279624ceb7c64adb4f585dacdb81d35cafae81139ccd617cf44"
+dependencies = [
+ "arrayref",
+ "arrayvec 0.5.1",
+ "constant_time_eq",
+]
+
[[package]]
name = "block-buffer"
version = "0.7.3"
@@ -451,9 +461,9 @@ checksum = "b170cd256a3f9fa6b9edae3e44a7dfdfc77e8124dbc3e2612d75f9c3e2396dae"
[[package]]
name = "bstr"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48"
+checksum = "2889e6d50f394968c8bf4240dc3f2a7eb4680844d27308f798229ac9d4725f41"
dependencies = [
"lazy_static",
"memchr",
@@ -472,9 +482,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.2.0"
+version = "3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742"
+checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187"
[[package]]
name = "byte-slice-cast"
@@ -597,16 +607,16 @@ checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2"
dependencies = [
"js-sys",
"num-integer",
- "num-traits",
+ "num-traits 0.2.11",
"time",
"wasm-bindgen",
]
[[package]]
name = "clang-sys"
-version = "0.29.2"
+version = "0.29.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f92986241798376849e1a007827041fed9bb36195822c2049d18e174420e0534"
+checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a"
dependencies = [
"glob 0.3.0",
"libc",
@@ -671,7 +681,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48"
dependencies = [
- "log 0.4.8",
+ "log",
"web-sys",
]
@@ -738,7 +748,7 @@ dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
"gimli",
- "log 0.4.8",
+ "log",
"serde",
"smallvec 1.2.0",
"target-lexicon",
@@ -777,7 +787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "518344698fa6c976d853319218415fdfb4f1bc6b42d0b2e2df652e55dff1f778"
dependencies = [
"cranelift-codegen",
- "log 0.4.8",
+ "log",
"smallvec 1.2.0",
"target-lexicon",
]
@@ -802,7 +812,7 @@ dependencies = [
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
- "log 0.4.8",
+ "log",
"serde",
"thiserror",
"wasmparser",
@@ -831,7 +841,7 @@ dependencies = [
"itertools",
"lazy_static",
"libc",
- "num-traits",
+ "num-traits 0.2.11",
"rand_core 0.3.1",
"rand_os",
"rand_xoshiro",
@@ -857,7 +867,7 @@ dependencies = [
"csv",
"itertools",
"lazy_static",
- "num-traits",
+ "num-traits 0.2.11",
"oorandom",
"plotters",
"rayon",
@@ -1000,8 +1010,8 @@ version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47c5e5ac752e18207b12e16b10631ae5f7f68f8805f335f9b817ead83d9ffce1"
dependencies = [
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1045,13 +1055,13 @@ checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788"
[[package]]
name = "derive_more"
-version = "0.99.3"
+version = "0.99.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c"
+checksum = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1103,9 +1113,9 @@ dependencies = [
[[package]]
name = "doc-comment"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "807e5847c39ad6a11eac66de492ed1406f76a260eb8656e8740cad9eabc69c27"
+checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "ed25519-dalek"
@@ -1125,6 +1135,17 @@ version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
+[[package]]
+name = "enum-primitive-derive"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2b90e520ec62c1864c8c78d637acbfe8baf5f63240f2fb8165b8325c07812dd"
+dependencies = [
+ "num-traits 0.1.43",
+ "quote 0.3.15",
+ "syn 0.11.11",
+]
+
[[package]]
name = "enumflags2"
version = "0.6.2"
@@ -1141,8 +1162,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecf634c5213044b8d54a46dd282cf5dd1f86bb5cb53e92c409cb4680a7fb9894"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1153,7 +1174,7 @@ checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
dependencies = [
"atty",
"humantime",
- "log 0.4.8",
+ "log",
"regex",
"termcolor",
]
@@ -1166,7 +1187,7 @@ checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
dependencies = [
"atty",
"humantime",
- "log 0.4.8",
+ "log",
"regex",
"termcolor",
]
@@ -1179,18 +1200,18 @@ checksum = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4"
[[package]]
name = "erased-serde"
-version = "0.3.10"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd7d80305c9bd8cd78e3c753eb9fb110f83621e5211f1a3afffcc812b104daf9"
+checksum = "d88b6d1705e16a4d62e05ea61cc0496c2bd190f4fa8e5c1f11ce747be6bcf3d1"
dependencies = [
"serde",
]
[[package]]
name = "errno"
-version = "0.2.4"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e"
+checksum = "b480f641ccf0faf324e20c1d3e53d81b7484c698b42ea677f6907ae4db195371"
dependencies = [
"errno-dragonfly",
"libc",
@@ -1207,18 +1228,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "escargot"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d"
-dependencies = [
- "lazy_static",
- "log 0.4.8",
- "serde",
- "serde_json",
-]
-
[[package]]
name = "ethbloom"
version = "0.9.0"
@@ -1310,7 +1319,7 @@ dependencies = [
"anyhow",
"goblin",
"indexmap",
- "log 0.4.8",
+ "log",
"scroll",
"string-interner",
"target-lexicon",
@@ -1334,8 +1343,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
"synstructure",
]
@@ -1367,7 +1376,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8505b75b31ef7285168dd237c4a7db3c1f3e0927e7d314e670bc98e854272fe9"
dependencies = [
"env_logger 0.6.2",
- "log 0.4.8",
+ "log",
]
[[package]]
@@ -1378,8 +1387,8 @@ checksum = "024517816630be5204eba201e8d1d405042b1255a5e0e3f298b054fc24d59e1d"
dependencies = [
"futures 0.3.4",
"futures-timer 2.0.2",
- "log 0.4.8",
- "num-traits",
+ "log",
+ "num-traits 0.2.11",
"parity-scale-codec",
"parking_lot 0.9.0",
"rand 0.6.5",
@@ -1405,9 +1414,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
[[package]]
name = "flate2"
-version = "1.0.13"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f"
+checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42"
dependencies = [
"cfg-if",
"crc32fast",
@@ -1422,21 +1431,6 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
-[[package]]
-name = "foreign-types"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
-dependencies = [
- "foreign-types-shared",
-]
-
-[[package]]
-name = "foreign-types-shared"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
-
[[package]]
name = "fork-tree"
version = "2.0.0-alpha.5"
@@ -1452,6 +1446,7 @@ dependencies = [
"frame-system",
"linregress",
"parity-scale-codec",
+ "paste",
"sp-api",
"sp-io",
"sp-runtime",
@@ -1515,7 +1510,7 @@ dependencies = [
"frame-support-procedural",
"frame-system",
"impl-trait-for-tuples",
- "log 0.4.8",
+ "log",
"once_cell",
"parity-scale-codec",
"paste",
@@ -1537,8 +1532,8 @@ version = "2.0.0-alpha.5"
dependencies = [
"frame-support-procedural-tools",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1548,8 +1543,8 @@ dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1557,8 +1552,8 @@ name = "frame-support-procedural-tools-derive"
version = "2.0.0-alpha.5"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1724,7 +1719,7 @@ dependencies = [
"futures 0.1.29",
"futures 0.3.4",
"lazy_static",
- "log 0.4.8",
+ "log",
"parking_lot 0.9.0",
"pin-project",
"serde",
@@ -1757,8 +1752,8 @@ checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7"
dependencies = [
"proc-macro-hack",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1807,7 +1802,6 @@ dependencies = [
"proc-macro-hack",
"proc-macro-nested",
"slab",
- "tokio-io",
]
[[package]]
@@ -1911,14 +1905,14 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "globset"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2"
+checksum = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120"
dependencies = [
"aho-corasick",
"bstr",
"fnv",
- "log 0.4.8",
+ "log",
"regex",
]
@@ -1941,7 +1935,7 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da"
dependencies = [
- "log 0.4.8",
+ "log",
"plain",
"scroll",
]
@@ -1958,7 +1952,7 @@ dependencies = [
"futures 0.1.29",
"http 0.1.21",
"indexmap",
- "log 0.4.8",
+ "log",
"slab",
"string",
"tokio-io",
@@ -1966,18 +1960,18 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.2.2"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d5c295d1c0c68e4e42003d75f908f5e16a1edd1cbe0b0d02e4dc2006a384f47"
+checksum = "377038bf3c89d18d6ca1431e7a5027194fbd724ca10592b9487ede5e8e144f42"
dependencies = [
"bytes 0.5.4",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
- "http 0.2.0",
+ "http 0.2.1",
"indexmap",
- "log 0.4.8",
+ "log",
"slab",
"tokio 0.2.13",
"tokio-util",
@@ -2019,9 +2013,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
-version = "0.1.8"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8"
+checksum = "725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e"
dependencies = [
"libc",
]
@@ -2072,6 +2066,17 @@ dependencies = [
"hmac",
]
+[[package]]
+name = "honggfuzz"
+version = "0.5.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3de2c3273ef7735df1c5a72128ca85b1d20105b9aac643cdfd7a6e581311150"
+dependencies = [
+ "arbitrary",
+ "lazy_static",
+ "memmap",
+]
+
[[package]]
name = "http"
version = "0.1.21"
@@ -2085,9 +2090,9 @@ dependencies = [
[[package]]
name = "http"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b"
+checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9"
dependencies = [
"bytes 0.5.4",
"fnv",
@@ -2113,7 +2118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [
"bytes 0.5.4",
- "http 0.2.0",
+ "http 0.2.1",
]
[[package]]
@@ -2131,25 +2136,6 @@ dependencies = [
"quick-error",
]
-[[package]]
-name = "hyper"
-version = "0.10.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273"
-dependencies = [
- "base64 0.9.3",
- "httparse",
- "language-tags",
- "log 0.3.9",
- "mime",
- "num_cpus",
- "time",
- "traitobject",
- "typeable",
- "unicase 1.4.2",
- "url 1.7.2",
-]
-
[[package]]
name = "hyper"
version = "0.12.35"
@@ -2165,7 +2151,7 @@ dependencies = [
"httparse",
"iovec",
"itoa",
- "log 0.4.8",
+ "log",
"net2",
"rustc_version",
"time",
@@ -2182,20 +2168,20 @@ dependencies = [
[[package]]
name = "hyper"
-version = "0.13.3"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7b15203263d1faa615f9337d79c1d37959439dc46c2b4faab33286fadc2a1c5"
+checksum = "ed6081100e960d9d74734659ffc9cc91daf1c0fc7aceb8eaa94ee1a3f5046f2e"
dependencies = [
"bytes 0.5.4",
"futures-channel",
"futures-core",
"futures-util",
- "h2 0.2.2",
- "http 0.2.0",
+ "h2 0.2.4",
+ "http 0.2.1",
"http-body 0.3.1",
"httparse",
"itoa",
- "log 0.4.8",
+ "log",
"net2",
"pin-project",
"time",
@@ -2213,8 +2199,8 @@ dependencies = [
"bytes 0.5.4",
"ct-logs",
"futures-util",
- "hyper 0.13.3",
- "log 0.4.8",
+ "hyper 0.13.4",
+ "log",
"rustls 0.17.0",
"rustls-native-certs",
"tokio 0.2.13",
@@ -2222,19 +2208,6 @@ dependencies = [
"webpki",
]
-[[package]]
-name = "hyper-tls"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f"
-dependencies = [
- "bytes 0.4.12",
- "futures 0.1.29",
- "hyper 0.12.35",
- "native-tls",
- "tokio-io",
-]
-
[[package]]
name = "idna"
version = "0.1.5"
@@ -2300,8 +2273,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -2325,6 +2298,16 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "141340095b15ed7491bd3d4ced9d20cebfb826174b6bb03386381f62b01e3d77"
+[[package]]
+name = "intervalier"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14200459dc2319eb13708aed1c1efb8307e0e0e801e7282476939492e1492631"
+dependencies = [
+ "futures 0.3.4",
+ "futures-timer 2.0.2",
+]
+
[[package]]
name = "iovec"
version = "0.1.4"
@@ -2336,9 +2319,9 @@ dependencies = [
[[package]]
name = "ipnet"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a859057dc563d1388c1e816f98a1892629075fc046ed06e845b883bb8b2916fb"
+checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
[[package]]
name = "itertools"
@@ -2366,9 +2349,9 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.36"
+version = "0.3.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cb931d43e71f560c81badb0191596562bafad2be06a3f9025b845c847c60df5"
+checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055"
dependencies = [
"wasm-bindgen",
]
@@ -2382,15 +2365,12 @@ dependencies = [
"failure",
"futures 0.1.29",
"hyper 0.12.35",
- "hyper-tls",
"jsonrpc-core",
"jsonrpc-pubsub",
- "log 0.4.8",
+ "log",
"serde",
"serde_json",
- "tokio 0.1.22",
"url 1.7.2",
- "websocket",
]
[[package]]
@@ -2400,7 +2380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe3b688648f1ef5d5072229e2d672ecb92cbff7d1c79bcf3fd5898f3f3df0970"
dependencies = [
"futures 0.1.29",
- "log 0.4.8",
+ "log",
"serde",
"serde_derive",
"serde_json",
@@ -2423,8 +2403,8 @@ checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -2436,10 +2416,10 @@ dependencies = [
"hyper 0.12.35",
"jsonrpc-core",
"jsonrpc-server-utils",
- "log 0.4.8",
+ "log",
"net2",
"parking_lot 0.10.0",
- "unicase 2.6.0",
+ "unicase",
]
[[package]]
@@ -2449,7 +2429,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b31c9b90731276fdd24d896f31bb10aecf2e5151733364ae81123186643d939"
dependencies = [
"jsonrpc-core",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"serde",
]
@@ -2464,10 +2444,10 @@ dependencies = [
"globset",
"jsonrpc-core",
"lazy_static",
- "log 0.4.8",
+ "log",
"tokio 0.1.22",
"tokio-codec",
- "unicase 2.6.0",
+ "unicase",
]
[[package]]
@@ -2478,7 +2458,7 @@ checksum = "b94e5773b2ae66e0e02c80775ce6bbba6f15d5bb47c14ec36a36fcf94f8df851"
dependencies = [
"jsonrpc-core",
"jsonrpc-server-utils",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"slab",
"ws",
@@ -2517,7 +2497,7 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb"
dependencies = [
- "log 0.4.8",
+ "log",
]
[[package]]
@@ -2550,7 +2530,7 @@ dependencies = [
"fs-swap",
"interleaved-ordered",
"kvdb",
- "log 0.4.8",
+ "log",
"num_cpus",
"owning_ref",
"parity-util-mem",
@@ -2570,19 +2550,13 @@ dependencies = [
"js-sys",
"kvdb",
"kvdb-memorydb",
- "log 0.4.8",
+ "log",
"parity-util-mem",
"send_wrapper 0.3.0",
"wasm-bindgen",
"web-sys",
]
-[[package]]
-name = "language-tags"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
-
[[package]]
name = "lazy_static"
version = "1.4.0"
@@ -2603,9 +2577,21 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a"
[[package]]
name = "libc"
-version = "0.2.67"
+version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
+checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0"
+
+[[package]]
+name = "libflate"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9135df43b1f5d0e333385cb6e7897ecd1a43d7d11b91ac003f4d2c2d2401fdd"
+dependencies = [
+ "adler32",
+ "crc32fast",
+ "rle-decode-fast",
+ "take_mut",
+]
[[package]]
name = "libloading"
@@ -2619,15 +2605,15 @@ dependencies = [
[[package]]
name = "libm"
-version = "0.1.4"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
+checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]]
name = "libp2p"
-version = "0.16.2"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bba17ee9cac4bb89de5812159877d9b4f0a993bf41697a5a875940cd1eb71f24"
+checksum = "8a261244b8d7ff58f5d62ffa33589eb1ba7733a1dfee0902ad9fdfe62ada7009"
dependencies = [
"bytes 0.5.4",
"futures 0.3.4",
@@ -2653,8 +2639,8 @@ dependencies = [
"libp2p-wasm-ext",
"libp2p-websocket",
"libp2p-yamux",
- "parity-multiaddr",
- "parity-multihash",
+ "multihash",
+ "parity-multiaddr 0.8.0",
"parking_lot 0.10.0",
"pin-project",
"smallvec 1.2.0",
@@ -2663,22 +2649,23 @@ dependencies = [
[[package]]
name = "libp2p-core"
-version = "0.16.0"
+version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c"
+checksum = "1cfe1412f2afe1366a2661abd211bb1a27ee6a664d799071282f4fba997c6858"
dependencies = [
"asn1_der",
"bs58",
"ed25519-dalek",
+ "either",
"fnv",
"futures 0.3.4",
"futures-timer 3.0.2",
"lazy_static",
"libsecp256k1",
- "log 0.4.8",
+ "log",
+ "multihash",
"multistream-select",
- "parity-multiaddr",
- "parity-multihash",
+ "parity-multiaddr 0.8.0",
"parking_lot 0.10.0",
"pin-project",
"prost",
@@ -2696,19 +2683,19 @@ dependencies = [
[[package]]
name = "libp2p-core-derive"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b"
+checksum = "a0eeb25d5f152a826eac57c7d1cc3de10d72dc4051e90fe4c0cd139f07a069a3"
dependencies = [
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "libp2p-deflate"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e25004d4d9837b44b22c5f1a69be1724a5168fef6cff1716b5176a972c3aa62"
+checksum = "136fcef31e3247f51946c3ebefb94d0798c4c8aae78bc59cb7431b220b5330cf"
dependencies = [
"flate2",
"futures 0.3.4",
@@ -2717,20 +2704,20 @@ dependencies = [
[[package]]
name = "libp2p-dns"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b99e552f9939b606eb4b59f7f64d9b01e3f96752f47e350fc3c5fc646ed3f649"
+checksum = "647178f8683bf868f7f14d5e5718dbdc2445b9f6b24ce99da96cecd7c5d2d1a6"
dependencies = [
"futures 0.3.4",
"libp2p-core",
- "log 0.4.8",
+ "log",
]
[[package]]
name = "libp2p-floodsub"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d3234f12e44f9a50351a9807b97fe7de11eb9ae4482370392ba10da6dc90722"
+checksum = "34c8dee172fd1630caf91a427d601d6a8d24c8cfcbcf7d5c09c9a1f3b4bbebc2"
dependencies = [
"cuckoofilter",
"fnv",
@@ -2745,9 +2732,9 @@ dependencies = [
[[package]]
name = "libp2p-gossipsub"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d46cb3e0841bd951cbf4feae56cdc081e6347836a644fb260c3ec554149b4006"
+checksum = "0042a2156fb6264bda9def93070e411dfaddf8c57c4b2d63634190d296458c76"
dependencies = [
"base64 0.11.0",
"byteorder 1.3.4",
@@ -2757,7 +2744,7 @@ dependencies = [
"futures_codec",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
+ "log",
"lru",
"prost",
"prost-build",
@@ -2770,14 +2757,14 @@ dependencies = [
[[package]]
name = "libp2p-identify"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfeb935a9bd41263e4f3a24b988e9f4a044f3ae89ac284e83c17fe2f84e0d66b"
+checksum = "04efa011cda5232648b5aa50bd80be7ba0a695d682b01aa46b65e5be5ece0605"
dependencies = [
"futures 0.3.4",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
+ "log",
"prost",
"prost-build",
"smallvec 1.2.0",
@@ -2786,9 +2773,9 @@ dependencies = [
[[package]]
name = "libp2p-kad"
-version = "0.16.2"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "464dc8412978d40f0286be72ed9ab5e0e1386a4a06e7f174526739b5c3c1f041"
+checksum = "97f4722d83af8fc0065cee7589a000b629961c1c11d90ba09f6685b3e123b9ae"
dependencies = [
"arrayvec 0.5.1",
"bytes 0.5.4",
@@ -2798,8 +2785,8 @@ dependencies = [
"futures_codec",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
- "parity-multihash",
+ "log",
+ "multihash",
"prost",
"prost-build",
"rand 0.7.3",
@@ -2813,9 +2800,9 @@ dependencies = [
[[package]]
name = "libp2p-mdns"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "881fcfb360c2822db9f0e6bb6f89529621556ed9a8b038313414eda5107334de"
+checksum = "b752276b3bea2fca1c291f43cefc8082d8a639bb8f9052cf5adc6accfcd7b44e"
dependencies = [
"async-std",
"data-encoding",
@@ -2825,7 +2812,7 @@ dependencies = [
"lazy_static",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
+ "log",
"net2",
"rand 0.7.3",
"smallvec 1.2.0",
@@ -2835,31 +2822,31 @@ dependencies = [
[[package]]
name = "libp2p-mplex"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8507b37ad0eed275efcde67a023c3d85af6c80768b193845b9288e848e1af95"
+checksum = "0f317db8c062beecde87a8765ca03784e6f1a55daa5b9868bf60ebf9b9a2b92f"
dependencies = [
"bytes 0.5.4",
"fnv",
"futures 0.3.4",
"futures_codec",
"libp2p-core",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"unsigned-varint",
]
[[package]]
name = "libp2p-noise"
-version = "0.16.2"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b15a8a3d71f898beb6f854c8aae27aa1d198e0d1f2e49412261c2d90ef39675a"
+checksum = "98d3845f54288ff134dd78c131517bad8bc03965def6e6517efef03291d9b4d7"
dependencies = [
"curve25519-dalek",
"futures 0.3.4",
"lazy_static",
"libp2p-core",
- "log 0.4.8",
+ "log",
"prost",
"prost-build",
"rand 0.7.3",
@@ -2872,14 +2859,14 @@ dependencies = [
[[package]]
name = "libp2p-ping"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33d22f2f228b3a828dca1cb8aa9fa331e0bc9c36510cb2c1916956e20dc85e8c"
+checksum = "aa1cb80ccbedb91d9b980aafc6bf39dc7e4616a7e37c631a4e6ef62629567a13"
dependencies = [
"futures 0.3.4",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
+ "log",
"rand 0.7.3",
"void",
"wasm-timer",
@@ -2887,15 +2874,15 @@ dependencies = [
[[package]]
name = "libp2p-plaintext"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56126a204d7b3382bac163143ff4125a14570b3ba76ba979103d1ae1abed1923"
+checksum = "da16d35e3990cc5dc22c8d7ea4a2aa1c18f518491bb29c0c3498fb9a2d8e486e"
dependencies = [
"bytes 0.5.4",
"futures 0.3.4",
"futures_codec",
"libp2p-core",
- "log 0.4.8",
+ "log",
"prost",
"prost-build",
"rw-stream-sink",
@@ -2905,12 +2892,12 @@ dependencies = [
[[package]]
name = "libp2p-pnet"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b916938a8868f75180aeeffcc6a516a922d165e8fa2a90b57bad989d1ccbb57a"
+checksum = "45d11e8c6d83e294ef3d7ff3a9f5a7aa5aa0c39c2d4991f2905c23c438c84526"
dependencies = [
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"pin-project",
"rand 0.7.3",
"salsa20",
@@ -2919,9 +2906,9 @@ dependencies = [
[[package]]
name = "libp2p-secio"
-version = "0.16.1"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1219e9ecb4945d7331a05f5ffe96a1f6e28051bfa1223d4c60353c251de0354e"
+checksum = "74130fa95effb780850ec790b7af777b893108d9b5983ab994b61d93d2eb0336"
dependencies = [
"aes-ctr",
"ctr",
@@ -2930,7 +2917,7 @@ dependencies = [
"js-sys",
"lazy_static",
"libp2p-core",
- "log 0.4.8",
+ "log",
"parity-send-wrapper",
"pin-project",
"prost",
@@ -2949,13 +2936,14 @@ dependencies = [
[[package]]
name = "libp2p-swarm"
-version = "0.16.1"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "275471e7c0e88ae004660866cd54f603bd8bd1f4caef541a27f50dd8640c4d4c"
+checksum = "a4ec53df8978a5d6d9dac243fb1e3adf004f8b8d28f72e6f2160df34d5f39564"
dependencies = [
"futures 0.3.4",
"libp2p-core",
- "log 0.4.8",
+ "log",
+ "rand 0.7.3",
"smallvec 1.2.0",
"void",
"wasm-timer",
@@ -2963,9 +2951,9 @@ dependencies = [
[[package]]
name = "libp2p-tcp"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10"
+checksum = "e25c9d9c5448c189bba7ecdd1ca23800516281476e82810eff711ef04abaf9eb"
dependencies = [
"async-std",
"futures 0.3.4",
@@ -2973,26 +2961,26 @@ dependencies = [
"get_if_addrs",
"ipnet",
"libp2p-core",
- "log 0.4.8",
+ "log",
]
[[package]]
name = "libp2p-uds"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76d329564a43da9d0e055a5b938633c4a8ceab1f59cec133fbc4647917c07341"
+checksum = "d8dbcbe6567ea1b3c98ba4df5fd9d1b7c2bebbf50d46ceb0c2ce735c55af3f8d"
dependencies = [
"async-std",
"futures 0.3.4",
"libp2p-core",
- "log 0.4.8",
+ "log",
]
[[package]]
name = "libp2p-wasm-ext"
-version = "0.16.2"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "923581c055bc4b8c5f42d4ce5ef43e52fe5216f1ea4bc26476cb8a966ce6220b"
+checksum = "076446cabb23b0d79d2375661d837a43cbda6719d88787f234e7661c33ef9554"
dependencies = [
"futures 0.3.4",
"js-sys",
@@ -3004,16 +2992,16 @@ dependencies = [
[[package]]
name = "libp2p-websocket"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5351ca9eea122081c1c0f9323164d2918cac29b5a6bfe5054d4ba8ec9447cf42"
+checksum = "a0117ed6a6f60114c107c1232a0890a8fe997013c7e1920b6f0c811e05d2fae7"
dependencies = [
"async-tls",
"bytes 0.5.4",
"either",
"futures 0.3.4",
"libp2p-core",
- "log 0.4.8",
+ "log",
"quicksink",
"rustls 0.16.0",
"rw-stream-sink",
@@ -3025,9 +3013,9 @@ dependencies = [
[[package]]
name = "libp2p-yamux"
-version = "0.16.2"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9dac30de24ccde0e67f363d71a125c587bbe6589503f664947e9b084b68a34f1"
+checksum = "ee12c49426527908f81ffb6551b95f57149a8ea64f386bb7da3b123cdb9c01ba"
dependencies = [
"futures 0.3.4",
"libp2p-core",
@@ -3120,15 +3108,6 @@ dependencies = [
"scopeguard",
]
-[[package]]
-name = "log"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
-dependencies = [
- "log 0.4.8",
-]
-
[[package]]
name = "log"
version = "0.4.8"
@@ -3183,13 +3162,23 @@ version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
+[[package]]
+name = "memmap"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
+dependencies = [
+ "libc",
+ "winapi 0.3.8",
+]
+
[[package]]
name = "memoffset"
-version = "0.5.3"
+version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9"
+checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
dependencies = [
- "rustc_version",
+ "autocfg 1.0.0",
]
[[package]]
@@ -3222,15 +3211,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "mime"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
-dependencies = [
- "log 0.3.9",
-]
-
[[package]]
name = "miniz_oxide"
version = "0.3.6"
@@ -3252,7 +3232,7 @@ dependencies = [
"iovec",
"kernel32-sys",
"libc",
- "log 0.4.8",
+ "log",
"miow",
"net2",
"slab",
@@ -3266,7 +3246,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
dependencies = [
"lazycell",
- "log 0.4.8",
+ "log",
"mio",
"slab",
]
@@ -3300,23 +3280,38 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238"
+[[package]]
+name = "multihash"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47fbc227f7e2b1cb701f95404579ecb2668abbdd3c7ef7a6cbb3cc0d3b236869"
+dependencies = [
+ "blake2b_simd",
+ "blake2s_simd",
+ "digest",
+ "sha-1",
+ "sha2",
+ "sha3",
+ "unsigned-varint",
+]
+
[[package]]
name = "multimap"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a97fbd5d00e0e37bfb10f433af8f5aaf631e739368dc9fc28286ca81ca4948dc"
+checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce"
[[package]]
name = "multistream-select"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f938ffe420493e77c8b6cbcc3f282283f68fc889c5dcbc8e51668d5f3a01ad94"
+checksum = "74cdcf7cfb3402881e15a1f95116cb033d69b33c83d481e1234777f5ef0c3d2c"
dependencies = [
"bytes 0.5.4",
- "futures 0.1.29",
- "log 0.4.8",
+ "futures 0.3.4",
+ "log",
+ "pin-project",
"smallvec 1.2.0",
- "tokio-io",
"unsigned-varint",
]
@@ -3332,7 +3327,7 @@ dependencies = [
"matrixmultiply",
"num-complex",
"num-rational",
- "num-traits",
+ "num-traits 0.2.11",
"rand 0.6.5",
"typenum",
]
@@ -3347,32 +3342,28 @@ dependencies = [
]
[[package]]
-name = "native-tls"
-version = "0.2.4"
+name = "net2"
+version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d"
+checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
dependencies = [
- "lazy_static",
+ "cfg-if",
"libc",
- "log 0.4.8",
- "openssl",
- "openssl-probe",
- "openssl-sys",
- "schannel",
- "security-framework",
- "security-framework-sys",
- "tempfile",
+ "winapi 0.3.8",
]
[[package]]
-name = "net2"
-version = "0.2.33"
+name = "netstat2"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
+checksum = "29449d242064c48d3057a194b049a2bdcccadda16faa18a91468677b44e8d422"
dependencies = [
- "cfg-if",
+ "bitflags",
+ "byteorder 1.3.4",
+ "enum-primitive-derive",
"libc",
- "winapi 0.3.8",
+ "num-traits 0.2.11",
+ "thiserror",
]
[[package]]
@@ -3388,6 +3379,21 @@ dependencies = [
"void",
]
+[[package]]
+name = "node-bench"
+version = "0.8.0-alpha.5"
+dependencies = [
+ "log",
+ "node-primitives",
+ "node-testing",
+ "sc-cli",
+ "sc-client-api",
+ "serde",
+ "serde_json",
+ "sp-runtime",
+ "structopt",
+]
+
[[package]]
name = "node-cli"
version = "2.0.0-alpha.5"
@@ -3399,7 +3405,7 @@ dependencies = [
"futures 0.3.4",
"hex-literal",
"jsonrpc-core",
- "log 0.4.8",
+ "log",
"nix",
"node-executor",
"node-inspect",
@@ -3412,10 +3418,13 @@ dependencies = [
"pallet-contracts",
"pallet-im-online",
"pallet-indices",
+ "pallet-staking",
"pallet-timestamp",
"pallet-transaction-payment",
"parity-scale-codec",
+ "platforms",
"rand 0.7.3",
+ "regex",
"sc-authority-discovery",
"sc-basic-authorship",
"sc-chain-spec",
@@ -3454,7 +3463,6 @@ dependencies = [
"substrate-build-script-utils",
"tempfile",
"tracing",
- "vergen",
"wasm-bindgen",
"wasm-bindgen-futures",
]
@@ -3498,7 +3506,7 @@ name = "node-inspect"
version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sc-cli",
"sc-client-api",
@@ -3550,7 +3558,7 @@ dependencies = [
"futures 0.1.29",
"hyper 0.12.35",
"jsonrpc-core-client",
- "log 0.4.8",
+ "log",
"node-primitives",
"sc-rpc",
]
@@ -3583,8 +3591,10 @@ dependencies = [
"pallet-indices",
"pallet-membership",
"pallet-offences",
+ "pallet-offences-benchmarking",
"pallet-randomness-collective-flip",
"pallet-recovery",
+ "pallet-scheduler",
"pallet-session",
"pallet-session-benchmarking",
"pallet-society",
@@ -3622,7 +3632,7 @@ name = "node-template"
version = "2.0.0-alpha.5"
dependencies = [
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"node-template-runtime",
"sc-basic-authorship",
"sc-cli",
@@ -3643,7 +3653,6 @@ dependencies = [
"sp-transaction-pool",
"structopt",
"substrate-build-script-utils",
- "vergen",
]
[[package]]
@@ -3686,7 +3695,7 @@ dependencies = [
"frame-support",
"frame-system",
"fs_extra",
- "log 0.4.8",
+ "log",
"node-executor",
"node-primitives",
"node-runtime",
@@ -3728,7 +3737,7 @@ dependencies = [
name = "node-transaction-factory"
version = "0.8.0-alpha.5"
dependencies = [
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sc-block-builder",
"sc-cli",
@@ -3762,7 +3771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6"
dependencies = [
"memchr",
- "version_check 0.9.1",
+ "version_check",
]
[[package]]
@@ -3782,7 +3791,7 @@ checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"
dependencies = [
"autocfg 1.0.0",
"num-integer",
- "num-traits",
+ "num-traits 0.2.11",
]
[[package]]
@@ -3792,7 +3801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"
dependencies = [
"autocfg 1.0.0",
- "num-traits",
+ "num-traits 0.2.11",
]
[[package]]
@@ -3802,19 +3811,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba"
dependencies = [
"autocfg 1.0.0",
- "num-traits",
+ "num-traits 0.2.11",
]
[[package]]
name = "num-rational"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3"
+checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"
dependencies = [
"autocfg 1.0.0",
"num-bigint",
"num-integer",
- "num-traits",
+ "num-traits 0.2.11",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
+dependencies = [
+ "num-traits 0.2.11",
]
[[package]]
@@ -3824,6 +3842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
dependencies = [
"autocfg 1.0.0",
+ "libm",
]
[[package]]
@@ -3881,39 +3900,12 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
-[[package]]
-name = "openssl"
-version = "0.10.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52"
-dependencies = [
- "bitflags",
- "cfg-if",
- "foreign-types",
- "lazy_static",
- "libc",
- "openssl-sys",
-]
-
[[package]]
name = "openssl-probe"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
-[[package]]
-name = "openssl-sys"
-version = "0.9.54"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986"
-dependencies = [
- "autocfg 1.0.0",
- "cc",
- "libc",
- "pkg-config",
- "vcpkg",
-]
-
[[package]]
name = "output_vt100"
version = "0.1.2"
@@ -4008,12 +4000,9 @@ version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
- "hex-literal",
- "lazy_static",
"pallet-session",
"pallet-timestamp",
"parity-scale-codec",
- "parking_lot 0.10.0",
"serde",
"sp-consensus-babe",
"sp-consensus-vrf",
@@ -4024,8 +4013,6 @@ dependencies = [
"sp-staking",
"sp-std",
"sp-timestamp",
- "sp-version",
- "substrate-test-runtime",
]
[[package]]
@@ -4062,6 +4049,7 @@ dependencies = [
name = "pallet-collective"
version = "2.0.0-alpha.5"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"hex-literal",
@@ -4142,10 +4130,12 @@ dependencies = [
name = "pallet-democracy"
version = "2.0.0-alpha.5"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"hex-literal",
"pallet-balances",
+ "pallet-scheduler",
"parity-scale-codec",
"serde",
"sp-core",
@@ -4179,6 +4169,7 @@ dependencies = [
"frame-system",
"hex-literal",
"pallet-balances",
+ "pallet-scheduler",
"parity-scale-codec",
"serde",
"sp-core",
@@ -4363,37 +4354,71 @@ dependencies = [
"frame-system",
"pallet-balances",
"parity-scale-codec",
- "serde",
- "sp-core",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-offences"
+version = "2.0.0-alpha.5"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "pallet-balances",
+ "parity-scale-codec",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-staking",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-offences-benchmarking"
+version = "2.0.0-alpha.5"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "pallet-im-online",
+ "pallet-offences",
+ "pallet-session",
+ "pallet-staking",
+ "parity-scale-codec",
"sp-io",
"sp-runtime",
+ "sp-staking",
"sp-std",
]
[[package]]
-name = "pallet-offences"
+name = "pallet-randomness-collective-flip"
version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
- "pallet-balances",
"parity-scale-codec",
- "serde",
+ "safe-mix",
"sp-core",
"sp-io",
"sp-runtime",
- "sp-staking",
"sp-std",
]
[[package]]
-name = "pallet-randomness-collective-flip"
+name = "pallet-recovery"
version = "2.0.0-alpha.5"
dependencies = [
+ "enumflags2",
"frame-support",
"frame-system",
+ "pallet-balances",
"parity-scale-codec",
- "safe-mix",
+ "serde",
"sp-core",
"sp-io",
"sp-runtime",
@@ -4401,13 +4426,12 @@ dependencies = [
]
[[package]]
-name = "pallet-recovery"
+name = "pallet-scheduler"
version = "2.0.0-alpha.5"
dependencies = [
- "enumflags2",
+ "frame-benchmarking",
"frame-support",
"frame-system",
- "pallet-balances",
"parity-scale-codec",
"serde",
"sp-core",
@@ -4456,9 +4480,17 @@ name = "pallet-session-benchmarking"
version = "2.0.0-alpha.5"
dependencies = [
"frame-benchmarking",
+ "frame-support",
"frame-system",
+ "pallet-balances",
"pallet-session",
"pallet-staking",
+ "pallet-staking-reward-curve",
+ "pallet-timestamp",
+ "parity-scale-codec",
+ "serde",
+ "sp-core",
+ "sp-io",
"sp-runtime",
"sp-std",
]
@@ -4483,24 +4515,31 @@ dependencies = [
name = "pallet-staking"
version = "2.0.0-alpha.5"
dependencies = [
+ "env_logger 0.7.1",
"frame-benchmarking",
"frame-support",
"frame-system",
+ "hex",
"pallet-authorship",
"pallet-balances",
+ "pallet-indices",
"pallet-session",
"pallet-staking-reward-curve",
"pallet-timestamp",
"parity-scale-codec",
+ "parking_lot 0.10.0",
+ "rand 0.7.3",
"rand_chacha 0.2.2",
"serde",
+ "sp-application-crypto",
"sp-core",
"sp-io",
- "sp-keyring",
"sp-phragmen",
"sp-runtime",
"sp-staking",
"sp-std",
+ "sp-storage",
+ "static_assertions",
"substrate-test-utils",
]
@@ -4510,9 +4549,9 @@ version = "2.0.0-alpha.5"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote",
+ "quote 1.0.3",
"sp-runtime",
- "syn",
+ "syn 1.0.17",
]
[[package]]
@@ -4536,7 +4575,6 @@ dependencies = [
"frame-support",
"frame-system",
"parity-scale-codec",
- "safe-mix",
"sp-core",
"sp-io",
"sp-runtime",
@@ -4625,6 +4663,7 @@ dependencies = [
name = "pallet-utility"
version = "2.0.0-alpha.5"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"pallet-balances",
@@ -4673,6 +4712,24 @@ dependencies = [
"url 2.1.1",
]
+[[package]]
+name = "parity-multiaddr"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4db35e222f783ef4e6661873f6c165c4eb7b65e0c408349818517d5705c2d7d3"
+dependencies = [
+ "arrayref",
+ "bs58",
+ "byteorder 1.3.4",
+ "data-encoding",
+ "multihash",
+ "percent-encoding 2.1.0",
+ "serde",
+ "static_assertions",
+ "unsigned-varint",
+ "url 2.1.1",
+]
+
[[package]]
name = "parity-multihash"
version = "0.2.3"
@@ -4690,9 +4747,9 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f509c5e67ca0605ee17dcd3f91ef41cadd685c75a298fb6261b781a5acb3f910"
+checksum = "329c8f7f4244ddb5c37c103641027a76c530e65e8e4b8240b29f81ea40508b17"
dependencies = [
"arrayvec 0.5.1",
"bitvec",
@@ -4709,8 +4766,8 @@ checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -4744,7 +4801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"
dependencies = [
"proc-macro2",
- "syn",
+ "syn 1.0.17",
"synstructure",
]
@@ -4815,9 +4872,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "0.1.7"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63e1afe738d71b1ebab5f1207c055054015427dbfc7bbe9ee1266894156ec046"
+checksum = "092d791bf7847f70bbd49085489fba25fc2c193571752bff9e36e74e72403932"
dependencies = [
"paste-impl",
"proc-macro-hack",
@@ -4825,14 +4882,14 @@ dependencies = [
[[package]]
name = "paste-impl"
-version = "0.1.7"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d4dc4a7f6f743211c5aab239640a65091535d97d43d92a52bca435a640892bb"
+checksum = "406c23fb4c45cc6f68a9bbabb8ec7bd6f8cfcbd17e9e8f72c2460282f8325729"
dependencies = [
"proc-macro-hack",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -4895,8 +4952,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -4923,6 +4980,12 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+[[package]]
+name = "platforms"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e"
+
[[package]]
name = "plotters"
version = "0.2.12"
@@ -4930,7 +4993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb"
dependencies = [
"js-sys",
- "num-traits",
+ "num-traits 0.2.11",
"wasm-bindgen",
"web-sys",
]
@@ -5003,68 +5066,78 @@ dependencies = [
[[package]]
name = "proc-macro-error"
-version = "0.4.11"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7959c6467d962050d639361f7703b2051c43036d03493c36f01d440fdd3138a"
+checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
- "quote",
- "syn",
- "version_check 0.9.1",
+ "quote 1.0.3",
+ "syn 1.0.17",
+ "version_check",
]
[[package]]
name = "proc-macro-error-attr"
-version = "0.4.11"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4002d9f55991d5e019fb940a90e1a95eb80c24e77cb2462dd4dc869604d543a"
+checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
"syn-mid",
- "version_check 0.9.1",
+ "version_check",
]
[[package]]
name = "proc-macro-hack"
-version = "0.5.11"
+version = "0.5.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
+checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63"
[[package]]
name = "proc-macro-nested"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
+checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694"
[[package]]
name = "proc-macro2"
-version = "1.0.9"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3"
+dependencies = [
+ "unicode-xid 0.2.0",
+]
+
+[[package]]
+name = "procfs"
+version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435"
+checksum = "fe50036aa1b71e553a4a0c48ab7baabf8aa8c7a5a61aae06bf38c2eab7430475"
dependencies = [
- "unicode-xid",
+ "bitflags",
+ "byteorder 1.3.4",
+ "chrono",
+ "hex",
+ "lazy_static",
+ "libc",
+ "libflate",
]
[[package]]
name = "prometheus"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1"
+checksum = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20"
dependencies = [
"cfg-if",
"fnv",
"lazy_static",
"protobuf",
- "quick-error",
"spin",
+ "thiserror",
]
[[package]]
@@ -5086,7 +5159,7 @@ dependencies = [
"bytes 0.5.4",
"heck",
"itertools",
- "log 0.4.8",
+ "log",
"multimap",
"petgraph",
"prost",
@@ -5104,8 +5177,8 @@ dependencies = [
"anyhow",
"itertools",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -5120,9 +5193,9 @@ dependencies = [
[[package]]
name = "protobuf"
-version = "2.10.2"
+version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37a5325d019a4d837d3abde0a836920f959e33d350f77b5f1e289e061e774942"
+checksum = "71964f34fd51cf04882d7ae3325fa0794d4cad66a03d0003f38d8ae4f63ba126"
[[package]]
name = "pwasm-utils"
@@ -5131,7 +5204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192"
dependencies = [
"byteorder 1.3.4",
- "log 0.4.8",
+ "log",
"parity-wasm 0.41.0",
]
@@ -5148,7 +5221,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f"
dependencies = [
"env_logger 0.7.1",
- "log 0.4.8",
+ "log",
"rand 0.7.3",
"rand_core 0.5.1",
]
@@ -5164,6 +5237,12 @@ dependencies = [
"pin-project-lite",
]
+[[package]]
+name = "quote"
+version = "0.3.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
+
[[package]]
name = "quote"
version = "1.0.3"
@@ -5173,6 +5252,12 @@ dependencies = [
"proc-macro2",
]
+[[package]]
+name = "radium"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac"
+
[[package]]
name = "rand"
version = "0.3.23"
@@ -5436,9 +5521,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.3.4"
+version = "1.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8"
+checksum = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3"
dependencies = [
"aho-corasick",
"memchr",
@@ -5457,9 +5542,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.6.16"
+version = "0.6.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1132f845907680735a84409c3bebc64d1364a5683ffbce899550cd09d5eaefc1"
+checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
[[package]]
name = "region"
@@ -5484,9 +5569,9 @@ dependencies = [
[[package]]
name = "ring"
-version = "0.16.11"
+version = "0.16.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862"
+checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c"
dependencies = [
"cc",
"lazy_static",
@@ -5497,11 +5582,17 @@ dependencies = [
"winapi 0.3.8",
]
+[[package]]
+name = "rle-decode-fast"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
+
[[package]]
name = "rlp"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a44d5ae8afcb238af8b75640907edc6c931efcfab2c854e81ed35fa080f84cd"
+checksum = "4a7d3f9bed94764eac15b8f14af59fac420c236adaff743b7bcc88e265cb4345"
dependencies = [
"rustc-hex",
]
@@ -5572,7 +5663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e"
dependencies = [
"base64 0.10.1",
- "log 0.4.8",
+ "log",
"ring",
"sct",
"webpki",
@@ -5585,7 +5676,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1"
dependencies = [
"base64 0.11.0",
- "log 0.4.8",
+ "log",
"ring",
"sct",
"webpki",
@@ -5610,8 +5701,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -5627,9 +5718,9 @@ dependencies = [
[[package]]
name = "ryu"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
+checksum = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76"
[[package]]
name = "safe-mix"
@@ -5640,12 +5731,6 @@ dependencies = [
"rustc_version",
]
-[[package]]
-name = "safemem"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
-
[[package]]
name = "salsa20"
version = "0.3.0"
@@ -5685,7 +5770,7 @@ dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
"libp2p",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"prost",
"prost-build",
@@ -5711,7 +5796,7 @@ version = "0.8.0-alpha.5"
dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-block-builder",
@@ -5766,8 +5851,8 @@ version = "2.0.0-alpha.5"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -5784,8 +5869,9 @@ dependencies = [
"fdlimit",
"futures 0.3.4",
"lazy_static",
- "log 0.4.8",
+ "log",
"names",
+ "nix",
"parity-util-mem",
"regex",
"rpassword",
@@ -5802,6 +5888,7 @@ dependencies = [
"sp-panic-handler",
"sp-runtime",
"sp-state-machine",
+ "sp-utils",
"structopt",
"substrate-prometheus-endpoint",
"tempfile",
@@ -5821,7 +5908,7 @@ dependencies = [
"hex-literal",
"kvdb",
"kvdb-memorydb",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-block-builder",
@@ -5840,6 +5927,7 @@ dependencies = [
"sp-state-machine",
"sp-std",
"sp-trie",
+ "sp-utils",
"sp-version",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
@@ -5857,7 +5945,8 @@ dependencies = [
"hash-db",
"hex-literal",
"kvdb",
- "log 0.4.8",
+ "lazy_static",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-executor",
@@ -5876,6 +5965,7 @@ dependencies = [
"sp-test-primitives",
"sp-transaction-pool",
"sp-trie",
+ "sp-utils",
"sp-version",
]
@@ -5889,7 +5979,7 @@ dependencies = [
"kvdb-memorydb",
"kvdb-rocksdb",
"linked-hash-map",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.10.0",
@@ -5919,7 +6009,7 @@ dependencies = [
"env_logger 0.7.1",
"futures 0.3.4",
"futures-timer 3.0.2",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-block-builder",
@@ -5958,11 +6048,11 @@ dependencies = [
"fork-tree",
"futures 0.3.4",
"futures-timer 3.0.2",
- "log 0.4.8",
+ "log",
"merlin",
"num-bigint",
"num-rational",
- "num-traits",
+ "num-traits 0.2.11",
"parity-scale-codec",
"parking_lot 0.10.0",
"pdqselect",
@@ -6047,7 +6137,7 @@ dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"sc-basic-authorship",
"sc-client",
@@ -6071,7 +6161,7 @@ version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sc-client-api",
"sp-api",
@@ -6091,7 +6181,7 @@ version = "0.8.0-alpha.5"
dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-client-api",
@@ -6110,7 +6200,7 @@ dependencies = [
name = "sc-consensus-uncles"
version = "0.8.0-alpha.5"
dependencies = [
- "log 0.4.8",
+ "log",
"sc-client-api",
"sp-authorship",
"sp-consensus",
@@ -6128,7 +6218,7 @@ dependencies = [
"hex-literal",
"lazy_static",
"libsecp256k1",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-wasm 0.41.0",
"parking_lot 0.10.0",
@@ -6158,7 +6248,7 @@ name = "sc-executor-common"
version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sp-allocator",
"sp-core",
@@ -6172,7 +6262,7 @@ dependencies = [
name = "sc-executor-wasmi"
version = "0.8.0-alpha.5"
dependencies = [
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-wasm 0.41.0",
"sc-executor-common",
@@ -6188,7 +6278,7 @@ name = "sc-executor-wasmtime"
version = "0.8.0-alpha.5"
dependencies = [
"assert_matches",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-wasm 0.41.0",
"sc-executor-common",
@@ -6210,7 +6300,7 @@ dependencies = [
"fork-tree",
"futures 0.3.4",
"futures-timer 3.0.2",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"pin-project",
@@ -6236,6 +6326,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-state-machine",
+ "sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"tempfile",
@@ -6248,7 +6339,7 @@ version = "0.8.0-alpha.5"
dependencies = [
"ansi_term 0.12.1",
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"parity-util-mem",
"sc-client-api",
"sc-network",
@@ -6294,7 +6385,7 @@ dependencies = [
"libp2p",
"linked-hash-map",
"linked_hash_set",
- "log 0.4.8",
+ "log",
"lru",
"nohash-hasher",
"parity-scale-codec",
@@ -6321,6 +6412,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-test-primitives",
+ "sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime",
"substrate-test-runtime-client",
@@ -6339,10 +6431,11 @@ dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
"libp2p",
- "log 0.4.8",
+ "log",
"lru",
"sc-network",
"sp-runtime",
+ "sp-utils",
"substrate-test-runtime-client",
"wasm-timer",
]
@@ -6355,7 +6448,7 @@ dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
"libp2p",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"rand 0.7.3",
"sc-block-builder",
@@ -6382,9 +6475,9 @@ dependencies = [
"fnv",
"futures 0.3.4",
"futures-timer 3.0.2",
- "hyper 0.13.3",
+ "hyper 0.13.4",
"hyper-rustls",
- "log 0.4.8",
+ "log",
"num_cpus",
"parity-scale-codec",
"parking_lot 0.10.0",
@@ -6399,6 +6492,7 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-transaction-pool",
+ "sp-utils",
"substrate-test-runtime-client",
"threadpool",
"tokio 0.2.13",
@@ -6410,9 +6504,10 @@ version = "2.0.0-alpha.5"
dependencies = [
"futures 0.3.4",
"libp2p",
- "log 0.4.8",
+ "log",
"rand 0.7.3",
"serde_json",
+ "sp-utils",
"wasm-timer",
]
@@ -6426,7 +6521,7 @@ dependencies = [
"hash-db",
"jsonrpc-core",
"jsonrpc-pubsub",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-block-builder",
@@ -6448,6 +6543,7 @@ dependencies = [
"sp-session",
"sp-state-machine",
"sp-transaction-pool",
+ "sp-utils",
"sp-version",
"substrate-test-runtime-client",
"tokio 0.1.22",
@@ -6463,7 +6559,7 @@ dependencies = [
"jsonrpc-core-client",
"jsonrpc-derive",
"jsonrpc-pubsub",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"serde",
@@ -6483,7 +6579,7 @@ dependencies = [
"jsonrpc-http-server",
"jsonrpc-pubsub",
"jsonrpc-ws-server",
- "log 0.4.8",
+ "log",
"serde",
"serde_json",
"sp-runtime",
@@ -6513,11 +6609,13 @@ dependencies = [
"futures-diagnose",
"futures-timer 3.0.2",
"lazy_static",
- "log 0.4.8",
- "parity-multiaddr",
+ "log",
+ "netstat2",
+ "parity-multiaddr 0.7.3",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.10.0",
+ "procfs",
"sc-chain-spec",
"sc-client",
"sc-client-api",
@@ -6546,10 +6644,10 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-transaction-pool",
+ "sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"sysinfo",
- "target_info",
"tracing",
"wasm-timer",
]
@@ -6562,7 +6660,7 @@ dependencies = [
"fdlimit",
"futures 0.1.29",
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"sc-client",
"sc-network",
"sc-service",
@@ -6579,7 +6677,7 @@ name = "sc-state-db"
version = "0.8.0-alpha.5"
dependencies = [
"env_logger 0.7.1",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-util-mem",
"parity-util-mem-derive",
@@ -6596,7 +6694,7 @@ dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
"libp2p",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"pin-project",
"rand 0.7.3",
@@ -6614,7 +6712,7 @@ name = "sc-tracing"
version = "2.0.0-alpha.5"
dependencies = [
"erased-serde",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"sc-telemetry",
"serde",
@@ -6633,7 +6731,7 @@ dependencies = [
"derive_more",
"futures 0.3.4",
"linked-hash-map",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.10.0",
@@ -6642,6 +6740,7 @@ dependencies = [
"sp-core",
"sp-runtime",
"sp-transaction-pool",
+ "sp-utils",
"substrate-test-runtime",
"wasm-timer",
]
@@ -6650,11 +6749,13 @@ dependencies = [
name = "sc-transaction-pool"
version = "2.0.0-alpha.5"
dependencies = [
+ "assert_matches",
"derive_more",
"futures 0.3.4",
"futures-diagnose",
- "futures-timer 2.0.2",
- "log 0.4.8",
+ "hex",
+ "intervalier",
+ "log",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.10.0",
@@ -6666,6 +6767,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-transaction-pool",
+ "sp-utils",
"substrate-test-runtime-client",
"substrate-test-runtime-transaction-pool",
"wasm-timer",
@@ -6673,9 +6775,9 @@ dependencies = [
[[package]]
name = "schannel"
-version = "0.1.17"
+version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295"
+checksum = "039c25b130bd8c1321ee2d7de7fde2659fa9c2744e4bb29711cfc852ea53cd19"
dependencies = [
"lazy_static",
"winapi 0.3.8",
@@ -6727,8 +6829,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -6743,21 +6845,22 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97bbedbe81904398b6ebb054b3e912f99d55807125790f3198ac990d98def5b0"
+checksum = "572dfa3a0785509e7a44b5b4bebcf94d41ba34e9ed9eb9df722545c3b3c4144a"
dependencies = [
"bitflags",
"core-foundation",
"core-foundation-sys",
+ "libc",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06fd2f23e31ef68dd2328cc383bd493142e46107a3a0e24f7d734e3f3b80fe4c"
+checksum = "8ddb15a5fec93b7021b8a9e96009c5d8d51c15673569f7c0f6b7204e5b7b404f"
dependencies = [
"core-foundation-sys",
"libc",
@@ -6822,15 +6925,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac5d00fc561ba2724df6758a17de23df5914f20e41cb00f94d5b7ae42fffaff8"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "serde_json"
-version = "1.0.48"
+version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
+checksum = "78a7a12c167809363ec3bd7329fc0a3369056996de43c4b37ef3cd54a6ce4867"
dependencies = [
"itoa",
"ryu",
@@ -6952,8 +7055,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -6999,9 +7102,9 @@ dependencies = [
"bytes 0.5.4",
"flate2",
"futures 0.3.4",
- "http 0.2.0",
+ "http 0.2.1",
"httparse",
- "log 0.4.8",
+ "log",
"rand 0.7.3",
"sha1",
"smallvec 1.2.0",
@@ -7014,7 +7117,7 @@ name = "sp-allocator"
version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"sp-core",
"sp-std",
"sp-wasm-interface",
@@ -7042,8 +7145,8 @@ dependencies = [
"blake2-rfc",
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7093,7 +7196,7 @@ version = "2.0.0-alpha.5"
dependencies = [
"criterion 0.3.1",
"integer-sqrt",
- "num-traits",
+ "num-traits 0.2.11",
"parity-scale-codec",
"primitive-types",
"rand 0.7.3",
@@ -7102,6 +7205,17 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "sp-arithmetic-fuzzer"
+version = "2.0.0-alpha.5"
+dependencies = [
+ "honggfuzz",
+ "num-bigint",
+ "num-traits 0.2.11",
+ "primitive-types",
+ "sp-arithmetic",
+]
+
[[package]]
name = "sp-authority-discovery"
version = "2.0.0-alpha.5"
@@ -7139,7 +7253,7 @@ name = "sp-blockchain"
version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"lru",
"parity-scale-codec",
"parking_lot 0.10.0",
@@ -7158,7 +7272,7 @@ dependencies = [
"futures-diagnose",
"futures-timer 3.0.2",
"libp2p",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"serde",
@@ -7168,6 +7282,7 @@ dependencies = [
"sp-state-machine",
"sp-std",
"sp-test-primitives",
+ "sp-utils",
"sp-version",
]
@@ -7238,8 +7353,8 @@ dependencies = [
"impl-serde 0.3.0",
"lazy_static",
"libsecp256k1",
- "log 0.4.8",
- "num-traits",
+ "log",
+ "num-traits 0.2.11",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.10.0",
@@ -7270,8 +7385,8 @@ name = "sp-debug-derive"
version = "2.0.0-alpha.5"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7321,7 +7436,7 @@ version = "2.0.0-alpha.5"
dependencies = [
"hash-db",
"libsecp256k1",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sp-core",
"sp-externalities",
@@ -7355,21 +7470,33 @@ name = "sp-panic-handler"
version = "2.0.0-alpha.5"
dependencies = [
"backtrace",
- "log 0.4.8",
+ "log",
]
[[package]]
name = "sp-phragmen"
version = "2.0.0-alpha.5"
dependencies = [
+ "parity-scale-codec",
"rand 0.7.3",
"serde",
- "sp-io",
+ "sp-phragmen",
+ "sp-phragmen-compact",
"sp-runtime",
"sp-std",
"substrate-test-utils",
]
+[[package]]
+name = "sp-phragmen-compact"
+version = "2.0.0-dev"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote 1.0.3",
+ "syn 1.0.17",
+]
+
[[package]]
name = "sp-rpc"
version = "2.0.0-alpha.5"
@@ -7385,7 +7512,7 @@ version = "2.0.0-alpha.5"
dependencies = [
"hash256-std-hasher",
"impl-trait-for-tuples",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-util-mem",
"paste",
@@ -7426,8 +7553,8 @@ dependencies = [
"Inflector",
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7512,8 +7639,8 @@ version = "0.8.0-alpha.5"
dependencies = [
"hash-db",
"hex-literal",
- "log 0.4.8",
- "num-traits",
+ "log",
+ "num-traits 0.2.11",
"parity-scale-codec",
"parking_lot 0.10.0",
"rand 0.7.3",
@@ -7571,11 +7698,12 @@ version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"serde",
"sp-api",
"sp-runtime",
+ "sp-utils",
]
[[package]]
@@ -7596,6 +7724,16 @@ dependencies = [
"trie-standardmap",
]
+[[package]]
+name = "sp-utils"
+version = "2.0.0-alpha.5"
+dependencies = [
+ "futures 0.3.4",
+ "futures-core",
+ "lazy_static",
+ "prometheus",
+]
+
[[package]]
name = "sp-version"
version = "2.0.0-alpha.5"
@@ -7679,9 +7817,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "structopt"
-version = "0.3.11"
+version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fe43617218c0805c6eb37160119dc3c548110a67786da7218d1c6555212f073"
+checksum = "c8faa2719539bbe9d77869bfb15d4ee769f99525e707931452c97b693b3f159d"
dependencies = [
"clap",
"lazy_static",
@@ -7690,15 +7828,15 @@ dependencies = [
[[package]]
name = "structopt-derive"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6e79c80e0f4efd86ca960218d4e056249be189ff1c42824dcd9a7f51a56f0bd"
+checksum = "3f88b8e18c69496aad6f9ddf4630dd7d585bcaf765786cb415b9aec2fe5a0430"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7718,8 +7856,8 @@ checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81"
dependencies = [
"heck",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7777,7 +7915,7 @@ dependencies = [
"js-sys",
"kvdb-web",
"libp2p-wasm-ext",
- "log 0.4.8",
+ "log",
"rand 0.6.5",
"rand 0.7.3",
"sc-chain-spec",
@@ -7791,6 +7929,9 @@ dependencies = [
[[package]]
name = "substrate-build-script-utils"
version = "2.0.0-alpha.5"
+dependencies = [
+ "platforms",
+]
[[package]]
name = "substrate-frame-rpc-support"
@@ -7818,7 +7959,7 @@ dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sc-client",
"sc-transaction-pool",
@@ -7838,8 +7979,8 @@ dependencies = [
"async-std",
"derive_more",
"futures-util",
- "hyper 0.13.3",
- "log 0.4.8",
+ "hyper 0.13.4",
+ "log",
"prometheus",
"tokio 0.2.13",
]
@@ -7872,7 +8013,7 @@ dependencies = [
"frame-support",
"frame-system",
"frame-system-rpc-runtime-api",
- "log 0.4.8",
+ "log",
"memory-db",
"pallet-babe",
"pallet-timestamp",
@@ -8043,13 +8184,24 @@ checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941"
[[package]]
name = "syn"
-version = "1.0.16"
+version = "0.11.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
+dependencies = [
+ "quote 0.3.15",
+ "synom",
+ "unicode-xid 0.0.4",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859"
+checksum = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03"
dependencies = [
"proc-macro2",
- "quote",
- "unicode-xid",
+ "quote 1.0.3",
+ "unicode-xid 0.2.0",
]
[[package]]
@@ -8059,8 +8211,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
+]
+
+[[package]]
+name = "synom"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
+dependencies = [
+ "unicode-xid 0.0.4",
]
[[package]]
@@ -8070,9 +8231,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
- "unicode-xid",
+ "quote 1.0.3",
+ "syn 1.0.17",
+ "unicode-xid 0.2.0",
]
[[package]]
@@ -8102,12 +8263,6 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d"
-[[package]]
-name = "target_info"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe"
-
[[package]]
name = "tempfile"
version = "3.1.0"
@@ -8139,9 +8294,9 @@ checksum = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9"
dependencies = [
"lazy_static",
"proc-macro2",
- "quote",
- "syn",
- "version_check 0.9.1",
+ "quote 1.0.3",
+ "syn 1.0.17",
+ "version_check",
]
[[package]]
@@ -8155,22 +8310,22 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "1.0.11"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db"
+checksum = "f0570dc61221295909abdb95c739f2e74325e14293b2026b0a7e195091ec54ae"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.11"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4"
+checksum = "227362df41d566be41a28f64401e07a043157c21c14b9785a0d8e256f940a8fd"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -8204,9 +8359,9 @@ dependencies = [
[[package]]
name = "tiny-bip39"
-version = "0.7.1"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6848cd8f566953ce1e8faeba12ee23cbdbb0437754792cd857d44628b5685e3"
+checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2"
dependencies = [
"failure",
"hmac",
@@ -8278,6 +8433,7 @@ checksum = "0fa5e81d6bc4e67fe889d5783bd2a128ab2e0cfa487e0be16b6a8d177b101616"
dependencies = [
"bytes 0.5.4",
"fnv",
+ "futures-core",
"iovec",
"lazy_static",
"libc",
@@ -8364,7 +8520,7 @@ checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
- "log 0.4.8",
+ "log",
]
[[package]]
@@ -8374,8 +8530,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -8387,7 +8543,7 @@ dependencies = [
"crossbeam-utils",
"futures 0.1.29",
"lazy_static",
- "log 0.4.8",
+ "log",
"mio",
"num_cpus",
"parking_lot 0.9.0",
@@ -8455,7 +8611,7 @@ dependencies = [
"crossbeam-utils",
"futures 0.1.29",
"lazy_static",
- "log 0.4.8",
+ "log",
"num_cpus",
"slab",
"tokio-executor 0.1.10",
@@ -8473,17 +8629,6 @@ dependencies = [
"tokio-executor 0.1.10",
]
-[[package]]
-name = "tokio-tls"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c"
-dependencies = [
- "futures 0.1.29",
- "native-tls",
- "tokio-io",
-]
-
[[package]]
name = "tokio-udp"
version = "0.1.6"
@@ -8492,7 +8637,7 @@ checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
- "log 0.4.8",
+ "log",
"mio",
"tokio-codec",
"tokio-io",
@@ -8509,7 +8654,7 @@ dependencies = [
"futures 0.1.29",
"iovec",
"libc",
- "log 0.4.8",
+ "log",
"mio",
"mio-uds",
"tokio-codec",
@@ -8519,14 +8664,14 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.2.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"
+checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"
dependencies = [
"bytes 0.5.4",
"futures-core",
"futures-sink",
- "log 0.4.8",
+ "log",
"pin-project-lite",
"tokio 0.2.13",
]
@@ -8563,8 +8708,8 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fbad39da2f9af1cae3016339ad7f2c7a9e870f12e8fd04c4fd7ef35b30c0d2b"
dependencies = [
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -8576,12 +8721,6 @@ dependencies = [
"lazy_static",
]
-[[package]]
-name = "traitobject"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
-
[[package]]
name = "treeline"
version = "0.1.0"
@@ -8612,7 +8751,7 @@ checksum = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0"
dependencies = [
"hash-db",
"hashbrown",
- "log 0.4.8",
+ "log",
"rustc-hex",
"smallvec 1.2.0",
]
@@ -8673,15 +8812,9 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56"
dependencies = [
- "rand 0.6.5",
+ "rand 0.7.3",
]
-[[package]]
-name = "typeable"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
-
[[package]]
name = "typenum"
version = "1.11.2"
@@ -8700,22 +8833,13 @@ dependencies = [
"static_assertions",
]
-[[package]]
-name = "unicase"
-version = "1.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33"
-dependencies = [
- "version_check 0.1.5",
-]
-
[[package]]
name = "unicase"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
dependencies = [
- "version_check 0.9.1",
+ "version_check",
]
[[package]]
@@ -8748,6 +8872,12 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
+[[package]]
+name = "unicode-xid"
+version = "0.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
+
[[package]]
name = "unicode-xid"
version = "0.2.0"
@@ -8812,22 +8942,6 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
-[[package]]
-name = "vergen"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ce50d8996df1f85af15f2cd8d33daae6e479575123ef4314a51a70a230739cb"
-dependencies = [
- "bitflags",
- "chrono",
-]
-
-[[package]]
-name = "version_check"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
-
[[package]]
name = "version_check"
version = "0.9.1"
@@ -8854,15 +8968,24 @@ dependencies = [
[[package]]
name = "wabt-sys"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af5d153dc96aad7dc13ab90835b892c69867948112d95299e522d370c4e13a08"
+checksum = "23d7043ebb3e5d96fad7a8d3ca22ee9880748ff8c3e18092cfb2a49d3b8f9084"
dependencies = [
"cc",
"cmake",
"glob 0.2.11",
]
+[[package]]
+name = "wait-timeout"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "walkdir"
version = "2.3.1"
@@ -8881,7 +9004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230"
dependencies = [
"futures 0.1.29",
- "log 0.4.8",
+ "log",
"try-lock",
]
@@ -8891,7 +9014,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
- "log 0.4.8",
+ "log",
"try-lock",
]
@@ -8903,9 +9026,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasm-bindgen"
-version = "0.2.59"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3557c397ab5a8e347d434782bcd31fc1483d927a6826804cec05cc792ee2519d"
+checksum = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -8913,24 +9036,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.59"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0da9c9a19850d3af6df1cb9574970b566d617ecfaf36eb0b706b6f3ef9bd2f8"
+checksum = "d967d37bf6c16cca2973ca3af071d0a2523392e4a594548155d89a678f4237cd"
dependencies = [
"bumpalo",
"lazy_static",
- "log 0.4.8",
+ "log",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.9"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "457414a91863c0ec00090dba537f88ab955d93ca6555862c29b6d860990b8a8a"
+checksum = "7add542ea1ac7fdaa9dc25e031a6af33b7d63376292bd24140c637d00d1c312a"
dependencies = [
"cfg-if",
"js-sys",
@@ -8940,32 +9063,32 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.59"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f6fde1d36e75a714b5fe0cffbb78978f222ea6baebb726af13c78869fdb4205"
+checksum = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4"
dependencies = [
- "quote",
+ "quote 1.0.3",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.59"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25bda4168030a6412ea8a047e27238cadf56f0e53516e1e83fec0a8b7c786f6d"
+checksum = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.59"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc9f36ad51f25b0219a3d4d13b90eb44cd075dff8b6280cca015775d7acaddd8"
+checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639"
[[package]]
name = "wasm-gc-api"
@@ -8973,7 +9096,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9"
dependencies = [
- "log 0.4.8",
+ "log",
"parity-wasm 0.32.0",
"rustc-demangle",
]
@@ -9004,7 +9127,7 @@ dependencies = [
"libc",
"memory_units",
"num-rational",
- "num-traits",
+ "num-traits 0.2.11",
"parity-wasm 0.41.0",
"wasmi-validation",
]
@@ -9057,7 +9180,7 @@ dependencies = [
"file-per-thread-logger",
"indexmap",
"libc",
- "log 0.4.8",
+ "log",
"more-asserts",
"rayon",
"serde",
@@ -9087,27 +9210,27 @@ dependencies = [
[[package]]
name = "wast"
-version = "10.0.0"
+version = "12.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4efb62ecebf5cc9dbf2954309a20d816289c6550c0597a138b9e811cefc05007"
+checksum = "0615ba420811bcda39cf80e8a1bd75997aec09222bda35165920a07ef15cc695"
dependencies = [
"leb128",
]
[[package]]
name = "wat"
-version = "1.0.11"
+version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffdea5e25273cc3a62f3ae3a1a4c7d7996625875b50c0b4475fee6698c2b069c"
+checksum = "095f615fbfcae695e3a4cea7d9f02f70561c81274c0142f45a12bf1e154d08bd"
dependencies = [
"wast",
]
[[package]]
name = "web-sys"
-version = "0.3.36"
+version = "0.3.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "721c6263e2c66fd44501cc5efbfa2b7dfa775d13e4ea38c46299646ed1f9c70a"
+checksum = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -9141,47 +9264,6 @@ dependencies = [
"webpki",
]
-[[package]]
-name = "websocket"
-version = "0.24.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "413b37840b9e27b340ce91b319ede10731de8c72f5bc4cb0206ec1ca4ce581d0"
-dependencies = [
- "bytes 0.4.12",
- "futures 0.1.29",
- "hyper 0.10.16",
- "native-tls",
- "rand 0.6.5",
- "tokio-codec",
- "tokio-io",
- "tokio-reactor",
- "tokio-tcp",
- "tokio-tls",
- "unicase 1.4.2",
- "url 1.7.2",
- "websocket-base",
-]
-
-[[package]]
-name = "websocket-base"
-version = "0.24.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e3810f0d00c4dccb54c30a4eee815e703232819dec7b007db115791c42aa374"
-dependencies = [
- "base64 0.10.1",
- "bitflags",
- "byteorder 1.3.4",
- "bytes 0.4.12",
- "futures 0.1.29",
- "native-tls",
- "rand 0.6.5",
- "sha1",
- "tokio-codec",
- "tokio-io",
- "tokio-tcp",
- "tokio-tls",
-]
-
[[package]]
name = "which"
version = "3.1.1"
@@ -9221,9 +9303,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80"
+checksum = "fa515c5163a99cc82bab70fd3bfdd36d827be85de63737b40fcef2ce084a436e"
dependencies = [
"winapi 0.3.8",
]
@@ -9243,7 +9325,7 @@ dependencies = [
"byteorder 1.3.4",
"bytes 0.4.12",
"httparse",
- "log 0.4.8",
+ "log",
"mio",
"mio-extras",
"rand 0.7.3",
@@ -9286,7 +9368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84300bb493cc878f3638b981c62b4632ec1a5c52daaa3036651e8c106d3b55ea"
dependencies = [
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"nohash-hasher",
"parking_lot 0.10.0",
"rand 0.7.3",
@@ -9309,8 +9391,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
"synstructure",
]
diff --git a/Cargo.toml b/Cargo.toml
index d86bab8abd5334d945fafadd345e32ec0b410423..035ae7bc37184f3de33c44ced4f0c3aa899768bf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,6 +3,7 @@ members = [
"bin/node-template/node",
"bin/node-template/runtime",
"bin/node-template/pallets/template",
+ "bin/node/bench",
"bin/node/cli",
"bin/node/executor",
"bin/node/primitives",
@@ -86,6 +87,7 @@ members = [
"frame/offences",
"frame/randomness-collective-flip",
"frame/recovery",
+ "frame/scheduler",
"frame/scored-pool",
"frame/session",
"frame/session/benchmarking",
@@ -130,6 +132,7 @@ members = [
"primitives/offchain",
"primitives/panic-handler",
"primitives/phragmen",
+ "primitives/phragmen/compact",
"primitives/rpc",
"primitives/runtime-interface",
"primitives/runtime-interface/proc-macro",
@@ -142,6 +145,7 @@ members = [
"primitives/api/proc-macro",
"primitives/api/test",
"primitives/arithmetic",
+ "primitives/arithmetic/fuzzer",
"primitives/io",
"primitives/runtime",
"primitives/sandbox",
@@ -153,6 +157,7 @@ members = [
"primitives/test-primitives",
"primitives/transaction-pool",
"primitives/trie",
+ "primitives/utils",
"primitives/wasm-interface",
"test-utils/client",
"test-utils/runtime",
@@ -170,3 +175,4 @@ members = [
[profile.release]
# Substrate runtime requires unwinding.
panic = "unwind"
+
diff --git a/bin/node-template/README.md b/bin/node-template/README.md
index 4ae60478fc72b77f32664b4225c023c36ff5f1af..c1730d51e5c137e6a02ebee623f6a5fba25a2630 100644
--- a/bin/node-template/README.md
+++ b/bin/node-template/README.md
@@ -56,7 +56,7 @@ cargo run -- \
--chain=local \
--alice \
--node-key 0000000000000000000000000000000000000000000000000000000000000001 \
- --telemetry-url ws://telemetry.polkadot.io:1024 \
+ --telemetry-url 'ws://telemetry.polkadot.io:1024 0' \
--validator
```
@@ -69,7 +69,7 @@ cargo run -- \
--chain=local \
--bob \
--port 30334 \
- --telemetry-url ws://telemetry.polkadot.io:1024 \
+ --telemetry-url 'ws://telemetry.polkadot.io:1024 0' \
--validator
```
diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml
index 201909bfd097d917573f23f449c5ff657217589b..a2ccc4fa95732b35da44cfa73e4165514ba2e4ea 100644
--- a/bin/node-template/node/Cargo.toml
+++ b/bin/node-template/node/Cargo.toml
@@ -2,6 +2,7 @@
name = "node-template"
version = "2.0.0-alpha.5"
authors = ["Anonymous"]
+description = "Substrate Node template"
edition = "2018"
license = "Unlicense"
build = "build.rs"
@@ -12,7 +13,7 @@ repository = "https://github.com/paritytech/substrate/"
name = "node-template"
[dependencies]
-futures = "0.3.1"
+futures = "0.3.4"
log = "0.4.8"
structopt = "0.3.8"
@@ -27,8 +28,8 @@ sc-network = { version = "0.8.0-alpha.5", path = "../../../client/network" }
sc-consensus-aura = { version = "0.8.0-alpha.5", path = "../../../client/consensus/aura" }
sp-consensus-aura = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/aura" }
sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" }
-grandpa = { version = "0.8.0-alpha.5", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
-grandpa-primitives = { version = "2.0.0-alpha.5", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
+sc-finality-grandpa = { version = "0.8.0-alpha.5", path = "../../../client/finality-grandpa" }
+sp-finality-grandpa = { version = "2.0.0-alpha.5", path = "../../../primitives/finality-grandpa" }
sc-client = { version = "0.8.0-alpha.5", path = "../../../client/" }
sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
@@ -37,5 +38,7 @@ sc-basic-authorship = { path = "../../../client/basic-authorship", version = "0.
node-template-runtime = { version = "2.0.0-alpha.5", path = "../runtime" }
[build-dependencies]
-vergen = "3.0.4"
-build-script-utils = { version = "2.0.0-alpha.5", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
+substrate-build-script-utils = { version = "2.0.0-alpha.5", path = "../../../utils/build-script-utils" }
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node-template/node/build.rs b/bin/node-template/node/build.rs
index 222cbb409285b40e7204cd609d444854dd4082aa..e3bfe3116bf28dba1872f7d0b64c2ee0c9c71c3c 100644
--- a/bin/node-template/node/build.rs
+++ b/bin/node-template/node/build.rs
@@ -1,9 +1,7 @@
-use vergen::{ConstantsFlags, generate_cargo_keys};
-
-const ERROR_MSG: &str = "Failed to generate metadata files";
+use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
- generate_cargo_keys(ConstantsFlags::SHA_SHORT).expect(ERROR_MSG);
+ generate_cargo_keys();
- build_script_utils::rerun_if_git_head_changed();
+ rerun_if_git_head_changed();
}
diff --git a/bin/node-template/node/src/chain_spec.rs b/bin/node-template/node/src/chain_spec.rs
index f1a7e29d44cb44e297bbb65591b8ed8396a7c37d..8ed91698ebe8f796b06eaedf9ac46c63e302cd7e 100644
--- a/bin/node-template/node/src/chain_spec.rs
+++ b/bin/node-template/node/src/chain_spec.rs
@@ -4,7 +4,7 @@ use node_template_runtime::{
SudoConfig, SystemConfig, WASM_BINARY, Signature
};
use sp_consensus_aura::sr25519::{AuthorityId as AuraId};
-use grandpa_primitives::{AuthorityId as GrandpaId};
+use sp_finality_grandpa::{AuthorityId as GrandpaId};
use sc_service;
use sp_runtime::traits::{Verify, IdentifyAccount};
@@ -14,17 +14,6 @@ use sp_runtime::traits::{Verify, IdentifyAccount};
/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
pub type ChainSpec = sc_service::GenericChainSpec;
-/// The chain specification option. This is expected to come in from the CLI and
-/// is little more than one of a number of alternatives which can easily be converted
-/// from a string (`--chain=...`) into a `ChainSpec`.
-#[derive(Clone, Debug)]
-pub enum Alternative {
- /// Whatever the current runtime is, with just Alice as an auth.
- Development,
- /// Whatever the current runtime is, with simple Alice/Bob auths.
- LocalTestnet,
-}
-
/// Helper function to generate a crypto pair from seed
pub fn get_from_seed(seed: &str) -> ::Public {
TPublic::Pair::from_string(&format!("//{}", seed), None)
@@ -42,80 +31,70 @@ pub fn get_account_id_from_seed(seed: &str) -> AccountId where
}
/// Helper function to generate an authority key for Aura
-pub fn get_authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) {
+pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) {
(
get_from_seed::(s),
get_from_seed::(s),
)
}
-impl Alternative {
- /// Get an actual chain config from one of the alternatives.
- pub(crate) fn load(self) -> Result {
- Ok(match self {
- Alternative::Development => ChainSpec::from_genesis(
- "Development",
- "dev",
- || testnet_genesis(
- vec![
- get_authority_keys_from_seed("Alice"),
- ],
- get_account_id_from_seed::("Alice"),
- vec![
- get_account_id_from_seed::("Alice"),
- get_account_id_from_seed::("Bob"),
- get_account_id_from_seed::("Alice//stash"),
- get_account_id_from_seed::("Bob//stash"),
- ],
- true,
- ),
- vec![],
- None,
- None,
- None,
- None
- ),
- Alternative::LocalTestnet => ChainSpec::from_genesis(
- "Local Testnet",
- "local_testnet",
- || testnet_genesis(
- vec![
- get_authority_keys_from_seed("Alice"),
- get_authority_keys_from_seed("Bob"),
- ],
- get_account_id_from_seed::("Alice"),
- vec![
- get_account_id_from_seed::("Alice"),
- get_account_id_from_seed::("Bob"),
- get_account_id_from_seed::("Charlie"),
- get_account_id_from_seed::("Dave"),
- get_account_id_from_seed::("Eve"),
- get_account_id_from_seed::("Ferdie"),
- get_account_id_from_seed::("Alice//stash"),
- get_account_id_from_seed::("Bob//stash"),
- get_account_id_from_seed::("Charlie//stash"),
- get_account_id_from_seed::("Dave//stash"),
- get_account_id_from_seed::("Eve//stash"),
- get_account_id_from_seed::("Ferdie//stash"),
- ],
- true,
- ),
- vec![],
- None,
- None,
- None,
- None
- ),
- })
- }
+pub fn development_config() -> ChainSpec {
+ ChainSpec::from_genesis(
+ "Development",
+ "dev",
+ || testnet_genesis(
+ vec![
+ authority_keys_from_seed("Alice"),
+ ],
+ get_account_id_from_seed::("Alice"),
+ vec![
+ get_account_id_from_seed::("Alice"),
+ get_account_id_from_seed::("Bob"),
+ get_account_id_from_seed::("Alice//stash"),
+ get_account_id_from_seed::("Bob//stash"),
+ ],
+ true,
+ ),
+ vec![],
+ None,
+ None,
+ None,
+ None,
+ )
+}
- pub(crate) fn from(s: &str) -> Option {
- match s {
- "dev" => Some(Alternative::Development),
- "" | "local" => Some(Alternative::LocalTestnet),
- _ => None,
- }
- }
+pub fn local_testnet_config() -> ChainSpec {
+ ChainSpec::from_genesis(
+ "Local Testnet",
+ "local_testnet",
+ || testnet_genesis(
+ vec![
+ authority_keys_from_seed("Alice"),
+ authority_keys_from_seed("Bob"),
+ ],
+ get_account_id_from_seed::("Alice"),
+ vec![
+ get_account_id_from_seed::("Alice"),
+ get_account_id_from_seed::("Bob"),
+ get_account_id_from_seed::("Charlie"),
+ get_account_id_from_seed::("Dave"),
+ get_account_id_from_seed::("Eve"),
+ get_account_id_from_seed::("Ferdie"),
+ get_account_id_from_seed::("Alice//stash"),
+ get_account_id_from_seed::("Bob//stash"),
+ get_account_id_from_seed::("Charlie//stash"),
+ get_account_id_from_seed::("Dave//stash"),
+ get_account_id_from_seed::("Eve//stash"),
+ get_account_id_from_seed::("Ferdie//stash"),
+ ],
+ true,
+ ),
+ vec![],
+ None,
+ None,
+ None,
+ None,
+ )
}
fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>,
@@ -141,10 +120,3 @@ fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>,
}),
}
}
-
-pub fn load_spec(id: &str) -> Result, String> {
- Ok(match Alternative::from(id) {
- Some(spec) => Box::new(spec.load()?),
- None => Box::new(ChainSpec::from_json_file(std::path::PathBuf::from(id))?),
- })
-}
diff --git a/bin/node-template/node/src/command.rs b/bin/node-template/node/src/command.rs
index 0f4c301dbff5b7defe0565bf71e85b21a6418867..75b88877aadfbe731dd16806e334948678fb24be 100644
--- a/bin/node-template/node/src/command.rs
+++ b/bin/node-template/node/src/command.rs
@@ -14,36 +14,64 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see .
-use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
-use sc_cli::VersionInfo;
-use crate::service;
use crate::chain_spec;
use crate::cli::Cli;
+use crate::service;
+use sc_cli::SubstrateCli;
+use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
-/// Parse and run command line arguments
-pub fn run(version: VersionInfo) -> sc_cli::Result<()> {
- let opt = sc_cli::from_args::(&version);
+impl SubstrateCli for Cli {
+ fn impl_name() -> &'static str {
+ "Substrate Node"
+ }
+
+ fn impl_version() -> &'static str {
+ env!("SUBSTRATE_CLI_IMPL_VERSION")
+ }
+
+ fn description() -> &'static str {
+ env!("CARGO_PKG_DESCRIPTION")
+ }
+
+ fn author() -> &'static str {
+ env!("CARGO_PKG_AUTHORS")
+ }
- let mut config = sc_service::Configuration::from_version(&version);
+ fn support_url() -> &'static str {
+ "support.anonymous.an"
+ }
+
+ fn copyright_start_year() -> i32 {
+ 2017
+ }
+
+ fn executable_name() -> &'static str {
+ env!("CARGO_PKG_NAME")
+ }
+
+ fn load_spec(&self, id: &str) -> Result, String> {
+ Ok(match id {
+ "dev" => Box::new(chain_spec::development_config()),
+ "" | "local" => Box::new(chain_spec::local_testnet_config()),
+ path => Box::new(chain_spec::ChainSpec::from_json_file(
+ std::path::PathBuf::from(path),
+ )?),
+ })
+ }
+}
+
+/// Parse and run command line arguments
+pub fn run() -> sc_cli::Result<()> {
+ let cli = Cli::from_args();
- match opt.subcommand {
+ match &cli.subcommand {
Some(subcommand) => {
- subcommand.init(&version)?;
- subcommand.update_config(&mut config, chain_spec::load_spec, &version)?;
- subcommand.run(
- config,
- |config: _| Ok(new_full_start!(config).0),
- )
- },
+ let runner = cli.create_runner(subcommand)?;
+ runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0))
+ }
None => {
- opt.run.init(&version)?;
- opt.run.update_config(&mut config, chain_spec::load_spec, &version)?;
- opt.run.run(
- config,
- service::new_light,
- service::new_full,
- &version,
- )
- },
+ let runner = cli.create_runner(&cli.run)?;
+ runner.run_node(service::new_light, service::new_full)
+ }
}
}
diff --git a/bin/node-template/node/src/main.rs b/bin/node-template/node/src/main.rs
index 91b2c257e0cd733f7e87d00e02857101810a2fb0..369e6932a030811b542ae8de9f26e9324f22e069 100644
--- a/bin/node-template/node/src/main.rs
+++ b/bin/node-template/node/src/main.rs
@@ -8,16 +8,5 @@ mod cli;
mod command;
fn main() -> sc_cli::Result<()> {
- let version = sc_cli::VersionInfo {
- name: "Substrate Node",
- commit: env!("VERGEN_SHA_SHORT"),
- version: env!("CARGO_PKG_VERSION"),
- executable_name: "node-template",
- author: "Anonymous",
- description: "Template Node",
- support_url: "support.anonymous.an",
- copyright_start_year: 2017,
- };
-
- command::run(version)
+ command::run()
}
diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs
index 4b66f90fbb3732bbc07e59ced32a40717bd1b559..7c4a574f6be04c823e182671b1b7930bfdb5394d 100644
--- a/bin/node-template/node/src/service.rs
+++ b/bin/node-template/node/src/service.rs
@@ -10,7 +10,7 @@ use sp_inherents::InherentDataProviders;
use sc_executor::native_executor_instance;
pub use sc_executor::NativeExecutor;
use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
-use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
+use sc_finality_grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
// Our native executor instance.
native_executor_instance!(
@@ -44,7 +44,7 @@ macro_rules! new_full_start {
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
let (grandpa_block_import, grandpa_link) =
- grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?;
+ sc_finality_grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?;
let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
grandpa_block_import.clone(), client.clone(),
@@ -72,16 +72,11 @@ macro_rules! new_full_start {
pub fn new_full(config: Configuration)
-> Result
{
- let is_authority = config.roles.is_authority();
+ let role = config.role.clone();
let force_authoring = config.force_authoring;
- let name = config.name.clone();
+ let name = config.network.node_name.clone();
let disable_grandpa = config.disable_grandpa;
- // sentry nodes announce themselves as authorities to the network
- // and should run the same protocols authorities do, but it should
- // never actively participate in any consensus process.
- let participates_in_consensus = is_authority && !config.sentry_mode;
-
let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config);
let (block_import, grandpa_link) =
@@ -96,11 +91,9 @@ pub fn new_full(config: Configuration)
})?
.build()?;
- if participates_in_consensus {
- let proposer = sc_basic_authorship::ProposerFactory::new(
- service.client(),
- service.transaction_pool()
- );
+ if role.is_authority() {
+ let proposer =
+ sc_basic_authorship::ProposerFactory::new(service.client(), service.transaction_pool());
let client = service.client();
let select_chain = service.select_chain()
@@ -129,20 +122,20 @@ pub fn new_full(config: Configuration)
// if the node isn't actively participating in consensus then it doesn't
// need a keystore, regardless of which protocol we use below.
- let keystore = if participates_in_consensus {
+ let keystore = if role.is_authority() {
Some(service.keystore())
} else {
None
};
- let grandpa_config = grandpa::Config {
+ let grandpa_config = sc_finality_grandpa::Config {
// FIXME #1578 make this available through chainspec
gossip_duration: Duration::from_millis(333),
justification_period: 512,
name: Some(name),
observer_enabled: false,
keystore,
- is_authority,
+ is_authority: role.is_network_authority(),
};
let enable_grandpa = !disable_grandpa;
@@ -153,13 +146,13 @@ pub fn new_full(config: Configuration)
// and vote data availability than the observer. The observer has not
// been tested extensively yet and having most nodes in a network run it
// could lead to finality stalls.
- let grandpa_config = grandpa::GrandpaParams {
+ let grandpa_config = sc_finality_grandpa::GrandpaParams {
config: grandpa_config,
link: grandpa_link,
network: service.network(),
inherent_data_providers: inherent_data_providers.clone(),
telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
- voting_rule: grandpa::VotingRulesBuilder::default().build(),
+ voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry: service.prometheus_registry()
};
@@ -167,10 +160,10 @@ pub fn new_full(config: Configuration)
// if it fails we take down the service with it.
service.spawn_essential_task(
"grandpa-voter",
- grandpa::run_grandpa_voter(grandpa_config)?
+ sc_finality_grandpa::run_grandpa_voter(grandpa_config)?
);
} else {
- grandpa::setup_disabled_grandpa(
+ sc_finality_grandpa::setup_disabled_grandpa(
service.client(),
&inherent_data_providers,
service.network(),
@@ -204,7 +197,7 @@ pub fn new_light(config: Configuration)
let fetch_checker = fetcher
.map(|fetcher| fetcher.checker().clone())
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
- let grandpa_block_import = grandpa::light_block_import(
+ let grandpa_block_import = sc_finality_grandpa::light_block_import(
client.clone(),
backend,
&(client.clone() as Arc<_>),
diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml
index 285d05b560f96470e7f16ae581aae5fc734c2813..69fcd843526806c9fe9a0b6e684a292fcbfe778b 100644
--- a/bin/node-template/pallets/template/Cargo.toml
+++ b/bin/node-template/pallets/template/Cargo.toml
@@ -9,17 +9,15 @@ repository = "https://github.com/paritytech/substrate/"
description = "FRAME pallet template"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] }
-safe-mix = { default-features = false, version = '1.0.0' }
+codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
[dependencies.frame-support]
default-features = false
version = "2.0.0-alpha.5"
path = "../../../../frame/support"
-[dependencies.system]
+[dependencies.frame-system]
default-features = false
-package = 'frame-system'
version = "2.0.0-alpha.5"
path = "../../../../frame/system"
[dev-dependencies.sp-core]
@@ -43,6 +41,8 @@ default = ['std']
std = [
'codec/std',
'frame-support/std',
- 'safe-mix/std',
- 'system/std'
+ 'frame-system/std'
]
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node-template/pallets/template/src/lib.rs b/bin/node-template/pallets/template/src/lib.rs
index 892778adeb46b431cb46e87dd4e7ac4c1cea129b..a0daecfb72c9a14ffa7e7819400f0345c542b5b8 100644
--- a/bin/node-template/pallets/template/src/lib.rs
+++ b/bin/node-template/pallets/template/src/lib.rs
@@ -10,7 +10,7 @@
/// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs
use frame_support::{decl_module, decl_storage, decl_event, decl_error, dispatch};
-use system::ensure_signed;
+use frame_system::{self as system, ensure_signed};
#[cfg(test)]
mod mock;
@@ -75,6 +75,7 @@ decl_module! {
/// Just a dummy entry point.
/// function that can be called by the external world as an extrinsics call
/// takes a parameter of the type `AccountId`, stores it, and emits an event
+ #[weight = frame_support::weights::SimpleDispatchInfo::default()]
pub fn do_something(origin, something: u32) -> dispatch::DispatchResult {
// Check it was signed and get the signer. See also: ensure_root and ensure_none
let who = ensure_signed(origin)?;
@@ -90,6 +91,7 @@ decl_module! {
/// Another dummy entry point.
/// takes no parameters, attempts to increment storage value, and possibly throws an error
+ #[weight = frame_support::weights::SimpleDispatchInfo::default()]
pub fn cause_error(origin) -> dispatch::DispatchResult {
// Check it was signed and get the signer. See also: ensure_root and ensure_none
let _who = ensure_signed(origin)?;
diff --git a/bin/node-template/pallets/template/src/mock.rs b/bin/node-template/pallets/template/src/mock.rs
index 2ea81ffb456261122b234c6ae3c36f52eaa9c430..a93ac0359e3a2f2b8f4e0e558a0b254e33eb1c7e 100644
--- a/bin/node-template/pallets/template/src/mock.rs
+++ b/bin/node-template/pallets/template/src/mock.rs
@@ -6,6 +6,7 @@ use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup}, testing::Header, Perbill,
};
+use frame_system as system;
impl_outer_origin! {
pub enum Origin for Test {}
diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml
index c5f778e0556d8b94d206ec3fbfee7919052d1afe..e8653e6df70e82e503a54e79c638e9a796e41913 100644
--- a/bin/node-template/runtime/Cargo.toml
+++ b/bin/node-template/runtime/Cargo.toml
@@ -8,7 +8,7 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
aura = { version = "2.0.0-alpha.5", default-features = false, package = "pallet-aura", path = "../../../frame/aura" }
balances = { version = "2.0.0-alpha.5", default-features = false, package = "pallet-balances", path = "../../../frame/balances" }
@@ -68,3 +68,6 @@ std = [
"transaction-payment/std",
"template/std",
]
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs
index 0414759a5ad86f5c5be4adb1cc5031d4adf1b4e7..94f033fd8f58ee231f412e7a2cf6f7f53f77d49a 100644
--- a/bin/node-template/runtime/src/lib.rs
+++ b/bin/node-template/runtime/src/lib.rs
@@ -11,8 +11,8 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
use sp_std::prelude::*;
use sp_core::OpaqueMetadata;
use sp_runtime::{
- ApplyExtrinsicResult, transaction_validity::TransactionValidity, generic, create_runtime_str,
- impl_opaque_keys, MultiSignature,
+ ApplyExtrinsicResult, generic, create_runtime_str, impl_opaque_keys, MultiSignature,
+ transaction_validity::{TransactionValidity, TransactionSource},
};
use sp_runtime::traits::{
BlakeTwo256, Block as BlockT, IdentityLookup, Verify, ConvertInto, IdentifyAccount
@@ -318,8 +318,11 @@ impl_runtime_apis! {
}
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime {
- fn validate_transaction(tx: ::Extrinsic) -> TransactionValidity {
- Executive::validate_transaction(tx)
+ fn validate_transaction(
+ source: TransactionSource,
+ tx: ::Extrinsic,
+ ) -> TransactionValidity {
+ Executive::validate_transaction(source, tx)
}
}
diff --git a/bin/node/bench/Cargo.toml b/bin/node/bench/Cargo.toml
new file mode 100644
index 0000000000000000000000000000000000000000..22e7fe51d848e1f44ca0c34eddb57d39ca0d0c32
--- /dev/null
+++ b/bin/node/bench/Cargo.toml
@@ -0,0 +1,20 @@
+[package]
+name = "node-bench"
+version = "0.8.0-alpha.5"
+authors = ["Parity Technologies "]
+description = "Substrate node integration benchmarks."
+edition = "2018"
+license = "GPL-3.0"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+log = "0.4.8"
+node-primitives = { version = "2.0.0-alpha.5", path = "../primitives" }
+node-testing = { version = "2.0.0-alpha.5", path = "../testing" }
+sc-cli = { version = "0.8.0-alpha.5", path = "../../../client/cli" }
+sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api/" }
+sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
+serde = "1.0.101"
+serde_json = "1.0.41"
+structopt = "0.3"
\ No newline at end of file
diff --git a/bin/node/bench/src/core.rs b/bin/node/bench/src/core.rs
new file mode 100644
index 0000000000000000000000000000000000000000..a8164db75a53833855ad996cd1aceaa24e232123
--- /dev/null
+++ b/bin/node/bench/src/core.rs
@@ -0,0 +1,140 @@
+// Copyright 2020 Parity Technologies (UK) Ltd.
+// This file is part of Substrate.
+
+// Substrate is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Substrate is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Substrate. If not, see .
+
+use std::{fmt, borrow::{Cow, ToOwned}};
+use serde::Serialize;
+
+pub struct Path(Vec);
+
+impl Path {
+ pub fn new(initial: &'static [&'static str]) -> Self {
+ Path(initial.iter().map(|x| x.to_string()).collect())
+ }
+}
+
+impl Path {
+ pub fn push(&mut self, item: &str) {
+ self.0.push(item.to_string());
+ }
+
+ pub fn full(&self) -> String {
+ self.0.iter().fold(String::new(), |mut val, next| { val.push_str("::"); val.push_str(next); val })
+ }
+
+ pub fn has(&self, path: &str) -> bool {
+ self.full().contains(path)
+ }
+}
+
+pub trait BenchmarkDescription {
+ fn path(&self) -> Path;
+
+ fn setup(self: Box) -> Box;
+
+ fn name(&self) -> Cow<'static, str>;
+}
+
+pub trait Benchmark {
+ fn run(&mut self) -> std::time::Duration;
+}
+
+#[derive(Debug, Clone, Serialize)]
+pub struct BenchmarkOutput {
+ name: String,
+ raw_average: u64,
+ average: u64,
+}
+
+struct NsFormatter(u64);
+
+impl fmt::Display for NsFormatter {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ let v = self.0;
+
+ if v < 100 {
+ return write!(f, "{} ns", v)
+ }
+
+ if self.0 < 10_000 {
+ return write!(f, "{:.1} µs", v as f64 / 1000.0)
+ }
+
+ if self.0 < 1_000_000 {
+ return write!(f, "{:.1} ms", v as f64 / 1_000_000.0)
+ }
+
+ if self.0 < 100_000_000 {
+ return write!(f, "{} ms", v as f64 / 1_000_000.0)
+ }
+
+ write!(f, "{:.2} s", v as f64 / 1_000_000_000.0)
+ }
+}
+
+impl fmt::Display for BenchmarkOutput {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ write!(
+ f,
+ "({}: avg {}, w_avg {})",
+ self.name,
+ NsFormatter(self.raw_average),
+ NsFormatter(self.average),
+ )
+ }
+}
+
+pub fn run_benchmark(benchmark: Box) -> BenchmarkOutput {
+ let name = benchmark.name().to_owned();
+ let mut benchmark = benchmark.setup();
+
+ let mut durations: Vec = vec![];
+ for _ in 0..50 {
+ let duration = benchmark.run();
+ durations.push(duration.as_nanos());
+ }
+
+ durations.sort();
+
+ let raw_average = (durations.iter().sum::() / (durations.len() as u128)) as u64;
+ let average = (durations.iter().skip(10).take(30).sum::() / 30) as u64;
+
+ BenchmarkOutput {
+ name: name.into(),
+ raw_average,
+ average,
+ }
+}
+
+macro_rules! matrix(
+ ( $var:ident in $over:expr => $tt:expr, $( $rest:tt )* ) => {
+ {
+ let mut res = Vec::>::new();
+ for $var in $over.iter() {
+ res.push(Box::new($tt));
+ }
+ res.extend(matrix!( $($rest)* ));
+ res
+ }
+ };
+ ( $var:expr, $( $rest:tt )*) => {
+ {
+ let mut res = vec![Box::new($var) as Box];
+ res.extend(matrix!( $($rest)* ));
+ res
+ }
+ };
+ () => { vec![] }
+);
\ No newline at end of file
diff --git a/bin/node/bench/src/import.rs b/bin/node/bench/src/import.rs
new file mode 100644
index 0000000000000000000000000000000000000000..20181bf4c7f7de816226ab76701d2c9339d56fa8
--- /dev/null
+++ b/bin/node/bench/src/import.rs
@@ -0,0 +1,136 @@
+// Copyright 2020 Parity Technologies (UK) Ltd.
+// This file is part of Substrate.
+
+// Substrate is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Substrate is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Substrate. If not, see .
+
+//! Block import benchmark.
+//!
+//! This benchmark is expected to measure block import operation of
+//! some more or less full block.
+//!
+//! As we also want to protect against cold-cache attacks, this
+//! benchmark should not rely on any caching (except those that
+//! DO NOT depend on user input). Thus block generation should be
+//! based on randomized operation.
+//!
+//! This is supposed to be very simple benchmark and is not subject
+//! to much configuring - just block full of randomized transactions.
+//! It is not supposed to measure runtime modules weight correctness
+
+use std::borrow::Cow;
+
+use node_testing::bench::{BenchDb, Profile, BlockType, KeyTypes};
+use node_primitives::Block;
+use sc_client_api::backend::Backend;
+use sp_runtime::generic::BlockId;
+
+use crate::core::{self, Path};
+
+#[derive(Clone, Copy, Debug)]
+pub enum SizeType { Small, Medium, Large }
+
+impl SizeType {
+ fn transactions(&self) -> usize {
+ match self {
+ SizeType::Small => 10,
+ SizeType::Medium => 100,
+ SizeType::Large => 500,
+ }
+ }
+}
+
+pub struct ImportBenchmarkDescription {
+ pub profile: Profile,
+ pub key_types: KeyTypes,
+ pub size: SizeType,
+}
+
+pub struct ImportBenchmark {
+ profile: Profile,
+ database: BenchDb,
+ block: Block,
+}
+
+impl core::BenchmarkDescription for ImportBenchmarkDescription {
+ fn path(&self) -> Path {
+
+ let mut path = Path::new(&["node", "import"]);
+
+ match self.profile {
+ Profile::Wasm => path.push("wasm"),
+ Profile::Native => path.push("native"),
+ }
+
+ match self.key_types {
+ KeyTypes::Sr25519 => path.push("sr25519"),
+ KeyTypes::Ed25519 => path.push("ed25519"),
+ }
+
+ match self.size {
+ SizeType::Small => path.push("small"),
+ SizeType::Medium => path.push("medium"),
+ SizeType::Large => path.push("large"),
+ }
+
+ path
+ }
+
+ fn setup(self: Box) -> Box {
+ let profile = self.profile;
+ let mut bench_db = BenchDb::with_key_types(self.size.transactions(), self.key_types);
+ let block = bench_db.generate_block(BlockType::RandomTransfers(self.size.transactions()));
+ Box::new(ImportBenchmark {
+ database: bench_db,
+ block,
+ profile,
+ })
+ }
+
+ fn name(&self) -> Cow<'static, str> {
+ match self.profile {
+ Profile::Wasm => "Import benchmark (random transfers, wasm)".into(),
+ Profile::Native => "Import benchmark (random transfers, native)".into(),
+ }
+ }
+}
+
+impl core::Benchmark for ImportBenchmark {
+ fn run(&mut self) -> std::time::Duration {
+ let mut context = self.database.create_context(self.profile);
+
+ let _ = context.client.runtime_version_at(&BlockId::Number(0))
+ .expect("Failed to get runtime version")
+ .spec_version;
+
+ let start = std::time::Instant::now();
+ context.import_block(self.block.clone());
+ let elapsed = start.elapsed();
+
+ log::info!(
+ target: "bench-logistics",
+ "imported block with {} tx, took: {:#?}",
+ self.block.extrinsics.len(),
+ elapsed,
+ );
+
+ log::info!(
+ target: "bench-logistics",
+ "usage info: {}",
+ context.backend.usage_info()
+ .expect("RocksDB backend always provides usage info!"),
+ );
+
+ elapsed
+ }
+}
\ No newline at end of file
diff --git a/bin/node/bench/src/main.rs b/bin/node/bench/src/main.rs
new file mode 100644
index 0000000000000000000000000000000000000000..8f045465262856fcb907f9aa5dfee68f7f05fc88
--- /dev/null
+++ b/bin/node/bench/src/main.rs
@@ -0,0 +1,95 @@
+// Copyright 2020 Parity Technologies (UK) Ltd.
+// This file is part of Substrate.
+
+// Substrate is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Substrate is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Substrate. If not, see .
+
+#[macro_use] mod core;
+mod import;
+
+use crate::core::run_benchmark;
+use import::{ImportBenchmarkDescription, SizeType};
+use node_testing::bench::{Profile, KeyTypes};
+use structopt::StructOpt;
+
+#[derive(Debug, StructOpt)]
+#[structopt(name = "node-bench", about = "Node integration benchmarks")]
+struct Opt {
+ /// Show list of all available benchmarks.
+ ///
+ /// Will output ("name", "path"). Benchmarks can then be filtered by path.
+ #[structopt(short, long)]
+ list: bool,
+
+ /// Machine readable json output.
+ ///
+ /// This also suppresses all regular output (except to stderr)
+ #[structopt(short, long)]
+ json: bool,
+
+ /// Filter benchmarks.
+ ///
+ /// Run with `--list` for the hint of what to filter.
+ filter: Option,
+}
+
+fn main() {
+ let opt = Opt::from_args();
+
+ if !opt.json {
+ sc_cli::init_logger("");
+ }
+
+ let benchmarks = matrix!(
+ profile in [Profile::Wasm, Profile::Native] =>
+ ImportBenchmarkDescription {
+ profile: *profile,
+ key_types: KeyTypes::Sr25519,
+ size: SizeType::Medium,
+ },
+ ImportBenchmarkDescription {
+ profile: Profile::Native,
+ key_types: KeyTypes::Ed25519,
+ size: SizeType::Medium,
+ },
+ size in [SizeType::Small, SizeType::Large] =>
+ ImportBenchmarkDescription {
+ profile: Profile::Native,
+ key_types: KeyTypes::Sr25519,
+ size: *size,
+ },
+ );
+
+ if opt.list {
+ for benchmark in benchmarks.iter() {
+ log::info!("{}: {}", benchmark.name(), benchmark.path().full())
+ }
+ return;
+ }
+
+ let mut results = Vec::new();
+ for benchmark in benchmarks {
+ if opt.filter.as_ref().map(|f| benchmark.path().has(f)).unwrap_or(true) {
+ log::info!("Starting {}", benchmark.name());
+ let result = run_benchmark(benchmark);
+ log::info!("{}", result);
+
+ results.push(result);
+ }
+ }
+
+ if opt.json {
+ let json_result: String = serde_json::to_string(&results).expect("Failed to construct json");
+ println!("{}", json_result);
+ }
+}
\ No newline at end of file
diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml
index 9a286c5880085dcb1509f09db7a2ae190cef8df9..9842fd2ee49ac7650b441970393d3ba440723c64 100644
--- a/bin/node/cli/Cargo.toml
+++ b/bin/node/cli/Cargo.toml
@@ -2,7 +2,7 @@
name = "node-cli"
version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
-description = "Substrate node implementation in Rust."
+description = "Generic Substrate node implementation in Rust."
build = "build.rs"
edition = "2018"
license = "GPL-3.0"
@@ -16,7 +16,7 @@ repository = "https://github.com/paritytech/substrate/"
wasm-opt = false
[badges]
-travis-ci = { repository = "paritytech/substrate", branch = "master" }
+travis-ci = { repository = "paritytech/substrate" }
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "paritytech/substrate" }
is-it-maintained-open-issues = { repository = "paritytech/substrate" }
@@ -31,7 +31,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
# third-party dependencies
-codec = { package = "parity-scale-codec", version = "1.2.0" }
+codec = { package = "parity-scale-codec", version = "1.3.0" }
serde = { version = "1.0.102", features = ["derive"] }
futures = { version = "0.3.1", features = ["compat"] }
hex-literal = "0.2.1"
@@ -82,6 +82,7 @@ pallet-transaction-payment = { version = "2.0.0-alpha.5", path = "../../../frame
frame-support = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/support" }
pallet-im-online = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/im-online" }
pallet-authority-discovery = { version = "2.0.0-alpha.5", path = "../../../frame/authority-discovery" }
+pallet-staking = { version = "2.0.0-alpha.5", path = "../../../frame/staking" }
# node-specific dependencies
node-runtime = { version = "2.0.0-alpha.5", path = "../runtime" }
@@ -100,23 +101,30 @@ wasm-bindgen = { version = "0.2.57", optional = true }
wasm-bindgen-futures = { version = "0.4.7", optional = true }
browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.8.0-alpha.5"}
+[target.'cfg(target_arch="x86_64")'.dependencies]
+node-executor = { version = "2.0.0-alpha.4", path = "../executor", features = [ "wasmtime" ] }
+sc-cli = { version = "0.8.0-alpha.4", optional = true, path = "../../../client/cli", features = [ "wasmtime" ] }
+sc-service = { version = "0.8.0-alpha.4", default-features = false, path = "../../../client/service", features = [ "wasmtime" ] }
+
[dev-dependencies]
sc-keystore = { version = "2.0.0-alpha.5", path = "../../../client/keystore" }
sc-consensus-babe = { version = "0.8.0-alpha.5", features = ["test-helpers"], path = "../../../client/consensus/babe" }
sc-consensus-epochs = { version = "0.8.0-alpha.5", path = "../../../client/consensus/epochs" }
sc-service-test = { version = "2.0.0-dev", path = "../../../client/service/test" }
-futures = "0.3.1"
+futures = "0.3.4"
tempfile = "3.1.0"
-assert_cmd = "0.12"
+assert_cmd = "1.0"
nix = "0.17"
serde_json = "1.0"
+regex = "1"
+platforms = "0.2.1"
[build-dependencies]
-build-script-utils = { version = "2.0.0-alpha.5", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
structopt = { version = "0.3.8", optional = true }
node-transaction-factory = { version = "0.8.0-alpha.5", optional = true, path = "../transaction-factory" }
node-inspect = { version = "0.8.0-alpha.5", optional = true, path = "../inspect" }
frame-benchmarking-cli = { version = "2.0.0-alpha.5", optional = true, path = "../../../utils/frame/benchmarking-cli" }
+substrate-build-script-utils = { version = "2.0.0-alpha.5", optional = true, path = "../../../utils/build-script-utils" }
[build-dependencies.sc-cli]
version = "0.8.0-alpha.5"
@@ -124,12 +132,8 @@ package = "sc-cli"
path = "../../../client/cli"
optional = true
-[build-dependencies.vergen]
-version = "3.0.4"
-optional = true
-
[features]
-default = ["cli", "wasmtime"]
+default = [ "cli" ]
browser = [
"browser-utils",
"wasm-bindgen",
@@ -143,12 +147,9 @@ cli = [
"frame-benchmarking-cli",
"sc-service/rocksdb",
"structopt",
- "vergen",
-]
-wasmtime = [
- "cli",
- "node-executor/wasmtime",
- "sc-cli/wasmtime",
- "sc-service/wasmtime",
+ "substrate-build-script-utils",
]
runtime-benchmarks = [ "node-runtime/runtime-benchmarks" ]
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/cli/bin/main.rs b/bin/node/cli/bin/main.rs
index 8c4412667baceec56904864413178cbc88001497..cfad84a4cb5520f2542dc18da771d4cfa4a0a9ed 100644
--- a/bin/node/cli/bin/main.rs
+++ b/bin/node/cli/bin/main.rs
@@ -19,16 +19,5 @@
#![warn(missing_docs)]
fn main() -> sc_cli::Result<()> {
- let version = sc_cli::VersionInfo {
- name: "Substrate Node",
- commit: env!("VERGEN_SHA_SHORT"),
- version: env!("CARGO_PKG_VERSION"),
- executable_name: "substrate",
- author: "Parity Technologies ",
- description: "Generic substrate node",
- support_url: "https://github.com/paritytech/substrate/issues/new",
- copyright_start_year: 2017,
- };
-
- node_cli::run(std::env::args(), version)
+ node_cli::run()
}
diff --git a/bin/node/cli/build.rs b/bin/node/cli/build.rs
index e824b59be64f3dedba3b738a6a3908b9e48b5091..12e0cab58ada5797c069e9a24970be6daa06de4f 100644
--- a/bin/node/cli/build.rs
+++ b/bin/node/cli/build.rs
@@ -24,14 +24,14 @@ mod cli {
include!("src/cli.rs");
use std::{fs, env, path::Path};
- use sc_cli::{structopt::clap::Shell};
- use vergen::{ConstantsFlags, generate_cargo_keys};
+ use sc_cli::structopt::clap::Shell;
+ use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
pub fn main() {
build_shell_completion();
- generate_cargo_keys(ConstantsFlags::all()).expect("Failed to generate metadata files");
+ generate_cargo_keys();
- build_script_utils::rerun_if_git_head_changed();
+ rerun_if_git_head_changed();
}
/// Build shell completion scripts for all known shells
diff --git a/bin/node/cli/src/browser.rs b/bin/node/cli/src/browser.rs
index e79ce273a32cc2ffde7ec1194fdbd81002e2fa25..6cd98dfe8d0d8ef0561406cb6a6b68fa6a3a0e88 100644
--- a/bin/node/cli/src/browser.rs
+++ b/bin/node/cli/src/browser.rs
@@ -41,11 +41,11 @@ async fn start_inner(chain_spec: String, log_level: String) -> Result ChainSpec {
"staging_testnet",
staging_testnet_config_genesis,
boot_nodes,
- Some(TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(), 0)])),
+ Some(TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(), 0)])
+ .expect("Staging telemetry url is valid; qed")),
None,
None,
Default::default(),
@@ -181,7 +183,7 @@ pub fn get_account_id_from_seed(seed: &str) -> AccountId where
}
/// Helper function to generate stash, controller and session key from seed
-pub fn get_authority_keys_from_seed(seed: &str) -> (
+pub fn authority_keys_from_seed(seed: &str) -> (
AccountId,
AccountId,
GrandpaId,
@@ -201,7 +203,14 @@ pub fn get_authority_keys_from_seed(seed: &str) -> (
/// Helper function to create GenesisConfig for testing
pub fn testnet_genesis(
- initial_authorities: Vec<(AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId)>,
+ initial_authorities: Vec<(
+ AccountId,
+ AccountId,
+ GrandpaId,
+ BabeId,
+ ImOnlineId,
+ AuthorityDiscoveryId,
+ )>,
root_key: AccountId,
endowed_accounts: Option>,
enable_println: bool,
@@ -243,7 +252,12 @@ pub fn testnet_genesis(
}),
pallet_session: Some(SessionConfig {
keys: initial_authorities.iter().map(|x| {
- (x.0.clone(), x.0.clone(), session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone()))
+ (x.0.clone(), x.0.clone(), session_keys(
+ x.2.clone(),
+ x.3.clone(),
+ x.4.clone(),
+ x.5.clone(),
+ ))
}).collect::>(),
}),
pallet_staking: Some(StakingConfig {
@@ -257,13 +271,14 @@ pub fn testnet_genesis(
.. Default::default()
}),
pallet_democracy: Some(DemocracyConfig::default()),
- pallet_collective_Instance1: Some(CouncilConfig {
+ pallet_elections_phragmen: Some(ElectionsConfig {
members: endowed_accounts.iter()
.take((num_endowed_accounts + 1) / 2)
.cloned()
+ .map(|member| (member, STASH))
.collect(),
- phantom: Default::default(),
}),
+ pallet_collective_Instance1: Some(CouncilConfig::default()),
pallet_collective_Instance2: Some(TechnicalCommitteeConfig {
members: endowed_accounts.iter()
.take((num_endowed_accounts + 1) / 2)
@@ -310,7 +325,7 @@ pub fn testnet_genesis(
fn development_config_genesis() -> GenesisConfig {
testnet_genesis(
vec![
- get_authority_keys_from_seed("Alice"),
+ authority_keys_from_seed("Alice"),
],
get_account_id_from_seed::("Alice"),
None,
@@ -335,8 +350,8 @@ pub fn development_config() -> ChainSpec {
fn local_testnet_genesis() -> GenesisConfig {
testnet_genesis(
vec![
- get_authority_keys_from_seed("Alice"),
- get_authority_keys_from_seed("Bob"),
+ authority_keys_from_seed("Alice"),
+ authority_keys_from_seed("Bob"),
],
get_account_id_from_seed::("Alice"),
None,
@@ -368,7 +383,7 @@ pub(crate) mod tests {
fn local_testnet_genesis_instant_single() -> GenesisConfig {
testnet_genesis(
vec![
- get_authority_keys_from_seed("Alice"),
+ authority_keys_from_seed("Alice"),
],
get_account_id_from_seed::("Alice"),
None,
diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs
index b6db9c3deb7e31f8f8da62d30b6971bf572b30d1..44b18fd716337c0857ebdf50f442001db12034c0 100644
--- a/bin/node/cli/src/cli.rs
+++ b/bin/node/cli/src/cli.rs
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see .
-use sc_cli::{SharedParams, ImportParams, RunCmd};
+use sc_cli::{ImportParams, RunCmd, SharedParams};
use structopt::StructOpt;
/// An overarching CLI command definition.
@@ -50,10 +50,7 @@ pub enum Subcommand {
Inspect(node_inspect::cli::InspectCmd),
/// The custom benchmark subcommmand benchmarking runtime pallets.
- #[structopt(
- name = "benchmark",
- about = "Benchmark runtime pallets."
- )]
+ #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
}
@@ -62,11 +59,11 @@ pub enum Subcommand {
#[derive(Debug, StructOpt, Clone)]
pub struct FactoryCmd {
/// Number of blocks to generate.
- #[structopt(long="blocks", default_value = "1")]
+ #[structopt(long = "blocks", default_value = "1")]
pub blocks: u32,
/// Number of transactions to push per block.
- #[structopt(long="transactions", default_value = "8")]
+ #[structopt(long = "transactions", default_value = "8")]
pub transactions: u32,
#[allow(missing_docs)]
diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs
index 21584f0898466dda3fca348bb40056b1436b43ac..37b77d3bb7475e31202d7592b4998e2c564084d5 100644
--- a/bin/node/cli/src/command.rs
+++ b/bin/node/cli/src/command.rs
@@ -14,102 +14,126 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see .
-use sc_cli::VersionInfo;
-use sc_service::{Roles as ServiceRoles};
+use crate::{chain_spec, factory_impl::FactoryState, service, Cli, FactoryCmd, Subcommand};
+use node_executor::Executor;
+use node_runtime::{Block, RuntimeApi};
use node_transaction_factory::RuntimeAdapter;
-use crate::{Cli, service, ChainSpec, load_spec, Subcommand, factory_impl::FactoryState};
+use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams, SubstrateCli};
+use sc_service::Configuration;
+
+impl SubstrateCli for Cli {
+ fn impl_name() -> &'static str {
+ "Substrate Node"
+ }
+
+ fn impl_version() -> &'static str {
+ env!("SUBSTRATE_CLI_IMPL_VERSION")
+ }
+
+ fn description() -> &'static str {
+ env!("CARGO_PKG_DESCRIPTION")
+ }
+
+ fn author() -> &'static str {
+ env!("CARGO_PKG_AUTHORS")
+ }
+
+ fn support_url() -> &'static str {
+ "https://github.com/paritytech/substrate/issues/new"
+ }
+
+ fn copyright_start_year() -> i32 {
+ 2017
+ }
+
+ fn executable_name() -> &'static str {
+ "substrate"
+ }
+
+ fn load_spec(&self, id: &str) -> std::result::Result, String> {
+ Ok(match id {
+ "dev" => Box::new(chain_spec::development_config()),
+ "local" => Box::new(chain_spec::local_testnet_config()),
+ "" | "fir" | "flaming-fir" => Box::new(chain_spec::flaming_fir_config()?),
+ "staging" => Box::new(chain_spec::staging_testnet_config()),
+ path => Box::new(chain_spec::ChainSpec::from_json_file(
+ std::path::PathBuf::from(path),
+ )?),
+ })
+ }
+}
/// Parse command line arguments into service configuration.
-pub fn run(args: I, version: VersionInfo) -> sc_cli::Result<()>
-where
- I: Iterator- ,
- T: Into + Clone,
-{
- let args: Vec<_> = args.collect();
- let opt = sc_cli::from_iter::(args.clone(), &version);
+pub fn run() -> Result<()> {
+ sc_cli::reset_signal_pipe_handler()?;
- let mut config = sc_service::Configuration::from_version(&version);
+ let cli = Cli::from_args();
- match opt.subcommand {
+ match &cli.subcommand {
None => {
- opt.run.init(&version)?;
- opt.run.update_config(&mut config, load_spec, &version)?;
- opt.run.run(
- config,
- service::new_light,
- service::new_full,
- &version,
- )
- },
+ let runner = cli.create_runner(&cli.run)?;
+ runner.run_node(service::new_light, service::new_full)
+ }
Some(Subcommand::Inspect(cmd)) => {
- cmd.init(&version)?;
- cmd.update_config(&mut config, load_spec, &version)?;
-
- let client = sc_service::new_full_client::<
- node_runtime::Block, node_runtime::RuntimeApi, node_executor::Executor,
- >(&config)?;
- let inspect = node_inspect::Inspector::::new(client);
+ let runner = cli.create_runner(cmd)?;
- cmd.run(inspect)
- },
+ runner.sync_run(|config| cmd.run::(config))
+ }
Some(Subcommand::Benchmark(cmd)) => {
- cmd.init(&version)?;
- cmd.update_config(&mut config, load_spec, &version)?;
-
- cmd.run::(config)
- },
- Some(Subcommand::Factory(cli_args)) => {
- cli_args.shared_params.init(&version)?;
- cli_args.shared_params.update_config(&mut config, load_spec, &version)?;
- cli_args.import_params.update_config(
- &mut config,
- ServiceRoles::FULL,
- cli_args.shared_params.dev,
- )?;
-
- config.use_in_memory_keystore()?;
-
- match ChainSpec::from(config.expect_chain_spec().id()) {
- Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {},
- _ => return Err(
- "Factory is only supported for development and local testnet.".into()
- ),
- }
+ let runner = cli.create_runner(cmd)?;
- // Setup tracing.
- if let Some(tracing_targets) = cli_args.import_params.tracing_targets.as_ref() {
- let subscriber = sc_tracing::ProfilingSubscriber::new(
- cli_args.import_params.tracing_receiver.into(), tracing_targets
- );
- if let Err(e) = tracing::subscriber::set_global_default(subscriber) {
- return Err(
- format!("Unable to set global default subscriber {}", e).into()
- );
- }
- }
+ runner.sync_run(|config| cmd.run::(config))
+ }
+ Some(Subcommand::Factory(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
- let factory_state = FactoryState::new(
- cli_args.blocks,
- cli_args.transactions,
- );
+ runner.sync_run(|config| cmd.run(config))
+ }
+ Some(Subcommand::Base(subcommand)) => {
+ let runner = cli.create_runner(subcommand)?;
+
+ runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0))
+ }
+ }
+}
- let service_builder = new_full_start!(config).0;
- node_transaction_factory::factory(
- factory_state,
- service_builder.client(),
- service_builder.select_chain()
- .expect("The select_chain is always initialized by new_full_start!; QED")
- ).map_err(|e| format!("Error in transaction factory: {}", e))?;
+impl CliConfiguration for FactoryCmd {
+ fn shared_params(&self) -> &SharedParams {
+ &self.shared_params
+ }
- Ok(())
- },
- Some(Subcommand::Base(subcommand)) => {
- subcommand.init(&version)?;
- subcommand.update_config(&mut config, load_spec, &version)?;
- subcommand.run(
- config,
- |config: sc_service::Configuration| Ok(new_full_start!(config).0),
- )
- },
+ fn import_params(&self) -> Option<&ImportParams> {
+ Some(&self.import_params)
+ }
+}
+
+impl FactoryCmd {
+ fn run(&self, config: Configuration) -> Result<()> {
+ match config.chain_spec.id() {
+ "dev" | "local" => {}
+ _ => return Err("Factory is only supported for development and local testnet.".into()),
+ }
+
+ // Setup tracing.
+ if let Some(tracing_targets) = self.import_params.tracing_targets.as_ref() {
+ let subscriber = sc_tracing::ProfilingSubscriber::new(
+ self.import_params.tracing_receiver.into(),
+ tracing_targets,
+ );
+ if let Err(e) = tracing::subscriber::set_global_default(subscriber) {
+ return Err(format!("Unable to set global default subscriber {}", e).into());
+ }
+ }
+
+ let factory_state = FactoryState::new(self.blocks, self.transactions);
+
+ let service_builder = new_full_start!(config).0;
+ node_transaction_factory::factory(
+ factory_state,
+ service_builder.client(),
+ service_builder
+ .select_chain()
+ .expect("The select_chain is always initialized by new_full_start!; qed"),
+ )
}
}
diff --git a/bin/node/cli/src/factory_impl.rs b/bin/node/cli/src/factory_impl.rs
index 1d1eabe29cbfb12ca43663be00b0969e852a30d9..cd7e3022e0b9a66e510707245118dbc123edee0d 100644
--- a/bin/node/cli/src/factory_impl.rs
+++ b/bin/node/cli/src/factory_impl.rs
@@ -58,6 +58,7 @@ impl FactoryState {
frame_system::CheckWeight::new(),
pallet_transaction_payment::ChargeTransactionPayment::from(0),
Default::default(),
+ Default::default(),
)
}
}
@@ -122,7 +123,7 @@ impl RuntimeAdapter for FactoryState {
(*amount).into()
)
)
- }, key, (version, genesis_hash.clone(), prior_block_hash.clone(), (), (), (), ()))
+ }, key, (version, genesis_hash.clone(), prior_block_hash.clone(), (), (), (), (), ()))
}
fn inherent_extrinsics(&self) -> InherentData {
diff --git a/bin/node/cli/src/lib.rs b/bin/node/cli/src/lib.rs
index 6b3644856c6b027172ad62b132c65fcb92d05146..1e2c790bfa7d21a8857ba1bf2f90a3a419701585 100644
--- a/bin/node/cli/src/lib.rs
+++ b/bin/node/cli/src/lib.rs
@@ -47,45 +47,3 @@ pub use browser::*;
pub use cli::*;
#[cfg(feature = "cli")]
pub use command::*;
-
-/// The chain specification option.
-#[derive(Clone, Debug, PartialEq)]
-pub enum ChainSpec {
- /// Whatever the current runtime is, with just Alice as an auth.
- Development,
- /// Whatever the current runtime is, with simple Alice/Bob auths.
- LocalTestnet,
- /// The Flaming Fir testnet.
- FlamingFir,
- /// Whatever the current runtime is with the "global testnet" defaults.
- StagingTestnet,
-}
-
-/// Get a chain config from a spec setting.
-impl ChainSpec {
- pub(crate) fn load(self) -> Result {
- Ok(match self {
- ChainSpec::FlamingFir => chain_spec::flaming_fir_config()?,
- ChainSpec::Development => chain_spec::development_config(),
- ChainSpec::LocalTestnet => chain_spec::local_testnet_config(),
- ChainSpec::StagingTestnet => chain_spec::staging_testnet_config(),
- })
- }
-
- pub(crate) fn from(s: &str) -> Option {
- match s {
- "dev" => Some(ChainSpec::Development),
- "local" => Some(ChainSpec::LocalTestnet),
- "" | "fir" | "flaming-fir" => Some(ChainSpec::FlamingFir),
- "staging" => Some(ChainSpec::StagingTestnet),
- _ => None,
- }
- }
-}
-
-fn load_spec(id: &str) -> Result, String> {
- Ok(match ChainSpec::from(id) {
- Some(spec) => Box::new(spec.load()?),
- None => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(id))?),
- })
-}
diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs
index d81ec5f031ff45e3c6cec049e5adc622443fabfd..92d62364a27f9d7515012c1433a382ae4eb9f03d 100644
--- a/bin/node/cli/src/service.rs
+++ b/bin/node/cli/src/service.rs
@@ -88,7 +88,7 @@ macro_rules! new_full_start {
import_setup = Some((block_import, grandpa_link, babe_link));
Ok(import_queue)
})?
- .with_rpc_extensions(|builder| -> Result {
+ .with_rpc_extensions(|builder| -> std::result::Result {
let babe_link = import_setup.as_ref().map(|s| &s.2)
.expect("BabeLink is present for full services or set up failed; qed.");
let deps = node_rpc::FullDeps {
@@ -120,24 +120,17 @@ macro_rules! new_full {
use sc_client_api::ExecutorProvider;
let (
- is_authority,
+ role,
force_authoring,
name,
disable_grandpa,
- sentry_nodes,
) = (
- $config.roles.is_authority(),
+ $config.role.clone(),
$config.force_authoring,
- $config.name.clone(),
+ $config.network.node_name.clone(),
$config.disable_grandpa,
- $config.network.sentry_nodes.clone(),
);
- // sentry nodes announce themselves as authorities to the network
- // and should run the same protocols authorities do, but it should
- // never actively participate in any consensus process.
- let participates_in_consensus = is_authority && !$config.sentry_mode;
-
let (builder, mut import_setup, inherent_data_providers) = new_full_start!($config);
let service = builder
@@ -153,7 +146,7 @@ macro_rules! new_full {
($with_startup_data)(&block_import, &babe_link);
- if participates_in_consensus {
+ if let sc_service::config::Role::Authority { sentry_nodes } = &role {
let proposer = sc_basic_authorship::ProposerFactory::new(
service.client(),
service.transaction_pool()
@@ -190,7 +183,7 @@ macro_rules! new_full {
let authority_discovery = sc_authority_discovery::AuthorityDiscovery::new(
service.client(),
network,
- sentry_nodes,
+ sentry_nodes.clone(),
service.keystore(),
dht_event_stream,
service.prometheus_registry(),
@@ -201,7 +194,7 @@ macro_rules! new_full {
// if the node isn't actively participating in consensus then it doesn't
// need a keystore, regardless of which protocol we use below.
- let keystore = if participates_in_consensus {
+ let keystore = if role.is_authority() {
Some(service.keystore())
} else {
None
@@ -214,7 +207,7 @@ macro_rules! new_full {
name: Some(name),
observer_enabled: false,
keystore,
- is_authority,
+ is_authority: role.is_network_authority(),
};
let enable_grandpa = !disable_grandpa;
@@ -624,11 +617,12 @@ mod tests {
check_weight,
payment,
Default::default(),
+ Default::default(),
);
let raw_payload = SignedPayload::from_raw(
function,
extra,
- (version, genesis_hash, genesis_hash, (), (), (), ())
+ (version, genesis_hash, genesis_hash, (), (), (), (), ())
);
let signature = raw_payload.using_encoded(|payload| {
signer.sign(payload)
diff --git a/bin/node/cli/tests/version.rs b/bin/node/cli/tests/version.rs
new file mode 100644
index 0000000000000000000000000000000000000000..5555efd3854d4e08ecae60dd0c57ecf05b22e040
--- /dev/null
+++ b/bin/node/cli/tests/version.rs
@@ -0,0 +1,83 @@
+// Copyright 2020 Parity Technologies (UK) Ltd.
+// This file is part of Substrate.
+
+// Substrate is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Substrate is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Substrate. If not, see .
+
+use assert_cmd::cargo::cargo_bin;
+use platforms::*;
+use regex::Regex;
+use std::process::Command;
+
+fn expected_regex() -> Regex {
+ Regex::new(r"^substrate (\d+\.\d+\.\d+(?:-.+?)?)-([a-f\d]+)-(.+?)-(.+?)(?:-(.+))?$").unwrap()
+}
+
+#[test]
+fn version_is_full() {
+ let expected = expected_regex();
+ let output = Command::new(cargo_bin("substrate"))
+ .args(&["--version"])
+ .output()
+ .unwrap();
+
+ assert!(
+ output.status.success(),
+ "command returned with non-success exit code"
+ );
+
+ let output = String::from_utf8_lossy(&output.stdout).trim().to_owned();
+ let captures = expected
+ .captures(output.as_str())
+ .expect("could not parse version in output");
+
+ assert_eq!(&captures[1], env!("CARGO_PKG_VERSION"));
+ assert_eq!(&captures[3], TARGET_ARCH.as_str());
+ assert_eq!(&captures[4], TARGET_OS.as_str());
+ assert_eq!(
+ captures.get(5).map(|x| x.as_str()),
+ TARGET_ENV.map(|x| x.as_str())
+ );
+}
+
+#[test]
+fn test_regex_matches_properly() {
+ let expected = expected_regex();
+
+ let captures = expected
+ .captures("substrate 2.0.0-da487d19d-x86_64-linux-gnu")
+ .unwrap();
+ assert_eq!(&captures[1], "2.0.0");
+ assert_eq!(&captures[2], "da487d19d");
+ assert_eq!(&captures[3], "x86_64");
+ assert_eq!(&captures[4], "linux");
+ assert_eq!(captures.get(5).map(|x| x.as_str()), Some("gnu"));
+
+ let captures = expected
+ .captures("substrate 2.0.0-alpha.5-da487d19d-x86_64-linux-gnu")
+ .unwrap();
+ assert_eq!(&captures[1], "2.0.0-alpha.5");
+ assert_eq!(&captures[2], "da487d19d");
+ assert_eq!(&captures[3], "x86_64");
+ assert_eq!(&captures[4], "linux");
+ assert_eq!(captures.get(5).map(|x| x.as_str()), Some("gnu"));
+
+ let captures = expected
+ .captures("substrate 2.0.0-alpha.5-da487d19d-x86_64-linux")
+ .unwrap();
+ assert_eq!(&captures[1], "2.0.0-alpha.5");
+ assert_eq!(&captures[2], "da487d19d");
+ assert_eq!(&captures[3], "x86_64");
+ assert_eq!(&captures[4], "linux");
+ assert_eq!(captures.get(5).map(|x| x.as_str()), None);
+}
diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml
index 02c6a141e9e4beaef558f7dde8ae32bf939886e6..2f1060a99884505ba94f1692f493bf8cdb01f43a 100644
--- a/bin/node/executor/Cargo.toml
+++ b/bin/node/executor/Cargo.toml
@@ -9,7 +9,7 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.2.0" }
+codec = { package = "parity-scale-codec", version = "1.3.0" }
node-primitives = { version = "2.0.0-alpha.5", path = "../primitives" }
node-runtime = { version = "2.0.0-alpha.5", path = "../runtime" }
sc-executor = { version = "0.8.0-alpha.5", path = "../../../client/executor" }
@@ -52,3 +52,6 @@ stress-test = []
[[bench]]
name = "bench"
harness = false
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs
index 1ee0a17c81120ca32a7a9af2d704ce97699ee454..fccf4a62cc21dbe81f3fa72f6ab2fde8ae6fceda 100644
--- a/bin/node/executor/tests/basic.rs
+++ b/bin/node/executor/tests/basic.rs
@@ -338,7 +338,7 @@ fn full_native_block_import_works() {
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: Event::frame_system(frame_system::RawEvent::ExtrinsicSuccess(
- DispatchInfo { weight: 10000, class: DispatchClass::Operational, pays_fee: true }
+ DispatchInfo { weight: 10000, class: DispatchClass::Mandatory, pays_fee: true }
)),
topics: vec![],
},
@@ -391,7 +391,7 @@ fn full_native_block_import_works() {
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: Event::frame_system(frame_system::RawEvent::ExtrinsicSuccess(
- DispatchInfo { weight: 10000, class: DispatchClass::Operational, pays_fee: true }
+ DispatchInfo { weight: 10000, class: DispatchClass::Mandatory, pays_fee: true }
)),
topics: vec![],
},
diff --git a/bin/node/executor/tests/submit_transaction.rs b/bin/node/executor/tests/submit_transaction.rs
index 1a92aeca6ba77b61597f3f0d19317f67adca2b03..536cf486e38ae28e0df13fadd65ac9b5c20e99a0 100644
--- a/bin/node/executor/tests/submit_transaction.rs
+++ b/bin/node/executor/tests/submit_transaction.rs
@@ -15,7 +15,7 @@
// along with Substrate. If not, see .
use node_runtime::{
- Call, Executive, Indices, Runtime, SubmitTransaction, UncheckedExtrinsic,
+ Call, Executive, Indices, Runtime, TransactionSubmitterOf, UncheckedExtrinsic,
};
use sp_application_crypto::AppKey;
use sp_core::testing::KeyStore;
@@ -31,6 +31,8 @@ use codec::Decode;
pub mod common;
use self::common::*;
+type SubmitTransaction = TransactionSubmitterOf;
+
#[test]
fn should_submit_unsigned_transaction() {
let mut t = new_test_ext(COMPACT_CODE, false);
@@ -138,7 +140,7 @@ fn should_submit_signed_twice_from_the_same_account() {
fn submitted_transaction_should_be_valid() {
use codec::Encode;
use frame_support::storage::StorageMap;
- use sp_runtime::transaction_validity::ValidTransaction;
+ use sp_runtime::transaction_validity::{ValidTransaction, TransactionSource};
use sp_runtime::traits::StaticLookup;
let mut t = new_test_ext(COMPACT_CODE, false);
@@ -163,6 +165,7 @@ fn submitted_transaction_should_be_valid() {
let tx0 = state.read().transactions[0].clone();
let mut t = new_test_ext(COMPACT_CODE, false);
t.execute_with(|| {
+ let source = TransactionSource::External;
let extrinsic = UncheckedExtrinsic::decode(&mut &*tx0).unwrap();
// add balance to the account
let author = extrinsic.signature.clone().unwrap().0;
@@ -172,15 +175,14 @@ fn submitted_transaction_should_be_valid() {
>::insert(&address, account);
// check validity
- let res = Executive::validate_transaction(extrinsic);
+ let res = Executive::validate_transaction(source, extrinsic);
assert_eq!(res.unwrap(), ValidTransaction {
priority: 2_411_002_000_000,
requires: vec![],
provides: vec![(address, 0).encode()],
- longevity: 127,
+ longevity: 128,
propagate: true,
});
});
}
-
diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml
index 36ba0c7205be5d558096566af6c95a81b6e2dd32..9e94fe74d68469d9570fe76292d004e9106ef049 100644
--- a/bin/node/inspect/Cargo.toml
+++ b/bin/node/inspect/Cargo.toml
@@ -8,7 +8,7 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.2.0" }
+codec = { package = "parity-scale-codec", version = "1.3.0" }
derive_more = "0.99"
log = "0.4.8"
sc-cli = { version = "0.8.0-alpha.5", path = "../../../client/cli" }
@@ -18,3 +18,6 @@ sp-blockchain = { version = "2.0.0-alpha.5", path = "../../../primitives/blockch
sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
structopt = "0.3.8"
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/inspect/src/command.rs b/bin/node/inspect/src/command.rs
index 16bfda2bd927a8890d3416cfe8b75e96d216b117..2212907f763138feef1607b2236bdbbf7e0867a3 100644
--- a/bin/node/inspect/src/command.rs
+++ b/bin/node/inspect/src/command.rs
@@ -16,186 +16,48 @@
//! Command ran by the CLI
-use std::{
- fmt::Debug,
- str::FromStr,
-};
-
use crate::cli::{InspectCmd, InspectSubCmd};
-use crate::{Inspector, PrettyPrinter};
+use crate::Inspector;
+use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams};
+use sc_service::{new_full_client, Configuration, NativeExecutionDispatch};
+use sp_runtime::traits::Block;
+use std::str::FromStr;
impl InspectCmd {
- /// Initialize
- pub fn init(&self, version: &sc_cli::VersionInfo) -> sc_cli::Result<()> {
- self.shared_params.init(version)
- }
-
- /// Parse CLI arguments and initialize given config.
- pub fn update_config(
- &self,
- mut config: &mut sc_service::config::Configuration,
- spec_factory: impl FnOnce(&str) -> Result, String>,
- version: &sc_cli::VersionInfo,
- ) -> sc_cli::Result<()> {
- self.shared_params.update_config(config, spec_factory, version)?;
-
- // make sure to configure keystore
- config.use_in_memory_keystore()?;
-
- // and all import params (especially pruning that has to match db meta)
- self.import_params.update_config(
- &mut config,
- sc_service::Roles::FULL,
- self.shared_params.dev,
- )?;
-
- Ok(())
- }
-
/// Run the inspect command, passing the inspector.
- pub fn run(
- self,
- inspect: Inspector,
- ) -> sc_cli::Result<()> where
- B: sp_runtime::traits::Block,
+ pub fn run(&self, config: Configuration) -> Result<()>
+ where
+ B: Block,
B::Hash: FromStr,
- P: PrettyPrinter,
+ RA: Send + Sync + 'static,
+ EX: NativeExecutionDispatch + 'static,
{
- match self.command {
+ let client = new_full_client::(&config)?;
+ let inspect = Inspector::::new(client);
+
+ match &self.command {
InspectSubCmd::Block { input } => {
let input = input.parse()?;
- let res = inspect.block(input)
- .map_err(|e| format!("{}", e))?;
+ let res = inspect.block(input).map_err(|e| format!("{}", e))?;
println!("{}", res);
Ok(())
- },
+ }
InspectSubCmd::Extrinsic { input } => {
let input = input.parse()?;
- let res = inspect.extrinsic(input)
- .map_err(|e| format!("{}", e))?;
+ let res = inspect.extrinsic(input).map_err(|e| format!("{}", e))?;
println!("{}", res);
Ok(())
- },
- }
- }
-}
-
-/// A block to retrieve.
-#[derive(Debug, Clone, PartialEq)]
-pub enum BlockAddress {
- /// Get block by hash.
- Hash(Hash),
- /// Get block by number.
- Number(Number),
- /// Raw SCALE-encoded bytes.
- Bytes(Vec),
-}
-
-impl FromStr for BlockAddress {
- type Err = String;
-
- fn from_str(s: &str) -> Result {
- // try to parse hash first
- if let Ok(hash) = s.parse() {
- return Ok(Self::Hash(hash))
- }
-
- // then number
- if let Ok(number) = s.parse() {
- return Ok(Self::Number(number))
+ }
}
-
- // then assume it's bytes (hex-encoded)
- sp_core::bytes::from_hex(s)
- .map(Self::Bytes)
- .map_err(|e| format!(
- "Given string does not look like hash or number. It could not be parsed as bytes either: {}",
- e
- ))
- }
-}
-
-/// An extrinsic address to decode and print out.
-#[derive(Debug, Clone, PartialEq)]
-pub enum ExtrinsicAddress {
- /// Extrinsic as part of existing block.
- Block(BlockAddress, usize),
- /// Raw SCALE-encoded extrinsic bytes.
- Bytes(Vec),
-}
-
-impl FromStr for ExtrinsicAddress {
- type Err = String;
-
- fn from_str(s: &str) -> Result {
- // first try raw bytes
- if let Ok(bytes) = sp_core::bytes::from_hex(s).map(Self::Bytes) {
- return Ok(bytes)
- }
-
- // split by a bunch of different characters
- let mut it = s.split(|c| c == '.' || c == ':' || c == ' ');
- let block = it.next()
- .expect("First element of split iterator is never empty; qed")
- .parse()?;
-
- let index = it.next()
- .ok_or_else(|| format!("Extrinsic index missing: example \"5:0\""))?
- .parse()
- .map_err(|e| format!("Invalid index format: {}", e))?;
-
- Ok(Self::Block(block, index))
}
}
-#[cfg(test)]
-mod tests {
- use super::*;
- use sp_core::hash::H160 as Hash;
-
- #[test]
- fn should_parse_block_strings() {
- type BlockAddress = super::BlockAddress;
-
- let b0 = BlockAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258");
- let b1 = BlockAddress::from_str("1234");
- let b2 = BlockAddress::from_str("0");
- let b3 = BlockAddress::from_str("0x0012345f");
-
-
- assert_eq!(b0, Ok(BlockAddress::Hash(
- "3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()
- )));
- assert_eq!(b1, Ok(BlockAddress::Number(1234)));
- assert_eq!(b2, Ok(BlockAddress::Number(0)));
- assert_eq!(b3, Ok(BlockAddress::Bytes(vec![0, 0x12, 0x34, 0x5f])));
+impl CliConfiguration for InspectCmd {
+ fn shared_params(&self) -> &SharedParams {
+ &self.shared_params
}
- #[test]
- fn should_parse_extrinsic_address() {
- type BlockAddress = super::BlockAddress;
- type ExtrinsicAddress = super::ExtrinsicAddress;
-
- let e0 = ExtrinsicAddress::from_str("1234");
- let b0 = ExtrinsicAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258:5");
- let b1 = ExtrinsicAddress::from_str("1234:0");
- let b2 = ExtrinsicAddress::from_str("0 0");
- let b3 = ExtrinsicAddress::from_str("0x0012345f");
-
-
- assert_eq!(e0, Err("Extrinsic index missing: example \"5:0\"".into()));
- assert_eq!(b0, Ok(ExtrinsicAddress::Block(
- BlockAddress::Hash("3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()),
- 5
- )));
- assert_eq!(b1, Ok(ExtrinsicAddress::Block(
- BlockAddress::Number(1234),
- 0
- )));
- assert_eq!(b2, Ok(ExtrinsicAddress::Block(
- BlockAddress::Number(0),
- 0
- )));
- assert_eq!(b3, Ok(ExtrinsicAddress::Bytes(vec![0, 0x12, 0x34, 0x5f])));
+ fn import_params(&self) -> Option<&ImportParams> {
+ Some(&self.import_params)
}
}
diff --git a/bin/node/inspect/src/lib.rs b/bin/node/inspect/src/lib.rs
index c82682d6021dbbac42f51c0367343d1dec8dcb65..b8101d98a31ce717b4a57f9ee939abe2444253a9 100644
--- a/bin/node/inspect/src/lib.rs
+++ b/bin/node/inspect/src/lib.rs
@@ -27,7 +27,9 @@ pub mod command;
use std::{
fmt,
- marker::PhantomData
+ fmt::Debug,
+ marker::PhantomData,
+ str::FromStr,
};
use codec::{Encode, Decode};
use sc_client_api::BlockBackend;
@@ -38,8 +40,6 @@ use sp_runtime::{
traits::{Block, HashFor, NumberFor, Hash}
};
-use command::{BlockAddress, ExtrinsicAddress};
-
/// A helper type for a generic block input.
pub type BlockAddressFor = BlockAddress<
as Hash>::Output,
@@ -205,3 +205,123 @@ impl> Inspector
Ok(format!("{}", ExtrinsicPrinter(ext, &self.printer)))
}
}
+
+/// A block to retrieve.
+#[derive(Debug, Clone, PartialEq)]
+pub enum BlockAddress {
+ /// Get block by hash.
+ Hash(Hash),
+ /// Get block by number.
+ Number(Number),
+ /// Raw SCALE-encoded bytes.
+ Bytes(Vec),
+}
+
+impl FromStr for BlockAddress {
+ type Err = String;
+
+ fn from_str(s: &str) -> Result {
+ // try to parse hash first
+ if let Ok(hash) = s.parse() {
+ return Ok(Self::Hash(hash))
+ }
+
+ // then number
+ if let Ok(number) = s.parse() {
+ return Ok(Self::Number(number))
+ }
+
+ // then assume it's bytes (hex-encoded)
+ sp_core::bytes::from_hex(s)
+ .map(Self::Bytes)
+ .map_err(|e| format!(
+ "Given string does not look like hash or number. It could not be parsed as bytes either: {}",
+ e
+ ))
+ }
+}
+
+/// An extrinsic address to decode and print out.
+#[derive(Debug, Clone, PartialEq)]
+pub enum ExtrinsicAddress {
+ /// Extrinsic as part of existing block.
+ Block(BlockAddress, usize),
+ /// Raw SCALE-encoded extrinsic bytes.
+ Bytes(Vec),
+}
+
+impl FromStr for ExtrinsicAddress {
+ type Err = String;
+
+ fn from_str(s: &str) -> Result {
+ // first try raw bytes
+ if let Ok(bytes) = sp_core::bytes::from_hex(s).map(Self::Bytes) {
+ return Ok(bytes)
+ }
+
+ // split by a bunch of different characters
+ let mut it = s.split(|c| c == '.' || c == ':' || c == ' ');
+ let block = it.next()
+ .expect("First element of split iterator is never empty; qed")
+ .parse()?;
+
+ let index = it.next()
+ .ok_or_else(|| format!("Extrinsic index missing: example \"5:0\""))?
+ .parse()
+ .map_err(|e| format!("Invalid index format: {}", e))?;
+
+ Ok(Self::Block(block, index))
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use sp_core::hash::H160 as Hash;
+
+ #[test]
+ fn should_parse_block_strings() {
+ type BlockAddress = super::BlockAddress;
+
+ let b0 = BlockAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258");
+ let b1 = BlockAddress::from_str("1234");
+ let b2 = BlockAddress::from_str("0");
+ let b3 = BlockAddress::from_str("0x0012345f");
+
+
+ assert_eq!(b0, Ok(BlockAddress::Hash(
+ "3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()
+ )));
+ assert_eq!(b1, Ok(BlockAddress::Number(1234)));
+ assert_eq!(b2, Ok(BlockAddress::Number(0)));
+ assert_eq!(b3, Ok(BlockAddress::Bytes(vec![0, 0x12, 0x34, 0x5f])));
+ }
+
+ #[test]
+ fn should_parse_extrinsic_address() {
+ type BlockAddress = super::BlockAddress;
+ type ExtrinsicAddress = super::ExtrinsicAddress;
+
+ let e0 = ExtrinsicAddress::from_str("1234");
+ let b0 = ExtrinsicAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258:5");
+ let b1 = ExtrinsicAddress::from_str("1234:0");
+ let b2 = ExtrinsicAddress::from_str("0 0");
+ let b3 = ExtrinsicAddress::from_str("0x0012345f");
+
+
+ assert_eq!(e0, Err("Extrinsic index missing: example \"5:0\"".into()));
+ assert_eq!(b0, Ok(ExtrinsicAddress::Block(
+ BlockAddress::Hash("3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()),
+ 5
+ )));
+ assert_eq!(b1, Ok(ExtrinsicAddress::Block(
+ BlockAddress::Number(1234),
+ 0
+ )));
+ assert_eq!(b2, Ok(ExtrinsicAddress::Block(
+ BlockAddress::Number(0),
+ 0
+ )));
+ assert_eq!(b3, Ok(ExtrinsicAddress::Bytes(vec![0, 0x12, 0x34, 0x5f])));
+ }
+}
diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml
index d4d6d990923a495cec8bc0830f6944d9877af4dd..81c5009f394d57332d5c9ef65ed8c6bb2cb6f120 100644
--- a/bin/node/primitives/Cargo.toml
+++ b/bin/node/primitives/Cargo.toml
@@ -21,3 +21,6 @@ std = [
"sp-core/std",
"sp-runtime/std",
]
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml
index ec6839b71c1147d23a07483fa3e3bc0df7c27d8b..df095bc5bb10d2574a01790f3ed32ea9c8585ebe 100644
--- a/bin/node/rpc-client/Cargo.toml
+++ b/bin/node/rpc-client/Cargo.toml
@@ -11,7 +11,10 @@ repository = "https://github.com/paritytech/substrate/"
env_logger = "0.7.0"
futures = "0.1.29"
hyper = "0.12.35"
-jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] }
+jsonrpc-core-client = { version = "14.0.5", default-features = false, features = ["http"] }
log = "0.4.8"
node-primitives = { version = "2.0.0-alpha.5", path = "../primitives" }
sc-rpc = { version = "2.0.0-alpha.5", path = "../../../client/rpc" }
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml
index ada97e566750c5fdc713b2268b69127cab165031..f1d230af90dc5e9e65da0ba4284355fa5292435a 100644
--- a/bin/node/rpc/Cargo.toml
+++ b/bin/node/rpc/Cargo.toml
@@ -25,3 +25,6 @@ sc-keystore = { version = "2.0.0-alpha.5", path = "../../../client/keystore" }
sc-consensus-epochs = { version = "0.8.0-alpha.5", path = "../../../client/consensus/epochs" }
sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" }
sp-blockchain = { version = "2.0.0-alpha.5", path = "../../../primitives/blockchain" }
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml
index 6346f3d8481c0cdd138f7984ac32558887a0fd21..b8e5f706291459f72e3587179054ec8a9e635c72 100644
--- a/bin/node/runtime/Cargo.toml
+++ b/bin/node/runtime/Cargo.toml
@@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/"
[dependencies]
# third-party dependencies
-codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
integer-sqrt = { version = "0.1.2" }
serde = { version = "1.0.102", optional = true }
@@ -55,14 +55,16 @@ pallet-indices = { version = "2.0.0-alpha.5", default-features = false, path = "
pallet-identity = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/identity" }
pallet-membership = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/membership" }
pallet-offences = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/offences" }
+pallet-offences-benchmarking = { version = "2.0.0-alpha.5", path = "../../../frame/offences/benchmarking", default-features = false, optional = true }
pallet-randomness-collective-flip = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/randomness-collective-flip" }
pallet-recovery = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/recovery" }
pallet-session = { version = "2.0.0-alpha.5", features = ["historical"], path = "../../../frame/session", default-features = false }
pallet-session-benchmarking = { version = "2.0.0-alpha.5", path = "../../../frame/session/benchmarking", default-features = false, optional = true }
pallet-staking = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/staking" }
pallet-staking-reward-curve = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/staking/reward-curve" }
-pallet-sudo = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/sudo" }
+pallet-scheduler = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/scheduler" }
pallet-society = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/society" }
+pallet-sudo = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/sudo" }
pallet-timestamp = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/timestamp" }
pallet-treasury = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/treasury" }
pallet-utility = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/utility" }
@@ -134,15 +136,24 @@ std = [
runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
+ "frame-system/runtime-benchmarks",
+ "sp-runtime/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
+ "pallet-collective/runtime-benchmarks",
+ "pallet-democracy/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
+ "pallet-im-online/runtime-benchmarks",
+ "pallet-society/runtime-benchmarks",
+ "pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
- "pallet-session-benchmarking",
- "pallet-staking/runtime-benchmarks",
+ "pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
+ "pallet-collective/runtime-benchmarks",
+ "pallet-offences-benchmarking",
"pallet-session-benchmarking",
- "pallet-staking/runtime-benchmarks",
- "pallet-im-online/runtime-benchmarks",
]
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs
index 7347db2124afbfc36d3e025f44c44292001adc86..3752ca4d8e534f57a9689db0de29278aeab9d6ed 100644
--- a/bin/node/runtime/src/lib.rs
+++ b/bin/node/runtime/src/lib.rs
@@ -35,7 +35,7 @@ use sp_runtime::{
impl_opaque_keys, generic, create_runtime_str,
};
use sp_runtime::curve::PiecewiseLinear;
-use sp_runtime::transaction_validity::TransactionValidity;
+use sp_runtime::transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority};
use sp_runtime::traits::{
self, BlakeTwo256, Block as BlockT, StaticLookup, SaturatedConversion,
ConvertInto, OpaqueKeys,
@@ -59,7 +59,7 @@ pub use pallet_timestamp::Call as TimestampCall;
pub use pallet_balances::Call as BalancesCall;
pub use pallet_contracts::Gas;
pub use frame_support::StorageValue;
-pub use pallet_staking::StakerStatus;
+pub use pallet_staking::{StakerStatus, LockStakingStatus};
/// Implementations of some helper traits passed into runtime modules as associated types.
pub mod impls;
@@ -73,6 +73,52 @@ use constants::{time::*, currency::*};
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
+/// A transaction submitter with the given key type.
+pub type TransactionSubmitterOf = TransactionSubmitter;
+
+/// Submits transaction with the node's public and signature type. Adheres to the signed extension
+/// format of the chain.
+impl frame_system::offchain::CreateTransaction for Runtime {
+ type Public = ::Signer;
+ type Signature = Signature;
+
+ fn create_transaction>(
+ call: Call,
+ public: Self::Public,
+ account: AccountId,
+ index: Index,
+ ) -> Option<(Call, ::SignaturePayload)> {
+ // take the biggest period possible.
+ let period = BlockHashCount::get()
+ .checked_next_power_of_two()
+ .map(|c| c / 2)
+ .unwrap_or(2) as u64;
+ let current_block = System::block_number()
+ .saturated_into::()
+ // The `System::block_number` is initialized with `n+1`,
+ // so the actual block number is `n`.
+ .saturating_sub(1);
+ let tip = 0;
+ let extra: SignedExtra = (
+ frame_system::CheckVersion::::new(),
+ frame_system::CheckGenesis::::new(),
+ frame_system::CheckEra::::from(generic::Era::mortal(period, current_block)),
+ frame_system::CheckNonce::::from(index),
+ frame_system::CheckWeight::::new(),
+ pallet_transaction_payment::ChargeTransactionPayment::::from(tip),
+ Default::default(),
+ Default::default(),
+ );
+ let raw_payload = SignedPayload::new(call, extra).map_err(|e| {
+ debug::warn!("Unable to create signed payload: {:?}", e);
+ }).ok()?;
+ let signature = TSigner::sign(public, &raw_payload)?;
+ let address = Indices::unlookup(account);
+ let (call, extra, _) = raw_payload.deconstruct();
+ Some((call, (address, signature, extra)))
+ }
+}
+
/// Runtime version.
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("node"),
@@ -161,6 +207,17 @@ impl pallet_utility::Trait for Runtime {
type MaxSignatories = MaxSignatories;
}
+parameter_types! {
+ pub const MaximumWeight: Weight = 2_000_000;
+}
+
+impl pallet_scheduler::Trait for Runtime {
+ type Event = Event;
+ type Origin = Origin;
+ type Call = Call;
+ type MaximumWeight = MaximumWeight;
+}
+
parameter_types! {
pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS;
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
@@ -216,6 +273,7 @@ impl pallet_transaction_payment::Trait for Runtime {
parameter_types! {
pub const MinimumPeriod: Moment = SLOT_DURATION / 2;
}
+
impl pallet_timestamp::Trait for Runtime {
type Moment = Moment;
type OnTimestampSet = Babe;
@@ -255,6 +313,7 @@ impl pallet_session::Trait for Runtime {
type SessionHandler = ::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
+ type NextSessionRotation = Babe;
}
impl pallet_session::historical::Trait for Runtime {
@@ -278,12 +337,13 @@ parameter_types! {
pub const BondingDuration: pallet_staking::EraIndex = 24 * 28;
pub const SlashDeferDuration: pallet_staking::EraIndex = 24 * 7; // 1/4 the bonding duration.
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
+ pub const ElectionLookahead: BlockNumber = 25; // 10 minutes per session => 100 block.
pub const MaxNominatorRewardedPerValidator: u32 = 64;
}
impl pallet_staking::Trait for Runtime {
type Currency = Balances;
- type Time = Timestamp;
+ type UnixTime = Timestamp;
type CurrencyToVote = CurrencyToVoteHandler;
type RewardRemainder = Treasury;
type Event = Event;
@@ -296,7 +356,12 @@ impl pallet_staking::Trait for Runtime {
type SlashCancelOrigin = pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>;
type SessionInterface = Self;
type RewardCurve = RewardCurve;
+ type NextNewSession = Session;
+ type ElectionLookahead = ElectionLookahead;
+ type Call = Call;
+ type SubmitTransaction = TransactionSubmitterOf<()>;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
+ type UnsignedPriority = StakingUnsignedPriority;
}
parameter_types! {
@@ -340,6 +405,7 @@ impl pallet_democracy::Trait for Runtime {
type CooloffPeriod = CooloffPeriod;
type PreimageByteDeposit = PreimageByteDeposit;
type Slash = Treasury;
+ type Scheduler = Scheduler;
}
parameter_types! {
@@ -366,6 +432,9 @@ impl pallet_elections_phragmen::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type ChangeMembers = Council;
+ // NOTE: this implies that council's genesis members cannot be set directly and must come from
+ // this module.
+ type InitializeMembers = Council;
type CurrencyToVote = CurrencyToVoteHandler;
type CandidacyBond = CandidacyBond;
type VotingBond = VotingBond;
@@ -470,20 +539,21 @@ impl pallet_sudo::Trait for Runtime {
type Call = Call;
}
-/// A runtime transaction submitter.
-pub type SubmitTransaction = TransactionSubmitter;
-
parameter_types! {
pub const SessionDuration: BlockNumber = EPOCH_DURATION_IN_SLOTS as _;
+ pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value();
+ /// We prioritize im-online heartbeats over phragmen solution submission.
+ pub const StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2;
}
impl pallet_im_online::Trait for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type Call = Call;
- type SubmitTransaction = SubmitTransaction;
+ type SubmitTransaction = TransactionSubmitterOf;
type SessionDuration = SessionDuration;
type ReportUnresponsiveness = Offences;
+ type UnsignedPriority = ImOnlineUnsignedPriority;
}
impl pallet_offences::Trait for Runtime {
@@ -530,46 +600,6 @@ impl pallet_identity::Trait for Runtime {
type RegistrarOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
}
-impl frame_system::offchain::CreateTransaction for Runtime {
- type Public = ::Signer;
- type Signature = Signature;
-
- fn create_transaction>(
- call: Call,
- public: Self::Public,
- account: AccountId,
- index: Index,
- ) -> Option<(Call, ::SignaturePayload)> {
- // take the biggest period possible.
- let period = BlockHashCount::get()
- .checked_next_power_of_two()
- .map(|c| c / 2)
- .unwrap_or(2) as u64;
- let current_block = System::block_number()
- .saturated_into::()
- // The `System::block_number` is initialized with `n+1`,
- // so the actual block number is `n`.
- .saturating_sub(1);
- let tip = 0;
- let extra: SignedExtra = (
- frame_system::CheckVersion::::new(),
- frame_system::CheckGenesis::::new(),
- frame_system::CheckEra::::from(generic::Era::mortal(period, current_block)),
- frame_system::CheckNonce::::from(index),
- frame_system::CheckWeight::::new(),
- pallet_transaction_payment::ChargeTransactionPayment::::from(tip),
- Default::default(),
- );
- let raw_payload = SignedPayload::new(call, extra).map_err(|e| {
- debug::warn!("Unable to create signed payload: {:?}", e);
- }).ok()?;
- let signature = TSigner::sign(public, &raw_payload)?;
- let address = Indices::unlookup(account);
- let (call, extra, _) = raw_payload.deconstruct();
- Some((call, (address, signature, extra)))
- }
-}
-
parameter_types! {
pub const ConfigDepositBase: Balance = 5 * DOLLARS;
pub const FriendDepositFactor: Balance = 50 * CENTS;
@@ -638,12 +668,12 @@ construct_runtime!(
Indices: pallet_indices::{Module, Call, Storage, Config, Event},
Balances: pallet_balances::{Module, Call, Storage, Config, Event},
TransactionPayment: pallet_transaction_payment::{Module, Storage},
- Staking: pallet_staking::{Module, Call, Config, Storage, Event},
+ Staking: pallet_staking::{Module, Call, Config, Storage, Event, ValidateUnsigned},
Session: pallet_session::{Module, Call, Storage, Event, Config},
Democracy: pallet_democracy::{Module, Call, Storage, Config, Event},
Council: pallet_collective::::{Module, Call, Storage, Origin, Event, Config},
TechnicalCommittee: pallet_collective::::{Module, Call, Storage, Origin, Event, Config},
- Elections: pallet_elections_phragmen::{Module, Call, Storage, Event},
+ Elections: pallet_elections_phragmen::{Module, Call, Storage, Event, Config},
TechnicalMembership: pallet_membership::::{Module, Call, Storage, Event, Config},
FinalityTracker: pallet_finality_tracker::{Module, Call, Inherent},
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
@@ -658,6 +688,7 @@ construct_runtime!(
Society: pallet_society::{Module, Call, Storage, Event, Config},
Recovery: pallet_recovery::{Module, Call, Storage, Event},
Vesting: pallet_vesting::{Module, Call, Storage, Event, Config},
+ Scheduler: pallet_scheduler::{Module, Call, Storage, Event},
}
);
@@ -680,6 +711,7 @@ pub type SignedExtra = (
frame_system::CheckWeight,
pallet_transaction_payment::ChargeTransactionPayment,
pallet_contracts::CheckBlockGasLimit,
+ pallet_staking::LockStakingStatus,
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic;
@@ -734,8 +766,11 @@ impl_runtime_apis! {
}
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime {
- fn validate_transaction(tx: ::Extrinsic) -> TransactionValidity {
- Executive::validate_transaction(tx)
+ fn validate_transaction(
+ source: TransactionSource,
+ tx: ::Extrinsic,
+ ) -> TransactionValidity {
+ Executive::validate_transaction(source, tx)
}
}
@@ -845,81 +880,41 @@ impl_runtime_apis! {
#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark for Runtime {
fn dispatch_benchmark(
- module: Vec,
- extrinsic: Vec,
+ pallet: Vec,
+ benchmark: Vec,
lowest_range_values: Vec,
highest_range_values: Vec,
steps: Vec,
repeat: u32,
- ) -> Result, sp_runtime::RuntimeString> {
- use frame_benchmarking::Benchmarking;
+ ) -> Result, sp_runtime::RuntimeString> {
+ use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark};
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
// To get around that, we separated the Session benchmarks into its own crate, which is why
// we need these two lines below.
use pallet_session_benchmarking::Module as SessionBench;
- impl pallet_session_benchmarking::Trait for Runtime {}
+ use pallet_offences_benchmarking::Module as OffencesBench;
- let result = match module.as_slice() {
- b"pallet-balances" | b"balances" => Balances::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- b"pallet-im-online" | b"im-online" => ImOnline::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- b"pallet-identity" | b"identity" => Identity::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- b"pallet-session" | b"session" => SessionBench::::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- b"pallet-staking" | b"staking" => Staking::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- b"pallet-treasury" | b"treasury" => Treasury::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- b"pallet-vesting" | b"vesting" => Vesting::run_benchmark(
- extrinsic,
- lowest_range_values,
- highest_range_values,
- steps,
- repeat,
- ),
- _ => Err("Benchmark not found for this pallet."),
- };
-
- result.map_err(|e| e.into())
+ impl pallet_session_benchmarking::Trait for Runtime {}
+ impl pallet_offences_benchmarking::Trait for Runtime {}
+
+ let mut batches = Vec::::new();
+ let params = (&pallet, &benchmark, &lowest_range_values, &highest_range_values, &steps, repeat);
+
+ add_benchmark!(params, batches, b"balances", Balances);
+ add_benchmark!(params, batches, b"collective", Council);
+ add_benchmark!(params, batches, b"democracy", Democracy);
+ add_benchmark!(params, batches, b"identity", Identity);
+ add_benchmark!(params, batches, b"im-online", ImOnline);
+ add_benchmark!(params, batches, b"session", SessionBench::);
+ add_benchmark!(params, batches, b"staking", Staking);
+ add_benchmark!(params, batches, b"timestamp", Timestamp);
+ add_benchmark!(params, batches, b"treasury", Treasury);
+ add_benchmark!(params, batches, b"utility", Utility);
+ add_benchmark!(params, batches, b"vesting", Vesting);
+ add_benchmark!(params, batches, b"offences", OffencesBench::);
+
+ if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
+ Ok(batches)
}
}
}
@@ -948,39 +943,7 @@ mod tests {
>,
{}
- is_submit_signed_transaction::();
- is_sign_and_submit_transaction::();
- }
-
- #[test]
- fn block_hooks_weight_should_not_exceed_limits() {
- use frame_support::weights::WeighBlock;
- let check_for_block = |b| {
- let block_hooks_weight =
- >::on_initialize(b) +
- >::on_finalize(b);
-
- assert_eq!(
- block_hooks_weight,
- 0,
- "This test might fail simply because the value being compared to has increased to a \
- module declaring a new weight for a hook or call. In this case update the test and \
- happily move on.",
- );
-
- // Invariant. Always must be like this to have a sane chain.
- assert!(block_hooks_weight < MaximumBlockWeight::get());
-
- // Warning.
- if block_hooks_weight > MaximumBlockWeight::get() / 2 {
- println!(
- "block hooks weight is consuming more than a block's capacity. You probably want \
- to re-think this. This test will fail now."
- );
- assert!(false);
- }
- };
-
- let _ = (0..100_000).for_each(check_for_block);
+ is_submit_signed_transaction::>();
+ is_sign_and_submit_transaction::>();
}
}
diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml
index d852aaac260d0761b9bd80883c87d3b07cba023c..df73e20070d2cedca064206d6b6dfc9b796272f2 100644
--- a/bin/node/testing/Cargo.toml
+++ b/bin/node/testing/Cargo.toml
@@ -14,7 +14,7 @@ pallet-balances = { version = "2.0.0-alpha.5", path = "../../../frame/balances"
sc-client = { version = "0.8.0-alpha.5", path = "../../../client/" }
sc-client-db = { version = "0.8.0-alpha.5", path = "../../../client/db/", features = ["kvdb-rocksdb"] }
sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api/" }
-codec = { package = "parity-scale-codec", version = "1.2.0" }
+codec = { package = "parity-scale-codec", version = "1.3.0" }
pallet-contracts = { version = "2.0.0-alpha.5", path = "../../../frame/contracts" }
pallet-grandpa = { version = "2.0.0-alpha.5", path = "../../../frame/grandpa" }
pallet-indices = { version = "2.0.0-alpha.5", path = "../../../frame/indices" }
@@ -53,6 +53,5 @@ criterion = "0.3.0"
sc-cli = { version = "0.8.0-alpha.5", path = "../../../client/cli" }
sc-service = { version = "0.8.0-alpha.5", path = "../../../client/service", features = ["rocksdb"] }
-[[bench]]
-name = "import"
-harness = false
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/node/testing/benches/import.rs b/bin/node/testing/benches/import.rs
deleted file mode 100644
index b36d2e1181b0a2483ee35fc50e43c1d2ebf27522..0000000000000000000000000000000000000000
--- a/bin/node/testing/benches/import.rs
+++ /dev/null
@@ -1,259 +0,0 @@
-// Copyright 2020 Parity Technologies (UK) Ltd.
-// This file is part of Substrate.
-
-// Substrate is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Substrate is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Substrate. If not, see .
-
-//! Block import benchmark.
-//!
-//! This benchmark is expected to measure block import operation of
-//! some more or less full block.
-//!
-//! As we also want to protect against cold-cache attacks, this
-//! benchmark should not rely on any caching (except those that
-//! DO NOT depend on user input). Thus block generation should be
-//! based on randomized operation.
-//!
-//! This is supposed to be very simple benchmark and is not subject
-//! to much configuring - just block full of randomized transactions.
-//! It is not supposed to measure runtime modules weight correctness
-
-use std::fmt;
-use node_testing::bench::{BenchDb, Profile, BlockType, KeyTypes};
-use node_primitives::Block;
-use sp_runtime::generic::BlockId;
-use criterion::{Criterion, criterion_group, criterion_main};
-use sc_client_api::backend::Backend;
-
-criterion_group!(
- name = benches;
- config = Criterion::default().sample_size(50).warm_up_time(std::time::Duration::from_secs(20));
- targets = bench_block_import, bench_account_reaping, bench_account_ed25519
-);
-criterion_group!(
- name = wasm_size;
- config = Criterion::default().sample_size(10);
- targets = bench_wasm_size_import
-);
-criterion_group!(
- name = profile;
- config = Criterion::default().sample_size(10);
- targets = profile_block_import
-);
-criterion_main!(benches, profile);
-
-fn bench_block_import(c: &mut Criterion) {
- sc_cli::init_logger("");
- // for future uses, uncomment if something wrong.
- // sc_cli::init_logger("sc_client=debug");
-
- let mut bench_db = BenchDb::new(100);
- let block = bench_db.generate_block(BlockType::RandomTransfers(100));
-
- log::trace!(
- target: "bench-logistics",
- "Seed database directory: {}",
- bench_db.path().display(),
- );
-
- c.bench_function_over_inputs("import-block-B-0001",
- move |bencher, profile| {
- bencher.iter_batched(
- || {
- let context = bench_db.create_context(*profile);
-
- // mostly to just launch compiler before benching!
- let version = context.client.runtime_version_at(&BlockId::Number(0))
- .expect("Failed to get runtime version")
- .spec_version;
-
- log::trace!(
- target: "bench-logistics",
- "Next iteration database directory: {}, runtime version: {}",
- context.path().display(), version,
- );
-
- context
- },
- |mut context| {
- let start = std::time::Instant::now();
- context.import_block(block.clone());
- let elapsed = start.elapsed();
-
- log::info!(
- target: "bench-logistics",
- "imported block with {} tx, took: {:#?}",
- block.extrinsics.len(),
- elapsed,
- );
-
- log::info!(
- target: "bench-logistics",
- "usage info: {}",
- context.backend.usage_info()
- .expect("RocksDB backend always provides usage info!"),
- );
- },
- criterion::BatchSize::LargeInput,
- );
- },
- vec![Profile::Wasm, Profile::Native],
- );
-}
-
-fn bench_account_reaping(c: &mut Criterion) {
- sc_cli::init_logger("");
-
- let mut bench_db = BenchDb::new(100);
- let block = bench_db.generate_block(BlockType::RandomTransfersReaping(100));
-
- c.bench_function_over_inputs("import-block-reaping-B-0002",
- move |bencher, profile| {
- bencher.iter_batched(
- || {
- let context = bench_db.create_context(*profile);
-
- // mostly to just launch compiler before benching!
- context.client.runtime_version_at(&BlockId::Number(0))
- .expect("Failed to get runtime version");
-
- context
- },
- |mut context| {
- context.import_block(block.clone());
- },
- criterion::BatchSize::LargeInput,
- );
- },
- vec![Profile::Wasm, Profile::Native],
- );
-}
-
-fn bench_account_ed25519(c: &mut Criterion) {
- sc_cli::init_logger("");
-
- let mut bench_db = BenchDb::with_key_types(100, KeyTypes::Ed25519);
- let block = bench_db.generate_block(BlockType::RandomTransfers(100));
-
- c.bench_function_over_inputs("import-block-ed25519-B-0003",
- move |bencher, profile| {
- bencher.iter_batched(
- || {
- let context = bench_db.create_context(*profile);
- context.client.runtime_version_at(&BlockId::Number(0))
- .expect("Failed to get runtime version");
-
- context
- },
- |mut context| {
- context.import_block(block.clone());
- },
- criterion::BatchSize::LargeInput,
- );
- },
- vec![Profile::Wasm, Profile::Native],
- );
-}
-
-// This is not an actual benchmark, so don't use it to measure anything.
-// It just produces special pattern of cpu load that allows easy picking
-// the part of block import for the profiling in the tool of choice.
-fn profile_block_import(c: &mut Criterion) {
- sc_cli::init_logger("");
-
- let mut bench_db = BenchDb::new(128);
- let block = bench_db.generate_block(BlockType::RandomTransfers(100));
-
- c.bench_function("profile block",
- move |bencher| {
- bencher.iter_batched(
- || {
- bench_db.create_context(Profile::Native)
- },
- |mut context| {
- // until better osx signpost/callgrind signal is possible to use
- // in rust, we just pause everything completely to help choosing
- // actual profiling interval
- std::thread::park_timeout(std::time::Duration::from_secs(2));
- context.import_block(block.clone());
- // and here as well
- std::thread::park_timeout(std::time::Duration::from_secs(2));
- log::info!(
- target: "bench-logistics",
- "imported block, usage info: {}",
- context.backend.usage_info()
- .expect("RocksDB backend always provides usage info!"),
- )
- },
- criterion::BatchSize::PerIteration,
- );
- },
- );
-}
-
-struct Setup {
- db: BenchDb,
- block: Block,
-}
-
-struct SetupIterator {
- current: usize,
- finish: usize,
- multiplier: usize,
-}
-
-impl SetupIterator {
- fn new(current: usize, finish: usize, multiplier: usize) -> Self {
- SetupIterator { current, finish, multiplier }
- }
-}
-
-impl Iterator for SetupIterator {
- type Item = Setup;
-
- fn next(&mut self) -> Option {
- if self.current >= self.finish { return None }
-
- self.current += 1;
-
- let size = self.current * self.multiplier;
- let mut db = BenchDb::new(size);
- let block = db.generate_block(BlockType::RandomTransfers(size));
- Some(Setup { db, block })
- }
-}
-
-impl fmt::Debug for Setup {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, "Setup: {} tx/block", self.block.extrinsics.len())
- }
-}
-
-fn bench_wasm_size_import(c: &mut Criterion) {
- sc_cli::init_logger("");
-
- c.bench_function_over_inputs("wasm_size_import",
- move |bencher, setup| {
- bencher.iter_batched(
- || {
- setup.db.create_context(Profile::Wasm)
- },
- |mut context| {
- context.import_block(setup.block.clone());
- },
- criterion::BatchSize::PerIteration,
- );
- },
- SetupIterator::new(5, 15, 50),
- );
-}
diff --git a/bin/node/testing/src/bench.rs b/bin/node/testing/src/bench.rs
index 3bc8d483ea2afe4c7cadc0ad9a74e746b14121ea..5dd0d012fbf46b24af4381ee4699c997f4e89cb1 100644
--- a/bin/node/testing/src/bench.rs
+++ b/bin/node/testing/src/bench.rs
@@ -186,7 +186,7 @@ impl BenchDb {
pruning: PruningMode::ArchiveAll,
source: sc_client_db::DatabaseSettingsSrc::Path {
path: dir.into(),
- cache_size: None,
+ cache_size: 128,
},
};
diff --git a/bin/node/testing/src/genesis.rs b/bin/node/testing/src/genesis.rs
index e35059e0c6ffd300cb2941e4322e22c8bbf832ee..8a57010770f3dedf9795e0da462455943fb6f74d 100644
--- a/bin/node/testing/src/genesis.rs
+++ b/bin/node/testing/src/genesis.rs
@@ -109,6 +109,7 @@ pub fn config_endowed(
pallet_collective_Instance1: Some(Default::default()),
pallet_collective_Instance2: Some(Default::default()),
pallet_membership_Instance1: Some(Default::default()),
+ pallet_elections_phragmen: Some(Default::default()),
pallet_sudo: Some(Default::default()),
pallet_treasury: Some(Default::default()),
pallet_society: Some(SocietyConfig {
diff --git a/bin/node/testing/src/keyring.rs b/bin/node/testing/src/keyring.rs
index 6b0d06875d6924a0715f74334390193736009bd0..5fa1e48b0321813d3c9bec039ec3212c5be4216a 100644
--- a/bin/node/testing/src/keyring.rs
+++ b/bin/node/testing/src/keyring.rs
@@ -75,6 +75,7 @@ pub fn signed_extra(nonce: Index, extra_fee: Balance) -> SignedExtra {
frame_system::CheckWeight::new(),
pallet_transaction_payment::ChargeTransactionPayment::from(extra_fee),
Default::default(),
+ Default::default(),
)
}
diff --git a/bin/node/transaction-factory/Cargo.toml b/bin/node/transaction-factory/Cargo.toml
index b95b55a53620d66ecabd901bcb62045b15fd0824..33ebeb767ae37e75c04309c958e3de79096bee67 100644
--- a/bin/node/transaction-factory/Cargo.toml
+++ b/bin/node/transaction-factory/Cargo.toml
@@ -13,7 +13,7 @@ sc-cli = { version = "0.8.0-alpha.5", path = "../../../client/cli" }
sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api" }
sc-block-builder = { version = "0.8.0-alpha.5", path = "../../../client/block-builder" }
sc-client = { version = "0.8.0-alpha.5", path = "../../../client" }
-codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "1.3.0", features = ["derive"] }
sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" }
log = "0.4.8"
sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
@@ -21,3 +21,6 @@ sp-api = { version = "2.0.0-alpha.5", path = "../../../primitives/api" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
sc-service = { version = "0.8.0-alpha.5", default-features = false, path = "../../../client/service" }
sp-blockchain = { version = "2.0.0-alpha.5", path = "../../../primitives/blockchain" }
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml
index 0cadbe76144f59ea1805463373a86f584bd8ad0f..9b03dd17b76de499094287fc126a0607c866a3a3 100644
--- a/bin/utils/chain-spec-builder/Cargo.toml
+++ b/bin/utils/chain-spec-builder/Cargo.toml
@@ -15,3 +15,6 @@ node-cli = { version = "2.0.0-alpha.5", path = "../../node/cli" }
sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
rand = "0.7.2"
structopt = "0.3.8"
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/utils/chain-spec-builder/src/main.rs b/bin/utils/chain-spec-builder/src/main.rs
index 3673909706cdb765508e4e72230d66c0ffc46635..5aa7e7fff71797cdd6aecff053cae4cf223e9c9f 100644
--- a/bin/utils/chain-spec-builder/src/main.rs
+++ b/bin/utils/chain-spec-builder/src/main.rs
@@ -87,7 +87,7 @@ fn genesis_constructor(
let authorities = authority_seeds
.iter()
.map(AsRef::as_ref)
- .map(chain_spec::get_authority_keys_from_seed)
+ .map(chain_spec::authority_keys_from_seed)
.collect::>();
let enable_println = true;
@@ -142,7 +142,7 @@ fn generate_authority_keys_and_store(
).map_err(|err| err.to_string())?;
let (_, _, grandpa, babe, im_online, authority_discovery) =
- chain_spec::get_authority_keys_from_seed(seed);
+ chain_spec::authority_keys_from_seed(seed);
let insert_key = |key_type, public| {
keystore.write().insert_unknown(
diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml
index d8d7532a4c16c95b0aa89cdb353cdbf2690f0674..672f25275c74fbfbab2c1f0908cfbefef8afed42 100644
--- a/bin/utils/subkey/Cargo.toml
+++ b/bin/utils/subkey/Cargo.toml
@@ -19,7 +19,7 @@ tiny-bip39 = "0.7"
substrate-bip39 = "0.4.1"
hex = "0.4.0"
hex-literal = "0.2.1"
-codec = { package = "parity-scale-codec", version = "1.2.0" }
+codec = { package = "parity-scale-codec", version = "1.3.0" }
frame-system = { version = "2.0.0-alpha.5", path = "../../../frame/system" }
pallet-balances = { version = "2.0.0-alpha.5", path = "../../../frame/balances" }
pallet-transaction-payment = { version = "2.0.0-alpha.5", path = "../../../frame/transaction-payment" }
@@ -29,8 +29,11 @@ derive_more = { version = "0.99.2" }
sc-rpc = { version = "2.0.0-alpha.5", path = "../../../client/rpc" }
jsonrpc-core-client = { version = "14.0.3", features = ["http"] }
hyper = "0.12.35"
-libp2p = "0.16.2"
+libp2p = "0.17.0"
serde_json = "1.0"
[features]
bench = []
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/bin/utils/subkey/src/main.rs b/bin/utils/subkey/src/main.rs
index bc7d7a602abca61edb9a8b96800e4f1c1f1ac04c..237cc68df2f4657808152d493d2e26ac9866231f 100644
--- a/bin/utils/subkey/src/main.rs
+++ b/bin/utils/subkey/src/main.rs
@@ -79,6 +79,7 @@ trait Crypto: Sized {
) where
::Public: PublicT,
{
+ let v = network_override.unwrap_or_default();
if let Ok((pair, seed)) = Self::Pair::from_phrase(uri, password) {
let public_key = Self::public_from_pair(&pair);
@@ -86,6 +87,7 @@ trait Crypto: Sized {
OutputType::Json => {
let json = json!({
"secretPhrase": uri,
+ "networkId": String::from(v),
"secretSeed": format_seed::(seed),
"publicKey": format_public_key::(public_key.clone()),
"accountId": format_account_id::(public_key),
@@ -95,11 +97,13 @@ trait Crypto: Sized {
},
OutputType::Text => {
println!("Secret phrase `{}` is account:\n \
- Secret seed: {}\n \
- Public key (hex): {}\n \
- Account ID: {}\n \
- SS58 Address: {}",
+ Network ID/version: {}\n \
+ Secret seed: {}\n \
+ Public key (hex): {}\n \
+ Account ID: {}\n \
+ SS58 Address: {}",
uri,
+ String::from(v),
format_seed::(seed),
format_public_key::(public_key.clone()),
format_account_id::(public_key),
@@ -114,6 +118,7 @@ trait Crypto: Sized {
OutputType::Json => {
let json = json!({
"secretKeyUri": uri,
+ "networkId": String::from(v),
"secretSeed": if let Some(seed) = seed { format_seed::(seed) } else { "n/a".into() },
"publicKey": format_public_key::(public_key.clone()),
"accountId": format_account_id::(public_key),
@@ -123,11 +128,13 @@ trait Crypto: Sized {
},
OutputType::Text => {
println!("Secret Key URI `{}` is account:\n \
- Secret seed: {}\n \
- Public key (hex): {}\n \
- Account ID: {}\n \
- SS58 Address: {}",
+ Network ID/version: {}\n \
+ Secret seed: {}\n \
+ Public key (hex): {}\n \
+ Account ID: {}\n \
+ SS58 Address: {}",
uri,
+ String::from(v),
if let Some(seed) = seed { format_seed::(seed) } else { "n/a".into() },
format_public_key::(public_key.clone()),
format_account_id::(public_key),
@@ -683,6 +690,7 @@ fn create_extrinsic(
frame_system::CheckWeight::::new(),
pallet_transaction_payment::ChargeTransactionPayment::::from(f),
Default::default(),
+ Default::default(),
)
};
let raw_payload = SignedPayload::from_raw(
@@ -696,6 +704,7 @@ fn create_extrinsic(
(),
(),
(),
+ (),
),
);
let signature = raw_payload.using_encoded(|payload| signer.sign(payload)).into_runtime();
diff --git a/client/Cargo.toml b/client/Cargo.toml
index 7a38faad04e0fc3ed3b08173c2b39daed9a515d9..5d4b5927111ea220c33256c50c8250fe198ec840 100644
--- a/client/Cargo.toml
+++ b/client/Cargo.toml
@@ -11,7 +11,7 @@ description = "Substrate Client and associated logic."
[dependencies]
sc-block-builder = { version = "0.8.0-alpha.5", path = "block-builder" }
sc-client-api = { version = "2.0.0-alpha.5", path = "api" }
-codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "1.3.0", features = ["derive"] }
sp-consensus = { version = "0.8.0-alpha.5", path = "../primitives/consensus/common" }
derive_more = { version = "0.99.2" }
sc-executor = { version = "0.8.0-alpha.5", path = "executor" }
@@ -30,6 +30,7 @@ sp-std = { version = "2.0.0-alpha.5", path = "../primitives/std" }
sp-version = { version = "2.0.0-alpha.5", path = "../primitives/version" }
sp-api = { version = "2.0.0-alpha.5", path = "../primitives/api" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../primitives/runtime" }
+sp-utils = { version = "2.0.0-alpha.5", path = "../primitives/utils" }
sp-blockchain = { version = "2.0.0-alpha.5", path = "../primitives/blockchain" }
sp-state-machine = { version = "0.8.0-alpha.5", path = "../primitives/state-machine" }
sc-telemetry = { version = "2.0.0-alpha.5", path = "telemetry" }
@@ -43,3 +44,6 @@ tempfile = "3.1.0"
substrate-test-runtime-client = { version = "2.0.0-dev", path = "../test-utils/runtime/client" }
kvdb-memorydb = "0.5.0"
sp-panic-handler = { version = "2.0.0-alpha.5", path = "../primitives/panic-handler" }
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml
index c3afdee41394e1cf8833e80acc8b6c80fd5fe756..dbe6afe9c7cae00c99abca8464dd4acd4c4f8a3c 100644
--- a/client/api/Cargo.toml
+++ b/client/api/Cargo.toml
@@ -11,7 +11,7 @@ documentation = "https://docs.rs/sc-client-api"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
sp-consensus = { version = "0.8.0-alpha.5", path = "../../primitives/consensus/common" }
derive_more = { version = "0.99.2" }
sc-executor = { version = "0.8.0-alpha.5", path = "../executor" }
@@ -26,10 +26,12 @@ sp-keyring = { version = "2.0.0-alpha.5", path = "../../primitives/keyring" }
kvdb = "0.5.0"
log = { version = "0.4.8" }
parking_lot = "0.10.0"
+lazy_static = "1.4.0"
sp-core = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/core" }
sp-std = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/std" }
sp-version = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/version" }
sp-api = { version = "2.0.0-alpha.5", path = "../../primitives/api" }
+sp-utils = { version = "2.0.0-alpha.5", path = "../../primitives/utils" }
sp-runtime = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/runtime" }
sp-state-machine = { version = "0.8.0-alpha.5", path = "../../primitives/state-machine" }
sc-telemetry = { version = "2.0.0-alpha.5", path = "../telemetry" }
@@ -39,3 +41,6 @@ sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../primitives/tran
[dev-dependencies]
sp-test-primitives = { version = "2.0.0-dev", path = "../../primitives/test-primitives" }
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/client/api/src/client.rs b/client/api/src/client.rs
index 06d49da640da6158dd373dd4ab3072c8639e9534..c855cd3a0832883c3a66b5c986871909aece048a 100644
--- a/client/api/src/client.rs
+++ b/client/api/src/client.rs
@@ -17,7 +17,6 @@
//! A set of APIs supported by the client along with their primitives.
use std::{fmt, collections::HashSet};
-use futures::channel::mpsc;
use sp_core::storage::StorageKey;
use sp_runtime::{
traits::{Block as BlockT, NumberFor},
@@ -28,13 +27,14 @@ use sp_consensus::BlockOrigin;
use crate::blockchain::Info;
use crate::notifications::StorageEventStream;
+use sp_utils::mpsc::TracingUnboundedReceiver;
use sp_blockchain;
/// Type that implements `futures::Stream` of block import events.
-pub type ImportNotifications = mpsc::UnboundedReceiver>;
+pub type ImportNotifications = TracingUnboundedReceiver>;
/// A stream of block finality notifications.
-pub type FinalityNotifications = mpsc::UnboundedReceiver>;
+pub type FinalityNotifications = TracingUnboundedReceiver>;
/// Expected hashes of blocks at given heights.
///
@@ -179,8 +179,12 @@ pub struct IoInfo {
pub state_reads: u64,
/// State reads (keys) from cache.
pub state_reads_cache: u64,
- /// State reads (keys) from cache.
+ /// State reads (keys)
pub state_writes: u64,
+ /// State write (keys) already cached.
+ pub state_writes_cache: u64,
+ /// State write (trie nodes) to backend db.
+ pub state_writes_nodes: u64,
}
/// Usage statistics for running client instance.
@@ -202,7 +206,7 @@ impl fmt::Display for UsageInfo {
f,
"caches: ({} state, {} db overlay), \
state db: ({} non-canonical, {} pruning, {} pinned), \
- i/o: ({} tx, {} write, {} read, {} avg tx, {}/{} key cache reads/total, {} key writes)",
+ i/o: ({} tx, {} write, {} read, {} avg tx, {}/{} key cache reads/total, {} trie nodes writes)",
self.memory.state_cache,
self.memory.database_cache,
self.memory.state_db.non_canonical,
@@ -214,7 +218,7 @@ impl fmt::Display for UsageInfo {
self.io.average_transaction_size,
self.io.state_reads_cache,
self.io.state_reads,
- self.io.state_writes,
+ self.io.state_writes_nodes,
)
}
}
diff --git a/client/api/src/notifications.rs b/client/api/src/notifications.rs
index 72a9f357fce337c7dec32758ff5aa2d0a8b6bd6a..f154eade44d5e37cd76a3bad97e21d46e3ed779d 100644
--- a/client/api/src/notifications.rs
+++ b/client/api/src/notifications.rs
@@ -22,9 +22,9 @@ use std::{
};
use fnv::{FnvHashSet, FnvHashMap};
-use futures::channel::mpsc;
use sp_core::storage::{StorageKey, StorageData};
use sp_runtime::traits::Block as BlockT;
+use sp_utils::mpsc::{TracingUnboundedSender, TracingUnboundedReceiver, tracing_unbounded};
/// Storage change set
#[derive(Debug)]
@@ -67,7 +67,7 @@ impl StorageChangeSet {
}
/// Type that implements `futures::Stream` of storage change events.
-pub type StorageEventStream = mpsc::UnboundedReceiver<(H, StorageChangeSet)>;
+pub type StorageEventStream = TracingUnboundedReceiver<(H, StorageChangeSet)>;
type SubscriberId = u64;
@@ -82,7 +82,7 @@ pub struct StorageNotifications {
FnvHashSet
)>,
sinks: FnvHashMap,
+ TracingUnboundedSender<(Block::Hash, StorageChangeSet)>,
Option>,
Option>>>,
)>,
@@ -299,7 +299,7 @@ impl StorageNotifications {
// insert sink
- let (tx, rx) = mpsc::unbounded();
+ let (tx, rx) = tracing_unbounded("mpsc_storage_notification_items");
self.sinks.insert(current_id, (tx, keys, child_keys));
rx
}
diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml
index 5a7f78b95d34c036a1b624eed48136ecd1cc26aa..7521101ae6f2a2f0e1df77bb25df381c45e3bf66 100644
--- a/client/authority-discovery/Cargo.toml
+++ b/client/authority-discovery/Cargo.toml
@@ -14,11 +14,11 @@ prost-build = "0.6.1"
[dependencies]
bytes = "0.5.0"
-codec = { package = "parity-scale-codec", default-features = false, version = "1.2.0" }
+codec = { package = "parity-scale-codec", default-features = false, version = "1.3.0" }
derive_more = "0.99.2"
-futures = "0.3.1"
+futures = "0.3.4"
futures-timer = "3.0.1"
-libp2p = { version = "0.16.2", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
+libp2p = { version = "0.17.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
log = "0.4.8"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-alpha.5"}
prost = "0.6.1"
@@ -38,3 +38,6 @@ env_logger = "0.7.0"
quickcheck = "0.9.0"
sc-peerset = { version = "2.0.0-alpha.5", path = "../peerset" }
substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client"}
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/client/authority-discovery/src/error.rs b/client/authority-discovery/src/error.rs
index 74b7043c29ba0c3fb8439c6dde47c619183831ed..216f8c26bf07e397a80612c17ca8ea82cd2275da 100644
--- a/client/authority-discovery/src/error.rs
+++ b/client/authority-discovery/src/error.rs
@@ -16,6 +16,8 @@
//! Authority discovery errors.
+use sp_core::crypto::CryptoTypePublicPair;
+
/// AuthorityDiscovery Result.
pub type Result = std::result::Result;
@@ -46,6 +48,10 @@ pub enum Error {
EncodingDecodingScale(codec::Error),
/// Failed to parse a libp2p multi address.
ParsingMultiaddress(libp2p::core::multiaddr::Error),
+ /// Failed to sign using a specific public key
+ MissingSignature(CryptoTypePublicPair),
+ /// Failed to sign using all public keys
+ Signing,
/// Failed to register Prometheus metric.
Prometheus(prometheus_endpoint::PrometheusError),
}
diff --git a/client/authority-discovery/src/lib.rs b/client/authority-discovery/src/lib.rs
index 171a401bbbf8b5d00bb80d06ee0dbe2ad7d482ce..45f05e1039a5bdc1c5e8eb5355117ff5a21719d4 100644
--- a/client/authority-discovery/src/lib.rs
+++ b/client/authority-discovery/src/lib.rs
@@ -56,14 +56,13 @@ use futures_timer::Delay;
use codec::{Decode, Encode};
use error::{Error, Result};
-use libp2p::Multiaddr;
use log::{debug, error, log_enabled, warn};
use prometheus_endpoint::{Counter, CounterVec, Gauge, Opts, U64, register};
use prost::Message;
use sc_client_api::blockchain::HeaderBackend;
-use sc_network::{DhtEvent, ExHashT, NetworkStateInfo};
+use sc_network::{Multiaddr, config::MultiaddrWithPeerId, DhtEvent, ExHashT, NetworkStateInfo};
use sp_authority_discovery::{AuthorityDiscoveryApi, AuthorityId, AuthoritySignature, AuthorityPair};
-use sp_core::crypto::{key_types, Pair};
+use sp_core::crypto::{key_types, CryptoTypePublicPair, Pair};
use sp_core::traits::BareCryptoStorePtr;
use sp_runtime::{traits::Block as BlockT, generic::BlockId};
use sp_api::ProvideRuntimeApi;
@@ -187,7 +186,7 @@ where
pub fn new(
client: Arc