diff --git a/.editorconfig b/.editorconfig
index 47fde53b690b5b86037ede8cbf0337db8a472d7d..2b40ec32fac3e935b4f85e70bf339224d5e8f8b0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -14,3 +14,9 @@ indent_style=space
indent_size=2
tab_width=8
end_of_line=lf
+
+[*.sh]
+indent_style=space
+indent_size=2
+tab_width=8
+end_of_line=lf
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 98cf4dd1d8c4f6109f2402ee44c890405dbdf968..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,15 +32,15 @@ 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"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
# FIXME set to release
- CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.8"
- CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
+ 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 sp-arithmetic-fuzzer"
.collect-artifacts: &collect-artifacts
@@ -127,6 +128,17 @@ check-line-width:
allow_failure: true
+
+
+check-polkadot-companion-build:
+ stage: build
+ <<: *docker-env
+ script:
+ - ./.maintain/gitlab/check_polkadot_companion_build.sh
+ interruptible: true
+ allow_failure: true
+
+
cargo-audit:
stage: test
<<: *docker-env
@@ -136,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
@@ -167,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
@@ -214,6 +240,24 @@ test-frame-staking:
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features std
- sccache -s
+test-frame-examples-compile-to-wasm:
+ stage: test
+ <<: *docker-env
+ variables:
+ # Enable debug assertions since we are running optimized builds for testing
+ # but still want to have debug assertions.
+ RUSTFLAGS: -Cdebug-assertions=y
+ RUST_BACKTRACE: 1
+ except:
+ variables:
+ - $DEPLOY_TAG
+ script:
+ - cd frame/example-offchain-worker/
+ - cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
+ - cd ../example
+ - cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
+ - sccache -s
+
test-wasmtime:
stage: test
<<: *docker-env
@@ -230,6 +274,22 @@ test-wasmtime:
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features wasmtime
- sccache -s
+test-runtime-benchmarks:
+ stage: test
+ <<: *docker-env
+ variables:
+ # Enable debug assertions since we are running optimized builds for testing
+ # but still want to have debug assertions.
+ RUSTFLAGS: -Cdebug-assertions=y
+ RUST_BACKTRACE: 1
+ except:
+ variables:
+ - $DEPLOY_TAG
+ script:
+ - cd bin/node/cli
+ - WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features runtime-benchmarks
+ - sccache -s
+
test-linux-stable-int:
<<: *test-linux
except:
@@ -271,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:
@@ -357,49 +417,16 @@ 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
- script:
- - if [ -s ${CI_COMMIT_SHORT_SHA}_warnings.log ]; then
- cat ${CI_COMMIT_SHORT_SHA}_warnings.log;
- exit 1;
- else
- echo "___No warnings___";
- fi
-
-# Nightly check whether Polkadot 'master' branch builds.
-check_polkadot:
- stage: build
- <<: *docker-env
- allow_failure: true
+check-polkadot-companion-status:
+ stage: post-build-test
+ image: parity/tools:latest
+ <<: *kubernetes-build
only:
- - master
- - schedules
+ - /^[0-9]+$/
script:
- - SUBSTRATE_PATH=$(pwd)
- # Clone the current Polkadot master branch into ./polkadot.
- - git clone --depth 1 https://gitlab.parity.io/parity/polkadot.git
- - cd polkadot
- # Make sure we override the crates in native and wasm build
- - mkdir .cargo
- - echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config
- - mkdir -p target/debug/wbuild/.cargo
- - echo "paths = [ \"$SUBSTRATE_PATH\" ]" > target/debug/wbuild/.cargo/config
- # package, others are updated along the way.
- - cargo update
- # Check whether Polkadot 'master' branch builds with this Substrate commit.
- - time cargo check
- - cd -
- - sccache -s
+ - ./.maintain/gitlab/check_polkadot_companion_status.sh
+
+
trigger-contracts-ci:
stage: publish
@@ -578,7 +605,7 @@ publish-to-crates-io:
<<: *docker-env
only:
- tags
- - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
+ - /^ci-release-.*$/
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash em-dragons --no-check ${CARGO_UNLEASH_PKG_DEF}
diff --git a/.maintain/Dockerfile b/.maintain/Dockerfile
index 2fc1532aa2837b3314eaf17a907ca765d33c85b5..21a41720f7d65ffd41a35cb1fa425e5999c9e289 100644
--- a/.maintain/Dockerfile
+++ b/.maintain/Dockerfile
@@ -39,6 +39,10 @@ RUN mv /usr/share/ca* /tmp && \
ln -s /substrate/.local/share/substrate /data
COPY --from=builder /substrate/target/$PROFILE/substrate /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/subkey /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/node-rpc-client /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/node-template /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/chain-spec-builder /usr/local/bin
# checks
RUN ldd /usr/local/bin/substrate && \
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_companion_build.sh b/.maintain/gitlab/check_polkadot_companion_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..eb4c6440f46c9fcafbd6a9ea9d78102518a4e619
--- /dev/null
+++ b/.maintain/gitlab/check_polkadot_companion_build.sh
@@ -0,0 +1,110 @@
+#!/bin/sh
+#
+# check if a pr is compatible with polkadot companion pr or master if not
+# available
+#
+# 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"
+# 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_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. 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.
+git clone --depth 1 https://github.com/paritytech/polkadot.git
+
+cd polkadot
+
+# either it's a pull request then check for a companion otherwise use
+# polkadot:master
+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
+ 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/detected: #${pr_companion}"
+ git fetch --depth 1 origin refs/pull/${pr_companion}/head:pr/${pr_companion}
+ git checkout pr/${pr_companion}
+ else
+ 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
+
+# Make sure we override the crates in native and wasm build
+# patching the git path as described in the link below did not test correctly
+# https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html
+mkdir .cargo
+echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config
+
+mkdir -p target/debug/wbuild/.cargo
+cp .cargo/config target/debug/wbuild/.cargo/config
+
+# package, others are updated along the way.
+cargo update
+
+# Test Polkadot pr or master branch with this Substrate commit.
+time cargo test --all --release --verbose
+
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/gitlab/check_runtime.sh b/.maintain/gitlab/check_runtime.sh
index 1eec8311efff4b1647eb52846aea0eac7f8fa1c5..5b7e25e3afc4eabef01d984047a98d675ab09757 100755
--- a/.maintain/gitlab/check_runtime.sh
+++ b/.maintain/gitlab/check_runtime.sh
@@ -33,7 +33,7 @@ git log --graph --oneline --decorate=short -n 10
boldprint "make sure the master branch and release tag are available in shallow clones"
git fetch --depth=${GIT_DEPTH:-100} origin master
git fetch --depth=${GIT_DEPTH:-100} origin release
-git tag release FETCH_HEAD
+git tag -f release FETCH_HEAD
git log -n1 release
diff --git a/.maintain/gitlab/generate_changelog.sh b/.maintain/gitlab/generate_changelog.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ba2a507e4cac694f918aa2c88cf1585991faa373
--- /dev/null
+++ b/.maintain/gitlab/generate_changelog.sh
@@ -0,0 +1,73 @@
+#!/usr/bin/env bash
+
+# shellcheck source=lib.sh
+source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
+
+version="$2"
+last_version="$1"
+
+all_changes="$(sanitised_git_logs "$last_version" "$version")"
+runtime_changes=""
+api_changes=""
+client_changes=""
+changes=""
+
+while IFS= read -r line; do
+ pr_id=$(echo "$line" | sed -E 's/.*#([0-9]+)\)$/\1/')
+
+ # Skip if the PR has the silent label - this allows us to skip a few requests
+ if has_label 'paritytech/substrate' "$pr_id" 'B0-silent'; then
+ continue
+ fi
+ if has_label 'paritytech/substrate' "$pr_id" 'B1-runtimenoteworthy'; then
+ runtime_changes="$runtime_changes
+$line"
+ fi
+ if has_label 'paritytech/substrate' "$pr_id" 'B1-clientnoteworthy'; then
+ client_changes="$client_changes
+$line"
+ fi
+ if has_label 'paritytech/substrate' "$pr_id" 'B1-apinoteworthy' ; then
+ api_changes="$api_changes
+$line"
+ continue
+ fi
+done <<< "$all_changes"
+
+# Make the substrate section if there are any substrate changes
+if [ -n "$runtime_changes" ] ||
+ [ -n "$api_changes" ] ||
+ [ -n "$client_changes" ]; then
+ changes=$(cat << EOF
+Substrate changes
+-----------------
+
+EOF
+)
+ if [ -n "$runtime_changes" ]; then
+ changes="$changes
+
+Runtime
+-------
+$runtime_changes"
+ fi
+ if [ -n "$client_changes" ]; then
+ changes="$changes
+
+Client
+------
+$client_changes"
+ fi
+ if [ -n "$api_changes" ]; then
+ changes="$changes
+
+API
+---
+$api_changes"
+ fi
+ release_text="$release_text
+
+$changes"
+fi
+
+echo "$changes"
diff --git a/.maintain/gitlab/lib.sh b/.maintain/gitlab/lib.sh
index c8b2d73e6097f42fd6590b5e3d78c537dc620028..ecc9a5f54288cd4636a05cb7f2a2d0535e40ebe9 100755
--- a/.maintain/gitlab/lib.sh
+++ b/.maintain/gitlab/lib.sh
@@ -15,11 +15,23 @@ sanitised_git_logs(){
}
# Returns the last published release on github
+# Note: we can't just use /latest because that ignores prereleases
# repo: 'organization/repo'
# Usage: last_github_release "$repo"
last_github_release(){
- curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" \
- -s "$api_base/$1/releases/latest" | jq '.tag_name'
+ i=0
+ # Iterate over releases until we find the last release that's not just a draft
+ while [ $i -lt 29 ]; do
+ out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$1/releases" | jq ".[$i]")
+ echo "$out"
+ # Ugh when echoing to jq, we need to translate newlines into spaces :/
+ if [ "$(echo "$out" | tr '\r\n' ' ' | jq '.draft')" = "false" ]; then
+ echo "$out" | tr '\r\n' ' ' | jq '.tag_name'
+ return
+ else
+ i=$((i + 1))
+ fi
+ done
}
# Checks whether a tag on github has been verified
diff --git a/.maintain/gitlab/publish_draft_release.sh b/.maintain/gitlab/publish_draft_release.sh
index 4f73575f5bbaf836d7e07cb43c7fd1c1173858da..c5813718a69f27636b2729d8bc2cc7fbf05561fa 100755
--- a/.maintain/gitlab/publish_draft_release.sh
+++ b/.maintain/gitlab/publish_draft_release.sh
@@ -3,44 +3,12 @@
# shellcheck source=lib.sh
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
-# Substrate labels for PRs we want to include in the release notes
-labels=(
- 'B1-runtimenoteworthy'
- 'B1-clientnoteworthy'
- 'B1-apinoteworthy'
-)
-
version="$CI_COMMIT_TAG"
# Note that this is not the last *tagged* version, but the last *published* version
last_version=$(last_github_release 'paritytech/substrate')
-echo "[+] Version: $version; Previous version: $last_version"
-
-all_changes="$(sanitised_git_logs "$last_version" "$version")"
-labelled_changes=""
-echo "[+] Iterating through $(wc -l <<< "$all_changes") changes to find labelled PRs"
-while IFS= read -r line; do
- pr_id=$(echo "$line" | sed -E 's/.*#([0-9]+)\)$/\1/')
-
- # Skip if the PR has the silent label - this allows us to skip a few requests
- if has_label 'paritytech/substrate' "$pr_id" 'B0-silent'; then
- continue
- fi
- for label in "${labels[@]}"; do
- if has_label 'paritytech/substrate' "$pr_id" "$label"; then
- labelled_changes="$labelled_changes
-$line"
- fi
- done
-done <<< "$all_changes"
-
-
-release_text="Substrate $version
------------------
-$labelled_changes"
-echo "[+] Release text generated: "
-echo "$release_text"
+release_text="$(./generate_release_text.sh "$last_version" "$version")"
echo "[+] Pushing release to github"
# Create release on github
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 f929a3dcbf7b545a13f3d9a13e758c556a944ec1..31badd989fe1ac3418e356304f776bff0a05ff69 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -61,13 +61,24 @@ dependencies = [
[[package]]
name = "aho-corasick"
-version = "0.7.9"
+version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec"
+checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada"
dependencies = [
"memchr",
]
+[[package]]
+name = "alga"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2"
+dependencies = [
+ "approx",
+ "num-complex",
+ "num-traits 0.2.11",
+]
+
[[package]]
name = "ansi_term"
version = "0.11.0"
@@ -88,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"
@@ -104,11 +115,26 @@ dependencies = [
"xdg",
]
+[[package]]
+name = "approx"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"
+dependencies = [
+ "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"
@@ -146,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]]
@@ -184,7 +210,7 @@ dependencies = [
"futures-io",
"futures-timer 2.0.2",
"kv-log-macro",
- "log 0.4.8",
+ "log",
"memchr",
"mio",
"mio-uds",
@@ -242,9 +268,9 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "backtrace"
-version = "0.3.44"
+version = "0.3.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536"
+checksum = "b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e"
dependencies = [
"backtrace-sys",
"cfg-if",
@@ -254,9 +280,9 @@ dependencies = [
[[package]]
name = "backtrace-sys"
-version = "0.1.32"
+version = "0.1.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491"
+checksum = "7de8aba10a69c8e8d7622c5710229485ec32e9d55fdad160ea559c086fdcd118"
dependencies = [
"cc",
"libc",
@@ -268,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"
@@ -305,9 +321,9 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.53.1"
+version = "0.53.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99de13bb6361e01e493b3db7928085dcc474b7ba4f5481818e53a89d76b8393f"
+checksum = "6bb26d6a69a335b8cb0e7c7e9775cd5666611dc50a37177c3f2cedcfc040e8c8"
dependencies = [
"bitflags",
"cexpr",
@@ -317,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",
@@ -341,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"
@@ -378,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"
@@ -430,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",
@@ -451,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"
@@ -496,15 +527,6 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
-[[package]]
-name = "c2-chacha"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb"
-dependencies = [
- "ppv-lite86",
-]
-
[[package]]
name = "c_linked_list"
version = "1.1.1"
@@ -543,9 +565,9 @@ dependencies = [
[[package]]
name = "cexpr"
-version = "0.3.6"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d"
+checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27"
dependencies = [
"nom",
]
@@ -567,11 +589,12 @@ dependencies = [
[[package]]
name = "chain-spec-builder"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"ansi_term 0.12.1",
"node-cli",
"rand 0.7.3",
+ "sc-chain-spec",
"sc-keystore",
"sp-core",
"structopt",
@@ -579,22 +602,22 @@ dependencies = [
[[package]]
name = "chrono"
-version = "0.4.10"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
+checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2"
dependencies = [
"js-sys",
"num-integer",
- "num-traits",
+ "num-traits 0.2.11",
"time",
"wasm-bindgen",
]
[[package]]
name = "clang-sys"
-version = "0.28.1"
+version = "0.29.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853"
+checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a"
dependencies = [
"glob 0.3.0",
"libc",
@@ -659,7 +682,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",
]
@@ -689,32 +712,16 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
-[[package]]
-name = "core-foundation"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d"
-dependencies = [
- "core-foundation-sys 0.6.2",
- "libc",
-]
-
[[package]]
name = "core-foundation"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
dependencies = [
- "core-foundation-sys 0.7.0",
+ "core-foundation-sys",
"libc",
]
-[[package]]
-name = "core-foundation-sys"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
-
[[package]]
name = "core-foundation-sys"
version = "0.7.0"
@@ -724,7 +731,8 @@ checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
[[package]]
name = "cranelift-bforest"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45a9c21f8042b9857bda93f6c1910b9f9f24100187a3d3d52f214a34e3dc5818"
dependencies = [
"cranelift-entity",
]
@@ -732,7 +740,8 @@ dependencies = [
[[package]]
name = "cranelift-codegen"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7853f77a6e4a33c67a69c40f5e1bb982bd2dc5c4a22e17e67b65bbccf9b33b2e"
dependencies = [
"byteorder 1.3.4",
"cranelift-bforest",
@@ -740,7 +749,7 @@ dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
"gimli",
- "log 0.4.8",
+ "log",
"serde",
"smallvec 1.2.0",
"target-lexicon",
@@ -750,7 +759,8 @@ dependencies = [
[[package]]
name = "cranelift-codegen-meta"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "084cd6d5fb0d1da28acd72c199471bfb09acc703ec8f3bf07b1699584272a3b9"
dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
@@ -759,12 +769,14 @@ dependencies = [
[[package]]
name = "cranelift-codegen-shared"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "701b599783305a58c25027a4d73f2d6b599b2d8ef3f26677275f480b4d51e05d"
[[package]]
name = "cranelift-entity"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b88e792b28e1ebbc0187b72ba5ba880dad083abe9231a99d19604d10c9e73f38"
dependencies = [
"serde",
]
@@ -772,10 +784,11 @@ dependencies = [
[[package]]
name = "cranelift-frontend"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+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",
]
@@ -783,7 +796,8 @@ dependencies = [
[[package]]
name = "cranelift-native"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32daf082da21c0c05d93394ff4842c2ab7c4991b1f3186a1d952f8ac660edd0b"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
@@ -793,12 +807,13 @@ dependencies = [
[[package]]
name = "cranelift-wasm"
version = "0.59.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2aa816f554a3ef739a5d17ca3081a1f8983f04c944ea8ff60fb8d9dd8cd2d7b"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
- "log 0.4.8",
+ "log",
"serde",
"thiserror",
"wasmparser",
@@ -827,7 +842,7 @@ dependencies = [
"itertools",
"lazy_static",
"libc",
- "num-traits",
+ "num-traits 0.2.11",
"rand_core 0.3.1",
"rand_os",
"rand_xoshiro",
@@ -853,7 +868,7 @@ dependencies = [
"csv",
"itertools",
"lazy_static",
- "num-traits",
+ "num-traits 0.2.11",
"oorandom",
"plotters",
"rayon",
@@ -996,8 +1011,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]]
@@ -1020,19 +1035,6 @@ dependencies = [
"rand 0.3.23",
]
-[[package]]
-name = "curve25519-dalek"
-version = "1.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d"
-dependencies = [
- "byteorder 1.3.4",
- "clear_on_drop",
- "digest",
- "rand_core 0.3.1",
- "subtle 2.2.2",
-]
-
[[package]]
name = "curve25519-dalek"
version = "2.0.0"
@@ -1043,7 +1045,7 @@ dependencies = [
"digest",
"rand_core 0.5.1",
"subtle 2.2.2",
- "zeroize 1.1.0",
+ "zeroize",
]
[[package]]
@@ -1054,13 +1056,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]]
@@ -1112,9 +1114,9 @@ dependencies = [
[[package]]
name = "doc-comment"
-version = "0.3.1"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97"
+checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "ed25519-dalek"
@@ -1123,7 +1125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2"
dependencies = [
"clear_on_drop",
- "curve25519-dalek 2.0.0",
+ "curve25519-dalek",
"rand 0.7.3",
"sha2",
]
@@ -1134,6 +1136,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"
@@ -1150,8 +1163,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]]
@@ -1162,7 +1175,7 @@ checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
dependencies = [
"atty",
"humantime",
- "log 0.4.8",
+ "log",
"regex",
"termcolor",
]
@@ -1175,7 +1188,7 @@ checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
dependencies = [
"atty",
"humantime",
- "log 0.4.8",
+ "log",
"regex",
"termcolor",
]
@@ -1188,18 +1201,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",
@@ -1216,50 +1229,38 @@ 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.8.1"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32cfe1c169414b709cf28aa30c74060bdb830a03a8ba473314d079ac79d80a5f"
+checksum = "9e7abcddbdd5db30aeed4deb586adc4824e6c247e2f7238d1187f752893f096b"
dependencies = [
"crunchy",
"fixed-hash",
"impl-rlp",
- "impl-serde 0.2.3",
- "tiny-keccak 1.5.0",
+ "impl-serde 0.3.0",
+ "tiny-keccak 2.0.2",
]
[[package]]
name = "ethereum-types"
-version = "0.8.0"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba744248e3553a393143d5ebb68939fc3a4ec0c22a269682535f5ffe7fed728c"
+checksum = "964c23cdee0ca07d5be2a628b46d5c11a2134ce554a8c16d8dbc2db647e4fd4d"
dependencies = [
"ethbloom",
"fixed-hash",
"impl-rlp",
- "impl-serde 0.2.3",
+ "impl-serde 0.3.0",
"primitive-types",
"uint",
]
[[package]]
name = "evm"
-version = "0.15.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "272f65e18a2b6449b682bfcdf6c3ccc63db0b93898d89c0fb237548bbfc764a5"
+checksum = "23a5c0ebf219b2b878bde1838282e0bb69828338df37fd136f1e93182ae35a59"
dependencies = [
"evm-core",
"evm-gasometer",
@@ -1272,18 +1273,18 @@ dependencies = [
[[package]]
name = "evm-core"
-version = "0.15.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66534d42e13d50f9101bed87cb568fd5aa929c600c3c13f8dadbbf39f5635945"
+checksum = "d944a07232006a3435df8aa014fd364ed04cb28d731782339e9c56436594f2d4"
dependencies = [
"primitive-types",
]
[[package]]
name = "evm-gasometer"
-version = "0.15.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39bc5b592803ca644781fe2290b7305ea5182f7c9516d615ddfb2308c2cab639"
+checksum = "6a0d986953234d3786d0ca1beaaabab6a581d2128f8ec36c8c57e9c45e3d2b32"
dependencies = [
"evm-core",
"evm-runtime",
@@ -1292,9 +1293,9 @@ dependencies = [
[[package]]
name = "evm-runtime"
-version = "0.15.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "389e4b447fb26971a9c76c8aa49c0ab435f8e46e8fc46e1bc4ebf01f3c2b428f"
+checksum = "1833c22f9518007d3cc28e14ff586263543516a1c7a147b260c603e4deb95403"
dependencies = [
"evm-core",
"primitive-types",
@@ -1319,7 +1320,7 @@ dependencies = [
"anyhow",
"goblin",
"indexmap",
- "log 0.4.8",
+ "log",
"scroll",
"string-interner",
"target-lexicon",
@@ -1343,8 +1344,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",
]
@@ -1362,9 +1363,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
[[package]]
name = "fdlimit"
-version = "0.1.2"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9084c55bb76efb1496328976db88320fe7d9ee86e649e83c4ecce3ba7a9a35d1"
+checksum = "0da54a593b34c71b889ee45f5b5bb900c74148c5f7f8c6a9479ee7899f69603c"
dependencies = [
"libc",
]
@@ -1376,19 +1377,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8505b75b31ef7285168dd237c4a7db3c1f3e0927e7d314e670bc98e854272fe9"
dependencies = [
"env_logger 0.6.2",
- "log 0.4.8",
+ "log",
]
[[package]]
name = "finality-grandpa"
-version = "0.11.1"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3cbb25bef9fcad97fb31e817da280b1c9174435b8769c770ee190a330dd181ea"
+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",
@@ -1396,12 +1397,11 @@ dependencies = [
[[package]]
name = "fixed-hash"
-version = "0.5.2"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3367952ceb191f4ab95dd5685dc163ac539e36202f9fcfd0cb22f9f9c542fefc"
+checksum = "32529fc42e86ec06e5047092082aab9ad459b070c5d2a76b14f4f5ce70bf2e84"
dependencies = [
"byteorder 1.3.4",
- "libc",
"rand 0.7.3",
"rustc-hex",
"static_assertions",
@@ -1415,9 +1415,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",
@@ -1432,35 +1432,22 @@ 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.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
]
[[package]]
name = "frame-benchmarking"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
+ "linregress",
"parity-scale-codec",
+ "paste",
"sp-api",
"sp-io",
"sp-runtime",
@@ -1470,7 +1457,7 @@ dependencies = [
[[package]]
name = "frame-benchmarking-cli"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-benchmarking",
"parity-scale-codec",
@@ -1480,6 +1467,7 @@ dependencies = [
"sc-executor",
"sc-service",
"sp-core",
+ "sp-externalities",
"sp-runtime",
"sp-state-machine",
"structopt",
@@ -1487,7 +1475,7 @@ dependencies = [
[[package]]
name = "frame-executive"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -1506,7 +1494,7 @@ dependencies = [
[[package]]
name = "frame-metadata"
-version = "11.0.0-alpha.3"
+version = "11.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"serde",
@@ -1516,14 +1504,14 @@ dependencies = [
[[package]]
name = "frame-support"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"bitmask",
"frame-metadata",
"frame-support-procedural",
"frame-system",
"impl-trait-for-tuples",
- "log 0.4.8",
+ "log",
"once_cell",
"parity-scale-codec",
"paste",
@@ -1541,32 +1529,32 @@ dependencies = [
[[package]]
name = "frame-support-procedural"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support-procedural-tools",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "frame-support-procedural-tools"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "frame-support-procedural-tools-derive"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1587,7 +1575,7 @@ dependencies = [
[[package]]
name = "frame-system"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"criterion 0.2.11",
"frame-support",
@@ -1605,7 +1593,7 @@ dependencies = [
[[package]]
name = "frame-system-rpc-runtime-api"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -1732,7 +1720,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",
@@ -1765,8 +1753,8 @@ checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7"
dependencies = [
"proc-macro-hack",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -1815,7 +1803,6 @@ dependencies = [
"proc-macro-hack",
"proc-macro-nested",
"slab",
- "tokio-io",
]
[[package]]
@@ -1919,22 +1906,22 @@ 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",
]
[[package]]
name = "gloo-timers"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b2d17dbd803c2fc86cb1b613adf63192046a7176f383a8302594654752c4c4a"
+checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f"
dependencies = [
"futures-channel",
"futures-core",
@@ -1949,7 +1936,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",
]
@@ -1966,7 +1953,7 @@ dependencies = [
"futures 0.1.29",
"http 0.1.21",
"indexmap",
- "log 0.4.8",
+ "log",
"slab",
"string",
"tokio-io",
@@ -1974,20 +1961,20 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.2.1"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1"
+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.12",
+ "tokio 0.2.16",
"tokio-util",
]
@@ -2027,9 +2014,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",
]
@@ -2080,6 +2067,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"
@@ -2093,9 +2091,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",
@@ -2121,7 +2119,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]]
@@ -2139,25 +2137,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"
@@ -2173,7 +2152,7 @@ dependencies = [
"httparse",
"iovec",
"itoa",
- "log 0.4.8",
+ "log",
"net2",
"rustc_version",
"time",
@@ -2190,24 +2169,24 @@ dependencies = [
[[package]]
name = "hyper"
-version = "0.13.2"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e"
+checksum = "ed6081100e960d9d74734659ffc9cc91daf1c0fc7aceb8eaa94ee1a3f5046f2e"
dependencies = [
"bytes 0.5.4",
"futures-channel",
"futures-core",
"futures-util",
- "h2 0.2.1",
- "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",
- "tokio 0.2.12",
+ "tokio 0.2.16",
"tower-service",
"want 0.3.0",
]
@@ -2221,28 +2200,15 @@ dependencies = [
"bytes 0.5.4",
"ct-logs",
"futures-util",
- "hyper 0.13.2",
- "log 0.4.8",
+ "hyper 0.13.4",
+ "log",
"rustls 0.17.0",
"rustls-native-certs",
- "tokio 0.2.12",
+ "tokio 0.2.16",
"tokio-rustls",
"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"
@@ -2308,8 +2274,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]]
@@ -2333,6 +2299,16 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "141340095b15ed7491bd3d4ced9d20cebfb826174b6bb03386381f62b01e3d77"
+[[package]]
+name = "intervalier"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
+dependencies = [
+ "futures 0.3.4",
+ "futures-timer 2.0.2",
+]
+
[[package]]
name = "iovec"
version = "0.1.4"
@@ -2344,9 +2320,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"
@@ -2374,9 +2350,9 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.35"
+version = "0.3.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9"
+checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055"
dependencies = [
"wasm-bindgen",
]
@@ -2390,15 +2366,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]]
@@ -2408,7 +2381,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",
@@ -2431,8 +2404,8 @@ checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -2444,10 +2417,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]]
@@ -2457,7 +2430,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",
]
@@ -2472,10 +2445,10 @@ dependencies = [
"globset",
"jsonrpc-core",
"lazy_static",
- "log 0.4.8",
+ "log",
"tokio 0.1.22",
"tokio-codec",
- "unicase 2.6.0",
+ "unicase",
]
[[package]]
@@ -2486,7 +2459,7 @@ checksum = "b94e5773b2ae66e0e02c80775ce6bbba6f15d5bb47c14ec36a36fcf94f8df851"
dependencies = [
"jsonrpc-core",
"jsonrpc-server-utils",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"slab",
"ws",
@@ -2525,25 +2498,24 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb"
dependencies = [
- "log 0.4.8",
+ "log",
]
[[package]]
name = "kvdb"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03080afe6f42cd996da9f568d6add5d7fb5ee2ea7fb7802d2d2cbd836958fd87"
+checksum = "cad096c6849b2ef027fabe35c4aed356d0e3d3f586d0a8361e5e17f1e50a7ce5"
dependencies = [
- "parity-bytes",
"parity-util-mem",
"smallvec 1.2.0",
]
[[package]]
name = "kvdb-memorydb"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9355274e5a9e0a7e8ef43916950eae3949024de2a8dffe4d5a6c13974a37c8e"
+checksum = "4aa954d12cfac958822dfd77aab34f3eec71f103b918c4ab79ab59a36ee594ea"
dependencies = [
"kvdb",
"parity-util-mem",
@@ -2552,14 +2524,14 @@ dependencies = [
[[package]]
name = "kvdb-rocksdb"
-version = "0.6.0"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fecd50b14a534125228d7039951f92aaff742aff151c04546347aba4d3b4fbc"
+checksum = "b3f14c3a10c8894d26175e57e9e26032e6d6c49c30cbe2468c5bf5f6b64bb0be"
dependencies = [
"fs-swap",
"interleaved-ordered",
"kvdb",
- "log 0.4.8",
+ "log",
"num_cpus",
"owning_ref",
"parity-util-mem",
@@ -2571,27 +2543,21 @@ dependencies = [
[[package]]
name = "kvdb-web"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a985c47b4c46429e96033ebf6eaed784a81ceccb4e5df13d63f3b9078a4df81"
+checksum = "26f96eec962af83cdf7c83036b3dbb0ae6a1249ddab746820618e2567ca8ebcd"
dependencies = [
"futures 0.3.4",
"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"
@@ -2612,9 +2578,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 = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0"
+
+[[package]]
+name = "libflate"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
+checksum = "d9135df43b1f5d0e333385cb6e7897ecd1a43d7d11b91ac003f4d2c2d2401fdd"
+dependencies = [
+ "adler32",
+ "crc32fast",
+ "rle-decode-fast",
+ "take_mut",
+]
[[package]]
name = "libloading"
@@ -2626,11 +2604,17 @@ dependencies = [
"winapi 0.3.8",
]
+[[package]]
+name = "libm"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+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",
@@ -2656,8 +2640,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",
@@ -2666,22 +2650,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",
@@ -2694,24 +2679,24 @@ dependencies = [
"thiserror",
"unsigned-varint",
"void",
- "zeroize 1.1.0",
+ "zeroize",
]
[[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",
@@ -2720,20 +2705,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",
@@ -2748,9 +2733,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",
@@ -2760,7 +2745,7 @@ dependencies = [
"futures_codec",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
+ "log",
"lru",
"prost",
"prost-build",
@@ -2773,14 +2758,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",
@@ -2789,9 +2774,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",
@@ -2801,8 +2786,8 @@ dependencies = [
"futures_codec",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
- "parity-multihash",
+ "log",
+ "multihash",
"prost",
"prost-build",
"rand 0.7.3",
@@ -2816,9 +2801,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",
@@ -2828,7 +2813,7 @@ dependencies = [
"lazy_static",
"libp2p-core",
"libp2p-swarm",
- "log 0.4.8",
+ "log",
"net2",
"rand 0.7.3",
"smallvec 1.2.0",
@@ -2838,31 +2823,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 2.0.0",
+ "curve25519-dalek",
"futures 0.3.4",
"lazy_static",
"libp2p-core",
- "log 0.4.8",
+ "log",
"prost",
"prost-build",
"rand 0.7.3",
@@ -2870,19 +2855,19 @@ dependencies = [
"snow",
"static_assertions",
"x25519-dalek",
- "zeroize 1.1.0",
+ "zeroize",
]
[[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",
@@ -2890,15 +2875,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",
@@ -2908,12 +2893,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",
@@ -2922,9 +2907,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",
@@ -2933,7 +2918,7 @@ dependencies = [
"js-sys",
"lazy_static",
"libp2p-core",
- "log 0.4.8",
+ "log",
"parity-send-wrapper",
"pin-project",
"prost",
@@ -2952,13 +2937,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",
@@ -2966,9 +2952,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",
@@ -2976,26 +2962,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",
@@ -3007,16 +2993,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",
@@ -3028,9 +3014,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",
@@ -3095,21 +3081,32 @@ dependencies = [
]
[[package]]
-name = "lock_api"
-version = "0.3.3"
+name = "linregress"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b"
+checksum = "9290cf6f928576eeb9c096c6fad9d8d452a0a1a70a2bbffa6e36064eedc0aac9"
dependencies = [
- "scopeguard",
+ "failure",
+ "nalgebra",
+ "statrs",
]
[[package]]
-name = "log"
-version = "0.3.9"
+name = "lite-json"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
+checksum = "faa835713bb12ba5204013497da16caf2dd2eee25ca829d0efaa054fb38c4ddd"
dependencies = [
- "log 0.4.8",
+ "paste",
+]
+
+[[package]]
+name = "lock_api"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b"
+dependencies = [
+ "scopeguard",
]
[[package]]
@@ -3145,6 +3142,15 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
+[[package]]
+name = "matrixmultiply"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f"
+dependencies = [
+ "rawpointer",
+]
+
[[package]]
name = "maybe-uninit"
version = "2.0.0"
@@ -3157,20 +3163,30 @@ 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]]
name = "memory-db"
-version = "0.19.0"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "198831fe8722331a395bc199a5d08efbc197497ef354cb4c77b969c02ffc0fc4"
+checksum = "f58381b20ebe2c578e75dececd9da411414903415349548ccc46aac3209cdfbc"
dependencies = [
"ahash",
"hash-db",
@@ -3186,23 +3202,14 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882"
[[package]]
name = "merlin"
-version = "1.3.0"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b0942b357c1b4d0dc43ba724674ec89c3218e6ca2b3e8269e7cb53bcecd2f6e"
+checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78"
dependencies = [
"byteorder 1.3.4",
"keccak",
- "rand_core 0.4.2",
- "zeroize 1.1.0",
-]
-
-[[package]]
-name = "mime"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
-dependencies = [
- "log 0.3.9",
+ "rand_core 0.5.1",
+ "zeroize",
]
[[package]]
@@ -3226,7 +3233,7 @@ dependencies = [
"iovec",
"kernel32-sys",
"libc",
- "log 0.4.8",
+ "log",
"miow",
"net2",
"slab",
@@ -3240,7 +3247,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
dependencies = [
"lazycell",
- "log 0.4.8",
+ "log",
"mio",
"slab",
]
@@ -3274,51 +3281,65 @@ 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",
]
[[package]]
-name = "names"
-version = "0.11.0"
+name = "nalgebra"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da"
+checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2"
dependencies = [
- "rand 0.3.23",
+ "alga",
+ "approx",
+ "generic-array",
+ "matrixmultiply",
+ "num-complex",
+ "num-rational",
+ "num-traits 0.2.11",
+ "rand 0.6.5",
+ "typenum",
]
[[package]]
-name = "native-tls"
-version = "0.2.3"
+name = "names"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e"
+checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da"
dependencies = [
- "lazy_static",
- "libc",
- "log 0.4.8",
- "openssl",
- "openssl-probe",
- "openssl-sys",
- "schannel",
- "security-framework 0.3.4",
- "security-framework-sys 0.3.3",
- "tempfile",
+ "rand 0.3.23",
]
[[package]]
@@ -3332,6 +3353,20 @@ dependencies = [
"winapi 0.3.8",
]
+[[package]]
+name = "netstat2"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29449d242064c48d3057a194b049a2bdcccadda16faa18a91468677b44e8d422"
+dependencies = [
+ "bitflags",
+ "byteorder 1.3.4",
+ "enum-primitive-derive",
+ "libc",
+ "num-traits 0.2.11",
+ "thiserror",
+]
+
[[package]]
name = "nix"
version = "0.17.0"
@@ -3345,9 +3380,24 @@ 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.3"
+version = "2.0.0-alpha.5"
dependencies = [
"assert_cmd",
"frame-benchmarking-cli",
@@ -3356,7 +3406,7 @@ dependencies = [
"futures 0.3.4",
"hex-literal",
"jsonrpc-core",
- "log 0.4.8",
+ "log",
"nix",
"node-executor",
"node-inspect",
@@ -3369,10 +3419,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",
@@ -3411,14 +3464,13 @@ dependencies = [
"substrate-build-script-utils",
"tempfile",
"tracing",
- "vergen",
"wasm-bindgen",
"wasm-bindgen-futures",
]
[[package]]
name = "node-executor"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"criterion 0.3.1",
"frame-benchmarking",
@@ -3452,10 +3504,10 @@ dependencies = [
[[package]]
name = "node-inspect"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sc-cli",
"sc-client-api",
@@ -3468,7 +3520,7 @@ dependencies = [
[[package]]
name = "node-primitives"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"pretty_assertions",
"sp-core",
@@ -3478,7 +3530,7 @@ dependencies = [
[[package]]
name = "node-rpc"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"jsonrpc-core",
"node-primitives",
@@ -3501,20 +3553,20 @@ dependencies = [
[[package]]
name = "node-rpc-client"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"env_logger 0.7.1",
"futures 0.1.29",
"hyper 0.12.35",
"jsonrpc-core-client",
- "log 0.4.8",
+ "log",
"node-primitives",
"sc-rpc",
]
[[package]]
name = "node-runtime"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-benchmarking",
"frame-executive",
@@ -3540,8 +3592,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",
@@ -3555,7 +3609,6 @@ dependencies = [
"pallet-utility",
"pallet-vesting",
"parity-scale-codec",
- "rustc-hex",
"serde",
"sp-api",
"sp-authority-discovery",
@@ -3577,10 +3630,10 @@ dependencies = [
[[package]]
name = "node-template"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"node-template-runtime",
"sc-basic-authorship",
"sc-cli",
@@ -3601,12 +3654,11 @@ dependencies = [
"sp-transaction-pool",
"structopt",
"substrate-build-script-utils",
- "vergen",
]
[[package]]
name = "node-template-runtime"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-executive",
"frame-support",
@@ -3638,13 +3690,13 @@ dependencies = [
[[package]]
name = "node-testing"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"criterion 0.3.1",
"frame-support",
"frame-system",
"fs_extra",
- "log 0.4.8",
+ "log",
"node-executor",
"node-primitives",
"node-runtime",
@@ -3684,9 +3736,9 @@ dependencies = [
[[package]]
name = "node-transaction-factory"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sc-block-builder",
"sc-cli",
@@ -3715,12 +3767,12 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
[[package]]
name = "nom"
-version = "4.2.3"
+version = "5.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6"
+checksum = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6"
dependencies = [
"memchr",
- "version_check 0.1.5",
+ "version_check",
]
[[package]]
@@ -3740,7 +3792,17 @@ checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"
dependencies = [
"autocfg 1.0.0",
"num-integer",
- "num-traits",
+ "num-traits 0.2.11",
+]
+
+[[package]]
+name = "num-complex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"
+dependencies = [
+ "autocfg 1.0.0",
+ "num-traits 0.2.11",
]
[[package]]
@@ -3750,19 +3812,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]]
@@ -3772,6 +3843,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
dependencies = [
"autocfg 1.0.0",
+ "libm",
]
[[package]]
@@ -3829,39 +3901,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"
@@ -3882,7 +3927,7 @@ dependencies = [
[[package]]
name = "pallet-assets"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -3896,7 +3941,7 @@ dependencies = [
[[package]]
name = "pallet-aura"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -3918,7 +3963,7 @@ dependencies = [
[[package]]
name = "pallet-authority-discovery"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -3936,7 +3981,7 @@ dependencies = [
[[package]]
name = "pallet-authorship"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -3952,18 +3997,16 @@ dependencies = [
[[package]]
name = "pallet-babe"
-version = "2.0.0-alpha.3"
+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",
"sp-core",
"sp-inherents",
"sp-io",
@@ -3971,13 +4014,11 @@ dependencies = [
"sp-staking",
"sp-std",
"sp-timestamp",
- "sp-version",
- "substrate-test-runtime",
]
[[package]]
name = "pallet-balances"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -3993,7 +4034,7 @@ dependencies = [
[[package]]
name = "pallet-benchmark"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4007,8 +4048,9 @@ dependencies = [
[[package]]
name = "pallet-collective"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"hex-literal",
@@ -4023,7 +4065,7 @@ dependencies = [
[[package]]
name = "pallet-contracts"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"assert_matches",
"frame-support",
@@ -4048,7 +4090,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-primitives"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -4057,7 +4099,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-rpc"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -4076,7 +4118,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-rpc-runtime-api"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"pallet-contracts-primitives",
"parity-scale-codec",
@@ -4087,12 +4129,14 @@ dependencies = [
[[package]]
name = "pallet-democracy"
-version = "2.0.0-alpha.3"
+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",
@@ -4104,7 +4148,7 @@ dependencies = [
[[package]]
name = "pallet-elections"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4120,12 +4164,13 @@ dependencies = [
[[package]]
name = "pallet-elections-phragmen"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
"hex-literal",
"pallet-balances",
+ "pallet-scheduler",
"parity-scale-codec",
"serde",
"sp-core",
@@ -4138,7 +4183,7 @@ dependencies = [
[[package]]
name = "pallet-evm"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"evm",
"frame-support",
@@ -4158,7 +4203,7 @@ dependencies = [
[[package]]
name = "pallet-example"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4174,13 +4219,13 @@ dependencies = [
[[package]]
name = "pallet-example-offchain-worker"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
+ "lite-json",
"parity-scale-codec",
"serde",
- "serde_json",
"sp-core",
"sp-io",
"sp-runtime",
@@ -4189,7 +4234,7 @@ dependencies = [
[[package]]
name = "pallet-finality-tracker"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4206,7 +4251,7 @@ dependencies = [
[[package]]
name = "pallet-generic-asset"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4220,7 +4265,7 @@ dependencies = [
[[package]]
name = "pallet-grandpa"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4238,7 +4283,7 @@ dependencies = [
[[package]]
name = "pallet-identity"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -4255,8 +4300,9 @@ dependencies = [
[[package]]
name = "pallet-im-online"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"pallet-authorship",
@@ -4273,7 +4319,7 @@ dependencies = [
[[package]]
name = "pallet-indices"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4289,7 +4335,7 @@ dependencies = [
[[package]]
name = "pallet-membership"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4303,7 +4349,7 @@ dependencies = [
[[package]]
name = "pallet-nicks"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4318,7 +4364,7 @@ dependencies = [
[[package]]
name = "pallet-offences"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4332,9 +4378,27 @@ dependencies = [
"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-randomness-collective-flip"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4348,7 +4412,7 @@ dependencies = [
[[package]]
name = "pallet-recovery"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"enumflags2",
"frame-support",
@@ -4362,9 +4426,24 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-scheduler"
+version = "2.0.0-alpha.5"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-scored-pool"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4379,7 +4458,7 @@ dependencies = [
[[package]]
name = "pallet-session"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4399,25 +4478,33 @@ dependencies = [
[[package]]
name = "pallet-session-benchmarking"
-version = "2.0.0-alpha.3"
+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",
]
[[package]]
name = "pallet-society"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
"pallet-balances",
"parity-scale-codec",
- "rand_chacha 0.2.1",
+ "rand_chacha 0.2.2",
"serde",
"sp-core",
"sp-io",
@@ -4427,43 +4514,50 @@ dependencies = [
[[package]]
name = "pallet-staking"
-version = "2.0.0-alpha.3"
+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",
- "rand_chacha 0.2.1",
+ "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",
]
[[package]]
name = "pallet-staking-reward-curve"
-version = "2.0.0-alpha.3"
+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]]
name = "pallet-sudo"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4477,12 +4571,11 @@ dependencies = [
[[package]]
name = "pallet-template"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
"parity-scale-codec",
- "safe-mix",
"sp-core",
"sp-io",
"sp-runtime",
@@ -4490,7 +4583,7 @@ dependencies = [
[[package]]
name = "pallet-timestamp"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4508,7 +4601,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -4523,7 +4616,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -4540,7 +4633,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -4553,8 +4646,9 @@ dependencies = [
[[package]]
name = "pallet-treasury"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"pallet-balances",
@@ -4568,8 +4662,9 @@ dependencies = [
[[package]]
name = "pallet-utility"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"pallet-balances",
@@ -4583,7 +4678,7 @@ dependencies = [
[[package]]
name = "pallet-vesting"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -4600,12 +4695,6 @@ dependencies = [
"sp-storage",
]
-[[package]]
-name = "parity-bytes"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a"
-
[[package]]
name = "parity-multiaddr"
version = "0.7.3"
@@ -4624,6 +4713,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"
@@ -4641,9 +4748,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",
@@ -4660,8 +4767,8 @@ checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -4672,9 +4779,9 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f"
[[package]]
name = "parity-util-mem"
-version = "0.5.2"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9344bc978467339b9ae688f9dcf279d1aaa0ccfc88e9a780c729b765a82d57d5"
+checksum = "6e42755f26e5ea21a6a819d9e63cbd70713e9867a2b767ec2cc65ca7659532c5"
dependencies = [
"cfg-if",
"ethereum-types",
@@ -4695,7 +4802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"
dependencies = [
"proc-macro2",
- "syn",
+ "syn 1.0.17",
"synstructure",
]
@@ -4766,9 +4873,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "0.1.7"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63e1afe738d71b1ebab5f1207c055054015427dbfc7bbe9ee1266894156ec046"
+checksum = "ab4fb1930692d1b6a9cfabdde3d06ea0a7d186518e2f4d67660d8970e2fa647a"
dependencies = [
"paste-impl",
"proc-macro-hack",
@@ -4776,14 +4883,14 @@ dependencies = [
[[package]]
name = "paste-impl"
-version = "0.1.7"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d4dc4a7f6f743211c5aab239640a65091535d97d43d92a52bca435a640892bb"
+checksum = "a62486e111e571b1e93b710b61e8f493c0013be39629b714cb166bdb06aa5a8a"
dependencies = [
"proc-macro-hack",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -4846,8 +4953,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]]
@@ -4874,6 +4981,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"
@@ -4881,7 +4994,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",
]
@@ -4894,9 +5007,9 @@ checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
[[package]]
name = "predicates"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1188bf092c81c18228c383b190c069a8a613c18a046ffa9fdfc0f5fc8fb2da8a"
+checksum = "347a1b6f0b21e636bc9872fb60b83b8e185f6f5516298b8238699f7f9a531030"
dependencies = [
"difference",
"predicates-core",
@@ -4932,9 +5045,9 @@ dependencies = [
[[package]]
name = "primitive-types"
-version = "0.6.2"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975"
+checksum = "e5e4b9943a2da369aec5e96f7c10ebc74fcf434d39590d974b0a3460e6f67fbb"
dependencies = [
"fixed-hash",
"impl-codec",
@@ -4954,68 +5067,78 @@ dependencies = [
[[package]]
name = "proc-macro-error"
-version = "0.4.9"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242"
+checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
- "quote",
- "rustversion",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
+ "version_check",
]
[[package]]
name = "proc-macro-error-attr"
-version = "0.4.9"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253"
+checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de"
dependencies = [
"proc-macro2",
- "quote",
- "rustversion",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
"syn-mid",
+ "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]]
@@ -5037,7 +5160,7 @@ dependencies = [
"bytes 0.5.4",
"heck",
"itertools",
- "log 0.4.8",
+ "log",
"multimap",
"petgraph",
"prost",
@@ -5055,8 +5178,8 @@ dependencies = [
"anyhow",
"itertools",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -5071,9 +5194,9 @@ dependencies = [
[[package]]
name = "protobuf"
-version = "2.10.1"
+version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5"
+checksum = "71964f34fd51cf04882d7ae3325fa0794d4cad66a03d0003f38d8ae4f63ba126"
[[package]]
name = "pwasm-utils"
@@ -5082,7 +5205,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",
]
@@ -5099,22 +5222,28 @@ 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",
]
[[package]]
name = "quicksink"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530"
+checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858"
dependencies = [
"futures-core",
"futures-sink",
"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"
@@ -5124,6 +5253,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"
@@ -5147,6 +5282,19 @@ dependencies = [
"winapi 0.3.8",
]
+[[package]]
+name = "rand"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"
+dependencies = [
+ "cloudabi",
+ "fuchsia-cprng",
+ "libc",
+ "rand_core 0.3.1",
+ "winapi 0.3.8",
+]
+
[[package]]
name = "rand"
version = "0.6.5"
@@ -5174,7 +5322,7 @@ checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom",
"libc",
- "rand_chacha 0.2.1",
+ "rand_chacha 0.2.2",
"rand_core 0.5.1",
"rand_hc 0.2.0",
]
@@ -5191,11 +5339,11 @@ dependencies = [
[[package]]
name = "rand_chacha"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
dependencies = [
- "c2-chacha",
+ "ppv-lite86",
"rand_core 0.5.1",
]
@@ -5316,6 +5464,12 @@ dependencies = [
"rustc_version",
]
+[[package]]
+name = "rawpointer"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
+
[[package]]
name = "rayon"
version = "1.3.0"
@@ -5368,9 +5522,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",
@@ -5380,18 +5534,18 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.1.8"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9"
+checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
dependencies = [
"byteorder 1.3.4",
]
[[package]]
name = "regex-syntax"
-version = "0.6.14"
+version = "0.6.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06"
+checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
[[package]]
name = "region"
@@ -5416,9 +5570,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",
@@ -5429,11 +5583,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",
]
@@ -5504,7 +5664,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",
@@ -5517,7 +5677,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",
@@ -5532,7 +5692,7 @@ dependencies = [
"openssl-probe",
"rustls 0.17.0",
"schannel",
- "security-framework 0.4.1",
+ "security-framework",
]
[[package]]
@@ -5542,8 +5702,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]]
@@ -5559,9 +5719,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"
@@ -5572,12 +5732,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"
@@ -5609,7 +5763,7 @@ dependencies = [
[[package]]
name = "sc-authority-discovery"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"bytes 0.5.4",
"derive_more",
@@ -5617,7 +5771,7 @@ dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
"libp2p",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"prost",
"prost-build",
@@ -5639,10 +5793,11 @@ dependencies = [
[[package]]
name = "sc-basic-authorship"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"futures 0.3.4",
- "log 0.4.8",
+ "futures-timer 3.0.2",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-block-builder",
@@ -5662,7 +5817,7 @@ dependencies = [
[[package]]
name = "sc-block-builder"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -5679,7 +5834,7 @@ dependencies = [
[[package]]
name = "sc-chain-spec"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"impl-trait-for-tuples",
"sc-chain-spec-derive",
@@ -5687,23 +5842,24 @@ dependencies = [
"sc-telemetry",
"serde",
"serde_json",
+ "sp-chain-spec",
"sp-core",
"sp-runtime",
]
[[package]]
name = "sc-chain-spec-derive"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "sc-cli"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"ansi_term 0.12.1",
"app_dirs",
@@ -5715,8 +5871,9 @@ dependencies = [
"fdlimit",
"futures 0.3.4",
"lazy_static",
- "log 0.4.8",
+ "log",
"names",
+ "nix",
"parity-util-mem",
"regex",
"rpassword",
@@ -5733,16 +5890,17 @@ dependencies = [
"sp-panic-handler",
"sp-runtime",
"sp-state-machine",
+ "sp-utils",
"structopt",
"substrate-prometheus-endpoint",
"tempfile",
"time",
- "tokio 0.2.12",
+ "tokio 0.2.16",
]
[[package]]
name = "sc-client"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"env_logger 0.7.1",
@@ -5752,7 +5910,7 @@ dependencies = [
"hex-literal",
"kvdb",
"kvdb-memorydb",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-block-builder",
@@ -5771,6 +5929,7 @@ dependencies = [
"sp-state-machine",
"sp-std",
"sp-trie",
+ "sp-utils",
"sp-version",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
@@ -5780,7 +5939,7 @@ dependencies = [
[[package]]
name = "sc-client-api"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
"fnv",
@@ -5788,7 +5947,8 @@ dependencies = [
"hash-db",
"hex-literal",
"kvdb",
- "log 0.4.8",
+ "lazy_static",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-executor",
@@ -5807,12 +5967,13 @@ dependencies = [
"sp-test-primitives",
"sp-transaction-pool",
"sp-trie",
+ "sp-utils",
"sp-version",
]
[[package]]
name = "sc-client-db"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"env_logger 0.7.1",
"hash-db",
@@ -5820,12 +5981,11 @@ dependencies = [
"kvdb-memorydb",
"kvdb-rocksdb",
"linked-hash-map",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.10.0",
"quickcheck",
- "rand 0.7.3",
"sc-client",
"sc-client-api",
"sc-executor",
@@ -5844,13 +6004,13 @@ dependencies = [
[[package]]
name = "sc-consensus-aura"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"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",
@@ -5882,18 +6042,18 @@ dependencies = [
[[package]]
name = "sc-consensus-babe"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"env_logger 0.7.1",
"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",
@@ -5918,6 +6078,7 @@ dependencies = [
"sp-blockchain",
"sp-consensus",
"sp-consensus-babe",
+ "sp-consensus-vrf",
"sp-core",
"sp-inherents",
"sp-io",
@@ -5931,7 +6092,7 @@ dependencies = [
[[package]]
name = "sc-consensus-babe-rpc"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -5956,7 +6117,7 @@ dependencies = [
[[package]]
name = "sc-consensus-epochs"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"fork-tree",
"parity-scale-codec",
@@ -5968,15 +6129,16 @@ dependencies = [
[[package]]
name = "sc-consensus-manual-seal"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
+ "assert_matches",
"derive_more",
"env_logger 0.7.1",
"futures 0.3.4",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"sc-basic-authorship",
"sc-client",
@@ -5991,16 +6153,16 @@ dependencies = [
"substrate-test-runtime-client",
"substrate-test-runtime-transaction-pool",
"tempfile",
- "tokio 0.2.12",
+ "tokio 0.2.16",
]
[[package]]
name = "sc-consensus-pow"
-version = "0.8.0-alpha.3"
+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",
@@ -6016,11 +6178,11 @@ dependencies = [
[[package]]
name = "sc-consensus-slots"
-version = "0.8.0-alpha.3"
+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",
@@ -6037,9 +6199,9 @@ dependencies = [
[[package]]
name = "sc-consensus-uncles"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
- "log 0.4.8",
+ "log",
"sc-client-api",
"sp-authorship",
"sp-consensus",
@@ -6050,14 +6212,14 @@ dependencies = [
[[package]]
name = "sc-executor"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"assert_matches",
"derive_more",
"hex-literal",
"lazy_static",
"libsecp256k1",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parity-wasm 0.41.0",
"parking_lot 0.10.0",
@@ -6084,11 +6246,12 @@ dependencies = [
[[package]]
name = "sc-executor-common"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
+ "parity-wasm 0.41.0",
"sp-allocator",
"sp-core",
"sp-runtime-interface",
@@ -6099,11 +6262,10 @@ dependencies = [
[[package]]
name = "sc-executor-wasmi"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
- "log 0.4.8",
+ "log",
"parity-scale-codec",
- "parity-wasm 0.41.0",
"sc-executor-common",
"sp-allocator",
"sp-core",
@@ -6114,10 +6276,12 @@ dependencies = [
[[package]]
name = "sc-executor-wasmtime"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"assert_matches",
- "log 0.4.8",
+ "cranelift-codegen",
+ "cranelift-wasm",
+ "log",
"parity-scale-codec",
"parity-wasm 0.41.0",
"sc-executor-common",
@@ -6126,12 +6290,14 @@ dependencies = [
"sp-core",
"sp-runtime-interface",
"sp-wasm-interface",
- "wasmtime",
+ "substrate-wasmtime",
+ "substrate-wasmtime-runtime",
+ "wasmtime-environ",
]
[[package]]
name = "sc-finality-grandpa"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"assert_matches",
"env_logger 0.7.1",
@@ -6139,7 +6305,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",
@@ -6165,19 +6331,20 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-state-machine",
+ "sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"tempfile",
- "tokio 0.2.12",
+ "tokio 0.2.16",
]
[[package]]
name = "sc-informant"
-version = "0.8.0-alpha.3"
+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",
@@ -6189,7 +6356,7 @@ dependencies = [
[[package]]
name = "sc-keystore"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
"hex",
@@ -6204,7 +6371,7 @@ dependencies = [
[[package]]
name = "sc-network"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"assert_matches",
"async-std",
@@ -6219,10 +6386,11 @@ dependencies = [
"futures 0.3.4",
"futures-timer 3.0.2",
"futures_codec",
+ "hex",
"libp2p",
"linked-hash-map",
"linked_hash_set",
- "log 0.4.8",
+ "log",
"lru",
"nohash-hasher",
"parity-scale-codec",
@@ -6232,7 +6400,6 @@ dependencies = [
"prost-build",
"quickcheck",
"rand 0.7.3",
- "rustc-hex",
"sc-block-builder",
"sc-client",
"sc-client-api",
@@ -6250,6 +6417,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-test-primitives",
+ "sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime",
"substrate-test-runtime-client",
@@ -6258,20 +6426,22 @@ dependencies = [
"unsigned-varint",
"void",
"wasm-timer",
- "zeroize 1.1.0",
+ "zeroize",
]
[[package]]
name = "sc-network-gossip"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
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",
]
@@ -6283,7 +6453,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",
@@ -6302,7 +6472,7 @@ dependencies = [
[[package]]
name = "sc-offchain"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"bytes 0.5.4",
"env_logger 0.7.1",
@@ -6310,9 +6480,9 @@ dependencies = [
"fnv",
"futures 0.3.4",
"futures-timer 3.0.2",
- "hyper 0.13.2",
+ "hyper 0.13.4",
"hyper-rustls",
- "log 0.4.8",
+ "log",
"num_cpus",
"parity-scale-codec",
"parking_lot 0.10.0",
@@ -6327,26 +6497,28 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-transaction-pool",
+ "sp-utils",
"substrate-test-runtime-client",
"threadpool",
- "tokio 0.2.12",
+ "tokio 0.2.16",
]
[[package]]
name = "sc-peerset"
-version = "2.0.0-alpha.3"
+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",
]
[[package]]
name = "sc-rpc"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"assert_matches",
"futures 0.1.29",
@@ -6354,10 +6526,9 @@ dependencies = [
"hash-db",
"jsonrpc-core",
"jsonrpc-pubsub",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
- "rustc-hex",
"sc-block-builder",
"sc-client",
"sc-client-api",
@@ -6369,6 +6540,7 @@ dependencies = [
"serde_json",
"sp-api",
"sp-blockchain",
+ "sp-chain-spec",
"sp-core",
"sp-io",
"sp-offchain",
@@ -6377,6 +6549,7 @@ dependencies = [
"sp-session",
"sp-state-machine",
"sp-transaction-pool",
+ "sp-utils",
"sp-version",
"substrate-test-runtime-client",
"tokio 0.1.22",
@@ -6384,7 +6557,7 @@ dependencies = [
[[package]]
name = "sc-rpc-api"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -6392,11 +6565,12 @@ dependencies = [
"jsonrpc-core-client",
"jsonrpc-derive",
"jsonrpc-pubsub",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"serde",
"serde_json",
+ "sp-chain-spec",
"sp-core",
"sp-rpc",
"sp-runtime",
@@ -6406,13 +6580,13 @@ dependencies = [
[[package]]
name = "sc-rpc-server"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"jsonrpc-core",
"jsonrpc-http-server",
"jsonrpc-pubsub",
"jsonrpc-ws-server",
- "log 0.4.8",
+ "log",
"serde",
"serde_json",
"sp-runtime",
@@ -6433,7 +6607,7 @@ dependencies = [
[[package]]
name = "sc-service"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"exit-future",
@@ -6442,11 +6616,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",
@@ -6475,10 +6651,10 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-transaction-pool",
+ "sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"sysinfo",
- "target_info",
"tracing",
"wasm-timer",
]
@@ -6491,7 +6667,7 @@ dependencies = [
"fdlimit",
"futures 0.1.29",
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"sc-client",
"sc-network",
"sc-service",
@@ -6505,10 +6681,10 @@ dependencies = [
[[package]]
name = "sc-state-db"
-version = "0.8.0-alpha.3"
+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",
@@ -6519,13 +6695,13 @@ dependencies = [
[[package]]
name = "sc-telemetry"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"bytes 0.5.4",
"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",
@@ -6540,10 +6716,10 @@ dependencies = [
[[package]]
name = "sc-tracing"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"erased-serde",
- "log 0.4.8",
+ "log",
"parking_lot 0.10.0",
"sc-telemetry",
"serde",
@@ -6555,14 +6731,14 @@ dependencies = [
[[package]]
name = "sc-transaction-graph"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"assert_matches",
"criterion 0.3.1",
"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",
@@ -6571,19 +6747,22 @@ dependencies = [
"sp-core",
"sp-runtime",
"sp-transaction-pool",
+ "sp-utils",
"substrate-test-runtime",
"wasm-timer",
]
[[package]]
name = "sc-transaction-pool"
-version = "2.0.0-alpha.3"
+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",
@@ -6595,6 +6774,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-transaction-pool",
+ "sp-utils",
"substrate-test-runtime-client",
"substrate-test-runtime-transaction-pool",
"wasm-timer",
@@ -6602,9 +6782,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",
@@ -6612,19 +6792,20 @@ dependencies = [
[[package]]
name = "schnorrkel"
-version = "0.8.5"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eacd8381b3c37840c9c9f40472af529e49975bdcbc24f83c31059fd6539023d3"
+checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862"
dependencies = [
- "curve25519-dalek 1.2.3",
- "failure",
+ "arrayref",
+ "arrayvec 0.5.1",
+ "curve25519-dalek",
+ "getrandom",
"merlin",
- "rand 0.6.5",
- "rand_core 0.4.2",
- "rand_os",
+ "rand 0.7.3",
+ "rand_core 0.5.1",
"sha2",
"subtle 2.2.2",
- "zeroize 0.9.3",
+ "zeroize",
]
[[package]]
@@ -6655,8 +6836,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]]
@@ -6671,44 +6852,24 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df"
-dependencies = [
- "core-foundation 0.6.4",
- "core-foundation-sys 0.6.2",
- "libc",
- "security-framework-sys 0.3.3",
-]
-
-[[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 0.7.0",
- "core-foundation-sys 0.7.0",
- "security-framework-sys 0.4.1",
-]
-
-[[package]]
-name = "security-framework-sys"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895"
-dependencies = [
- "core-foundation-sys 0.6.2",
+ "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 0.7.0",
+ "core-foundation-sys",
"libc",
]
@@ -6757,29 +6918,29 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
[[package]]
name = "serde"
-version = "1.0.104"
+version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
+checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.104"
+version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
+checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "serde_json"
-version = "1.0.48"
+version = "1.0.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
+checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9"
dependencies = [
"itoa",
"ryu",
@@ -6901,8 +7062,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]]
@@ -6948,9 +7109,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",
@@ -6958,18 +7119,12 @@ dependencies = [
"thiserror",
]
-[[package]]
-name = "sourcefile"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3"
-
[[package]]
name = "sp-allocator"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"sp-core",
"sp-std",
"sp-wasm-interface",
@@ -6977,7 +7132,7 @@ dependencies = [
[[package]]
name = "sp-api"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"hash-db",
"parity-scale-codec",
@@ -6992,13 +7147,13 @@ dependencies = [
[[package]]
name = "sp-api-proc-macro"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"blake2-rfc",
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7022,7 +7177,7 @@ dependencies = [
[[package]]
name = "sp-application-crypto"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"serde",
@@ -7044,11 +7199,11 @@ dependencies = [
[[package]]
name = "sp-arithmetic"
-version = "2.0.0-alpha.3"
+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",
@@ -7057,9 +7212,20 @@ 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.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7070,7 +7236,7 @@ dependencies = [
[[package]]
name = "sp-authorship"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-inherents",
@@ -7080,7 +7246,7 @@ dependencies = [
[[package]]
name = "sp-block-builder"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7091,10 +7257,10 @@ dependencies = [
[[package]]
name = "sp-blockchain"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
- "log 0.4.8",
+ "log",
"lru",
"parity-scale-codec",
"parking_lot 0.10.0",
@@ -7104,16 +7270,24 @@ dependencies = [
"sp-state-machine",
]
+[[package]]
+name = "sp-chain-spec"
+version = "2.0.0-alpha.5"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "sp-consensus"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"derive_more",
"futures 0.3.4",
"futures-diagnose",
"futures-timer 3.0.2",
"libp2p",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"parking_lot 0.10.0",
"serde",
@@ -7123,12 +7297,13 @@ dependencies = [
"sp-state-machine",
"sp-std",
"sp-test-primitives",
+ "sp-utils",
"sp-version",
]
[[package]]
name = "sp-consensus-aura"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7141,13 +7316,13 @@ dependencies = [
[[package]]
name = "sp-consensus-babe"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"parity-scale-codec",
- "schnorrkel",
"sp-api",
"sp-application-crypto",
"sp-consensus",
+ "sp-consensus-vrf",
"sp-inherents",
"sp-runtime",
"sp-std",
@@ -7156,7 +7331,7 @@ dependencies = [
[[package]]
name = "sp-consensus-pow"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7165,9 +7340,20 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "sp-consensus-vrf"
+version = "0.8.0-alpha.5"
+dependencies = [
+ "parity-scale-codec",
+ "schnorrkel",
+ "sp-core",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "sp-core"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"base58",
"blake2-rfc",
@@ -7182,8 +7368,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",
@@ -7191,7 +7377,6 @@ dependencies = [
"primitive-types",
"rand 0.7.3",
"regex",
- "rustc-hex",
"schnorrkel",
"serde",
"serde_json",
@@ -7204,24 +7389,24 @@ dependencies = [
"sp-storage",
"substrate-bip39",
"tiny-bip39",
- "tiny-keccak 2.0.1",
+ "tiny-keccak 2.0.2",
"twox-hash",
"wasmi",
- "zeroize 1.1.0",
+ "zeroize",
]
[[package]]
name = "sp-debug-derive"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "sp-externalities"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"environmental",
"sp-std",
@@ -7230,7 +7415,7 @@ dependencies = [
[[package]]
name = "sp-finality-grandpa"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"serde",
@@ -7242,7 +7427,7 @@ dependencies = [
[[package]]
name = "sp-finality-tracker"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-inherents",
@@ -7251,7 +7436,7 @@ dependencies = [
[[package]]
name = "sp-inherents"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"derive_more",
"parity-scale-codec",
@@ -7262,11 +7447,11 @@ dependencies = [
[[package]]
name = "sp-io"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"hash-db",
"libsecp256k1",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sp-core",
"sp-externalities",
@@ -7279,7 +7464,7 @@ dependencies = [
[[package]]
name = "sp-keyring"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"lazy_static",
"sp-core",
@@ -7289,7 +7474,7 @@ dependencies = [
[[package]]
name = "sp-offchain"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"sp-api",
"sp-runtime",
@@ -7297,27 +7482,39 @@ dependencies = [
[[package]]
name = "sp-panic-handler"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"backtrace",
- "log 0.4.8",
+ "log",
]
[[package]]
name = "sp-phragmen"
-version = "2.0.0-alpha.3"
+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.3"
+version = "2.0.0-alpha.5"
dependencies = [
"serde",
"serde_json",
@@ -7326,11 +7523,11 @@ dependencies = [
[[package]]
name = "sp-runtime"
-version = "2.0.0-alpha.3"
+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",
@@ -7347,7 +7544,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"primitive-types",
@@ -7366,13 +7563,13 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-proc-macro"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"Inflector",
"proc-macro-crate",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7384,6 +7581,7 @@ dependencies = [
"sp-runtime",
"sp-runtime-interface",
"sp-runtime-interface-test-wasm",
+ "sp-runtime-interface-test-wasm-deprecated",
"sp-state-machine",
]
@@ -7398,9 +7596,20 @@ dependencies = [
"substrate-wasm-builder-runner",
]
+[[package]]
+name = "sp-runtime-interface-test-wasm-deprecated"
+version = "2.0.0-dev"
+dependencies = [
+ "sp-core",
+ "sp-io",
+ "sp-runtime-interface",
+ "sp-std",
+ "substrate-wasm-builder-runner",
+]
+
[[package]]
name = "sp-sandbox"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"assert_matches",
"parity-scale-codec",
@@ -7414,7 +7623,7 @@ dependencies = [
[[package]]
name = "sp-serializer"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"serde",
"serde_json",
@@ -7422,7 +7631,7 @@ dependencies = [
[[package]]
name = "sp-session"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"sp-api",
"sp-core",
@@ -7432,7 +7641,7 @@ dependencies = [
[[package]]
name = "sp-staking"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -7441,12 +7650,12 @@ dependencies = [
[[package]]
name = "sp-state-machine"
-version = "0.8.0-alpha.3"
+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",
@@ -7461,11 +7670,11 @@ dependencies = [
[[package]]
name = "sp-std"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
[[package]]
name = "sp-storage"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"impl-serde 0.2.3",
"serde",
@@ -7487,7 +7696,7 @@ dependencies = [
[[package]]
name = "sp-timestamp"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -7500,20 +7709,21 @@ dependencies = [
[[package]]
name = "sp-transaction-pool"
-version = "2.0.0-alpha.3"
+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]]
name = "sp-trie"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"criterion 0.2.11",
"hash-db",
@@ -7529,9 +7739,19 @@ 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.3"
+version = "2.0.0-alpha.5"
dependencies = [
"impl-serde 0.2.3",
"parity-scale-codec",
@@ -7542,7 +7762,7 @@ dependencies = [
[[package]]
name = "sp-wasm-interface"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -7568,6 +7788,15 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+[[package]]
+name = "statrs"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10102ac8d55e35db2b3fafc26f81ba8647da2e15879ab686a67e6d19af2685e8"
+dependencies = [
+ "rand 0.5.6",
+]
+
[[package]]
name = "stream-cipher"
version = "0.3.2"
@@ -7603,9 +7832,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "structopt"
-version = "0.3.9"
+version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1bcbed7d48956fcbb5d80c6b95aedb553513de0a1b451ea92679d999c010e98"
+checksum = "c8faa2719539bbe9d77869bfb15d4ee769f99525e707931452c97b693b3f159d"
dependencies = [
"clap",
"lazy_static",
@@ -7614,15 +7843,15 @@ dependencies = [
[[package]]
name = "structopt-derive"
-version = "0.4.2"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64"
+checksum = "3f88b8e18c69496aad6f9ddf4630dd7d585bcaf765786cb415b9aec2fe5a0430"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
@@ -7642,13 +7871,13 @@ checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81"
dependencies = [
"heck",
"proc-macro2",
- "quote",
- "syn",
+ "quote 1.0.3",
+ "syn 1.0.17",
]
[[package]]
name = "subkey"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"clap",
"derive_more",
@@ -7667,7 +7896,6 @@ dependencies = [
"parity-scale-codec",
"rand 0.7.3",
"rpassword",
- "rustc-hex",
"sc-rpc",
"serde_json",
"sp-core",
@@ -7678,9 +7906,9 @@ dependencies = [
[[package]]
name = "substrate-bip39"
-version = "0.3.1"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5"
+checksum = "c004e8166d6e0aa3a9d5fa673e5b7098ff25f930de1013a21341988151e681bb"
dependencies = [
"hmac",
"pbkdf2",
@@ -7690,7 +7918,7 @@ dependencies = [
[[package]]
name = "substrate-browser-utils"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"chrono",
"clear_on_drop",
@@ -7702,7 +7930,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",
@@ -7715,11 +7943,14 @@ dependencies = [
[[package]]
name = "substrate-build-script-utils"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
+dependencies = [
+ "platforms",
+]
[[package]]
name = "substrate-frame-rpc-support"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"frame-support",
"frame-system",
@@ -7730,12 +7961,12 @@ dependencies = [
"sc-rpc-api",
"serde",
"sp-storage",
- "tokio 0.2.12",
+ "tokio 0.2.16",
]
[[package]]
name = "substrate-frame-rpc-system"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
dependencies = [
"env_logger 0.7.1",
"frame-system-rpc-runtime-api",
@@ -7743,7 +7974,7 @@ dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
- "log 0.4.8",
+ "log",
"parity-scale-codec",
"sc-client",
"sc-transaction-pool",
@@ -7758,15 +7989,15 @@ dependencies = [
[[package]]
name = "substrate-prometheus-endpoint"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
dependencies = [
"async-std",
"derive_more",
"futures-util",
- "hyper 0.13.2",
- "log 0.4.8",
+ "hyper 0.13.4",
+ "log",
"prometheus",
- "tokio 0.2.12",
+ "tokio 0.2.16",
]
[[package]]
@@ -7797,7 +8028,7 @@ dependencies = [
"frame-support",
"frame-system",
"frame-system-rpc-runtime-api",
- "log 0.4.8",
+ "log",
"memory-db",
"pallet-babe",
"pallet-timestamp",
@@ -7864,7 +8095,7 @@ dependencies = [
[[package]]
name = "substrate-test-utils"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
[[package]]
name = "substrate-wasm-builder"
@@ -7885,6 +8116,75 @@ dependencies = [
name = "substrate-wasm-builder-runner"
version = "1.0.5"
+[[package]]
+name = "substrate-wasmtime"
+version = "0.13.0-threadsafe.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e512629525ecfe43bffe1f3d9e6bb0f08bf01155288ef27fcaae4ea086e4a9d"
+dependencies = [
+ "anyhow",
+ "backtrace",
+ "cfg-if",
+ "lazy_static",
+ "libc",
+ "region",
+ "rustc-demangle",
+ "substrate-wasmtime-jit",
+ "substrate-wasmtime-runtime",
+ "target-lexicon",
+ "wasmparser",
+ "wasmtime-environ",
+ "wasmtime-profiling",
+ "wat",
+ "winapi 0.3.8",
+]
+
+[[package]]
+name = "substrate-wasmtime-jit"
+version = "0.13.0-threadsafe.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a20de5564886d2bcffdd351c9cd114ceb50758aa58eac3cedb14faabf7f93b91"
+dependencies = [
+ "anyhow",
+ "cfg-if",
+ "cranelift-codegen",
+ "cranelift-entity",
+ "cranelift-frontend",
+ "cranelift-native",
+ "cranelift-wasm",
+ "more-asserts",
+ "region",
+ "substrate-wasmtime-runtime",
+ "target-lexicon",
+ "thiserror",
+ "wasmparser",
+ "wasmtime-debug",
+ "wasmtime-environ",
+ "wasmtime-profiling",
+ "winapi 0.3.8",
+]
+
+[[package]]
+name = "substrate-wasmtime-runtime"
+version = "0.13.0-threadsafe.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d08846f04293a7fc27eeb30f06262ca2e1b4ee20f5192cec1f3ce201e08ceb8"
+dependencies = [
+ "backtrace",
+ "cc",
+ "cfg-if",
+ "indexmap",
+ "lazy_static",
+ "libc",
+ "memoffset",
+ "more-asserts",
+ "region",
+ "thiserror",
+ "wasmtime-environ",
+ "wasmtime-profiling",
+ "winapi 0.3.8",
+]
+
[[package]]
name = "subtle"
version = "1.0.0"
@@ -7899,13 +8199,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]]
@@ -7915,8 +8226,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]]
@@ -7926,16 +8246,16 @@ 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]]
name = "sysinfo"
-version = "0.11.7"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e15d793f059727ad34a9245503c13b38262bb32e9906d8122ca64d6ca54b0858"
+checksum = "7ccb41798287e8e299a701b5560d886d6ca2c3e7115e9ea2cb68c123aec339b7"
dependencies = [
"cfg-if",
"doc-comment",
@@ -7958,12 +8278,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"
@@ -7995,9 +8309,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]]
@@ -8011,22 +8325,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]]
@@ -8060,9 +8374,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",
@@ -8085,9 +8399,9 @@ dependencies = [
[[package]]
name = "tiny-keccak"
-version = "2.0.1"
+version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2953ca5148619bc99695c1274cb54c5275bbb913c6adad87e72eaf8db9787f69"
+checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
dependencies = [
"crunchy",
]
@@ -8128,12 +8442,13 @@ dependencies = [
[[package]]
name = "tokio"
-version = "0.2.12"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b34bee1facdc352fba10c9c58b654e6ecb6a2250167772bf86071f7c5f2f5061"
+checksum = "ee5a0dd887e37d37390c13ff8ac830f992307fe30a1fff0ab8427af67211ba28"
dependencies = [
"bytes 0.5.4",
"fnv",
+ "futures-core",
"iovec",
"lazy_static",
"libc",
@@ -8220,7 +8535,7 @@ checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
- "log 0.4.8",
+ "log",
]
[[package]]
@@ -8230,8 +8545,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]]
@@ -8243,7 +8558,7 @@ dependencies = [
"crossbeam-utils",
"futures 0.1.29",
"lazy_static",
- "log 0.4.8",
+ "log",
"mio",
"num_cpus",
"parking_lot 0.9.0",
@@ -8261,7 +8576,7 @@ checksum = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a"
dependencies = [
"futures-core",
"rustls 0.17.0",
- "tokio 0.2.12",
+ "tokio 0.2.16",
"webpki",
]
@@ -8311,7 +8626,7 @@ dependencies = [
"crossbeam-utils",
"futures 0.1.29",
"lazy_static",
- "log 0.4.8",
+ "log",
"num_cpus",
"slab",
"tokio-executor 0.1.10",
@@ -8329,17 +8644,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"
@@ -8348,7 +8652,7 @@ checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
- "log 0.4.8",
+ "log",
"mio",
"tokio-codec",
"tokio-io",
@@ -8365,7 +8669,7 @@ dependencies = [
"futures 0.1.29",
"iovec",
"libc",
- "log 0.4.8",
+ "log",
"mio",
"mio-uds",
"tokio-codec",
@@ -8375,16 +8679,16 @@ 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.12",
+ "tokio 0.2.16",
]
[[package]]
@@ -8419,8 +8723,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]]
@@ -8432,12 +8736,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"
@@ -8446,9 +8744,9 @@ checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
[[package]]
name = "trie-bench"
-version = "0.20.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6dcd9bac85703d8f974ee1e6dfe668784b105d3385c174ad729adb7427ad5d81"
+checksum = "f105ed33e42b534284b691e804e909c42a8898afcf22896a32255c05a1a50488"
dependencies = [
"criterion 0.2.11",
"hash-db",
@@ -8468,7 +8766,7 @@ checksum = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0"
dependencies = [
"hash-db",
"hashbrown",
- "log 0.4.8",
+ "log",
"rustc-hex",
"smallvec 1.2.0",
]
@@ -8500,9 +8798,9 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
[[package]]
name = "trybuild"
-version = "1.0.23"
+version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26ff1b18659a2218332848d76ad1c867ce4c6ee37b085e6bc8de9a6d11401220"
+checksum = "24b4e093c5ed1a60b22557090120aa14f90ca801549c0949d775ea07c1407720"
dependencies = [
"glob 0.3.0",
"lazy_static",
@@ -8532,12 +8830,6 @@ dependencies = [
"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"
@@ -8556,22 +8848,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]]
@@ -8604,6 +8887,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"
@@ -8612,12 +8901,13 @@ checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
[[package]]
name = "unsigned-varint"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b7ffb36714206d2f5f05d61a2bc350415c642f2c54433f0ebf829afbe41d570"
+checksum = "f38e01ad4b98f042e166c1bf9a13f9873a99d79eaa171ce7ca81e6dd0f895d8a"
dependencies = [
"bytes 0.5.4",
- "futures 0.3.4",
+ "futures-io",
+ "futures-util",
"futures_codec",
]
@@ -8667,23 +8957,6 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
-[[package]]
-name = "vergen"
-version = "3.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba"
-dependencies = [
- "bitflags",
- "chrono",
- "failure",
-]
-
-[[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"
@@ -8710,15 +8983,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"
@@ -8737,7 +9019,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",
]
@@ -8747,7 +9029,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",
]
@@ -8759,9 +9041,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasm-bindgen"
-version = "0.2.58"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c"
+checksum = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -8769,24 +9051,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.58"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45"
+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.8"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9"
+checksum = "7add542ea1ac7fdaa9dc25e031a6af33b7d63376292bd24140c637d00d1c312a"
dependencies = [
"cfg-if",
"js-sys",
@@ -8796,48 +9078,32 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.58"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3"
+checksum = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4"
dependencies = [
- "quote",
+ "quote 1.0.3",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.58"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668"
+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.58"
+version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601"
-
-[[package]]
-name = "wasm-bindgen-webidl"
-version = "0.2.58"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d"
-dependencies = [
- "anyhow",
- "heck",
- "log 0.4.8",
- "proc-macro2",
- "quote",
- "syn",
- "wasm-bindgen-backend",
- "weedle",
-]
+checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639"
[[package]]
name = "wasm-gc-api"
@@ -8845,7 +9111,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",
]
@@ -8876,7 +9142,7 @@ dependencies = [
"libc",
"memory_units",
"num-rational",
- "num-traits",
+ "num-traits 0.2.11",
"parity-wasm 0.41.0",
"wasmi-validation",
]
@@ -8896,32 +9162,11 @@ version = "0.51.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a"
-[[package]]
-name = "wasmtime"
-version = "0.12.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
-dependencies = [
- "anyhow",
- "backtrace",
- "cfg-if",
- "lazy_static",
- "libc",
- "region",
- "rustc-demangle",
- "target-lexicon",
- "wasmparser",
- "wasmtime-environ",
- "wasmtime-jit",
- "wasmtime-profiling",
- "wasmtime-runtime",
- "wat",
- "winapi 0.3.8",
-]
-
[[package]]
name = "wasmtime-debug"
version = "0.12.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d3d007436043bf55ec252d2f4dc1d35834157b5e2f148da839ca502e611cfe1"
dependencies = [
"anyhow",
"faerie",
@@ -8936,7 +9181,8 @@ dependencies = [
[[package]]
name = "wasmtime-environ"
version = "0.12.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80f3dea0e60c076dd0da27fa10c821323903c9554c617ed32eaab8e7a7e36c89"
dependencies = [
"anyhow",
"base64 0.11.0",
@@ -8949,7 +9195,7 @@ dependencies = [
"file-per-thread-logger",
"indexmap",
"libc",
- "log 0.4.8",
+ "log",
"more-asserts",
"rayon",
"serde",
@@ -8961,34 +9207,11 @@ dependencies = [
"zstd",
]
-[[package]]
-name = "wasmtime-jit"
-version = "0.12.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
-dependencies = [
- "anyhow",
- "cfg-if",
- "cranelift-codegen",
- "cranelift-entity",
- "cranelift-frontend",
- "cranelift-native",
- "cranelift-wasm",
- "more-asserts",
- "region",
- "target-lexicon",
- "thiserror",
- "wasmparser",
- "wasmtime-debug",
- "wasmtime-environ",
- "wasmtime-profiling",
- "wasmtime-runtime",
- "winapi 0.3.8",
-]
-
[[package]]
name = "wasmtime-profiling"
version = "0.12.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "984d29c8add3381e60d649f4e3e2a501da900fc2d2586e139502eec32fe0ebc8"
dependencies = [
"gimli",
"goblin",
@@ -9000,55 +9223,32 @@ dependencies = [
"target-lexicon",
]
-[[package]]
-name = "wasmtime-runtime"
-version = "0.12.0"
-source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
-dependencies = [
- "backtrace",
- "cc",
- "cfg-if",
- "indexmap",
- "lazy_static",
- "libc",
- "memoffset",
- "more-asserts",
- "region",
- "thiserror",
- "wasmtime-environ",
- "wasmtime-profiling",
- "winapi 0.3.8",
-]
-
[[package]]
name = "wast"
-version = "9.0.0"
+version = "13.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee7b16105405ca2aa2376ba522d8d4b1a11604941dd3bb7df9fd2ece60f8d16a"
+checksum = "5b20abd8b4a26f7e0d4dd5e357e90a3d555ec190e94472c9b2b27c5b9777f9ae"
dependencies = [
"leb128",
]
[[package]]
name = "wat"
-version = "1.0.10"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56173f7f4fb59aebe35a7e71423845e1c6c7144bfb56362d497931b6b3bed0f6"
+checksum = "51a615830ee3e7200b505c441fec09aac2f114deae69df52f215cb828ba112c4"
dependencies = [
"wast",
]
[[package]]
name = "web-sys"
-version = "0.3.35"
+version = "0.3.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b"
+checksum = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb"
dependencies = [
- "anyhow",
"js-sys",
- "sourcefile",
"wasm-bindgen",
- "wasm-bindgen-webidl",
]
[[package]]
@@ -9079,61 +9279,11 @@ 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 = "weedle"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164"
-dependencies = [
- "nom",
-]
-
[[package]]
name = "which"
-version = "3.1.0"
+version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5475d47078209a02e60614f7ba5e645ef3ed60f771920ac1906d7c1cc65024c8"
+checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724"
dependencies = [
"libc",
]
@@ -9168,9 +9318,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",
]
@@ -9190,7 +9340,7 @@ dependencies = [
"byteorder 1.3.4",
"bytes 0.4.12",
"httparse",
- "log 0.4.8",
+ "log",
"mio",
"mio-extras",
"rand 0.7.3",
@@ -9215,9 +9365,9 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217"
dependencies = [
- "curve25519-dalek 2.0.0",
+ "curve25519-dalek",
"rand_core 0.5.1",
- "zeroize 1.1.0",
+ "zeroize",
]
[[package]]
@@ -9228,25 +9378,18 @@ checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57"
[[package]]
name = "yamux"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f03098897b734bd943ab23f6aa9f98aafd72a88516deedd66f9d564c57bf2f19"
+checksum = "84300bb493cc878f3638b981c62b4632ec1a5c52daaa3036651e8c106d3b55ea"
dependencies = [
- "bytes 0.5.4",
"futures 0.3.4",
- "log 0.4.8",
+ "log",
"nohash-hasher",
"parking_lot 0.10.0",
"rand 0.7.3",
- "thiserror",
+ "static_assertions",
]
-[[package]]
-name = "zeroize"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86"
-
[[package]]
name = "zeroize"
version = "1.1.0"
@@ -9263,8 +9406,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 5af37839ad47672479f0e6a250672c5979e57df1..ab19142da6ee664e636dd2c39de6317bbe16c5a0 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",
@@ -118,7 +120,9 @@ members = [
"primitives/consensus/babe",
"primitives/consensus/common",
"primitives/consensus/pow",
+ "primitives/consensus/vrf",
"primitives/core",
+ "primitives/chain-spec",
"primitives/debug-derive",
"primitives/storage",
"primitives/externalities",
@@ -129,10 +133,12 @@ members = [
"primitives/offchain",
"primitives/panic-handler",
"primitives/phragmen",
+ "primitives/phragmen/compact",
"primitives/rpc",
"primitives/runtime-interface",
"primitives/runtime-interface/proc-macro",
"primitives/runtime-interface/test-wasm",
+ "primitives/runtime-interface/test-wasm-deprecated",
"primitives/runtime-interface/test",
"primitives/serializer",
"primitives/session",
@@ -140,6 +146,7 @@ members = [
"primitives/api/proc-macro",
"primitives/api/test",
"primitives/arithmetic",
+ "primitives/arithmetic/fuzzer",
"primitives/io",
"primitives/runtime",
"primitives/sandbox",
@@ -151,6 +158,7 @@ members = [
"primitives/test-primitives",
"primitives/transaction-pool",
"primitives/trie",
+ "primitives/utils",
"primitives/wasm-interface",
"test-utils/client",
"test-utils/runtime",
@@ -168,3 +176,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 5dc0c46d9996a6b1129bd0682204994873b3303d..a2ccc4fa95732b35da44cfa73e4165514ba2e4ea 100644
--- a/bin/node-template/node/Cargo.toml
+++ b/bin/node-template/node/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "node-template"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Anonymous"]
+description = "Substrate Node template"
edition = "2018"
license = "Unlicense"
build = "build.rs"
@@ -12,30 +13,32 @@ 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"
-sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" }
-sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
-sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" }
-sc-service = { version = "0.8.0-alpha.2", path = "../../../client/service" }
-sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" }
-sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../client/transaction-pool" }
-sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" }
-sc-network = { version = "0.8.0-alpha.2", path = "../../../client/network" }
-sc-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../client/consensus/aura" }
-sp-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/aura" }
-sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" }
-grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
-grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
-sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" }
-sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
-sc-basic-authorship = { path = "../../../client/basic-authorship", version = "0.8.0-alpha.2"}
+sc-cli = { version = "0.8.0-alpha.5", path = "../../../client/cli" }
+sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
+sc-executor = { version = "0.8.0-alpha.5", path = "../../../client/executor" }
+sc-service = { version = "0.8.0-alpha.5", path = "../../../client/service" }
+sp-inherents = { version = "2.0.0-alpha.5", path = "../../../primitives/inherents" }
+sc-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../client/transaction-pool" }
+sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../primitives/transaction-pool" }
+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" }
+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" }
+sc-basic-authorship = { path = "../../../client/basic-authorship", version = "0.8.0-alpha.5"}
-node-template-runtime = { version = "2.0.0-alpha.2", path = "../runtime" }
+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.2", 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..fb53edd9a1a06b44fd2626feda427b79b0c08a5f 100644
--- a/bin/node-template/node/src/chain_spec.rs
+++ b/bin/node-template/node/src/chain_spec.rs
@@ -3,10 +3,10 @@ use node_template_runtime::{
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig,
SudoConfig, SystemConfig, WASM_BINARY, Signature
};
-use sp_consensus_aura::sr25519::{AuthorityId as AuraId};
-use grandpa_primitives::{AuthorityId as GrandpaId};
-use sc_service;
+use sp_consensus_aura::sr25519::AuthorityId as AuraId;
+use sp_finality_grandpa::AuthorityId as GrandpaId;
use sp_runtime::traits::{Verify, IdentifyAccount};
+use sc_service::ChainType;
// Note this is the URL for the telemetry server
//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
@@ -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,72 @@ 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",
+ ChainType::Development,
+ || 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",
+ ChainType::Local,
+ || 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 +122,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 b39fcc1dae4d5bdb3b71edfaac02c55783879e29..69fcd843526806c9fe9a0b6e684a292fcbfe778b 100644
--- a/bin/node-template/pallets/template/Cargo.toml
+++ b/bin/node-template/pallets/template/Cargo.toml
@@ -2,39 +2,37 @@
authors = ['Anonymous']
edition = '2018'
name = 'pallet-template'
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
license = "Unlicense"
homepage = "https://substrate.dev"
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.2"
+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.2"
+version = "2.0.0-alpha.5"
path = "../../../../frame/system"
[dev-dependencies.sp-core]
default-features = false
-version = "2.0.0-alpha.2"
+version = "2.0.0-alpha.5"
path = "../../../../primitives/core"
[dev-dependencies.sp-io]
default-features = false
-version = "2.0.0-alpha.2"
+version = "2.0.0-alpha.5"
path = "../../../../primitives/io"
[dev-dependencies.sp-runtime]
default-features = false
-version = "2.0.0-alpha.2"
+version = "2.0.0-alpha.5"
path = "../../../../primitives/runtime"
@@ -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 3179b56b22e46aa9d46ce990fc203d685c8a2d29..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 {}
@@ -40,7 +41,7 @@ impl system::Trait for Test {
type Version = ();
type ModuleToIndex = ();
type AccountData = ();
- type MigrateAccount = (); type OnNewAccount = ();
+ type OnNewAccount = ();
type OnKilledAccount = ();
}
impl Trait for Test {
diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml
index 9268dd8c05035f4dd8022702e9792f421ab556c5..e8653e6df70e82e503a54e79c638e9a796e41913 100644
--- a/bin/node-template/runtime/Cargo.toml
+++ b/bin/node-template/runtime/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-template-runtime"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Anonymous"]
edition = "2018"
license = "Unlicense"
@@ -8,33 +8,33 @@ 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.2", default-features = false, package = "pallet-aura", path = "../../../frame/aura" }
-balances = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-balances", path = "../../../frame/balances" }
-frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" }
-grandpa = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" }
-randomness-collective-flip = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" }
-sudo = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" }
-system = { version = "2.0.0-alpha.2", default-features = false, package = "frame-system", path = "../../../frame/system" }
-timestamp = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" }
-transaction-payment = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" }
-frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/executive" }
+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" }
+frame-support = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/support" }
+grandpa = { version = "2.0.0-alpha.5", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" }
+randomness-collective-flip = { version = "2.0.0-alpha.5", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" }
+sudo = { version = "2.0.0-alpha.5", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" }
+system = { version = "2.0.0-alpha.5", default-features = false, package = "frame-system", path = "../../../frame/system" }
+timestamp = { version = "2.0.0-alpha.5", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" }
+transaction-payment = { version = "2.0.0-alpha.5", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" }
+frame-executive = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/executive" }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
-sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/api" }
-sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.2"}
-sp-consensus-aura = { version = "0.8.0-alpha.2", default-features = false, path = "../../../primitives/consensus/aura" }
-sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" }
-sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-alpha.2"}
-sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/io" }
-sp-offchain = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/offchain" }
-sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" }
-sp-session = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/session" }
-sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" }
-sp-transaction-pool = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/transaction-pool" }
-sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/version" }
+sp-api = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/api" }
+sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.5"}
+sp-consensus-aura = { version = "0.8.0-alpha.5", default-features = false, path = "../../../primitives/consensus/aura" }
+sp-core = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/core" }
+sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-alpha.5"}
+sp-io = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/io" }
+sp-offchain = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/offchain" }
+sp-runtime = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/runtime" }
+sp-session = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/session" }
+sp-std = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/std" }
+sp-transaction-pool = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/transaction-pool" }
+sp-version = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/version" }
-template = { version = "2.0.0-alpha.2", default-features = false, path = "../pallets/template", package = "pallet-template" }
+template = { version = "2.0.0-alpha.5", default-features = false, path = "../pallets/template", package = "pallet-template" }
[build-dependencies]
wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }
@@ -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 707799eab45194794e1942dc78995d0bad2595be..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
@@ -162,7 +162,7 @@ impl system::Trait for Runtime {
/// This type is being generated by `construct_runtime!`.
type ModuleToIndex = ModuleToIndex;
/// What to do if a new account is created.
- type MigrateAccount = (); type OnNewAccount = ();
+ type OnNewAccount = ();
/// What to do if an account is fully reaped from the system.
type OnKilledAccount = ();
/// The data to be stored in an account.
@@ -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 e18b6b228e65553543891d6e5cbcd6fb6094c752..9842fd2ee49ac7650b441970393d3ba440723c64 100644
--- a/bin/node/cli/Cargo.toml
+++ b/bin/node/cli/Cargo.toml
@@ -1,8 +1,8 @@
[package]
name = "node-cli"
-version = "2.0.0-alpha.3"
+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"
@@ -42,94 +42,98 @@ structopt = { version = "0.3.8", optional = true }
tracing = "0.1.10"
# primitives
-sp-authority-discovery = { version = "2.0.0-alpha.2", path = "../../../primitives/authority-discovery" }
-sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" }
-grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
-sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
-sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/timestamp" }
-sp-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/finality-tracker" }
-sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" }
-sp-keyring = { version = "2.0.0-alpha.2", path = "../../../primitives/keyring" }
-sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" }
-sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" }
+sp-authority-discovery = { version = "2.0.0-alpha.5", path = "../../../primitives/authority-discovery" }
+sp-consensus-babe = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/babe" }
+grandpa-primitives = { version = "2.0.0-alpha.5", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
+sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
+sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
+sp-timestamp = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/timestamp" }
+sp-finality-tracker = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/finality-tracker" }
+sp-inherents = { version = "2.0.0-alpha.5", path = "../../../primitives/inherents" }
+sp-keyring = { version = "2.0.0-alpha.5", path = "../../../primitives/keyring" }
+sp-io = { version = "2.0.0-alpha.5", path = "../../../primitives/io" }
+sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" }
# client dependencies
-sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" }
-sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" }
-sc-chain-spec = { version = "2.0.0-alpha.2", path = "../../../client/chain-spec" }
-sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../client/transaction-pool" }
-sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" }
-sc-network = { version = "0.8.0-alpha.2", path = "../../../client/network" }
-sc-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../client/consensus/babe" }
-grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
-sc-client-db = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/db" }
-sc-offchain = { version = "2.0.0-alpha.2", path = "../../../client/offchain" }
-sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" }
-sc-basic-authorship = { version = "0.8.0-alpha.2", path = "../../../client/basic-authorship" }
-sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/service" }
-sc-tracing = { version = "2.0.0-alpha.2", path = "../../../client/tracing" }
-sc-telemetry = { version = "2.0.0-alpha.2", path = "../../../client/telemetry" }
-sc-authority-discovery = { version = "0.8.0-alpha.2", path = "../../../client/authority-discovery" }
+sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api" }
+sc-client = { version = "0.8.0-alpha.5", path = "../../../client/" }
+sc-chain-spec = { version = "2.0.0-alpha.5", path = "../../../client/chain-spec" }
+sc-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../client/transaction-pool" }
+sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../primitives/transaction-pool" }
+sc-network = { version = "0.8.0-alpha.5", path = "../../../client/network" }
+sc-consensus-babe = { version = "0.8.0-alpha.5", path = "../../../client/consensus/babe" }
+grandpa = { version = "0.8.0-alpha.5", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
+sc-client-db = { version = "0.8.0-alpha.5", default-features = false, path = "../../../client/db" }
+sc-offchain = { version = "2.0.0-alpha.5", path = "../../../client/offchain" }
+sc-rpc = { version = "2.0.0-alpha.5", path = "../../../client/rpc" }
+sc-basic-authorship = { version = "0.8.0-alpha.5", path = "../../../client/basic-authorship" }
+sc-service = { version = "0.8.0-alpha.5", default-features = false, path = "../../../client/service" }
+sc-tracing = { version = "2.0.0-alpha.5", path = "../../../client/tracing" }
+sc-telemetry = { version = "2.0.0-alpha.5", path = "../../../client/telemetry" }
+sc-authority-discovery = { version = "0.8.0-alpha.5", path = "../../../client/authority-discovery" }
# frame dependencies
-pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" }
-pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/timestamp" }
-pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" }
-frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" }
-pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" }
-pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" }
-frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" }
-pallet-im-online = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/im-online" }
-pallet-authority-discovery = { version = "2.0.0-alpha.2", path = "../../../frame/authority-discovery" }
+pallet-indices = { version = "2.0.0-alpha.5", path = "../../../frame/indices" }
+pallet-timestamp = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/timestamp" }
+pallet-contracts = { version = "2.0.0-alpha.5", path = "../../../frame/contracts" }
+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" }
+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.2", path = "../runtime" }
-node-rpc = { version = "2.0.0-alpha.2", path = "../rpc" }
-node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" }
-node-executor = { version = "2.0.0-alpha.2", path = "../executor" }
+node-runtime = { version = "2.0.0-alpha.5", path = "../runtime" }
+node-rpc = { version = "2.0.0-alpha.5", path = "../rpc" }
+node-primitives = { version = "2.0.0-alpha.5", path = "../primitives" }
+node-executor = { version = "2.0.0-alpha.5", path = "../executor" }
# CLI-specific dependencies
-sc-cli = { version = "0.8.0-alpha.2", optional = true, path = "../../../client/cli" }
-frame-benchmarking-cli = { version = "2.0.0-alpha.2", optional = true, path = "../../../utils/frame/benchmarking-cli" }
-node-transaction-factory = { version = "0.8.0-alpha.2", optional = true, path = "../transaction-factory" }
-node-inspect = { version = "0.8.0-alpha.2", optional = true, path = "../inspect" }
+sc-cli = { version = "0.8.0-alpha.5", optional = true, path = "../../../client/cli" }
+frame-benchmarking-cli = { version = "2.0.0-alpha.5", optional = true, path = "../../../utils/frame/benchmarking-cli" }
+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" }
# WASM-specific dependencies
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.2" }
+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.2", path = "../../../client/keystore" }
-sc-consensus-babe = { version = "0.8.0-alpha.2", features = ["test-helpers"], path = "../../../client/consensus/babe" }
-sc-consensus-epochs = { version = "0.8.0-alpha.2", path = "../../../client/consensus/epochs" }
+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.2", 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.2", optional = true, path = "../transaction-factory" }
-node-inspect = { version = "0.8.0-alpha.2", optional = true, path = "../inspect" }
-frame-benchmarking-cli = { version = "2.0.0-alpha.2", optional = true, path = "../../../utils/frame/benchmarking-cli" }
+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.2"
+version = "0.8.0-alpha.5"
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/res/flaming-fir.json b/bin/node/cli/res/flaming-fir.json
index 573a9e3aa54a40e45b260629c63ec4666353aebe..7ed98239b54b62c2a3c6309d96b13dedcdb1e65d 100644
--- a/bin/node/cli/res/flaming-fir.json
+++ b/bin/node/cli/res/flaming-fir.json
@@ -23,7 +23,9 @@
"tokenSymbol": "FIR"
},
"forkBlocks": null,
- "badBlocks": null,
+ "badBlocks": [
+ "0xf3b02820f81988282e1da41fd479ef2aa00d63d622863639ea15d48ab6533fdc"
+ ],
"consensusEngine": null,
"genesis": {
"raw": {
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 {
ChainSpec::from_genesis(
"Staging Testnet",
"staging_testnet",
+ ChainType::Live,
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 +184,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 +204,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 +253,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 +272,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 +326,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,
@@ -323,6 +339,7 @@ pub fn development_config() -> ChainSpec {
ChainSpec::from_genesis(
"Development",
"dev",
+ ChainType::Development,
development_config_genesis,
vec![],
None,
@@ -335,8 +352,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,
@@ -349,6 +366,7 @@ pub fn local_testnet_config() -> ChainSpec {
ChainSpec::from_genesis(
"Local Testnet",
"local_testnet",
+ ChainType::Local,
local_testnet_genesis,
vec![],
None,
@@ -368,7 +386,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,
@@ -381,6 +399,7 @@ pub(crate) mod tests {
ChainSpec::from_genesis(
"Integration Test",
"test",
+ ChainType::Development,
local_testnet_genesis_instant_single,
vec![],
None,
@@ -395,6 +414,7 @@ pub(crate) mod tests {
ChainSpec::from_genesis(
"Integration Test",
"test",
+ ChainType::Development,
local_testnet_genesis,
vec![],
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/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 6d9989b274ab2eb764624838602ed77e959aaa76..257068cf144ac858036e42964ce5b8d6257935fd 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;
@@ -397,6 +390,7 @@ mod tests {
use sc_service::AbstractService;
use crate::service::{new_full, new_light};
use sp_runtime::traits::IdentifyAccount;
+ use sp_transaction_pool::{MaintainedTransactionPool, ChainEvent};
type AccountPublic = ::Signer;
@@ -414,7 +408,21 @@ mod tests {
let dummy_runtime = ::tokio::runtime::Runtime::new().unwrap();
let block_factory = |service: &::FullService| {
let block_id = BlockId::number(service.client().chain_info().best_number);
- let parent_header = service.client().header(&block_id).unwrap().unwrap();
+ let parent_header = service.client().best_header(&block_id)
+ .expect("db error")
+ .expect("best block should exist");
+
+ futures::executor::block_on(
+ service.transaction_pool().maintain(
+ ChainEvent::NewBlock {
+ is_new_best: true,
+ id: block_id.clone(),
+ retracted: vec![],
+ header: parent_header,
+ },
+ )
+ );
+
let consensus_net = ConsensusNetwork::new(service.network(), service.client().clone());
let proposer_factory = consensus::ProposerFactory {
client: service.client().clone(),
@@ -464,6 +472,8 @@ mod tests {
}
#[test]
+ // It is "ignored", but the node-cli ignored tests are running on the CI.
+ // This can be run locally with `cargo test --release -p node-cli test_sync -- --ignored`.
#[ignore]
fn test_sync() {
let keystore_path = tempfile::tempdir().expect("Creates keystore path");
@@ -504,6 +514,18 @@ mod tests {
let parent_header = service.client().header(&parent_id).unwrap().unwrap();
let parent_hash = parent_header.hash();
let parent_number = *parent_header.number();
+
+ futures::executor::block_on(
+ service.transaction_pool().maintain(
+ ChainEvent::NewBlock {
+ is_new_best: true,
+ id: parent_id.clone(),
+ retracted: vec![],
+ header: parent_header.clone(),
+ },
+ )
+ );
+
let mut proposer_factory = sc_basic_authorship::ProposerFactory::new(
service.client(),
service.transaction_pool()
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 a77efcf7f85260389800ca7f1f8018e0784f7324..2f1060a99884505ba94f1692f493bf8cdb01f43a 100644
--- a/bin/node/executor/Cargo.toml
+++ b/bin/node/executor/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-executor"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
description = "Substrate node implementation in Rust."
edition = "2018"
@@ -9,34 +9,34 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.2.0" }
-node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" }
-node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" }
-sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" }
-sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
-sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" }
-sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" }
-sp-trie = { version = "2.0.0-alpha.2", path = "../../../primitives/trie" }
+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" }
+sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
+sp-io = { version = "2.0.0-alpha.5", path = "../../../primitives/io" }
+sp-state-machine = { version = "0.8.0-alpha.5", path = "../../../primitives/state-machine" }
+sp-trie = { version = "2.0.0-alpha.5", path = "../../../primitives/trie" }
trie-root = "0.16.0"
-frame-benchmarking = { version = "2.0.0-alpha.2", path = "../../../frame/benchmarking" }
+frame-benchmarking = { version = "2.0.0-alpha.5", path = "../../../frame/benchmarking" }
[dev-dependencies]
criterion = "0.3.0"
-frame-support = { version = "2.0.0-alpha.2", path = "../../../frame/support" }
-frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" }
-node-testing = { version = "2.0.0-alpha.2", path = "../testing" }
-pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" }
-pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" }
-pallet-grandpa = { version = "2.0.0-alpha.2", path = "../../../frame/grandpa" }
-pallet-im-online = { version = "2.0.0-alpha.2", path = "../../../frame/im-online" }
-pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" }
-pallet-session = { version = "2.0.0-alpha.2", path = "../../../frame/session" }
-pallet-timestamp = { version = "2.0.0-alpha.2", path = "../../../frame/timestamp" }
-pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" }
-pallet-treasury = { version = "2.0.0-alpha.2", path = "../../../frame/treasury" }
-sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../../primitives/application-crypto" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
-sp-externalities = { version = "0.8.0-alpha.3", path = "../../../primitives/externalities" }
+frame-support = { version = "2.0.0-alpha.5", path = "../../../frame/support" }
+frame-system = { version = "2.0.0-alpha.5", path = "../../../frame/system" }
+node-testing = { version = "2.0.0-alpha.5", path = "../testing" }
+pallet-balances = { version = "2.0.0-alpha.5", path = "../../../frame/balances" }
+pallet-contracts = { version = "2.0.0-alpha.5", path = "../../../frame/contracts" }
+pallet-grandpa = { version = "2.0.0-alpha.5", path = "../../../frame/grandpa" }
+pallet-im-online = { version = "2.0.0-alpha.5", path = "../../../frame/im-online" }
+pallet-indices = { version = "2.0.0-alpha.5", path = "../../../frame/indices" }
+pallet-session = { version = "2.0.0-alpha.5", path = "../../../frame/session" }
+pallet-timestamp = { version = "2.0.0-alpha.5", path = "../../../frame/timestamp" }
+pallet-transaction-payment = { version = "2.0.0-alpha.5", path = "../../../frame/transaction-payment" }
+pallet-treasury = { version = "2.0.0-alpha.5", path = "../../../frame/treasury" }
+sp-application-crypto = { version = "2.0.0-alpha.5", path = "../../../primitives/application-crypto" }
+sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
+sp-externalities = { version = "0.8.0-alpha.5", path = "../../../primitives/externalities" }
substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" }
wabt = "0.9.2"
@@ -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 022f4d0ca49f5252cedce67ea6750a4c5aae8a18..9e94fe74d68469d9570fe76292d004e9106ef049 100644
--- a/bin/node/inspect/Cargo.toml
+++ b/bin/node/inspect/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-inspect"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0"
@@ -8,13 +8,16 @@ 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.2", path = "../../../client/cli" }
-sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" }
-sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/service" }
-sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" }
-sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
+sc-cli = { version = "0.8.0-alpha.5", path = "../../../client/cli" }
+sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api" }
+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" }
+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 cb271b987dba2e99c725258713d633863ff81e8b..81c5009f394d57332d5c9ef65ed8c6bb2cb6f120 100644
--- a/bin/node/primitives/Cargo.toml
+++ b/bin/node/primitives/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-primitives"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0"
@@ -8,11 +8,11 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
[dependencies]
-sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" }
+sp-core = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/core" }
+sp-runtime = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/runtime" }
[dev-dependencies]
-sp-serializer = { version = "2.0.0-alpha.2", path = "../../../primitives/serializer" }
+sp-serializer = { version = "2.0.0-alpha.5", path = "../../../primitives/serializer" }
pretty_assertions = "0.6.1"
[features]
@@ -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 8b37aff291341bd52cc11503fc4d37597769411c..df095bc5bb10d2574a01790f3ed32ea9c8585ebe 100644
--- a/bin/node/rpc-client/Cargo.toml
+++ b/bin/node/rpc-client/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-rpc-client"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0"
@@ -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.2", path = "../primitives" }
-sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" }
+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 1155eab304f8ae953207565d13f9434a4d27bb50..f1d230af90dc5e9e65da0ba4284355fa5292435a 100644
--- a/bin/node/rpc/Cargo.toml
+++ b/bin/node/rpc/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-rpc"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0"
@@ -8,20 +8,23 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
[dependencies]
-sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" }
+sc-client = { version = "0.8.0-alpha.5", path = "../../../client/" }
jsonrpc-core = "14.0.3"
-node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" }
-node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
-sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" }
-pallet-contracts-rpc = { version = "0.8.0-alpha.2", path = "../../../frame/contracts/rpc/" }
-pallet-transaction-payment-rpc = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment/rpc/" }
-substrate-frame-rpc-system = { version = "2.0.0-alpha.2", path = "../../../utils/frame/rpc/system" }
-sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" }
-sc-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../client/consensus/babe" }
-sc-consensus-babe-rpc = { version = "0.8.0-alpha.2", path = "../../../client/consensus/babe/rpc" }
-sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" }
-sc-keystore = { version = "2.0.0-alpha.2", path = "../../../client/keystore" }
-sc-consensus-epochs = { version = "0.8.0-alpha.2", path = "../../../client/consensus/epochs" }
-sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" }
-sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" }
+node-primitives = { version = "2.0.0-alpha.5", path = "../primitives" }
+node-runtime = { version = "2.0.0-alpha.5", path = "../runtime" }
+sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
+sp-api = { version = "2.0.0-alpha.5", path = "../../../primitives/api" }
+pallet-contracts-rpc = { version = "0.8.0-alpha.5", path = "../../../frame/contracts/rpc/" }
+pallet-transaction-payment-rpc = { version = "2.0.0-alpha.5", path = "../../../frame/transaction-payment/rpc/" }
+substrate-frame-rpc-system = { version = "2.0.0-alpha.5", path = "../../../utils/frame/rpc/system" }
+sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../primitives/transaction-pool" }
+sc-consensus-babe = { version = "0.8.0-alpha.5", path = "../../../client/consensus/babe" }
+sc-consensus-babe-rpc = { version = "0.8.0-alpha.5", path = "../../../client/consensus/babe/rpc" }
+sp-consensus-babe = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/babe" }
+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 c279a25b0a7305920373a8797ac0b025c9b76315..b8e5f706291459f72e3587179054ec8a9e635c72 100644
--- a/bin/node/runtime/Cargo.toml
+++ b/bin/node/runtime/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-runtime"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
build = "build.rs"
@@ -11,71 +11,72 @@ 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" }
-rustc-hex = { version = "2.0", optional = true }
serde = { version = "1.0.102", optional = true }
# primitives
-sp-authority-discovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/authority-discovery" }
-sp-consensus-babe = { version = "0.8.0-alpha.2", default-features = false, path = "../../../primitives/consensus/babe" }
-sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.2"}
-sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/inherents" }
-node-primitives = { version = "2.0.0-alpha.2", default-features = false, path = "../primitives" }
-sp-offchain = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/offchain" }
-sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" }
-sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" }
-sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/api" }
-sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" }
-sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/staking" }
-sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../../primitives/keyring" }
-sp-session = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/session" }
-sp-transaction-pool = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/transaction-pool" }
-sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/version" }
+sp-authority-discovery = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/authority-discovery" }
+sp-consensus-babe = { version = "0.8.0-alpha.5", default-features = false, path = "../../../primitives/consensus/babe" }
+sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.5"}
+sp-inherents = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/inherents" }
+node-primitives = { version = "2.0.0-alpha.5", default-features = false, path = "../primitives" }
+sp-offchain = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/offchain" }
+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-api = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/api" }
+sp-runtime = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/runtime" }
+sp-staking = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/staking" }
+sp-keyring = { version = "2.0.0-alpha.5", optional = true, path = "../../../primitives/keyring" }
+sp-session = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/session" }
+sp-transaction-pool = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/transaction-pool" }
+sp-version = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/version" }
# frame dependencies
-frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/executive" }
-frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/benchmarking", optional = true }
-frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" }
-frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/system" }
-frame-system-rpc-runtime-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
-pallet-authority-discovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/authority-discovery" }
-pallet-authorship = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/authorship" }
-pallet-babe = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/babe" }
-pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/balances" }
-pallet-collective = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/collective" }
-pallet-contracts = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/contracts" }
-pallet-contracts-primitives = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/contracts/common/" }
-pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.2", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" }
-pallet-democracy = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/democracy" }
-pallet-elections-phragmen = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/elections-phragmen" }
-pallet-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/finality-tracker" }
-pallet-grandpa = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/grandpa" }
-pallet-im-online = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/im-online" }
-pallet-indices = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/indices" }
-pallet-identity = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/identity" }
-pallet-membership = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/membership" }
-pallet-offences = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/offences" }
-pallet-randomness-collective-flip = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/randomness-collective-flip" }
-pallet-recovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/recovery" }
-pallet-session = { version = "2.0.0-alpha.2", features = ["historical"], path = "../../../frame/session", default-features = false }
-pallet-session-benchmarking = { version = "2.0.0-alpha.2", path = "../../../frame/session/benchmarking", default-features = false, optional = true }
-pallet-staking = { version = "2.0.0-alpha.2", features = ["migrate"], path = "../../../frame/staking", default-features = false }
-pallet-staking-reward-curve = { version = "2.0.0-alpha.2", path = "../../../frame/staking/reward-curve" }
-pallet-sudo = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/sudo" }
-pallet-society = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/society" }
-pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/timestamp" }
-pallet-treasury = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/treasury" }
-pallet-utility = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/utility" }
-pallet-transaction-payment = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/transaction-payment" }
-pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" }
-pallet-vesting = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/vesting" }
+frame-executive = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/executive" }
+frame-benchmarking = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/benchmarking", optional = true }
+frame-support = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/support" }
+frame-system = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/system" }
+frame-system-rpc-runtime-api = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
+pallet-authority-discovery = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/authority-discovery" }
+pallet-authorship = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/authorship" }
+pallet-babe = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/babe" }
+pallet-balances = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/balances" }
+pallet-collective = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/collective" }
+pallet-contracts = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/contracts" }
+pallet-contracts-primitives = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/contracts/common/" }
+pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.5", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" }
+pallet-democracy = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/democracy" }
+pallet-elections-phragmen = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/elections-phragmen" }
+pallet-finality-tracker = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/finality-tracker" }
+pallet-grandpa = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/grandpa" }
+pallet-im-online = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/im-online" }
+pallet-indices = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/indices" }
+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-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" }
+pallet-transaction-payment = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/transaction-payment" }
+pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" }
+pallet-vesting = { version = "2.0.0-alpha.5", default-features = false, path = "../../../frame/vesting" }
[build-dependencies]
wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }
[dev-dependencies]
-sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" }
+sp-io = { version = "2.0.0-alpha.5", path = "../../../primitives/io" }
[features]
default = ["std"]
@@ -108,7 +109,6 @@ std = [
"sp-core/std",
"pallet-randomness-collective-flip/std",
"sp-std/std",
- "rustc-hex",
"serde",
"pallet-session/std",
"sp-api/std",
@@ -135,10 +135,25 @@ 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-session-benchmarking",
+ "pallet-im-online/runtime-benchmarks",
+ "pallet-society/runtime-benchmarks",
+ "pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
+ "pallet-treasury/runtime-benchmarks",
+ "pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
- "pallet-staking/runtime-benchmarks",
+ "pallet-collective/runtime-benchmarks",
+ "pallet-offences-benchmarking",
+ "pallet-session-benchmarking",
]
+
+[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 5468ee0fb32dfe99de909c8ecd4b1521f5d09f69..54e236db96e96914a8d4098be0d6f0ad6196364f 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,
@@ -73,6 +73,51 @@ 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(),
+ );
+ 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"),
@@ -82,8 +127,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
- spec_version: 237,
- impl_version: 0,
+ spec_version: 240,
+ impl_version: 1,
apis: RUNTIME_API_VERSIONS,
};
@@ -140,7 +185,6 @@ impl frame_system::Trait for Runtime {
type Version = Version;
type ModuleToIndex = ModuleToIndex;
type AccountData = pallet_balances::AccountData;
- type MigrateAccount = (Balances, Identity, Democracy, Elections, ImOnline, Recovery, Session, Society, Staking, Vesting);
type OnNewAccount = ();
type OnKilledAccount = ();
}
@@ -162,6 +206,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;
@@ -217,6 +272,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;
@@ -256,6 +312,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 {
@@ -279,12 +336,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;
@@ -297,13 +355,19 @@ 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! {
pub const LaunchPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
pub const VotingPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
- pub const EmergencyVotingPeriod: BlockNumber = 3 * 24 * 60 * MINUTES;
+ pub const FastTrackVotingPeriod: BlockNumber = 3 * 24 * 60 * MINUTES;
+ pub const InstantAllowed: bool = true;
pub const MinimumDeposit: Balance = 100 * DOLLARS;
pub const EnactmentPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;
pub const CooloffPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
@@ -329,7 +393,9 @@ impl pallet_democracy::Trait for Runtime {
/// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote
/// be tabled immediately and with a shorter voting/enactment period.
type FastTrackOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, TechnicalCollective>;
- type EmergencyVotingPeriod = EmergencyVotingPeriod;
+ type InstantOrigin = pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>;
+ type InstantAllowed = InstantAllowed;
+ type FastTrackVotingPeriod = FastTrackVotingPeriod;
// To cancel a proposal which has been passed, 2/3 of the council must agree to it.
type CancellationOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>;
// Any single technical committee member may veto a coming council proposal, however they can
@@ -338,6 +404,7 @@ impl pallet_democracy::Trait for Runtime {
type CooloffPeriod = CooloffPeriod;
type PreimageByteDeposit = PreimageByteDeposit;
type Slash = Treasury;
+ type Scheduler = Scheduler;
}
parameter_types! {
@@ -364,6 +431,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;
@@ -468,20 +538,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 {
@@ -528,46 +599,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;
@@ -636,12 +667,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},
@@ -656,6 +687,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},
}
);
@@ -732,8 +764,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)
}
}
@@ -843,67 +878,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-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-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)
}
}
}
@@ -932,39 +941,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 97d76467fea4289e4bdea0b6ed7ce8d70d088019..df73e20070d2cedca064206d6b6dfc9b796272f2 100644
--- a/bin/node/testing/Cargo.toml
+++ b/bin/node/testing/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-testing"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
description = "Test utilities for Substrate node."
edition = "2018"
@@ -10,49 +10,48 @@ repository = "https://github.com/paritytech/substrate/"
publish = true
[dependencies]
-pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" }
-sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" }
-sc-client-db = { version = "0.8.0-alpha.2", path = "../../../client/db/", features = ["kvdb-rocksdb"] }
-sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api/" }
-codec = { package = "parity-scale-codec", version = "1.2.0" }
-pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" }
-pallet-grandpa = { version = "2.0.0-alpha.2", path = "../../../frame/grandpa" }
-pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" }
-sp-keyring = { version = "2.0.0-alpha.2", path = "../../../primitives/keyring" }
-node-executor = { version = "2.0.0-alpha.2", path = "../executor" }
-node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" }
-node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" }
-sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
-sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" }
-frame-support = { version = "2.0.0-alpha.2", path = "../../../frame/support" }
-pallet-session = { version = "2.0.0-alpha.2", path = "../../../frame/session" }
-pallet-society = { version = "2.0.0-alpha.2", path = "../../../frame/society" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
-pallet-staking = { version = "2.0.0-alpha.2", path = "../../../frame/staking" }
-sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor", features = ["wasmtime"] }
-sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" }
-frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" }
+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.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" }
+sp-keyring = { version = "2.0.0-alpha.5", path = "../../../primitives/keyring" }
+node-executor = { version = "2.0.0-alpha.5", path = "../executor" }
+node-primitives = { version = "2.0.0-alpha.5", path = "../primitives" }
+node-runtime = { version = "2.0.0-alpha.5", path = "../runtime" }
+sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
+sp-io = { version = "2.0.0-alpha.5", path = "../../../primitives/io" }
+frame-support = { version = "2.0.0-alpha.5", path = "../../../frame/support" }
+pallet-session = { version = "2.0.0-alpha.5", path = "../../../frame/session" }
+pallet-society = { version = "2.0.0-alpha.5", path = "../../../frame/society" }
+sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
+pallet-staking = { version = "2.0.0-alpha.5", path = "../../../frame/staking" }
+sc-executor = { version = "0.8.0-alpha.5", path = "../../../client/executor", features = ["wasmtime"] }
+sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" }
+frame-system = { version = "2.0.0-alpha.5", path = "../../../frame/system" }
substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" }
-pallet-timestamp = { version = "2.0.0-alpha.2", path = "../../../frame/timestamp" }
-pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" }
-pallet-treasury = { version = "2.0.0-alpha.2", path = "../../../frame/treasury" }
+pallet-timestamp = { version = "2.0.0-alpha.5", path = "../../../frame/timestamp" }
+pallet-transaction-payment = { version = "2.0.0-alpha.5", path = "../../../frame/transaction-payment" }
+pallet-treasury = { version = "2.0.0-alpha.5", path = "../../../frame/treasury" }
wabt = "0.9.2"
-sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" }
-sp-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/finality-tracker" }
-sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/timestamp" }
-sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" }
-sc-block-builder = { version = "0.8.0-alpha.3", path = "../../../client/block-builder" }
-sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" }
-sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" }
+sp-api = { version = "2.0.0-alpha.5", path = "../../../primitives/api" }
+sp-finality-tracker = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/finality-tracker" }
+sp-timestamp = { version = "2.0.0-alpha.5", default-features = false, path = "../../../primitives/timestamp" }
+sp-block-builder = { version = "2.0.0-alpha.5", path = "../../../primitives/block-builder" }
+sc-block-builder = { version = "0.8.0-alpha.5", path = "../../../client/block-builder" }
+sp-inherents = { version = "2.0.0-alpha.5", path = "../../../primitives/inherents" }
+sp-blockchain = { version = "2.0.0-alpha.5", path = "../../../primitives/blockchain" }
log = "0.4.8"
tempfile = "3.1.0"
fs_extra = "1"
[dev-dependencies]
criterion = "0.3.0"
-sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" }
-sc-service = { version = "0.8.0-alpha.2", path = "../../../client/service", features = ["rocksdb"] }
+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..2ca6428bedc3000fd3f75bb0ce573fea2d133718 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: 512,
},
};
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/transaction-factory/Cargo.toml b/bin/node/transaction-factory/Cargo.toml
index 44f2d87f9c56dd82cf9abdae08b287546a181321..33ebeb767ae37e75c04309c958e3de79096bee67 100644
--- a/bin/node/transaction-factory/Cargo.toml
+++ b/bin/node/transaction-factory/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-transaction-factory"
-version = "0.8.0-alpha.3"
+version = "0.8.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0"
@@ -8,16 +8,19 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
[dependencies]
-sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" }
-sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" }
-sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" }
-sc-block-builder = { version = "0.8.0-alpha.2", path = "../../../client/block-builder" }
-sc-client = { version = "0.8.0-alpha.2", path = "../../../client" }
-codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] }
-sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" }
+sp-block-builder = { version = "2.0.0-alpha.5", path = "../../../primitives/block-builder" }
+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.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.2", path = "../../../primitives/core" }
-sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
-sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/service" }
-sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" }
+sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
+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 5e51c4358e513d8c6a3ec5164d3aba0520d3f405..bab393a86a49d03e2e0201dfcb6c7f89add1a9f5 100644
--- a/bin/utils/chain-spec-builder/Cargo.toml
+++ b/bin/utils/chain-spec-builder/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "chain-spec-builder"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
build = "build.rs"
@@ -10,8 +10,12 @@ repository = "https://github.com/paritytech/substrate/"
[dependencies]
ansi_term = "0.12.1"
-sc-keystore = { version = "2.0.0-alpha.2", path = "../../../client/keystore" }
-node-cli = { version = "2.0.0-alpha.2", path = "../../node/cli" }
-sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
+sc-keystore = { version = "2.0.0-alpha.5", path = "../../../client/keystore" }
+sc-chain-spec = { version = "2.0.0-alpha.5", path = "../../../client/chain-spec" }
+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..144018701460e79254db45b81cd1ef2431e2b866 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;
@@ -120,6 +120,7 @@ fn generate_chain_spec(
let chain_spec = chain_spec::ChainSpec::from_genesis(
"Custom",
"custom",
+ sc_chain_spec::ChainType::Live,
move || genesis_constructor(&authority_seeds, &endowed_accounts, &sudo_account),
vec![],
None,
@@ -142,7 +143,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 252978a3a98cbc143139b9cdfba1169a1ebc6de9..672f25275c74fbfbab2c1f0908cfbefef8afed42 100644
--- a/bin/utils/subkey/Cargo.toml
+++ b/bin/utils/subkey/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subkey"
-version = "2.0.0-alpha.3"
+version = "2.0.0-alpha.5"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0"
@@ -9,29 +9,31 @@ repository = "https://github.com/paritytech/substrate/"
[dependencies]
futures = "0.1.29"
-sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
-node-runtime = { version = "2.0.0-alpha.2", path = "../../node/runtime" }
-node-primitives = { version = "2.0.0-alpha.2", path = "../../node/primitives" }
-sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
+sp-core = { version = "2.0.0-alpha.5", path = "../../../primitives/core" }
+node-runtime = { version = "2.0.0-alpha.5", path = "../../node/runtime" }
+node-primitives = { version = "2.0.0-alpha.5", path = "../../node/primitives" }
+sp-runtime = { version = "2.0.0-alpha.5", path = "../../../primitives/runtime" }
rand = "0.7.2"
clap = "2.33.0"
tiny-bip39 = "0.7"
-rustc-hex = "2.0.1"
-substrate-bip39 = "0.3.1"
+substrate-bip39 = "0.4.1"
hex = "0.4.0"
hex-literal = "0.2.1"
-codec = { package = "parity-scale-codec", version = "1.2.0" }
-frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" }
-pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" }
-pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" }
+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" }
rpassword = "4.0.1"
itertools = "0.8.2"
derive_more = { version = "0.99.2" }
-sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" }
+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 33209692caffb87284318bc59962ab56bcb6cbf7..08a46f1190ac28011314a18fee2b34b7211f5efd 100644
--- a/bin/utils/subkey/src/main.rs
+++ b/bin/utils/subkey/src/main.rs
@@ -79,13 +79,15 @@ 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);
-
+
match output {
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),
@@ -135,7 +142,6 @@ trait Crypto: Sized {
);
},
}
-
} else if let Ok((public_key, v)) =
::Public::from_string_with_version(uri)
{
@@ -167,7 +173,7 @@ trait Crypto: Sized {
},
}
} else {
- println!("Invalid phrase/URI given");
+ eprintln!("Invalid phrase/URI given");
}
}
}
@@ -649,7 +655,7 @@ fn read_pair(
}
fn format_signature(signature: &SignatureOf) -> String {
- format!("{}", hex::encode(signature))
+ format!("{}", HexDisplay::from(&signature.as_ref()))
}
fn format_seed(seed: SeedOf) -> String {
@@ -712,7 +718,7 @@ fn create_extrinsic(
}
fn print_extrinsic(extrinsic: UncheckedExtrinsic) {
- println!("0x{}", hex::encode(&extrinsic.encode()));
+ println!("0x{}", HexDisplay::from(&extrinsic.encode()));
}
fn print_usage(matches: &ArgMatches) {
diff --git a/bin/utils/subkey/src/rpc.rs b/bin/utils/subkey/src/rpc.rs
index 7b3cde595867bd46e49ad840178e407500dfdabc..e08ccc19a22b8de89088ffade2809f7418eb7d25 100644
--- a/bin/utils/subkey/src/rpc.rs
+++ b/bin/utils/subkey/src/rpc.rs
@@ -42,7 +42,7 @@ impl RpcClient {
client.insert_key(key_type, suri, public).map(|_| ())
})
.map_err(|e| {
- println!("Error inserting key: {:?}", e);
+ eprintln!("Error inserting key: {:?}", e);
})
);
}
diff --git a/bin/utils/subkey/src/vanity.rs b/bin/utils/subkey/src/vanity.rs
index ff8703a9905ced71da4a6b4a6795f53fad6613d9..f921470946ec04732654091922711808f8aa6ad7 100644
--- a/bin/utils/subkey/src/vanity.rs
+++ b/bin/utils/subkey/src/vanity.rs
@@ -62,6 +62,12 @@ fn calculate_score(_desired: &str, key: &str) -> usize {
0
}
+/// Validate whether the char is allowed to be used in base58.
+/// num 0, lower l, upper I and O are not allowed.
+fn validate_base58(c :char) -> bool {
+ c.is_alphanumeric() && !"0lIO".contains(c)
+}
+
pub(super) fn generate_key(desired: &str) -> Result, &'static str> where
PublicOf: PublicT,
{
@@ -69,7 +75,12 @@ pub(super) fn generate_key(desired: &str) -> Result, &'sta
return Err("Pattern must not be empty");
}
- println!("Generating key containing pattern '{}'", desired);
+ if !desired.chars().all(validate_base58) {
+ return Err("Pattern can only contains valid characters in base58 \
+ (all alphanumeric except for 0, l, I and O)");
+ }
+
+ eprintln!("Generating key containing pattern '{}'", desired);
let top = 45 + (desired.len() * 48);
let mut best = 0;
@@ -94,14 +105,14 @@ pub(super) fn generate_key(desired: &str) -> Result, &'sta
score: score,
};
if best >= top {
- println!("best: {} == top: {}", best, top);
+ eprintln!("best: {} == top: {}", best, top);
return Ok(keypair);
}
}
done += 1;
if done % good_waypoint(done) == 0 {
- println!("{} keys searched; best is {}/{} complete", done, best, top);
+ eprintln!("{} keys searched; best is {}/{} complete", done, best, top);
}
}
}
@@ -162,6 +173,22 @@ mod tests {
);
}
+ #[test]
+ fn test_invalid_pattern() {
+ assert!(generate_key::("").is_err());
+ assert!(generate_key::("0").is_err());
+ assert!(generate_key::("l").is_err());
+ assert!(generate_key::("I").is_err());
+ assert!(generate_key::