diff --git a/.github/workflows/polkadot-companion-labels.yml b/.github/workflows/polkadot-companion-labels.yml
index 27f743e1bd4529dc83ee7dfd5b96c6c5bb4ac3f8..3c3987b5f4d563cfa15f36a87dc588a674b59660 100644
--- a/.github/workflows/polkadot-companion-labels.yml
+++ b/.github/workflows/polkadot-companion-labels.yml
@@ -16,9 +16,10 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
contexts: 'continuous-integration/gitlab-check-polkadot-companion-build'
timeout: 1800
- notPresentTimeout: 3600 # It can take quite a while before the job starts...
+ notPresentTimeout: 3600 # It can take quite a while before the job starts on Gitlab when the CI queue is large
failureStates: failure
interruptedStates: error # Error = job was probably cancelled. We don't want to label the PR in that case
+ pollInterval: 30
- name: Label success
uses: andymckay/labeler@master
if: steps.check-companion-status.outputs.result == 'success'
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c97d68bab0030484317757c9a69737430c80d5d8..9c87a3cb981606674aa44984c3a6474ad7bb78f2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,7 +13,7 @@
# image: paritytech/tools:latest # Any docker image (required)
# allow_failure: true # Allow the pipeline to continue if this job fails (default: false)
# dependencies:
-# - build-rust-doc-release # Any jobs that are required to run before this job (optional)
+# - build-rust-doc # Any jobs that are required to run before this job (optional)
# variables:
# MY_ENVIRONMENT_VARIABLE: "some useful value" # Environment variables passed to the job (optional)
# script:
@@ -193,6 +193,9 @@ cargo-deny:
- schedules
- tags
- web
+ except:
+ variables:
+ - $CI_COMMIT_MESSAGE =~ /skip-checks/
script:
- cargo deny check --hide-inclusion-graph -c .maintain/deny.toml
after_script:
@@ -273,6 +276,9 @@ unleash-check:
only:
- master
- tags
+ except:
+ variables:
+ - $CI_COMMIT_MESSAGE =~ /skip-checks/
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash check ${CARGO_UNLEASH_PKG_DEF}
@@ -336,6 +342,9 @@ check-web-wasm:
- 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 +nightly build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features browser --target=wasm32-unknown-unknown -Z features=itarget
+ # with-tracing must be explicitly activated, we run a test to ensure this works as expected in both cases
+ - time cargo +nightly test --manifest-path primitives/tracing/Cargo.toml --no-default-features
+ - time cargo +nightly test --manifest-path primitives/tracing/Cargo.toml --no-default-features --features=with-tracing
- sccache -s
test-full-crypto-feature:
@@ -476,23 +485,25 @@ build-macos-subkey:
tags:
- osx
-build-rust-doc-release:
+build-rust-doc:
stage: build
<<: *docker-env
<<: *docker-env-only
allow_failure: true
+ variables:
+ <<: *default-vars
+ RUSTFLAGS: -Dwarnings
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
expire_in: 7 days
paths:
- - ./crate-docs
- <<: *build-only
+ - ./crate-docs/
script:
- rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds
- BUILD_DUMMY_WASM_BINARY=1 RUSTDOCFLAGS="--html-in-header $(pwd)/.maintain/rustdoc-header.html"
- time cargo +nightly doc --release --all --verbose
- - cp -R ./target/doc ./crate-docs
+ time cargo +nightly doc --no-deps --workspace --all-features --verbose
+ - mv ./target/doc ./crate-docs
- echo "" > ./crate-docs/index.html
- sccache -s
@@ -520,7 +531,7 @@ docker-build-chaos: &docker-build-chaos
needs:
- job: build-linux-substrate
image: docker:stable
- tags:
+ tags:
- kubernetes-parity-build
variables:
<<: *default-vars
@@ -559,7 +570,7 @@ chaos-test-singlenodeheight:
image: parity/chaostools:latest
needs:
- job: docker-build-chaos
- tags:
+ tags:
- parity-chaos
variables:
<<: *default-vars
@@ -670,7 +681,7 @@ publish-s3-doc:
image: paritytech/awscli:latest
allow_failure: true
needs:
- - job: build-rust-doc-release
+ - job: build-rust-doc
artifacts: true
<<: *build-only
<<: *kubernetes-build
@@ -708,7 +719,7 @@ publish-to-crates-io:
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- - cargo unleash em-dragons --no-check ${CARGO_UNLEASH_PKG_DEF}
+ - cargo unleash em-dragons --no-check --owner github:paritytech:core-devs ${CARGO_UNLEASH_PKG_DEF}
allow_failure: true
@@ -734,7 +745,8 @@ deploy-kubernetes-alerting-rules:
refs:
- master
changes:
- - "${RULES}"
+ - .gitlab-ci.yml
+ - .maintain/monitoring/
diff --git a/.maintain/chaostest/package-lock.json b/.maintain/chaostest/package-lock.json
index 8855f221a133d14040312ce255bbf5ced3c27183..09468e12fb4f9ca72d8d6e352960464d4b2502ab 100644
--- a/.maintain/chaostest/package-lock.json
+++ b/.maintain/chaostest/package-lock.json
@@ -941,9 +941,9 @@
}
},
"bl": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz",
- "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
+ "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
"dev": true,
"requires": {
"buffer": "^5.5.0",
@@ -3836,9 +3836,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
},
"lodash._reinterpolate": {
"version": "3.0.0",
diff --git a/.maintain/gitlab/check_polkadot_companion_build.sh b/.maintain/gitlab/check_polkadot_companion_build.sh
index b78c26dea8458b0bcc7c172d163d31be68354b90..219af5001b0537b40df60a5a8f77f2f939f97d0a 100755
--- a/.maintain/gitlab/check_polkadot_companion_build.sh
+++ b/.maintain/gitlab/check_polkadot_companion_build.sh
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/usr/bin/env sh
#
-# check if a pr is compatible with polkadot companion pr or master if not
+# 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
+# to override one that was just mentioned mark companion pr in the body of the
# polkadot pr like
#
# polkadot companion: paritytech/polkadot#567
@@ -12,7 +12,7 @@
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="Authorization: token ${GITHUB_PR_TOKEN}"
+github_header="Authorization: token ${GITHUB_PR_TOKEN}"
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" ; }
@@ -40,7 +40,7 @@ EOT
git config --global user.name 'CI system'
git config --global user.email '<>'
-SUBSTRATE_PATH=$(pwd)
+cargo install -f --version 0.2.0 diener
# Merge master into our branch before building Polkadot to make sure we don't miss
# any commits that are required by Polkadot.
@@ -85,14 +85,10 @@ 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
+cd ..
+$CARGO_HOME/bin/diener --substrate --branch $CI_COMMIT_REF_NAME --git https://gitlab.parity.io/parity/substrate.git --path polkadot
+cd polkadot
# Test Polkadot pr or master branch with this Substrate commit.
+cargo update -p sp-io
time cargo test --all --release --verbose
diff --git a/.maintain/monitoring/grafana-dashboards/substrate-networking.json b/.maintain/monitoring/grafana-dashboards/substrate-networking.json
index 6eeae8e11e22a374aed85e4a179034e0984e8d34..dfc143005493d3549d002f4349e946e635495b54 100644
--- a/.maintain/monitoring/grafana-dashboards/substrate-networking.json
+++ b/.maintain/monitoring/grafana-dashboards/substrate-networking.json
@@ -1,5 +1,13 @@
{
"__inputs": [
+ {
+ "name": "DS_PROMETHEUS",
+ "label": "Prometheus",
+ "description": "",
+ "type": "datasource",
+ "pluginId": "prometheus",
+ "pluginName": "Prometheus"
+ },
{
"name": "VAR_METRIC_NAMESPACE",
"type": "constant",
@@ -68,7 +76,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": null,
- "iteration": 1594715467007,
+ "iteration": 1600780210197,
"links": [],
"panels": [
{
@@ -139,7 +147,7 @@
"title": "Number of peer slots filled",
"tooltip": {
"shared": true,
- "sort": 2,
+ "sort": 1,
"value_type": "individual"
},
"type": "graph",
@@ -317,7 +325,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "irate(${metric_namespace}_sub_libp2p_requests_in_total_count{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])",
+ "expr": "irate(${metric_namespace}_sub_libp2p_requests_in_success_total_count{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])",
"interval": "",
"legendFormat": "{{instance}}",
"refId": "A"
@@ -379,7 +387,7 @@
"y": 11
},
"hiddenSeries": false,
- "id": 146,
+ "id": 256,
"legend": {
"avg": false,
"current": false,
@@ -405,7 +413,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "histogram_quantile(0.5, sum(rate(${metric_namespace}_sub_libp2p_requests_out_finished_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le)) > 0",
+ "expr": "histogram_quantile(0.5, sum(rate(${metric_namespace}_sub_libp2p_requests_out_success_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le)) > 0",
"instant": false,
"interval": "",
"legendFormat": "{{instance}}",
@@ -468,7 +476,7 @@
"y": 11
},
"hiddenSeries": false,
- "id": 145,
+ "id": 258,
"legend": {
"avg": false,
"current": false,
@@ -494,7 +502,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "histogram_quantile(0.5, sum(rate(${metric_namespace}_sub_libp2p_requests_in_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le))",
+ "expr": "histogram_quantile(0.5, sum(rate(${metric_namespace}_sub_libp2p_requests_in_success_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le))",
"interval": "",
"legendFormat": "{{instance}}",
"refId": "A"
@@ -556,7 +564,7 @@
"y": 15
},
"hiddenSeries": false,
- "id": 150,
+ "id": 257,
"legend": {
"avg": false,
"current": false,
@@ -582,7 +590,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_requests_out_finished_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le)) > 0",
+ "expr": "histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_requests_out_success_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le)) > 0",
"instant": false,
"interval": "",
"legendFormat": "{{instance}}",
@@ -645,7 +653,7 @@
"y": 15
},
"hiddenSeries": false,
- "id": 149,
+ "id": 259,
"legend": {
"avg": false,
"current": false,
@@ -671,7 +679,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_requests_in_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le))",
+ "expr": "histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_requests_in_success_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le))",
"interval": "",
"legendFormat": "{{instance}}",
"refId": "A"
@@ -718,6 +726,184 @@
"alignLevel": null
}
},
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 0,
+ "y": 19
+ },
+ "hiddenSeries": false,
+ "id": 287,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(irate(${metric_namespace}_sub_libp2p_requests_out_failure_total{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (reason)",
+ "instant": false,
+ "interval": "",
+ "legendFormat": "{{reason}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Outgoing request failures per second",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 12,
+ "y": 19
+ },
+ "hiddenSeries": false,
+ "id": 286,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(irate(${metric_namespace}_sub_libp2p_requests_in_failure_total{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (reason)",
+ "instant": false,
+ "interval": "",
+ "legendFormat": "{{reason}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Ingoing request failures per second",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
{
"collapsed": false,
"datasource": null,
@@ -725,7 +911,7 @@
"h": 1,
"w": 24,
"x": 0,
- "y": 32
+ "y": 40
},
"id": 23,
"panels": [],
@@ -745,7 +931,7 @@
"h": 7,
"w": 12,
"x": 0,
- "y": 33
+ "y": 41
},
"hiddenSeries": false,
"id": 31,
@@ -847,7 +1033,7 @@
"h": 7,
"w": 12,
"x": 12,
- "y": 33
+ "y": 41
},
"hiddenSeries": false,
"id": 37,
@@ -953,7 +1139,7 @@
"h": 6,
"w": 12,
"x": 0,
- "y": 40
+ "y": 48
},
"hiddenSeries": false,
"id": 16,
@@ -1041,7 +1227,7 @@
"h": 6,
"w": 12,
"x": 12,
- "y": 40
+ "y": 48
},
"hiddenSeries": false,
"id": 21,
@@ -1132,7 +1318,7 @@
"h": 6,
"w": 12,
"x": 0,
- "y": 46
+ "y": 54
},
"hiddenSeries": false,
"id": 14,
@@ -1237,7 +1423,7 @@
"h": 6,
"w": 12,
"x": 12,
- "y": 46
+ "y": 54
},
"hiddenSeries": false,
"id": 134,
@@ -1322,7 +1508,7 @@
"h": 1,
"w": 24,
"x": 0,
- "y": 96
+ "y": 60
},
"id": 27,
"panels": [],
@@ -1341,7 +1527,7 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 97
+ "y": 61
},
"hiddenSeries": false,
"id": 19,
@@ -1478,7 +1664,7 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 103
+ "y": 67
},
"hiddenSeries": false,
"id": 189,
@@ -1574,7 +1760,7 @@
"h": 6,
"w": 12,
"x": 0,
- "y": 109
+ "y": 73
},
"hiddenSeries": false,
"id": 39,
@@ -1683,7 +1869,7 @@
"h": 6,
"w": 12,
"x": 12,
- "y": 109
+ "y": 73
},
"heatmap": {},
"hideZeroBuckets": false,
@@ -1740,7 +1926,7 @@
"h": 7,
"w": 12,
"x": 0,
- "y": 115
+ "y": 79
},
"hiddenSeries": false,
"id": 81,
@@ -1835,7 +2021,7 @@
"h": 7,
"w": 12,
"x": 12,
- "y": 115
+ "y": 79
},
"hiddenSeries": false,
"id": 46,
@@ -1923,7 +2109,7 @@
"h": 1,
"w": 24,
"x": 0,
- "y": 122
+ "y": 86
},
"id": 52,
"panels": [],
@@ -1942,7 +2128,7 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 123
+ "y": 87
},
"hiddenSeries": false,
"id": 54,
@@ -2047,7 +2233,7 @@
"h": 1,
"w": 24,
"x": 0,
- "y": 129
+ "y": 93
},
"id": 25,
"panels": [],
@@ -2068,7 +2254,7 @@
"h": 5,
"w": 12,
"x": 0,
- "y": 130
+ "y": 94
},
"hiddenSeries": false,
"id": 33,
@@ -2098,7 +2284,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "${metric_namespace}_sub_libp2p_kbuckets_num_nodes{instance=~\"${nodename}\"}",
+ "expr": "sum(${metric_namespace}_sub_libp2p_kbuckets_num_nodes{instance=~\"${nodename}\"}) by (instance)",
"format": "time_series",
"instant": false,
"interval": "",
@@ -2161,7 +2347,7 @@
"h": 5,
"w": 12,
"x": 12,
- "y": 130
+ "y": 94
},
"hiddenSeries": false,
"id": 35,
@@ -2250,7 +2436,7 @@
"h": 4,
"w": 12,
"x": 0,
- "y": 135
+ "y": 99
},
"hiddenSeries": false,
"id": 111,
@@ -2338,7 +2524,7 @@
"h": 4,
"w": 12,
"x": 12,
- "y": 135
+ "y": 99
},
"hiddenSeries": false,
"id": 112,
@@ -2427,7 +2613,7 @@
"h": 5,
"w": 12,
"x": 0,
- "y": 139
+ "y": 103
},
"hiddenSeries": false,
"id": 211,
@@ -2521,7 +2707,7 @@
"h": 5,
"w": 12,
"x": 12,
- "y": 139
+ "y": 103
},
"hiddenSeries": false,
"id": 233,
@@ -2614,7 +2800,7 @@
"h": 5,
"w": 12,
"x": 0,
- "y": 144
+ "y": 108
},
"hiddenSeries": false,
"id": 68,
@@ -2646,7 +2832,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_found\"}[2h]) / ignoring(name) (\n rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_found\"}[2h]) +\n ignoring(name) rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_not_found\"}[2h])\n)",
+ "expr": "rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_found\", instance=~\"${nodename}\"}[2h]) / ignoring(name) (\n rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_found\", instance=~\"${nodename}\"}[2h]) +\n ignoring(name) rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_not_found\", instance=~\"${nodename}\"}[2h])\n)",
"interval": "",
"legendFormat": "{{instance}}",
"refId": "B"
@@ -2705,7 +2891,7 @@
"h": 5,
"w": 12,
"x": 12,
- "y": 144
+ "y": 108
},
"hiddenSeries": false,
"id": 234,
@@ -2736,7 +2922,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_put\"}[2h]) / ignoring(name) (\n rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_put\"}[2h]) +\n ignoring(name) rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_put_failed\"}[2h])\n)",
+ "expr": "rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_put\", instance=~\"${nodename}\"}[2h]) / ignoring(name) (\n rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_put\", instance=~\"${nodename}\"}[2h]) +\n ignoring(name) rate(${metric_namespace}_authority_discovery_dht_event_received{name=\"value_put_failed\", instance=~\"${nodename}\"}[2h])\n)",
"interval": "",
"legendFormat": "{{instance}}",
"refId": "B"
@@ -2794,7 +2980,7 @@
"allValue": null,
"current": {},
"datasource": "$data_source",
- "definition": "${metric_namespace}_cpu_usage_percentage",
+ "definition": "${metric_namespace}_process_start_time_seconds",
"hide": 0,
"includeAll": true,
"index": -1,
@@ -2802,7 +2988,7 @@
"multi": true,
"name": "nodename",
"options": [],
- "query": "${metric_namespace}_cpu_usage_percentage",
+ "query": "${metric_namespace}_process_start_time_seconds",
"refresh": 1,
"regex": "/instance=\"(.*?)\"/",
"skipUrlSync": false,
@@ -2862,8 +3048,8 @@
{
"current": {
"selected": false,
- "text": "prometheus.parity-mgmt",
- "value": "prometheus.parity-mgmt"
+ "text": "Prometheus",
+ "value": "Prometheus"
},
"hide": 0,
"includeAll": false,
@@ -2898,7 +3084,7 @@
]
},
"time": {
- "from": "now-24h",
+ "from": "now-12h",
"to": "now"
},
"timepicker": {
@@ -2921,5 +3107,5 @@
"variables": {
"list": []
},
- "version": 113
+ "version": 121
}
diff --git a/.maintain/monitoring/grafana-dashboards/substrate-service-tasks.json b/.maintain/monitoring/grafana-dashboards/substrate-service-tasks.json
index 245071c210bfc48d815b6f963f3d51fbc4dd61b4..539fdec086a370367176fa4dc6681a61d876385e 100644
--- a/.maintain/monitoring/grafana-dashboards/substrate-service-tasks.json
+++ b/.maintain/monitoring/grafana-dashboards/substrate-service-tasks.json
@@ -44,14 +44,14 @@
{
"datasource": "$data_source",
"enable": true,
- "expr": "increase(${metric_namespace}_tasks_ended_total{reason=\"panic\", instance=~\"${nodename}\"}[5m])",
+ "expr": "increase(${metric_namespace}_tasks_ended_total{reason=\"panic\", instance=~\"${nodename}\"}[10m])",
"hide": true,
"iconColor": "rgba(255, 96, 96, 1)",
"limit": 100,
"name": "Task panics",
"rawQuery": "SELECT\n extract(epoch from time_column) AS time,\n text_column as text,\n tags_column as tags\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n",
"showIn": 0,
- "step": "",
+ "step": "10m",
"tags": [],
"textFormat": "{{instance}} - {{task_name}}",
"titleFormat": "Panic!",
@@ -60,12 +60,12 @@
{
"datasource": "$data_source",
"enable": true,
- "expr": "changes(${metric_namespace}_process_start_time_seconds{instance=~\"${nodename}\"}[5m])",
+ "expr": "changes(${metric_namespace}_process_start_time_seconds{instance=~\"${nodename}\"}[10m])",
"hide": false,
"iconColor": "#8AB8FF",
"name": "Node reboots",
"showIn": 0,
- "step": "",
+ "step": "10m",
"textFormat": "{{instance}}",
"titleFormat": "Reboots"
}
@@ -75,7 +75,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": null,
- "iteration": 1594822742772,
+ "iteration": 1599471940817,
"links": [],
"panels": [
{
@@ -87,9 +87,9 @@
"x": 0,
"y": 0
},
- "id": 25,
+ "id": 29,
"panels": [],
- "title": "CPU & Memory",
+ "title": "Tasks",
"type": "row"
},
{
@@ -107,130 +107,23 @@
"y": 1
},
"hiddenSeries": false,
- "id": 9,
+ "id": 11,
+ "interval": "1m",
"legend": {
- "avg": false,
+ "alignAsTable": true,
+ "avg": true,
"current": false,
+ "hideEmpty": false,
+ "hideZero": false,
"max": false,
"min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "stddev-above",
- "fillBelowTo": "stddev-below",
- "hideTooltip": true,
- "lines": false
- },
- {
- "alias": "stddev-below",
- "hideTooltip": true,
- "lines": false
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "avg(${metric_namespace}_cpu_usage_percentage{instance=~\"${nodename}\"})",
- "interval": "",
- "legendFormat": "cpu-usage",
- "refId": "A"
- },
- {
- "expr": "avg(${metric_namespace}_cpu_usage_percentage{instance=~\"${nodename}\"}) - stddev(${metric_namespace}_cpu_usage_percentage{instance=~\"${nodename}\"})",
- "interval": "",
- "legendFormat": "stddev-below",
- "refId": "B"
- },
- {
- "expr": "avg(${metric_namespace}_cpu_usage_percentage{instance=~\"${nodename}\"}) + stddev(${metric_namespace}_cpu_usage_percentage{instance=~\"${nodename}\"})",
- "interval": "",
- "legendFormat": "stddev-above",
- "refId": "C"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Average CPU usage and standard deviation",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
+ "rightSide": true,
"show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$data_source",
- "fill": 0,
- "fillGradient": 0,
- "gridPos": {
- "h": 6,
- "w": 24,
- "x": 0,
- "y": 7
- },
- "hiddenSeries": false,
- "id": 20,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
"total": false,
- "values": false
+ "values": true
},
"lines": true,
- "linewidth": 1,
+ "linewidth": 2,
"nullPointMode": "null",
"options": {
"dataLinks": []
@@ -242,12 +135,12 @@
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
- "steppedLine": false,
+ "steppedLine": true,
"targets": [
{
- "expr": "${metric_namespace}_memory_usage_bytes{instance=~\"${nodename}\"}",
+ "expr": "avg(irate(${metric_namespace}_tasks_polling_duration_sum{instance=~\"${nodename}\"}[10m])) by (task_name)",
"interval": "",
- "legendFormat": "{{instance}}",
+ "legendFormat": "{{task_name}}",
"refId": "A"
}
],
@@ -255,7 +148,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Memory usage",
+ "title": "CPU time spent on each task (average per node)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -271,7 +164,7 @@
},
"yaxes": [
{
- "format": "decbytes",
+ "format": "percentunit",
"label": null,
"logBase": 1,
"max": null,
@@ -292,20 +185,6 @@
"alignLevel": null
}
},
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 13
- },
- "id": 29,
- "panels": [],
- "title": "Tasks",
- "type": "row"
- },
{
"aliasColors": {},
"bars": false,
@@ -318,19 +197,23 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 14
+ "y": 7
},
"hiddenSeries": false,
- "id": 11,
- "interval": "1m",
+ "id": 30,
+ "interval": "",
"legend": {
- "avg": false,
+ "alignAsTable": true,
+ "avg": true,
"current": false,
+ "hideEmpty": false,
+ "hideZero": false,
"max": false,
"min": false,
- "show": false,
+ "rightSide": true,
+ "show": true,
"total": false,
- "values": false
+ "values": true
},
"lines": true,
"linewidth": 2,
@@ -348,7 +231,7 @@
"steppedLine": true,
"targets": [
{
- "expr": "avg(increase(${metric_namespace}_tasks_polling_duration_sum{instance=~\"${nodename}\"}[$__interval])) by (task_name) * 1000 / $__interval_ms",
+ "expr": "avg(irate(${metric_namespace}_tasks_polling_duration_count{instance=~\"${nodename}\"}[10m])) by (task_name)",
"interval": "",
"legendFormat": "{{task_name}}",
"refId": "A"
@@ -358,7 +241,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "CPU time spent on each task (average per node)",
+ "title": "Task polling rate per second (average per node)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -374,7 +257,7 @@
},
"yaxes": [
{
- "format": "percentunit",
+ "format": "cps",
"label": null,
"logBase": 1,
"max": null,
@@ -407,16 +290,16 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 20
+ "y": 13
},
"hiddenSeries": false,
- "id": 30,
+ "id": 31,
"interval": "",
"legend": {
"alignAsTable": true,
- "avg": true,
+ "avg": false,
"current": false,
- "max": false,
+ "max": true,
"min": false,
"rightSide": true,
"show": true,
@@ -439,7 +322,7 @@
"steppedLine": true,
"targets": [
{
- "expr": "avg(rate(${metric_namespace}_tasks_polling_duration_count{instance=~\"${nodename}\"}[5m])) by (task_name)",
+ "expr": "max(irate(${metric_namespace}_tasks_polling_duration_count{instance=~\"${nodename}\"}[10m])) by (task_name)",
"interval": "",
"legendFormat": "{{task_name}}",
"refId": "A"
@@ -449,7 +332,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Task polling rate per second (average per node)",
+ "title": "Task polling rate per second (maximum per node)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -498,16 +381,16 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 26
+ "y": 19
},
"hiddenSeries": false,
- "id": 31,
+ "id": 15,
"interval": "",
"legend": {
"alignAsTable": true,
- "avg": false,
+ "avg": true,
"current": false,
- "max": true,
+ "max": false,
"min": false,
"rightSide": true,
"show": true,
@@ -515,8 +398,8 @@
"values": true
},
"lines": true,
- "linewidth": 2,
- "nullPointMode": "null",
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
"options": {
"dataLinks": []
},
@@ -530,7 +413,7 @@
"steppedLine": true,
"targets": [
{
- "expr": "max(rate(${metric_namespace}_tasks_polling_duration_count{instance=~\"${nodename}\"}[5m])) by (task_name)",
+ "expr": "avg by(task_name) (irate(${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"}[10m]))",
"interval": "",
"legendFormat": "{{task_name}}",
"refId": "A"
@@ -540,7 +423,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Task polling rate per second (maximum per node)",
+ "title": "Number of tasks started per second (average per node)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -556,11 +439,11 @@
},
"yaxes": [
{
- "format": "cps",
+ "format": "short",
"label": null,
- "logBase": 1,
+ "logBase": 10,
"max": null,
- "min": null,
+ "min": "0",
"show": true
},
{
@@ -569,7 +452,7 @@
"logBase": 1,
"max": null,
"min": null,
- "show": false
+ "show": true
}
],
"yaxis": {
@@ -589,21 +472,21 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 32
+ "y": 25
},
"hiddenSeries": false,
- "id": 15,
+ "id": 16,
"interval": "",
"legend": {
- "alignAsTable": false,
+ "alignAsTable": true,
"avg": false,
"current": false,
- "max": false,
+ "max": true,
"min": false,
- "rightSide": false,
- "show": false,
+ "rightSide": true,
+ "show": true,
"total": false,
- "values": false
+ "values": true
},
"lines": true,
"linewidth": 1,
@@ -621,7 +504,7 @@
"steppedLine": true,
"targets": [
{
- "expr": "avg by(task_name) (irate(${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"}[5m]))",
+ "expr": "max by(task_name) (irate(${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"}[10m]))",
"interval": "",
"legendFormat": "{{task_name}}",
"refId": "A"
@@ -631,7 +514,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Number of tasks started per second (average per node)",
+ "title": "Number of tasks started per second (maximum over all nodes)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -680,21 +563,21 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 38
+ "y": 31
},
"hiddenSeries": false,
- "id": 16,
+ "id": 2,
"interval": "",
"legend": {
- "alignAsTable": false,
- "avg": false,
+ "alignAsTable": true,
+ "avg": true,
"current": false,
"max": false,
"min": false,
- "rightSide": false,
- "show": false,
+ "rightSide": true,
+ "show": true,
"total": false,
- "values": false
+ "values": true
},
"lines": true,
"linewidth": 1,
@@ -712,7 +595,7 @@
"steppedLine": true,
"targets": [
{
- "expr": "max by(task_name) (irate(${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"}[5m]))",
+ "expr": "avg by(task_name) (${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"} - sum(${metric_namespace}_tasks_ended_total{instance=~\"${nodename}\"}) without(reason))",
"interval": "",
"legendFormat": "{{task_name}}",
"refId": "A"
@@ -722,7 +605,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Number of tasks started per second (maximum over all nodes)",
+ "title": "Number of tasks running (average per node)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -771,21 +654,21 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 44
+ "y": 37
},
"hiddenSeries": false,
- "id": 2,
+ "id": 3,
"interval": "",
"legend": {
- "alignAsTable": false,
+ "alignAsTable": true,
"avg": false,
"current": false,
- "max": false,
+ "max": true,
"min": false,
- "rightSide": false,
- "show": false,
+ "rightSide": true,
+ "show": true,
"total": false,
- "values": false
+ "values": true
},
"lines": true,
"linewidth": 1,
@@ -803,7 +686,7 @@
"steppedLine": true,
"targets": [
{
- "expr": "avg by(task_name) (${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"} - sum(${metric_namespace}_tasks_ended_total{instance=~\"${nodename}\"}) without(reason))",
+ "expr": "max by(task_name) (${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"} - sum(${metric_namespace}_tasks_ended_total{instance=~\"${nodename}\"}) without(reason))",
"interval": "",
"legendFormat": "{{task_name}}",
"refId": "A"
@@ -813,7 +696,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Number of tasks running (average per node)",
+ "title": "Number of tasks running (maximum over all nodes)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -856,27 +739,30 @@
"dashLength": 10,
"dashes": false,
"datasource": "$data_source",
+ "decimals": null,
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
- "y": 50
+ "y": 43
},
"hiddenSeries": false,
- "id": 3,
+ "id": 7,
"interval": "",
"legend": {
- "alignAsTable": false,
- "avg": false,
+ "alignAsTable": true,
+ "avg": true,
"current": false,
+ "hideEmpty": true,
+ "hideZero": true,
"max": false,
"min": false,
- "rightSide": false,
- "show": false,
+ "rightSide": true,
+ "show": true,
"total": false,
- "values": false
+ "values": true
},
"lines": true,
"linewidth": 1,
@@ -890,11 +776,11 @@
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
- "stack": false,
+ "stack": true,
"steppedLine": true,
"targets": [
{
- "expr": "max by(task_name) (${metric_namespace}_tasks_spawned_total{instance=~\"${nodename}\"} - sum(${metric_namespace}_tasks_ended_total{instance=~\"${nodename}\"}) without(reason))",
+ "expr": "avg(\n irate(${metric_namespace}_tasks_polling_duration_bucket{instance=~\"${nodename}\", le=\"+Inf\"}[10m])\n - ignoring(le)\n irate(${metric_namespace}_tasks_polling_duration_bucket{instance=~\"${nodename}\", le=\"1.024\"}[10m])\n) by (task_name) > 0",
"interval": "",
"legendFormat": "{{task_name}}",
"refId": "A"
@@ -904,11 +790,11 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Number of tasks running (maximum over all nodes)",
+ "title": "Calls to `Future::poll` that took more than one second (average per node)",
"tooltip": {
"shared": true,
"sort": 2,
- "value_type": "individual"
+ "value_type": "cumulative"
},
"type": "graph",
"xaxis": {
@@ -920,9 +806,10 @@
},
"yaxes": [
{
- "format": "short",
- "label": null,
- "logBase": 10,
+ "decimals": null,
+ "format": "cps",
+ "label": "Calls to `Future::poll`/second",
+ "logBase": 1,
"max": null,
"min": "0",
"show": true
@@ -933,7 +820,7 @@
"logBase": 1,
"max": null,
"min": null,
- "show": true
+ "show": false
}
],
"yaxis": {
@@ -941,6 +828,20 @@
"alignLevel": null
}
},
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 49
+ },
+ "id": 27,
+ "panels": [],
+ "title": "Misc",
+ "type": "row"
+ },
{
"aliasColors": {},
"bars": false,
@@ -950,21 +851,18 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
- "h": 6,
+ "h": 7,
"w": 24,
"x": 0,
- "y": 56
+ "y": 50
},
"hiddenSeries": false,
- "id": 7,
- "interval": "",
+ "id": 32,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
- "hideEmpty": true,
- "hideZero": true,
- "max": false,
+ "max": true,
"min": false,
"rightSide": true,
"show": true,
@@ -973,7 +871,7 @@
},
"lines": true,
"linewidth": 1,
- "nullPointMode": "null as zero",
+ "nullPointMode": "null",
"options": {
"dataLinks": []
},
@@ -983,25 +881,25 @@
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
- "stack": true,
- "steppedLine": true,
+ "stack": false,
+ "steppedLine": false,
"targets": [
{
- "expr": "avg(\n rate(${metric_namespace}_tasks_polling_duration_bucket{instance=~\"${nodename}\", le=\"+Inf\"}[1m])\n - ignoring(le)\n rate(${metric_namespace}_tasks_polling_duration_bucket{instance=~\"${nodename}\", le=\"1.024\"}[1m])\n) by (task_name) > 0",
+ "expr": "avg(${metric_namespace}_unbounded_channel_len{instance=~\"${nodename}\", action = \"send\"} - ignoring(action) ${metric_namespace}_unbounded_channel_len{instance=~\"${nodename}\", action = \"received\"}) by (entity)",
"interval": "",
- "legendFormat": "{{task_name}}",
- "refId": "A"
+ "legendFormat": "{{entity}}",
+ "refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Calls to `Future::poll` that took more than one second (average per node)",
+ "title": "Unbounded channels size (average per node)",
"tooltip": {
"shared": true,
"sort": 2,
- "value_type": "cumulative"
+ "value_type": "individual"
},
"type": "graph",
"xaxis": {
@@ -1013,11 +911,11 @@
},
"yaxes": [
{
- "format": "cps",
- "label": "Calls to `Future::poll`/second",
+ "format": "short",
+ "label": null,
"logBase": 1,
"max": null,
- "min": "0",
+ "min": null,
"show": true
},
{
@@ -1034,20 +932,6 @@
"alignLevel": null
}
},
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 62
- },
- "id": 27,
- "panels": [],
- "title": "Misc",
- "type": "row"
- },
{
"aliasColors": {},
"bars": false,
@@ -1060,18 +944,20 @@
"h": 7,
"w": 24,
"x": 0,
- "y": 63
+ "y": 57
},
"hiddenSeries": false,
- "id": 23,
+ "id": 33,
"legend": {
- "avg": false,
+ "alignAsTable": true,
+ "avg": true,
"current": false,
"max": false,
"min": false,
- "show": false,
+ "rightSide": true,
+ "show": true,
"total": false,
- "values": false
+ "values": true
},
"lines": true,
"linewidth": 1,
@@ -1089,17 +975,17 @@
"steppedLine": false,
"targets": [
{
- "expr": "${metric_namespace}_threads{instance=~\"${nodename}\"}",
+ "expr": "avg(irate(${metric_namespace}_unbounded_channel_len{instance=~\"${nodename}\", action = \"send\"}[10m])) by (entity)",
"interval": "",
- "legendFormat": "{{instance}}",
- "refId": "A"
+ "legendFormat": "{{entity}}",
+ "refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Number of threads",
+ "title": "Unbounded channels rate (average per node)",
"tooltip": {
"shared": true,
"sort": 2,
@@ -1115,7 +1001,7 @@
},
"yaxes": [
{
- "format": "short",
+ "format": "cps",
"label": null,
"logBase": 1,
"max": null,
@@ -1137,7 +1023,7 @@
}
}
],
- "refresh": "30s",
+ "refresh": false,
"schemaVersion": 22,
"style": "dark",
"tags": [],
@@ -1147,7 +1033,7 @@
"allValue": null,
"current": {},
"datasource": "$data_source",
- "definition": "${metric_namespace}_cpu_usage_percentage",
+ "definition": "${metric_namespace}_process_start_time_seconds",
"hide": 0,
"includeAll": true,
"index": -1,
@@ -1155,7 +1041,7 @@
"multi": true,
"name": "nodename",
"options": [],
- "query": "${metric_namespace}_cpu_usage_percentage",
+ "query": "${metric_namespace}_process_start_time_seconds",
"refresh": 1,
"regex": "/instance=\"(.*?)\"/",
"skipUrlSync": false,
@@ -1228,5 +1114,5 @@
"variables": {
"list": []
},
- "version": 44
+ "version": 52
}
diff --git a/Cargo.lock b/Cargo.lock
index 1ce1cef19aeb8b32621a6c6ad2f830e1cf5684a1..8baee0169ae440c986cc86e1b328bb4b0607a52c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -40,23 +40,11 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7001367fde4c768a19d1029f0a8be5abd9308e1119846d5bd9ad26297b8faf5"
dependencies = [
- "aes-soft 0.4.0",
- "aesni 0.7.0",
+ "aes-soft",
+ "aesni",
"block-cipher",
]
-[[package]]
-name = "aes-ctr"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee"
-dependencies = [
- "aes-soft 0.3.3",
- "aesni 0.6.0",
- "ctr",
- "stream-cipher 0.3.2",
-]
-
[[package]]
name = "aes-gcm"
version = "0.6.0"
@@ -70,17 +58,6 @@ dependencies = [
"subtle 2.2.3",
]
-[[package]]
-name = "aes-soft"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d"
-dependencies = [
- "block-cipher-trait",
- "byteorder 1.3.4",
- "opaque-debug 0.2.3",
-]
-
[[package]]
name = "aes-soft"
version = "0.4.0"
@@ -92,17 +69,6 @@ dependencies = [
"opaque-debug 0.2.3",
]
-[[package]]
-name = "aesni"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100"
-dependencies = [
- "block-cipher-trait",
- "opaque-debug 0.2.3",
- "stream-cipher 0.3.2",
-]
-
[[package]]
name = "aesni"
version = "0.7.0"
@@ -395,9 +361,9 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.53.3"
+version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c72a978d268b1d70b0e963217e60fdabd9523a941457a6c42a7315d15c7e89e5"
+checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36"
dependencies = [
"bitflags",
"cexpr",
@@ -529,15 +495,6 @@ dependencies = [
"generic-array 0.14.3",
]
-[[package]]
-name = "block-cipher-trait"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774"
-dependencies = [
- "generic-array 0.12.3",
-]
-
[[package]]
name = "block-padding"
version = "0.1.5"
@@ -717,7 +674,7 @@ dependencies = [
[[package]]
name = "chain-spec-builder"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"ansi_term 0.12.1",
"node-cli",
@@ -747,7 +704,7 @@ version = "0.29.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a"
dependencies = [
- "glob 0.3.0",
+ "glob",
"libc",
"libloading",
]
@@ -777,12 +734,12 @@ dependencies = [
]
[[package]]
-name = "cmake"
-version = "0.1.44"
+name = "cloudabi"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb"
+checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467"
dependencies = [
- "cc",
+ "bitflags",
]
[[package]]
@@ -1114,16 +1071,6 @@ dependencies = [
"syn",
]
-[[package]]
-name = "ctr"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736"
-dependencies = [
- "block-cipher-trait",
- "stream-cipher 0.3.2",
-]
-
[[package]]
name = "cuckoofilter"
version = "0.3.2"
@@ -1283,9 +1230,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.5.3"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
+checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f"
[[package]]
name = "enumflags2"
@@ -1486,9 +1433,9 @@ checksum = "36a9cb09840f81cd211e435d00a4e487edd263dc3c8ff815c32dd76ad668ebed"
[[package]]
name = "fdlimit"
-version = "0.1.4"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0da54a593b34c71b889ee45f5b5bb900c74148c5f7f8c6a9479ee7899f69603c"
+checksum = "47bc6e222b8349b2bd0acb85a1d16d22852376b3ceed2a7f09c2692c3d8a78d0"
dependencies = [
"libc",
]
@@ -1558,14 +1505,14 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "fork-tree"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
]
[[package]]
name = "frame-benchmarking"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -1583,8 +1530,9 @@ dependencies = [
[[package]]
name = "frame-benchmarking-cli"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
+ "chrono",
"frame-benchmarking",
"parity-scale-codec",
"sc-cli",
@@ -1600,7 +1548,7 @@ dependencies = [
[[package]]
name = "frame-executive"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -1620,7 +1568,7 @@ dependencies = [
[[package]]
name = "frame-metadata"
-version = "11.0.0-rc6"
+version = "12.0.0"
dependencies = [
"parity-scale-codec",
"serde",
@@ -1630,7 +1578,7 @@ dependencies = [
[[package]]
name = "frame-support"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"bitmask",
"frame-metadata",
@@ -1657,7 +1605,7 @@ dependencies = [
[[package]]
name = "frame-support-procedural"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support-procedural-tools",
"proc-macro2",
@@ -1667,7 +1615,7 @@ dependencies = [
[[package]]
name = "frame-support-procedural-tools"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate",
@@ -1678,7 +1626,7 @@ dependencies = [
[[package]]
name = "frame-support-procedural-tools-derive"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"proc-macro2",
"quote",
@@ -1687,8 +1635,9 @@ dependencies = [
[[package]]
name = "frame-support-test"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
+ "frame-metadata",
"frame-support",
"parity-scale-codec",
"pretty_assertions",
@@ -1705,7 +1654,7 @@ dependencies = [
[[package]]
name = "frame-system"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"criterion",
"frame-support",
@@ -1723,7 +1672,7 @@ dependencies = [
[[package]]
name = "frame-system-benchmarking"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -1738,7 +1687,7 @@ dependencies = [
[[package]]
name = "frame-system-rpc-runtime-api"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -2078,12 +2027,6 @@ version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724"
-[[package]]
-name = "glob"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
-
[[package]]
name = "glob"
version = "0.3.0"
@@ -2263,9 +2206,9 @@ dependencies = [
[[package]]
name = "honggfuzz"
-version = "0.5.49"
+version = "0.5.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "832bac18a82ec7d6c21887daa8616b238fe90d5d5e762d0d4b9372cdaa9e097f"
+checksum = "6f085725a5828d7e959f014f624773094dfe20acc91be310ef106923c30594bc"
dependencies = [
"arbitrary",
"lazy_static",
@@ -2474,6 +2417,12 @@ dependencies = [
"serde",
]
+[[package]]
+name = "instant"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485"
+
[[package]]
name = "integer-sqrt"
version = "0.1.3"
@@ -2555,9 +2504,9 @@ dependencies = [
[[package]]
name = "jsonrpc-client-transports"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecbdaacc17243168d9d1fa6b2bd7556a27e1e60a621d8a2a6e590ae2b145d158"
+checksum = "c6f7b1cdf66312002e15682a24430728bd13036c641163c016bc53fb686a7c2d"
dependencies = [
"failure",
"futures 0.1.29",
@@ -2572,9 +2521,9 @@ dependencies = [
[[package]]
name = "jsonrpc-core"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62"
+checksum = "f30b12567a31d48588a65b6cf870081e6ba1d7b2ae353977cb9820d512e69c70"
dependencies = [
"futures 0.1.29",
"log",
@@ -2585,18 +2534,18 @@ dependencies = [
[[package]]
name = "jsonrpc-core-client"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34221123bc79b66279a3fde2d3363553835b43092d629b34f2e760c44dc94713"
+checksum = "d175ca0cf77439b5495612bf216c650807d252d665b4b70ab2eebd895a88fac1"
dependencies = [
"jsonrpc-client-transports",
]
[[package]]
name = "jsonrpc-derive"
-version = "14.2.1"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fadf6945e227246825a583514534d864554e9f23d80b3c77d034b10983db5ef"
+checksum = "c2cc6ea7f785232d9ca8786a44e9fa698f92149dcdc1acc4aa1fc69c4993d79e"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2606,9 +2555,9 @@ dependencies = [
[[package]]
name = "jsonrpc-http-server"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0da906d682799df05754480dac1b9e70ec92e12c19ebafd2662a5ea1c9fd6522"
+checksum = "9996b26c0c7a59626d0ed6c5ec8bf06218e62ce1474bd2849f9b9fd38a0158c0"
dependencies = [
"hyper 0.12.35",
"jsonrpc-core",
@@ -2621,9 +2570,9 @@ dependencies = [
[[package]]
name = "jsonrpc-ipc-server"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dedccd693325d833963b549e959137f30a7a0ea650cde92feda81dc0c1393cb5"
+checksum = "b8e8f2278fb2b277175b6e21b23e7ecf30e78daff5ee301d0a2a411d9a821a0a"
dependencies = [
"jsonrpc-core",
"jsonrpc-server-utils",
@@ -2635,9 +2584,9 @@ dependencies = [
[[package]]
name = "jsonrpc-pubsub"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d44f5602a11d657946aac09357956d2841299ed422035edf140c552cb057986"
+checksum = "f389c5cd1f3db258a99296892c21047e21ae73ff4c0e2d39650ea86fe994b4c7"
dependencies = [
"jsonrpc-core",
"log",
@@ -2648,9 +2597,9 @@ dependencies = [
[[package]]
name = "jsonrpc-server-utils"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56cbfb462e7f902e21121d9f0d1c2b77b2c5b642e1a4e8f4ebfa2e15b94402bb"
+checksum = "c623e1895d0d9110cb0ea7736cfff13191ff52335ad33b21bd5c775ea98b27af"
dependencies = [
"bytes 0.4.12",
"globset",
@@ -2664,16 +2613,16 @@ dependencies = [
[[package]]
name = "jsonrpc-ws-server"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "903d3109fe7c4acb932b567e1e607e0f524ed04741b09fb0e61841bc40a022fc"
+checksum = "436a92034d0137ab3e3c64a7a6350b428f31cb4d7d1a89f284bcdbcd98a7bc56"
dependencies = [
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
+ "parity-ws",
"parking_lot 0.10.2",
"slab",
- "ws",
]
[[package]]
@@ -2735,9 +2684,9 @@ dependencies = [
[[package]]
name = "kvdb-rocksdb"
-version = "0.9.0"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c341ef15cfb1f923fa3b5138bfbd2d4813a2c1640b473727a53351c7f0b0fa2"
+checksum = "44947dd392f09475af614d740fe0320b66d01cb5b977f664bbbb5e45a70ea4c1"
dependencies = [
"fs-swap",
"kvdb",
@@ -2810,9 +2759,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]]
name = "libp2p"
-version = "0.24.0"
+version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76c101edbb9c06955fd4085b77d2abc31cf3650134d77068b35c44967756ada8"
+checksum = "571f5a4604c1a40d75651da141dfde29ad15329f537a779528803297d2220274"
dependencies = [
"atomic",
"bytes 0.5.6",
@@ -2833,7 +2782,6 @@ dependencies = [
"libp2p-plaintext",
"libp2p-pnet",
"libp2p-request-response",
- "libp2p-secio",
"libp2p-swarm",
"libp2p-tcp",
"libp2p-uds",
@@ -2850,9 +2798,9 @@ dependencies = [
[[package]]
name = "libp2p-core"
-version = "0.21.0"
+version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17cea54ea4a846a7c47e4347db0fc7a4129dcb0fb57f07f57e473820edbfcbde"
+checksum = "52f13ba8c7df0768af2eb391696d562c7de88cc3a35122531aaa6a7d77754d25"
dependencies = [
"asn1_der",
"bs58",
@@ -2894,9 +2842,9 @@ dependencies = [
[[package]]
name = "libp2p-deflate"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc6174d6addc9cc5fd84af7099480774035dd1a7cdf48dd31b23dea45cf57638"
+checksum = "74029ae187f35f4b8ddf26b9779a68b340045d708528a103917cdca49a296db5"
dependencies = [
"flate2",
"futures 0.3.5",
@@ -2905,9 +2853,9 @@ dependencies = [
[[package]]
name = "libp2p-dns"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fce8769cfe677a567d2677dc02a9e5be27a24acf1ff78a59cef425caae009a6a"
+checksum = "7cf319822e08dd65c8e060d2354e9f952895bbc433f5706c75ed010c152aee5e"
dependencies = [
"futures 0.3.5",
"libp2p-core",
@@ -2916,9 +2864,9 @@ dependencies = [
[[package]]
name = "libp2p-floodsub"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f2342965ac7ea4b85f4df5288089796421f9297ba4020dc9692f4ef728590dc"
+checksum = "d8a9acb43a3e4a4e413e0c4abe0fa49308df7c6335c88534757b647199cb8a51"
dependencies = [
"cuckoofilter",
"fnv",
@@ -2933,9 +2881,9 @@ dependencies = [
[[package]]
name = "libp2p-gossipsub"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0828b4f0c76c2edc68da574e391ce981bac5316d65785cddfe8c273d4c9bd4bb"
+checksum = "ab20fcb60edebe3173bbb708c6ac3444afdf1e3152dc2866b10c4f5497f17467"
dependencies = [
"base64 0.11.0",
"byteorder 1.3.4",
@@ -2959,9 +2907,9 @@ dependencies = [
[[package]]
name = "libp2p-identify"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41efcb5b521b65d2c45432a244ce6427cdd3649228cd192f397d1fa67682aef2"
+checksum = "56396ee63aa9164eacf40c2c5d2bda8c4133c2f57e1b0425d51d3a4e362583b1"
dependencies = [
"futures 0.3.5",
"libp2p-core",
@@ -2975,9 +2923,9 @@ dependencies = [
[[package]]
name = "libp2p-kad"
-version = "0.22.1"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca9b4ccc868863317af3f65eb241811ceadd971d133183040140f5496037e0ae"
+checksum = "cc7fa9047f8b8f544278a35c2d9d45d3b2c1785f2d86d4e1629d6edf97be3955"
dependencies = [
"arrayvec 0.5.1",
"bytes 0.5.6",
@@ -3002,9 +2950,9 @@ dependencies = [
[[package]]
name = "libp2p-mdns"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4fe5614c2c5af74ef5870aad0fce73c9e4707716c4ee7cdf06cf9a0376d3815"
+checksum = "3173b5a6b2f690c29ae07798d85b9441a131ac76ddae9015ef22905b623d0c69"
dependencies = [
"async-std",
"data-encoding",
@@ -3024,9 +2972,9 @@ dependencies = [
[[package]]
name = "libp2p-mplex"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df9e79541e71590846f773efce1b6d0538804992ee54ff2f407e05d63a9ddc23"
+checksum = "8a73a799cc8410b36e40b8f4c4b6babbcb9efd3727111bf517876e4acfa612d3"
dependencies = [
"bytes 0.5.6",
"fnv",
@@ -3040,9 +2988,9 @@ dependencies = [
[[package]]
name = "libp2p-noise"
-version = "0.23.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0beba6459d06153f5f8e23da3df1d2183798b1f457c7c9468ff99760bcbcc60b"
+checksum = "6ef6c490042f549fb1025f2892dfe6083d97a77558f450c1feebe748ca9eb15a"
dependencies = [
"bytes 0.5.6",
"curve25519-dalek",
@@ -3062,9 +3010,9 @@ dependencies = [
[[package]]
name = "libp2p-ping"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "670261ef938567b614746b078e049b03b55617538a8d415071c518f97532d043"
+checksum = "ad063c21dfcea4518ac9e8bd4119d33a5b26c41e674f602f41f05617a368a5c8"
dependencies = [
"futures 0.3.5",
"libp2p-core",
@@ -3077,9 +3025,9 @@ dependencies = [
[[package]]
name = "libp2p-plaintext"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3a61dfd53d1264ddff1206e4827193efaa72bab27782dfcd63c0dec120a1875"
+checksum = "903a12e99c72dbebefea258de887982adeacc7025baa1ceb10b7fa9928f54791"
dependencies = [
"bytes 0.5.6",
"futures 0.3.5",
@@ -3109,57 +3057,31 @@ dependencies = [
[[package]]
name = "libp2p-request-response"
-version = "0.2.0"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4af0de0e56a11d46c5191a61019733b5618dc955c0a36f82866bb6d5d81a7f8f"
+checksum = "9c0c9e8a4cd69d97e9646c54313d007512f411aba8c5226cfcda16df6a6e84a3"
dependencies = [
"async-trait",
+ "bytes 0.5.6",
"futures 0.3.5",
"libp2p-core",
"libp2p-swarm",
"log",
"lru 0.6.0",
+ "minicbor",
"rand 0.7.3",
"smallvec 1.4.1",
+ "unsigned-varint 0.5.1",
"wasm-timer",
]
-[[package]]
-name = "libp2p-secio"
-version = "0.21.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a04b320cc0394554e8d0adca21f4efd9f8c2da4930211d92e411a19a4dfd769e"
-dependencies = [
- "aes-ctr",
- "ctr",
- "futures 0.3.5",
- "hmac",
- "js-sys",
- "lazy_static",
- "libp2p-core",
- "log",
- "parity-send-wrapper",
- "pin-project",
- "prost",
- "prost-build",
- "quicksink",
- "rand 0.7.3",
- "ring",
- "rw-stream-sink",
- "sha2 0.8.2",
- "static_assertions",
- "twofish",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
-]
-
[[package]]
name = "libp2p-swarm"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57e4a7e64156e9d1a2daae36b5d791f057b9c53c9364a8e75f7f9848b54f9d68"
+checksum = "7193e444210132237b81b755ec7fe53f1c4bd2f53cf719729b94c0c72eb6eaa1"
dependencies = [
+ "either",
"futures 0.3.5",
"libp2p-core",
"log",
@@ -3171,9 +3093,9 @@ dependencies = [
[[package]]
name = "libp2p-tcp"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0f65400ccfbbf9a356733bceca6c519c9db0deb5fbcc0b81f89837c4cd53997"
+checksum = "44f42ec130d7a37a7e47bf4398026b7ad9185c08ed26972e2720f8b94112796f"
dependencies = [
"async-std",
"futures 0.3.5",
@@ -3187,9 +3109,9 @@ dependencies = [
[[package]]
name = "libp2p-uds"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95bc8b0ca1dda4cccb1bb156d47a32e45cfa447ef18f737209f014a63f94a4a2"
+checksum = "dea7acb0a034f70d7db94c300eba3f65c0f6298820105624088a9609c9974d77"
dependencies = [
"async-std",
"futures 0.3.5",
@@ -3199,9 +3121,9 @@ dependencies = [
[[package]]
name = "libp2p-wasm-ext"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f2f7b06d80d036ac5763a811185b7fe6951ad71c00544b17cc378a9069bb7c2"
+checksum = "34c1faac6f92c21fbe155417957863ea822fba9e9fd5eb24c0912336a100e63f"
dependencies = [
"futures 0.3.5",
"js-sys",
@@ -3213,9 +3135,9 @@ dependencies = [
[[package]]
name = "libp2p-websocket"
-version = "0.22.0"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5b350db65cf0a7c83a539a596ea261caae1552c0df2245df0f916ed2fd04572"
+checksum = "d650534ebd99f48f6fa292ed5db10d30df2444943afde4407ceeddab8e513fca"
dependencies = [
"async-tls",
"either",
@@ -3233,26 +3155,26 @@ dependencies = [
[[package]]
name = "libp2p-yamux"
-version = "0.21.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3969ead4ce530efb6f304623924245caf410f3b0b0139bd7007f205933788aa"
+checksum = "781d9b9f043dcdabc40640807125368596b849fd4d96cdca2dcf052fdf6f33fd"
dependencies = [
"futures 0.3.5",
"libp2p-core",
- "parking_lot 0.10.2",
+ "parking_lot 0.11.0",
"thiserror",
"yamux",
]
[[package]]
name = "librocksdb-sys"
-version = "6.7.4"
+version = "6.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "883213ae3d09bfc3d104aefe94b25ebb183b6f4d3a515b23b14817e1f4854005"
+checksum = "eb5b56f651c204634b936be2f92dbb42c36867e00ff7fe2405591f3b9fa66f09"
dependencies = [
"bindgen",
"cc",
- "glob 0.3.0",
+ "glob",
"libc",
]
@@ -3346,6 +3268,15 @@ dependencies = [
"scopeguard 1.1.0",
]
+[[package]]
+name = "lock_api"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c"
+dependencies = [
+ "scopeguard 1.1.0",
+]
+
[[package]]
name = "log"
version = "0.4.11"
@@ -3481,6 +3412,26 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "minicbor"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fc03ad6f8f548db7194a5ff5a6f96342ecae4e3ef67d2bf18bacc0e245cd041"
+dependencies = [
+ "minicbor-derive",
+]
+
+[[package]]
+name = "minicbor-derive"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c214bf3d90099b52f3e4b328ae0fe34837fd0fab683ad1e10fceb4629106df48"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "miniz_oxide"
version = "0.4.0"
@@ -3659,7 +3610,7 @@ dependencies = [
[[package]]
name = "node-bench"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"fs_extra",
@@ -3689,6 +3640,7 @@ dependencies = [
"sp-runtime",
"sp-state-machine",
"sp-timestamp",
+ "sp-tracing",
"sp-transaction-pool",
"sp-trie",
"structopt",
@@ -3697,7 +3649,7 @@ dependencies = [
[[package]]
name = "node-browser-testing"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.3.5",
"futures-timer 3.0.2",
@@ -3714,7 +3666,7 @@ dependencies = [
[[package]]
name = "node-cli"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"assert_cmd",
"frame-benchmarking-cli",
@@ -3722,8 +3674,6 @@ dependencies = [
"frame-system",
"futures 0.3.5",
"hex-literal",
- "jsonrpc-core",
- "jsonrpc-pubsub",
"log",
"nix",
"node-executor",
@@ -3791,7 +3741,7 @@ dependencies = [
[[package]]
name = "node-executor"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"criterion",
"frame-benchmarking",
@@ -3820,12 +3770,12 @@ dependencies = [
"sp-trie",
"substrate-test-client",
"trie-root",
- "wabt",
+ "wat",
]
[[package]]
name = "node-inspect"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"log",
@@ -3841,7 +3791,7 @@ dependencies = [
[[package]]
name = "node-primitives"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-system",
"parity-scale-codec",
@@ -3854,10 +3804,9 @@ dependencies = [
[[package]]
name = "node-rpc"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"jsonrpc-core",
- "jsonrpc-pubsub",
"node-primitives",
"node-runtime",
"pallet-contracts-rpc",
@@ -3876,26 +3825,27 @@ dependencies = [
"sp-blockchain",
"sp-consensus",
"sp-consensus-babe",
+ "sp-runtime",
"sp-transaction-pool",
"substrate-frame-rpc-system",
]
[[package]]
name = "node-rpc-client"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
- "env_logger",
"futures 0.1.29",
"hyper 0.12.35",
"jsonrpc-core-client",
"log",
"node-primitives",
"sc-rpc",
+ "sp-tracing",
]
[[package]]
name = "node-runtime"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-executive",
@@ -3964,8 +3914,10 @@ dependencies = [
[[package]]
name = "node-template"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
+ "frame-benchmarking",
+ "frame-benchmarking-cli",
"jsonrpc-core",
"node-template-runtime",
"pallet-transaction-payment-rpc",
@@ -3997,12 +3949,15 @@ dependencies = [
[[package]]
name = "node-template-runtime"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
+ "frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
+ "frame-system-benchmarking",
"frame-system-rpc-runtime-api",
+ "hex-literal",
"pallet-aura",
"pallet-balances",
"pallet-grandpa",
@@ -4030,7 +3985,7 @@ dependencies = [
[[package]]
name = "node-testing"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"criterion",
"frame-support",
@@ -4071,7 +4026,6 @@ dependencies = [
"sp-timestamp",
"substrate-test-client",
"tempfile",
- "wabt",
]
[[package]]
@@ -4238,7 +4192,7 @@ dependencies = [
[[package]]
name = "pallet-assets"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4252,7 +4206,7 @@ dependencies = [
[[package]]
name = "pallet-atomic-swap"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4267,7 +4221,7 @@ dependencies = [
[[package]]
name = "pallet-aura"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4289,7 +4243,7 @@ dependencies = [
[[package]]
name = "pallet-authority-discovery"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4307,7 +4261,7 @@ dependencies = [
[[package]]
name = "pallet-authorship"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4323,7 +4277,7 @@ dependencies = [
[[package]]
name = "pallet-babe"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4352,7 +4306,7 @@ dependencies = [
[[package]]
name = "pallet-balances"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4366,23 +4320,9 @@ dependencies = [
"sp-std",
]
-[[package]]
-name = "pallet-benchmark"
-version = "2.0.0-rc6"
-dependencies = [
- "frame-benchmarking",
- "frame-support",
- "frame-system",
- "parity-scale-codec",
- "serde",
- "sp-io",
- "sp-runtime",
- "sp-std",
-]
-
[[package]]
name = "pallet-collective"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4399,7 +4339,7 @@ dependencies = [
[[package]]
name = "pallet-contracts"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"assert_matches",
"bitflags",
@@ -4427,7 +4367,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-primitives"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -4436,7 +4376,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-rpc"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -4455,7 +4395,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-rpc-runtime-api"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"pallet-contracts-primitives",
"parity-scale-codec",
@@ -4482,7 +4422,7 @@ dependencies = [
[[package]]
name = "pallet-democracy"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4502,7 +4442,7 @@ dependencies = [
[[package]]
name = "pallet-elections"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4518,7 +4458,7 @@ dependencies = [
[[package]]
name = "pallet-elections-phragmen"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4537,7 +4477,7 @@ dependencies = [
[[package]]
name = "pallet-evm"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"evm",
"frame-support",
@@ -4559,7 +4499,7 @@ dependencies = [
[[package]]
name = "pallet-example"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4575,7 +4515,7 @@ dependencies = [
[[package]]
name = "pallet-example-offchain-worker"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4590,7 +4530,7 @@ dependencies = [
[[package]]
name = "pallet-finality-tracker"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4605,23 +4545,9 @@ dependencies = [
"sp-std",
]
-[[package]]
-name = "pallet-generic-asset"
-version = "2.0.0-rc6"
-dependencies = [
- "frame-support",
- "frame-system",
- "parity-scale-codec",
- "serde",
- "sp-core",
- "sp-io",
- "sp-runtime",
- "sp-std",
-]
-
[[package]]
name = "pallet-grandpa"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"finality-grandpa",
"frame-benchmarking",
@@ -4650,7 +4576,7 @@ dependencies = [
[[package]]
name = "pallet-identity"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -4667,7 +4593,7 @@ dependencies = [
[[package]]
name = "pallet-im-online"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4686,7 +4612,7 @@ dependencies = [
[[package]]
name = "pallet-indices"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4703,7 +4629,7 @@ dependencies = [
[[package]]
name = "pallet-membership"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4717,7 +4643,7 @@ dependencies = [
[[package]]
name = "pallet-multisig"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4733,7 +4659,7 @@ dependencies = [
[[package]]
name = "pallet-nicks"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4746,9 +4672,23 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-node-authorization"
+version = "2.0.0"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-offences"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4764,7 +4704,7 @@ dependencies = [
[[package]]
name = "pallet-offences-benchmarking"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4789,7 +4729,7 @@ dependencies = [
[[package]]
name = "pallet-proxy"
-version = "2.0.0-rc6"
+version = "2.0.1"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4806,7 +4746,7 @@ dependencies = [
[[package]]
name = "pallet-randomness-collective-flip"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4820,7 +4760,7 @@ dependencies = [
[[package]]
name = "pallet-recovery"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"enumflags2",
"frame-support",
@@ -4836,7 +4776,7 @@ dependencies = [
[[package]]
name = "pallet-scheduler"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4852,7 +4792,7 @@ dependencies = [
[[package]]
name = "pallet-scored-pool"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4867,7 +4807,7 @@ dependencies = [
[[package]]
name = "pallet-session"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4888,7 +4828,7 @@ dependencies = [
[[package]]
name = "pallet-session-benchmarking"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4910,7 +4850,7 @@ dependencies = [
[[package]]
name = "pallet-society"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -4926,9 +4866,8 @@ dependencies = [
[[package]]
name = "pallet-staking"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
- "env_logger",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -4950,6 +4889,7 @@ dependencies = [
"sp-staking",
"sp-std",
"sp-storage",
+ "sp-tracing",
"static_assertions",
"substrate-test-utils",
]
@@ -4977,7 +4917,7 @@ dependencies = [
[[package]]
name = "pallet-staking-reward-curve"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -4988,7 +4928,7 @@ dependencies = [
[[package]]
name = "pallet-sudo"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -5002,7 +4942,7 @@ dependencies = [
[[package]]
name = "pallet-template"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -5014,7 +4954,7 @@ dependencies = [
[[package]]
name = "pallet-timestamp"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5032,7 +4972,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -5050,7 +4990,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -5067,7 +5007,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -5080,7 +5020,7 @@ dependencies = [
[[package]]
name = "pallet-treasury"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5097,7 +5037,7 @@ dependencies = [
[[package]]
name = "pallet-utility"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5113,7 +5053,7 @@ dependencies = [
[[package]]
name = "pallet-vesting"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -5146,9 +5086,9 @@ dependencies = [
[[package]]
name = "parity-multiaddr"
-version = "0.9.1"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc20af3143a62c16e7c9e92ea5c6ae49f7d271d97d4d8fe73afc28f0514a3d0f"
+checksum = "2165a93382a93de55868dcbfa11e4a8f99676a9164eee6a2b4a9479ad319c257"
dependencies = [
"arrayref",
"bs58",
@@ -5256,6 +5196,24 @@ version = "0.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865"
+[[package]]
+name = "parity-ws"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e02a625dd75084c2a7024f07c575b61b782f729d18702dabb3cdbf31911dc61"
+dependencies = [
+ "byteorder 1.3.4",
+ "bytes 0.4.12",
+ "httparse",
+ "log",
+ "mio",
+ "mio-extras",
+ "rand 0.7.3",
+ "sha-1",
+ "slab",
+ "url 2.1.1",
+]
+
[[package]]
name = "parking"
version = "1.0.5"
@@ -5293,6 +5251,17 @@ dependencies = [
"parking_lot_core 0.7.2",
]
+[[package]]
+name = "parking_lot"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733"
+dependencies = [
+ "instant",
+ "lock_api 0.4.1",
+ "parking_lot_core 0.8.0",
+]
+
[[package]]
name = "parking_lot_core"
version = "0.4.0"
@@ -5313,7 +5282,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
dependencies = [
"cfg-if",
- "cloudabi",
+ "cloudabi 0.0.3",
"libc",
"redox_syscall",
"rustc_version",
@@ -5328,7 +5297,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
dependencies = [
"cfg-if",
- "cloudabi",
+ "cloudabi 0.0.3",
+ "libc",
+ "redox_syscall",
+ "smallvec 1.4.1",
+ "winapi 0.3.9",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b"
+dependencies = [
+ "cfg-if",
+ "cloudabi 0.1.0",
+ "instant",
"libc",
"redox_syscall",
"smallvec 1.4.1",
@@ -5589,14 +5573,15 @@ dependencies = [
[[package]]
name = "prometheus"
-version = "0.9.0"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd0ced56dee39a6e960c15c74dc48849d614586db2eaada6497477af7c7811cd"
+checksum = "30d70cf4412832bcac9cffe27906f4a66e450d323525e977168c70d1b36120ae"
dependencies = [
"cfg-if",
"fnv",
"lazy_static",
- "spin",
+ "parking_lot 0.11.0",
+ "regex",
"thiserror",
]
@@ -5735,7 +5720,7 @@ version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"
dependencies = [
- "cloudabi",
+ "cloudabi 0.0.3",
"fuchsia-cprng",
"libc",
"rand_core 0.3.1",
@@ -5863,7 +5848,7 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
dependencies = [
- "cloudabi",
+ "cloudabi 0.0.3",
"fuchsia-cprng",
"libc",
"rand_core 0.4.2",
@@ -6048,27 +6033,6 @@ dependencies = [
"winapi 0.3.9",
]
-[[package]]
-name = "rental"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8545debe98b2b139fb04cad8618b530e9b07c152d99a5de83c860b877d67847f"
-dependencies = [
- "rental-impl",
- "stable_deref_trait",
-]
-
-[[package]]
-name = "rental-impl"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "475e68978dc5b743f2f40d8e0a8fdc83f1c5e78cbf4b8fa5e74e73beebc340de"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "retain_mut"
version = "0.1.1"
@@ -6112,9 +6076,9 @@ dependencies = [
[[package]]
name = "rocksdb"
-version = "0.14.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61aa17a99a2413cd71c1106691bf59dad7de0cd5099127f90e9d99c429c40d4a"
+checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6"
dependencies = [
"libc",
"librocksdb-sys",
@@ -6262,12 +6226,11 @@ dependencies = [
[[package]]
name = "sc-authority-discovery"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"bytes 0.5.6",
"derive_more",
"either",
- "env_logger",
"futures 0.3.5",
"futures-timer 3.0.2",
"libp2p",
@@ -6287,13 +6250,14 @@ dependencies = [
"sp-blockchain",
"sp-core",
"sp-runtime",
+ "sp-tracing",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
]
[[package]]
name = "sc-basic-authorship"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"futures 0.3.5",
"futures-timer 3.0.2",
@@ -6319,7 +6283,7 @@ dependencies = [
[[package]]
name = "sc-block-builder"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -6337,7 +6301,7 @@ dependencies = [
[[package]]
name = "sc-chain-spec"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -6353,7 +6317,7 @@ dependencies = [
[[package]]
name = "sc-chain-spec-derive"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -6363,14 +6327,13 @@ dependencies = [
[[package]]
name = "sc-cli"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"ansi_term 0.12.1",
"atty",
"bip39",
"chrono",
"derive_more",
- "env_logger",
"fdlimit",
"futures 0.3.5",
"hex",
@@ -6408,11 +6371,14 @@ dependencies = [
"tempfile",
"time",
"tokio 0.2.22",
+ "tracing",
+ "tracing-log",
+ "tracing-subscriber",
]
[[package]]
name = "sc-client-api"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"derive_more",
"fnv",
@@ -6450,10 +6416,9 @@ dependencies = [
[[package]]
name = "sc-client-db"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"blake2-rfc",
- "env_logger",
"hash-db",
"kvdb",
"kvdb-memorydb",
@@ -6476,6 +6441,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-state-machine",
+ "sp-tracing",
"sp-trie",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
@@ -6484,7 +6450,7 @@ dependencies = [
[[package]]
name = "sc-consensus"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"sc-client-api",
"sp-blockchain",
@@ -6494,10 +6460,9 @@ dependencies = [
[[package]]
name = "sc-consensus-aura"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
- "env_logger",
"futures 0.3.5",
"futures-timer 3.0.2",
"log",
@@ -6524,6 +6489,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-timestamp",
+ "sp-tracing",
"sp-version",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
@@ -6532,10 +6498,9 @@ dependencies = [
[[package]]
name = "sc-consensus-babe"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
- "env_logger",
"fork-tree",
"futures 0.3.5",
"futures-timer 3.0.2",
@@ -6576,6 +6541,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-timestamp",
+ "sp-tracing",
"sp-utils",
"sp-version",
"substrate-prometheus-endpoint",
@@ -6585,7 +6551,7 @@ dependencies = [
[[package]]
name = "sc-consensus-babe-rpc"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"futures 0.3.5",
@@ -6613,7 +6579,7 @@ dependencies = [
[[package]]
name = "sc-consensus-epochs"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"fork-tree",
"parity-scale-codec",
@@ -6625,11 +6591,10 @@ dependencies = [
[[package]]
name = "sc-consensus-manual-seal"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"assert_matches",
"derive_more",
- "env_logger",
"futures 0.3.5",
"jsonrpc-core",
"jsonrpc-core-client",
@@ -6638,13 +6603,19 @@ dependencies = [
"parking_lot 0.10.2",
"sc-basic-authorship",
"sc-client-api",
+ "sc-consensus-babe",
+ "sc-consensus-epochs",
+ "sc-keystore",
"sc-transaction-pool",
"serde",
+ "sp-api",
"sp-blockchain",
"sp-consensus",
+ "sp-consensus-babe",
"sp-core",
"sp-inherents",
"sp-runtime",
+ "sp-timestamp",
"sp-transaction-pool",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
@@ -6655,12 +6626,14 @@ dependencies = [
[[package]]
name = "sc-consensus-pow"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"futures 0.3.5",
+ "futures-timer 3.0.2",
"log",
"parity-scale-codec",
+ "parking_lot 0.10.2",
"sc-client-api",
"sp-api",
"sp-block-builder",
@@ -6676,7 +6649,7 @@ dependencies = [
[[package]]
name = "sc-consensus-slots"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"futures 0.3.5",
"futures-timer 3.0.2",
@@ -6699,7 +6672,7 @@ dependencies = [
[[package]]
name = "sc-consensus-uncles"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"log",
"sc-client-api",
@@ -6712,7 +6685,7 @@ dependencies = [
[[package]]
name = "sc-executor"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"assert_matches",
"derive_more",
@@ -6744,13 +6717,14 @@ dependencies = [
"substrate-test-runtime",
"test-case",
"tracing",
- "wabt",
+ "tracing-subscriber",
"wasmi",
+ "wat",
]
[[package]]
name = "sc-executor-common"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"log",
@@ -6766,7 +6740,7 @@ dependencies = [
[[package]]
name = "sc-executor-wasmi"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"log",
"parity-scale-codec",
@@ -6780,7 +6754,7 @@ dependencies = [
[[package]]
name = "sc-executor-wasmtime"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"assert_matches",
"log",
@@ -6798,11 +6772,10 @@ dependencies = [
[[package]]
name = "sc-finality-grandpa"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"assert_matches",
"derive_more",
- "env_logger",
"finality-grandpa",
"fork-tree",
"futures 0.3.5",
@@ -6834,6 +6807,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-state-machine",
+ "sp-tracing",
"sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
@@ -6843,7 +6817,7 @@ dependencies = [
[[package]]
name = "sc-finality-grandpa-rpc"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"finality-grandpa",
@@ -6856,6 +6830,7 @@ dependencies = [
"log",
"parity-scale-codec",
"sc-block-builder",
+ "sc-client-api",
"sc-finality-grandpa",
"sc-network-test",
"sc-rpc",
@@ -6872,7 +6847,7 @@ dependencies = [
[[package]]
name = "sc-informant"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"ansi_term 0.12.1",
"futures 0.3.5",
@@ -6889,7 +6864,7 @@ dependencies = [
[[package]]
name = "sc-keystore"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"derive_more",
"hex",
@@ -6905,7 +6880,7 @@ dependencies = [
[[package]]
name = "sc-light"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"hash-db",
"lazy_static",
@@ -6923,7 +6898,7 @@ dependencies = [
[[package]]
name = "sc-network"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"assert_matches",
"async-std",
@@ -6933,7 +6908,6 @@ dependencies = [
"bytes 0.5.6",
"derive_more",
"either",
- "env_logger",
"erased-serde",
"fnv",
"fork-tree",
@@ -6970,6 +6944,7 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-test-primitives",
+ "sp-tracing",
"sp-utils",
"substrate-prometheus-endpoint",
"substrate-test-runtime",
@@ -6984,7 +6959,7 @@ dependencies = [
[[package]]
name = "sc-network-gossip"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"async-std",
"futures 0.3.5",
@@ -7002,9 +6977,8 @@ dependencies = [
[[package]]
name = "sc-network-test"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
- "env_logger",
"futures 0.3.5",
"futures-timer 3.0.2",
"libp2p",
@@ -7021,6 +6995,7 @@ dependencies = [
"sp-consensus-babe",
"sp-core",
"sp-runtime",
+ "sp-tracing",
"substrate-test-runtime",
"substrate-test-runtime-client",
"tempfile",
@@ -7028,10 +7003,9 @@ dependencies = [
[[package]]
name = "sc-offchain"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"bytes 0.5.6",
- "env_logger",
"fnv",
"futures 0.3.5",
"futures-timer 3.0.2",
@@ -7052,6 +7026,7 @@ dependencies = [
"sp-core",
"sp-offchain",
"sp-runtime",
+ "sp-tracing",
"sp-transaction-pool",
"sp-utils",
"substrate-test-runtime-client",
@@ -7061,7 +7036,7 @@ dependencies = [
[[package]]
name = "sc-peerset"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.3.5",
"libp2p",
@@ -7074,7 +7049,7 @@ dependencies = [
[[package]]
name = "sc-proposer-metrics"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"log",
"substrate-prometheus-endpoint",
@@ -7082,7 +7057,7 @@ dependencies = [
[[package]]
name = "sc-rpc"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"assert_matches",
"futures 0.1.29",
@@ -7121,7 +7096,7 @@ dependencies = [
[[package]]
name = "sc-rpc-api"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"futures 0.3.5",
@@ -7144,8 +7119,9 @@ dependencies = [
[[package]]
name = "sc-rpc-server"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
+ "futures 0.1.29",
"jsonrpc-core",
"jsonrpc-http-server",
"jsonrpc-ipc-server",
@@ -7155,11 +7131,12 @@ dependencies = [
"serde",
"serde_json",
"sp-runtime",
+ "substrate-prometheus-endpoint",
]
[[package]]
name = "sc-runtime-test"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"sp-allocator",
"sp-core",
@@ -7172,7 +7149,7 @@ dependencies = [
[[package]]
name = "sc-service"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"async-std",
"derive_more",
@@ -7224,6 +7201,7 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-state-machine",
+ "sp-tracing",
"sp-transaction-pool",
"sp-trie",
"sp-utils",
@@ -7238,9 +7216,8 @@ dependencies = [
[[package]]
name = "sc-service-test"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
- "env_logger",
"fdlimit",
"futures 0.1.29",
"futures 0.3.5",
@@ -7264,6 +7241,7 @@ dependencies = [
"sp-runtime",
"sp-state-machine",
"sp-storage",
+ "sp-tracing",
"sp-transaction-pool",
"sp-trie",
"substrate-test-runtime",
@@ -7274,9 +7252,8 @@ dependencies = [
[[package]]
name = "sc-state-db"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
- "env_logger",
"log",
"parity-scale-codec",
"parity-util-mem",
@@ -7288,7 +7265,7 @@ dependencies = [
[[package]]
name = "sc-telemetry"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.3.5",
"futures-timer 3.0.2",
@@ -7308,7 +7285,7 @@ dependencies = [
[[package]]
name = "sc-tracing"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"erased-serde",
"log",
@@ -7320,12 +7297,13 @@ dependencies = [
"slog",
"sp-tracing",
"tracing",
+ "tracing-core",
"tracing-subscriber",
]
[[package]]
name = "sc-transaction-graph"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"assert_matches",
"criterion",
@@ -7349,7 +7327,7 @@ dependencies = [
[[package]]
name = "sc-transaction-pool"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"assert_matches",
"derive_more",
@@ -7795,7 +7773,7 @@ dependencies = [
[[package]]
name = "sp-allocator"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"derive_more",
"log",
@@ -7806,7 +7784,7 @@ dependencies = [
[[package]]
name = "sp-api"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"hash-db",
"parity-scale-codec",
@@ -7821,7 +7799,7 @@ dependencies = [
[[package]]
name = "sp-api-proc-macro"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"blake2-rfc",
"proc-macro-crate",
@@ -7832,7 +7810,7 @@ dependencies = [
[[package]]
name = "sp-api-test"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"criterion",
"parity-scale-codec",
@@ -7851,7 +7829,7 @@ dependencies = [
[[package]]
name = "sp-application-crypto"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"serde",
@@ -7862,7 +7840,7 @@ dependencies = [
[[package]]
name = "sp-application-crypto-test"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"sp-api",
"sp-application-crypto",
@@ -7873,7 +7851,7 @@ dependencies = [
[[package]]
name = "sp-arithmetic"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"criterion",
"integer-sqrt",
@@ -7889,7 +7867,7 @@ dependencies = [
[[package]]
name = "sp-arithmetic-fuzzer"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"honggfuzz",
"num-bigint",
@@ -7900,7 +7878,7 @@ dependencies = [
[[package]]
name = "sp-authority-discovery"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7911,7 +7889,7 @@ dependencies = [
[[package]]
name = "sp-authorship"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-inherents",
@@ -7921,7 +7899,7 @@ dependencies = [
[[package]]
name = "sp-block-builder"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7932,7 +7910,7 @@ dependencies = [
[[package]]
name = "sp-blockchain"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"derive_more",
"log",
@@ -7948,7 +7926,7 @@ dependencies = [
[[package]]
name = "sp-chain-spec"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"serde",
"serde_json",
@@ -7956,7 +7934,7 @@ dependencies = [
[[package]]
name = "sp-consensus"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"derive_more",
"futures 0.3.5",
@@ -7982,7 +7960,7 @@ dependencies = [
[[package]]
name = "sp-consensus-aura"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7995,7 +7973,7 @@ dependencies = [
[[package]]
name = "sp-consensus-babe"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"merlin",
"parity-scale-codec",
@@ -8013,7 +7991,7 @@ dependencies = [
[[package]]
name = "sp-consensus-pow"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -8024,7 +8002,7 @@ dependencies = [
[[package]]
name = "sp-consensus-slots"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -8032,7 +8010,7 @@ dependencies = [
[[package]]
name = "sp-consensus-vrf"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"parity-scale-codec",
"schnorrkel",
@@ -8043,7 +8021,7 @@ dependencies = [
[[package]]
name = "sp-core"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"base58",
"blake2-rfc",
@@ -8092,7 +8070,7 @@ dependencies = [
[[package]]
name = "sp-database"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"kvdb",
"parking_lot 0.10.2",
@@ -8100,7 +8078,7 @@ dependencies = [
[[package]]
name = "sp-debug-derive"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"proc-macro2",
"quote",
@@ -8109,7 +8087,7 @@ dependencies = [
[[package]]
name = "sp-externalities"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"environmental",
"parity-scale-codec",
@@ -8119,7 +8097,7 @@ dependencies = [
[[package]]
name = "sp-finality-grandpa"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"finality-grandpa",
"log",
@@ -8134,7 +8112,7 @@ dependencies = [
[[package]]
name = "sp-finality-tracker"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-inherents",
@@ -8143,7 +8121,7 @@ dependencies = [
[[package]]
name = "sp-inherents"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"derive_more",
"parity-scale-codec",
@@ -8154,7 +8132,7 @@ dependencies = [
[[package]]
name = "sp-io"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.3.5",
"hash-db",
@@ -8170,11 +8148,13 @@ dependencies = [
"sp-tracing",
"sp-trie",
"sp-wasm-interface",
+ "tracing",
+ "tracing-core",
]
[[package]]
name = "sp-keyring"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"lazy_static",
"sp-core",
@@ -8184,7 +8164,7 @@ dependencies = [
[[package]]
name = "sp-npos-elections"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"rand 0.7.3",
@@ -8198,7 +8178,7 @@ dependencies = [
[[package]]
name = "sp-npos-elections-compact"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -8211,6 +8191,7 @@ name = "sp-npos-elections-fuzzer"
version = "2.0.0-alpha.5"
dependencies = [
"honggfuzz",
+ "parity-scale-codec",
"rand 0.7.3",
"sp-npos-elections",
"sp-runtime",
@@ -8219,7 +8200,7 @@ dependencies = [
[[package]]
name = "sp-offchain"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"sp-api",
"sp-core",
@@ -8229,7 +8210,7 @@ dependencies = [
[[package]]
name = "sp-panic-handler"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"backtrace",
"log",
@@ -8237,7 +8218,7 @@ dependencies = [
[[package]]
name = "sp-rpc"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"serde",
"serde_json",
@@ -8246,7 +8227,7 @@ dependencies = [
[[package]]
name = "sp-runtime"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"either",
"hash256-std-hasher",
@@ -8269,7 +8250,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"primitive-types",
@@ -8290,7 +8271,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-proc-macro"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"Inflector",
"proc-macro-crate",
@@ -8301,7 +8282,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-test"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"sc-executor",
"sp-core",
@@ -8312,11 +8293,12 @@ dependencies = [
"sp-runtime-interface-test-wasm-deprecated",
"sp-state-machine",
"tracing",
+ "tracing-core",
]
[[package]]
name = "sp-runtime-interface-test-wasm"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"sp-core",
"sp-io",
@@ -8327,7 +8309,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-test-wasm-deprecated"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"sp-core",
"sp-io",
@@ -8338,7 +8320,7 @@ dependencies = [
[[package]]
name = "sp-sandbox"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"assert_matches",
"parity-scale-codec",
@@ -8346,13 +8328,13 @@ dependencies = [
"sp-io",
"sp-std",
"sp-wasm-interface",
- "wabt",
"wasmi",
+ "wat",
]
[[package]]
name = "sp-serializer"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"serde",
"serde_json",
@@ -8360,7 +8342,7 @@ dependencies = [
[[package]]
name = "sp-session"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -8372,7 +8354,7 @@ dependencies = [
[[package]]
name = "sp-staking"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -8381,11 +8363,10 @@ dependencies = [
[[package]]
name = "sp-state-machine"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"hash-db",
"hex-literal",
- "itertools 0.9.0",
"log",
"num-traits",
"parity-scale-codec",
@@ -8397,6 +8378,7 @@ dependencies = [
"sp-externalities",
"sp-panic-handler",
"sp-runtime",
+ "sp-std",
"sp-trie",
"trie-db",
"trie-root",
@@ -8404,11 +8386,11 @@ dependencies = [
[[package]]
name = "sp-std"
-version = "2.0.0-rc6"
+version = "2.0.0"
[[package]]
name = "sp-storage"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -8420,7 +8402,7 @@ dependencies = [
[[package]]
name = "sp-test-primitives"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"parity-scale-codec",
"parity-util-mem",
@@ -8432,7 +8414,7 @@ dependencies = [
[[package]]
name = "sp-timestamp"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -8445,16 +8427,19 @@ dependencies = [
[[package]]
name = "sp-tracing"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"log",
- "rental",
+ "parity-scale-codec",
+ "sp-std",
"tracing",
+ "tracing-core",
+ "tracing-subscriber",
]
[[package]]
name = "sp-transaction-pool"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"derive_more",
"futures 0.3.5",
@@ -8468,7 +8453,7 @@ dependencies = [
[[package]]
name = "sp-trie"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"criterion",
"hash-db",
@@ -8486,7 +8471,7 @@ dependencies = [
[[package]]
name = "sp-utils"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.3.5",
"futures-core",
@@ -8497,7 +8482,7 @@ dependencies = [
[[package]]
name = "sp-version"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -8508,7 +8493,7 @@ dependencies = [
[[package]]
name = "sp-wasm-interface"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -8623,7 +8608,7 @@ dependencies = [
[[package]]
name = "subkey"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-system",
"node-primitives",
@@ -8636,19 +8621,20 @@ dependencies = [
[[package]]
name = "substrate-bip39"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c004e8166d6e0aa3a9d5fa673e5b7098ff25f930de1013a21341988151e681bb"
+checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236"
dependencies = [
"hmac",
"pbkdf2",
"schnorrkel",
"sha2 0.8.2",
+ "zeroize",
]
[[package]]
name = "substrate-browser-utils"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"chrono",
"console_error_panic_hook",
@@ -8673,14 +8659,14 @@ dependencies = [
[[package]]
name = "substrate-build-script-utils"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"platforms",
]
[[package]]
name = "substrate-frame-cli"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-system",
"sc-cli",
@@ -8691,7 +8677,7 @@ dependencies = [
[[package]]
name = "substrate-frame-rpc-support"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"frame-support",
"frame-system",
@@ -8707,9 +8693,8 @@ dependencies = [
[[package]]
name = "substrate-frame-rpc-system"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
- "env_logger",
"frame-system-rpc-runtime-api",
"futures 0.3.5",
"jsonrpc-core",
@@ -8726,13 +8711,14 @@ dependencies = [
"sp-blockchain",
"sp-core",
"sp-runtime",
+ "sp-tracing",
"sp-transaction-pool",
"substrate-test-runtime-client",
]
[[package]]
name = "substrate-prometheus-endpoint"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"async-std",
"derive_more",
@@ -8745,7 +8731,7 @@ dependencies = [
[[package]]
name = "substrate-test-client"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.1.29",
"futures 0.3.5",
@@ -8770,7 +8756,7 @@ dependencies = [
[[package]]
name = "substrate-test-runtime"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"cfg-if",
"frame-executive",
@@ -8793,6 +8779,7 @@ dependencies = [
"sp-consensus-aura",
"sp-consensus-babe",
"sp-core",
+ "sp-externalities",
"sp-finality-grandpa",
"sp-inherents",
"sp-io",
@@ -8813,7 +8800,7 @@ dependencies = [
[[package]]
name = "substrate-test-runtime-client"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.3.5",
"parity-scale-codec",
@@ -8833,7 +8820,7 @@ dependencies = [
[[package]]
name = "substrate-test-runtime-transaction-pool"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"derive_more",
"futures 0.3.5",
@@ -8848,7 +8835,7 @@ dependencies = [
[[package]]
name = "substrate-test-utils"
-version = "2.0.0-rc6"
+version = "2.0.0"
dependencies = [
"futures 0.3.5",
"sc-service",
@@ -8859,7 +8846,7 @@ dependencies = [
[[package]]
name = "substrate-test-utils-derive"
-version = "0.8.0-rc6"
+version = "0.8.0"
dependencies = [
"proc-macro-crate",
"quote",
@@ -8879,6 +8866,7 @@ dependencies = [
name = "substrate-wasm-builder"
version = "2.0.0"
dependencies = [
+ "ansi_term 0.12.1",
"atty",
"build-helper",
"cargo_metadata",
@@ -9400,9 +9388,9 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
[[package]]
name = "tracing"
-version = "0.1.18"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0aae59226cf195d8e74d4b34beae1859257efb4e5fed3f147d2dc2c7d372178"
+checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c"
dependencies = [
"cfg-if",
"log",
@@ -9423,9 +9411,9 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.12"
+version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2734b5a028fa697686f16c6d18c2c6a3c7e41513f9a213abb6754c4acb3c8d7"
+checksum = "5bcf46c1f1f06aeea2d6b81f3c863d0930a596c86ad1920d4e5bad6dd1d7119a"
dependencies = [
"lazy_static",
]
@@ -9533,12 +9521,12 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
name = "trybuild"
-version = "1.0.30"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbe777c4e2060f44d83892be1189f96200be8ed3d99569d5c2d5ee26e62c0ea9"
+checksum = "b7d30fe369fd650072b352b1a9cb9587669de6b89be3b8225544012c1c45292d"
dependencies = [
"dissimilar",
- "glob 0.3.0",
+ "glob",
"lazy_static",
"serde",
"serde_json",
@@ -9546,24 +9534,13 @@ dependencies = [
"toml",
]
-[[package]]
-name = "twofish"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1"
-dependencies = [
- "block-cipher-trait",
- "byteorder 1.3.4",
- "opaque-debug 0.2.3",
-]
-
[[package]]
name = "twox-hash"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56"
dependencies = [
- "rand 0.5.6",
+ "rand 0.7.3",
]
[[package]]
@@ -9657,6 +9634,16 @@ dependencies = [
"futures_codec",
]
+[[package]]
+name = "unsigned-varint"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35"
+dependencies = [
+ "futures-io",
+ "futures-util",
+]
+
[[package]]
name = "untrusted"
version = "0.7.1"
@@ -9709,29 +9696,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
-[[package]]
-name = "wabt"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c5c5c1286c6e578416982609f47594265f9d489f9b836157d403ad605a46693"
-dependencies = [
- "serde",
- "serde_derive",
- "serde_json",
- "wabt-sys",
-]
-
-[[package]]
-name = "wabt-sys"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01c695f98f7eb81fd4e2f6b65301ccc916a950dc2265eeefc4d376b34ce666df"
-dependencies = [
- "cc",
- "cmake",
- "glob 0.2.11",
-]
-
[[package]]
name = "wait-timeout"
version = "0.2.0"
@@ -10212,24 +10176,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
-[[package]]
-name = "ws"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94"
-dependencies = [
- "byteorder 1.3.4",
- "bytes 0.4.12",
- "httparse",
- "log",
- "mio",
- "mio-extras",
- "rand 0.7.3",
- "sha-1",
- "slab",
- "url 2.1.1",
-]
-
[[package]]
name = "ws2_32-sys"
version = "0.2.1"
@@ -10253,14 +10199,14 @@ dependencies = [
[[package]]
name = "yamux"
-version = "0.4.7"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd37e58a1256a0b328ce9c67d8b62ecdd02f4803ba443df478835cb1a41a637c"
+checksum = "9aeb8c4043cac71c3c299dff107171c220d179492350ea198e109a414981b83c"
dependencies = [
"futures 0.3.5",
"log",
"nohash-hasher",
- "parking_lot 0.10.2",
+ "parking_lot 0.11.0",
"rand 0.7.3",
"static_assertions",
]
@@ -10312,7 +10258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b"
dependencies = [
"cc",
- "glob 0.3.0",
+ "glob",
"itertools 0.9.0",
"libc",
]
diff --git a/Cargo.toml b/Cargo.toml
index d40cb191992e867cbf5702f6518eeae241f9bd2f..0736afb6831dd24253c7796ef79d650f2ec9a158 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -66,7 +66,6 @@ members = [
"frame/babe",
"frame/balances",
"frame/benchmarking",
- "frame/benchmark",
"frame/collective",
"frame/contracts",
"frame/contracts/rpc",
@@ -80,7 +79,6 @@ members = [
"frame/example-offchain-worker",
"frame/executive",
"frame/finality-tracker",
- "frame/generic-asset",
"frame/grandpa",
"frame/identity",
"frame/im-online",
@@ -89,6 +87,7 @@ members = [
"frame/metadata",
"frame/multisig",
"frame/nicks",
+ "frame/node-authorization",
"frame/offences",
"frame/proxy",
"frame/randomness-collective-flip",
@@ -203,7 +202,6 @@ members = [
#
# This list is ordered alphabetically.
[profile.dev.package]
-aes-ctr = { opt-level = 3 }
aes-soft = { opt-level = 3 }
aesni = { opt-level = 3 }
blake2 = { opt-level = 3 }
@@ -217,7 +215,6 @@ crc32fast = { opt-level = 3 }
crossbeam-deque = { opt-level = 3 }
crossbeam-queue = { opt-level = 3 }
crypto-mac = { opt-level = 3 }
-ctr = { opt-level = 3 }
curve25519-dalek = { opt-level = 3 }
ed25519-dalek = { opt-level = 3 }
evm-core = { opt-level = 3 }
diff --git a/HEADER b/HEADER
new file mode 100644
index 0000000000000000000000000000000000000000..c9b28a07b0f22975f2eb835c4d334bd17828e6fe
--- /dev/null
+++ b/HEADER
@@ -0,0 +1,16 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml
index d8cc9478bbda8e07459b06433095de1b0550cccb..8b1a47fd2bf15740e36a28692510985b4d7a28e1 100644
--- a/bin/node-template/node/Cargo.toml
+++ b/bin/node-template/node/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-template"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Anonymous"]
description = "A new FRAME-based Substrate node, ready for hacking."
edition = "2018"
@@ -18,34 +18,44 @@ name = "node-template"
[dependencies]
structopt = "0.3.8"
-sc-cli = { version = "0.8.0-rc6", path = "../../../client/cli", features = ["wasmtime"] }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
-sc-executor = { version = "0.8.0-rc6", path = "../../../client/executor", features = ["wasmtime"] }
-sc-service = { version = "0.8.0-rc6", path = "../../../client/service", features = ["wasmtime"] }
-sp-inherents = { version = "2.0.0-rc6", path = "../../../primitives/inherents" }
-sc-transaction-pool = { version = "2.0.0-rc6", path = "../../../client/transaction-pool" }
-sp-transaction-pool = { version = "2.0.0-rc6", path = "../../../primitives/transaction-pool" }
-sc-consensus-aura = { version = "0.8.0-rc6", path = "../../../client/consensus/aura" }
-sp-consensus-aura = { version = "0.8.0-rc6", path = "../../../primitives/consensus/aura" }
-sp-consensus = { version = "0.8.0-rc6", path = "../../../primitives/consensus/common" }
-sc-consensus = { version = "0.8.0-rc6", path = "../../../client/consensus/common" }
-sc-finality-grandpa = { version = "0.8.0-rc6", path = "../../../client/finality-grandpa" }
-sp-finality-grandpa = { version = "2.0.0-rc6", path = "../../../primitives/finality-grandpa" }
-sc-client-api = { version = "2.0.0-rc6", path = "../../../client/api" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../../primitives/runtime" }
+sc-cli = { version = "0.8.0", path = "../../../client/cli", features = ["wasmtime"] }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
+sc-executor = { version = "0.8.0", path = "../../../client/executor", features = ["wasmtime"] }
+sc-service = { version = "0.8.0", path = "../../../client/service", features = ["wasmtime"] }
+sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
+sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" }
+sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
+sc-consensus-aura = { version = "0.8.0", path = "../../../client/consensus/aura" }
+sp-consensus-aura = { version = "0.8.0", path = "../../../primitives/consensus/aura" }
+sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" }
+sc-consensus = { version = "0.8.0", path = "../../../client/consensus/common" }
+sc-finality-grandpa = { version = "0.8.0", path = "../../../client/finality-grandpa" }
+sp-finality-grandpa = { version = "2.0.0", path = "../../../primitives/finality-grandpa" }
+sc-client-api = { version = "2.0.0", path = "../../../client/api" }
+sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
# These dependencies are used for the node template's RPCs
-jsonrpc-core = "14.0.3"
-sc-rpc = { version = "2.0.0-rc6", path = "../../../client/rpc" }
-sp-api = { version = "2.0.0-rc6", path = "../../../primitives/api" }
-sc-rpc-api = { version = "0.8.0-rc6", path = "../../../client/rpc-api" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../../primitives/blockchain" }
-sp-block-builder = { version = "2.0.0-rc6", path = "../../../primitives/block-builder" }
-sc-basic-authorship = { version = "0.8.0-rc6", path = "../../../client/basic-authorship" }
-substrate-frame-rpc-system = { version = "2.0.0-rc6", path = "../../../utils/frame/rpc/system" }
-pallet-transaction-payment-rpc = { version = "2.0.0-rc6", path = "../../../frame/transaction-payment/rpc/" }
-
-node-template-runtime = { version = "2.0.0-rc6", path = "../runtime" }
+jsonrpc-core = "15.0.0"
+sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
+sp-api = { version = "2.0.0", path = "../../../primitives/api" }
+sc-rpc-api = { version = "0.8.0", path = "../../../client/rpc-api" }
+sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
+sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" }
+sc-basic-authorship = { version = "0.8.0", path = "../../../client/basic-authorship" }
+substrate-frame-rpc-system = { version = "2.0.0", path = "../../../utils/frame/rpc/system" }
+pallet-transaction-payment-rpc = { version = "2.0.0", path = "../../../frame/transaction-payment/rpc/" }
+
+# These dependencies are used for runtime benchmarking
+frame-benchmarking = { version = "2.0.0", path = "../../../frame/benchmarking" }
+frame-benchmarking-cli = { version = "2.0.0", path = "../../../utils/frame/benchmarking-cli" }
+
+node-template-runtime = { version = "2.0.0", path = "../runtime" }
[build-dependencies]
-substrate-build-script-utils = { version = "2.0.0-rc6", path = "../../../utils/build-script-utils" }
+substrate-build-script-utils = { version = "2.0.0", path = "../../../utils/build-script-utils" }
+
+[features]
+default = []
+runtime-benchmarks = [
+ "node-template-runtime/runtime-benchmarks",
+]
diff --git a/bin/node-template/node/src/cli.rs b/bin/node-template/node/src/cli.rs
index 46ab9bc3dafac3b95c1ab196c10aae0a544bf413..f2faf17e4ddf44b724292d014d542b63b594b56f 100644
--- a/bin/node-template/node/src/cli.rs
+++ b/bin/node-template/node/src/cli.rs
@@ -1,5 +1,5 @@
use structopt::StructOpt;
-use sc_cli::{RunCmd, Subcommand};
+use sc_cli::RunCmd;
#[derive(Debug, StructOpt)]
pub struct Cli {
@@ -9,3 +9,31 @@ pub struct Cli {
#[structopt(flatten)]
pub run: RunCmd,
}
+
+#[derive(Debug, StructOpt)]
+pub enum Subcommand {
+ /// Build a chain specification.
+ BuildSpec(sc_cli::BuildSpecCmd),
+
+ /// Validate blocks.
+ CheckBlock(sc_cli::CheckBlockCmd),
+
+ /// Export blocks.
+ ExportBlocks(sc_cli::ExportBlocksCmd),
+
+ /// Export the state of a given block into a chain spec.
+ ExportState(sc_cli::ExportStateCmd),
+
+ /// Import blocks.
+ ImportBlocks(sc_cli::ImportBlocksCmd),
+
+ /// Remove the whole chain.
+ PurgeChain(sc_cli::PurgeChainCmd),
+
+ /// Revert the chain to a previous state.
+ Revert(sc_cli::RevertCmd),
+
+ /// The custom benchmark subcommmand benchmarking runtime pallets.
+ #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
+ Benchmark(frame_benchmarking_cli::BenchmarkCmd),
+}
diff --git a/bin/node-template/node/src/command.rs b/bin/node-template/node/src/command.rs
index 9cd2248d6547a133b09a09fb7c62e9b6b8c357bf..2efca0383710844d3a9d1cf6d0ae5851c7005f60 100644
--- a/bin/node-template/node/src/command.rs
+++ b/bin/node-template/node/src/command.rs
@@ -15,12 +15,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use crate::chain_spec;
-use crate::cli::Cli;
-use crate::service;
+use crate::{chain_spec, service};
+use crate::cli::{Cli, Subcommand};
use sc_cli::{SubstrateCli, RuntimeVersion, Role, ChainSpec};
use sc_service::PartialComponents;
-use crate::service::new_partial;
+use node_template_runtime::Block;
impl SubstrateCli for Cli {
fn impl_name() -> String {
@@ -66,15 +65,65 @@ impl SubstrateCli for Cli {
pub fn run() -> sc_cli::Result<()> {
let cli = Cli::from_args();
- match cli.subcommand {
- Some(ref subcommand) => {
- let runner = cli.create_runner(subcommand)?;
- runner.run_subcommand(subcommand, |config| {
- let PartialComponents { client, backend, task_manager, import_queue, .. }
- = new_partial(&config)?;
- Ok((client, backend, import_queue, task_manager))
+ match &cli.subcommand {
+ Some(Subcommand::BuildSpec(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
+ },
+ Some(Subcommand::CheckBlock(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, import_queue, ..}
+ = service::new_partial(&config)?;
+ Ok((cmd.run(client, import_queue), task_manager))
})
- }
+ },
+ Some(Subcommand::ExportBlocks(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, ..}
+ = service::new_partial(&config)?;
+ Ok((cmd.run(client, config.database), task_manager))
+ })
+ },
+ Some(Subcommand::ExportState(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, ..}
+ = service::new_partial(&config)?;
+ Ok((cmd.run(client, config.chain_spec), task_manager))
+ })
+ },
+ Some(Subcommand::ImportBlocks(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, import_queue, ..}
+ = service::new_partial(&config)?;
+ Ok((cmd.run(client, import_queue), task_manager))
+ })
+ },
+ Some(Subcommand::PurgeChain(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.sync_run(|config| cmd.run(config.database))
+ },
+ Some(Subcommand::Revert(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, backend, ..}
+ = service::new_partial(&config)?;
+ Ok((cmd.run(client, backend), task_manager))
+ })
+ },
+ Some(Subcommand::Benchmark(cmd)) => {
+ if cfg!(feature = "runtime-benchmarks") {
+ let runner = cli.create_runner(cmd)?;
+
+ runner.sync_run(|config| cmd.run::(config))
+ } else {
+ Err("Benchmarking wasn't enabled when building the node. \
+ You can enable it with `--features runtime-benchmarks`.".into())
+ }
+ },
None => {
let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| match config.role {
diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs
index 5984d67322333287a4a2c8fb2dbdb02653c42ba0..3de31dc61ab5175a36838bc01bf3c500619d647b 100644
--- a/bin/node-template/node/src/service.rs
+++ b/bin/node-template/node/src/service.rs
@@ -16,6 +16,7 @@ native_executor_instance!(
pub Executor,
node_template_runtime::api::dispatch,
node_template_runtime::native_version,
+ frame_benchmarking::benchmarking::HostFunctions,
);
type FullClient = sc_service::TFullClient;
@@ -27,7 +28,12 @@ pub fn new_partial(config: &Configuration) -> Result,
sc_transaction_pool::FullPool,
(
- sc_finality_grandpa::GrandpaBlockImport,
+ sc_consensus_aura::AuraBlockImport<
+ Block,
+ FullClient,
+ sc_finality_grandpa::GrandpaBlockImport,
+ AuraPair
+ >,
sc_finality_grandpa::LinkHalf
)
>, ServiceError> {
@@ -56,7 +62,7 @@ pub fn new_partial(config: &Configuration) -> Result(
sc_consensus_aura::slot_duration(&*client)?,
- aura_block_import,
+ aura_block_import.clone(),
Some(Box::new(grandpa_block_import.clone())),
None,
client.clone(),
@@ -69,7 +75,7 @@ pub fn new_partial(config: &Configuration) -> Result>::IdentificationTuple;
type HandleEquivocation = ();
+
+ type WeightInfo = ();
}
parameter_types! {
@@ -227,9 +229,11 @@ impl pallet_timestamp::Trait for Runtime {
parameter_types! {
pub const ExistentialDeposit: u128 = 500;
+ pub const MaxLocks: u32 = 50;
}
impl pallet_balances::Trait for Runtime {
+ type MaxLocks = MaxLocks;
/// The type for recording an account's balance.
type Balance = Balance;
/// The ubiquitous event type.
@@ -423,7 +427,7 @@ impl_runtime_apis! {
None
}
}
-
+
impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime {
fn account_nonce(account: AccountId) -> Index {
System::account_nonce(account)
@@ -438,4 +442,39 @@ impl_runtime_apis! {
TransactionPayment::query_info(uxt, len)
}
}
+
+ #[cfg(feature = "runtime-benchmarks")]
+ impl frame_benchmarking::Benchmark for Runtime {
+ fn dispatch_benchmark(
+ config: frame_benchmarking::BenchmarkConfig
+ ) -> Result, sp_runtime::RuntimeString> {
+ use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
+
+ use frame_system_benchmarking::Module as SystemBench;
+ impl frame_system_benchmarking::Trait for Runtime {}
+
+ let whitelist: Vec = vec![
+ // Block Number
+ hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
+ // Total Issuance
+ hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
+ // Execution Phase
+ hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
+ // Event Count
+ hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
+ // System Events
+ hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
+ ];
+
+ let mut batches = Vec::::new();
+ let params = (&config, &whitelist);
+
+ add_benchmark!(params, batches, frame_system, SystemBench::);
+ add_benchmark!(params, batches, pallet_balances, Balances);
+ add_benchmark!(params, batches, pallet_timestamp, Timestamp);
+
+ if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
+ Ok(batches)
+ }
+ }
}
diff --git a/bin/node/bench/Cargo.toml b/bin/node/bench/Cargo.toml
index adefbd07082a3b9ed91ee603f0559c5afd8bcaa1..c0f5bf889521ca1356aea4e233199602e44f5bbc 100644
--- a/bin/node/bench/Cargo.toml
+++ b/bin/node/bench/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-bench"
-version = "0.8.0-rc6"
+version = "0.8.0"
authors = ["Parity Technologies "]
description = "Substrate node integration benchmarks."
edition = "2018"
@@ -10,27 +10,28 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
log = "0.4.8"
-node-primitives = { version = "2.0.0-rc6", path = "../primitives" }
-node-testing = { version = "2.0.0-rc6", path = "../testing" }
-node-runtime = { version = "2.0.0-rc6", path = "../runtime" }
-sc-cli = { version = "0.8.0-rc6", path = "../../../client/cli" }
-sc-client-api = { version = "2.0.0-rc6", path = "../../../client/api/" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../../primitives/runtime" }
-sp-state-machine = { version = "0.8.0-rc6", path = "../../../primitives/state-machine" }
+node-primitives = { version = "2.0.0", path = "../primitives" }
+node-testing = { version = "2.0.0", path = "../testing" }
+node-runtime = { version = "2.0.0", path = "../runtime" }
+sc-cli = { version = "0.8.0", path = "../../../client/cli" }
+sc-client-api = { version = "2.0.0", path = "../../../client/api/" }
+sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
+sp-state-machine = { version = "0.8.0", path = "../../../primitives/state-machine" }
serde = "1.0.101"
serde_json = "1.0.41"
structopt = "0.3"
derive_more = "0.99.2"
kvdb = "0.7"
-kvdb-rocksdb = "0.9"
-sp-trie = { version = "2.0.0-rc6", path = "../../../primitives/trie" }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
-sp-consensus = { version = "0.8.0-rc6", path = "../../../primitives/consensus/common" }
-sp-transaction-pool = { version = "2.0.0-rc6", path = "../../../primitives/transaction-pool" }
-sc-basic-authorship = { version = "0.8.0-rc6", path = "../../../client/basic-authorship" }
-sp-inherents = { version = "2.0.0-rc6", path = "../../../primitives/inherents" }
-sp-finality-tracker = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/finality-tracker" }
-sp-timestamp = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/timestamp" }
+kvdb-rocksdb = "0.9.1"
+sp-trie = { version = "2.0.0", path = "../../../primitives/trie" }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
+sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" }
+sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
+sc-basic-authorship = { version = "0.8.0", path = "../../../client/basic-authorship" }
+sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
+sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
+sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
+sp-tracing = { version = "2.0.0", path = "../../../primitives/tracing" }
hash-db = "0.15.2"
tempfile = "3.1.0"
fs_extra = "1"
@@ -39,5 +40,5 @@ rand = { version = "0.7.2", features = ["small_rng"] }
lazy_static = "1.4.0"
parity-util-mem = { version = "0.7.0", default-features = false, features = ["primitive-types"] }
parity-db = { version = "0.1.2" }
-sc-transaction-pool = { version = "2.0.0-rc6", path = "../../../client/transaction-pool" }
+sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" }
futures = { version = "0.3.4", features = ["thread-pool"] }
diff --git a/bin/node/bench/src/main.rs b/bin/node/bench/src/main.rs
index 96ef1d920c1f551cb0a467814599f0e9afbf5ce8..46b659dd88387e94c2d493e3d5975df3e7c28fab 100644
--- a/bin/node/bench/src/main.rs
+++ b/bin/node/bench/src/main.rs
@@ -79,7 +79,7 @@ fn main() {
let opt = Opt::from_args();
if !opt.json {
- sc_cli::init_logger("");
+ sp_tracing::try_init_simple();
}
let mut import_benchmarks = Vec::new();
diff --git a/bin/node/browser-testing/Cargo.toml b/bin/node/browser-testing/Cargo.toml
index 1cfc0623dd98079a2e6bfadb1fad5e999f9c81f7..13d6e057a1e16d418278ea042d9555eb582fe5d3 100644
--- a/bin/node/browser-testing/Cargo.toml
+++ b/bin/node/browser-testing/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-browser-testing"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
description = "Tests for the in-browser light client."
edition = "2018"
@@ -8,8 +8,8 @@ license = "Apache-2.0"
[dependencies]
futures-timer = "3.0.2"
-libp2p = { version = "0.24.0", default-features = false }
-jsonrpc-core = "14.2.0"
+libp2p = { version = "0.28.1", default-features = false }
+jsonrpc-core = "15.0.0"
serde = "1.0.106"
serde_json = "1.0.48"
wasm-bindgen = { version = "=0.2.67", features = ["serde-serialize"] }
@@ -17,5 +17,5 @@ wasm-bindgen-futures = "0.4.10"
wasm-bindgen-test = "0.3.10"
futures = "0.3.4"
-node-cli = { path = "../cli", default-features = false, features = ["browser"] , version = "2.0.0-rc6"}
-sc-rpc-api = { path = "../../../client/rpc-api" , version = "0.8.0-rc6"}
+node-cli = { path = "../cli", default-features = false, features = ["browser"] , version = "2.0.0"}
+sc-rpc-api = { path = "../../../client/rpc-api" , version = "0.8.0"}
diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml
index 92f223427a710c8241e76e01c48c8b99e9166f02..39df211707eaa5743ffe82a7cea23329814b2dc5 100644
--- a/bin/node/cli/Cargo.toml
+++ b/bin/node/cli/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node-cli"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
description = "Generic Substrate node implementation in Rust."
build = "build.rs"
@@ -38,86 +38,84 @@ codec = { package = "parity-scale-codec", version = "1.3.4" }
serde = { version = "1.0.102", features = ["derive"] }
futures = { version = "0.3.1", features = ["compat"] }
hex-literal = "0.3.1"
-jsonrpc-core = "14.2.0"
-jsonrpc-pubsub = "14.2.0"
log = "0.4.8"
rand = "0.7.2"
structopt = { version = "0.3.8", optional = true }
-tracing = "0.1.18"
+tracing = "0.1.19"
parking_lot = "0.10.0"
# primitives
-sp-authority-discovery = { version = "2.0.0-rc6", path = "../../../primitives/authority-discovery" }
-sp-consensus-babe = { version = "0.8.0-rc6", path = "../../../primitives/consensus/babe" }
-grandpa-primitives = { version = "2.0.0-rc6", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../../primitives/runtime" }
-sp-timestamp = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/timestamp" }
-sp-finality-tracker = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/finality-tracker" }
-sp-inherents = { version = "2.0.0-rc6", path = "../../../primitives/inherents" }
-sp-keyring = { version = "2.0.0-rc6", path = "../../../primitives/keyring" }
-sp-io = { version = "2.0.0-rc6", path = "../../../primitives/io" }
-sp-consensus = { version = "0.8.0-rc6", path = "../../../primitives/consensus/common" }
-sp-transaction-pool = { version = "2.0.0-rc6", path = "../../../primitives/transaction-pool" }
+sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" }
+sp-consensus-babe = { version = "0.8.0", path = "../../../primitives/consensus/babe" }
+grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
+sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
+sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
+sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
+sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
+sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" }
+sp-io = { version = "2.0.0", path = "../../../primitives/io" }
+sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" }
+sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
# client dependencies
-sc-client-api = { version = "2.0.0-rc6", path = "../../../client/api" }
-sc-chain-spec = { version = "2.0.0-rc6", path = "../../../client/chain-spec" }
-sc-consensus = { version = "0.8.0-rc6", path = "../../../client/consensus/common" }
-sc-transaction-pool = { version = "2.0.0-rc6", path = "../../../client/transaction-pool" }
-sc-network = { version = "0.8.0-rc6", path = "../../../client/network" }
-sc-consensus-babe = { version = "0.8.0-rc6", path = "../../../client/consensus/babe" }
-grandpa = { version = "0.8.0-rc6", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
-sc-client-db = { version = "0.8.0-rc6", default-features = false, path = "../../../client/db" }
-sc-offchain = { version = "2.0.0-rc6", path = "../../../client/offchain" }
-sc-rpc = { version = "2.0.0-rc6", path = "../../../client/rpc" }
-sc-basic-authorship = { version = "0.8.0-rc6", path = "../../../client/basic-authorship" }
-sc-service = { version = "0.8.0-rc6", default-features = false, path = "../../../client/service" }
-sc-tracing = { version = "2.0.0-rc6", path = "../../../client/tracing" }
-sc-telemetry = { version = "2.0.0-rc6", path = "../../../client/telemetry" }
-sc-authority-discovery = { version = "0.8.0-rc6", path = "../../../client/authority-discovery" }
+sc-client-api = { version = "2.0.0", path = "../../../client/api" }
+sc-chain-spec = { version = "2.0.0", path = "../../../client/chain-spec" }
+sc-consensus = { version = "0.8.0", path = "../../../client/consensus/common" }
+sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" }
+sc-network = { version = "0.8.0", path = "../../../client/network" }
+sc-consensus-babe = { version = "0.8.0", path = "../../../client/consensus/babe" }
+grandpa = { version = "0.8.0", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
+sc-client-db = { version = "0.8.0", default-features = false, path = "../../../client/db" }
+sc-offchain = { version = "2.0.0", path = "../../../client/offchain" }
+sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
+sc-basic-authorship = { version = "0.8.0", path = "../../../client/basic-authorship" }
+sc-service = { version = "0.8.0", default-features = false, path = "../../../client/service" }
+sc-tracing = { version = "2.0.0", path = "../../../client/tracing" }
+sc-telemetry = { version = "2.0.0", path = "../../../client/telemetry" }
+sc-authority-discovery = { version = "0.8.0", path = "../../../client/authority-discovery" }
# frame dependencies
-pallet-indices = { version = "2.0.0-rc6", path = "../../../frame/indices" }
-pallet-timestamp = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/timestamp" }
-pallet-contracts = { version = "2.0.0-rc6", path = "../../../frame/contracts" }
-frame-system = { version = "2.0.0-rc6", path = "../../../frame/system" }
-pallet-balances = { version = "2.0.0-rc6", path = "../../../frame/balances" }
-pallet-transaction-payment = { version = "2.0.0-rc6", path = "../../../frame/transaction-payment" }
-frame-support = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/support" }
-pallet-im-online = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/im-online" }
-pallet-authority-discovery = { version = "2.0.0-rc6", path = "../../../frame/authority-discovery" }
-pallet-staking = { version = "2.0.0-rc6", path = "../../../frame/staking" }
-pallet-grandpa = { version = "2.0.0-rc6", path = "../../../frame/grandpa" }
+pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
+pallet-timestamp = { version = "2.0.0", default-features = false, path = "../../../frame/timestamp" }
+pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
+frame-system = { version = "2.0.0", path = "../../../frame/system" }
+pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
+pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
+frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" }
+pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" }
+pallet-authority-discovery = { version = "2.0.0", path = "../../../frame/authority-discovery" }
+pallet-staking = { version = "2.0.0", path = "../../../frame/staking" }
+pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
# node-specific dependencies
-node-runtime = { version = "2.0.0-rc6", path = "../runtime" }
-node-rpc = { version = "2.0.0-rc6", path = "../rpc" }
-node-primitives = { version = "2.0.0-rc6", path = "../primitives" }
-node-executor = { version = "2.0.0-rc6", path = "../executor" }
+node-runtime = { version = "2.0.0", path = "../runtime" }
+node-rpc = { version = "2.0.0", path = "../rpc" }
+node-primitives = { version = "2.0.0", path = "../primitives" }
+node-executor = { version = "2.0.0", path = "../executor" }
# CLI-specific dependencies
-sc-cli = { version = "0.8.0-rc6", optional = true, path = "../../../client/cli" }
-frame-benchmarking-cli = { version = "2.0.0-rc6", optional = true, path = "../../../utils/frame/benchmarking-cli" }
-node-inspect = { version = "0.8.0-rc6", optional = true, path = "../inspect" }
+sc-cli = { version = "0.8.0", optional = true, path = "../../../client/cli" }
+frame-benchmarking-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/benchmarking-cli" }
+node-inspect = { version = "0.8.0", 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-rc6"}
+browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.8.0"}
[target.'cfg(target_arch="x86_64")'.dependencies]
-node-executor = { version = "2.0.0-rc6", path = "../executor", features = [ "wasmtime" ] }
-sc-cli = { version = "0.8.0-rc6", optional = true, path = "../../../client/cli", features = [ "wasmtime" ] }
-sc-service = { version = "0.8.0-rc6", default-features = false, path = "../../../client/service", features = [ "wasmtime" ] }
-sp-trie = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/trie", features = ["memory-tracker"] }
+node-executor = { version = "2.0.0", path = "../executor", features = [ "wasmtime" ] }
+sc-cli = { version = "0.8.0", optional = true, path = "../../../client/cli", features = [ "wasmtime" ] }
+sc-service = { version = "0.8.0", default-features = false, path = "../../../client/service", features = [ "wasmtime" ] }
+sp-trie = { version = "2.0.0", default-features = false, path = "../../../primitives/trie", features = ["memory-tracker"] }
[dev-dependencies]
-sc-keystore = { version = "2.0.0-rc6", path = "../../../client/keystore" }
-sc-consensus = { version = "0.8.0-rc6", path = "../../../client/consensus/common" }
-sc-consensus-babe = { version = "0.8.0-rc6", features = ["test-helpers"], path = "../../../client/consensus/babe" }
-sc-consensus-epochs = { version = "0.8.0-rc6", path = "../../../client/consensus/epochs" }
-sc-service-test = { version = "2.0.0-rc6", path = "../../../client/service/test" }
+sc-keystore = { version = "2.0.0", path = "../../../client/keystore" }
+sc-consensus = { version = "0.8.0", path = "../../../client/consensus/common" }
+sc-consensus-babe = { version = "0.8.0", features = ["test-helpers"], path = "../../../client/consensus/babe" }
+sc-consensus-epochs = { version = "0.8.0", path = "../../../client/consensus/epochs" }
+sc-service-test = { version = "2.0.0", path = "../../../client/service/test" }
futures = "0.3.4"
tempfile = "3.1.0"
assert_cmd = "1.0"
@@ -128,13 +126,13 @@ platforms = "0.2.1"
[build-dependencies]
structopt = { version = "0.3.8", optional = true }
-node-inspect = { version = "0.8.0-rc6", optional = true, path = "../inspect" }
-frame-benchmarking-cli = { version = "2.0.0-rc6", optional = true, path = "../../../utils/frame/benchmarking-cli" }
-substrate-build-script-utils = { version = "2.0.0-rc6", optional = true, path = "../../../utils/build-script-utils" }
-substrate-frame-cli = { version = "2.0.0-rc6", optional = true, path = "../../../utils/frame/frame-utilities-cli" }
+node-inspect = { version = "0.8.0", optional = true, path = "../inspect" }
+frame-benchmarking-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/benchmarking-cli" }
+substrate-build-script-utils = { version = "2.0.0", optional = true, path = "../../../utils/build-script-utils" }
+substrate-frame-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/frame-utilities-cli" }
[build-dependencies.sc-cli]
-version = "0.8.0-rc6"
+version = "0.8.0"
package = "sc-cli"
path = "../../../client/cli"
optional = true
diff --git a/bin/node/cli/browser-demo/build.sh b/bin/node/cli/browser-demo/build.sh
index ea0380b760e31f4037d49509c7852b02baf81501..be52b7a523f0177728181bfa18b8aef614185a26 100755
--- a/bin/node/cli/browser-demo/build.sh
+++ b/bin/node/cli/browser-demo/build.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
cargo +nightly build --release -p node-cli --target wasm32-unknown-unknown --no-default-features --features browser -Z features=itarget
wasm-bindgen ../../../../target/wasm32-unknown-unknown/release/node_cli.wasm --out-dir pkg --target web
-python -m SimpleHTTPServer 8000
+python -m http.server 8000
diff --git a/bin/node/cli/src/chain_spec.rs b/bin/node/cli/src/chain_spec.rs
index e323f7956f169f7523186566dcc0524ed313d347..90824a5572f12f9e50f19703e96f2a9c046c5e40 100644
--- a/bin/node/cli/src/chain_spec.rs
+++ b/bin/node/cli/src/chain_spec.rs
@@ -380,7 +380,7 @@ pub fn local_testnet_config() -> ChainSpec {
#[cfg(test)]
pub(crate) mod tests {
use super::*;
- use crate::service::{new_full_base, new_light_base};
+ use crate::service::{new_full_base, new_light_base, NewFullBase};
use sc_service_test;
use sp_runtime::BuildStorage;
@@ -431,8 +431,9 @@ pub(crate) mod tests {
sc_service_test::connectivity(
integration_test_config_with_two_authorities(),
|config| {
- let (keep_alive, _, client, network, transaction_pool) = new_full_base(config,|_, _| ())?;
- Ok(sc_service_test::TestNetComponents::new(keep_alive, client, network, transaction_pool))
+ let NewFullBase { task_manager, client, network, transaction_pool, .. }
+ = new_full_base(config,|_, _| ())?;
+ Ok(sc_service_test::TestNetComponents::new(task_manager, client, network, transaction_pool))
},
|config| {
let (keep_alive, _, client, network, transaction_pool) = new_light_base(config)?;
diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs
index 42a13fcb390703e765f095a659ebbf8bc80f2d3c..6e51dae93793f4ad862f4b1d20bdf1f7fb698103 100644
--- a/bin/node/cli/src/cli.rs
+++ b/bin/node/cli/src/cli.rs
@@ -33,10 +33,6 @@ pub struct Cli {
/// Possible subcommands of the main binary.
#[derive(Debug, StructOpt)]
pub enum Subcommand {
- /// A set of base subcommands handled by `sc_cli`.
- #[structopt(flatten)]
- Base(sc_cli::Subcommand),
-
/// Key management cli utilities
Key(KeySubcommand),
@@ -59,4 +55,28 @@ pub enum Subcommand {
/// Sign a message, with a given (secret) key.
Sign(SignCmd),
+
+ /// Build a chain specification.
+ BuildSpec(sc_cli::BuildSpecCmd),
+
+ /// Build a chain specification with a light client sync state.
+ BuildSyncSpec(sc_cli::BuildSyncSpecCmd),
+
+ /// Validate blocks.
+ CheckBlock(sc_cli::CheckBlockCmd),
+
+ /// Export blocks.
+ ExportBlocks(sc_cli::ExportBlocksCmd),
+
+ /// Export the state of a given block into a chain spec.
+ ExportState(sc_cli::ExportStateCmd),
+
+ /// Import blocks.
+ ImportBlocks(sc_cli::ImportBlocksCmd),
+
+ /// Remove the whole chain.
+ PurgeChain(sc_cli::PurgeChainCmd),
+
+ /// Revert the chain to a previous state.
+ Revert(sc_cli::RevertCmd),
}
diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs
index 10e9413702b815c5127942e907f6e325ed04e6b7..7b84ff5a0583bc094133316e9c9e32302b340cc3 100644
--- a/bin/node/cli/src/command.rs
+++ b/bin/node/cli/src/command.rs
@@ -21,7 +21,7 @@ use node_executor::Executor;
use node_runtime::{Block, RuntimeApi};
use sc_cli::{Result, SubstrateCli, RuntimeVersion, Role, ChainSpec};
use sc_service::PartialComponents;
-use crate::service::new_partial;
+use crate::service::{new_partial, new_full_base, NewFullBase};
impl SubstrateCli for Cli {
fn impl_name() -> String {
@@ -88,22 +88,72 @@ pub fn run() -> Result<()> {
runner.sync_run(|config| cmd.run::(config))
} else {
- println!("Benchmarking wasn't enabled when building the node. \
- You can enable it with `--features runtime-benchmarks`.");
- Ok(())
+ Err("Benchmarking wasn't enabled when building the node. \
+ You can enable it with `--features runtime-benchmarks`.".into())
}
}
Some(Subcommand::Key(cmd)) => cmd.run(),
Some(Subcommand::Sign(cmd)) => cmd.run(),
Some(Subcommand::Verify(cmd)) => cmd.run(),
Some(Subcommand::Vanity(cmd)) => cmd.run(),
- Some(Subcommand::Base(subcommand)) => {
- let runner = cli.create_runner(subcommand)?;
- runner.run_subcommand(subcommand, |config| {
- let PartialComponents { client, backend, task_manager, import_queue, ..}
+ Some(Subcommand::BuildSpec(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
+ },
+ Some(Subcommand::BuildSyncSpec(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let chain_spec = config.chain_spec.cloned_box();
+ let network_config = config.network.clone();
+ let NewFullBase { task_manager, client, network_status_sinks, .. }
+ = new_full_base(config, |_, _| ())?;
+
+ Ok((cmd.run(chain_spec, network_config, client, network_status_sinks), task_manager))
+ })
+ },
+ Some(Subcommand::CheckBlock(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, import_queue, ..}
= new_partial(&config)?;
- Ok((client, backend, import_queue, task_manager))
+ Ok((cmd.run(client, import_queue), task_manager))
})
- }
+ },
+ Some(Subcommand::ExportBlocks(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, ..}
+ = new_partial(&config)?;
+ Ok((cmd.run(client, config.database), task_manager))
+ })
+ },
+ Some(Subcommand::ExportState(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, ..}
+ = new_partial(&config)?;
+ Ok((cmd.run(client, config.chain_spec), task_manager))
+ })
+ },
+ Some(Subcommand::ImportBlocks(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, import_queue, ..}
+ = new_partial(&config)?;
+ Ok((cmd.run(client, import_queue), task_manager))
+ })
+ },
+ Some(Subcommand::PurgeChain(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.sync_run(|config| cmd.run(config.database))
+ },
+ Some(Subcommand::Revert(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.async_run(|config| {
+ let PartialComponents { client, task_manager, backend, ..}
+ = new_partial(&config)?;
+ Ok((cmd.run(client, backend), task_manager))
+ })
+ },
}
}
diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs
index d91696ab7d6bc77a6289c21c8ef4fe93c8517f67..b15ace6181a8fa0321f5c206fdc6abad7ecd6cbd 100644
--- a/bin/node/cli/src/service.rs
+++ b/bin/node/cli/src/service.rs
@@ -51,14 +51,17 @@ pub fn new_partial(config: &Configuration) -> Result node_rpc::IoHandler,
(
sc_consensus_babe::BabeBlockImport,
grandpa::LinkHalf,
sc_consensus_babe::BabeLink,
),
- grandpa::SharedVoterState,
+ (
+ grandpa::SharedVoterState,
+ Arc>,
+ ),
)
>, ServiceError> {
let (client, backend, keystore, task_manager) =
@@ -108,8 +111,10 @@ pub fn new_partial(config: &Configuration) -> Result Result Result Result,
+ pub network: Arc::Hash>>,
+ pub network_status_sinks: sc_service::NetworkStatusSinks,
+ pub transaction_pool: Arc>,
+}
+
/// Creates a full service from the configuration.
pub fn new_full_base(
config: Configuration,
@@ -158,19 +173,14 @@ pub fn new_full_base(
&sc_consensus_babe::BabeBlockImport,
&sc_consensus_babe::BabeLink,
)
-) -> Result<(
- TaskManager, InherentDataProviders, Arc,
- Arc::Hash>>,
- Arc>,
-), ServiceError> {
+) -> Result {
let sc_service::PartialComponents {
client, backend, mut task_manager, import_queue, keystore, select_chain, transaction_pool,
inherent_data_providers,
other: (rpc_extensions_builder, import_setup, rpc_setup),
} = new_partial(&config)?;
- let finality_proof_provider =
- GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
+ let (shared_voter_state, finality_proof_provider) = rpc_setup;
let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams {
@@ -210,12 +220,11 @@ pub fn new_full_base(
on_demand: None,
remote_blockchain: None,
telemetry_connection_sinks: telemetry_connection_sinks.clone(),
- network_status_sinks,
+ network_status_sinks: network_status_sinks.clone(),
system_rpc_tx,
})?;
let (block_import, grandpa_link, babe_link) = import_setup;
- let shared_voter_state = rpc_setup;
(with_startup_data)(&block_import, &babe_link);
@@ -330,13 +339,16 @@ pub fn new_full_base(
}
network_starter.start_network();
- Ok((task_manager, inherent_data_providers, client, network, transaction_pool))
+ Ok(NewFullBase {
+ task_manager, inherent_data_providers, client, network, network_status_sinks,
+ transaction_pool,
+ })
}
/// Builds a new service for a full client.
pub fn new_full(config: Configuration)
-> Result {
- new_full_base(config, |_, _| ()).map(|(task_manager, _, _, _, _)| {
+ new_full_base(config, |_, _| ()).map(|NewFullBase { task_manager, .. }| {
task_manager
})
}
@@ -467,7 +479,7 @@ mod tests {
use sp_finality_tracker;
use sp_keyring::AccountKeyring;
use sc_service_test::TestNetNode;
- use crate::service::{new_full_base, new_light_base};
+ use crate::service::{new_full_base, new_light_base, NewFullBase};
use sp_runtime::traits::IdentifyAccount;
use sp_transaction_pool::{MaintainedTransactionPool, ChainEvent};
use sc_client_api::BlockBackend;
@@ -499,18 +511,19 @@ mod tests {
chain_spec,
|config| {
let mut setup_handles = None;
- let (keep_alive, inherent_data_providers, client, network, transaction_pool) =
- new_full_base(config,
- |
- block_import: &sc_consensus_babe::BabeBlockImport,
- babe_link: &sc_consensus_babe::BabeLink,
- | {
- setup_handles = Some((block_import.clone(), babe_link.clone()));
- }
- )?;
+ let NewFullBase {
+ task_manager, inherent_data_providers, client, network, transaction_pool, ..
+ } = new_full_base(config,
+ |
+ block_import: &sc_consensus_babe::BabeBlockImport,
+ babe_link: &sc_consensus_babe::BabeLink,
+ | {
+ setup_handles = Some((block_import.clone(), babe_link.clone()));
+ }
+ )?;
let node = sc_service_test::TestNetComponents::new(
- keep_alive, client, network, transaction_pool
+ task_manager, client, network, transaction_pool
);
Ok((node, (inherent_data_providers, setup_handles.unwrap())))
},
@@ -661,8 +674,9 @@ mod tests {
sc_service_test::consensus(
crate::chain_spec::tests::integration_test_config_with_two_authorities(),
|config| {
- let (keep_alive, _, client, network, transaction_pool) = new_full_base(config, |_, _| ())?;
- Ok(sc_service_test::TestNetComponents::new(keep_alive, client, network, transaction_pool))
+ let NewFullBase { task_manager, client, network, transaction_pool, .. }
+ = new_full_base(config,|_, _| ())?;
+ Ok(sc_service_test::TestNetComponents::new(task_manager, client, network, transaction_pool))
},
|config| {
let (keep_alive, _, client, network, transaction_pool) = new_light_base(config)?;
diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml
index d8fb2e4078bd15012f433263c13cf08d76b38287..70cf3c1fd6571c32f80cb38d73b6d7bbf62ddfe1 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-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
description = "Substrate node implementation in Rust."
edition = "2018"
@@ -13,35 +13,35 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4" }
-node-primitives = { version = "2.0.0-rc6", path = "../primitives" }
-node-runtime = { version = "2.0.0-rc6", path = "../runtime" }
-sc-executor = { version = "0.8.0-rc6", path = "../../../client/executor" }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
-sp-io = { version = "2.0.0-rc6", path = "../../../primitives/io" }
-sp-state-machine = { version = "0.8.0-rc6", path = "../../../primitives/state-machine" }
-sp-trie = { version = "2.0.0-rc6", path = "../../../primitives/trie" }
+node-primitives = { version = "2.0.0", path = "../primitives" }
+node-runtime = { version = "2.0.0", path = "../runtime" }
+sc-executor = { version = "0.8.0", path = "../../../client/executor" }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
+sp-io = { version = "2.0.0", path = "../../../primitives/io" }
+sp-state-machine = { version = "0.8.0", path = "../../../primitives/state-machine" }
+sp-trie = { version = "2.0.0", path = "../../../primitives/trie" }
trie-root = "0.16.0"
-frame-benchmarking = { version = "2.0.0-rc6", path = "../../../frame/benchmarking" }
+frame-benchmarking = { version = "2.0.0", path = "../../../frame/benchmarking" }
[dev-dependencies]
criterion = "0.3.0"
-frame-support = { version = "2.0.0-rc6", path = "../../../frame/support" }
-frame-system = { version = "2.0.0-rc6", path = "../../../frame/system" }
-node-testing = { version = "2.0.0-rc6", path = "../testing" }
-pallet-balances = { version = "2.0.0-rc6", path = "../../../frame/balances" }
-pallet-contracts = { version = "2.0.0-rc6", path = "../../../frame/contracts" }
-pallet-grandpa = { version = "2.0.0-rc6", path = "../../../frame/grandpa" }
-pallet-im-online = { version = "2.0.0-rc6", path = "../../../frame/im-online" }
-pallet-indices = { version = "2.0.0-rc6", path = "../../../frame/indices" }
-pallet-session = { version = "2.0.0-rc6", path = "../../../frame/session" }
-pallet-timestamp = { version = "2.0.0-rc6", path = "../../../frame/timestamp" }
-pallet-transaction-payment = { version = "2.0.0-rc6", path = "../../../frame/transaction-payment" }
-pallet-treasury = { version = "2.0.0-rc6", path = "../../../frame/treasury" }
-sp-application-crypto = { version = "2.0.0-rc6", path = "../../../primitives/application-crypto" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../../primitives/runtime" }
-sp-externalities = { version = "0.8.0-rc6", path = "../../../primitives/externalities" }
-substrate-test-client = { version = "2.0.0-rc6", path = "../../../test-utils/client" }
-wabt = "0.9.2"
+frame-support = { version = "2.0.0", path = "../../../frame/support" }
+frame-system = { version = "2.0.0", path = "../../../frame/system" }
+node-testing = { version = "2.0.0", path = "../testing" }
+pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
+pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
+pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
+pallet-im-online = { version = "2.0.0", path = "../../../frame/im-online" }
+pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
+pallet-session = { version = "2.0.0", path = "../../../frame/session" }
+pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
+pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
+pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
+sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" }
+sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
+sp-externalities = { version = "0.8.0", path = "../../../primitives/externalities" }
+substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
+wat = "1.0"
[features]
wasmtime = [
diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs
index e7744200bccd64fb7bcf44d595e918a7d6c8eab8..723e3a7e4ba62fac313614d0dd2ee400cc9ad526 100644
--- a/bin/node/executor/tests/basic.rs
+++ b/bin/node/executor/tests/basic.rs
@@ -36,7 +36,7 @@ use node_runtime::{
constants::currency::*,
};
use node_primitives::{Balance, Hash};
-use wabt;
+use wat;
use node_testing::keyring::*;
pub mod common;
@@ -164,7 +164,7 @@ fn panic_execution_with_foreign_code_gives_error() {
let mut t = new_test_ext(bloaty_code_unwrap(), false);
t.insert(
>::hashed_key_for(alice()),
- (69u128, 0u8, 0u128, 0u128, 0u128).encode()
+ (69u128, 0u32, 0u128, 0u128, 0u128).encode()
);
t.insert(>::hashed_key().to_vec(), 69_u128.encode());
t.insert(>::hashed_key_for(0), vec![0u8; 32]);
@@ -193,7 +193,7 @@ fn bad_extrinsic_with_native_equivalent_code_gives_error() {
let mut t = new_test_ext(compact_code_unwrap(), false);
t.insert(
>::hashed_key_for(alice()),
- (0u32, 0u8, 69u128, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 69u128, 0u128, 0u128, 0u128).encode()
);
t.insert(>::hashed_key().to_vec(), 69_u128.encode());
t.insert(>::hashed_key_for(0), vec![0u8; 32]);
@@ -222,11 +222,11 @@ fn successful_execution_with_native_equivalent_code_gives_ok() {
let mut t = new_test_ext(compact_code_unwrap(), false);
t.insert(
>::hashed_key_for(alice()),
- (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
);
t.insert(
>::hashed_key_for(bob()),
- (0u32, 0u8, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
);
t.insert(
>::hashed_key().to_vec(),
@@ -265,11 +265,11 @@ fn successful_execution_with_foreign_code_gives_ok() {
let mut t = new_test_ext(bloaty_code_unwrap(), false);
t.insert(
>::hashed_key_for(alice()),
- (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
);
t.insert(
>::hashed_key_for(bob()),
- (0u32, 0u8, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
);
t.insert(
>::hashed_key().to_vec(),
@@ -580,7 +580,7 @@ const CODE_TRANSFER: &str = r#"
#[test]
fn deploying_wasm_contract_should_work() {
- let transfer_code = wabt::wat2wasm(CODE_TRANSFER).unwrap();
+ let transfer_code = wat::parse_str(CODE_TRANSFER).unwrap();
let transfer_ch = ::Hashing::hash(&transfer_code);
let addr = ::DetermineContractAddress::contract_address_for(
@@ -702,7 +702,7 @@ fn panic_execution_gives_error() {
let mut t = new_test_ext(bloaty_code_unwrap(), false);
t.insert(
>::hashed_key_for(alice()),
- (0u32, 0u8, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
);
t.insert(>::hashed_key().to_vec(), 0_u128.encode());
t.insert(>::hashed_key_for(0), vec![0u8; 32]);
@@ -731,11 +731,11 @@ fn successful_execution_gives_ok() {
let mut t = new_test_ext(compact_code_unwrap(), false);
t.insert(
>::hashed_key_for(alice()),
- (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
);
t.insert(
>::hashed_key_for(bob()),
- (0u32, 0u8, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u32, 0 * DOLLARS, 0u128, 0u128, 0u128).encode()
);
t.insert(
>::hashed_key().to_vec(),
diff --git a/bin/node/executor/tests/fees.rs b/bin/node/executor/tests/fees.rs
index b39cf344e6034af0608f848b5ae87722bee5fc28..d04af1d827009f51340daeacc9e055ab6ec5e00e 100644
--- a/bin/node/executor/tests/fees.rs
+++ b/bin/node/executor/tests/fees.rs
@@ -133,11 +133,11 @@ fn transaction_fee_is_correct() {
let mut t = new_test_ext(compact_code_unwrap(), false);
t.insert(
>::hashed_key_for(alice()),
- (0u32, 0u8, 100 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
+ (0u32, 0u32, 100 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
);
t.insert(
>::hashed_key_for(bob()),
- (0u32, 0u8, 10 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
+ (0u32, 0u32, 10 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
);
t.insert(
>::hashed_key().to_vec(),
diff --git a/bin/node/executor/tests/submit_transaction.rs b/bin/node/executor/tests/submit_transaction.rs
index 64c2deedac788ea8681ea54c93ec09125d8e1684..af74c0c0b7c299d521d519230f215b9dd5ac031f 100644
--- a/bin/node/executor/tests/submit_transaction.rs
+++ b/bin/node/executor/tests/submit_transaction.rs
@@ -224,7 +224,7 @@ fn submitted_transaction_should_be_valid() {
let author = extrinsic.signature.clone().unwrap().0;
let address = Indices::lookup(author).unwrap();
let data = pallet_balances::AccountData { free: 5_000_000_000_000, ..Default::default() };
- let account = frame_system::AccountInfo { nonce: 0u32, refcount: 0u8, data };
+ let account = frame_system::AccountInfo { nonce: 0, refcount: 0, data };
>::insert(&address, account);
// check validity
diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml
index f8dc32f1e0587be4da1d39ae7dee8e7b9ba7f731..3686ddf27669bfa10a54eab84437c7ae813a4b96 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-rc6"
+version = "0.8.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
@@ -14,10 +14,10 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "1.3.4" }
derive_more = "0.99"
log = "0.4.8"
-sc-cli = { version = "0.8.0-rc6", path = "../../../client/cli" }
-sc-client-api = { version = "2.0.0-rc6", path = "../../../client/api" }
-sc-service = { version = "0.8.0-rc6", default-features = false, path = "../../../client/service" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../../primitives/blockchain" }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../../primitives/runtime" }
+sc-cli = { version = "0.8.0", path = "../../../client/cli" }
+sc-client-api = { version = "2.0.0", path = "../../../client/api" }
+sc-service = { version = "0.8.0", default-features = false, path = "../../../client/service" }
+sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
+sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
structopt = "0.3.8"
diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml
index 15fc493289fee3303b78c70d3dd870ebebbdcf4e..305764970c149eb54b36939fa6b57e4d59e505a6 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-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "Apache-2.0"
@@ -12,13 +12,13 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
-frame-system = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/system" }
-sp-application-crypto = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/application-crypto" }
-sp-core = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/runtime" }
+frame-system = { version = "2.0.0", default-features = false, path = "../../../frame/system" }
+sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../../primitives/application-crypto" }
+sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" }
+sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" }
[dev-dependencies]
-sp-serializer = { version = "2.0.0-rc6", path = "../../../primitives/serializer" }
+sp-serializer = { version = "2.0.0", path = "../../../primitives/serializer" }
pretty_assertions = "0.6.1"
[features]
diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml
index 698aa8f08aea5efcaf6d53cb3a6462121f1c12c0..9f358e901dafa1917c142b4533bbe49436d6537a 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-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "Apache-2.0"
@@ -11,10 +11,10 @@ repository = "https://github.com/paritytech/substrate/"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-env_logger = "0.7.0"
futures = "0.1.29"
hyper = "0.12.35"
-jsonrpc-core-client = { version = "14.2.0", default-features = false, features = ["http"] }
+jsonrpc-core-client = { version = "15.0.0", default-features = false, features = ["http"] }
log = "0.4.8"
-node-primitives = { version = "2.0.0-rc6", path = "../primitives" }
-sc-rpc = { version = "2.0.0-rc6", path = "../../../client/rpc" }
+node-primitives = { version = "2.0.0", path = "../primitives" }
+sp-tracing = { version = "2.0.0", path = "../../../primitives/tracing" }
+sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
diff --git a/bin/node/rpc-client/src/main.rs b/bin/node/rpc-client/src/main.rs
index eadd1c8d472476b6db57570d08a0233d36bea45d..31f1efa28ccd0684c363f577d491ce6e98b34e7f 100644
--- a/bin/node/rpc-client/src/main.rs
+++ b/bin/node/rpc-client/src/main.rs
@@ -35,7 +35,7 @@ use jsonrpc_core_client::{
};
fn main() {
- env_logger::init();
+ sp_tracing::try_init_simple();
rt::run(rt::lazy(|| {
let uri = "http://localhost:9933";
diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml
index 9ed8c22fbe320b5ea8e97a2b4f7fa8287813d0f8..d80b686b5ac932b4e02230d54892921c2e36aba6 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-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "Apache-2.0"
@@ -11,25 +11,25 @@ repository = "https://github.com/paritytech/substrate/"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-jsonrpc-core = "14.2.0"
-jsonrpc-pubsub = "14.2.0"
-node-primitives = { version = "2.0.0-rc6", path = "../primitives" }
-node-runtime = { version = "2.0.0-rc6", path = "../runtime" }
-pallet-contracts-rpc = { version = "0.8.0-rc6", path = "../../../frame/contracts/rpc/" }
-pallet-transaction-payment-rpc = { version = "2.0.0-rc6", path = "../../../frame/transaction-payment/rpc/" }
-sc-client-api = { version = "2.0.0-rc6", path = "../../../client/api" }
-sc-consensus-babe = { version = "0.8.0-rc6", path = "../../../client/consensus/babe" }
-sc-consensus-babe-rpc = { version = "0.8.0-rc6", path = "../../../client/consensus/babe/rpc" }
-sc-consensus-epochs = { version = "0.8.0-rc6", path = "../../../client/consensus/epochs" }
-sc-finality-grandpa = { version = "0.8.0-rc6", path = "../../../client/finality-grandpa" }
-sc-finality-grandpa-rpc = { version = "0.8.0-rc6", path = "../../../client/finality-grandpa/rpc" }
-sc-keystore = { version = "2.0.0-rc6", path = "../../../client/keystore" }
-sc-rpc-api = { version = "0.8.0-rc6", path = "../../../client/rpc-api" }
-sc-rpc = { version = "2.0.0-rc6", path = "../../../client/rpc" }
-sp-api = { version = "2.0.0-rc6", path = "../../../primitives/api" }
-sp-block-builder = { version = "2.0.0-rc6", path = "../../../primitives/block-builder" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../../primitives/blockchain" }
-sp-consensus = { version = "0.8.0-rc6", path = "../../../primitives/consensus/common" }
-sp-consensus-babe = { version = "0.8.0-rc6", path = "../../../primitives/consensus/babe" }
-sp-transaction-pool = { version = "2.0.0-rc6", path = "../../../primitives/transaction-pool" }
-substrate-frame-rpc-system = { version = "2.0.0-rc6", path = "../../../utils/frame/rpc/system" }
+jsonrpc-core = "15.0.0"
+node-primitives = { version = "2.0.0", path = "../primitives" }
+node-runtime = { version = "2.0.0", path = "../runtime" }
+pallet-contracts-rpc = { version = "0.8.0", path = "../../../frame/contracts/rpc/" }
+pallet-transaction-payment-rpc = { version = "2.0.0", path = "../../../frame/transaction-payment/rpc/" }
+sc-client-api = { version = "2.0.0", path = "../../../client/api" }
+sc-consensus-babe = { version = "0.8.0", path = "../../../client/consensus/babe" }
+sc-consensus-babe-rpc = { version = "0.8.0", path = "../../../client/consensus/babe/rpc" }
+sc-consensus-epochs = { version = "0.8.0", path = "../../../client/consensus/epochs" }
+sc-finality-grandpa = { version = "0.8.0", path = "../../../client/finality-grandpa" }
+sc-finality-grandpa-rpc = { version = "0.8.0", path = "../../../client/finality-grandpa/rpc" }
+sc-keystore = { version = "2.0.0", path = "../../../client/keystore" }
+sc-rpc-api = { version = "0.8.0", path = "../../../client/rpc-api" }
+sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
+sp-api = { version = "2.0.0", path = "../../../primitives/api" }
+sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" }
+sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
+sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" }
+sp-consensus-babe = { version = "0.8.0", path = "../../../primitives/consensus/babe" }
+sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
+sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
+substrate-frame-rpc-system = { version = "2.0.0", path = "../../../utils/frame/rpc/system" }
diff --git a/bin/node/rpc/src/lib.rs b/bin/node/rpc/src/lib.rs
index a20fb03ebe1e6be0d6c663885971336ce6d8c0f9..55a7adf612119a28d727f9c62e240a9beaed965c 100644
--- a/bin/node/rpc/src/lib.rs
+++ b/bin/node/rpc/src/lib.rs
@@ -32,12 +32,13 @@
use std::sync::Arc;
-use jsonrpc_pubsub::manager::SubscriptionManager;
use node_primitives::{Block, BlockNumber, AccountId, Index, Balance, Hash};
use sc_consensus_babe::{Config, Epoch};
use sc_consensus_babe_rpc::BabeRpcHandler;
use sc_consensus_epochs::SharedEpochChanges;
-use sc_finality_grandpa::{SharedVoterState, SharedAuthoritySet, GrandpaJustificationStream};
+use sc_finality_grandpa::{
+ SharedVoterState, SharedAuthoritySet, FinalityProofProvider, GrandpaJustificationStream
+};
use sc_finality_grandpa_rpc::GrandpaRpcHandler;
use sc_keystore::KeyStorePtr;
pub use sc_rpc_api::DenyUnsafe;
@@ -46,6 +47,7 @@ use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend};
use sp_consensus::SelectChain;
use sp_consensus_babe::BabeApi;
+use sc_rpc::SubscriptionTaskExecutor;
use sp_transaction_pool::TransactionPool;
/// Light client extra dependencies.
@@ -71,19 +73,21 @@ pub struct BabeDeps {
}
/// Extra dependencies for GRANDPA
-pub struct GrandpaDeps {
+pub struct GrandpaDeps {
/// Voting round info.
pub shared_voter_state: SharedVoterState,
/// Authority set info.
pub shared_authority_set: SharedAuthoritySet,
/// Receives notifications about justification events from Grandpa.
pub justification_stream: GrandpaJustificationStream,
- /// Subscription manager to keep track of pubsub subscribers.
- pub subscriptions: SubscriptionManager,
+ /// Executor to drive the subscription manager in the Grandpa RPC handler.
+ pub subscription_executor: SubscriptionTaskExecutor,
+ /// Finality proof provider.
+ pub finality_provider: Arc>,
}
/// Full client dependencies.
-pub struct FullDeps {
+pub struct FullDeps {
/// The client instance to use.
pub client: Arc,
/// Transaction pool instance.
@@ -95,15 +99,15 @@ pub struct FullDeps {
/// BABE specific dependencies.
pub babe: BabeDeps,
/// GRANDPA specific dependencies.
- pub grandpa: GrandpaDeps,
+ pub grandpa: GrandpaDeps,
}
/// A IO handler that uses all Full RPC extensions.
pub type IoHandler = jsonrpc_core::IoHandler;
/// Instantiate all Full RPC extensions.
-pub fn create_full(
- deps: FullDeps,
+pub fn create_full(
+ deps: FullDeps,
) -> jsonrpc_core::IoHandler where
C: ProvideRuntimeApi,
C: HeaderBackend + HeaderMetadata + 'static,
@@ -115,6 +119,8 @@ pub fn create_full(
C::Api: BlockBuilder,
P: TransactionPool + 'static,
SC: SelectChain +'static,
+ B: sc_client_api::Backend + Send + Sync + 'static,
+ B::State: sc_client_api::backend::StateBackend>,
{
use substrate_frame_rpc_system::{FullSystem, SystemApi};
use pallet_contracts_rpc::{Contracts, ContractsApi};
@@ -139,7 +145,8 @@ pub fn create_full(
shared_voter_state,
shared_authority_set,
justification_stream,
- subscriptions,
+ subscription_executor,
+ finality_provider,
} = grandpa;
io.extend_with(
@@ -172,7 +179,8 @@ pub fn create_full(
shared_authority_set,
shared_voter_state,
justification_stream,
- subscriptions,
+ subscription_executor,
+ finality_provider,
)
)
);
diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml
index 1195456b0fadadcec4ea4b9debb1f19529ce856e..47a26c92493d1b03cf6adedd5f06a6076b76eb1f 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-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
build = "build.rs"
@@ -21,73 +21,74 @@ static_assertions = "1.1.0"
hex-literal = { version = "0.3.1", optional = true }
# primitives
-sp-authority-discovery = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/authority-discovery" }
-sp-consensus-babe = { version = "0.8.0-rc6", default-features = false, path = "../../../primitives/consensus/babe" }
-sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-rc6"}
-sp-inherents = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/inherents" }
-node-primitives = { version = "2.0.0-rc6", default-features = false, path = "../primitives" }
-sp-offchain = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/offchain" }
-sp-core = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/core" }
-sp-std = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/std" }
-sp-api = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/api" }
-sp-runtime = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/runtime" }
-sp-staking = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/staking" }
-sp-keyring = { version = "2.0.0-rc6", optional = true, path = "../../../primitives/keyring" }
-sp-session = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/session" }
-sp-transaction-pool = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/transaction-pool" }
-sp-version = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/version" }
+sp-authority-discovery = { version = "2.0.0", default-features = false, path = "../../../primitives/authority-discovery" }
+sp-consensus-babe = { version = "0.8.0", default-features = false, path = "../../../primitives/consensus/babe" }
+sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0"}
+sp-inherents = { version = "2.0.0", default-features = false, path = "../../../primitives/inherents" }
+node-primitives = { version = "2.0.0", default-features = false, path = "../primitives" }
+sp-offchain = { version = "2.0.0", default-features = false, path = "../../../primitives/offchain" }
+sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" }
+sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" }
+sp-api = { version = "2.0.0", default-features = false, path = "../../../primitives/api" }
+sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" }
+sp-staking = { version = "2.0.0", default-features = false, path = "../../../primitives/staking" }
+sp-keyring = { version = "2.0.0", optional = true, path = "../../../primitives/keyring" }
+sp-session = { version = "2.0.0", default-features = false, path = "../../../primitives/session" }
+sp-transaction-pool = { version = "2.0.0", default-features = false, path = "../../../primitives/transaction-pool" }
+sp-version = { version = "2.0.0", default-features = false, path = "../../../primitives/version" }
# frame dependencies
-frame-executive = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/executive" }
-frame-benchmarking = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/benchmarking", optional = true }
-frame-support = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/support" }
-frame-system = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/system" }
-frame-system-benchmarking = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/system/benchmarking", optional = true }
-frame-system-rpc-runtime-api = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
-pallet-authority-discovery = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/authority-discovery" }
-pallet-authorship = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/authorship" }
-pallet-babe = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/babe" }
-pallet-balances = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/balances" }
-pallet-collective = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/collective" }
-pallet-contracts = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/contracts" }
-pallet-contracts-primitives = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/contracts/common/" }
-pallet-contracts-rpc-runtime-api = { version = "0.8.0-rc6", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" }
-pallet-democracy = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/democracy" }
-pallet-elections-phragmen = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/elections-phragmen" }
-pallet-finality-tracker = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/finality-tracker" }
-pallet-grandpa = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/grandpa" }
-pallet-im-online = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/im-online" }
-pallet-indices = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/indices" }
-pallet-identity = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/identity" }
-pallet-membership = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/membership" }
-pallet-multisig = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/multisig" }
-pallet-offences = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/offences" }
-pallet-offences-benchmarking = { version = "2.0.0-rc6", path = "../../../frame/offences/benchmarking", default-features = false, optional = true }
-pallet-proxy = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/proxy" }
-pallet-randomness-collective-flip = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/randomness-collective-flip" }
-pallet-recovery = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/recovery" }
-pallet-session = { version = "2.0.0-rc6", features = ["historical"], path = "../../../frame/session", default-features = false }
-pallet-session-benchmarking = { version = "2.0.0-rc6", path = "../../../frame/session/benchmarking", default-features = false, optional = true }
-pallet-staking = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/staking" }
-pallet-staking-reward-curve = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/staking/reward-curve" }
-pallet-scheduler = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/scheduler" }
-pallet-society = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/society" }
-pallet-sudo = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/sudo" }
-pallet-timestamp = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/timestamp" }
-pallet-treasury = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/treasury" }
-pallet-utility = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/utility" }
-pallet-transaction-payment = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/transaction-payment" }
-pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" }
-pallet-vesting = { version = "2.0.0-rc6", default-features = false, path = "../../../frame/vesting" }
+frame-executive = { version = "2.0.0", default-features = false, path = "../../../frame/executive" }
+frame-benchmarking = { version = "2.0.0", default-features = false, path = "../../../frame/benchmarking", optional = true }
+frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" }
+frame-system = { version = "2.0.0", default-features = false, path = "../../../frame/system" }
+frame-system-benchmarking = { version = "2.0.0", default-features = false, path = "../../../frame/system/benchmarking", optional = true }
+frame-system-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
+pallet-authority-discovery = { version = "2.0.0", default-features = false, path = "../../../frame/authority-discovery" }
+pallet-authorship = { version = "2.0.0", default-features = false, path = "../../../frame/authorship" }
+pallet-babe = { version = "2.0.0", default-features = false, path = "../../../frame/babe" }
+pallet-balances = { version = "2.0.0", default-features = false, path = "../../../frame/balances" }
+pallet-collective = { version = "2.0.0", default-features = false, path = "../../../frame/collective" }
+pallet-contracts = { version = "2.0.0", default-features = false, path = "../../../frame/contracts" }
+pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "../../../frame/contracts/common/" }
+pallet-contracts-rpc-runtime-api = { version = "0.8.0", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" }
+pallet-democracy = { version = "2.0.0", default-features = false, path = "../../../frame/democracy" }
+pallet-elections-phragmen = { version = "2.0.0", default-features = false, path = "../../../frame/elections-phragmen" }
+pallet-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../frame/finality-tracker" }
+pallet-grandpa = { version = "2.0.0", default-features = false, path = "../../../frame/grandpa" }
+pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" }
+pallet-indices = { version = "2.0.0", default-features = false, path = "../../../frame/indices" }
+pallet-identity = { version = "2.0.0", default-features = false, path = "../../../frame/identity" }
+pallet-membership = { version = "2.0.0", default-features = false, path = "../../../frame/membership" }
+pallet-multisig = { version = "2.0.0", default-features = false, path = "../../../frame/multisig" }
+pallet-offences = { version = "2.0.0", default-features = false, path = "../../../frame/offences" }
+pallet-offences-benchmarking = { version = "2.0.0", path = "../../../frame/offences/benchmarking", default-features = false, optional = true }
+pallet-proxy = { version = "2.0.0", default-features = false, path = "../../../frame/proxy" }
+pallet-randomness-collective-flip = { version = "2.0.0", default-features = false, path = "../../../frame/randomness-collective-flip" }
+pallet-recovery = { version = "2.0.0", default-features = false, path = "../../../frame/recovery" }
+pallet-session = { version = "2.0.0", features = ["historical"], path = "../../../frame/session", default-features = false }
+pallet-session-benchmarking = { version = "2.0.0", path = "../../../frame/session/benchmarking", default-features = false, optional = true }
+pallet-staking = { version = "2.0.0", default-features = false, path = "../../../frame/staking" }
+pallet-staking-reward-curve = { version = "2.0.0", default-features = false, path = "../../../frame/staking/reward-curve" }
+pallet-scheduler = { version = "2.0.0", default-features = false, path = "../../../frame/scheduler" }
+pallet-society = { version = "2.0.0", default-features = false, path = "../../../frame/society" }
+pallet-sudo = { version = "2.0.0", default-features = false, path = "../../../frame/sudo" }
+pallet-timestamp = { version = "2.0.0", default-features = false, path = "../../../frame/timestamp" }
+pallet-treasury = { version = "2.0.0", default-features = false, path = "../../../frame/treasury" }
+pallet-utility = { version = "2.0.0", default-features = false, path = "../../../frame/utility" }
+pallet-transaction-payment = { version = "2.0.0", default-features = false, path = "../../../frame/transaction-payment" }
+pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" }
+pallet-vesting = { version = "2.0.0", 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-rc6", path = "../../../primitives/io" }
+sp-io = { version = "2.0.0", path = "../../../primitives/io" }
[features]
default = ["std"]
+with-tracing = [ "frame-executive/with-tracing" ]
std = [
"sp-authority-discovery/std",
"pallet-authority-discovery/std",
diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs
index 54dea704bd7f6182f847a2896793851fd6a87c06..27f2516254f0fb3297786e5eecf31f3607fc6a6b 100644
--- a/bin/node/runtime/src/lib.rs
+++ b/bin/node/runtime/src/lib.rs
@@ -109,8 +109,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: 258,
- impl_version: 0,
+ spec_version: 259,
+ impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
};
@@ -179,17 +179,17 @@ impl frame_system::Trait for Runtime {
type MaximumBlockLength = MaximumBlockLength;
type AvailableBlockRatio = AvailableBlockRatio;
type Version = Version;
- type ModuleToIndex = ModuleToIndex;
+ type PalletInfo = PalletInfo;
type AccountData = pallet_balances::AccountData;
type OnNewAccount = ();
type OnKilledAccount = ();
- type SystemWeightInfo = weights::frame_system::WeightInfo;
+ type SystemWeightInfo = weights::frame_system::WeightInfo;
}
impl pallet_utility::Trait for Runtime {
type Event = Event;
type Call = Call;
- type WeightInfo = weights::pallet_utility::WeightInfo;
+ type WeightInfo = weights::pallet_utility::WeightInfo;
}
parameter_types! {
@@ -207,7 +207,7 @@ impl pallet_multisig::Trait for Runtime {
type DepositBase = DepositBase;
type DepositFactor = DepositFactor;
type MaxSignatories = MaxSignatories;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_multisig::WeightInfo;
}
parameter_types! {
@@ -234,13 +234,20 @@ impl InstanceFilter for ProxyType {
fn filter(&self, c: &Call) -> bool {
match self {
ProxyType::Any => true,
- ProxyType::NonTransfer => !matches!(c,
- Call::Balances(..) | Call::Vesting(pallet_vesting::Call::vested_transfer(..))
- | Call::Indices(pallet_indices::Call::transfer(..))
+ ProxyType::NonTransfer => !matches!(
+ c,
+ Call::Balances(..) |
+ Call::Vesting(pallet_vesting::Call::vested_transfer(..)) |
+ Call::Indices(pallet_indices::Call::transfer(..))
),
- ProxyType::Governance => matches!(c,
- Call::Democracy(..) | Call::Council(..) | Call::Society(..)
- | Call::TechnicalCommittee(..) | Call::Elections(..) | Call::Treasury(..)
+ ProxyType::Governance => matches!(
+ c,
+ Call::Democracy(..) |
+ Call::Council(..) |
+ Call::Society(..) |
+ Call::TechnicalCommittee(..) |
+ Call::Elections(..) |
+ Call::Treasury(..)
),
ProxyType::Staking => matches!(c, Call::Staking(..)),
}
@@ -264,7 +271,7 @@ impl pallet_proxy::Trait for Runtime {
type ProxyDepositBase = ProxyDepositBase;
type ProxyDepositFactor = ProxyDepositFactor;
type MaxProxies = MaxProxies;
- type WeightInfo = weights::pallet_proxy::WeightInfo;
+ type WeightInfo = weights::pallet_proxy::WeightInfo;
type MaxPending = MaxPending;
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
@@ -273,6 +280,7 @@ impl pallet_proxy::Trait for Runtime {
parameter_types! {
pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * MaximumBlockWeight::get();
+ pub const MaxScheduledPerBlock: u32 = 50;
}
impl pallet_scheduler::Trait for Runtime {
@@ -282,7 +290,8 @@ impl pallet_scheduler::Trait for Runtime {
type Call = Call;
type MaximumWeight = MaximumSchedulerWeight;
type ScheduleOrigin = EnsureRoot;
- type WeightInfo = ();
+ type MaxScheduledPerBlock = MaxScheduledPerBlock;
+ type WeightInfo = weights::pallet_scheduler::WeightInfo;
}
parameter_types! {
@@ -309,6 +318,8 @@ impl pallet_babe::Trait for Runtime {
type HandleEquivocation =
pallet_babe::EquivocationHandler;
+
+ type WeightInfo = ();
}
parameter_types! {
@@ -320,20 +331,24 @@ impl pallet_indices::Trait for Runtime {
type Currency = Balances;
type Deposit = IndexDeposit;
type Event = Event;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_indices::WeightInfo;
}
parameter_types! {
pub const ExistentialDeposit: Balance = 1 * DOLLARS;
+ // For weight estimation, we assume that the most locks on an individual account will be 50.
+ // This number may need to be adjusted in the future if this assumption no longer holds true.
+ pub const MaxLocks: u32 = 50;
}
impl pallet_balances::Trait for Runtime {
+ type MaxLocks = MaxLocks;
type Balance = Balance;
type DustRemoval = ();
type Event = Event;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = frame_system::Module;
- type WeightInfo = weights::pallet_balances::WeightInfo;
+ type WeightInfo = weights::pallet_balances::WeightInfo;
}
parameter_types! {
@@ -360,7 +375,7 @@ impl pallet_timestamp::Trait for Runtime {
type Moment = Moment;
type OnTimestampSet = Babe;
type MinimumPeriod = MinimumPeriod;
- type WeightInfo = weights::pallet_timestamp::WeightInfo;
+ type WeightInfo = weights::pallet_timestamp::WeightInfo;
}
parameter_types! {
@@ -397,7 +412,7 @@ impl pallet_session::Trait for Runtime {
type SessionHandler = ::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_session::WeightInfo;
}
impl pallet_session::historical::Trait for Runtime {
@@ -454,7 +469,7 @@ impl pallet_staking::Trait for Runtime {
type MinSolutionScoreBump = MinSolutionScoreBump;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
type UnsignedPriority = StakingUnsignedPriority;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_staking::WeightInfo;
}
parameter_types! {
@@ -468,6 +483,7 @@ parameter_types! {
// One cent: $10,000 / MB
pub const PreimageByteDeposit: Balance = 1 * CENTS;
pub const MaxVotes: u32 = 100;
+ pub const MaxProposals: u32 = 100;
}
impl pallet_democracy::Trait for Runtime {
@@ -493,6 +509,14 @@ impl pallet_democracy::Trait for Runtime {
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>;
+ // To cancel a proposal before it has been passed, the technical committee must be unanimous or
+ // Root must agree.
+ type CancelProposalOrigin = EnsureOneOf<
+ AccountId,
+ EnsureRoot,
+ pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>,
+ >;
+ type BlacklistOrigin = EnsureRoot;
// Any single technical committee member may veto a coming council proposal, however they can
// only do it once and it lasts only for the cooloff period.
type VetoOrigin = pallet_collective::EnsureMember;
@@ -503,7 +527,8 @@ impl pallet_democracy::Trait for Runtime {
type Scheduler = Scheduler;
type PalletsOrigin = OriginCaller;
type MaxVotes = MaxVotes;
- type WeightInfo = weights::pallet_democracy::WeightInfo;
+ type WeightInfo = weights::pallet_democracy::WeightInfo;
+ type MaxProposals = MaxProposals;
}
parameter_types! {
@@ -520,7 +545,8 @@ impl pallet_collective::Trait for Runtime {
type MotionDuration = CouncilMotionDuration;
type MaxProposals = CouncilMaxProposals;
type MaxMembers = CouncilMaxMembers;
- type WeightInfo = weights::pallet_collective::WeightInfo;
+ type DefaultVote = pallet_collective::PrimeDefaultVote;
+ type WeightInfo = weights::pallet_collective::WeightInfo;
}
parameter_types! {
@@ -552,7 +578,7 @@ impl pallet_elections_phragmen::Trait for Runtime {
type DesiredMembers = DesiredMembers;
type DesiredRunnersUp = DesiredRunnersUp;
type TermDuration = TermDuration;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_elections_phragmen::WeightInfo;
}
parameter_types! {
@@ -569,7 +595,8 @@ impl pallet_collective::Trait for Runtime {
type MotionDuration = TechnicalMotionDuration;
type MaxProposals = TechnicalMaxProposals;
type MaxMembers = TechnicalMaxMembers;
- type WeightInfo = weights::pallet_collective::WeightInfo;
+ type DefaultVote = pallet_collective::PrimeDefaultVote;
+ type WeightInfo = weights::pallet_collective::WeightInfo;
}
type EnsureRootOrHalfCouncil = EnsureOneOf<
@@ -596,8 +623,14 @@ parameter_types! {
pub const TipCountdown: BlockNumber = 1 * DAYS;
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: Balance = 1 * DOLLARS;
- pub const TipReportDepositPerByte: Balance = 1 * CENTS;
+ pub const DataDepositPerByte: Balance = 1 * CENTS;
+ pub const BountyDepositBase: Balance = 1 * DOLLARS;
+ pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS;
pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry");
+ pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS;
+ pub const MaximumReasonLength: u32 = 16384;
+ pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
+ pub const BountyValueMinimum: Balance = 5 * DOLLARS;
}
impl pallet_treasury::Trait for Runtime {
@@ -617,15 +650,21 @@ impl pallet_treasury::Trait for Runtime {
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
- type TipReportDepositPerByte = TipReportDepositPerByte;
+ type DataDepositPerByte = DataDepositPerByte;
type Event = Event;
- type ProposalRejection = ();
+ type OnSlash = ();
type ProposalBond = ProposalBond;
type ProposalBondMinimum = ProposalBondMinimum;
type SpendPeriod = SpendPeriod;
type Burn = Burn;
+ type BountyDepositBase = BountyDepositBase;
+ type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
+ type BountyUpdatePeriod = BountyUpdatePeriod;
+ type BountyCuratorDeposit = BountyCuratorDeposit;
+ type BountyValueMinimum = BountyValueMinimum;
+ type MaximumReasonLength = MaximumReasonLength;
type BurnDestination = ();
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_treasury::WeightInfo;
}
parameter_types! {
@@ -730,7 +769,7 @@ impl pallet_im_online::Trait for Runtime {
type SessionDuration = SessionDuration;
type ReportUnresponsiveness = Offences;
type UnsignedPriority = ImOnlineUnsignedPriority;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_im_online::WeightInfo;
}
parameter_types! {
@@ -742,7 +781,6 @@ impl pallet_offences::Trait for Runtime {
type IdentificationTuple = pallet_session::historical::IdentificationTuple;
type OnOffenceHandler = Staking;
type WeightSoftLimit = OffencesWeightSoftLimit;
- type WeightInfo = ();
}
impl pallet_authority_discovery::Trait for Runtime {}
@@ -763,6 +801,8 @@ impl pallet_grandpa::Trait for Runtime {
type HandleEquivocation =
pallet_grandpa::EquivocationHandler;
+
+ type WeightInfo = ();
}
parameter_types! {
@@ -797,7 +837,7 @@ impl pallet_identity::Trait for Runtime {
type Slashed = Treasury;
type ForceOrigin = EnsureRootOrHalfCouncil;
type RegistrarOrigin = EnsureRootOrHalfCouncil;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_identity::WeightInfo;
}
parameter_types! {
@@ -854,7 +894,7 @@ impl pallet_vesting::Trait for Runtime {
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
type MinVestedTransfer = MinVestedTransfer;
- type WeightInfo = ();
+ type WeightInfo = weights::pallet_vesting::WeightInfo;
}
construct_runtime!(
diff --git a/bin/node/runtime/src/weights/frame_system.rs b/bin/node/runtime/src/weights/frame_system.rs
index 9522fa75203906ab3c7264154a4b33835375843c..b1fdf69640602d7a042579332ce36b56ba240ec2 100644
--- a/bin/node/runtime/src/weights/frame_system.rs
+++ b/bin/node/runtime/src/weights/frame_system.rs
@@ -19,38 +19,39 @@
#![allow(unused_parens)]
-use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
-pub struct WeightInfo;
-impl frame_system::WeightInfo for WeightInfo {
+pub struct WeightInfo(PhantomData);
+impl frame_system::WeightInfo for WeightInfo {
// WARNING! Some components were not used: ["b"]
fn remark() -> Weight {
(1305000 as Weight)
}
fn set_heap_pages() -> Weight {
(2023000 as Weight)
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// WARNING! Some components were not used: ["d"]
fn set_changes_trie_config() -> Weight {
(10026000 as Weight)
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
.saturating_add((656000 as Weight).saturating_mul(i as Weight))
- .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_storage(i: u32, ) -> Weight {
(4327000 as Weight)
.saturating_add((478000 as Weight).saturating_mul(i as Weight))
- .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_prefix(p: u32, ) -> Weight {
(8349000 as Weight)
.saturating_add((838000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
fn suicide() -> Weight {
(29247000 as Weight)
diff --git a/bin/node/runtime/src/weights/mod.rs b/bin/node/runtime/src/weights/mod.rs
index 372b13a093e27183f6cdd60bdb76c94379bc3f60..19269d02611ef6a92bb46f399194c232ecb4acf3 100644
--- a/bin/node/runtime/src/weights/mod.rs
+++ b/bin/node/runtime/src/weights/mod.rs
@@ -19,6 +19,16 @@ pub mod frame_system;
pub mod pallet_balances;
pub mod pallet_collective;
pub mod pallet_democracy;
+pub mod pallet_elections_phragmen;
+pub mod pallet_identity;
+pub mod pallet_im_online;
+pub mod pallet_indices;
+pub mod pallet_multisig;
pub mod pallet_proxy;
+pub mod pallet_scheduler;
+pub mod pallet_session;
+pub mod pallet_staking;
pub mod pallet_timestamp;
+pub mod pallet_treasury;
pub mod pallet_utility;
+pub mod pallet_vesting;
diff --git a/bin/node/runtime/src/weights/pallet_balances.rs b/bin/node/runtime/src/weights/pallet_balances.rs
index bcbc4ced6ef56895d4c62a31a7b0580ad71b9ecf..18a971b20c0ec47e3025b1ba4f9b41778ba31c8e 100644
--- a/bin/node/runtime/src/weights/pallet_balances.rs
+++ b/bin/node/runtime/src/weights/pallet_balances.rs
@@ -15,33 +15,34 @@
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5
-use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
-pub struct WeightInfo;
-impl pallet_balances::WeightInfo for WeightInfo {
+pub struct WeightInfo(PhantomData);
+impl pallet_balances::WeightInfo for WeightInfo {
fn transfer() -> Weight {
(65949000 as Weight)
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn transfer_keep_alive() -> Weight {
(46665000 as Weight)
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_balance_creating() -> Weight {
(27086000 as Weight)
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_balance_killing() -> Weight {
(33424000 as Weight)
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_transfer() -> Weight {
(65343000 as Weight)
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
}
diff --git a/bin/node/runtime/src/weights/pallet_collective.rs b/bin/node/runtime/src/weights/pallet_collective.rs
index 32b4ad02d7aa94c8007429b24bef2f062b310036..5e91dc19abcb9f5aaf5c62e54bdbb03f7e9d37ce 100644
--- a/bin/node/runtime/src/weights/pallet_collective.rs
+++ b/bin/node/runtime/src/weights/pallet_collective.rs
@@ -18,80 +18,81 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
-use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
-pub struct WeightInfo;
-impl pallet_collective::WeightInfo for WeightInfo {
+pub struct WeightInfo(PhantomData);
+impl pallet_collective::WeightInfo for WeightInfo {
fn set_members(m: u32, n: u32, p: u32, ) -> Weight {
(0 as Weight)
.saturating_add((21040000 as Weight).saturating_mul(m as Weight))
.saturating_add((173000 as Weight).saturating_mul(n as Weight))
.saturating_add((31595000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight)))
- .saturating_add(DbWeight::get().writes(2 as Weight))
- .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight)))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
fn execute(b: u32, m: u32, ) -> Weight {
(43359000 as Weight)
.saturating_add((4000 as Weight).saturating_mul(b as Weight))
.saturating_add((123000 as Weight).saturating_mul(m as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
}
fn propose_execute(b: u32, m: u32, ) -> Weight {
(54134000 as Weight)
.saturating_add((4000 as Weight).saturating_mul(b as Weight))
.saturating_add((239000 as Weight).saturating_mul(m as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
}
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
(90650000 as Weight)
.saturating_add((5000 as Weight).saturating_mul(b as Weight))
.saturating_add((152000 as Weight).saturating_mul(m as Weight))
.saturating_add((970000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(4 as Weight))
- .saturating_add(DbWeight::get().writes(4 as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn vote(m: u32, ) -> Weight {
(74460000 as Weight)
.saturating_add((290000 as Weight).saturating_mul(m as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
(86360000 as Weight)
.saturating_add((232000 as Weight).saturating_mul(m as Weight))
.saturating_add((954000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(3 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
(123653000 as Weight)
.saturating_add((1000 as Weight).saturating_mul(b as Weight))
.saturating_add((287000 as Weight).saturating_mul(m as Weight))
.saturating_add((920000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(4 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn close_disapproved(m: u32, p: u32, ) -> Weight {
(95395000 as Weight)
.saturating_add((236000 as Weight).saturating_mul(m as Weight))
.saturating_add((965000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(4 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
(135284000 as Weight)
.saturating_add((4000 as Weight).saturating_mul(b as Weight))
.saturating_add((218000 as Weight).saturating_mul(m as Weight))
.saturating_add((951000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(5 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn disapprove_proposal(p: u32, ) -> Weight {
(50500000 as Weight)
.saturating_add((966000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
}
diff --git a/bin/node/runtime/src/weights/pallet_democracy.rs b/bin/node/runtime/src/weights/pallet_democracy.rs
index 2c55a848061a393c179614688f18885fd63c2c97..51eca2855a384b54e4ec171f352be77abb37f7cf 100644
--- a/bin/node/runtime/src/weights/pallet_democracy.rs
+++ b/bin/node/runtime/src/weights/pallet_democracy.rs
@@ -1,3 +1,5 @@
+// This file is part of Substrate.
+
// Copyright (C) 2020 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -13,143 +15,159 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-//! Weights for the Democracy Pallet
-//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5
+//! Weights for pallet_democracy
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0
+//! DATE: 2020-09-24, STEPS: [50], REPEAT: 20, LOW RANGE: [], HIGH RANGE: []
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
-use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
-pub struct WeightInfo;
-impl pallet_democracy::WeightInfo for WeightInfo {
+pub struct WeightInfo(PhantomData);
+impl pallet_democracy::WeightInfo for WeightInfo {
fn propose() -> Weight {
- (49113000 as Weight)
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ (96_316_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn second(s: u32, ) -> Weight {
- (42067000 as Weight)
- .saturating_add((220000 as Weight).saturating_mul(s as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (58_386_000 as Weight)
+ .saturating_add((259_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn vote_new(r: u32, ) -> Weight {
- (54159000 as Weight)
- .saturating_add((252000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(3 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ (70_374_000 as Weight)
+ .saturating_add((291_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vote_existing(r: u32, ) -> Weight {
- (54145000 as Weight)
- .saturating_add((262000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(3 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ (70_097_000 as Weight)
+ .saturating_add((296_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn emergency_cancel() -> Weight {
- (31071000 as Weight)
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ (41_731_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn blacklist(p: u32, ) -> Weight {
+ (117_847_000 as Weight)
+ .saturating_add((871_000 as Weight).saturating_mul(p as Weight))
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes(6 as Weight))
}
fn external_propose(v: u32, ) -> Weight {
- (14282000 as Weight)
- .saturating_add((109000 as Weight).saturating_mul(v as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (20_972_000 as Weight)
+ .saturating_add((114_000 as Weight).saturating_mul(v as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn external_propose_majority() -> Weight {
- (3478000 as Weight)
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (5_030_000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn external_propose_default() -> Weight {
- (3442000 as Weight)
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (4_981_000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn fast_track() -> Weight {
- (30820000 as Weight)
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ (42_801_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn veto_external(v: u32, ) -> Weight {
- (30971000 as Weight)
- .saturating_add((184000 as Weight).saturating_mul(v as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ (44_115_000 as Weight)
+ .saturating_add((194_000 as Weight).saturating_mul(v as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn cancel_proposal(p: u32, ) -> Weight {
+ (73_937_000 as Weight)
+ .saturating_add((962_000 as Weight).saturating_mul(p as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn cancel_referendum() -> Weight {
- (20431000 as Weight)
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (25_233_000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn cancel_queued(r: u32, ) -> Weight {
- (42438000 as Weight)
- .saturating_add((3284000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ (48_251_000 as Weight)
+ .saturating_add((3_590_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn on_initialize_base(r: u32, ) -> Weight {
- (70826000 as Weight)
- .saturating_add((10716000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(6 as Weight))
- .saturating_add(DbWeight::get().reads((2 as Weight).saturating_mul(r as Weight)))
- .saturating_add(DbWeight::get().writes(5 as Weight))
+ (17_597_000 as Weight)
+ .saturating_add((7_248_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
}
fn delegate(r: u32, ) -> Weight {
- (72046000 as Weight)
- .saturating_add((7837000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(4 as Weight))
- .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
- .saturating_add(DbWeight::get().writes(4 as Weight))
- .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
+ (93_916_000 as Weight)
+ .saturating_add((10_794_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
}
fn undelegate(r: u32, ) -> Weight {
- (41028000 as Weight)
- .saturating_add((7810000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
- .saturating_add(DbWeight::get().writes(2 as Weight))
- .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
+ (47_855_000 as Weight)
+ .saturating_add((10_805_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
}
fn clear_public_proposals() -> Weight {
- (3643000 as Weight)
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (4_864_000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn note_preimage(b: u32, ) -> Weight {
- (46629000 as Weight)
- .saturating_add((4000 as Weight).saturating_mul(b as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (66_754_000 as Weight)
+ .saturating_add((4_000 as Weight).saturating_mul(b as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn note_imminent_preimage(b: u32, ) -> Weight {
- (31147000 as Weight)
- .saturating_add((3000 as Weight).saturating_mul(b as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (44_664_000 as Weight)
+ .saturating_add((3_000 as Weight).saturating_mul(b as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn reap_preimage(b: u32, ) -> Weight {
- (42848000 as Weight)
- .saturating_add((3000 as Weight).saturating_mul(b as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ (59_968_000 as Weight)
+ .saturating_add((3_000 as Weight).saturating_mul(b as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn unlock_remove(r: u32, ) -> Weight {
- (45333000 as Weight)
- .saturating_add((171000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(3 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ (58_573_000 as Weight)
+ .saturating_add((131_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn unlock_set(r: u32, ) -> Weight {
- (44424000 as Weight)
- .saturating_add((291000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(3 as Weight))
- .saturating_add(DbWeight::get().writes(3 as Weight))
+ (53_831_000 as Weight)
+ .saturating_add((324_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn remove_vote(r: u32, ) -> Weight {
- (28250000 as Weight)
- .saturating_add((283000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ (31_846_000 as Weight)
+ .saturating_add((327_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn remove_other_vote(r: u32, ) -> Weight {
- (28250000 as Weight)
- .saturating_add((283000 as Weight).saturating_mul(r as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ (31_880_000 as Weight)
+ .saturating_add((222_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
}
diff --git a/bin/node/runtime/src/weights/pallet_elections_phragmen.rs b/bin/node/runtime/src/weights/pallet_elections_phragmen.rs
new file mode 100644
index 0000000000000000000000000000000000000000..8da9838d5d7a104ae461c5dc03e9ca04907d9c73
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_elections_phragmen.rs
@@ -0,0 +1,90 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2019-2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_elections_phragmen::WeightInfo for WeightInfo {
+ fn vote(v: u32, ) -> Weight {
+ (91_489_000 as Weight)
+ .saturating_add((199_000 as Weight).saturating_mul(v as Weight))
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn vote_update(v: u32, ) -> Weight {
+ (56_511_000 as Weight)
+ .saturating_add((245_000 as Weight).saturating_mul(v as Weight))
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn remove_voter() -> Weight {
+ (76_714_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn report_defunct_voter_correct(c: u32, v: u32, ) -> Weight {
+ (0 as Weight)
+ .saturating_add((1_743_000 as Weight).saturating_mul(c as Weight))
+ .saturating_add((31_750_000 as Weight).saturating_mul(v as Weight))
+ .saturating_add(T::DbWeight::get().reads(7 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn report_defunct_voter_incorrect(c: u32, v: u32, ) -> Weight {
+ (0 as Weight)
+ .saturating_add((1_733_000 as Weight).saturating_mul(c as Weight))
+ .saturating_add((31_861_000 as Weight).saturating_mul(v as Weight))
+ .saturating_add(T::DbWeight::get().reads(6 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn submit_candidacy(c: u32, ) -> Weight {
+ (74_714_000 as Weight)
+ .saturating_add((315_000 as Weight).saturating_mul(c as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn renounce_candidacy_candidate(c: u32, ) -> Weight {
+ (50_408_000 as Weight)
+ .saturating_add((159_000 as Weight).saturating_mul(c as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn renounce_candidacy_members() -> Weight {
+ (79_626_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
+ }
+ fn renounce_candidacy_runners_up() -> Weight {
+ (49_715_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn remove_member_with_replacement() -> Weight {
+ (76_572_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(5 as Weight))
+ }
+ fn remove_member_wrong_refund() -> Weight {
+ (8_777_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_identity.rs b/bin/node/runtime/src/weights/pallet_identity.rs
new file mode 100644
index 0000000000000000000000000000000000000000..a43b63c0fb04120c97fdba490e66e1ccf80eee0b
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_identity.rs
@@ -0,0 +1,137 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2019-2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_identity::WeightInfo for WeightInfo {
+ fn add_registrar(r: u32, ) -> Weight {
+ (39_603_000 as Weight)
+ .saturating_add((418_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn set_identity(r: u32, x: u32, ) -> Weight {
+ (110_679_000 as Weight)
+ .saturating_add((389_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add((2_985_000 as Weight).saturating_mul(x as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn set_subs_new(s: u32, ) -> Weight {
+ (78_697_000 as Weight)
+ .saturating_add((15_225_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
+ }
+ fn set_subs_old(p: u32, ) -> Weight {
+ (71_308_000 as Weight)
+ .saturating_add((5_772_000 as Weight).saturating_mul(p as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
+ }
+ fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight {
+ (91_553_000 as Weight)
+ .saturating_add((284_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add((5_749_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add((1_621_000 as Weight).saturating_mul(x as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
+ }
+ fn request_judgement(r: u32, x: u32, ) -> Weight {
+ (110_856_000 as Weight)
+ .saturating_add((496_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add((3_221_000 as Weight).saturating_mul(x as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn cancel_request(r: u32, x: u32, ) -> Weight {
+ (96_857_000 as Weight)
+ .saturating_add((311_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add((3_204_000 as Weight).saturating_mul(x as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn set_fee(r: u32, ) -> Weight {
+ (16_276_000 as Weight)
+ .saturating_add((381_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn set_account_id(r: u32, ) -> Weight {
+ (18_530_000 as Weight)
+ .saturating_add((391_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn set_fields(r: u32, ) -> Weight {
+ (16_359_000 as Weight)
+ .saturating_add((379_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn provide_judgement(r: u32, x: u32, ) -> Weight {
+ (72_869_000 as Weight)
+ .saturating_add((423_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add((3_187_000 as Weight).saturating_mul(x as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight {
+ (123_199_000 as Weight)
+ .saturating_add((71_000 as Weight).saturating_mul(r as Weight))
+ .saturating_add((5_730_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add((2_000 as Weight).saturating_mul(x as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
+ }
+ fn add_sub(s: u32, ) -> Weight {
+ (110_070_000 as Weight)
+ .saturating_add((262_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn rename_sub(s: u32, ) -> Weight {
+ (37_130_000 as Weight)
+ .saturating_add((79_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn remove_sub(s: u32, ) -> Weight {
+ (103_295_000 as Weight)
+ .saturating_add((235_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn quit_sub(s: u32, ) -> Weight {
+ (65_716_000 as Weight)
+ .saturating_add((227_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_im_online.rs b/bin/node/runtime/src/weights/pallet_im_online.rs
new file mode 100644
index 0000000000000000000000000000000000000000..a85672da51c5a4a54dea8c8f47ae1eef29f494c2
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_im_online.rs
@@ -0,0 +1,35 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_im_online::WeightInfo for WeightInfo {
+ fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight {
+ (139830000 as Weight)
+ .saturating_add((211000 as Weight).saturating_mul(k as Weight))
+ .saturating_add((654000 as Weight).saturating_mul(e as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_indices.rs b/bin/node/runtime/src/weights/pallet_indices.rs
new file mode 100644
index 0000000000000000000000000000000000000000..e8845f335289666832c707e7e3885aec3a7c91ed
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_indices.rs
@@ -0,0 +1,53 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2017-2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_indices::WeightInfo for WeightInfo {
+ fn claim() -> Weight {
+ (56_237_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn transfer() -> Weight {
+ (63_665_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn free() -> Weight {
+ (50_736_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn force_transfer() -> Weight {
+ (52_361_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn freeze() -> Weight {
+ (46_483_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_multisig.rs b/bin/node/runtime/src/weights/pallet_multisig.rs
new file mode 100644
index 0000000000000000000000000000000000000000..0af7c7c75e1ea45824212ed45c1178a815a53a82
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_multisig.rs
@@ -0,0 +1,91 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2019-2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_multisig::WeightInfo for WeightInfo {
+ fn as_multi_threshold_1(z: u32, ) -> Weight {
+ (17_161_000 as Weight)
+ .saturating_add((1_000 as Weight).saturating_mul(z as Weight))
+ }
+ fn as_multi_create(s: u32, z: u32, ) -> Weight {
+ (79_857_000 as Weight)
+ .saturating_add((131_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add((1_000 as Weight).saturating_mul(z as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
+ (90_218_000 as Weight)
+ .saturating_add((129_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add((3_000 as Weight).saturating_mul(z as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn as_multi_approve(s: u32, z: u32, ) -> Weight {
+ (48_402_000 as Weight)
+ .saturating_add((132_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add((1_000 as Weight).saturating_mul(z as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
+ (88_390_000 as Weight)
+ .saturating_add((120_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add((3_000 as Weight).saturating_mul(z as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn as_multi_complete(s: u32, z: u32, ) -> Weight {
+ (98_960_000 as Weight)
+ .saturating_add((276_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add((6_000 as Weight).saturating_mul(z as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn approve_as_multi_create(s: u32, ) -> Weight {
+ (80_185_000 as Weight)
+ .saturating_add((121_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn approve_as_multi_approve(s: u32, ) -> Weight {
+ (48_386_000 as Weight)
+ .saturating_add((143_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn approve_as_multi_complete(s: u32, ) -> Weight {
+ (177_181_000 as Weight)
+ .saturating_add((273_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn cancel_as_multi(s: u32, ) -> Weight {
+ (126_334_000 as Weight)
+ .saturating_add((124_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_proxy.rs b/bin/node/runtime/src/weights/pallet_proxy.rs
index 92c43cd4853a215edade20d9b281e20ee8559663..c43b5db14ed956d8f924d5de6ed46aea8330f381 100644
--- a/bin/node/runtime/src/weights/pallet_proxy.rs
+++ b/bin/node/runtime/src/weights/pallet_proxy.rs
@@ -15,71 +15,72 @@
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5
-use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
-pub struct WeightInfo;
-impl pallet_proxy::WeightInfo for WeightInfo {
+pub struct WeightInfo(PhantomData);
+impl pallet_proxy::WeightInfo for WeightInfo {
fn proxy(p: u32, ) -> Weight {
(26127000 as Weight)
.saturating_add((214000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
}
fn proxy_announced(a: u32, p: u32, ) -> Weight {
(55405000 as Weight)
.saturating_add((774000 as Weight).saturating_mul(a as Weight))
.saturating_add((209000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(3 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn remove_announcement(a: u32, p: u32, ) -> Weight {
(35879000 as Weight)
.saturating_add((783000 as Weight).saturating_mul(a as Weight))
.saturating_add((20000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn reject_announcement(a: u32, p: u32, ) -> Weight {
(36097000 as Weight)
.saturating_add((780000 as Weight).saturating_mul(a as Weight))
.saturating_add((12000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn announce(a: u32, p: u32, ) -> Weight {
(53769000 as Weight)
.saturating_add((675000 as Weight).saturating_mul(a as Weight))
.saturating_add((214000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(3 as Weight))
- .saturating_add(DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn add_proxy(p: u32, ) -> Weight {
(36082000 as Weight)
.saturating_add((234000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxy(p: u32, ) -> Weight {
(32885000 as Weight)
.saturating_add((267000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxies(p: u32, ) -> Weight {
(31735000 as Weight)
.saturating_add((215000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn anonymous(p: u32, ) -> Weight {
(50907000 as Weight)
.saturating_add((61000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn kill_anonymous(p: u32, ) -> Weight {
(33926000 as Weight)
.saturating_add((208000 as Weight).saturating_mul(p as Weight))
- .saturating_add(DbWeight::get().reads(1 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
}
diff --git a/bin/node/runtime/src/weights/pallet_scheduler.rs b/bin/node/runtime/src/weights/pallet_scheduler.rs
new file mode 100644
index 0000000000000000000000000000000000000000..895a282488313adc837384e2ab6c77c22232261f
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_scheduler.rs
@@ -0,0 +1,52 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_scheduler::WeightInfo for WeightInfo {
+ fn schedule(s: u32, ) -> Weight {
+ (37_835_000 as Weight)
+ .saturating_add((81_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn cancel(s: u32, ) -> Weight {
+ (34_707_000 as Weight)
+ .saturating_add((3_125_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn schedule_named(s: u32, ) -> Weight {
+ (48_065_000 as Weight)
+ .saturating_add((110_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn cancel_named(s: u32, ) -> Weight {
+ (38_776_000 as Weight)
+ .saturating_add((3_138_000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_session.rs b/bin/node/runtime/src/weights/pallet_session.rs
new file mode 100644
index 0000000000000000000000000000000000000000..1ca5c29237b4ef3f325af6f4073f47a431b7fc92
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_session.rs
@@ -0,0 +1,38 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2017-2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_session::WeightInfo for WeightInfo {
+ fn set_keys() -> Weight {
+ (88_411_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(6 as Weight))
+ .saturating_add(T::DbWeight::get().writes(5 as Weight))
+ }
+ fn purge_keys() -> Weight {
+ (51_843_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(5 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_staking.rs b/bin/node/runtime/src/weights/pallet_staking.rs
new file mode 100644
index 0000000000000000000000000000000000000000..a4484a2685949961c848db9f9d59fe8659c7daa1
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_staking.rs
@@ -0,0 +1,171 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2017-2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! Default weights of pallet-staking.
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_staking::WeightInfo for WeightInfo {
+ fn bond() -> Weight {
+ (144278000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
+ }
+ fn bond_extra() -> Weight {
+ (110715000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn unbond() -> Weight {
+ (99840000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn withdraw_unbonded_update(s: u32, ) -> Weight {
+ (100728000 as Weight)
+ .saturating_add((63000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn withdraw_unbonded_kill(s: u32, ) -> Weight {
+ (168879000 as Weight)
+ .saturating_add((6666000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(7 as Weight))
+ .saturating_add(T::DbWeight::get().writes(8 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
+ }
+ fn validate() -> Weight {
+ (35539000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn nominate(n: u32, ) -> Weight {
+ (48596000 as Weight)
+ .saturating_add((308000 as Weight).saturating_mul(n as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn chill() -> Weight {
+ (35144000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn set_payee() -> Weight {
+ (24255000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn set_controller() -> Weight {
+ (52294000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn set_validator_count() -> Weight {
+ (5185000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn force_no_eras() -> Weight {
+ (5907000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn force_new_era() -> Weight {
+ (5917000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn force_new_era_always() -> Weight {
+ (5952000 as Weight)
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn set_invulnerables(v: u32, ) -> Weight {
+ (6324000 as Weight)
+ .saturating_add((9000 as Weight).saturating_mul(v as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn force_unstake(s: u32, ) -> Weight {
+ (119691000 as Weight)
+ .saturating_add((6681000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(8 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
+ }
+ fn cancel_deferred_slash(s: u32, ) -> Weight {
+ (5820201000 as Weight)
+ .saturating_add((34672000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn payout_stakers_dead_controller(n: u32, ) -> Weight {
+ (0 as Weight)
+ .saturating_add((92486000 as Weight).saturating_mul(n as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
+ }
+ fn payout_stakers_alive_staked(n: u32, ) -> Weight {
+ (0 as Weight)
+ .saturating_add((117324000 as Weight).saturating_mul(n as Weight))
+ .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
+ .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
+ }
+ fn rebond(l: u32, ) -> Weight {
+ (71316000 as Weight)
+ .saturating_add((142000 as Weight).saturating_mul(l as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn set_history_depth(e: u32, ) -> Weight {
+ (0 as Weight)
+ .saturating_add((51901000 as Weight).saturating_mul(e as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
+ }
+ fn reap_stash(s: u32, ) -> Weight {
+ (147166000 as Weight)
+ .saturating_add((6661000 as Weight).saturating_mul(s as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(8 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
+ }
+ fn new_era(v: u32, n: u32, ) -> Weight {
+ (0 as Weight)
+ .saturating_add((1440459000 as Weight).saturating_mul(v as Weight))
+ .saturating_add((182580000 as Weight).saturating_mul(n as Weight))
+ .saturating_add(T::DbWeight::get().reads(10 as Weight))
+ .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
+ .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
+ .saturating_add(T::DbWeight::get().writes(8 as Weight))
+ .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
+ }
+ fn submit_solution_better(v: u32, n: u32, a: u32, w: u32, ) -> Weight {
+ (0 as Weight)
+ .saturating_add((964000 as Weight).saturating_mul(v as Weight))
+ .saturating_add((432000 as Weight).saturating_mul(n as Weight))
+ .saturating_add((204294000 as Weight).saturating_mul(a as Weight))
+ .saturating_add((9546000 as Weight).saturating_mul(w as Weight))
+ .saturating_add(T::DbWeight::get().reads(6 as Weight))
+ .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(a as Weight)))
+ .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(w as Weight)))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_timestamp.rs b/bin/node/runtime/src/weights/pallet_timestamp.rs
index cfd5f192d35298b512ee75e4d26acf11355ce3ba..9c363898b7f3b3df2620e5ea763fc8fda2deec2a 100644
--- a/bin/node/runtime/src/weights/pallet_timestamp.rs
+++ b/bin/node/runtime/src/weights/pallet_timestamp.rs
@@ -17,15 +17,16 @@
#![allow(unused_parens)]
-use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
-pub struct WeightInfo;
-impl pallet_timestamp::WeightInfo for WeightInfo {
+pub struct WeightInfo(PhantomData);
+impl pallet_timestamp::WeightInfo for WeightInfo {
// WARNING! Some components were not used: ["t"]
fn set() -> Weight {
(9133000 as Weight)
- .saturating_add(DbWeight::get().reads(2 as Weight))
- .saturating_add(DbWeight::get().writes(1 as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// WARNING! Some components were not used: ["t"]
fn on_finalize() -> Weight {
diff --git a/bin/node/runtime/src/weights/pallet_treasury.rs b/bin/node/runtime/src/weights/pallet_treasury.rs
new file mode 100644
index 0000000000000000000000000000000000000000..0bf9e6ab784c4ded672cdbd7fd4f3edd9f3b5952
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_treasury.rs
@@ -0,0 +1,141 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_treasury::WeightInfo for WeightInfo {
+ fn propose_spend() -> Weight {
+ (79604000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn reject_proposal() -> Weight {
+ (61001000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn approve_proposal() -> Weight {
+ (17835000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn report_awesome(r: u32, ) -> Weight {
+ (101602000 as Weight)
+ .saturating_add((2000 as Weight).saturating_mul(r as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ // WARNING! Some components were not used: ["r"]
+ fn retract_tip() -> Weight {
+ (82970000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn tip_new(r: u32, t: u32, ) -> Weight {
+ (63995000 as Weight)
+ .saturating_add((2000 as Weight).saturating_mul(r as Weight))
+ .saturating_add((153000 as Weight).saturating_mul(t as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn tip(t: u32, ) -> Weight {
+ (46765000 as Weight)
+ .saturating_add((711000 as Weight).saturating_mul(t as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn close_tip(t: u32, ) -> Weight {
+ (160874000 as Weight)
+ .saturating_add((379000 as Weight).saturating_mul(t as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn propose_bounty(d: u32, ) -> Weight {
+ (86198000 as Weight)
+ .saturating_add((1000 as Weight).saturating_mul(d as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
+ }
+ fn approve_bounty() -> Weight {
+ (23063000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn propose_curator() -> Weight {
+ (18890000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn unassign_curator() -> Weight {
+ (66768000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn accept_curator() -> Weight {
+ (69131000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn award_bounty() -> Weight {
+ (48184000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn claim_bounty() -> Weight {
+ (243104000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(5 as Weight))
+ }
+ fn close_bounty_proposed() -> Weight {
+ (65917000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn close_bounty_active() -> Weight {
+ (157232000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
+ }
+ fn extend_bounty_expiry() -> Weight {
+ (46216000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(1 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn on_initialize_proposals(p: u32, ) -> Weight {
+ (119765000 as Weight)
+ .saturating_add((108368000 as Weight).saturating_mul(p as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight)))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight)))
+ }
+ fn on_initialize_bounties(b: u32, ) -> Weight {
+ (112536000 as Weight)
+ .saturating_add((107132000 as Weight).saturating_mul(b as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight)))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))
+ }
+}
diff --git a/bin/node/runtime/src/weights/pallet_utility.rs b/bin/node/runtime/src/weights/pallet_utility.rs
index c9ae0d7d2333b19bec65e4f5c1556df65b21e086..2c508ed6cd42d6f0b89c41c811ad88545c4b2f6c 100644
--- a/bin/node/runtime/src/weights/pallet_utility.rs
+++ b/bin/node/runtime/src/weights/pallet_utility.rs
@@ -20,10 +20,11 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
-use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
-pub struct WeightInfo;
-impl pallet_utility::WeightInfo for WeightInfo {
+pub struct WeightInfo(PhantomData);
+impl pallet_utility::WeightInfo for WeightInfo {
fn batch(c: u32, ) -> Weight {
(16461000 as Weight)
.saturating_add((1982000 as Weight).saturating_mul(c as Weight))
diff --git a/bin/node/runtime/src/weights/pallet_vesting.rs b/bin/node/runtime/src/weights/pallet_vesting.rs
new file mode 100644
index 0000000000000000000000000000000000000000..ac63b0177b81cfae6b675adacea0ffb184f2640e
--- /dev/null
+++ b/bin/node/runtime/src/weights/pallet_vesting.rs
@@ -0,0 +1,64 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
+
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+
+use frame_support::{traits::Get, weights::Weight};
+use sp_std::marker::PhantomData;
+
+pub struct WeightInfo(PhantomData);
+impl pallet_vesting::WeightInfo for WeightInfo {
+ fn vest_locked(l: u32, ) -> Weight {
+ (82109000 as Weight)
+ .saturating_add((332000 as Weight).saturating_mul(l as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
+ }
+ fn vest_unlocked(l: u32, ) -> Weight {
+ (88419000 as Weight)
+ .saturating_add((3000 as Weight).saturating_mul(l as Weight))
+ .saturating_add(T::DbWeight::get().reads(2 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn vest_other_locked(l: u32, ) -> Weight {
+ (81277000 as Weight)
+ .saturating_add((321000 as Weight).saturating_mul(l as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
+ }
+ fn vest_other_unlocked(l: u32, ) -> Weight {
+ (87584000 as Weight)
+ .saturating_add((19000 as Weight).saturating_mul(l as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn vested_transfer(l: u32, ) -> Weight {
+ (185916000 as Weight)
+ .saturating_add((625000 as Weight).saturating_mul(l as Weight))
+ .saturating_add(T::DbWeight::get().reads(3 as Weight))
+ .saturating_add(T::DbWeight::get().writes(3 as Weight))
+ }
+ fn force_vested_transfer(l: u32, ) -> Weight {
+ (185916000 as Weight)
+ .saturating_add((625000 as Weight).saturating_mul(l as Weight))
+ .saturating_add(T::DbWeight::get().reads(4 as Weight))
+ .saturating_add(T::DbWeight::get().writes(4 as Weight))
+ }
+}
diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml
index 23bf10336dcfee229e59e3479a573baadc442763..3b541b696815b2837755b8e6533e1f04c730c6ef 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-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
description = "Test utilities for Substrate node."
edition = "2018"
@@ -13,40 +13,39 @@ publish = true
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-pallet-balances = { version = "2.0.0-rc6", path = "../../../frame/balances" }
-sc-service = { version = "0.8.0-rc6", features = ["test-helpers", "db"], path = "../../../client/service" }
-sc-client-db = { version = "0.8.0-rc6", path = "../../../client/db/", features = ["kvdb-rocksdb", "parity-db"] }
-sc-client-api = { version = "2.0.0-rc6", path = "../../../client/api/" }
+pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
+sc-service = { version = "0.8.0", features = ["test-helpers", "db"], path = "../../../client/service" }
+sc-client-db = { version = "0.8.0", path = "../../../client/db/", features = ["kvdb-rocksdb", "parity-db"] }
+sc-client-api = { version = "2.0.0", path = "../../../client/api/" }
codec = { package = "parity-scale-codec", version = "1.3.4" }
-pallet-contracts = { version = "2.0.0-rc6", path = "../../../frame/contracts" }
-pallet-grandpa = { version = "2.0.0-rc6", path = "../../../frame/grandpa" }
-pallet-indices = { version = "2.0.0-rc6", path = "../../../frame/indices" }
-sp-keyring = { version = "2.0.0-rc6", path = "../../../primitives/keyring" }
-node-executor = { version = "2.0.0-rc6", path = "../executor" }
-node-primitives = { version = "2.0.0-rc6", path = "../primitives" }
-node-runtime = { version = "2.0.0-rc6", path = "../runtime" }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
-sp-io = { version = "2.0.0-rc6", path = "../../../primitives/io" }
-frame-support = { version = "2.0.0-rc6", path = "../../../frame/support" }
-pallet-session = { version = "2.0.0-rc6", path = "../../../frame/session" }
-pallet-society = { version = "2.0.0-rc6", path = "../../../frame/society" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../../primitives/runtime" }
-pallet-staking = { version = "2.0.0-rc6", path = "../../../frame/staking" }
-sc-executor = { version = "0.8.0-rc6", path = "../../../client/executor", features = ["wasmtime"] }
-sp-consensus = { version = "0.8.0-rc6", path = "../../../primitives/consensus/common" }
-frame-system = { version = "2.0.0-rc6", path = "../../../frame/system" }
-substrate-test-client = { version = "2.0.0-rc6", path = "../../../test-utils/client" }
-pallet-timestamp = { version = "2.0.0-rc6", path = "../../../frame/timestamp" }
-pallet-transaction-payment = { version = "2.0.0-rc6", path = "../../../frame/transaction-payment" }
-pallet-treasury = { version = "2.0.0-rc6", path = "../../../frame/treasury" }
-wabt = "0.9.2"
-sp-api = { version = "2.0.0-rc6", path = "../../../primitives/api" }
-sp-finality-tracker = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/finality-tracker" }
-sp-timestamp = { version = "2.0.0-rc6", default-features = false, path = "../../../primitives/timestamp" }
-sp-block-builder = { version = "2.0.0-rc6", path = "../../../primitives/block-builder" }
-sc-block-builder = { version = "0.8.0-rc6", path = "../../../client/block-builder" }
-sp-inherents = { version = "2.0.0-rc6", path = "../../../primitives/inherents" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../../primitives/blockchain" }
+pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
+pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
+pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
+sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" }
+node-executor = { version = "2.0.0", path = "../executor" }
+node-primitives = { version = "2.0.0", path = "../primitives" }
+node-runtime = { version = "2.0.0", path = "../runtime" }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
+sp-io = { version = "2.0.0", path = "../../../primitives/io" }
+frame-support = { version = "2.0.0", path = "../../../frame/support" }
+pallet-session = { version = "2.0.0", path = "../../../frame/session" }
+pallet-society = { version = "2.0.0", path = "../../../frame/society" }
+sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
+pallet-staking = { version = "2.0.0", path = "../../../frame/staking" }
+sc-executor = { version = "0.8.0", path = "../../../client/executor", features = ["wasmtime"] }
+sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" }
+frame-system = { version = "2.0.0", path = "../../../frame/system" }
+substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
+pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
+pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
+pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
+sp-api = { version = "2.0.0", path = "../../../primitives/api" }
+sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
+sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
+sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" }
+sc-block-builder = { version = "0.8.0", path = "../../../client/block-builder" }
+sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
+sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
log = "0.4.8"
tempfile = "3.1.0"
fs_extra = "1"
@@ -54,4 +53,4 @@ futures = "0.3.1"
[dev-dependencies]
criterion = "0.3.0"
-sc-cli = { version = "0.8.0-rc6", path = "../../../client/cli" }
+sc-cli = { version = "0.8.0", path = "../../../client/cli" }
diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml
index f6d03d4f3d107ce268f2d84efce197cdd1688659..da455e3ec4a6c01a3e72ccf78d09cb99fb1ac1be 100644
--- a/bin/utils/chain-spec-builder/Cargo.toml
+++ b/bin/utils/chain-spec-builder/Cargo.toml
@@ -1,21 +1,22 @@
[package]
name = "chain-spec-builder"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
build = "build.rs"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
+readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
ansi_term = "0.12.1"
-sc-keystore = { version = "2.0.0-rc6", path = "../../../client/keystore" }
-sc-chain-spec = { version = "2.0.0-rc6", path = "../../../client/chain-spec" }
-node-cli = { version = "2.0.0-rc6", path = "../../node/cli" }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
+sc-keystore = { version = "2.0.0", path = "../../../client/keystore" }
+sc-chain-spec = { version = "2.0.0", path = "../../../client/chain-spec" }
+node-cli = { version = "2.0.0", path = "../../node/cli" }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
rand = "0.7.2"
structopt = "0.3.8"
diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml
index 0dc1a1b5970c90a22a8a569d3a2e4b072d48ae93..fa0b345bc8406f2f4ea33228276fdb712b1b4845 100644
--- a/bin/utils/subkey/Cargo.toml
+++ b/bin/utils/subkey/Cargo.toml
@@ -1,11 +1,12 @@
[package]
name = "subkey"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
+readme = "README.md"
[[bin]]
path = "src/main.rs"
@@ -15,13 +16,13 @@ name = "subkey"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-node-runtime = { version = "2.0.0-rc6", path = "../../node/runtime" }
-node-primitives = { version = "2.0.0-rc6", path = "../../node/primitives" }
-sc-cli = { version = "0.8.0-rc6", path = "../../../client/cli" }
-substrate-frame-cli = { version = "2.0.0-rc6", path = "../../../utils/frame/frame-utilities-cli" }
+node-runtime = { version = "2.0.0", path = "../../node/runtime" }
+node-primitives = { version = "2.0.0", path = "../../node/primitives" }
+sc-cli = { version = "0.8.0", path = "../../../client/cli" }
+substrate-frame-cli = { version = "2.0.0", path = "../../../utils/frame/frame-utilities-cli" }
structopt = "0.3.14"
-frame-system = { version = "2.0.0-rc6", path = "../../../frame/system" }
-sp-core = { version = "2.0.0-rc6", path = "../../../primitives/core" }
+frame-system = { version = "2.0.0", path = "../../../frame/system" }
+sp-core = { version = "2.0.0", path = "../../../primitives/core" }
[features]
bench = []
diff --git a/bin/utils/subkey/src/lib.rs b/bin/utils/subkey/src/lib.rs
index bb89541d5b14edda65747109f1a8e153e7dfd368..051628e84a193419221d0eccd04f797dc2b56a23 100644
--- a/bin/utils/subkey/src/lib.rs
+++ b/bin/utils/subkey/src/lib.rs
@@ -31,14 +31,15 @@ use sp_core::crypto::Ss58Codec;
about = "Utility for generating and restoring with Substrate keys",
)]
pub enum Subkey {
- /// Generate a random node libp2p key, save it to file and print its peer ID
+ /// Generate a random node libp2p key, save it to file or print it to stdout
+ /// and print its peer ID to stderr.
GenerateNodeKey(GenerateNodeKeyCmd),
/// Generate a random account
Generate(GenerateCmd),
/// Gets a public key and a SS58 address from the provided Secret URI
- InspectKey(InspectKeyCmd),
+ Inspect(InspectKeyCmd),
/// Print the peer ID corresponding to the node key in the given file
InspectNodeKey(InspectNodeKeyCmd),
@@ -68,7 +69,7 @@ pub fn run() -> Result<(), Error>
match Subkey::from_args() {
Subkey::GenerateNodeKey(cmd) => cmd.run()?,
Subkey::Generate(cmd) => cmd.run()?,
- Subkey::InspectKey(cmd) => cmd.run()?,
+ Subkey::Inspect(cmd) => cmd.run()?,
Subkey::InspectNodeKey(cmd) => cmd.run()?,
Subkey::Insert(cmd) => cmd.run()?,
Subkey::ModuleId(cmd) => cmd.run::()?,
diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml
index 8f31e831bebac62d72c2964ea882b95e6040a1f5..1b8240a4b002683cc2400b7a4fda3761cfa066dc 100644
--- a/client/api/Cargo.toml
+++ b/client/api/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sc-client-api"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
@@ -8,42 +8,43 @@ homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
description = "Substrate client interfaces."
documentation = "https://docs.rs/sc-client-api"
+readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
-sp-consensus = { version = "0.8.0-rc6", path = "../../primitives/consensus/common" }
+sp-consensus = { version = "0.8.0", path = "../../primitives/consensus/common" }
derive_more = "0.99.2"
-sc-executor = { version = "0.8.0-rc6", path = "../executor" }
-sp-externalities = { version = "0.8.0-rc6", path = "../../primitives/externalities" }
+sc-executor = { version = "0.8.0", path = "../executor" }
+sp-externalities = { version = "0.8.0", path = "../../primitives/externalities" }
fnv = "1.0.6"
futures = "0.3.1"
hash-db = { version = "0.15.2", default-features = false }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../primitives/blockchain" }
+sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
hex-literal = "0.3.1"
-sp-inherents = { version = "2.0.0-rc6", default-features = false, path = "../../primitives/inherents" }
-sp-keyring = { version = "2.0.0-rc6", path = "../../primitives/keyring" }
+sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" }
+sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" }
kvdb = "0.7.0"
log = "0.4.8"
parking_lot = "0.10.0"
lazy_static = "1.4.0"
-sp-database = { version = "2.0.0-rc6", path = "../../primitives/database" }
-sp-core = { version = "2.0.0-rc6", default-features = false, path = "../../primitives/core" }
-sp-std = { version = "2.0.0-rc6", default-features = false, path = "../../primitives/std" }
-sp-version = { version = "2.0.0-rc6", default-features = false, path = "../../primitives/version" }
-sp-api = { version = "2.0.0-rc6", path = "../../primitives/api" }
-sp-utils = { version = "2.0.0-rc6", path = "../../primitives/utils" }
-sp-runtime = { version = "2.0.0-rc6", default-features = false, path = "../../primitives/runtime" }
-sp-state-machine = { version = "0.8.0-rc6", path = "../../primitives/state-machine" }
-sc-telemetry = { version = "2.0.0-rc6", path = "../telemetry" }
-sp-trie = { version = "2.0.0-rc6", path = "../../primitives/trie" }
-sp-storage = { version = "2.0.0-rc6", path = "../../primitives/storage" }
-sp-transaction-pool = { version = "2.0.0-rc6", path = "../../primitives/transaction-pool" }
-prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0-rc6", path = "../../utils/prometheus" }
+sp-database = { version = "2.0.0", path = "../../primitives/database" }
+sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" }
+sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }
+sp-version = { version = "2.0.0", default-features = false, path = "../../primitives/version" }
+sp-api = { version = "2.0.0", path = "../../primitives/api" }
+sp-utils = { version = "2.0.0", path = "../../primitives/utils" }
+sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" }
+sp-state-machine = { version = "0.8.0", path = "../../primitives/state-machine" }
+sc-telemetry = { version = "2.0.0", path = "../telemetry" }
+sp-trie = { version = "2.0.0", path = "../../primitives/trie" }
+sp-storage = { version = "2.0.0", path = "../../primitives/storage" }
+sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" }
+prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0", path = "../../utils/prometheus" }
[dev-dependencies]
kvdb-memorydb = "0.7.0"
-sp-test-primitives = { version = "2.0.0-rc6", path = "../../primitives/test-primitives" }
-substrate-test-runtime = { version = "2.0.0-rc6", path = "../../test-utils/runtime" }
+sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }
+substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml
index 8c898ab4964223d427e917521291e492d81c5fe2..d611554edc123687cebf22f6fe2739ca7bf88cd7 100644
--- a/client/authority-discovery/Cargo.toml
+++ b/client/authority-discovery/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sc-authority-discovery"
-version = "0.8.0-rc6"
+version = "0.8.0"
authors = ["Parity Technologies "]
edition = "2018"
build = "build.rs"
@@ -8,6 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
description = "Substrate authority discovery."
+readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
@@ -22,23 +23,23 @@ derive_more = "0.99.2"
either = "1.5.3"
futures = "0.3.4"
futures-timer = "3.0.1"
-libp2p = { version = "0.24.0", default-features = false, features = ["kad"] }
+libp2p = { version = "0.28.1", default-features = false, features = ["kad"] }
log = "0.4.8"
-prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-rc6"}
+prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0"}
prost = "0.6.1"
rand = "0.7.2"
-sc-client-api = { version = "2.0.0-rc6", path = "../api" }
-sc-keystore = { version = "2.0.0-rc6", path = "../keystore" }
-sc-network = { version = "0.8.0-rc6", path = "../network" }
+sc-client-api = { version = "2.0.0", path = "../api" }
+sc-keystore = { version = "2.0.0", path = "../keystore" }
+sc-network = { version = "0.8.0", path = "../network" }
serde_json = "1.0.41"
-sp-authority-discovery = { version = "2.0.0-rc6", path = "../../primitives/authority-discovery" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../primitives/blockchain" }
-sp-core = { version = "2.0.0-rc6", path = "../../primitives/core" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../primitives/runtime" }
-sp-api = { version = "2.0.0-rc6", path = "../../primitives/api" }
+sp-authority-discovery = { version = "2.0.0", path = "../../primitives/authority-discovery" }
+sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
+sp-core = { version = "2.0.0", path = "../../primitives/core" }
+sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
+sp-api = { version = "2.0.0", path = "../../primitives/api" }
[dev-dependencies]
-env_logger = "0.7.0"
quickcheck = "0.9.0"
-sc-peerset = { version = "2.0.0-rc6", path = "../peerset" }
-substrate-test-runtime-client = { version = "2.0.0-rc6", path = "../../test-utils/runtime/client"}
+sp-tracing = { version = "2.0.0", path = "../../primitives/tracing" }
+sc-peerset = { version = "2.0.0", path = "../peerset" }
+substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client"}
diff --git a/client/authority-discovery/src/error.rs b/client/authority-discovery/src/error.rs
index b1358485c37eeb25edd77d1c5273a8f1316dcaf2..48bcdf33114b11d33e9331a8b7c221350b8d105b 100644
--- a/client/authority-discovery/src/error.rs
+++ b/client/authority-discovery/src/error.rs
@@ -34,10 +34,8 @@ pub enum Error {
HashingAuthorityId(libp2p::core::multiaddr::multihash::EncodeError),
/// Failed calling into the Substrate runtime.
CallingRuntime(sp_blockchain::Error),
- /// From the Dht we only get the hashed authority id. In order to retrieve the actual authority id and to ensure it
- /// is actually an authority, we match the hash against the hash of the authority id of all other authorities. This
- /// error is the result of the above failing.
- MatchingHashedAuthorityIdWithAuthorityId,
+ /// Received a dht record with a key that does not match any in-flight awaited keys.
+ ReceivingUnexpectedRecord,
/// Failed to set the authority discovery peerset priority group in the peerset module.
SettingPeersetPriorityGroup(String),
/// Failed to encode a protobuf payload.
diff --git a/client/authority-discovery/src/service.rs b/client/authority-discovery/src/service.rs
index 01fb7134fb5d1b6958b13e464fa60e4a2b622331..ed0205d262fc60934c50bb04f0a17dd8f50c2e5e 100644
--- a/client/authority-discovery/src/service.rs
+++ b/client/authority-discovery/src/service.rs
@@ -37,12 +37,18 @@ impl Service {
}
}
- /// Get the addresses for the given [`AuthorityId`] from the local address cache.
+ /// Get the addresses for the given [`AuthorityId`] from the local address
+ /// cache.
///
- /// Returns `None` if no entry was present or connection to the [`crate::Worker`] failed.
+ /// Returns `None` if no entry was present or connection to the
+ /// [`crate::Worker`] failed.
///
- /// [`Multiaddr`]s returned always include a [`libp2p::core::multiaddr:Protocol::P2p`]
- /// component.
+ /// [`Multiaddr`]s returned always include a [`PeerId`] via a
+ /// [`libp2p::core::multiaddr:Protocol::P2p`] component. [`Multiaddr`]s
+ /// might differ in their [`PeerId`], e.g. when each [`Multiaddr`]
+ /// represents a different sentry node. This might change once support for
+ /// sentry nodes is removed (see
+ /// https://github.com/paritytech/substrate/issues/6845).
pub async fn get_addresses_by_authority_id(&mut self, authority: AuthorityId) -> Option> {
let (tx, rx) = oneshot::channel();
@@ -54,9 +60,11 @@ impl Service {
rx.await.ok().flatten()
}
- /// Get the [`AuthorityId`] for the given [`PeerId`] from the local address cache.
+ /// Get the [`AuthorityId`] for the given [`PeerId`] from the local address
+ /// cache.
///
- /// Returns `None` if no entry was present or connection to the [`crate::Worker`] failed.
+ /// Returns `None` if no entry was present or connection to the
+ /// [`crate::Worker`] failed.
pub async fn get_authority_id_by_peer_id(&mut self, peer_id: PeerId) -> Option {
let (tx, rx) = oneshot::channel();
diff --git a/client/authority-discovery/src/worker.rs b/client/authority-discovery/src/worker.rs
index 232e59d08dd7823341a0d58d0633739797426c9c..ff4d12dadd98871a23a94a4a2925b069dea39077 100644
--- a/client/authority-discovery/src/worker.rs
+++ b/client/authority-discovery/src/worker.rs
@@ -35,6 +35,7 @@ use libp2p::{core::multiaddr, multihash::Multihash};
use log::{debug, error, log_enabled};
use prometheus_endpoint::{Counter, CounterVec, Gauge, Opts, U64, register};
use prost::Message;
+use rand::{seq::SliceRandom, thread_rng};
use sc_client_api::blockchain::HeaderBackend;
use sc_network::{
config::MultiaddrWithPeerId,
@@ -70,6 +71,9 @@ const AUTHORITIES_PRIORITY_GROUP_NAME: &'static str = "authorities";
/// Maximum number of addresses cached per authority. Additional addresses are discarded.
const MAX_ADDRESSES_PER_AUTHORITY: usize = 10;
+/// Maximum number of in-flight DHT lookups at any given point in time.
+const MAX_IN_FLIGHT_LOOKUPS: usize = 8;
+
/// Role an authority discovery module can run as.
pub enum Role {
/// Actual authority as well as a reference to its key store.
@@ -99,7 +103,7 @@ pub enum Role {
///
/// 2. **Discovers other authorities**
///
-/// 1. Retrieves the current set of authorities.
+/// 1. Retrieves the current and next set of authorities.
///
/// 2. Starts DHT queries for the ids of the authorities.
///
@@ -137,12 +141,17 @@ where
/// Interval to be proactive, publishing own addresses.
publish_interval: Interval,
- /// Interval on which to query for addresses of other authorities.
+ /// Interval at which to request addresses of authorities, refilling the pending lookups queue.
query_interval: Interval,
/// Interval on which to set the peerset priority group to a new random
/// set of addresses.
priority_group_set_interval: Interval,
+ /// Queue of throttled lookups pending to be passed to the network.
+ pending_lookups: Vec,
+ /// Set of in-flight lookups.
+ in_flight_lookups: HashMap,
+
addr_cache: addr_cache::AddrCache,
metrics: Option,
@@ -183,8 +192,8 @@ where
Duration::from_secs(12 * 60 * 60),
);
- // External addresses of other authorities can change at any given point in time. The
- // interval on which to query for external addresses of other authorities is a trade off
+ // External addresses of remote authorities can change at any given point in time. The
+ // interval on which to trigger new queries for the current authorities is a trade off
// between efficiency and performance.
let query_interval_start = Instant::now() + LIBP2P_KADEMLIA_BOOTSTRAP_TIME;
let query_interval_duration = Duration::from_secs(10 * 60);
@@ -193,9 +202,9 @@ where
// Querying 500 [`AuthorityId`]s takes ~1m on the Kusama DHT (10th of August 2020) when
// comparing `authority_discovery_authority_addresses_requested_total` and
// `authority_discovery_dht_event_received`. With that in mind set the peerset priority
- // group on the same interval as the [`query_interval`] above, just delayed by 2 minutes.
+ // group on the same interval as the [`query_interval`] above, just delayed by 5 minutes.
let priority_group_set_interval = interval_at(
- query_interval_start + Duration::from_secs(2 * 60),
+ query_interval_start + Duration::from_secs(5 * 60),
query_interval_duration,
);
@@ -229,6 +238,8 @@ where
publish_interval,
query_interval,
priority_group_set_interval,
+ pending_lookups: Vec::new(),
+ in_flight_lookups: HashMap::new(),
addr_cache,
role,
metrics,
@@ -270,7 +281,9 @@ where
if let Some(metrics) = &self.metrics {
metrics.publish.inc();
- metrics.amount_last_published.set(addresses.len() as u64);
+ metrics.amount_addresses_last_published.set(
+ addresses.len().try_into().unwrap_or(std::u64::MAX),
+ );
}
let mut serialized_addresses = vec![];
@@ -314,15 +327,9 @@ where
Ok(())
}
- fn request_addresses_of_others(&mut self) -> Result<()> {
+ fn refill_pending_lookups_queue(&mut self) -> Result<()> {
let id = BlockId::hash(self.client.info().best_hash);
- let authorities = self
- .client
- .runtime_api()
- .authorities(&id)
- .map_err(Error::CallingRuntime)?;
-
let local_keys = match &self.role {
Role::Authority(key_store) => {
key_store.read()
@@ -333,21 +340,52 @@ where
Role::Sentry => HashSet::new(),
};
- for authority_id in authorities.iter() {
- // Make sure we don't look up our own keys.
- if !local_keys.contains(authority_id.as_ref()) {
- if let Some(metrics) = &self.metrics {
- metrics.request.inc();
- }
+ let mut authorities = self
+ .client
+ .runtime_api()
+ .authorities(&id)
+ .map_err(Error::CallingRuntime)?
+ .into_iter()
+ .filter(|id| !local_keys.contains(id.as_ref()))
+ .collect();
- self.network
- .get_value(&hash_authority_id(authority_id.as_ref()));
- }
+ self.addr_cache.retain_ids(&authorities);
+
+ authorities.shuffle(&mut thread_rng());
+ self.pending_lookups = authorities;
+ // Ignore all still in-flight lookups. Those that are still in-flight are likely stalled as
+ // query interval ticks are far enough apart for all lookups to succeed.
+ self.in_flight_lookups.clear();
+
+ if let Some(metrics) = &self.metrics {
+ metrics.requests_pending.set(
+ self.pending_lookups.len().try_into().unwrap_or(std::u64::MAX),
+ );
}
Ok(())
}
+ fn start_new_lookups(&mut self) {
+ while self.in_flight_lookups.len() < MAX_IN_FLIGHT_LOOKUPS {
+ let authority_id = match self.pending_lookups.pop() {
+ Some(authority) => authority,
+ None => return,
+ };
+ let hash = hash_authority_id(authority_id.as_ref());
+ self.network
+ .get_value(&hash);
+ self.in_flight_lookups.insert(hash, authority_id);
+
+ if let Some(metrics) = &self.metrics {
+ metrics.requests.inc();
+ metrics.requests_pending.set(
+ self.pending_lookups.len().try_into().unwrap_or(std::u64::MAX),
+ );
+ }
+ }
+ }
+
/// Handle incoming Dht events.
///
/// Returns either:
@@ -385,10 +423,17 @@ where
metrics.dht_event_received.with_label_values(&["value_not_found"]).inc();
}
- debug!(
- target: LOG_TARGET,
- "Value for hash '{:?}' not found on Dht.", hash
- )
+ if self.in_flight_lookups.remove(&hash).is_some() {
+ debug!(
+ target: LOG_TARGET,
+ "Value for hash '{:?}' not found on Dht.", hash
+ )
+ } else {
+ debug!(
+ target: LOG_TARGET,
+ "Received 'ValueNotFound' for unexpected hash '{:?}'.", hash
+ )
+ }
},
Some(DhtEvent::ValuePut(hash)) => {
if let Some(metrics) = &self.metrics {
@@ -434,23 +479,9 @@ where
}
})?.ok_or(Error::ReceivingDhtValueFoundEventWithNoRecords)?;
- let authorities = {
- let block_id = BlockId::hash(self.client.info().best_hash);
- // From the Dht we only get the hashed authority id. In order to retrieve the actual
- // authority id and to ensure it is actually an authority, we match the hash against the
- // hash of the authority id of all other authorities.
- let authorities = self.client.runtime_api().authorities(&block_id)?;
- self.addr_cache.retain_ids(&authorities);
- authorities
- .into_iter()
- .map(|id| (hash_authority_id(id.as_ref()), id))
- .collect::>()
- };
-
- // Check if the event origins from an authority in the current authority set.
- let authority_id: &AuthorityId = authorities
- .get(&remote_key)
- .ok_or(Error::MatchingHashedAuthorityIdWithAuthorityId)?;
+ let authority_id: AuthorityId = self.in_flight_lookups
+ .remove(&remote_key)
+ .ok_or(Error::ReceivingUnexpectedRecord)?;
let local_peer_id = self.network.local_peer_id();
@@ -463,7 +494,7 @@ where
let signature = AuthoritySignature::decode(&mut &signature[..])
.map_err(Error::EncodingDecodingScale)?;
- if !AuthorityPair::verify(&signature, &addresses, authority_id) {
+ if !AuthorityPair::verify(&signature, &addresses, &authority_id) {
return Err(Error::VerifyingDhtPayload);
}
@@ -503,7 +534,7 @@ where
.collect();
if !remote_addresses.is_empty() {
- self.addr_cache.insert(authority_id.clone(), remote_addresses);
+ self.addr_cache.insert(authority_id, remote_addresses);
if let Some(metrics) = &self.metrics {
metrics.known_authorities_count.set(
self.addr_cache.num_ids().try_into().unwrap_or(std::u64::MAX)
@@ -514,12 +545,12 @@ where
Ok(())
}
- /// Retrieve our public keys within the current authority set.
+ /// Retrieve our public keys within the current and next authority set.
//
// A node might have multiple authority discovery keys within its keystore, e.g. an old one and
- // one for the upcoming session. In addition it could be participating in the current authority
- // set with two keys. The function does not return all of the local authority discovery public
- // keys, but only the ones intersecting with the current authority set.
+ // one for the upcoming session. In addition it could be participating in the current and (/ or)
+ // next authority set with two keys. The function does not return all of the local authority
+ // discovery public keys, but only the ones intersecting with the current or next authority set.
fn get_own_public_keys_within_authority_set(
key_store: &BareCryptoStorePtr,
client: &Client,
@@ -530,14 +561,14 @@ where
.collect::>();
let id = BlockId::hash(client.info().best_hash);
- let current_authorities = client.runtime_api()
+ let authorities = client.runtime_api()
.authorities(&id)
.map_err(Error::CallingRuntime)?
.into_iter()
.map(std::convert::Into::into)
.collect::>();
- let intersection = local_pub_keys.intersection(¤t_authorities)
+ let intersection = local_pub_keys.intersection(&authorities)
.cloned()
.map(std::convert::Into::into)
.collect();
@@ -610,15 +641,15 @@ where
}
}
- // Request addresses of authorities.
+ // Request addresses of authorities, refilling the pending lookups queue.
if let Poll::Ready(_) = self.query_interval.poll_next_unpin(cx) {
// Register waker of underlying task for next interval.
while let Poll::Ready(_) = self.query_interval.poll_next_unpin(cx) {}
- if let Err(e) = self.request_addresses_of_others() {
+ if let Err(e) = self.refill_pending_lookups_queue() {
error!(
target: LOG_TARGET,
- "Failed to request addresses of authorities: {:?}", e,
+ "Failed to refill pending lookups queue: {:?}", e,
);
}
}
@@ -652,6 +683,8 @@ where
}
}
+ self.start_new_lookups();
+
Poll::Pending
}
}
@@ -712,8 +745,9 @@ fn interval_at(start: Instant, duration: Duration) -> Interval {
#[derive(Clone)]
pub(crate) struct Metrics {
publish: Counter,
- amount_last_published: Gauge,
- request: Counter,
+ amount_addresses_last_published: Gauge,
+ requests: Counter,
+ requests_pending: Gauge,
dht_event_received: CounterVec,
handle_value_found_event_failure: Counter,
known_authorities_count: Gauge,
@@ -730,7 +764,7 @@ impl Metrics {
)?,
registry,
)?,
- amount_last_published: register(
+ amount_addresses_last_published: register(
Gauge::new(
"authority_discovery_amount_external_addresses_last_published",
"Number of external addresses published when authority discovery last \
@@ -738,7 +772,7 @@ impl Metrics {
)?,
registry,
)?,
- request: register(
+ requests: register(
Counter::new(
"authority_discovery_authority_addresses_requested_total",
"Number of times authority discovery has requested external addresses of a \
@@ -746,6 +780,13 @@ impl Metrics {
)?,
registry,
)?,
+ requests_pending: register(
+ Gauge::new(
+ "authority_discovery_authority_address_requests_pending",
+ "Number of pending authority address requests."
+ )?,
+ registry,
+ )?,
dht_event_received: register(
CounterVec::new(
Opts::new(
diff --git a/client/authority-discovery/src/worker/tests.rs b/client/authority-discovery/src/worker/tests.rs
index baa6bd0fc7d6273e0d148c26175d6a70c5aa6f48..f7b7dc41fee40a857bd7c3f5cc6db9fce0e589f9 100644
--- a/client/authority-discovery/src/worker/tests.rs
+++ b/client/authority-discovery/src/worker/tests.rs
@@ -221,6 +221,41 @@ impl NetworkStateInfo for TestNetwork {
}
}
+fn build_dht_event(
+ addresses: Vec,
+ public_key: AuthorityId,
+ key_store: &BareCryptoStorePtr,
+) -> (libp2p::kad::record::Key, Vec) {
+ let mut serialized_addresses = vec![];
+ schema::AuthorityAddresses {
+ addresses: addresses.into_iter().map(|a| a.to_vec()).collect()
+ }.encode(&mut serialized_addresses)
+ .map_err(Error::EncodingProto)
+ .unwrap();
+
+ let signature = key_store.read()
+ .sign_with(
+ key_types::AUTHORITY_DISCOVERY,
+ &public_key.clone().into(),
+ serialized_addresses.as_slice(),
+ )
+ .map_err(|_| Error::Signing)
+ .unwrap();
+
+ let mut signed_addresses = vec![];
+ schema::SignedAuthorityAddresses {
+ addresses: serialized_addresses.clone(),
+ signature,
+ }
+ .encode(&mut signed_addresses)
+ .map_err(Error::EncodingProto)
+ .unwrap();
+
+ let key = hash_authority_id(&public_key.to_raw_vec());
+ let value = signed_addresses;
+ (key, value)
+}
+
#[test]
fn new_registers_metrics() {
let (_dht_event_tx, dht_event_rx) = channel(1000);
@@ -247,8 +282,8 @@ fn new_registers_metrics() {
}
#[test]
-fn request_addresses_of_others_triggers_dht_get_query() {
- let _ = ::env_logger::try_init();
+fn triggers_dht_get_query() {
+ sp_tracing::try_init_simple();
let (_dht_event_tx, dht_event_rx) = channel(1000);
// Generate authority keys
@@ -262,7 +297,6 @@ fn request_addresses_of_others_triggers_dht_get_query() {
let network: Arc = Arc::new(Default::default());
let key_store = KeyStore::new();
-
let (_to_worker, from_service) = mpsc::channel(0);
let mut worker = Worker::new(
from_service,
@@ -274,7 +308,12 @@ fn request_addresses_of_others_triggers_dht_get_query() {
None,
);
- worker.request_addresses_of_others().unwrap();
+ worker.refill_pending_lookups_queue().unwrap();
+
+ futures::executor::block_on(futures::future::poll_fn(|cx| {
+ assert_eq!(Poll::Pending, worker.poll_unpin(cx));
+ Poll::Ready(())
+ }));
// Expect authority discovery to request new records from the dht.
assert_eq!(network.get_value_call.lock().unwrap().len(), 2);
@@ -282,7 +321,7 @@ fn request_addresses_of_others_triggers_dht_get_query() {
#[test]
fn publish_discover_cycle() {
- let _ = ::env_logger::try_init();
+ sp_tracing::try_init_simple();
// Node A publishing its address.
@@ -352,6 +391,9 @@ fn publish_discover_cycle() {
dht_event_tx.try_send(dht_event).unwrap();
let f = |cx: &mut Context<'_>| -> Poll<()> {
+ worker.refill_pending_lookups_queue().unwrap();
+ worker.start_new_lookups();
+
// Make authority discovery handle the event.
if let Poll::Ready(e) = worker.handle_dht_events(cx) {
panic!("Unexpected error: {:?}", e);
@@ -547,40 +589,11 @@ fn never_add_own_address_to_priority_group() {
))
};
- let dht_event = {
- let addresses = vec![
- sentry_multiaddr.to_vec(),
- random_multiaddr.to_vec(),
- ];
-
- let mut serialized_addresses = vec![];
- schema::AuthorityAddresses { addresses }
- .encode(&mut serialized_addresses)
- .map_err(Error::EncodingProto)
- .unwrap();
-
- let signature = validator_key_store.read()
- .sign_with(
- key_types::AUTHORITY_DISCOVERY,
- &validator_public.clone().into(),
- serialized_addresses.as_slice(),
- )
- .map_err(|_| Error::Signing)
- .unwrap();
-
- let mut signed_addresses = vec![];
- schema::SignedAuthorityAddresses {
- addresses: serialized_addresses.clone(),
- signature,
- }
- .encode(&mut signed_addresses)
- .map_err(Error::EncodingProto)
- .unwrap();
-
- let key = hash_authority_id(&validator_public.to_raw_vec());
- let value = signed_addresses;
- (key, value)
- };
+ let dht_event = build_dht_event(
+ vec![sentry_multiaddr, random_multiaddr.clone()],
+ validator_public.into(),
+ &validator_key_store,
+ );
let (_dht_event_tx, dht_event_rx) = channel(1);
let sentry_test_api = Arc::new(TestApi {
@@ -599,6 +612,9 @@ fn never_add_own_address_to_priority_group() {
None,
);
+ sentry_worker.refill_pending_lookups_queue().unwrap();
+ sentry_worker.start_new_lookups();
+
sentry_worker.handle_dht_value_found_event(vec![dht_event]).unwrap();
sentry_worker.set_priority_group().unwrap();
@@ -625,43 +641,19 @@ fn limit_number_of_addresses_added_to_cache_per_authority() {
.sr25519_generate_new(key_types::AUTHORITY_DISCOVERY, None)
.unwrap();
- let dht_event = {
- let addresses = (0..100).map(|_| {
- let peer_id = PeerId::random();
- let address: Multiaddr = "/ip6/2001:db8:0:0:0:0:0:1/tcp/30333".parse().unwrap();
- address.with(multiaddr::Protocol::P2p(
- peer_id.into(),
- )).to_vec()
- }).collect();
-
- let mut serialized_addresses = vec![];
- schema::AuthorityAddresses { addresses }
- .encode(&mut serialized_addresses)
- .map_err(Error::EncodingProto)
- .unwrap();
-
- let signature = remote_key_store.read()
- .sign_with(
- key_types::AUTHORITY_DISCOVERY,
- &remote_public.clone().into(),
- serialized_addresses.as_slice(),
- )
- .map_err(|_| Error::Signing)
- .unwrap();
-
- let mut signed_addresses = vec![];
- schema::SignedAuthorityAddresses {
- addresses: serialized_addresses.clone(),
- signature,
- }
- .encode(&mut signed_addresses)
- .map_err(Error::EncodingProto)
- .unwrap();
+ let addresses = (0..100).map(|_| {
+ let peer_id = PeerId::random();
+ let address: Multiaddr = "/ip6/2001:db8:0:0:0:0:0:1/tcp/30333".parse().unwrap();
+ address.with(multiaddr::Protocol::P2p(
+ peer_id.into(),
+ ))
+ }).collect();
- let key = hash_authority_id(&remote_public.to_raw_vec());
- let value = signed_addresses;
- (key, value)
- };
+ let dht_event = build_dht_event(
+ addresses,
+ remote_public.into(),
+ &remote_key_store,
+ );
let (_dht_event_tx, dht_event_rx) = channel(1);
@@ -676,6 +668,9 @@ fn limit_number_of_addresses_added_to_cache_per_authority() {
None,
);
+ worker.refill_pending_lookups_queue().unwrap();
+ worker.start_new_lookups();
+
worker.handle_dht_value_found_event(vec![dht_event]).unwrap();
assert_eq!(
MAX_ADDRESSES_PER_AUTHORITY,
@@ -700,40 +695,14 @@ fn do_not_cache_addresses_without_peer_id() {
let multiaddr_without_peer_id: Multiaddr = "/ip6/2001:db8:0:0:0:0:0:1/tcp/30333".parse().unwrap();
- let dht_event = {
- let addresses = vec![
- multiaddr_with_peer_id.to_vec(),
- multiaddr_without_peer_id.to_vec(),
- ];
-
- let mut serialized_addresses = vec![];
- schema::AuthorityAddresses { addresses }
- .encode(&mut serialized_addresses)
- .map_err(Error::EncodingProto)
- .unwrap();
-
- let signature = remote_key_store.read()
- .sign_with(
- key_types::AUTHORITY_DISCOVERY,
- &remote_public.clone().into(),
- serialized_addresses.as_slice(),
- )
- .map_err(|_| Error::Signing)
- .unwrap();
-
- let mut signed_addresses = vec![];
- schema::SignedAuthorityAddresses {
- addresses: serialized_addresses.clone(),
- signature,
- }
- .encode(&mut signed_addresses)
- .map_err(Error::EncodingProto)
- .unwrap();
-
- let key = hash_authority_id(&remote_public.to_raw_vec());
- let value = signed_addresses;
- (key, value)
- };
+ let dht_event = build_dht_event(
+ vec![
+ multiaddr_with_peer_id.clone(),
+ multiaddr_without_peer_id,
+ ],
+ remote_public.into(),
+ &remote_key_store,
+ );
let (_dht_event_tx, dht_event_rx) = channel(1);
let local_test_api = Arc::new(TestApi {
@@ -754,6 +723,9 @@ fn do_not_cache_addresses_without_peer_id() {
None,
);
+ local_worker.refill_pending_lookups_queue().unwrap();
+ local_worker.start_new_lookups();
+
local_worker.handle_dht_value_found_event(vec![dht_event]).unwrap();
assert_eq!(
@@ -826,3 +798,83 @@ fn addresses_to_publish_respects_existing_p2p_protocol() {
"Expected Multiaddr from `TestNetwork` to not be altered.",
);
}
+
+#[test]
+fn lookup_throttling() {
+ let remote_multiaddr = {
+ let peer_id = PeerId::random();
+ let address: Multiaddr = "/ip6/2001:db8:0:0:0:0:0:1/tcp/30333".parse().unwrap();
+
+ address.with(multiaddr::Protocol::P2p(
+ peer_id.into(),
+ ))
+ };
+ let remote_key_store = KeyStore::new();
+ let remote_public_keys: Vec = (0..20).map(|_| {
+ remote_key_store
+ .write()
+ .sr25519_generate_new(key_types::AUTHORITY_DISCOVERY, None)
+ .unwrap().into()
+ }).collect();
+ let remote_hash_to_key = remote_public_keys.iter()
+ .map(|k| (hash_authority_id(k.as_ref()), k.clone()))
+ .collect::>();
+
+
+ let (mut dht_event_tx, dht_event_rx) = channel(1);
+ let (_to_worker, from_service) = mpsc::channel(0);
+ let network = Arc::new(TestNetwork::default());
+ let mut worker = Worker::new(
+ from_service,
+ Arc::new(TestApi { authorities: remote_public_keys.clone() }),
+ network.clone(),
+ vec![],
+ dht_event_rx.boxed(),
+ Role::Sentry,
+ None,
+ );
+
+ futures::executor::block_on(futures::future::poll_fn(|cx| {
+ worker.refill_pending_lookups_queue().unwrap();
+
+ // Assert worker to trigger MAX_IN_FLIGHT_LOOKUPS lookups.
+ assert_eq!(Poll::Pending, worker.poll_unpin(cx));
+ assert_eq!(worker.pending_lookups.len(), remote_public_keys.len() - MAX_IN_FLIGHT_LOOKUPS);
+ assert_eq!(worker.in_flight_lookups.len(), MAX_IN_FLIGHT_LOOKUPS);
+ assert_eq!(network.get_value_call.lock().unwrap().len(), MAX_IN_FLIGHT_LOOKUPS);
+
+ // Make first lookup succeed.
+ let remote_hash = network.get_value_call.lock().unwrap().pop().unwrap();
+ let remote_key: AuthorityId = remote_hash_to_key.get(&remote_hash).unwrap().clone();
+ let dht_event = {
+ let (key, value) = build_dht_event(vec![remote_multiaddr.clone()], remote_key, &remote_key_store);
+ sc_network::DhtEvent::ValueFound(vec![(key, value)])
+ };
+ dht_event_tx.try_send(dht_event).expect("Channel has capacity of 1.");
+
+ // Assert worker to trigger another lookup.
+ assert_eq!(Poll::Pending, worker.poll_unpin(cx));
+ assert_eq!(worker.pending_lookups.len(), remote_public_keys.len() - MAX_IN_FLIGHT_LOOKUPS - 1);
+ assert_eq!(worker.in_flight_lookups.len(), MAX_IN_FLIGHT_LOOKUPS);
+ assert_eq!(network.get_value_call.lock().unwrap().len(), MAX_IN_FLIGHT_LOOKUPS);
+
+ // Make second one fail.
+ let remote_hash = network.get_value_call.lock().unwrap().pop().unwrap();
+ let dht_event = sc_network::DhtEvent::ValueNotFound(remote_hash);
+ dht_event_tx.try_send(dht_event).expect("Channel has capacity of 1.");
+
+ // Assert worker to trigger another lookup.
+ assert_eq!(Poll::Pending, worker.poll_unpin(cx));
+ assert_eq!(worker.pending_lookups.len(), remote_public_keys.len() - MAX_IN_FLIGHT_LOOKUPS - 2);
+ assert_eq!(worker.in_flight_lookups.len(), MAX_IN_FLIGHT_LOOKUPS);
+ assert_eq!(network.get_value_call.lock().unwrap().len(), MAX_IN_FLIGHT_LOOKUPS);
+
+ worker.refill_pending_lookups_queue().unwrap();
+
+ // Assert worker to restock pending lookups and forget about in-flight lookups.
+ assert_eq!(worker.pending_lookups.len(), remote_public_keys.len());
+ assert_eq!(worker.in_flight_lookups.len(), 0);
+
+ Poll::Ready(())
+ }));
+}
diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml
index 6c9da3f3d8aa58a1bc51d7165650e2cf80e10145..1b1d8921bcfb35736912d31dc6bd673eb0e08bd3 100644
--- a/client/basic-authorship/Cargo.toml
+++ b/client/basic-authorship/Cargo.toml
@@ -1,12 +1,13 @@
[package]
name = "sc-basic-authorship"
-version = "0.8.0-rc6"
+version = "0.8.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
description = "Basic implementation of block-authoring logic."
+readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
@@ -16,21 +17,21 @@ codec = { package = "parity-scale-codec", version = "1.3.4" }
futures = "0.3.4"
futures-timer = "3.0.1"
log = "0.4.8"
-prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-rc6"}
-sp-api = { version = "2.0.0-rc6", path = "../../primitives/api" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../primitives/runtime" }
-sp-core = { version = "2.0.0-rc6", path = "../../primitives/core" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../primitives/blockchain" }
-sc-client-api = { version = "2.0.0-rc6", path = "../api" }
-sp-consensus = { version = "0.8.0-rc6", path = "../../primitives/consensus/common" }
-sp-inherents = { version = "2.0.0-rc6", path = "../../primitives/inherents" }
-sc-telemetry = { version = "2.0.0-rc6", path = "../telemetry" }
-sp-transaction-pool = { version = "2.0.0-rc6", path = "../../primitives/transaction-pool" }
-sc-block-builder = { version = "0.8.0-rc6", path = "../block-builder" }
-sc-proposer-metrics = { version = "0.8.0-rc6", path = "../proposer-metrics" }
+prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0"}
+sp-api = { version = "2.0.0", path = "../../primitives/api" }
+sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
+sp-core = { version = "2.0.0", path = "../../primitives/core" }
+sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
+sc-client-api = { version = "2.0.0", path = "../api" }
+sp-consensus = { version = "0.8.0", path = "../../primitives/consensus/common" }
+sp-inherents = { version = "2.0.0", path = "../../primitives/inherents" }
+sc-telemetry = { version = "2.0.0", path = "../telemetry" }
+sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" }
+sc-block-builder = { version = "0.8.0", path = "../block-builder" }
+sc-proposer-metrics = { version = "0.8.0", path = "../proposer-metrics" }
tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] }
[dev-dependencies]
-sc-transaction-pool = { version = "2.0.0-rc6", path = "../../client/transaction-pool" }
-substrate-test-runtime-client = { version = "2.0.0-rc6", path = "../../test-utils/runtime/client" }
+sc-transaction-pool = { version = "2.0.0", path = "../../client/transaction-pool" }
+substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
parking_lot = "0.10.0"
diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml
index 94d6b70eeeb9dae9527087b4f0bde1fdedffca91..0c3d289bbcbc152b42270342cba0ee4c5cdeef8b 100644
--- a/client/block-builder/Cargo.toml
+++ b/client/block-builder/Cargo.toml
@@ -1,29 +1,30 @@
[package]
name = "sc-block-builder"
-version = "0.8.0-rc6"
+version = "0.8.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
description = "Substrate block builder"
+readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-sp-state-machine = { version = "0.8.0-rc6", path = "../../primitives/state-machine" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../primitives/runtime" }
-sp-api = { version = "2.0.0-rc6", path = "../../primitives/api" }
-sp-consensus = { version = "0.8.0-rc6", path = "../../primitives/consensus/common" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../primitives/blockchain" }
-sp-core = { version = "2.0.0-rc6", path = "../../primitives/core" }
-sp-block-builder = { version = "2.0.0-rc6", path = "../../primitives/block-builder" }
-sp-inherents = { version = "2.0.0-rc6", path = "../../primitives/inherents" }
-sc-client-api = { version = "2.0.0-rc6", path = "../api" }
+sp-state-machine = { version = "0.8.0", path = "../../primitives/state-machine" }
+sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
+sp-api = { version = "2.0.0", path = "../../primitives/api" }
+sp-consensus = { version = "0.8.0", path = "../../primitives/consensus/common" }
+sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
+sp-core = { version = "2.0.0", path = "../../primitives/core" }
+sp-block-builder = { version = "2.0.0", path = "../../primitives/block-builder" }
+sp-inherents = { version = "2.0.0", path = "../../primitives/inherents" }
+sc-client-api = { version = "2.0.0", path = "../api" }
codec = { package = "parity-scale-codec", version = "1.3.4", features = ["derive"] }
[dev-dependencies]
substrate-test-runtime-client = { path = "../../test-utils/runtime/client" }
-sp-trie = { version = "2.0.0-rc6", path = "../../primitives/trie" }
+sp-trie = { version = "2.0.0", path = "../../primitives/trie" }
diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml
index fcfb80a720e259bf620da661a5b0c16301a0b2be..a73d809ba25235781cba06e62d1ceeefd3594153 100644
--- a/client/chain-spec/Cargo.toml
+++ b/client/chain-spec/Cargo.toml
@@ -1,24 +1,25 @@
[package]
name = "sc-chain-spec"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
description = "Substrate chain configurations."
+readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-sc-chain-spec-derive = { version = "2.0.0-rc6", path = "./derive" }
+sc-chain-spec-derive = { version = "2.0.0", path = "./derive" }
impl-trait-for-tuples = "0.1.3"
-sc-network = { version = "0.8.0-rc6", path = "../network" }
-sp-core = { version = "2.0.0-rc6", path = "../../primitives/core" }
+sc-network = { version = "0.8.0", path = "../network" }
+sp-core = { version = "2.0.0", path = "../../primitives/core" }
serde = { version = "1.0.101", features = ["derive"] }
serde_json = "1.0.41"
-sp-runtime = { version = "2.0.0-rc6", path = "../../primitives/runtime" }
-sp-chain-spec = { version = "2.0.0-rc6", path = "../../primitives/chain-spec" }
-sc-telemetry = { version = "2.0.0-rc6", path = "../telemetry" }
+sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
+sp-chain-spec = { version = "2.0.0", path = "../../primitives/chain-spec" }
+sc-telemetry = { version = "2.0.0", path = "../telemetry" }
codec = { package = "parity-scale-codec", version = "1.3.4" }
diff --git a/client/chain-spec/README.md b/client/chain-spec/README.md
index 6475c811045b1f44f57b87bce2a4ea37c1d321d0..59a66aa5ace79855998debdb7c7b0857f501b26b 100644
--- a/client/chain-spec/README.md
+++ b/client/chain-spec/README.md
@@ -4,7 +4,7 @@ This crate contains structs and utilities to declare
a runtime-specific configuration file (a.k.a chain spec).
Basic chain spec type containing all required parameters is
-[`ChainSpec`](./struct.ChainSpec.html). It can be extended with
+[`ChainSpec`](https://docs.rs/sc-chain-spec/latest/sc_chain_spec/struct.ChainSpec.html). It can be extended with
additional options that contain configuration specific to your chain.
Usually the extension is going to be an amalgamate of types exposed
by Substrate core modules. To allow the core modules to retrieve
@@ -25,7 +25,7 @@ pub type MyChainSpec = GenericChainSpec;
Some parameters may require different values depending on the
current blockchain height (a.k.a. forks). You can use `ChainSpecGroup`
-macro and provided [`Forks`](./struct.Forks.html) structure to put
+macro and provided [`Forks`](https://docs.rs/sc-chain-spec/latest/sc_chain_spec/struct.Forks.html) structure to put
such parameters to your chain spec.
This will allow to override a single parameter starting at specific
block number.
diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml
index a3112e10faca9c5ec205d7344eff478f71a5a39b..6826168a206a5e9529b2decaac1d18ece966e7df 100644
--- a/client/chain-spec/derive/Cargo.toml
+++ b/client/chain-spec/derive/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sc-chain-spec-derive"
-version = "2.0.0-rc6"
+version = "2.0.0"
authors = ["Parity Technologies "]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
diff --git a/client/chain-spec/src/chain_spec.rs b/client/chain-spec/src/chain_spec.rs
index 20811394c56d77a71e456c6297736c44234a5594..1fbf0419e20017cbca6287a0749603ee5b6e46ce 100644
--- a/client/chain-spec/src/chain_spec.rs
+++ b/client/chain-spec/src/chain_spec.rs
@@ -401,8 +401,6 @@ where
pub struct LightSyncState {
/// The header of the best finalized block.
pub header: ::Header,
- /// A list of all CHTs in the chain.
- pub chts: Vec<::Hash>,
}
impl LightSyncState {
@@ -412,7 +410,6 @@ impl LightSyncState {
SerializableLightSyncState {
header: StorageData(self.header.encode()),
- chts: self.chts.iter().map(|hash| StorageData(hash.encode())).collect(),
}
}
@@ -420,9 +417,6 @@ impl LightSyncState {
pub fn from_serializable(serialized: &SerializableLightSyncState) -> Result {
Ok(Self {
header: codec::Decode::decode(&mut &serialized.header.0[..])?,
- chts: serialized.chts.iter()
- .map(|cht| codec::Decode::decode(&mut &cht.0[..]))
- .collect::>()?,
})
}
}
@@ -433,7 +427,6 @@ impl LightSyncState {
#[serde(deny_unknown_fields)]
pub struct SerializableLightSyncState {
header: StorageData,
- chts: Vec,
}
#[cfg(test)]
diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml
index 2643376f84131beac0efec06da20432ca916f161..dca91d18c3efce72e7a8b30ddacc94c9b1a5512e 100644
--- a/client/cli/Cargo.toml
+++ b/client/cli/Cargo.toml
@@ -1,19 +1,19 @@
[package]
name = "sc-cli"
-version = "0.8.0-rc6"
+version = "0.8.0"
authors = ["Parity Technologies "]
description = "Substrate CLI interface."
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
+readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
derive_more = "0.99.2"
-env_logger = "0.7.0"
log = "0.4.8"
atty = "0.2.13"
regex = "1.3.4"
@@ -22,34 +22,37 @@ ansi_term = "0.12.1"
lazy_static = "1.4.0"
tokio = { version = "0.2.21", features = [ "signal", "rt-core", "rt-threaded", "blocking" ] }
futures = "0.3.4"
-fdlimit = "0.1.4"
-libp2p = "0.24.0"
+fdlimit = "0.2.0"
+libp2p = "0.28.1"
parity-scale-codec = "1.3.0"
hex = "0.4.2"
rand = "0.7.3"
bip39 = "0.6.0-beta.1"
serde_json = "1.0.41"
-sc-keystore = { version = "2.0.0-rc6", path = "../keystore" }
-sc-informant = { version = "0.8.0-rc6", path = "../informant" }
-sp-panic-handler = { version = "2.0.0-rc6", path = "../../primitives/panic-handler" }
-sc-client-api = { version = "2.0.0-rc6", path = "../api" }
-sp-blockchain = { version = "2.0.0-rc6", path = "../../primitives/blockchain" }
-sc-network = { version = "0.8.0-rc6", path = "../network" }
-sp-runtime = { version = "2.0.0-rc6", path = "../../primitives/runtime" }
-sp-utils = { version = "2.0.0-rc6", path = "../../primitives/utils" }
-sp-version = { version = "2.0.0-rc6", path = "../../primitives/version" }
-sp-core = { version = "2.0.0-rc6", path = "../../primitives/core" }
-sc-service = { version = "0.8.0-rc6", default-features = false, path = "../service" }
-sp-state-machine = { version = "0.8.0-rc6", path = "../../primitives/state-machine" }
-sc-telemetry = { version = "2.0.0-rc6", path = "../telemetry" }
-substrate-prometheus-endpoint = { path = "../../utils/prometheus" , version = "0.8.0-rc6"}
-sp-keyring = { version = "2.0.0-rc6", path = "../../primitives/keyring" }
+sc-keystore = { version = "2.0.0", path = "../keystore" }
+sc-informant = { version = "0.8.0", path = "../informant" }
+sp-panic-handler = { version = "2.0.0", path = "../../primitives/panic-handler" }
+sc-client-api = { version = "2.0.0", path = "../api" }
+sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
+sc-network = { version = "0.8.0", path = "../network" }
+sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
+sp-utils = { version = "2.0.0", path = "../../primitives/utils" }
+sp-version = { version = "2.0.0", path = "../../primitives/version" }
+sp-core = { version = "2.0.0", path = "../../primitives/core" }
+sc-service = { version = "0.8.0", default-features = false, path = "../service" }
+sp-state-machine = { version = "0.8.0", path = "../../primitives/state-machine" }
+sc-telemetry = { version = "2.0.0", path = "../telemetry" }
+substrate-prometheus-endpoint = { path = "../../utils/prometheus" , version = "0.8.0"}
+sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" }
names = "0.11.0"
structopt = "0.3.8"
-sc-tracing = { version = "2.0.0-rc6", path = "../tracing" }
+sc-tracing = { version = "2.0.0", path = "../tracing" }
chrono = "0.4.10"
parity-util-mem = { version = "0.7.0", default-features = false, features = ["primitive-types"] }
serde = "1.0.111"
+tracing = "0.1.10"
+tracing-log = "0.1.1"
+tracing-subscriber = "0.2.10"
[target.'cfg(not(target_os = "unknown"))'.dependencies]
rpassword = "4.0.1"
diff --git a/client/cli/src/arg_enums.rs b/client/cli/src/arg_enums.rs
index 4ba76d7a06377777dbaf99ca1bb14e67fdc7e549..85400f2a27759fe3743173239fd44c67a39e9ab8 100644
--- a/client/cli/src/arg_enums.rs
+++ b/client/cli/src/arg_enums.rs
@@ -172,8 +172,6 @@ arg_enum! {
pub enum Database {
// Facebooks RocksDB
RocksDb,
- // Subdb. https://github.com/paritytech/subdb/
- SubDb,
// ParityDb. https://github.com/paritytech/parity-db/
ParityDb,
}
diff --git a/client/cli/src/commands/build_sync_spec_cmd.rs b/client/cli/src/commands/build_sync_spec_cmd.rs
new file mode 100644
index 0000000000000000000000000000000000000000..3f1bfce6a3290dc7fb4d8867c272c7558ba08e2a
--- /dev/null
+++ b/client/cli/src/commands/build_sync_spec_cmd.rs
@@ -0,0 +1,113 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2018-2020 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
+
+// This program 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.
+
+// This program 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 this program. If not, see .
+
+use crate::error;
+use crate::params::{SharedParams, NetworkParams};
+use crate::CliConfiguration;
+use log::info;
+use sc_network::config::build_multiaddr;
+use sc_service::{config::{MultiaddrWithPeerId, NetworkConfiguration}, ChainSpec};
+use structopt::StructOpt;
+use std::io::Write;
+use std::sync::Arc;
+use sp_runtime::traits::Block as BlockT;
+use sc_service::chain_ops::build_light_sync_state;
+use sc_service::NetworkStatusSinks;
+use futures::{FutureExt, StreamExt};
+use futures::future::ready;
+
+/// The `build-sync-spec` command used to build a chain spec that contains a light client state
+/// so that light clients can sync faster.
+#[derive(Debug, StructOpt)]
+pub struct BuildSyncSpecCmd {
+ /// Force raw genesis storage output.
+ #[structopt(long = "raw")]
+ pub raw: bool,
+
+ /// Sync the chain using a full client first.
+ #[structopt(long)]
+ pub sync_first: bool,
+
+ /// Disable adding the default bootnode to the specification.
+ ///
+ /// By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the
+ /// specification when no bootnode exists.
+ #[structopt(long = "disable-default-bootnode")]
+ pub disable_default_bootnode: bool,
+
+ #[allow(missing_docs)]
+ #[structopt(flatten)]
+ pub shared_params: SharedParams,
+
+ #[allow(missing_docs)]
+ #[structopt(flatten)]
+ pub network_params: NetworkParams,
+}
+
+impl BuildSyncSpecCmd {
+ /// Run the build-sync-spec command
+ pub async fn run(
+ &self,
+ mut spec: Box,
+ network_config: NetworkConfiguration,
+ client: Arc,
+ network_status_sinks: NetworkStatusSinks,
+ ) -> error::Result<()>
+ where
+ B: BlockT,
+ CL: sp_blockchain::HeaderBackend,
+ {
+ if self.sync_first {
+ network_status_sinks.status_stream(std::time::Duration::from_secs(1)).filter(|status| {
+ ready(status.sync_state == sc_network::SyncState::Idle && status.num_sync_peers > 0)
+ }).into_future().map(drop).await;
+ }
+
+ let light_sync_state = build_light_sync_state(client)?;
+ spec.set_light_sync_state(light_sync_state.to_serializable());
+
+ info!("Building chain spec");
+ let raw_output = self.raw;
+
+ if spec.boot_nodes().is_empty() && !self.disable_default_bootnode {
+ let keys = network_config.node_key.into_keypair()?;
+ let peer_id = keys.public().into_peer_id();
+ let addr = MultiaddrWithPeerId {
+ multiaddr: build_multiaddr![Ip4([127, 0, 0, 1]), Tcp(30333u16)],
+ peer_id,
+ };
+ spec.add_boot_node(addr)
+ }
+
+ let json = sc_service::chain_ops::build_spec(&*spec, raw_output)?;
+ if std::io::stdout().write_all(json.as_bytes()).is_err() {
+ let _ = std::io::stderr().write_all(b"Error writing to stdout\n");
+ }
+ Ok(())
+ }
+}
+
+impl CliConfiguration for BuildSyncSpecCmd {
+ fn shared_params(&self) -> &SharedParams {
+ &self.shared_params
+ }
+
+ fn network_params(&self) -> Option<&NetworkParams> {
+ Some(&self.network_params)
+ }
+}
diff --git a/client/cli/src/commands/generate_node_key.rs b/client/cli/src/commands/generate_node_key.rs
index 197e0eb5d9034ace60080e879dad7156e89b7ca3..ad292e4712d840efa5f015acb6341a0805ba9ebc 100644
--- a/client/cli/src/commands/generate_node_key.rs
+++ b/client/cli/src/commands/generate_node_key.rs
@@ -26,26 +26,31 @@ use libp2p::identity::{ed25519 as libp2p_ed25519, PublicKey};
#[derive(Debug, StructOpt)]
#[structopt(
name = "generate-node-key",
- about = "Generate a random node libp2p key, save it to file and print its peer ID"
+ about = "Generate a random node libp2p key, save it to \
+ file or print it to stdout and print its peer ID to stderr"
)]
pub struct GenerateNodeKeyCmd {
/// Name of file to save secret key to.
+ ///
+ /// If not given, the secret key is printed to stdout.
#[structopt(long)]
- file: PathBuf,
+ file: Option,
}
impl GenerateNodeKeyCmd {
/// Run the command
pub fn run(&self) -> Result<(), Error> {
- let file = &self.file;
-
let keypair = libp2p_ed25519::Keypair::generate();
let secret = keypair.secret();
let peer_id = PublicKey::Ed25519(keypair.public()).into_peer_id();
+ let secret_hex = hex::encode(secret.as_ref());
- fs::write(file, hex::encode(secret.as_ref()))?;
+ match &self.file {
+ Some(file) => fs::write(file, secret_hex)?,
+ None => print!("{}", secret_hex),
+ }
- println!("{}", peer_id);
+ eprintln!("{}", peer_id);
Ok(())
}
diff --git a/client/cli/src/commands/key.rs b/client/cli/src/commands/key.rs
index 50142208b881d180d9c13d502e38f780c30a2fac..930acd7925ac6cd2936b6126425233ca6044c1b1 100644
--- a/client/cli/src/commands/key.rs
+++ b/client/cli/src/commands/key.rs
@@ -28,10 +28,11 @@ use super::{
generate_node_key::GenerateNodeKeyCmd,
};
-/// key utilities for the cli.
+/// Key utilities for the cli.
#[derive(Debug, StructOpt)]
pub enum KeySubcommand {
- /// Generate a random node libp2p key, save it to file and print its peer ID
+ /// Generate a random node libp2p key, save it to file or print it to stdout
+ /// and print its peer ID to stderr.
GenerateNodeKey(GenerateNodeKeyCmd),
/// Generate a random account
diff --git a/client/cli/src/commands/mod.rs b/client/cli/src/commands/mod.rs
index 108c38b19db3065662e22f3c589d0e5afabd3a2f..899abf0c3d4374fba04d7ce962258604756e646c 100644
--- a/client/cli/src/commands/mod.rs
+++ b/client/cli/src/commands/mod.rs
@@ -16,6 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
mod build_spec_cmd;
+mod build_sync_spec_cmd;
mod check_block_cmd;
mod export_blocks_cmd;
mod export_state_cmd;
@@ -34,11 +35,9 @@ mod inspect;
mod key;
pub mod utils;
-use std::fmt::Debug;
-use structopt::StructOpt;
-
pub use self::{
build_spec_cmd::BuildSpecCmd,
+ build_sync_spec_cmd::BuildSyncSpecCmd,
check_block_cmd::CheckBlockCmd,
export_blocks_cmd::ExportBlocksCmd,
export_state_cmd::ExportStateCmd,
@@ -56,403 +55,3 @@ pub use self::{
revert_cmd::RevertCmd,
run_cmd::RunCmd,
};
-
-/// All core commands that are provided by default.
-///
-/// The core commands are split into multiple subcommands and `Run` is the default subcommand. From
-/// the CLI user perspective, it is not visible that `Run` is a subcommand. So, all parameters of
-/// `Run` are exported as main executable parameters.
-#[derive(Debug, StructOpt)]
-pub enum Subcommand {
- /// Build a spec.json file, outputs to stdout.
- BuildSpec(BuildSpecCmd),
-
- /// Export blocks to a file.
- ExportBlocks(ExportBlocksCmd),
-
- /// Import blocks from file.
- ImportBlocks(ImportBlocksCmd),
-
- /// Validate a single block.
- CheckBlock(CheckBlockCmd),
-
- /// Export state as raw chain spec.
- ExportState(ExportStateCmd),
-
- /// Revert chain to the previous state.
- Revert(RevertCmd),
-
- /// Remove the whole chain data.
- PurgeChain(PurgeChainCmd),
-}
-
-/// Macro that helps implement CliConfiguration on an enum of subcommand automatically
-///
-/// # Example
-///
-/// ```
-/// # #[macro_use] extern crate sc_cli;
-///
-/// # struct EmptyVariant {}
-///
-/// # impl sc_cli::CliConfiguration for EmptyVariant {
-/// # fn shared_params(&self) -> &sc_cli::SharedParams { unimplemented!() }
-/// # fn chain_id(&self, _: bool) -> sc_cli::Result { Ok("test-chain-id".to_string()) }
-/// # }
-///
-/// # fn main() {
-/// enum Subcommand {
-/// Variant1(EmptyVariant),
-/// Variant2(EmptyVariant),
-/// }
-///
-/// substrate_cli_subcommands!(
-/// Subcommand => Variant1, Variant2
-/// );
-///
-/// # use sc_cli::CliConfiguration;
-/// # assert_eq!(Subcommand::Variant1(EmptyVariant {}).chain_id(false).unwrap(), "test-chain-id");
-///
-/// # }
-/// ```
-///
-/// Which will expand to:
-///
-/// ```ignore
-/// impl CliConfiguration for Subcommand {
-/// fn base_path(&self) -> Result