diff --git a/.github/allowed-actions.js b/.github/allowed-actions.js
new file mode 100644
index 0000000000000000000000000000000000000000..4fb894758060d4a3dbe57973fbb52bb8c326e786
--- /dev/null
+++ b/.github/allowed-actions.js
@@ -0,0 +1,7 @@
+// This is a whitelist of GitHub Actions that are approved for use in this project.
+// If a new or existing workflow file is updated to use an action or action version
+// not listed here, CI will fail.
+
+module.exports = [
+ 'gaurav-nelson/github-action-markdown-link-check@7481451f70251762f149d69596e3e276ebf2b236', // gaurav-nelson/github-action-markdown-link-check@v1.0.8
+]
diff --git a/.github/workflows/md-link-check.yml b/.github/workflows/md-link-check.yml
index 75948534b3c194430e87e4a2fc6eb8c600c4618e..868569911d47185c08aff6d419ad56240a0dbc59 100644
--- a/.github/workflows/md-link-check.yml
+++ b/.github/workflows/md-link-check.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: gaurav-nelson/github-action-markdown-link-check@v1
+ - uses: gaurav-nelson/github-action-markdown-link-check@7481451f70251762f149d69596e3e276ebf2b236
with:
use-quiet-mode: 'yes'
config-file: '.github/workflows/mlc_config.json'
diff --git a/.github/workflows/mlc_config.json b/.github/workflows/mlc_config.json
index f741e987b1b2a771d4b15a478a519ca8e868b60a..e7e620b39e0a9b2dd60eb57498ba99c1b6635443 100644
--- a/.github/workflows/mlc_config.json
+++ b/.github/workflows/mlc_config.json
@@ -1,7 +1,7 @@
{
"ignorePatterns": [
{
- "pattern": "^https://crates.io"
+ "pattern": "^https://crates.io",
}
]
}
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cbb56fcf7267936be9a9de2b433f8efe66745a05..07b0dd319cf792dbee99c64b5addc4307ab14dd5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,7 +24,6 @@ stages:
- check
- test
- build
- - post-build-test
- chaos-env
- chaos
- publish
@@ -197,7 +196,7 @@ cargo-check-benches:
<<: *docker-env
<<: *test-refs
script:
- - BUILD_DUMMY_WASM_BINARY=1 time cargo +nightly check --benches --all
+ - SKIP_WASM_BUILD=1 time cargo +nightly check --benches --all
- cargo run --release -p node-bench -- ::node::import::native::sr25519::transfer_keep_alive::paritydb::small
- cargo run --release -p node-bench -- ::trie::read::small
- sccache -s
@@ -208,7 +207,7 @@ cargo-check-subkey:
<<: *test-refs
script:
- cd ./bin/utils/subkey
- - BUILD_DUMMY_WASM_BINARY=1 time cargo check --release
+ - SKIP_WASM_BUILD=1 time cargo check --release
- sccache -s
test-deterministic-wasm:
@@ -222,7 +221,7 @@ test-deterministic-wasm:
# build runtime
- cargo build --verbose --release -p node-runtime
# make checksum
- - sha256sum target/release/wbuild/target/wasm32-unknown-unknown/release/node_runtime.wasm > checksum.sha256
+ - sha256sum target/release/wbuild/node-runtime/target/wasm32-unknown-unknown/release/node_runtime.wasm > checksum.sha256
# clean up – FIXME: can we reuse some of the artifacts?
- cargo clean
# build again
@@ -343,7 +342,7 @@ cargo-check-macos:
<<: *docker-env
<<: *test-refs
script:
- - BUILD_DUMMY_WASM_BINARY=1 time cargo check --release
+ - SKIP_WASM_BUILD=1 time cargo check --release
- sccache -s
tags:
- osx
@@ -451,7 +450,7 @@ build-linux-subkey: &build-subkey
- mkdir -p ./artifacts/subkey
script:
- cd ./bin/utils/subkey
- - BUILD_DUMMY_WASM_BINARY=1 time cargo build --release --verbose
+ - SKIP_WASM_BUILD=1 time cargo build --release --verbose
- cd -
- mv ./target/release/subkey ./artifacts/subkey/.
- echo -n "Subkey version = "
@@ -471,7 +470,9 @@ build-rust-doc:
stage: build
<<: *docker-env
<<: *test-refs
- allow_failure: true
+ needs:
+ - job: test-linux-stable
+ artifacts: false
variables:
<<: *default-vars
RUSTFLAGS: -Dwarnings
@@ -483,30 +484,12 @@ build-rust-doc:
- ./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"
+ - SKIP_WASM_BUILD=1 RUSTDOCFLAGS="--html-in-header $(pwd)/.maintain/rustdoc-header.html"
time cargo +nightly doc --no-deps --workspace --all-features --verbose
- mv ./target/doc ./crate-docs
- echo "" > ./crate-docs/index.html
- sccache -s
-#### stage: post-build-test
-
-trigger-contracts-ci:
- stage: post-build-test
- needs:
- - job: build-linux-substrate
- artifacts: false
- - job: test-linux-stable
- artifacts: false
- trigger:
- project: parity/srml-contracts-waterfall
- branch: master
- strategy: depend
- rules:
- - if: $CI_PIPELINE_SOURCE == "web"
- - if: $CI_PIPELINE_SOURCE == "schedule"
- - if: $CI_COMMIT_REF_NAME == "master"
-
#### stage: chaos-env
build-chaos-docker:
@@ -677,6 +660,8 @@ publish-s3-doc:
needs:
- job: build-rust-doc
artifacts: true
+ - job: build-linux-substrate
+ artifacts: false
<<: *build-refs
<<: *kubernetes-build
variables:
diff --git a/.maintain/frame-weight-template.hbs b/.maintain/frame-weight-template.hbs
index aac37f0833c7d96f0a7da6939726e95fefcb1cb1..76f89eafbaeee28a638d8407a8058a4e214bfbdc 100644
--- a/.maintain/frame-weight-template.hbs
+++ b/.maintain/frame-weight-template.hbs
@@ -45,7 +45,7 @@ pub trait WeightInfo {
/// Weights for {{pallet}} using the Substrate node and recommended hardware.
pub struct SubstrateWeight(PhantomData);
-impl WeightInfo for SubstrateWeight {
+impl WeightInfo for SubstrateWeight {
{{~#each benchmarks as |benchmark|}}
fn {{benchmark.name~}}
(
@@ -54,6 +54,7 @@ impl WeightInfo for SubstrateWeight {
) -> Weight {
({{underscore benchmark.base_weight}} as Weight)
{{~#each benchmark.component_weight as |cw|}}
+ // Standard Error: {{underscore cw.error}}
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
{{~/each}}
{{~#if (ne benchmark.base_reads "0")}}
@@ -82,6 +83,7 @@ impl WeightInfo for () {
) -> Weight {
({{underscore benchmark.base_weight}} as Weight)
{{~#each benchmark.component_weight as |cw|}}
+ // Standard Error: {{underscore cw.error}}
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
{{~/each}}
{{~#if (ne benchmark.base_reads "0")}}
diff --git a/.maintain/gitlab/check_polkadot_companion_build.sh b/.maintain/gitlab/check_polkadot_companion_build.sh
index 73a5a36ff8af9e59cc91b470cd4d46595b776ee2..4a7e9869abf5e1cc238011a81ca584c4a567a8f7 100755
--- a/.maintain/gitlab/check_polkadot_companion_build.sh
+++ b/.maintain/gitlab/check_polkadot_companion_build.sh
@@ -9,6 +9,7 @@
# polkadot companion: paritytech/polkadot#567
#
+set -e
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
@@ -44,6 +45,7 @@ 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.
+git fetch --depth 20 origin
git merge origin/master
# Clone the current Polkadot master branch into ./polkadot.
@@ -92,3 +94,6 @@ cd polkadot
# Test Polkadot pr or master branch with this Substrate commit.
cargo update -p sp-io
time cargo test --all --release --verbose --features=real-overseer
+
+cd parachain/test-parachains/adder/collator/
+time cargo test --release --verbose --locked --features=real-overseer
diff --git a/.maintain/monitoring/grafana-dashboards/substrate-dashboard.json b/.maintain/monitoring/grafana-dashboards/substrate-dashboard.json
index 629b22617b22a970eb1f439179f62711d1bac9b4..a61e8a49bade752ea321ffe62528f24378442834 100644
--- a/.maintain/monitoring/grafana-dashboards/substrate-dashboard.json
+++ b/.maintain/monitoring/grafana-dashboards/substrate-dashboard.json
@@ -756,108 +756,6 @@
"alignLevel": null
}
},
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": null,
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 6,
- "w": 6,
- "x": 0,
- "y": 12
- },
- "hiddenSeries": false,
- "id": 23,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "[[metric_namespace]]_sync_extra_finality_proofs_active{instance=\"[[instance]]\",network=\"[[network]]\"}",
- "legendFormat": "{{instance}} active",
- "refId": "A"
- },
- {
- "expr": "[[metric_namespace]]_sync_extra_finality_proofs_failed{instance=\"[[instance]]\",network=\"[[network]]\"}",
- "legendFormat": "{{instance}} failed",
- "refId": "B"
- },
- {
- "expr": "[[metric_namespace]]_sync_extra_finality_proofs_importing{instance=\"[[instance]]\",network=\"[[network]]\"}",
- "legendFormat": "{{instance}} importing",
- "refId": "C"
- },
- {
- "expr": "[[metric_namespace]]_sync_extra_finality_proofs_pending{instance=\"[[instance]]\",network=\"[[network]]\"}",
- "legendFormat": "{{instance}} pending",
- "refId": "D"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Sync Proof",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "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,
diff --git a/Cargo.lock b/Cargo.lock
index 3b905e4bd87ebfdd85da52bb5b28f97c5146a7c9..c775fbb062e16c39163db9edee67b8b156905b8e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -79,15 +79,6 @@ dependencies = [
"opaque-debug 0.3.0",
]
-[[package]]
-name = "ahash"
-version = "0.2.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29661b60bec623f0586702976ff4d0c9942dcb6723161c2df0eea78455cfedfb"
-dependencies = [
- "const-random",
-]
-
[[package]]
name = "ahash"
version = "0.3.8"
@@ -109,17 +100,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "alga"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2"
-dependencies = [
- "approx",
- "num-complex",
- "num-traits",
-]
-
[[package]]
name = "ansi_term"
version = "0.11.0"
@@ -264,9 +244,9 @@ dependencies = [
[[package]]
name = "async-io"
-version = "1.2.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40a0b2bb8ae20fede194e779150fe283f65a4a08461b496de546ec366b174ad9"
+checksum = "9315f8f07556761c3e48fec2e6b276004acf426e6dc068b2c2251854d65ee0fd"
dependencies = [
"concurrent-queue",
"fastrand",
@@ -312,7 +292,7 @@ dependencies = [
"memchr",
"num_cpus",
"once_cell",
- "pin-project-lite",
+ "pin-project-lite 0.1.11",
"pin-utils",
"slab",
"wasm-bindgen-futures",
@@ -326,13 +306,13 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0"
[[package]]
name = "async-tls"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d85a97c4a0ecce878efd3f945f119c78a646d8975340bca0398f9bb05c30cc52"
+checksum = "2f23d769dbf1838d5df5156e7b1ad404f4c463d1ac2c6aeb6cd943630f8a8400"
dependencies = [
"futures-core",
"futures-io",
- "rustls",
+ "rustls 0.19.0",
"webpki",
"webpki-roots",
]
@@ -439,7 +419,7 @@ dependencies = [
"cfg-if 0.1.10",
"clang-sys",
"clap",
- "env_logger",
+ "env_logger 0.7.1",
"lazy_static",
"lazycell",
"log",
@@ -500,17 +480,6 @@ dependencies = [
"constant_time_eq",
]
-[[package]]
-name = "blake2s_simd"
-version = "0.5.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2"
-dependencies = [
- "arrayref",
- "arrayvec 0.5.2",
- "constant_time_eq",
-]
-
[[package]]
name = "block-buffer"
version = "0.7.3"
@@ -571,12 +540,6 @@ dependencies = [
"once_cell",
]
-[[package]]
-name = "bs58"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb"
-
[[package]]
name = "bs58"
version = "0.4.0"
@@ -653,13 +616,12 @@ checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
[[package]]
name = "cargo_metadata"
-version = "0.10.0"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8de60b887edf6d74370fc8eb177040da4847d971d6234c7b13a6da324ef0caf"
+checksum = "d5a5f7b42f606b7f23674f6f4d877628350682bc40687d3fae65679a58d55345"
dependencies = [
- "semver 0.9.0",
+ "semver 0.11.0",
"serde",
- "serde_derive",
"serde_json",
]
@@ -754,6 +716,15 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "ckb-merkle-mountain-range"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e486fe53bb9f2ca0f58cb60e8679a5354fd6687a839942ef0a75967250289ca6"
+dependencies = [
+ "cfg-if 0.1.10",
+]
+
[[package]]
name = "clang-sys"
version = "0.29.3"
@@ -819,34 +790,14 @@ dependencies = [
[[package]]
name = "console_log"
-version = "0.1.2"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48"
+checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494"
dependencies = [
"log",
"web-sys",
]
-[[package]]
-name = "const-random"
-version = "0.1.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02dc82c12dc2ee6e1ded861cf7d582b46f66f796d1b6c93fa28b911ead95da02"
-dependencies = [
- "const-random-macro",
- "proc-macro-hack",
-]
-
-[[package]]
-name = "const-random-macro"
-version = "0.1.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc757bbb9544aa296c2ae00c679e81f886b37e28e59097defe0cf524306f6685"
-dependencies = [
- "getrandom 0.2.0",
- "proc-macro-hack",
-]
-
[[package]]
name = "const_fn"
version = "0.4.3"
@@ -1268,6 +1219,15 @@ dependencies = [
"dirs-sys",
]
+[[package]]
+name = "directories"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8fed639d60b58d0f53498ab13d26f621fd77569cc6edb031f4cc36a2ad9da0f"
+dependencies = [
+ "dirs-sys",
+]
+
[[package]]
name = "dirs-sys"
version = "0.3.5"
@@ -1377,6 +1337,19 @@ dependencies = [
"syn",
]
+[[package]]
+name = "env_logger"
+version = "0.5.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38"
+dependencies = [
+ "atty",
+ "humantime",
+ "log",
+ "regex",
+ "termcolor",
+]
+
[[package]]
name = "env_logger"
version = "0.7.1"
@@ -1426,106 +1399,12 @@ dependencies = [
"libc",
]
-[[package]]
-name = "ethbloom"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71a6567e6fd35589fea0c63b94b4cf2e55573e413901bdbe60ab15cf0e25e5df"
-dependencies = [
- "crunchy",
- "fixed-hash",
- "impl-rlp",
- "impl-serde",
- "tiny-keccak",
-]
-
-[[package]]
-name = "ethereum"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df706418ff7d3874b9506424b04ea0bef569a2b39412b43a27ea86e679be108e"
-dependencies = [
- "ethereum-types",
- "hash-db",
- "hash256-std-hasher",
- "parity-scale-codec",
- "rlp",
- "rlp-derive",
- "serde",
- "sha3 0.9.1",
- "triehash",
-]
-
-[[package]]
-name = "ethereum-types"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "473aecff686bd8e7b9db0165cbbb53562376b39bf35b427f0c60446a9e1634b0"
-dependencies = [
- "ethbloom",
- "fixed-hash",
- "impl-rlp",
- "impl-serde",
- "primitive-types",
- "uint",
-]
-
[[package]]
name = "event-listener"
version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
-[[package]]
-name = "evm"
-version = "0.17.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16c8deca0ec3efa361b03d9cae6fe94321a1d2d0a523437edd720b3d140e3c08"
-dependencies = [
- "ethereum",
- "evm-core",
- "evm-gasometer",
- "evm-runtime",
- "log",
- "parity-scale-codec",
- "primitive-types",
- "rlp",
- "serde",
- "sha3 0.8.2",
-]
-
-[[package]]
-name = "evm-core"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf2d732b3c36df36833761cf67df8f65866be1d368d20508bc3e13e6f256c8c5"
-dependencies = [
- "log",
- "primitive-types",
-]
-
-[[package]]
-name = "evm-gasometer"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46de1b91ccd744627484183729f1b5af484b3bf15505007fc28cc54264cb9ea1"
-dependencies = [
- "evm-core",
- "evm-runtime",
- "primitive-types",
-]
-
-[[package]]
-name = "evm-runtime"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2c1d1ffe96f833788512c890d702457d790dba4917ac6f64f8f60fbd9bc40b8"
-dependencies = [
- "evm-core",
- "primitive-types",
- "sha3 0.8.2",
-]
-
[[package]]
name = "exit-future"
version = "0.2.0"
@@ -1593,7 +1472,7 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fdbe0d94371f9ce939b555dd342d0686cc4c0cadbcd4b61d70af5ff97eb4126"
dependencies = [
- "env_logger",
+ "env_logger 0.7.1",
"log",
]
@@ -1689,6 +1568,7 @@ dependencies = [
name = "frame-benchmarking-cli"
version = "2.0.0"
dependencies = [
+ "Inflector",
"chrono",
"frame-benchmarking",
"handlebars",
@@ -1801,6 +1681,7 @@ version = "2.0.0"
dependencies = [
"frame-metadata",
"frame-support",
+ "frame-system",
"parity-scale-codec",
"pretty_assertions",
"rustversion",
@@ -1867,16 +1748,6 @@ dependencies = [
"winapi 0.3.9",
]
-[[package]]
-name = "fs2"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
-dependencies = [
- "libc",
- "winapi 0.3.9",
-]
-
[[package]]
name = "fs_extra"
version = "1.2.0"
@@ -1997,7 +1868,7 @@ dependencies = [
"futures-io",
"memchr",
"parking",
- "pin-project-lite",
+ "pin-project-lite 0.1.11",
"waker-fn",
]
@@ -2105,6 +1976,15 @@ dependencies = [
"typenum",
]
+[[package]]
+name = "generic-array"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd"
+dependencies = [
+ "typenum",
+]
+
[[package]]
name = "generic-array"
version = "0.14.4"
@@ -2127,17 +2007,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "getrandom"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4"
-dependencies = [
- "cfg-if 0.1.10",
- "libc",
- "wasi 0.9.0+wasi-snapshot-preview1",
-]
-
[[package]]
name = "ghash"
version = "0.3.0"
@@ -2269,16 +2138,6 @@ dependencies = [
"crunchy",
]
-[[package]]
-name = "hashbrown"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead"
-dependencies = [
- "ahash 0.2.19",
- "autocfg 0.1.7",
-]
-
[[package]]
name = "hashbrown"
version = "0.8.2"
@@ -2506,7 +2365,7 @@ dependencies = [
"futures-util",
"hyper 0.13.9",
"log",
- "rustls",
+ "rustls 0.18.1",
"rustls-native-certs",
"tokio 0.2.23",
"tokio-rustls",
@@ -2557,21 +2416,28 @@ dependencies = [
]
[[package]]
-name = "impl-codec"
-version = "0.4.2"
+name = "if-watch"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53"
+checksum = "16d7c5e361e6b05c882b4847dd98992534cebc6fcde7f4bc98225bcf10fd6d0d"
dependencies = [
- "parity-scale-codec",
+ "async-io",
+ "futures 0.3.8",
+ "futures-lite",
+ "if-addrs",
+ "ipnet",
+ "libc",
+ "log",
+ "winapi 0.3.9",
]
[[package]]
-name = "impl-rlp"
-version = "0.2.1"
+name = "impl-codec"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5"
+checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53"
dependencies = [
- "rlp",
+ "parity-scale-codec",
]
[[package]]
@@ -2689,9 +2555,9 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.44"
+version = "0.3.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73"
+checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8"
dependencies = [
"wasm-bindgen",
]
@@ -2931,9 +2797,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a"
[[package]]
name = "libc"
-version = "0.2.80"
+version = "0.2.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
+checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
[[package]]
name = "libloading"
@@ -2953,9 +2819,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]]
name = "libp2p"
-version = "0.30.1"
+version = "0.32.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3c2b4c99f8798be90746fc226acf95d3e6cff0655883634cc30dab1f64f438b"
+checksum = "022cdac4ab124be12de581e591796d4dfb7d1f1eef94669d2c1eaa0e98dd2f0e"
dependencies = [
"atomic",
"bytes 0.5.6",
@@ -2982,7 +2848,6 @@ dependencies = [
"libp2p-wasm-ext",
"libp2p-websocket",
"libp2p-yamux",
- "multihash",
"parity-multiaddr",
"parking_lot 0.11.1",
"pin-project 1.0.2",
@@ -2992,12 +2857,13 @@ dependencies = [
[[package]]
name = "libp2p-core"
-version = "0.24.0"
+version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b8186060d6bd415e4e928e6cb44c4fe7e7a7dd53437bd936ce7e5f421e45a51"
+checksum = "cc9c96d3a606a696a3a6c0ad3c3352c57bda2082ec9090930f1bd9daf787039f"
dependencies = [
"asn1_der",
- "bs58 0.4.0",
+ "bs58",
+ "bytes 0.5.6",
"ed25519-dalek",
"either",
"fnv",
@@ -3019,16 +2885,16 @@ dependencies = [
"sha2 0.9.2",
"smallvec 1.5.0",
"thiserror",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
"void",
"zeroize",
]
[[package]]
name = "libp2p-core-derive"
-version = "0.20.2"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f753d9324cd3ec14bf04b8a8cd0d269c87f294153d6bf2a84497a63a5ad22213"
+checksum = "f4bc40943156e42138d22ed3c57ff0e1a147237742715937622a99b10fbe0156"
dependencies = [
"quote",
"syn",
@@ -3036,9 +2902,9 @@ dependencies = [
[[package]]
name = "libp2p-deflate"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34aea69349e70a58ef9ecd21ac12c5eaa36255ac6986828079d26393f9e618cb"
+checksum = "5a579d7dd506d0620ba88ccc1754436b7de35ed6c884234f9a226bbfce382640"
dependencies = [
"flate2",
"futures 0.3.8",
@@ -3047,9 +2913,9 @@ dependencies = [
[[package]]
name = "libp2p-dns"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0baeff71fb5cb1fe1604f74a712a44b66a8c5900f4022411a1d550f09d6bb776"
+checksum = "15dea5933f570844d7b5222b12b58f7bd52e9ca38cd65a1bd4f35341f053f012"
dependencies = [
"futures 0.3.8",
"libp2p-core",
@@ -3058,9 +2924,9 @@ dependencies = [
[[package]]
name = "libp2p-floodsub"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db0f925a45f310b678e70faf71a10023b829d02eb9cc2628a63de928936f3ade"
+checksum = "23070a0838bd9a8adb27e6eba477eeb650c498f9d139383dd0135d20a8170253"
dependencies = [
"cuckoofilter",
"fnv",
@@ -3076,9 +2942,9 @@ dependencies = [
[[package]]
name = "libp2p-gossipsub"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efeb65567174974f551a91f9f5719445b6695cad56f6a7a47a27111f37efb6b8"
+checksum = "65e8f3aa0906fbad435dac23c177eef3cdfaaf62609791bd7f54f8553edcfdf9"
dependencies = [
"base64 0.13.0",
"byteorder",
@@ -3096,15 +2962,15 @@ dependencies = [
"rand 0.7.3",
"sha2 0.9.2",
"smallvec 1.5.0",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
"wasm-timer",
]
[[package]]
name = "libp2p-identify"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e074124669840484de564901d47f2d0892e73f6d8ee7c37e9c2644af1b217bf4"
+checksum = "802fb973a7e0dde3fb9a2113a62bad90338ebe01983b706e1d576d0c2af93cda"
dependencies = [
"futures 0.3.8",
"libp2p-core",
@@ -3118,9 +2984,9 @@ dependencies = [
[[package]]
name = "libp2p-kad"
-version = "0.25.0"
+version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78a2653b2e3254a3bbeb66bfc3f0dca7d6cba6aa2a96791db114003dec1b5394"
+checksum = "6506b7b7982f7626fc96a91bc61be4b1fe7ae9ac23824f0ecefcce21cb39238c"
dependencies = [
"arrayvec 0.5.2",
"bytes 0.5.6",
@@ -3131,45 +2997,43 @@ dependencies = [
"libp2p-core",
"libp2p-swarm",
"log",
- "multihash",
"prost",
"prost-build",
"rand 0.7.3",
"sha2 0.9.2",
"smallvec 1.5.0",
"uint",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
"void",
"wasm-timer",
]
[[package]]
name = "libp2p-mdns"
-version = "0.24.0"
+version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "786b068098794322239f8f04df88a52daeb7863b2e77501c4d85d32e0a8f2d26"
+checksum = "7b934ee03a361f317df7d75defa4177b285534c58f49d5e6e240278e13ef3f65"
dependencies = [
- "async-std",
+ "async-io",
"data-encoding",
"dns-parser",
- "either",
"futures 0.3.8",
+ "if-watch",
"lazy_static",
"libp2p-core",
"libp2p-swarm",
"log",
- "net2",
"rand 0.7.3",
"smallvec 1.5.0",
+ "socket2",
"void",
- "wasm-timer",
]
[[package]]
name = "libp2p-mplex"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed764eab613a8fb6b7dcf6c796f55a06fef2270e528329903e25cd3311b99663"
+checksum = "ae2132b14045009b0f8e577a06e1459592ef0a89dedc58f3d4baf4eac956837b"
dependencies = [
"bytes 0.5.6",
"futures 0.3.8",
@@ -3180,14 +3044,14 @@ dependencies = [
"parking_lot 0.11.1",
"rand 0.7.3",
"smallvec 1.5.0",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
]
[[package]]
name = "libp2p-noise"
-version = "0.26.0"
+version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb441fb015ec16690099c5d910fcba271d357763b3dcb784db7b27bbb0b68372"
+checksum = "b9610a524bef4db383cd96b4ec3ec4722eafa72c7242fa89990b74166760583d"
dependencies = [
"bytes 0.5.6",
"curve25519-dalek 3.0.0",
@@ -3207,9 +3071,9 @@ dependencies = [
[[package]]
name = "libp2p-ping"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82e5c50936cfdbe96a514e8992f304fa44cd3a681b6f779505f1ae62b3474705"
+checksum = "659adf89356e04f65398bb74ee791b269e63da9e41b37f8dc19eaacd12487bfe"
dependencies = [
"futures 0.3.8",
"libp2p-core",
@@ -3222,9 +3086,9 @@ dependencies = [
[[package]]
name = "libp2p-plaintext"
-version = "0.24.1"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21026557c335d3639591f247b19b7536195772034ec7e9c463137227f95eaaa1"
+checksum = "96dfe26270c91d4ff095030d1fcadd602f3fd84968ebd592829916d0715798a6"
dependencies = [
"bytes 0.5.6",
"futures 0.3.8",
@@ -3233,7 +3097,7 @@ dependencies = [
"log",
"prost",
"prost-build",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
"void",
]
@@ -3248,14 +3112,14 @@ dependencies = [
"pin-project 0.4.27",
"rand 0.7.3",
"salsa20",
- "sha3 0.9.1",
+ "sha3",
]
[[package]]
name = "libp2p-request-response"
-version = "0.5.0"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dd9a1e0e6563dec1c9e702f7e68bdaa43da62a84536aa06372d3fed3e25d4ca"
+checksum = "bd96c3580fe59a9379ac7906c2f61c7f5ad3b7515362af0e72153a7cc9a45550"
dependencies = [
"async-trait",
"bytes 0.5.6",
@@ -3263,19 +3127,19 @@ dependencies = [
"libp2p-core",
"libp2p-swarm",
"log",
- "lru 0.6.1",
+ "lru",
"minicbor",
"rand 0.7.3",
"smallvec 1.5.0",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
"wasm-timer",
]
[[package]]
name = "libp2p-swarm"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "565f0e06674b4033c978471e4083d5aaa8e03cef0719a0ec0905aaeaad39a919"
+checksum = "de333c483f27d02ecf7b6cef814a36f5e1876f15139eefb00225c405350e1c22"
dependencies = [
"either",
"futures 0.3.8",
@@ -3289,9 +3153,9 @@ dependencies = [
[[package]]
name = "libp2p-tcp"
-version = "0.24.0"
+version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33f3dce259c0d3127af5167f45c275b6c047320efdd0e40fde947482487af0a3"
+checksum = "bc28c9ad6dc43f4c3950411cf808639d90307a076330e7996e5e94e70279bde0"
dependencies = [
"async-std",
"futures 0.3.8",
@@ -3305,9 +3169,9 @@ dependencies = [
[[package]]
name = "libp2p-uds"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e0aba04370a00d8d0236e350bc862926c1b42542a169aa6a481e660e5b990fe"
+checksum = "9d821208d4b9af4b293a56dde470edd9f9fac8bb94a51f4f5327cc29a471b3f3"
dependencies = [
"async-std",
"futures 0.3.8",
@@ -3317,9 +3181,9 @@ dependencies = [
[[package]]
name = "libp2p-wasm-ext"
-version = "0.24.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c703816f4170477a375b49c56d349e535ce68388f81ba1d9a3c8e2517effa82"
+checksum = "1e6ef400b231ba78e866b860445480ca21ee447e03034138c6d57cf2969d6bf4"
dependencies = [
"futures 0.3.8",
"js-sys",
@@ -3331,9 +3195,9 @@ dependencies = [
[[package]]
name = "libp2p-websocket"
-version = "0.25.0"
+version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d5e7268a959748040a0cf7456ad655be55b87f0ceda03bdb5b53674726b28f7"
+checksum = "522a877ce42ededf1f5dd011dbc40ea116f1776818f09dacb3d7a206f3ad6305"
dependencies = [
"async-tls",
"either",
@@ -3341,7 +3205,7 @@ dependencies = [
"libp2p-core",
"log",
"quicksink",
- "rustls",
+ "rustls 0.19.0",
"rw-stream-sink",
"soketto",
"url 2.2.0",
@@ -3351,9 +3215,9 @@ dependencies = [
[[package]]
name = "libp2p-yamux"
-version = "0.27.0"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a0798cbb58535162c40858493d09af06eac42a26e4966e58de0df701f559348"
+checksum = "3be7ac000fa3e42ac09a6e658e48de34ac8ef9fff64a4e6e6b08dcc8f4b0e5f6"
dependencies = [
"futures 0.3.8",
"libp2p-core",
@@ -3418,11 +3282,10 @@ dependencies = [
[[package]]
name = "linregress"
-version = "0.1.7"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9290cf6f928576eeb9c096c6fad9d8d452a0a1a70a2bbffa6e36064eedc0aac9"
+checksum = "0d0ad4b5cc8385a881c561fac3501353d63d2a2b7a357b5064d71815c9a92724"
dependencies = [
- "failure",
"nalgebra",
"statrs",
]
@@ -3485,24 +3348,6 @@ dependencies = [
"serde_json",
]
-[[package]]
-name = "lru"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237"
-dependencies = [
- "hashbrown 0.6.3",
-]
-
-[[package]]
-name = "lru"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35c456c123957de3a220cd03786e0d86aa542a88b46029973b542f426da6ef34"
-dependencies = [
- "hashbrown 0.6.3",
-]
-
[[package]]
name = "lru"
version = "0.6.1"
@@ -3731,17 +3576,29 @@ checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238"
[[package]]
name = "multihash"
-version = "0.11.4"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "567122ab6492f49b59def14ecc36e13e64dca4188196dd0cd41f9f3f979f3df6"
+checksum = "fb63389ee5fcd4df3f8727600f4a0c3df53c541f0ed4e8b50a9ae51a80fc1efe"
dependencies = [
- "blake2b_simd",
- "blake2s_simd",
"digest 0.9.0",
- "sha-1 0.9.2",
+ "generic-array 0.14.4",
+ "multihash-derive",
"sha2 0.9.2",
- "sha3 0.9.1",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
+]
+
+[[package]]
+name = "multihash-derive"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f5653449cd45d502a53480ee08d7a599e8f4893d2bacb33c63d65bc20af6c1a"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
]
[[package]]
@@ -3752,32 +3609,33 @@ checksum = "1255076139a83bb467426e7f8d0134968a8118844faa755985e077cf31850333"
[[package]]
name = "multistream-select"
-version = "0.8.5"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93faf2e41f9ee62fb01680ed48f3cc26652352327aa2e59869070358f6b7dd75"
+checksum = "dda822043bba2d6da31c4e14041f9794f8fb130a5959289038d0b809d8888614"
dependencies = [
"bytes 0.5.6",
"futures 0.3.8",
"log",
"pin-project 1.0.2",
"smallvec 1.5.0",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
]
[[package]]
name = "nalgebra"
-version = "0.18.1"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2"
+checksum = "d6b6147c3d50b4f3cdabfe2ecc94a0191fd3d6ad58aefd9664cf396285883486"
dependencies = [
- "alga",
"approx",
- "generic-array 0.12.3",
+ "generic-array 0.13.2",
"matrixmultiply",
"num-complex",
"num-rational",
"num-traits",
- "rand 0.6.5",
+ "rand 0.7.3",
+ "rand_distr",
+ "simba",
"typenum",
]
@@ -4075,10 +3933,12 @@ dependencies = [
"frame-system-rpc-runtime-api",
"hex-literal",
"node-primitives",
+ "pallet-assets",
"pallet-authority-discovery",
"pallet-authorship",
"pallet-babe",
"pallet-balances",
+ "pallet-bounties",
"pallet-collective",
"pallet-contracts",
"pallet-contracts-primitives",
@@ -4090,6 +3950,7 @@ dependencies = [
"pallet-im-online",
"pallet-indices",
"pallet-membership",
+ "pallet-mmr",
"pallet-multisig",
"pallet-offences",
"pallet-offences-benchmarking",
@@ -4104,6 +3965,7 @@ dependencies = [
"pallet-staking-reward-curve",
"pallet-sudo",
"pallet-timestamp",
+ "pallet-tips",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-treasury",
@@ -4127,7 +3989,7 @@ dependencies = [
"sp-transaction-pool",
"sp-version",
"static_assertions",
- "substrate-wasm-builder-runner",
+ "substrate-wasm-builder",
]
[[package]]
@@ -4146,6 +4008,7 @@ dependencies = [
"sc-consensus-aura",
"sc-executor",
"sc-finality-grandpa",
+ "sc-keystore",
"sc-rpc",
"sc-rpc-api",
"sc-service",
@@ -4198,7 +4061,7 @@ dependencies = [
"sp-std",
"sp-transaction-pool",
"sp-version",
- "substrate-wasm-builder-runner",
+ "substrate-wasm-builder",
]
[[package]]
@@ -4408,8 +4271,10 @@ dependencies = [
name = "pallet-assets"
version = "2.0.0"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
+ "pallet-balances",
"parity-scale-codec",
"serde",
"sp-core",
@@ -4534,6 +4399,24 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-bounties"
+version = "2.0.0"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "pallet-balances",
+ "pallet-treasury",
+ "parity-scale-codec",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+ "sp-storage",
+]
+
[[package]]
name = "pallet-collective"
version = "2.0.0"
@@ -4686,28 +4569,6 @@ dependencies = [
"substrate-test-utils",
]
-[[package]]
-name = "pallet-evm"
-version = "2.0.0"
-dependencies = [
- "evm",
- "frame-support",
- "frame-system",
- "impl-trait-for-tuples",
- "pallet-balances",
- "pallet-timestamp",
- "parity-scale-codec",
- "primitive-types",
- "ripemd160",
- "rlp",
- "serde",
- "sha3 0.8.2",
- "sp-core",
- "sp-io",
- "sp-runtime",
- "sp-std",
-]
-
[[package]]
name = "pallet-example"
version = "2.0.0"
@@ -4849,6 +4710,24 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-mmr"
+version = "2.0.0"
+dependencies = [
+ "ckb-merkle-mountain-range",
+ "env_logger 0.5.13",
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "hex-literal",
+ "parity-scale-codec",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-multisig"
version = "2.0.0"
@@ -5178,6 +5057,24 @@ dependencies = [
"sp-timestamp",
]
+[[package]]
+name = "pallet-tips"
+version = "2.0.0"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "pallet-balances",
+ "pallet-treasury",
+ "parity-scale-codec",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+ "sp-storage",
+]
+
[[package]]
name = "pallet-transaction-payment"
version = "2.0.0"
@@ -5233,6 +5130,7 @@ dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
+ "impl-trait-for-tuples",
"pallet-balances",
"parity-scale-codec",
"serde",
@@ -5294,19 +5192,19 @@ dependencies = [
[[package]]
name = "parity-multiaddr"
-version = "0.9.6"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43244a26dc1ddd3097216bb12eaa6cf8a07b060c72718d9ebd60fd297d6401df"
+checksum = "2f51a30667591b14f96068b2d12f1306d07a41ebd98239d194356d4d9707ac16"
dependencies = [
"arrayref",
- "bs58 0.4.0",
+ "bs58",
"byteorder",
"data-encoding",
"multihash",
"percent-encoding 2.1.0",
"serde",
"static_assertions",
- "unsigned-varint 0.5.1",
+ "unsigned-varint",
"url 2.2.0",
]
@@ -5367,10 +5265,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c"
dependencies = [
"cfg-if 0.1.10",
- "ethereum-types",
"hashbrown 0.8.2",
"impl-trait-for-tuples",
- "lru 0.5.3",
"parity-util-mem-derive",
"parking_lot 0.10.2",
"primitive-types",
@@ -5671,6 +5567,12 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b"
+[[package]]
+name = "pin-project-lite"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c"
+
[[package]]
name = "pin-utils"
version = "0.1.0"
@@ -5785,7 +5687,6 @@ checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809"
dependencies = [
"fixed-hash",
"impl-codec",
- "impl-rlp",
"impl-serde",
"uint",
]
@@ -5949,7 +5850,7 @@ version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f"
dependencies = [
- "env_logger",
+ "env_logger 0.7.1",
"log",
"rand 0.7.3",
"rand_core 0.5.1",
@@ -5963,7 +5864,7 @@ checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858"
dependencies = [
"futures-core",
"futures-sink",
- "pin-project-lite",
+ "pin-project-lite 0.1.11",
]
[[package]]
@@ -6004,19 +5905,6 @@ dependencies = [
"winapi 0.3.9",
]
-[[package]]
-name = "rand"
-version = "0.5.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"
-dependencies = [
- "cloudabi 0.0.3",
- "fuchsia-cprng",
- "libc",
- "rand_core 0.3.1",
- "winapi 0.3.9",
-]
-
[[package]]
name = "rand"
version = "0.6.5"
@@ -6042,7 +5930,7 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
- "getrandom 0.1.15",
+ "getrandom",
"libc",
"rand_chacha 0.2.2",
"rand_core 0.5.1",
@@ -6091,7 +5979,16 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
dependencies = [
- "getrandom 0.1.15",
+ "getrandom",
+]
+
+[[package]]
+name = "rand_distr"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2"
+dependencies = [
+ "rand 0.7.3",
]
[[package]]
@@ -6238,7 +6135,7 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
dependencies = [
- "getrandom 0.1.15",
+ "getrandom",
"redox_syscall",
"rust-argon2",
]
@@ -6344,37 +6241,6 @@ dependencies = [
"winapi 0.3.9",
]
-[[package]]
-name = "ripemd160"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251"
-dependencies = [
- "block-buffer 0.9.0",
- "digest 0.9.0",
- "opaque-debug 0.3.0",
-]
-
-[[package]]
-name = "rlp"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1190dcc8c3a512f1eef5d09bb8c84c7f39e1054e174d1795482e18f5272f2e73"
-dependencies = [
- "rustc-hex",
-]
-
-[[package]]
-name = "rlp-derive"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "rocksdb"
version = "0.15.0"
@@ -6387,9 +6253,9 @@ dependencies = [
[[package]]
name = "rpassword"
-version = "4.0.5"
+version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f"
+checksum = "d755237fc0f99d98641540e66abac8bc46a0652f19148ac9e21de2da06b326c9"
dependencies = [
"libc",
"winapi 0.3.9",
@@ -6447,6 +6313,19 @@ dependencies = [
"webpki",
]
+[[package]]
+name = "rustls"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b"
+dependencies = [
+ "base64 0.13.0",
+ "log",
+ "ring",
+ "sct",
+ "webpki",
+]
+
[[package]]
name = "rustls-native-certs"
version = "0.4.0"
@@ -6454,7 +6333,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8"
dependencies = [
"openssl-probe",
- "rustls",
+ "rustls 0.18.1",
"schannel",
"security-framework",
]
@@ -6514,7 +6393,6 @@ name = "sc-authority-discovery"
version = "0.8.0"
dependencies = [
"async-trait",
- "bytes 0.5.6",
"derive_more",
"either",
"futures 0.3.8",
@@ -6527,7 +6405,6 @@ dependencies = [
"quickcheck",
"rand 0.7.3",
"sc-client-api",
- "sc-keystore",
"sc-network",
"sc-peerset",
"serde_json",
@@ -6625,7 +6502,6 @@ dependencies = [
"fdlimit",
"futures 0.3.8",
"hex",
- "lazy_static",
"libp2p",
"log",
"names",
@@ -6678,7 +6554,6 @@ dependencies = [
"fnv",
"futures 0.3.8",
"hash-db",
- "hex-literal",
"kvdb",
"kvdb-memorydb",
"lazy_static",
@@ -6686,7 +6561,6 @@ dependencies = [
"parity-scale-codec",
"parking_lot 0.10.2",
"sc-executor",
- "sc-telemetry",
"sp-api",
"sp-blockchain",
"sp-consensus",
@@ -6694,7 +6568,6 @@ dependencies = [
"sp-database",
"sp-externalities",
"sp-inherents",
- "sp-keyring",
"sp-keystore",
"sp-runtime",
"sp-state-machine",
@@ -6707,6 +6580,7 @@ dependencies = [
"sp-version",
"substrate-prometheus-endpoint",
"substrate-test-runtime",
+ "thiserror",
]
[[package]]
@@ -6970,6 +6844,7 @@ dependencies = [
"sp-state-machine",
"sp-trie",
"substrate-test-runtime-client",
+ "thiserror",
]
[[package]]
@@ -7030,14 +6905,13 @@ name = "sc-executor-common"
version = "0.8.0"
dependencies = [
"derive_more",
- "log",
"parity-scale-codec",
"parity-wasm 0.41.0",
"sp-allocator",
"sp-core",
- "sp-runtime-interface",
"sp-serializer",
"sp-wasm-interface",
+ "thiserror",
"wasmi",
]
@@ -7211,7 +7085,7 @@ dependencies = [
"async-std",
"async-trait",
"bitflags",
- "bs58 0.3.1",
+ "bs58",
"bytes 0.5.6",
"derive_more",
"either",
@@ -7227,10 +7101,10 @@ dependencies = [
"linked-hash-map",
"linked_hash_set",
"log",
- "lru 0.4.3",
+ "lru",
"nohash-hasher",
"parity-scale-codec",
- "parking_lot 0.10.2",
+ "parking_lot 0.11.1",
"pin-project 0.4.27",
"prost",
"prost-build",
@@ -7243,7 +7117,7 @@ dependencies = [
"serde_json",
"slog",
"slog_derive",
- "smallvec 0.6.13",
+ "smallvec 1.5.0",
"sp-arithmetic",
"sp-blockchain",
"sp-consensus",
@@ -7258,7 +7132,7 @@ dependencies = [
"substrate-test-runtime-client",
"tempfile",
"thiserror",
- "unsigned-varint 0.4.0",
+ "unsigned-varint",
"void",
"wasm-timer",
"zeroize",
@@ -7273,7 +7147,7 @@ dependencies = [
"futures-timer 3.0.2",
"libp2p",
"log",
- "lru 0.4.3",
+ "lru",
"quickcheck",
"rand 0.7.3",
"sc-network",
@@ -7377,11 +7251,13 @@ dependencies = [
"parity-scale-codec",
"parking_lot 0.10.2",
"sc-block-builder",
+ "sc-cli",
"sc-client-api",
"sc-executor",
"sc-keystore",
"sc-network",
"sc-rpc-api",
+ "sc-tracing",
"sc-transaction-pool",
"serde_json",
"sp-api",
@@ -7453,7 +7329,7 @@ dependencies = [
"sp-sandbox",
"sp-std",
"sp-tasks",
- "substrate-wasm-builder-runner",
+ "substrate-wasm-builder",
]
[[package]]
@@ -7461,8 +7337,7 @@ name = "sc-service"
version = "0.8.0"
dependencies = [
"async-std",
- "derive_more",
- "directories",
+ "directories 3.0.1",
"exit-future",
"futures 0.1.30",
"futures 0.3.8",
@@ -7520,6 +7395,7 @@ dependencies = [
"substrate-test-runtime",
"substrate-test-runtime-client",
"tempfile",
+ "thiserror",
"tokio 0.2.23",
"tracing",
"tracing-futures",
@@ -7573,6 +7449,7 @@ dependencies = [
"parking_lot 0.10.2",
"sc-client-api",
"sp-core",
+ "thiserror",
]
[[package]]
@@ -7591,6 +7468,7 @@ dependencies = [
"serde_json",
"sp-blockchain",
"sp-runtime",
+ "thiserror",
]
[[package]]
@@ -7617,9 +7495,13 @@ dependencies = [
name = "sc-tracing"
version = "2.0.0"
dependencies = [
+ "ansi_term 0.12.1",
"erased-serde",
+ "lazy_static",
"log",
+ "once_cell",
"parking_lot 0.10.2",
+ "regex",
"rustc-hash",
"sc-telemetry",
"serde",
@@ -7628,6 +7510,7 @@ dependencies = [
"sp-tracing",
"tracing",
"tracing-core",
+ "tracing-log",
"tracing-subscriber",
]
@@ -7652,6 +7535,7 @@ dependencies = [
"sp-transaction-pool",
"sp-utils",
"substrate-test-runtime",
+ "thiserror",
"wasm-timer",
]
@@ -7660,7 +7544,6 @@ name = "sc-transaction-pool"
version = "2.0.0"
dependencies = [
"assert_matches",
- "derive_more",
"futures 0.3.8",
"futures-diagnose",
"hex",
@@ -7684,6 +7567,7 @@ dependencies = [
"substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"substrate-test-runtime-transaction-pool",
+ "thiserror",
"wasm-timer",
]
@@ -7706,10 +7590,11 @@ dependencies = [
"arrayref",
"arrayvec 0.5.2",
"curve25519-dalek 2.1.0",
- "getrandom 0.1.15",
+ "getrandom",
"merlin",
"rand 0.7.3",
"rand_core 0.5.1",
+ "serde",
"sha2 0.8.2",
"subtle 2.3.0",
"zeroize",
@@ -7759,9 +7644,9 @@ dependencies = [
[[package]]
name = "secrecy"
-version = "0.6.0"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f"
+checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0"
dependencies = [
"zeroize",
]
@@ -7795,7 +7680,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
dependencies = [
- "semver-parser",
+ "semver-parser 0.7.0",
]
[[package]]
@@ -7804,7 +7689,16 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
dependencies = [
- "semver-parser",
+ "semver-parser 0.7.0",
+]
+
+[[package]]
+name = "semver"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
+dependencies = [
+ "semver-parser 0.10.1",
"serde",
]
@@ -7815,10 +7709,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]]
-name = "send_wrapper"
-version = "0.2.0"
+name = "semver-parser"
+version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4"
+checksum = "42ef146c2ad5e5f4b037cd6ce2ebb775401729b19a82040c1beac9d36c7d1428"
+dependencies = [
+ "pest",
+]
[[package]]
name = "send_wrapper"
@@ -7923,19 +7820,6 @@ dependencies = [
"opaque-debug 0.3.0",
]
-[[package]]
-name = "sha3"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf"
-dependencies = [
- "block-buffer 0.7.3",
- "byte-tools",
- "digest 0.8.1",
- "keccak",
- "opaque-debug 0.2.3",
-]
-
[[package]]
name = "sha3"
version = "0.9.1"
@@ -7979,6 +7863,18 @@ version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210"
+[[package]]
+name = "simba"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb931b1367faadea6b1ab1c306a860ec17aaa5fa39f367d0c744e69d971a1fb2"
+dependencies = [
+ "approx",
+ "num-complex",
+ "num-traits",
+ "paste 0.1.18",
+]
+
[[package]]
name = "slab"
version = "0.4.2"
@@ -8064,11 +7960,11 @@ dependencies = [
[[package]]
name = "socket2"
-version = "0.3.16"
+version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d"
+checksum = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902"
dependencies = [
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
"libc",
"redox_syscall",
"winapi 0.3.9",
@@ -8094,11 +7990,11 @@ dependencies = [
name = "sp-allocator"
version = "2.0.0"
dependencies = [
- "derive_more",
"log",
"sp-core",
"sp-std",
"sp-wasm-interface",
+ "thiserror",
]
[[package]]
@@ -8114,6 +8010,7 @@ dependencies = [
"sp-std",
"sp-test-primitives",
"sp-version",
+ "thiserror",
]
[[package]]
@@ -8232,11 +8129,12 @@ dependencies = [
name = "sp-blockchain"
version = "2.0.0"
dependencies = [
+ "futures 0.3.8",
"log",
- "lru 0.4.3",
+ "lru",
"parity-scale-codec",
"parking_lot 0.10.2",
- "sp-block-builder",
+ "sp-api",
"sp-consensus",
"sp-database",
"sp-runtime",
@@ -8489,6 +8387,7 @@ dependencies = [
"rand 0.7.3",
"rand_chacha 0.2.2",
"schnorrkel",
+ "serde",
"sp-core",
"sp-externalities",
]
@@ -8544,7 +8443,6 @@ name = "sp-panic-handler"
version = "2.0.0"
dependencies = [
"backtrace",
- "log",
]
[[package]]
@@ -8573,7 +8471,6 @@ dependencies = [
"sp-application-crypto",
"sp-arithmetic",
"sp-core",
- "sp-inherents",
"sp-io",
"sp-state-machine",
"sp-std",
@@ -8583,6 +8480,7 @@ dependencies = [
name = "sp-runtime-interface"
version = "2.0.0"
dependencies = [
+ "impl-trait-for-tuples",
"parity-scale-codec",
"primitive-types",
"rustversion",
@@ -8635,7 +8533,7 @@ dependencies = [
"sp-io",
"sp-runtime-interface",
"sp-std",
- "substrate-wasm-builder-runner",
+ "substrate-wasm-builder",
]
[[package]]
@@ -8646,7 +8544,7 @@ dependencies = [
"sp-io",
"sp-runtime-interface",
"sp-std",
- "substrate-wasm-builder-runner",
+ "substrate-wasm-builder",
]
[[package]]
@@ -8794,6 +8692,7 @@ dependencies = [
"sp-api",
"sp-blockchain",
"sp-runtime",
+ "thiserror",
]
[[package]]
@@ -8866,11 +8765,11 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "statrs"
-version = "0.10.0"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10102ac8d55e35db2b3fafc26f81ba8647da2e15879ab686a67e6d19af2685e8"
+checksum = "cce16f6de653e88beca7bd13780d08e09d4489dbca1f9210e041bc4852481382"
dependencies = [
- "rand 0.5.6",
+ "rand 0.7.3",
]
[[package]]
@@ -9132,7 +9031,7 @@ dependencies = [
"sp-trie",
"sp-version",
"substrate-test-runtime-client",
- "substrate-wasm-builder-runner",
+ "substrate-wasm-builder",
"trie-db",
]
@@ -9202,24 +9101,18 @@ dependencies = [
[[package]]
name = "substrate-wasm-builder"
-version = "2.0.1"
+version = "3.0.0"
dependencies = [
"ansi_term 0.12.1",
"atty",
"build-helper",
"cargo_metadata",
- "fs2",
- "itertools 0.8.2",
"tempfile",
"toml",
"walkdir",
"wasm-gc-api",
]
-[[package]]
-name = "substrate-wasm-builder-runner"
-version = "2.0.0"
-
[[package]]
name = "subtle"
version = "1.0.0"
@@ -9453,7 +9346,7 @@ dependencies = [
"mio",
"mio-uds",
"num_cpus",
- "pin-project-lite",
+ "pin-project-lite 0.1.11",
"signal-hook-registry",
"slab",
"tokio-macros",
@@ -9574,7 +9467,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a"
dependencies = [
"futures-core",
- "rustls",
+ "rustls 0.18.1",
"tokio 0.2.23",
"webpki",
]
@@ -9684,7 +9577,7 @@ dependencies = [
"futures-core",
"futures-sink",
"log",
- "pin-project-lite",
+ "pin-project-lite 0.1.11",
"tokio 0.2.23",
]
@@ -9705,13 +9598,13 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
[[package]]
name = "tracing"
-version = "0.1.21"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27"
+checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3"
dependencies = [
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
"log",
- "pin-project-lite",
+ "pin-project-lite 0.2.0",
"tracing-attributes",
"tracing-core",
]
@@ -9843,16 +9736,6 @@ dependencies = [
"keccak-hasher",
]
-[[package]]
-name = "triehash"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f490aa7aa4e4d07edeba442c007e42e3e7f43aafb5112c5b047fff0b1aa5449c"
-dependencies = [
- "hash-db",
- "rlp",
-]
-
[[package]]
name = "try-lock"
version = "0.2.3"
@@ -9862,8 +9745,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
name = "trybuild"
version = "1.0.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7d30fe369fd650072b352b1a9cb9587669de6b89be3b8225544012c1c45292d"
+source = "git+https://github.com/bkchr/trybuild.git?branch=bkchr-use-workspace-cargo-lock#0eaad05ba8a32a743751ff52b57a7d9f57da4869"
dependencies = [
"dissimilar",
"glob",
@@ -9964,18 +9846,6 @@ dependencies = [
"subtle 2.3.0",
]
-[[package]]
-name = "unsigned-varint"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "669d776983b692a906c881fcd0cfb34271a48e197e4d6cb8df32b05bfc3d3fa5"
-dependencies = [
- "bytes 0.5.6",
- "futures-io",
- "futures-util",
- "futures_codec",
-]
-
[[package]]
name = "unsigned-varint"
version = "0.5.1"
@@ -10135,9 +10005,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.17"
+version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699"
+checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da"
dependencies = [
"cfg-if 0.1.10",
"js-sys",
@@ -10176,9 +10046,9 @@ checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307"
[[package]]
name = "wasm-bindgen-test"
-version = "0.3.17"
+version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d92df9d5715606f9e48f85df3b78cb77ae44a2ea9a5f2a785a97bd0066b9300"
+checksum = "34d1cdc8b98a557f24733d50a1199c4b0635e465eecba9c45b214544da197f64"
dependencies = [
"console_error_panic_hook",
"js-sys",
@@ -10190,9 +10060,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-test-macro"
-version = "0.3.17"
+version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51611ce8e84cba89379d91fc5074bacc5530f69da1c09a2853d906129d12b3b8"
+checksum = "e8fb9c67be7439ee8ab1b7db502a49c05e51e2835b66796c705134d9b8e1a585"
dependencies = [
"proc-macro2",
"quote",
@@ -10211,15 +10081,14 @@ dependencies = [
[[package]]
name = "wasm-timer"
-version = "0.2.4"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54"
+checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
dependencies = [
"futures 0.3.8",
"js-sys",
- "parking_lot 0.9.0",
+ "parking_lot 0.11.1",
"pin-utils",
- "send_wrapper 0.2.0",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
@@ -10316,7 +10185,7 @@ dependencies = [
"cranelift-entity",
"cranelift-frontend",
"cranelift-wasm",
- "directories",
+ "directories 2.0.2",
"errno",
"file-per-thread-logger",
"indexmap",
@@ -10456,9 +10325,9 @@ dependencies = [
[[package]]
name = "webpki-roots"
-version = "0.20.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f"
+checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376"
dependencies = [
"webpki",
]
@@ -10561,9 +10430,9 @@ dependencies = [
[[package]]
name = "zeroize"
-version = "1.1.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a"
+checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36"
dependencies = [
"zeroize_derive",
]
diff --git a/Cargo.toml b/Cargo.toml
index b78c4da05580185bdd307e59955cfc3278f36c56..61282189da38a0445a1aeaad16979aeba6f44f74 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,19 +1,19 @@
[workspace]
members = [
"bin/node-template/node",
- "bin/node-template/runtime",
"bin/node-template/pallets/template",
+ "bin/node-template/runtime",
"bin/node/bench",
"bin/node/browser-testing",
"bin/node/cli",
"bin/node/executor",
"bin/node/primitives",
- "bin/node/rpc-client",
"bin/node/rpc",
+ "bin/node/rpc-client",
"bin/node/runtime",
"bin/node/testing",
- "bin/utils/subkey",
"bin/utils/chain-spec-builder",
+ "bin/utils/subkey",
"client/api",
"client/authority-discovery",
"client/basic-authorship",
@@ -26,56 +26,53 @@ members = [
"client/consensus/babe",
"client/consensus/babe/rpc",
"client/consensus/common",
+ "client/consensus/epochs",
"client/consensus/manual-seal",
"client/consensus/pow",
- "client/consensus/uncles",
"client/consensus/slots",
- "client/consensus/epochs",
+ "client/consensus/uncles",
"client/db",
"client/executor",
"client/executor/common",
+ "client/executor/runtime-test",
"client/executor/wasmi",
"client/executor/wasmtime",
- "client/executor/runtime-test",
"client/finality-grandpa",
"client/informant",
- "client/light",
- "client/tracing",
"client/keystore",
+ "client/light",
"client/network",
- "client/network/test",
"client/network-gossip",
+ "client/network/test",
"client/offchain",
"client/peerset",
"client/proposer-metrics",
- "client/rpc-servers",
"client/rpc",
"client/rpc-api",
+ "client/rpc-servers",
"client/service",
"client/service/test",
"client/state-db",
"client/sync-state-rpc",
"client/telemetry",
+ "client/tracing",
"client/transaction-pool",
"client/transaction-pool/graph",
- "utils/prometheus",
- "utils/wasm-builder-runner",
"frame/assets",
- "frame/aura",
"frame/atomic-swap",
+ "frame/aura",
"frame/authority-discovery",
"frame/authorship",
"frame/babe",
"frame/balances",
"frame/benchmarking",
+ "frame/bounties",
"frame/collective",
"frame/contracts",
"frame/contracts/rpc",
"frame/contracts/rpc/runtime-api",
"frame/democracy",
- "frame/elections-phragmen",
"frame/elections",
- "frame/evm",
"frame/example",
"frame/example-offchain-worker",
"frame/example-parallel",
@@ -85,6 +82,7 @@ members = [
"frame/im-online",
"frame/indices",
"frame/membership",
+ "frame/merkle-mountain-range",
"frame/metadata",
"frame/multisig",
"frame/nicks",
@@ -99,8 +97,8 @@ members = [
"frame/session/benchmarking",
"frame/society",
"frame/staking",
- "frame/staking/reward-curve",
"frame/staking/fuzzer",
+ "frame/staking/reward-curve",
"frame/sudo",
"frame/support",
"frame/support/procedural",
@@ -115,62 +113,63 @@ members = [
"frame/transaction-payment/rpc",
"frame/transaction-payment/rpc/runtime-api",
"frame/treasury",
+ "frame/tips",
"frame/utility",
"frame/vesting",
"primitives/allocator",
+ "primitives/api",
+ "primitives/api/proc-macro",
+ "primitives/api/test",
"primitives/application-crypto",
"primitives/application-crypto/test",
+ "primitives/arithmetic",
+ "primitives/arithmetic/fuzzer",
"primitives/authority-discovery",
"primitives/authorship",
"primitives/block-builder",
"primitives/blockchain",
+ "primitives/chain-spec",
"primitives/consensus/aura",
"primitives/consensus/babe",
"primitives/consensus/common",
"primitives/consensus/pow",
"primitives/consensus/vrf",
"primitives/core",
- "primitives/chain-spec",
"primitives/database",
"primitives/debug-derive",
- "primitives/storage",
"primitives/externalities",
"primitives/finality-grandpa",
"primitives/inherents",
+ "primitives/io",
"primitives/keyring",
"primitives/keystore",
- "primitives/offchain",
- "primitives/panic-handler",
"primitives/npos-elections",
- "primitives/npos-elections/fuzzer",
"primitives/npos-elections/compact",
+ "primitives/npos-elections/fuzzer",
+ "primitives/offchain",
+ "primitives/panic-handler",
"primitives/rpc",
+ "primitives/runtime",
"primitives/runtime-interface",
"primitives/runtime-interface/proc-macro",
+ "primitives/runtime-interface/test",
"primitives/runtime-interface/test-wasm",
"primitives/runtime-interface/test-wasm-deprecated",
- "primitives/runtime-interface/test",
+ "primitives/sandbox",
"primitives/serializer",
"primitives/session",
- "primitives/api",
- "primitives/api/proc-macro",
- "primitives/api/test",
- "primitives/arithmetic",
- "primitives/arithmetic/fuzzer",
- "primitives/io",
- "primitives/runtime",
- "primitives/sandbox",
"primitives/staking",
- "primitives/std",
- "primitives/version",
"primitives/state-machine",
+ "primitives/std",
+ "primitives/storage",
"primitives/tasks",
- "primitives/timestamp",
"primitives/test-primitives",
- "primitives/transaction-pool",
+ "primitives/timestamp",
"primitives/tracing",
+ "primitives/transaction-pool",
"primitives/trie",
"primitives/utils",
+ "primitives/version",
"primitives/wasm-interface",
"test-utils/client",
"test-utils/derive",
@@ -185,6 +184,7 @@ members = [
"utils/frame/frame-utilities-cli",
"utils/frame/rpc/support",
"utils/frame/rpc/system",
+ "utils/prometheus",
"utils/wasm-builder",
]
@@ -209,7 +209,6 @@ aesni = { opt-level = 3 }
blake2 = { opt-level = 3 }
blake2-rfc = { opt-level = 3 }
blake2b_simd = { opt-level = 3 }
-blake2s_simd = { opt-level = 3 }
chacha20poly1305 = { opt-level = 3 }
cranelift-codegen = { opt-level = 3 }
cranelift-wasm = { opt-level = 3 }
@@ -219,8 +218,6 @@ crossbeam-queue = { opt-level = 3 }
crypto-mac = { opt-level = 3 }
curve25519-dalek = { opt-level = 3 }
ed25519-dalek = { opt-level = 3 }
-evm-core = { opt-level = 3 }
-evm-runtime = { opt-level = 3 }
flate2 = { opt-level = 3 }
futures-channel = { opt-level = 3 }
hashbrown = { opt-level = 3 }
diff --git a/bin/node-template/README.md b/bin/node-template/README.md
index c1aeefe895095a4bd34de39b5d447615f212f06f..8c8b82a14bb86975bda14410d6313500b0388cbe 100644
--- a/bin/node-template/README.md
+++ b/bin/node-template/README.md
@@ -157,7 +157,7 @@ Review the [FRAME runtime implementation](./runtime/src/lib.rs) included in this
the following:
- This file configures several pallets to include in the runtime. Each pallet configuration is
- defined by a code block that begins with `impl $PALLET_NAME::Trait for Runtime`.
+ defined by a code block that begins with `impl $PALLET_NAME::Config for Runtime`.
- The pallets are composed into a single runtime by way of the
[`construct_runtime!`](https://crates.parity.io/frame_support/macro.construct_runtime.html)
macro, which is part of the core
@@ -181,8 +181,8 @@ A FRAME pallet is compromised of a number of blockchain primitives:
- Events: Substrate uses [events](https://substrate.dev/docs/en/knowledgebase/runtime/events) to
notify users of important changes in the runtime.
- Errors: When a dispatchable fails, it returns an error.
-- Trait: The `Trait` configuration interface is used to define the types and parameters upon which
- a FRAME pallet depends.
+- Config: The `Config` configuration interface is used to define the types and parameters upon
+ which a FRAME pallet depends.
## Generate a Custom Node Template
diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml
index d2b5a35b352b25d3b89788cd31727cdae94b5cfc..38cdaa1eea48c7b7ef257474ef5d73842e20ac84 100644
--- a/bin/node-template/node/Cargo.toml
+++ b/bin/node-template/node/Cargo.toml
@@ -22,6 +22,7 @@ sc-cli = { version = "0.8.0", path = "../../../client/cli", features = ["wasmtim
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"] }
+sc-keystore = { version = "2.0.0", path = "../../../client/keystore" }
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" }
diff --git a/bin/node-template/node/src/cli.rs b/bin/node-template/node/src/cli.rs
index f2faf17e4ddf44b724292d014d542b63b594b56f..947123a6bbf5b927edc33c4a3d6d370cee359d28 100644
--- a/bin/node-template/node/src/cli.rs
+++ b/bin/node-template/node/src/cli.rs
@@ -12,6 +12,8 @@ pub struct Cli {
#[derive(Debug, StructOpt)]
pub enum Subcommand {
+ /// Key management cli utilities
+ Key(sc_cli::KeySubcommand),
/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),
diff --git a/bin/node-template/node/src/command.rs b/bin/node-template/node/src/command.rs
index ac950b50483acafde212f4cfa7d4bcff34c5ca55..5c41643a2932f67479ec5cf0529a48248f7f5b1f 100644
--- a/bin/node-template/node/src/command.rs
+++ b/bin/node-template/node/src/command.rs
@@ -66,6 +66,7 @@ pub fn run() -> sc_cli::Result<()> {
let cli = Cli::from_args();
match &cli.subcommand {
+ Some(Subcommand::Key(cmd)) => cmd.run(),
Some(Subcommand::BuildSpec(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs
index d85de7c840dfd04c60f212e19ae947520ce0c87b..7e1939fb023a8082d0abb147902b27b484f1fe35 100644
--- a/bin/node-template/node/src/service.rs
+++ b/bin/node-template/node/src/service.rs
@@ -9,7 +9,8 @@ use sp_inherents::InherentDataProviders;
use sc_executor::native_executor_instance;
pub use sc_executor::NativeExecutor;
use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
-use sc_finality_grandpa::{FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState};
+use sc_finality_grandpa::SharedVoterState;
+use sc_keystore::LocalKeystore;
// Our native executor instance.
native_executor_instance!(
@@ -37,6 +38,10 @@ pub fn new_partial(config: &Configuration) -> Result
)
>, ServiceError> {
+ if config.keystore_remote.is_some() {
+ return Err(ServiceError::Other(
+ format!("Remote Keystores are not supported.")))
+ }
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
let (client, backend, keystore_container, task_manager) =
@@ -64,7 +69,6 @@ pub fn new_partial(config: &Configuration) -> Result Result Result, &'static str> {
+ // FIXME: here would the concrete keystore be built,
+ // must return a concrete type (NOT `LocalKeystore`) that
+ // implements `CryptoStore` and `SyncCryptoStore`
+ Err("Remote Keystore not supported.")
+}
+
/// Builds a new service for a full client.
-pub fn new_full(config: Configuration) -> Result {
+pub fn new_full(mut config: Configuration) -> Result {
let sc_service::PartialComponents {
- client, backend, mut task_manager, import_queue, keystore_container,
+ client, backend, mut task_manager, import_queue, mut keystore_container,
select_chain, transaction_pool, inherent_data_providers,
other: (block_import, grandpa_link),
} = new_partial(&config)?;
- let finality_proof_provider =
- GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
+ if let Some(url) = &config.keystore_remote {
+ match remote_keystore(url) {
+ Ok(k) => keystore_container.set_remote_keystore(k),
+ Err(e) => {
+ return Err(ServiceError::Other(
+ format!("Error hooking up remote keystore for {}: {}", url, e)))
+ }
+ };
+ }
+ config.network.notifications_protocols.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into());
let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams {
@@ -99,8 +118,6 @@ pub fn new_full(config: Configuration) -> Result {
import_queue,
on_demand: None,
block_announce_validator_builder: None,
- finality_proof_request_builder: None,
- finality_proof_provider: Some(finality_proof_provider.clone()),
})?;
if config.offchain_worker.enabled {
@@ -216,8 +233,6 @@ pub fn new_full(config: Configuration) -> Result {
"grandpa-voter",
sc_finality_grandpa::run_grandpa_voter(grandpa_config)?
);
- } else {
- sc_finality_grandpa::setup_disabled_grandpa(network)?;
}
network_starter.start_network();
@@ -225,10 +240,14 @@ pub fn new_full(config: Configuration) -> Result {
}
/// Builds a new service for a light client.
-pub fn new_light(config: Configuration) -> Result {
+pub fn new_light(mut config: Configuration) -> Result {
let (client, backend, keystore_container, mut task_manager, on_demand) =
sc_service::new_light_parts::(&config)?;
+ config.network.notifications_protocols.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into());
+
+ let select_chain = sc_consensus::LongestChain::new(backend.clone());
+
let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
config.transaction_pool.clone(),
config.prometheus_registry(),
@@ -237,19 +256,21 @@ pub fn new_light(config: Configuration) -> Result {
on_demand.clone(),
));
- let grandpa_block_import = sc_finality_grandpa::light_block_import(
- client.clone(), backend.clone(), &(client.clone() as Arc<_>),
- Arc::new(on_demand.checker().clone()) as Arc<_>,
+ let (grandpa_block_import, _) = sc_finality_grandpa::block_import(
+ client.clone(),
+ &(client.clone() as Arc<_>),
+ select_chain.clone(),
)?;
- let finality_proof_import = grandpa_block_import.clone();
- let finality_proof_request_builder =
- finality_proof_import.create_finality_proof_request_builder();
+
+ let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
+ grandpa_block_import.clone(),
+ client.clone(),
+ );
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
sc_consensus_aura::slot_duration(&*client)?,
- grandpa_block_import,
- None,
- Some(Box::new(finality_proof_import)),
+ aura_block_import,
+ Some(Box::new(grandpa_block_import)),
client.clone(),
InherentDataProviders::new(),
&task_manager.spawn_handle(),
@@ -257,9 +278,6 @@ pub fn new_light(config: Configuration) -> Result {
sp_consensus::NeverCanAuthor,
)?;
- let finality_proof_provider =
- GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
-
let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &config,
@@ -269,8 +287,6 @@ pub fn new_light(config: Configuration) -> Result {
import_queue,
on_demand: Some(on_demand.clone()),
block_announce_validator_builder: None,
- finality_proof_request_builder: Some(finality_proof_request_builder),
- finality_proof_provider: Some(finality_proof_provider),
})?;
if config.offchain_worker.enabled {
diff --git a/bin/node-template/pallets/template/src/lib.rs b/bin/node-template/pallets/template/src/lib.rs
index 729a71278aa9f1c2f37760274b547253799871fb..24de4f2f50dd5cc76678ee0931c02cd5cab3cd31 100644
--- a/bin/node-template/pallets/template/src/lib.rs
+++ b/bin/node-template/pallets/template/src/lib.rs
@@ -14,9 +14,9 @@ mod mock;
mod tests;
/// Configure the pallet by specifying the parameters and types on which it depends.
-pub trait Trait: frame_system::Trait {
+pub trait Config: frame_system::Config {
/// Because this pallet emits events, it depends on the runtime's definition of an event.
- type Event: From> + Into<::Event>;
+ type Event: From> + Into<::Event>;
}
// The pallet's runtime storage items.
@@ -25,7 +25,7 @@ decl_storage! {
// A unique name is used to ensure that the pallet's storage items are isolated.
// This name may be updated, but each pallet in the runtime must use a unique name.
// ---------------------------------vvvvvvvvvvvvvv
- trait Store for Module as TemplateModule {
+ trait Store for Module as TemplateModule {
// Learn more about declaring storage items:
// https://substrate.dev/docs/en/knowledgebase/runtime/storage#declaring-storage-items
Something get(fn something): Option;
@@ -35,7 +35,7 @@ decl_storage! {
// Pallets use events to inform users when important changes are made.
// https://substrate.dev/docs/en/knowledgebase/runtime/events
decl_event!(
- pub enum Event where AccountId = ::AccountId {
+ pub enum Event where AccountId = ::AccountId {
/// Event documentation should end with an array that provides descriptive names for event
/// parameters. [something, who]
SomethingStored(u32, AccountId),
@@ -44,7 +44,7 @@ decl_event!(
// Errors inform users that something went wrong.
decl_error! {
- pub enum Error for Module {
+ pub enum Error for Module {
/// Error names should be descriptive.
NoneValue,
/// Errors should have helpful documentation associated with them.
@@ -56,7 +56,7 @@ decl_error! {
// These functions materialize as "extrinsics", which are often compared to transactions.
// Dispatchable functions must be annotated with a weight and must return a DispatchResult.
decl_module! {
- pub struct Module for enum Call where origin: T::Origin {
+ pub struct Module for enum Call where origin: T::Origin {
// Errors must be initialized if they are used by the pallet.
type Error = Error;
diff --git a/bin/node-template/pallets/template/src/mock.rs b/bin/node-template/pallets/template/src/mock.rs
index a3dff240e4847d518343507f084d6ca4339f7a43..84af63a1c3bb8c0a5b21b33511385d0ff5f1be0a 100644
--- a/bin/node-template/pallets/template/src/mock.rs
+++ b/bin/node-template/pallets/template/src/mock.rs
@@ -1,8 +1,8 @@
-use crate::{Module, Trait};
+use crate::{Module, Config};
use sp_core::H256;
-use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
+use frame_support::{impl_outer_origin, parameter_types};
use sp_runtime::{
- traits::{BlakeTwo256, IdentityLookup}, testing::Header, Perbill,
+ traits::{BlakeTwo256, IdentityLookup}, testing::Header,
};
use frame_system as system;
@@ -16,13 +16,13 @@ impl_outer_origin! {
pub struct Test;
parameter_types! {
pub const BlockHashCount: u64 = 250;
- pub const MaximumBlockWeight: Weight = 1024;
- pub const MaximumBlockLength: u32 = 2 * 1024;
- pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
}
-impl system::Trait for Test {
+impl system::Config for Test {
type BaseCallFilter = ();
+ type BlockWeights = ();
+ type BlockLength = ();
+ type DbWeight = ();
type Origin = Origin;
type Call = ();
type Index = u64;
@@ -34,13 +34,6 @@ impl system::Trait for Test {
type Header = Header;
type Event = ();
type BlockHashCount = BlockHashCount;
- type MaximumBlockWeight = MaximumBlockWeight;
- type DbWeight = ();
- type BlockExecutionWeight = ();
- type ExtrinsicBaseWeight = ();
- type MaximumExtrinsicWeight = MaximumBlockWeight;
- type MaximumBlockLength = MaximumBlockLength;
- type AvailableBlockRatio = AvailableBlockRatio;
type Version = ();
type PalletInfo = ();
type AccountData = ();
@@ -49,7 +42,7 @@ impl system::Trait for Test {
type SystemWeightInfo = ();
}
-impl Trait for Test {
+impl Config for Test {
type Event = ();
}
diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml
index ed5a114b813f814e05688a2900dbfa1b288dd7d8..f1b15070ddde90b3f159ae13a49481c3a189a379 100644
--- a/bin/node-template/runtime/Cargo.toml
+++ b/bin/node-template/runtime/Cargo.toml
@@ -48,7 +48,7 @@ hex-literal = { version = "0.3.1", optional = true }
template = { version = "2.0.0", default-features = false, path = "../pallets/template", package = "pallet-template" }
[build-dependencies]
-wasm-builder-runner = { version = "2.0.0", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }
+substrate-wasm-builder = { version = "3.0.0", path = "../../../utils/wasm-builder" }
[features]
default = ["std"]
diff --git a/bin/node-template/runtime/build.rs b/bin/node-template/runtime/build.rs
index 9654139121f6f50e2c649a28e79852c8598e630f..9b53d2457dffdc09ea4789b644e6d2b2a3cfc0f5 100644
--- a/bin/node-template/runtime/build.rs
+++ b/bin/node-template/runtime/build.rs
@@ -1,9 +1,8 @@
-use wasm_builder_runner::WasmBuilder;
+use substrate_wasm_builder::WasmBuilder;
fn main() {
WasmBuilder::new()
.with_current_project()
- .with_wasm_builder_from_crates("2.0.1")
.export_heap_base()
.import_memory()
.build()
diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs
index aadfd931cdb507598cbe2683c138c8d7661285f9..51df3dd5a3e4507e2ca51435a5126d0c4941b245 100644
--- a/bin/node-template/runtime/src/lib.rs
+++ b/bin/node-template/runtime/src/lib.rs
@@ -13,7 +13,7 @@ use sp_runtime::{
transaction_validity::{TransactionValidity, TransactionSource},
};
use sp_runtime::traits::{
- BlakeTwo256, Block as BlockT, AccountIdLookup, Verify, IdentifyAccount, NumberFor, Saturating,
+ BlakeTwo256, Block as BlockT, AccountIdLookup, Verify, IdentifyAccount, NumberFor,
};
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
@@ -126,23 +126,27 @@ pub fn native_version() -> NativeVersion {
}
}
+const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
+
parameter_types! {
+ pub const Version: RuntimeVersion = VERSION;
pub const BlockHashCount: BlockNumber = 2400;
/// We allow for 2 seconds of compute with a 6 second average block time.
- pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
- pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
- /// Assume 10% of weight for average on_initialize calls.
- pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
- .saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
- pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
- pub const Version: RuntimeVersion = VERSION;
+ pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights
+ ::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO);
+ pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength
+ ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
}
// Configure FRAME pallets to include in runtime.
-impl frame_system::Trait for Runtime {
+impl frame_system::Config for Runtime {
/// The basic call filter to use in dispatchable.
type BaseCallFilter = ();
+ /// Block & extrinsics weights: base values and limits.
+ type BlockWeights = BlockWeights;
+ /// The maximum length of a block (in bytes).
+ type BlockLength = BlockLength;
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
/// The aggregated dispatch type that is available for extrinsics.
@@ -165,24 +169,8 @@ impl frame_system::Trait for Runtime {
type Origin = Origin;
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
type BlockHashCount = BlockHashCount;
- /// Maximum weight of each block.
- type MaximumBlockWeight = MaximumBlockWeight;
/// The weight of database operations that the runtime can invoke.
type DbWeight = RocksDbWeight;
- /// The weight of the overhead invoked on the block import process, independent of the
- /// extrinsics included in that block.
- type BlockExecutionWeight = BlockExecutionWeight;
- /// The base weight of any extrinsic processed by the runtime, independent of the
- /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...)
- type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
- /// The maximum weight that a single extrinsic of `Normal` dispatch class can have,
- /// idependent of the logic of that extrinsics. (Roughly max block weight - average on
- /// initialize cost).
- type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
- /// Maximum size of all encoded transactions (in bytes) that are allowed in one block.
- type MaximumBlockLength = MaximumBlockLength;
- /// Portion of the block weight that is available to all normal transactions.
- type AvailableBlockRatio = AvailableBlockRatio;
/// Version of the runtime.
type Version = Version;
/// Converts a module to the index of the module in `construct_runtime!`.
@@ -199,11 +187,11 @@ impl frame_system::Trait for Runtime {
type SystemWeightInfo = ();
}
-impl pallet_aura::Trait for Runtime {
+impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
}
-impl pallet_grandpa::Trait for Runtime {
+impl pallet_grandpa::Config for Runtime {
type Event = Event;
type Call = Call;
@@ -226,7 +214,7 @@ parameter_types! {
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
}
-impl pallet_timestamp::Trait for Runtime {
+impl pallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
@@ -239,7 +227,7 @@ parameter_types! {
pub const MaxLocks: u32 = 50;
}
-impl pallet_balances::Trait for Runtime {
+impl pallet_balances::Config for Runtime {
type MaxLocks = MaxLocks;
/// The type for recording an account's balance.
type Balance = Balance;
@@ -255,20 +243,20 @@ parameter_types! {
pub const TransactionByteFee: Balance = 1;
}
-impl pallet_transaction_payment::Trait for Runtime {
+impl pallet_transaction_payment::Config for Runtime {
type OnChargeTransaction = CurrencyAdapter;
type TransactionByteFee = TransactionByteFee;
type WeightToFee = IdentityFee;
type FeeMultiplierUpdate = ();
}
-impl pallet_sudo::Trait for Runtime {
+impl pallet_sudo::Config for Runtime {
type Event = Event;
type Call = Call;
}
/// Configure the pallet template in pallets/template.
-impl template::Trait for Runtime {
+impl template::Config for Runtime {
type Event = Event;
}
@@ -457,7 +445,7 @@ impl_runtime_apis! {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
use frame_system_benchmarking::Module as SystemBench;
- impl frame_system_benchmarking::Trait for Runtime {}
+ impl frame_system_benchmarking::Config for Runtime {}
let whitelist: Vec = vec![
// Block Number
diff --git a/bin/node/browser-testing/Cargo.toml b/bin/node/browser-testing/Cargo.toml
index 3ca5a3feaee9604c1efae3df096b64a660a45fd3..f60dc55b6f7e6c9643097a923b870e1961abc447 100644
--- a/bin/node/browser-testing/Cargo.toml
+++ b/bin/node/browser-testing/Cargo.toml
@@ -8,13 +8,13 @@ license = "Apache-2.0"
[dependencies]
futures-timer = "3.0.2"
-libp2p = { version = "0.30.1", default-features = false }
+libp2p = { version = "0.32.2", default-features = false }
jsonrpc-core = "15.0.0"
serde = "1.0.106"
serde_json = "1.0.48"
wasm-bindgen = { version = "=0.2.68", features = ["serde-serialize"] }
-wasm-bindgen-futures = "0.4.10"
-wasm-bindgen-test = "0.3.17"
+wasm-bindgen-futures = "0.4.18"
+wasm-bindgen-test = "0.3.18"
futures = "0.3.4"
node-cli = { path = "../cli", default-features = false, features = ["browser"] , version = "2.0.0"}
diff --git a/bin/node/browser-testing/src/lib.rs b/bin/node/browser-testing/src/lib.rs
index 777e5ea9f132e44d888ce8ea68b8d9e8fdf44655..f4dc0908567828eb7cd658b76cb27d8575274ad5 100644
--- a/bin/node/browser-testing/src/lib.rs
+++ b/bin/node/browser-testing/src/lib.rs
@@ -26,7 +26,7 @@
//! ```
//! For debug infomation, such as the informant, run without the `--headless`
//! flag and open a browser to the url that `wasm-pack test` outputs.
-//! For more infomation see https://rustwasm.github.io/docs/wasm-pack/.
+//! For more infomation see .
use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
use wasm_bindgen_futures::JsFuture;
diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml
index 26a23ce36ecc0fd6c6a5a4e61133551e242db7bf..6574ccb733b52a3d48a77e38be10e5b358bb328e 100644
--- a/bin/node/cli/Cargo.toml
+++ b/bin/node/cli/Cargo.toml
@@ -41,7 +41,7 @@ hex-literal = "0.3.1"
log = "0.4.8"
rand = "0.7.2"
structopt = { version = "0.3.8", optional = true }
-tracing = "0.1.19"
+tracing = "0.1.22"
parking_lot = "0.10.0"
# primitives
@@ -102,7 +102,7 @@ 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 }
+wasm-bindgen-futures = { version = "0.4.18", optional = true }
browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.8.0"}
[target.'cfg(target_arch="x86_64")'.dependencies]
diff --git a/bin/node/cli/src/chain_spec.rs b/bin/node/cli/src/chain_spec.rs
index 90824a5572f12f9e50f19703e96f2a9c046c5e40..83dc95e3b64dffec313816a1d251935777538f5d 100644
--- a/bin/node/cli/src/chain_spec.rs
+++ b/bin/node/cli/src/chain_spec.rs
@@ -218,7 +218,7 @@ pub fn testnet_genesis(
endowed_accounts: Option>,
enable_println: bool,
) -> GenesisConfig {
- let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(|| {
+ let mut endowed_accounts: Vec = endowed_accounts.unwrap_or_else(|| {
vec![
get_account_id_from_seed::("Alice"),
get_account_id_from_seed::("Bob"),
@@ -234,10 +234,16 @@ pub fn testnet_genesis(
get_account_id_from_seed::("Ferdie//stash"),
]
});
+ initial_authorities.iter().for_each(|x|
+ if !endowed_accounts.contains(&x.0) {
+ endowed_accounts.push(x.0.clone())
+ }
+ );
+
let num_endowed_accounts = endowed_accounts.len();
const ENDOWMENT: Balance = 10_000_000 * DOLLARS;
- const STASH: Balance = 100 * DOLLARS;
+ const STASH: Balance = ENDOWMENT / 1000;
GenesisConfig {
frame_system: Some(SystemConfig {
@@ -246,9 +252,8 @@ pub fn testnet_genesis(
}),
pallet_balances: Some(BalancesConfig {
balances: endowed_accounts.iter().cloned()
- .map(|k| (k, ENDOWMENT))
- .chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
- .collect(),
+ .map(|x| (x, ENDOWMENT))
+ .collect()
}),
pallet_indices: Some(IndicesConfig {
indices: vec![],
diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs
index 3bc406b84fc67481b94535829b06dc372c258b84..5eb8e35e69ec5e36c6f282919905d855accdad24 100644
--- a/bin/node/cli/src/service.rs
+++ b/bin/node/cli/src/service.rs
@@ -22,7 +22,6 @@
use std::sync::Arc;
use sc_consensus_babe;
-use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider};
use node_primitives::Block;
use node_runtime::RuntimeApi;
use sc_service::{
@@ -57,10 +56,7 @@ pub fn new_partial(config: &Configuration) -> Result,
sc_consensus_babe::BabeLink,
),
- (
- grandpa::SharedVoterState,
- Arc>,
- ),
+ grandpa::SharedVoterState,
)
>, ServiceError> {
let (client, backend, keystore_container, task_manager) =
@@ -93,7 +89,6 @@ pub fn new_partial(config: &Configuration) -> Result Result,
&sc_consensus_babe::BabeLink,
@@ -181,7 +176,9 @@ pub fn new_full_base(
other: (rpc_extensions_builder, import_setup, rpc_setup),
} = new_partial(&config)?;
- let (shared_voter_state, finality_proof_provider) = rpc_setup;
+ let shared_voter_state = rpc_setup;
+
+ config.network.notifications_protocols.push(grandpa::GRANDPA_PROTOCOL_NAME.into());
let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams {
@@ -192,8 +189,6 @@ pub fn new_full_base(
import_queue,
on_demand: None,
block_announce_validator_builder: None,
- finality_proof_request_builder: None,
- finality_proof_provider: Some(finality_proof_provider.clone()),
})?;
if config.offchain_worker.enabled {
@@ -322,8 +317,6 @@ pub fn new_full_base(
"grandpa-voter",
grandpa::run_grandpa_voter(grandpa_config)?
);
- } else {
- grandpa::setup_disabled_grandpa(network.clone())?;
}
network_starter.start_network();
@@ -345,7 +338,7 @@ pub fn new_full(config: Configuration)
})
}
-pub fn new_light_base(config: Configuration) -> Result<(
+pub fn new_light_base(mut config: Configuration) -> Result<(
TaskManager, RpcHandlers, Arc,
Arc::Hash>>,
Arc>>
@@ -353,6 +346,8 @@ pub fn new_light_base(config: Configuration) -> Result<(
let (client, backend, keystore_container, mut task_manager, on_demand) =
sc_service::new_light_parts::(&config)?;
+ config.network.notifications_protocols.push(grandpa::GRANDPA_PROTOCOL_NAME.into());
+
let select_chain = sc_consensus::LongestChain::new(backend.clone());
let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
@@ -363,14 +358,12 @@ pub fn new_light_base(config: Configuration) -> Result<(
on_demand.clone(),
));
- let grandpa_block_import = grandpa::light_block_import(
- client.clone(), backend.clone(), &(client.clone() as Arc<_>),
- Arc::new(on_demand.checker().clone()),
+ let (grandpa_block_import, _) = grandpa::block_import(
+ client.clone(),
+ &(client.clone() as Arc<_>),
+ select_chain.clone(),
)?;
-
- let finality_proof_import = grandpa_block_import.clone();
- let finality_proof_request_builder =
- finality_proof_import.create_finality_proof_request_builder();
+ let justification_import = grandpa_block_import.clone();
let (babe_block_import, babe_link) = sc_consensus_babe::block_import(
sc_consensus_babe::Config::get_or_compute(&*client)?,
@@ -383,8 +376,7 @@ pub fn new_light_base(config: Configuration) -> Result<(
let import_queue = sc_consensus_babe::import_queue(
babe_link,
babe_block_import,
- None,
- Some(Box::new(finality_proof_import)),
+ Some(Box::new(justification_import)),
client.clone(),
select_chain.clone(),
inherent_data_providers.clone(),
@@ -393,9 +385,6 @@ pub fn new_light_base(config: Configuration) -> Result<(
sp_consensus::NeverCanAuthor,
)?;
- let finality_proof_provider =
- GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
-
let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &config,
@@ -405,8 +394,6 @@ pub fn new_light_base(config: Configuration) -> Result<(
import_queue,
on_demand: Some(on_demand.clone()),
block_announce_validator_builder: None,
- finality_proof_request_builder: Some(finality_proof_request_builder),
- finality_proof_provider: Some(finality_proof_provider),
})?;
network_starter.start_network();
diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs
index a48efaea2d6958632b72979cd467b8c4ba5fad65..09438bfacd455ca73e8718d9785c1bef6329e208 100644
--- a/bin/node/executor/tests/basic.rs
+++ b/bin/node/executor/tests/basic.rs
@@ -27,7 +27,6 @@ use sp_runtime::{
traits::Hash as HashT,
transaction_validity::InvalidTransaction,
};
-use pallet_contracts::ContractAddressFor;
use frame_system::{self, EventRecord, Phase};
use node_runtime::{
@@ -581,15 +580,15 @@ const CODE_TRANSFER: &str = r#"
#[test]
fn deploying_wasm_contract_should_work() {
let transfer_code = wat::parse_str(CODE_TRANSFER).unwrap();
- let transfer_ch = ::Hashing::hash(&transfer_code);
+ let transfer_ch = ::Hashing::hash(&transfer_code);
- let addr = ::DetermineContractAddress::contract_address_for(
+ let addr = pallet_contracts::Module::::contract_address(
+ &charlie(),
&transfer_ch,
&[],
- &charlie(),
);
- let subsistence = pallet_contracts::Config::::subsistence_threshold_uncached();
+ let subsistence = pallet_contracts::ConfigCache::::subsistence_threshold_uncached();
let b = construct_block(
&mut new_test_ext(compact_code_unwrap(), false),
@@ -613,7 +612,8 @@ fn deploying_wasm_contract_should_work() {
1 * DOLLARS + subsistence,
500_000_000,
transfer_ch,
- Vec::new()
+ Vec::new(),
+ Vec::new(),
)
),
},
diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml
index 26d9de133c6883c8e2404fd6d996985f336e09df..e88a18032698ebbe0636a82ffd394d36ed5361c7 100644
--- a/bin/node/rpc-client/Cargo.toml
+++ b/bin/node/rpc-client/Cargo.toml
@@ -12,7 +12,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.1.29"
-hyper = "0.12.35"
+hyper = "~0.12.35"
jsonrpc-core-client = { version = "15.1.0", default-features = false, features = ["http"] }
log = "0.4.8"
node-primitives = { version = "2.0.0", path = "../primitives" }
diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml
index 2bad2db510be4fae67b1c3bcaff5eb4803a9258b..4dabc5c0159210be654df67e3762d639ff8cd8ca 100644
--- a/bin/node/runtime/Cargo.toml
+++ b/bin/node/runtime/Cargo.toml
@@ -43,10 +43,12 @@ frame-support = { version = "2.0.0", default-features = false, path = "../../../
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-assets = { version = "2.0.0", default-features = false, path = "../../../frame/assets" }
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-bounties = { version = "2.0.0", default-features = false, path = "../../../frame/bounties" }
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/" }
@@ -58,6 +60,7 @@ pallet-im-online = { version = "2.0.0", default-features = false, path = "../../
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-mmr = { version = "2.0.0", default-features = false, path = "../../../frame/merkle-mountain-range" }
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 }
@@ -72,6 +75,7 @@ pallet-scheduler = { version = "2.0.0", default-features = false, path = "../../
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-tips = { version = "2.0.0", default-features = false, path = "../../../frame/tips" }
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" }
@@ -79,7 +83,7 @@ pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0", default-featur
pallet-vesting = { version = "2.0.0", default-features = false, path = "../../../frame/vesting" }
[build-dependencies]
-wasm-builder-runner = { version = "2.0.0", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }
+substrate-wasm-builder = { version = "3.0.0", path = "../../../utils/wasm-builder" }
[dev-dependencies]
sp-io = { version = "2.0.0", path = "../../../primitives/io" }
@@ -89,11 +93,13 @@ default = ["std"]
with-tracing = [ "frame-executive/with-tracing" ]
std = [
"sp-authority-discovery/std",
+ "pallet-assets/std",
"pallet-authority-discovery/std",
"pallet-authorship/std",
"sp-consensus-babe/std",
"pallet-babe/std",
"pallet-balances/std",
+ "pallet-bounties/std",
"sp-block-builder/std",
"codec/std",
"pallet-collective/std",
@@ -108,6 +114,7 @@ std = [
"pallet-indices/std",
"sp-inherents/std",
"pallet-membership/std",
+ "pallet-mmr/std",
"pallet-multisig/std",
"pallet-identity/std",
"pallet-scheduler/std",
@@ -132,6 +139,7 @@ std = [
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"pallet-timestamp/std",
+ "pallet-tips/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"pallet-treasury/std",
@@ -147,8 +155,10 @@ runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
+ "pallet-assets/runtime-benchmarks",
"pallet-babe/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
+ "pallet-bounties/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-contracts/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
@@ -157,12 +167,14 @@ runtime-benchmarks = [
"pallet-identity/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
+ "pallet-mmr/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-society/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
+ "pallet-tips/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
diff --git a/bin/node/runtime/build.rs b/bin/node/runtime/build.rs
index 4f111bc9930078d09f02a1e189e2edcd26c993e4..8a0b4d7a0c15745cbc743130b522ddf693d3822b 100644
--- a/bin/node/runtime/build.rs
+++ b/bin/node/runtime/build.rs
@@ -15,12 +15,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use wasm_builder_runner::WasmBuilder;
+use substrate_wasm_builder::WasmBuilder;
fn main() {
WasmBuilder::new()
.with_current_project()
- .with_wasm_builder_from_crates_or_path("2.0.1", "../../../utils/wasm-builder")
.export_heap_base()
.import_memory()
.build()
diff --git a/bin/node/runtime/src/impls.rs b/bin/node/runtime/src/impls.rs
index 16666997b3a5597b807296f1b285177216342577..d7910c2c63b8a81c498f764e912ea1a48ee70886 100644
--- a/bin/node/runtime/src/impls.rs
+++ b/bin/node/runtime/src/impls.rs
@@ -34,13 +34,15 @@ mod multiplier_tests {
use crate::{
constants::{currency::*, time::*},
- TransactionPayment, MaximumBlockWeight, AvailableBlockRatio, Runtime, TargetBlockFullness,
+ TransactionPayment, Runtime, TargetBlockFullness,
AdjustmentVariable, System, MinimumMultiplier,
+ RuntimeBlockWeights as BlockWeights,
};
- use frame_support::weights::{Weight, WeightToFeePolynomial};
+ use frame_support::weights::{Weight, WeightToFeePolynomial, DispatchClass};
- fn max() -> Weight {
- AvailableBlockRatio::get() * MaximumBlockWeight::get()
+ fn max_normal() -> Weight {
+ BlockWeights::get().get(DispatchClass::Normal).max_total
+ .unwrap_or_else(|| BlockWeights::get().max_block)
}
fn min_multiplier() -> Multiplier {
@@ -48,7 +50,7 @@ mod multiplier_tests {
}
fn target() -> Weight {
- TargetBlockFullness::get() * max()
+ TargetBlockFullness::get() * max_normal()
}
// update based on runtime impl.
@@ -69,7 +71,7 @@ mod multiplier_tests {
let previous_float = previous_float.max(min_multiplier().into_inner() as f64 / accuracy);
// maximum tx weight
- let m = max() as f64;
+ let m = max_normal() as f64;
// block weight always truncated to max weight
let block_weight = (block_weight as f64).min(m);
let v: f64 = AdjustmentVariable::get().to_fraction();
@@ -89,7 +91,7 @@ mod multiplier_tests {
let mut t: sp_io::TestExternalities =
frame_system::GenesisConfig::default().build_storage::().unwrap().into();
t.execute_with(|| {
- System::set_block_limits(w, 0);
+ System::set_block_consumed_resources(w, 0);
assertions()
});
}
@@ -102,8 +104,8 @@ mod multiplier_tests {
(100, fm.clone()),
(1000, fm.clone()),
(target(), fm.clone()),
- (max() / 2, fm.clone()),
- (max(), fm.clone()),
+ (max_normal() / 2, fm.clone()),
+ (max_normal(), fm.clone()),
];
test_set.into_iter().for_each(|(w, fm)| {
run_with_system_weight(w, || {
@@ -164,7 +166,7 @@ mod multiplier_tests {
#[test]
fn min_change_per_day() {
- run_with_system_weight(max(), || {
+ run_with_system_weight(max_normal(), || {
let mut fm = Multiplier::one();
// See the example in the doc of `TargetedFeeAdjustment`. are at least 0.234, hence
// `fm > 1.234`.
@@ -182,7 +184,7 @@ mod multiplier_tests {
// `cargo test congested_chain_simulation -- --nocapture` to get some insight.
// almost full. The entire quota of normal transactions is taken.
- let block_weight = AvailableBlockRatio::get() * max() - 100;
+ let block_weight = BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap() - 100;
// Default substrate weight.
let tx_weight = frame_support::weights::constants::ExtrinsicBaseWeight::get();
@@ -200,7 +202,7 @@ mod multiplier_tests {
fm = next;
iterations += 1;
let fee =
- ::WeightToFee::calc(&tx_weight);
+ ::WeightToFee::calc(&tx_weight);
let adjusted_fee = fm.saturating_mul_acc_int(fee);
println!(
"iteration {}, new fm = {:?}. Fee at this point is: {} units / {} millicents, \
@@ -320,15 +322,19 @@ mod multiplier_tests {
10 * mb,
2147483647,
4294967295,
- MaximumBlockWeight::get() / 2,
- MaximumBlockWeight::get(),
+ BlockWeights::get().max_block / 2,
+ BlockWeights::get().max_block,
Weight::max_value() / 2,
Weight::max_value(),
].into_iter().for_each(|i| {
run_with_system_weight(i, || {
let next = runtime_multiplier_update(Multiplier::one());
let truth = truth_value_update(i, Multiplier::one());
- assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000));
+ assert_eq_error_rate!(
+ truth,
+ next,
+ Multiplier::from_inner(50_000_000)
+ );
});
});
diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs
index 3e08b2cf8a6f8408e80d0d3550dc8cca8c92047e..fb77fd2ebd405c7a738c27ab12e64115f5ea3e1a 100644
--- a/bin/node/runtime/src/lib.rs
+++ b/bin/node/runtime/src/lib.rs
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-//! The Substrate runtime. This can be compiled with ``#[no_std]`, ready for Wasm.
+//! The Substrate runtime. This can be compiled with `#[no_std]`, ready for Wasm.
#![cfg_attr(not(feature = "std"), no_std)]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
@@ -28,14 +28,17 @@ use frame_support::{
construct_runtime, parameter_types, debug, RuntimeDebug,
weights::{
Weight, IdentityFee,
- constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
+ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, DispatchClass,
},
traits::{
Currency, Imbalance, KeyOwnerProofSystem, OnUnbalanced, Randomness, LockIdentifier,
U128CurrencyToVote,
},
};
-use frame_system::{EnsureRoot, EnsureOneOf};
+use frame_system::{
+ EnsureRoot, EnsureOneOf,
+ limits::{BlockWeights, BlockLength}
+};
use frame_support::traits::InstanceFilter;
use codec::{Encode, Decode};
use sp_core::{
@@ -54,7 +57,7 @@ use sp_runtime::curve::PiecewiseLinear;
use sp_runtime::transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority};
use sp_runtime::traits::{
self, BlakeTwo256, Block as BlockT, StaticLookup, SaturatedConversion,
- ConvertInto, OpaqueKeys, NumberFor, Saturating,
+ ConvertInto, OpaqueKeys, NumberFor,
};
use sp_version::RuntimeVersion;
#[cfg(any(feature = "std", test))]
@@ -91,11 +94,11 @@ use sp_runtime::generic::Era;
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
+/// Wasm binary unwrapped. If built with `SKIP_WASM_BUILD`, the function panics.
#[cfg(feature = "std")]
-/// Wasm binary unwrapped. If built with `BUILD_DUMMY_WASM_BINARY`, the function panics.
pub fn wasm_binary_unwrap() -> &'static [u8] {
WASM_BINARY.expect("Development wasm binary is not available. This means the client is \
- built with `BUILD_DUMMY_WASM_BINARY` flag and it is only usable for \
+ built with `SKIP_WASM_BUILD` flag and it is only usable for \
production chains. Please rebuild with the flag disabled.")
}
@@ -141,23 +144,47 @@ impl OnUnbalanced for DealWithFees {
}
}
-const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10);
+/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
+/// This is used to limit the maximal weight of a single extrinsic.
+const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
+/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
+/// by Operational extrinsics.
+const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
+/// We allow for 2 seconds of compute with a 6 second average block time.
+const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND;
+
parameter_types! {
pub const BlockHashCount: BlockNumber = 2400;
- /// We allow for 2 seconds of compute with a 6 second average block time.
- pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
- pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
- /// Assume 10% of weight for average on_initialize calls.
- pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get().saturating_sub(AVERAGE_ON_INITIALIZE_WEIGHT)
- * MaximumBlockWeight::get();
- pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
pub const Version: RuntimeVersion = VERSION;
-}
-
-const_assert!(AvailableBlockRatio::get().deconstruct() >= AVERAGE_ON_INITIALIZE_WEIGHT.deconstruct());
-
-impl frame_system::Trait for Runtime {
+ pub RuntimeBlockLength: BlockLength =
+ BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
+ pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()
+ .base_block(BlockExecutionWeight::get())
+ .for_class(DispatchClass::all(), |weights| {
+ weights.base_extrinsic = ExtrinsicBaseWeight::get();
+ })
+ .for_class(DispatchClass::Normal, |weights| {
+ weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
+ })
+ .for_class(DispatchClass::Operational, |weights| {
+ weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);
+ // Operational transactions have some extra reserved space, so that they
+ // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.
+ weights.reserved = Some(
+ MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT
+ );
+ })
+ .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
+ .build_or_panic();
+}
+
+const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct());
+
+impl frame_system::Config for Runtime {
type BaseCallFilter = ();
+ type BlockWeights = RuntimeBlockWeights;
+ type BlockLength = RuntimeBlockLength;
+ type DbWeight = RocksDbWeight;
type Origin = Origin;
type Call = Call;
type Index = Index;
@@ -169,13 +196,6 @@ impl frame_system::Trait for Runtime {
type Header = generic::Header;
type Event = Event;
type BlockHashCount = BlockHashCount;
- type MaximumBlockWeight = MaximumBlockWeight;
- type DbWeight = RocksDbWeight;
- type BlockExecutionWeight = BlockExecutionWeight;
- type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
- type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
- type MaximumBlockLength = MaximumBlockLength;
- type AvailableBlockRatio = AvailableBlockRatio;
type Version = Version;
type PalletInfo = PalletInfo;
type AccountData = pallet_balances::AccountData;
@@ -184,7 +204,7 @@ impl frame_system::Trait for Runtime {
type SystemWeightInfo = frame_system::weights::SubstrateWeight;
}
-impl pallet_utility::Trait for Runtime {
+impl pallet_utility::Config for Runtime {
type Event = Event;
type Call = Call;
type WeightInfo = pallet_utility::weights::SubstrateWeight;
@@ -198,7 +218,7 @@ parameter_types! {
pub const MaxSignatories: u16 = 100;
}
-impl pallet_multisig::Trait for Runtime {
+impl pallet_multisig::Config for Runtime {
type Event = Event;
type Call = Call;
type Currency = Balances;
@@ -261,7 +281,7 @@ impl InstanceFilter for ProxyType {
}
}
-impl pallet_proxy::Trait for Runtime {
+impl pallet_proxy::Config for Runtime {
type Event = Event;
type Call = Call;
type Currency = Balances;
@@ -277,11 +297,12 @@ impl pallet_proxy::Trait for Runtime {
}
parameter_types! {
- pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * MaximumBlockWeight::get();
+ pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *
+ RuntimeBlockWeights::get().max_block;
pub const MaxScheduledPerBlock: u32 = 50;
}
-impl pallet_scheduler::Trait for Runtime {
+impl pallet_scheduler::Config for Runtime {
type Event = Event;
type Origin = Origin;
type PalletsOrigin = OriginCaller;
@@ -297,7 +318,7 @@ parameter_types! {
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
}
-impl pallet_babe::Trait for Runtime {
+impl pallet_babe::Config for Runtime {
type EpochDuration = EpochDuration;
type ExpectedBlockTime = ExpectedBlockTime;
type EpochChangeTrigger = pallet_babe::ExternalTrigger;
@@ -324,7 +345,7 @@ parameter_types! {
pub const IndexDeposit: Balance = 1 * DOLLARS;
}
-impl pallet_indices::Trait for Runtime {
+impl pallet_indices::Config for Runtime {
type AccountIndex = AccountIndex;
type Currency = Balances;
type Deposit = IndexDeposit;
@@ -339,7 +360,7 @@ parameter_types! {
pub const MaxLocks: u32 = 50;
}
-impl pallet_balances::Trait for Runtime {
+impl pallet_balances::Config for Runtime {
type MaxLocks = MaxLocks;
type Balance = Balance;
type DustRemoval = ();
@@ -356,7 +377,7 @@ parameter_types! {
pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128);
}
-impl pallet_transaction_payment::Trait for Runtime {
+impl pallet_transaction_payment::Config for Runtime {
type OnChargeTransaction = CurrencyAdapter;
type TransactionByteFee = TransactionByteFee;
type WeightToFee = IdentityFee;
@@ -368,7 +389,7 @@ parameter_types! {
pub const MinimumPeriod: Moment = SLOT_DURATION / 2;
}
-impl pallet_timestamp::Trait for Runtime {
+impl pallet_timestamp::Config for Runtime {
type Moment = Moment;
type OnTimestampSet = Babe;
type MinimumPeriod = MinimumPeriod;
@@ -379,7 +400,7 @@ parameter_types! {
pub const UncleGenerations: BlockNumber = 5;
}
-impl pallet_authorship::Trait for Runtime {
+impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex;
type UncleGenerations = UncleGenerations;
type FilterUncle = ();
@@ -399,9 +420,9 @@ parameter_types! {
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17);
}
-impl pallet_session::Trait for Runtime {
+impl pallet_session::Config for Runtime {
type Event = Event;
- type ValidatorId = ::AccountId;
+ type ValidatorId = ::AccountId;
type ValidatorIdOf = pallet_staking::StashOf;
type ShouldEndSession = Babe;
type NextSessionRotation = Babe;
@@ -412,7 +433,7 @@ impl pallet_session::Trait for Runtime {
type WeightInfo = pallet_session::weights::SubstrateWeight;
}
-impl pallet_session::historical::Trait for Runtime {
+impl pallet_session::historical::Config for Runtime {
type FullIdentification = pallet_staking::Exposure;
type FullIdentificationOf = pallet_staking::ExposureOf;
}
@@ -438,12 +459,13 @@ parameter_types! {
pub const MaxIterations: u32 = 10;
// 0.05%. The higher the value, the more strict solution acceptance becomes.
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
- pub OffchainSolutionWeightLimit: Weight = MaximumExtrinsicWeight::get()
- .saturating_sub(BlockExecutionWeight::get())
- .saturating_sub(ExtrinsicBaseWeight::get());
+ pub OffchainSolutionWeightLimit: Weight = RuntimeBlockWeights::get()
+ .get(DispatchClass::Normal)
+ .max_extrinsic.expect("Normal extrinsics have a weight limit configured; qed")
+ .saturating_sub(BlockExecutionWeight::get());
}
-impl pallet_staking::Trait for Runtime {
+impl pallet_staking::Config for Runtime {
type Currency = Balances;
type UnixTime = Timestamp;
type CurrencyToVote = U128CurrencyToVote;
@@ -489,7 +511,7 @@ parameter_types! {
pub const MaxProposals: u32 = 100;
}
-impl pallet_democracy::Trait for Runtime {
+impl pallet_democracy::Config for Runtime {
type Proposal = Call;
type Event = Event;
type Currency = Balances;
@@ -541,7 +563,7 @@ parameter_types! {
}
type CouncilCollective = pallet_collective::Instance1;
-impl pallet_collective::Trait for Runtime {
+impl pallet_collective::Config for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
@@ -564,7 +586,7 @@ parameter_types! {
// Make sure that there are no more than `MaxMembers` members elected via elections-phragmen.
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
-impl pallet_elections_phragmen::Trait for Runtime {
+impl pallet_elections_phragmen::Config for Runtime {
type Event = Event;
type ModuleId = ElectionsPhragmenModuleId;
type Currency = Balances;
@@ -591,7 +613,7 @@ parameter_types! {
}
type TechnicalCollective = pallet_collective::Instance2;
-impl pallet_collective::Trait for Runtime {
+impl pallet_collective::Config for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
@@ -607,7 +629,7 @@ type EnsureRootOrHalfCouncil = EnsureOneOf<
EnsureRoot,
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
>;
-impl pallet_membership::Trait for Runtime {
+impl pallet_membership::Config for Runtime {
type Event = Event;
type AddOrigin = EnsureRootOrHalfCouncil;
type RemoveOrigin = EnsureRootOrHalfCouncil;
@@ -636,7 +658,7 @@ parameter_types! {
pub const BountyValueMinimum: Balance = 5 * DOLLARS;
}
-impl pallet_treasury::Trait for Runtime {
+impl pallet_treasury::Config for Runtime {
type ModuleId = TreasuryModuleId;
type Currency = Balances;
type ApproveOrigin = EnsureOneOf<
@@ -649,25 +671,38 @@ impl pallet_treasury::Trait for Runtime {
EnsureRoot,
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
>;
- type Tippers = Elections;
- type TipCountdown = TipCountdown;
- type TipFindersFee = TipFindersFee;
- type TipReportDepositBase = TipReportDepositBase;
- type DataDepositPerByte = DataDepositPerByte;
type Event = Event;
type OnSlash = ();
type ProposalBond = ProposalBond;
type ProposalBondMinimum = ProposalBondMinimum;
type SpendPeriod = SpendPeriod;
type Burn = Burn;
+ type BurnDestination = ();
+ type SpendFunds = Bounties;
+ type WeightInfo = pallet_treasury::weights::SubstrateWeight;
+}
+
+impl pallet_bounties::Config for Runtime {
+ type Event = Event;
type BountyDepositBase = BountyDepositBase;
type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
type BountyUpdatePeriod = BountyUpdatePeriod;
type BountyCuratorDeposit = BountyCuratorDeposit;
type BountyValueMinimum = BountyValueMinimum;
+ type DataDepositPerByte = DataDepositPerByte;
type MaximumReasonLength = MaximumReasonLength;
- type BurnDestination = ();
- type WeightInfo = pallet_treasury::weights::SubstrateWeight;
+ type WeightInfo = pallet_bounties::weights::SubstrateWeight;
+}
+
+impl pallet_tips::Config for Runtime {
+ type Event = Event;
+ type DataDepositPerByte = DataDepositPerByte;
+ type MaximumReasonLength = MaximumReasonLength;
+ type Tippers = Elections;
+ type TipCountdown = TipCountdown;
+ type TipFindersFee = TipFindersFee;
+ type TipReportDepositBase = TipReportDepositBase;
+ type WeightInfo = pallet_tips::weights::SubstrateWeight;
}
parameter_types! {
@@ -675,29 +710,31 @@ parameter_types! {
pub const RentByteFee: Balance = 4 * MILLICENTS;
pub const RentDepositOffset: Balance = 1000 * MILLICENTS;
pub const SurchargeReward: Balance = 150 * MILLICENTS;
+ pub const SignedClaimHandicap: u32 = 2;
+ pub const MaxDepth: u32 = 32;
+ pub const StorageSizeOffset: u32 = 8;
+ pub const MaxValueSize: u32 = 16 * 1024;
}
-impl pallet_contracts::Trait for Runtime {
+impl pallet_contracts::Config for Runtime {
type Time = Timestamp;
type Randomness = RandomnessCollectiveFlip;
type Currency = Balances;
type Event = Event;
- type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminer;
- type TrieIdGenerator = pallet_contracts::TrieIdFromParentCounter;
type RentPayment = ();
- type SignedClaimHandicap = pallet_contracts::DefaultSignedClaimHandicap;
+ type SignedClaimHandicap = SignedClaimHandicap;
type TombstoneDeposit = TombstoneDeposit;
- type StorageSizeOffset = pallet_contracts::DefaultStorageSizeOffset;
+ type StorageSizeOffset = StorageSizeOffset;
type RentByteFee = RentByteFee;
type RentDepositOffset = RentDepositOffset;
type SurchargeReward = SurchargeReward;
- type MaxDepth = pallet_contracts::DefaultMaxDepth;
- type MaxValueSize = pallet_contracts::DefaultMaxValueSize;
+ type MaxDepth = MaxDepth;
+ type MaxValueSize = MaxValueSize;
type WeightPrice = pallet_transaction_payment::Module;
type WeightInfo = pallet_contracts::weights::SubstrateWeight;
}
-impl pallet_sudo::Trait for Runtime {
+impl pallet_sudo::Config for Runtime {
type Event = Event;
type Call = Call;
}
@@ -767,7 +804,7 @@ impl frame_system::offchain::SendTransactionTypes for Runtime where
type OverarchingCall = Call;
}
-impl pallet_im_online::Trait for Runtime {
+impl pallet_im_online::Config for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type SessionDuration = SessionDuration;
@@ -777,19 +814,20 @@ impl pallet_im_online::Trait for Runtime {
}
parameter_types! {
- pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
+ pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) *
+ RuntimeBlockWeights::get().max_block;
}
-impl pallet_offences::Trait for Runtime {
+impl pallet_offences::Config for Runtime {
type Event = Event;
type IdentificationTuple = pallet_session::historical::IdentificationTuple;
type OnOffenceHandler = Staking;
type WeightSoftLimit = OffencesWeightSoftLimit;
}
-impl pallet_authority_discovery::Trait for Runtime {}
+impl pallet_authority_discovery::Config for Runtime {}
-impl pallet_grandpa::Trait for Runtime {
+impl pallet_grandpa::Config for Runtime {
type Event = Event;
type Call = Call;
@@ -818,7 +856,7 @@ parameter_types! {
pub const MaxRegistrars: u32 = 20;
}
-impl pallet_identity::Trait for Runtime {
+impl pallet_identity::Config for Runtime {
type Event = Event;
type Currency = Balances;
type BasicDeposit = BasicDeposit;
@@ -840,7 +878,7 @@ parameter_types! {
pub const RecoveryDeposit: Balance = 5 * DOLLARS;
}
-impl pallet_recovery::Trait for Runtime {
+impl pallet_recovery::Config for Runtime {
type Event = Event;
type Call = Call;
type Currency = Balances;
@@ -861,7 +899,7 @@ parameter_types! {
pub const SocietyModuleId: ModuleId = ModuleId(*b"py/socie");
}
-impl pallet_society::Trait for Runtime {
+impl pallet_society::Config for Runtime {
type Event = Event;
type ModuleId = SocietyModuleId;
type Currency = Balances;
@@ -882,7 +920,7 @@ parameter_types! {
pub const MinVestedTransfer: Balance = 100 * DOLLARS;
}
-impl pallet_vesting::Trait for Runtime {
+impl pallet_vesting::Config for Runtime {
type Event = Event;
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
@@ -890,6 +928,31 @@ impl pallet_vesting::Trait for Runtime {
type WeightInfo = pallet_vesting::weights::SubstrateWeight;
}
+impl pallet_mmr::Config for Runtime {
+ const INDEXING_PREFIX: &'static [u8] = b"mmr";
+ type Hashing = ::Hashing;
+ type Hash = ::Hash;
+ type LeafData = frame_system::Module;
+ type OnNewRoot = ();
+ type WeightInfo = ();
+}
+
+parameter_types! {
+ pub const AssetDepositBase: Balance = 100 * DOLLARS;
+ pub const AssetDepositPerZombie: Balance = 1 * DOLLARS;
+}
+
+impl pallet_assets::Config for Runtime {
+ type Event = Event;
+ type Balance = u64;
+ type AssetId = u32;
+ type Currency = Balances;
+ type ForceOrigin = EnsureRoot;
+ type AssetDepositBase = AssetDepositBase;
+ type AssetDepositPerZombie = AssetDepositPerZombie;
+ type WeightInfo = pallet_assets::weights::SubstrateWeight;
+}
+
construct_runtime!(
pub enum Runtime where
Block = Block,
@@ -927,6 +990,10 @@ construct_runtime!(
Scheduler: pallet_scheduler::{Module, Call, Storage, Event},
Proxy: pallet_proxy::{Module, Call, Storage, Event},
Multisig: pallet_multisig::{Module, Call, Storage, Event},
+ Bounties: pallet_bounties::{Module, Call, Storage, Event},
+ Tips: pallet_tips::{Module, Call, Storage, Event},
+ Assets: pallet_assets::{Module, Call, Storage, Event},
+ Mmr: pallet_mmr::{Module, Storage},
}
);
@@ -1171,9 +1238,9 @@ impl_runtime_apis! {
use pallet_offences_benchmarking::Module as OffencesBench;
use frame_system_benchmarking::Module as SystemBench;
- impl pallet_session_benchmarking::Trait for Runtime {}
- impl pallet_offences_benchmarking::Trait for Runtime {}
- impl frame_system_benchmarking::Trait for Runtime {}
+ impl pallet_session_benchmarking::Config for Runtime {}
+ impl pallet_offences_benchmarking::Config for Runtime {}
+ impl frame_system_benchmarking::Config for Runtime {}
let whitelist: Vec = vec![
// Block Number
@@ -1193,8 +1260,10 @@ impl_runtime_apis! {
let mut batches = Vec::::new();
let params = (&config, &whitelist);
+ add_benchmark!(params, batches, pallet_assets, Assets);
add_benchmark!(params, batches, pallet_babe, Babe);
add_benchmark!(params, batches, pallet_balances, Balances);
+ add_benchmark!(params, batches, pallet_bounties, Bounties);
add_benchmark!(params, batches, pallet_collective, Council);
add_benchmark!(params, batches, pallet_contracts, Contracts);
add_benchmark!(params, batches, pallet_democracy, Democracy);
@@ -1203,6 +1272,7 @@ impl_runtime_apis! {
add_benchmark!(params, batches, pallet_identity, Identity);
add_benchmark!(params, batches, pallet_im_online, ImOnline);
add_benchmark!(params, batches, pallet_indices, Indices);
+ add_benchmark!(params, batches, pallet_mmr, Mmr);
add_benchmark!(params, batches, pallet_multisig, Multisig);
add_benchmark!(params, batches, pallet_offences, OffencesBench::);
add_benchmark!(params, batches, pallet_proxy, Proxy);
@@ -1211,6 +1281,7 @@ impl_runtime_apis! {
add_benchmark!(params, batches, pallet_staking, Staking);
add_benchmark!(params, batches, frame_system, SystemBench::);
add_benchmark!(params, batches, pallet_timestamp, Timestamp);
+ add_benchmark!(params, batches, pallet_tips, Tips);
add_benchmark!(params, batches, pallet_treasury, Treasury);
add_benchmark!(params, batches, pallet_utility, Utility);
add_benchmark!(params, batches, pallet_vesting, Vesting);
diff --git a/bin/node/testing/src/bench.rs b/bin/node/testing/src/bench.rs
index a123da25301d073214c7d6ec48b362e445143096..35af52a2f36c1ad3170ff418fb4900c2f3a758f0 100644
--- a/bin/node/testing/src/bench.rs
+++ b/bin/node/testing/src/bench.rs
@@ -695,7 +695,6 @@ impl BenchContext {
clear_justification_requests: false,
needs_justification: false,
bad_justification: false,
- needs_finality_proof: false,
is_new_best: true,
}
)
diff --git a/bin/utils/subkey/src/lib.rs b/bin/utils/subkey/src/lib.rs
index 051628e84a193419221d0eccd04f797dc2b56a23..c38a48576524301f85f323b6986ece5ab052b3d0 100644
--- a/bin/utils/subkey/src/lib.rs
+++ b/bin/utils/subkey/src/lib.rs
@@ -63,7 +63,7 @@ pub enum Subkey {
/// Run the subkey command, given the apropriate runtime.
pub fn run() -> Result<(), Error>
where
- R: frame_system::Trait,
+ R: frame_system::Config,
R::AccountId: Ss58Codec
{
match Subkey::from_args() {
diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml
index d0fb5fc3ee0e2e82034f09f227df63fd1a635060..07036bfb414a26e45f7cfdd7d09120b3666c1842 100644
--- a/client/api/Cargo.toml
+++ b/client/api/Cargo.toml
@@ -23,9 +23,7 @@ fnv = "1.0.6"
futures = "0.3.1"
hash-db = { version = "0.15.2", default-features = false }
sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
-hex-literal = "0.3.1"
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"
@@ -39,7 +37,6 @@ 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" }
@@ -49,3 +46,4 @@ prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.
kvdb-memorydb = "0.7.0"
sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
+thiserror = "1.0.21"
diff --git a/client/api/src/light.rs b/client/api/src/light.rs
index 144851dac0075f9c2a31f01225aaee5bb9504178..f9ba64544a8c0199072e82b010a33d72de6c2a79 100644
--- a/client/api/src/light.rs
+++ b/client/api/src/light.rs
@@ -312,13 +312,21 @@ pub mod tests {
use sp_test_primitives::{Block, Header, Extrinsic};
use super::*;
+ #[derive(Debug, thiserror::Error)]
+ #[error("Not implemented on test node")]
+ struct MockError;
+
+ impl Into for MockError {
+ fn into(self) -> ClientError {
+ ClientError::Application(Box::new(self))
+ }
+ }
+
pub type OkCallFetcher = Mutex>;
- fn not_implemented_in_tests() -> Ready>
- where
- E: std::convert::From<&'static str>,
+ fn not_implemented_in_tests() -> Ready>
{
- futures::future::ready(Err("Not implemented on test node".into()))
+ futures::future::ready(Err(MockError.into()))
}
impl Fetcher for OkCallFetcher {
diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml
index 40b929fc8a0f4b944c799ad9bef58e9a2e85f305..8878becd7e02a34e3986185dc6d53588a1b48e6c 100644
--- a/client/authority-discovery/Cargo.toml
+++ b/client/authority-discovery/Cargo.toml
@@ -18,19 +18,17 @@ prost-build = "0.6.1"
[dependencies]
async-trait = "0.1"
-bytes = "0.5.0"
codec = { package = "parity-scale-codec", default-features = false, version = "1.3.4" }
derive_more = "0.99.2"
either = "1.5.3"
futures = "0.3.4"
futures-timer = "3.0.1"
-libp2p = { version = "0.30.1", default-features = false, features = ["kad"] }
+libp2p = { version = "0.32.2", default-features = false, features = ["kad"] }
log = "0.4.8"
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", 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", path = "../../primitives/authority-discovery" }
diff --git a/client/authority-discovery/src/error.rs b/client/authority-discovery/src/error.rs
index 48bcdf33114b11d33e9331a8b7c221350b8d105b..82e4a6dd6f3fde8d25b54ab7304de77f9908b35c 100644
--- a/client/authority-discovery/src/error.rs
+++ b/client/authority-discovery/src/error.rs
@@ -31,7 +31,7 @@ pub enum Error {
/// Failed to verify a dht payload with the given signature.
VerifyingDhtPayload,
/// Failed to hash the authority id to be used as a dht key.
- HashingAuthorityId(libp2p::core::multiaddr::multihash::EncodeError),
+ HashingAuthorityId(libp2p::core::multiaddr::multihash::Error),
/// Failed calling into the Substrate runtime.
CallingRuntime(sp_blockchain::Error),
/// Received a dht record with a key that does not match any in-flight awaited keys.
diff --git a/client/authority-discovery/src/interval.rs b/client/authority-discovery/src/interval.rs
new file mode 100644
index 0000000000000000000000000000000000000000..b3aa5b1c0f6785f68a9689e6f45a94e7e08b9d19
--- /dev/null
+++ b/client/authority-discovery/src/interval.rs
@@ -0,0 +1,62 @@
+// Copyright 2020 Parity Technologies (UK) Ltd.
+// This file is part of Substrate.
+
+// Substrate is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Substrate is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Substrate. If not, see .
+
+use futures::stream::Stream;
+use futures::future::FutureExt;
+use futures::ready;
+use futures_timer::Delay;
+use std::pin::Pin;
+use std::task::{Context, Poll};
+use std::time::Duration;
+
+/// Exponentially increasing interval
+///
+/// Doubles interval duration on each tick until the configured maximum is reached.
+pub struct ExpIncInterval {
+ max: Duration,
+ next: Duration,
+ delay: Delay,
+}
+
+impl ExpIncInterval {
+ /// Create a new [`ExpIncInterval`].
+ pub fn new(start: Duration, max: Duration) -> Self {
+ let delay = Delay::new(start);
+ Self {
+ max,
+ next: start * 2,
+ delay,
+ }
+ }
+
+ /// Fast forward the exponentially increasing interval to the configured maximum.
+ pub fn set_to_max(&mut self) {
+ self.next = self.max;
+ self.delay = Delay::new(self.next);
+ }
+}
+
+impl Stream for ExpIncInterval {
+ type Item = ();
+
+ fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll