diff --git a/.github/workflows/release-bot.yml b/.github/workflows/release-bot.yml
new file mode 100644
index 0000000000000000000000000000000000000000..08aa94417c047d4e93645e4b6d0949ee2df29777
--- /dev/null
+++ b/.github/workflows/release-bot.yml
@@ -0,0 +1,18 @@
+name: Pushes release updates to a pre-defined Matrix room
+on:
+ release:
+ types:
+ - edited
+ - prereleased
+ - published
+jobs:
+ ping_matrix:
+ runs-on: ubuntu-latest
+ steps:
+ - name: send message
+ uses: s3krit/matrix-message-action@v0.0.2
+ with:
+ room_id: ${{ secrets.MATRIX_ROOM_ID }}
+ access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
+ message: "**${{github.event.repository.full_name}}:** A release has been ${{github.event.action}}
Release version [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
***Description:***
${{github.event.release.body}}
"
+ server: "matrix.parity.io"
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 62a6c2de32ddfa86fdbe6736737f7f0f3dc1768d..19f7298ab68eac2ed11646f23aff2e296d9d37bc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,21 @@
# pipelines can be triggered manually in the web
# setting DEPLOY_TAG will only deploy the tagged image
+# SAMPLE JOB TEMPLATE - This is not a complete example but is enough to build a
+# simple CI job. For full documentation, visit https://docs.gitlab.com/ee/ci/yaml/
+#
+# my-example-job:
+# stage: test # One of the stages listed below this job (required)
+# image: parity/tools:latest # Any docker image (required)
+# allow_failure: true # Allow the pipeline to continue if this job fails (default: false)
+# dependencies:
+# - build-rust-doc-release # Any jobs that are required to run before this job (optional)
+# variables:
+# MY_ENVIRONMENT_VARIABLE: "some useful value" # Environment variables passed to the job (optional)
+# script:
+# - echo "List of shell commands to run in your job"
+# - echo "You can also just specify a script here, like so:"
+# - ./.maintain/gitlab/my_amazing_script.sh
stages:
- test
@@ -22,6 +37,9 @@ variables:
CI_SERVER_NAME: "GitLab CI"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
+ # FIXME set to release
+ CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.8"
+ CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
.collect-artifacts: &collect-artifacts
@@ -86,6 +104,16 @@ check-runtime:
interruptible: true
allow_failure: true
+check-signed-tag:
+ stage: test
+ image: parity/tools:latest
+ <<: *kubernetes-build
+ only:
+ - tags
+ - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
+ script:
+ - ./.maintain/gitlab/check_signed.sh
+ allow_failure: false
check-line-width:
stage: test
@@ -160,6 +188,16 @@ test-dependency-rules:
script:
- .maintain/ensure-deps.sh
+unleash-check:
+ stage: test
+ <<: *docker-env
+ only:
+ - master
+ - tags
+ script:
+ - cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
+ - cargo unleash check ${CARGO_UNLEASH_PKG_DEF}
+
test-frame-staking:
stage: test
<<: *docker-env
@@ -524,7 +562,28 @@ publish-gh-doc:
after_script:
- rm -vrf ${HOME}/.gitconfig
+publish-draft-release:
+ stage: publish
+ image: parity/tools:latest
+ only:
+ - tags
+ - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
+ script:
+ - ./.maintain/gitlab/publish_draft_release.sh
+ interruptible: true
+ allow_failure: true
+publish-to-crates-io:
+ stage: publish
+ <<: *docker-env
+ only:
+ - tags
+ - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
+ script:
+ - cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
+ - cargo unleash em-dragons --no-check ${CARGO_UNLEASH_PKG_DEF}
+ interruptible: true
+ allow_failure: true
.deploy-template: &deploy
stage: kubernetes
diff --git a/.maintain/Dockerfile b/.maintain/Dockerfile
index 7cba85c544afc2c8cc1ff56401b2172a01d30364..2fc1532aa2837b3314eaf17a907ca765d33c85b5 100644
--- a/.maintain/Dockerfile
+++ b/.maintain/Dockerfile
@@ -1,7 +1,7 @@
# Note: We don't use Alpine and its packaged Rust/Cargo because they're too often out of date,
# preventing them from being used to build Substrate/Polkadot.
-FROM phusion/baseimage:0.10.2 as builder
+FROM phusion/baseimage:0.11 as builder
LABEL maintainer="chevdor@gmail.com"
LABEL description="This is the build stage for Substrate. Here we create the binary."
@@ -20,13 +20,12 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH="$PATH:$HOME/.cargo/bin" && \
rustup toolchain install nightly && \
rustup target add wasm32-unknown-unknown --toolchain nightly && \
- rustup default nightly && \
rustup default stable && \
cargo build "--$PROFILE"
# ===== SECOND STAGE ======
-FROM phusion/baseimage:0.10.2
+FROM phusion/baseimage:0.11
LABEL maintainer="chevdor@gmail.com"
LABEL description="This is the 2nd stage: a very small image where we copy the Substrate binary."
ARG PROFILE=release
@@ -34,9 +33,10 @@ ARG PROFILE=release
RUN mv /usr/share/ca* /tmp && \
rm -rf /usr/share/* && \
mv /tmp/ca-certificates /usr/share/ && \
- mkdir -p /root/.local/share/Polkadot && \
- ln -s /root/.local/share/Polkadot /data && \
- useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate
+ useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate && \
+ mkdir -p /substrate/.local/share/substrate && \
+ chown -R substrate:substrate /substrate/.local && \
+ ln -s /substrate/.local/share/substrate /data
COPY --from=builder /substrate/target/$PROFILE/substrate /usr/local/bin
@@ -49,7 +49,7 @@ RUN rm -rf /usr/lib/python* && \
rm -rf /usr/bin /usr/sbin /usr/share/man
USER substrate
-EXPOSE 30333 9933 9944
+EXPOSE 30333 9933 9944 9615
VOLUME ["/data"]
CMD ["/usr/local/bin/substrate"]
diff --git a/.maintain/gitlab/check_signed.sh b/.maintain/gitlab/check_signed.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7c4cc47baba38fa41214ed0fefc7e09b75a69e7d
--- /dev/null
+++ b/.maintain/gitlab/check_signed.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+# shellcheck source=lib.sh
+source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
+
+version="$CI_COMMIT_TAG"
+
+echo '[+] Checking tag has been signed'
+check_tag "paritytech/substrate" "$version"
+case $? in
+ 0) echo '[+] Tag found and has been signed'; exit 0
+ ;;
+ 1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1
+ ;;
+ 2) echo '[!] Tag not found. Aborting release.'; exit 1
+esac
diff --git a/.maintain/gitlab/lib.sh b/.maintain/gitlab/lib.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c8b2d73e6097f42fd6590b5e3d78c537dc620028
--- /dev/null
+++ b/.maintain/gitlab/lib.sh
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+api_base="https://api.github.com/repos"
+
+# Function to take 2 git tags/commits and get any lines from commit messages
+# that contain something that looks like a PR reference: e.g., (#1234)
+sanitised_git_logs(){
+ git --no-pager log --pretty=format:"%s" "$1..$2" |
+ # Only find messages referencing a PR
+ grep -E '\(#[0-9]+\)' |
+ # Strip any asterisks
+ sed 's/^* //g' |
+ # And add them all back
+ sed 's/^/* /g'
+}
+
+# Returns the last published release on github
+# repo: 'organization/repo'
+# Usage: last_github_release "$repo"
+last_github_release(){
+ curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" \
+ -s "$api_base/$1/releases/latest" | jq '.tag_name'
+}
+
+# Checks whether a tag on github has been verified
+# repo: 'organization/repo'
+# tagver: 'v1.2.3'
+# Usage: check_tag $repo $tagver
+check_tag () {
+ repo=$1
+ tagver=$2
+ tag_out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver")
+ tag_sha=$(echo "$tag_out" | jq -r .object.sha)
+ object_url=$(echo "$tag_out" | jq -r .object.url)
+ if [ "$tag_sha" = "null" ]; then
+ return 2
+ fi
+ verified_str=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$object_url" | jq -r .verification.verified)
+ if [ "$verified_str" = "true" ]; then
+ # Verified, everything is good
+ return 0
+ else
+ # Not verified. Bad juju.
+ return 1
+ fi
+}
+
+# Checks whether a given PR has a given label.
+# repo: 'organization/repo'
+# pr_id: 12345
+# label: B1-silent
+# Usage: has_label $repo $pr_id $label
+has_label(){
+ repo="$1"
+ pr_id="$2"
+ label="$3"
+ out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/pulls/$pr_id")
+ [ -n "$(echo "$out" | jq ".labels | .[] | select(.name==\"$label\")")" ]
+}
+
+# Formats a message into a JSON string for posting to Matrix
+# message: 'any plaintext message'
+# formatted_message: 'optional message formatted in html'
+# Usage: structure_message $content $formatted_content (optional)
+structure_message() {
+ if [ -z "$2" ]; then
+ body=$(jq -Rs --arg body "$1" '{"msgtype": "m.text", $body}' < /dev/null)
+ else
+ body=$(jq -Rs --arg body "$1" --arg formatted_body "$2" '{"msgtype": "m.text", $body, "format": "org.matrix.custom.html", $formatted_body}' < /dev/null)
+ fi
+ echo "$body"
+}
+
+# Post a message to a matrix room
+# body: '{body: "JSON string produced by structure_message"}'
+# room_id: !fsfSRjgjBWEWffws:matrix.parity.io
+# access_token: see https://matrix.org/docs/guides/client-server-api/
+# Usage: send_message $body (json formatted) $room_id $access_token
+send_message() {
+curl -XPOST -d "$1" "https://matrix.parity.io/_matrix/client/r0/rooms/$2/send/m.room.message?access_token=$3"
+}
diff --git a/.maintain/gitlab/publish_draft_release.sh b/.maintain/gitlab/publish_draft_release.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4f73575f5bbaf836d7e07cb43c7fd1c1173858da
--- /dev/null
+++ b/.maintain/gitlab/publish_draft_release.sh
@@ -0,0 +1,86 @@
+#!/usr/bin/env bash
+
+# shellcheck source=lib.sh
+source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
+
+# Substrate labels for PRs we want to include in the release notes
+labels=(
+ 'B1-runtimenoteworthy'
+ 'B1-clientnoteworthy'
+ 'B1-apinoteworthy'
+)
+
+version="$CI_COMMIT_TAG"
+
+# Note that this is not the last *tagged* version, but the last *published* version
+last_version=$(last_github_release 'paritytech/substrate')
+echo "[+] Version: $version; Previous version: $last_version"
+
+all_changes="$(sanitised_git_logs "$last_version" "$version")"
+labelled_changes=""
+echo "[+] Iterating through $(wc -l <<< "$all_changes") changes to find labelled PRs"
+while IFS= read -r line; do
+ pr_id=$(echo "$line" | sed -E 's/.*#([0-9]+)\)$/\1/')
+
+ # Skip if the PR has the silent label - this allows us to skip a few requests
+ if has_label 'paritytech/substrate' "$pr_id" 'B0-silent'; then
+ continue
+ fi
+ for label in "${labels[@]}"; do
+ if has_label 'paritytech/substrate' "$pr_id" "$label"; then
+ labelled_changes="$labelled_changes
+$line"
+ fi
+ done
+done <<< "$all_changes"
+
+
+release_text="Substrate $version
+-----------------
+$labelled_changes"
+
+echo "[+] Release text generated: "
+echo "$release_text"
+
+echo "[+] Pushing release to github"
+# Create release on github
+release_name="Substrate $version"
+data=$(jq -Rs --arg version "$version" \
+ --arg release_name "$release_name" \
+ --arg release_text "$release_text" \
+'{
+ "tag_name": $version,
+ "target_commitish": "master",
+ "name": $release_name,
+ "body": $release_text,
+ "draft": true,
+ "prerelease": false
+}' < /dev/null)
+
+out=$(curl -s -X POST --data "$data" -H "Authorization: token $GITHUB_RELEASE_TOKEN" "$api_base/paritytech/substrate/releases")
+
+html_url=$(echo "$out" | jq -r .html_url)
+
+if [ "$html_url" == "null" ]
+then
+ echo "[!] Something went wrong posting:"
+ echo "$out"
+else
+ echo "[+] Release draft created: $html_url"
+fi
+
+echo '[+] Sending draft release URL to Matrix'
+
+msg_body=$(cat <Release pipeline for Substrate $version complete.
+Draft release created: $html_url
+EOF
+)
+send_message "$(structure_message "$msg_body" "$formatted_msg_body")" "$MATRIX_ROOM_ID" "$MATRIX_ACCESS_TOKEN"
+
+echo "[+] Done! Maybe the release worked..."
diff --git a/Cargo.lock b/Cargo.lock
index b557048f9d36a3878df336e13402265a5e03025d..2bed3b2bb5f4d8b0154397e7c737ff60fe04a125 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -61,9 +61,9 @@ dependencies = [
[[package]]
name = "aho-corasick"
-version = "0.7.8"
+version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811"
+checksum = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec"
dependencies = [
"memchr",
]
@@ -146,7 +146,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502"
dependencies = [
- "quote 1.0.2",
+ "quote",
"syn",
]
@@ -242,9 +242,9 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "backtrace"
-version = "0.3.43"
+version = "0.3.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f80256bc78f67e7df7e36d77366f636ed976895d91fe2ab9efa3973e8fe8c4f"
+checksum = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536"
dependencies = [
"backtrace-sys",
"cfg-if",
@@ -305,25 +305,26 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.49.4"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c07087f3d5731bf3fb375a81841b99597e25dc11bd3bc72d16d43adf6624a6e"
+checksum = "99de13bb6361e01e493b3db7928085dcc474b7ba4f5481818e53a89d76b8393f"
dependencies = [
"bitflags",
"cexpr",
"cfg-if",
"clang-sys",
"clap",
- "env_logger 0.6.2",
- "fxhash",
+ "env_logger 0.7.1",
"lazy_static",
+ "lazycell",
"log 0.4.8",
"peeking_take_while",
- "proc-macro2 0.4.30",
- "quote 0.6.13",
+ "proc-macro2",
+ "quote",
"regex",
+ "rustc-hash",
"shlex",
- "which 2.0.1",
+ "which",
]
[[package]]
@@ -422,29 +423,10 @@ dependencies = [
]
[[package]]
-name = "browser-utils"
-version = "0.8.0"
-dependencies = [
- "chrono",
- "clear_on_drop",
- "console_error_panic_hook",
- "console_log",
- "futures 0.1.29",
- "futures 0.3.4",
- "futures-timer 3.0.1",
- "js-sys",
- "kvdb-web",
- "libp2p",
- "log 0.4.8",
- "rand 0.6.5",
- "rand 0.7.3",
- "sc-chain-spec",
- "sc-informant",
- "sc-network",
- "sc-service",
- "wasm-bindgen",
- "wasm-bindgen-futures",
-]
+name = "bs58"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188"
[[package]]
name = "bs58"
@@ -591,7 +573,7 @@ dependencies = [
[[package]]
name = "chain-spec-builder"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"ansi_term 0.12.1",
"node-cli",
@@ -610,7 +592,6 @@ dependencies = [
"js-sys",
"num-integer",
"num-traits",
- "serde",
"time",
"wasm-bindgen",
]
@@ -732,25 +713,23 @@ checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
[[package]]
name = "cranelift-bforest"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd0f53d59dc9ab1c8ab68c991d8406b52b7a0aab0b15b05a3a6895579c4e5dd9"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0381a794836fb994c47006465d46d46be072483b667f36013d993b9895117fee"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"byteorder 1.3.4",
"cranelift-bforest",
"cranelift-codegen-meta",
"cranelift-codegen-shared",
"cranelift-entity",
- "gimli 0.20.0",
+ "gimli",
"log 0.4.8",
"serde",
"smallvec 1.2.0",
@@ -760,9 +739,8 @@ dependencies = [
[[package]]
name = "cranelift-codegen-meta"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "208c3c8d82bfef32a534c5020c6cfc3bc92f41388f1246b7bb98cf543331abaa"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
@@ -770,24 +748,21 @@ dependencies = [
[[package]]
name = "cranelift-codegen-shared"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea048c456a517e56fd6df8f0e3947922897e6e6f61fbc5eb557a36c7b8ff6394"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
[[package]]
name = "cranelift-entity"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c8c7ed50812194c9e9de1fa39c77b39fc9ab48173d5e7ee88b25b6a8953e9b8"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"serde",
]
[[package]]
name = "cranelift-frontend"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21ceb931d9f919731df1b1ecdc716b5c66384b413a7f95909d1f45441ab9bef5"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"cranelift-codegen",
"log 0.4.8",
@@ -797,9 +772,8 @@ dependencies = [
[[package]]
name = "cranelift-native"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "564ee82268bc25b914fcf331edfc2452f2d9ca34f976b187b4ca668beba250c8"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
@@ -808,9 +782,8 @@ dependencies = [
[[package]]
name = "cranelift-wasm"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de63e2271b374be5b07f359184e2126a08fb24d24a740cbc178b7e0107ddafa5"
+version = "0.59.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
@@ -818,7 +791,7 @@ dependencies = [
"log 0.4.8",
"serde",
"thiserror",
- "wasmparser 0.48.2",
+ "wasmparser",
]
[[package]]
@@ -905,33 +878,36 @@ dependencies = [
[[package]]
name = "crossbeam-channel"
-version = "0.4.0"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c"
+checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061"
dependencies = [
"crossbeam-utils",
+ "maybe-uninit",
]
[[package]]
name = "crossbeam-deque"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca"
+checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
+ "maybe-uninit",
]
[[package]]
name = "crossbeam-epoch"
-version = "0.8.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac"
+checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
dependencies = [
- "autocfg 0.1.7",
+ "autocfg 1.0.0",
"cfg-if",
"crossbeam-utils",
"lazy_static",
+ "maybe-uninit",
"memoffset",
"scopeguard",
]
@@ -948,11 +924,11 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.7.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4"
+checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
dependencies = [
- "autocfg 0.1.7",
+ "autocfg 1.0.0",
"cfg-if",
"lazy_static",
]
@@ -988,9 +964,9 @@ dependencies = [
[[package]]
name = "csv-core"
-version = "0.1.6"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c"
+checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
dependencies = [
"memchr",
]
@@ -1006,11 +982,11 @@ dependencies = [
[[package]]
name = "ctor"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc"
+checksum = "47c5e5ac752e18207b12e16b10631ae5f7f68f8805f335f9b817ead83d9ffce1"
dependencies = [
- "quote 1.0.2",
+ "quote",
"syn",
]
@@ -1062,18 +1038,18 @@ dependencies = [
[[package]]
name = "data-encoding"
-version = "2.1.2"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97"
+checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788"
[[package]]
name = "derive_more"
-version = "0.99.2"
+version = "0.99.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8"
+checksum = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -1163,8 +1139,8 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecf634c5213044b8d54a46dd282cf5dd1f86bb5cb53e92c409cb4680a7fb9894"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -1242,6 +1218,33 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "ethbloom"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32cfe1c169414b709cf28aa30c74060bdb830a03a8ba473314d079ac79d80a5f"
+dependencies = [
+ "crunchy",
+ "fixed-hash",
+ "impl-rlp",
+ "impl-serde 0.2.3",
+ "tiny-keccak 1.5.0",
+]
+
+[[package]]
+name = "ethereum-types"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba744248e3553a393143d5ebb68939fc3a4ec0c22a269682535f5ffe7fed728c"
+dependencies = [
+ "ethbloom",
+ "fixed-hash",
+ "impl-rlp",
+ "impl-serde 0.2.3",
+ "primitive-types",
+ "uint",
+]
+
[[package]]
name = "evm"
version = "0.15.0"
@@ -1315,9 +1318,9 @@ dependencies = [
[[package]]
name = "failure"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
+checksum = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b"
dependencies = [
"backtrace",
"failure_derive",
@@ -1325,12 +1328,12 @@ dependencies = [
[[package]]
name = "failure_derive"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
+checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
"synstructure",
]
@@ -1436,14 +1439,43 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "fork-tree"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
]
+[[package]]
+name = "frame-benchmarking"
+version = "2.0.0-alpha.3"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "sp-api",
+ "sp-io",
+ "sp-runtime",
+ "sp-runtime-interface",
+ "sp-std",
+]
+
+[[package]]
+name = "frame-benchmarking-cli"
+version = "2.0.0-alpha.3"
+dependencies = [
+ "frame-benchmarking",
+ "parity-scale-codec",
+ "sc-cli",
+ "sc-client",
+ "sc-client-db",
+ "sc-executor",
+ "sc-service",
+ "sp-runtime",
+ "structopt",
+]
+
[[package]]
name = "frame-executive"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -1461,7 +1493,7 @@ dependencies = [
[[package]]
name = "frame-metadata"
-version = "11.0.0"
+version = "11.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"serde",
@@ -1471,7 +1503,7 @@ dependencies = [
[[package]]
name = "frame-support"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"bitmask",
"frame-metadata",
@@ -1496,37 +1528,37 @@ dependencies = [
[[package]]
name = "frame-support-procedural"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support-procedural-tools",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "frame-support-procedural-tools"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "frame-support-procedural-tools-derive"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "frame-support-test"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -1542,7 +1574,7 @@ dependencies = [
[[package]]
name = "frame-system"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"criterion 0.2.11",
"frame-support",
@@ -1560,7 +1592,7 @@ dependencies = [
[[package]]
name = "frame-system-rpc-runtime-api"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -1719,8 +1751,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7"
dependencies = [
"proc-macro-hack",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -1744,9 +1776,9 @@ checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6"
[[package]]
name = "futures-timer"
-version = "3.0.1"
+version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3de1a2b2a2a33d9e60e17980b60ee061eeaae96a5abe9121db0fdb9af167a1c5"
+checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
dependencies = [
"gloo-timers",
"send_wrapper 0.4.0",
@@ -1797,15 +1829,6 @@ dependencies = [
"pin-project",
]
-[[package]]
-name = "fxhash"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
-dependencies = [
- "byteorder 1.3.4",
-]
-
[[package]]
name = "gcc"
version = "0.3.55"
@@ -1855,27 +1878,18 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "gimli"
-version = "0.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "162d18ae5f2e3b90a993d202f1ba17a5633c2484426f8bcae201f86194bacd00"
-dependencies = [
- "arrayvec 0.4.12",
- "byteorder 1.3.4",
- "fallible-iterator",
- "indexmap",
- "stable_deref_trait",
-]
-
[[package]]
name = "gimli"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633"
dependencies = [
+ "arrayvec 0.5.1",
"byteorder 1.3.4",
+ "fallible-iterator",
"indexmap",
+ "smallvec 1.2.0",
+ "stable_deref_trait",
]
[[package]]
@@ -1927,34 +1941,6 @@ dependencies = [
"scroll",
]
-[[package]]
-name = "grafana-data-source"
-version = "0.8.0"
-dependencies = [
- "async-std",
- "chrono",
- "derive_more",
- "futures-timer 3.0.1",
- "futures-util",
- "hyper 0.13.2",
- "lazy_static",
- "log 0.4.8",
- "parking_lot 0.10.0",
- "serde",
- "serde_json",
- "tokio 0.2.11",
-]
-
-[[package]]
-name = "grafana-data-source-test"
-version = "2.0.0"
-dependencies = [
- "futures 0.3.4",
- "futures-timer 3.0.1",
- "grafana-data-source",
- "rand 0.7.3",
-]
-
[[package]]
name = "h2"
version = "0.1.26"
@@ -1988,7 +1974,7 @@ dependencies = [
"indexmap",
"log 0.4.8",
"slab",
- "tokio 0.2.11",
+ "tokio 0.2.12",
"tokio-util",
]
@@ -2007,12 +1993,6 @@ dependencies = [
"crunchy",
]
-[[package]]
-name = "hashbrown"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353"
-
[[package]]
name = "hashbrown"
version = "0.6.3"
@@ -2034,18 +2014,18 @@ dependencies = [
[[package]]
name = "hermit-abi"
-version = "0.1.6"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772"
+checksum = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8"
dependencies = [
"libc",
]
[[package]]
name = "hex"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76cdda6bf525062a0c9e8f14ee2b37935c86b8efb6c8b69b3c83dfb518a914af"
+checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35"
[[package]]
name = "hex-literal"
@@ -2214,7 +2194,7 @@ dependencies = [
"net2",
"pin-project",
"time",
- "tokio 0.2.11",
+ "tokio 0.2.12",
"tower-service",
"want 0.3.0",
]
@@ -2231,7 +2211,7 @@ dependencies = [
"hyper 0.13.2",
"rustls",
"rustls-native-certs",
- "tokio 0.2.11",
+ "tokio 0.2.12",
"tokio-rustls",
"webpki",
]
@@ -2313,8 +2293,8 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -2436,8 +2416,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058"
dependencies = [
"proc-macro-crate",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -2618,9 +2598,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a"
[[package]]
name = "libc"
-version = "0.2.66"
+version = "0.2.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
+checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
[[package]]
name = "libloading"
@@ -2634,9 +2614,9 @@ dependencies = [
[[package]]
name = "libp2p"
-version = "0.16.0"
+version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a58becf0b9585fcfbb8215bbe6e6ac187fcc180fd1026925ca180c845aa5a6e8"
+checksum = "bba17ee9cac4bb89de5812159877d9b4f0a993bf41697a5a875940cd1eb71f24"
dependencies = [
"bytes 0.5.4",
"futures 0.3.4",
@@ -2662,8 +2642,8 @@ dependencies = [
"libp2p-wasm-ext",
"libp2p-websocket",
"libp2p-yamux",
- "parity-multiaddr",
- "parity-multihash",
+ "parity-multiaddr 0.7.2",
+ "parity-multihash 0.2.3",
"parking_lot 0.10.0",
"pin-project",
"smallvec 1.2.0",
@@ -2677,17 +2657,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c"
dependencies = [
"asn1_der",
- "bs58",
+ "bs58 0.3.0",
"ed25519-dalek",
"fnv",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"lazy_static",
"libsecp256k1",
"log 0.4.8",
"multistream-select",
- "parity-multiaddr",
- "parity-multihash",
+ "parity-multiaddr 0.7.2",
+ "parity-multihash 0.2.3",
"parking_lot 0.10.0",
"pin-project",
"prost",
@@ -2698,7 +2678,7 @@ dependencies = [
"sha2",
"smallvec 1.2.0",
"thiserror",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
"void",
"zeroize 1.1.0",
]
@@ -2709,7 +2689,7 @@ version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b"
dependencies = [
- "quote 1.0.2",
+ "quote",
"syn",
]
@@ -2767,13 +2747,13 @@ dependencies = [
"libp2p-core",
"libp2p-swarm",
"log 0.4.8",
- "lru 0.4.3",
+ "lru",
"prost",
"prost-build",
"rand 0.7.3",
"sha2",
"smallvec 1.2.0",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
"wasm-timer",
]
@@ -2795,9 +2775,9 @@ dependencies = [
[[package]]
name = "libp2p-kad"
-version = "0.16.0"
+version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2efcff2af085e8181c421f68fe9c2b0a067379d146731925b3ac8f8e605c458"
+checksum = "464dc8412978d40f0286be72ed9ab5e0e1386a4a06e7f174526739b5c3c1f041"
dependencies = [
"arrayvec 0.5.1",
"bytes 0.5.4",
@@ -2808,14 +2788,14 @@ dependencies = [
"libp2p-core",
"libp2p-swarm",
"log 0.4.8",
- "parity-multihash",
+ "parity-multihash 0.2.3",
"prost",
"prost-build",
"rand 0.7.3",
"sha2",
"smallvec 1.2.0",
"uint",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
"void",
"wasm-timer",
]
@@ -2855,16 +2835,16 @@ dependencies = [
"libp2p-core",
"log 0.4.8",
"parking_lot 0.10.0",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
]
[[package]]
name = "libp2p-noise"
-version = "0.16.0"
+version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac7d33809afdf6794f09fdb2f9f94e1550ae230be5bae6430a078eb96fc9e5a6"
+checksum = "b15a8a3d71f898beb6f854c8aae27aa1d198e0d1f2e49412261c2d90ef39675a"
dependencies = [
- "curve25519-dalek 1.2.3",
+ "curve25519-dalek 2.0.0",
"futures 0.3.4",
"lazy_static",
"libp2p-core",
@@ -2875,7 +2855,7 @@ dependencies = [
"sha2",
"snow",
"static_assertions",
- "x25519-dalek 0.5.2",
+ "x25519-dalek",
"zeroize 1.1.0",
]
@@ -2908,7 +2888,7 @@ dependencies = [
"prost",
"prost-build",
"rw-stream-sink",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
"void",
]
@@ -2928,9 +2908,9 @@ dependencies = [
[[package]]
name = "libp2p-secio"
-version = "0.16.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec00eb9a3404ed76a0e14f637edcaa7f2b4a27a16884da4a56f2f21e166c2843"
+checksum = "1219e9ecb4945d7331a05f5ffe96a1f6e28051bfa1223d4c60353c251de0354e"
dependencies = [
"aes-ctr",
"ctr",
@@ -2958,9 +2938,9 @@ dependencies = [
[[package]]
name = "libp2p-swarm"
-version = "0.16.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1e9f4fb84a4bfe3d3a361c1fbcd4af017ba68f0a46a77bfbcc48bf8a456d6ef"
+checksum = "275471e7c0e88ae004660866cd54f603bd8bd1f4caef541a27f50dd8640c4d4c"
dependencies = [
"futures 0.3.4",
"libp2p-core",
@@ -2978,7 +2958,7 @@ checksum = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10"
dependencies = [
"async-std",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"get_if_addrs",
"ipnet",
"libp2p-core",
@@ -2999,9 +2979,9 @@ dependencies = [
[[package]]
name = "libp2p-wasm-ext"
-version = "0.16.0"
+version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39703653caa36f4afd0def39cc49a3ac0fa1d4289ca1802e417af03e4f5ef950"
+checksum = "923581c055bc4b8c5f42d4ce5ef43e52fe5216f1ea4bc26476cb8a966ce6220b"
dependencies = [
"futures 0.3.4",
"js-sys",
@@ -3034,9 +3014,9 @@ dependencies = [
[[package]]
name = "libp2p-yamux"
-version = "0.16.0"
+version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f72aa5a7273c29c6eaea09108a49feaefc7456164863f64f86a193f9e78a4b7f"
+checksum = "9dac30de24ccde0e67f363d71a125c587bbe6589503f664947e9b084b68a34f1"
dependencies = [
"futures 0.3.4",
"libp2p-core",
@@ -3047,9 +3027,9 @@ dependencies = [
[[package]]
name = "librocksdb-sys"
-version = "6.2.4"
+version = "6.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a0785e816e1e11e7599388a492c61ef80ddc2afc91e313e61662cce537809be"
+checksum = "4e3b727e2dd20ec2fb7ed93f23d9fd5328a0871185485ebdaff007b47d3e27e4"
dependencies = [
"bindgen",
"cc",
@@ -3127,22 +3107,13 @@ dependencies = [
"cfg-if",
]
-[[package]]
-name = "lru"
-version = "0.1.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8"
-dependencies = [
- "hashbrown 0.5.0",
-]
-
[[package]]
name = "lru"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237"
dependencies = [
- "hashbrown 0.6.3",
+ "hashbrown",
]
[[package]]
@@ -3168,12 +3139,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]]
name = "memchr"
-version = "2.3.0"
+version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223"
-dependencies = [
- "libc",
-]
+checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
[[package]]
name = "memoffset"
@@ -3192,7 +3160,7 @@ checksum = "198831fe8722331a395bc199a5d08efbc197497ef354cb4c77b969c02ffc0fc4"
dependencies = [
"ahash",
"hash-db",
- "hashbrown 0.6.3",
+ "hashbrown",
"parity-util-mem",
]
@@ -3309,7 +3277,7 @@ dependencies = [
"log 0.4.8",
"smallvec 1.2.0",
"tokio-io",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
]
[[package]]
@@ -3365,10 +3333,10 @@ dependencies = [
[[package]]
name = "node-cli"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"assert_cmd",
- "browser-utils",
+ "frame-benchmarking-cli",
"frame-support",
"frame-system",
"futures 0.3.4",
@@ -3411,6 +3379,7 @@ dependencies = [
"sc-tracing",
"sc-transaction-pool",
"serde",
+ "serde_json",
"sp-authority-discovery",
"sp-consensus",
"sp-consensus-babe",
@@ -3424,6 +3393,7 @@ dependencies = [
"sp-timestamp",
"sp-transaction-pool",
"structopt",
+ "substrate-browser-utils",
"substrate-build-script-utils",
"tempfile",
"tracing",
@@ -3434,9 +3404,10 @@ dependencies = [
[[package]]
name = "node-executor"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"criterion 0.3.1",
+ "frame-benchmarking",
"frame-support",
"frame-system",
"node-primitives",
@@ -3466,7 +3437,7 @@ dependencies = [
[[package]]
name = "node-inspect"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"log 0.4.8",
@@ -3482,7 +3453,7 @@ dependencies = [
[[package]]
name = "node-primitives"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"pretty_assertions",
"sp-core",
@@ -3492,7 +3463,7 @@ dependencies = [
[[package]]
name = "node-rpc"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"jsonrpc-core",
"node-primitives",
@@ -3515,7 +3486,7 @@ dependencies = [
[[package]]
name = "node-rpc-client"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"env_logger 0.7.1",
"futures 0.1.29",
@@ -3528,8 +3499,9 @@ dependencies = [
[[package]]
name = "node-runtime"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
+ "frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
@@ -3589,7 +3561,7 @@ dependencies = [
[[package]]
name = "node-template"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"futures 0.3.4",
"log 0.4.8",
@@ -3597,6 +3569,7 @@ dependencies = [
"sc-basic-authorship",
"sc-cli",
"sc-client",
+ "sc-client-api",
"sc-consensus-aura",
"sc-executor",
"sc-finality-grandpa",
@@ -3617,7 +3590,7 @@ dependencies = [
[[package]]
name = "node-template-runtime"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-executive",
"frame-support",
@@ -3625,7 +3598,6 @@ dependencies = [
"pallet-aura",
"pallet-balances",
"pallet-grandpa",
- "pallet-indices",
"pallet-randomness-collective-flip",
"pallet-sudo",
"pallet-template",
@@ -3650,7 +3622,7 @@ dependencies = [
[[package]]
name = "node-testing"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"criterion 0.3.1",
"frame-support",
@@ -3689,13 +3661,13 @@ dependencies = [
"sp-runtime",
"sp-timestamp",
"substrate-test-client",
- "tempdir",
+ "tempfile",
"wabt",
]
[[package]]
name = "node-transaction-factory"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"log 0.4.8",
"parity-scale-codec",
@@ -3785,6 +3757,20 @@ dependencies = [
"libc",
]
+[[package]]
+name = "object"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea44a4fd660ab0f38434934ca0212e90fbeaaee54126ef20a3451c30c95bafae"
+dependencies = [
+ "flate2",
+ "goblin",
+ "parity-wasm 0.41.0",
+ "scroll",
+ "target-lexicon",
+ "uuid",
+]
+
[[package]]
name = "ole32-sys"
version = "0.2.0"
@@ -3860,16 +3846,16 @@ dependencies = [
[[package]]
name = "owning_ref"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
+checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce"
dependencies = [
"stable_deref_trait",
]
[[package]]
name = "pallet-assets"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -3883,7 +3869,7 @@ dependencies = [
[[package]]
name = "pallet-aura"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -3905,7 +3891,7 @@ dependencies = [
[[package]]
name = "pallet-authority-discovery"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -3923,7 +3909,7 @@ dependencies = [
[[package]]
name = "pallet-authorship"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -3939,7 +3925,7 @@ dependencies = [
[[package]]
name = "pallet-babe"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -3964,8 +3950,9 @@ dependencies = [
[[package]]
name = "pallet-balances"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"pallet-transaction-payment",
@@ -3977,9 +3964,23 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-benchmark"
+version = "2.0.0-alpha.3"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "serde",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-collective"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -3995,7 +3996,7 @@ dependencies = [
[[package]]
name = "pallet-contracts"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"assert_matches",
"frame-support",
@@ -4020,7 +4021,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-primitives"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -4029,7 +4030,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-rpc"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -4048,7 +4049,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-rpc-runtime-api"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"pallet-contracts-primitives",
"parity-scale-codec",
@@ -4059,7 +4060,7 @@ dependencies = [
[[package]]
name = "pallet-democracy"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4076,7 +4077,7 @@ dependencies = [
[[package]]
name = "pallet-elections"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4092,7 +4093,7 @@ dependencies = [
[[package]]
name = "pallet-elections-phragmen"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4110,7 +4111,7 @@ dependencies = [
[[package]]
name = "pallet-evm"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"evm",
"frame-support",
@@ -4130,8 +4131,9 @@ dependencies = [
[[package]]
name = "pallet-example"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"pallet-balances",
@@ -4143,9 +4145,24 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-example-offchain-worker"
+version = "2.0.0-alpha.3"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "serde",
+ "serde_json",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-finality-tracker"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4162,7 +4179,7 @@ dependencies = [
[[package]]
name = "pallet-generic-asset"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4176,7 +4193,7 @@ dependencies = [
[[package]]
name = "pallet-grandpa"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4194,9 +4211,10 @@ dependencies = [
[[package]]
name = "pallet-identity"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"enumflags2",
+ "frame-benchmarking",
"frame-support",
"frame-system",
"pallet-balances",
@@ -4210,7 +4228,7 @@ dependencies = [
[[package]]
name = "pallet-im-online"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4228,7 +4246,7 @@ dependencies = [
[[package]]
name = "pallet-indices"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4244,7 +4262,7 @@ dependencies = [
[[package]]
name = "pallet-membership"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4258,7 +4276,7 @@ dependencies = [
[[package]]
name = "pallet-nicks"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4273,7 +4291,7 @@ dependencies = [
[[package]]
name = "pallet-offences"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4289,7 +4307,7 @@ dependencies = [
[[package]]
name = "pallet-randomness-collective-flip"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4303,7 +4321,7 @@ dependencies = [
[[package]]
name = "pallet-recovery"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"enumflags2",
"frame-support",
@@ -4319,7 +4337,7 @@ dependencies = [
[[package]]
name = "pallet-scored-pool"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4334,7 +4352,7 @@ dependencies = [
[[package]]
name = "pallet-session"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4354,7 +4372,7 @@ dependencies = [
[[package]]
name = "pallet-society"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4370,7 +4388,7 @@ dependencies = [
[[package]]
name = "pallet-staking"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4393,18 +4411,18 @@ dependencies = [
[[package]]
name = "pallet-staking-reward-curve"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"proc-macro-crate",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"sp-runtime",
"syn",
]
[[package]]
name = "pallet-sudo"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4418,7 +4436,7 @@ dependencies = [
[[package]]
name = "pallet-template"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4431,8 +4449,9 @@ dependencies = [
[[package]]
name = "pallet-timestamp"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
+ "frame-benchmarking",
"frame-support",
"frame-system",
"impl-trait-for-tuples",
@@ -4448,7 +4467,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4463,7 +4482,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -4480,7 +4499,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -4493,7 +4512,7 @@ dependencies = [
[[package]]
name = "pallet-treasury"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4508,7 +4527,7 @@ dependencies = [
[[package]]
name = "pallet-utility"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -4523,7 +4542,7 @@ dependencies = [
[[package]]
name = "pallet-vesting"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"enumflags2",
"frame-support",
@@ -4545,6 +4564,24 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a"
+[[package]]
+name = "parity-multiaddr"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7"
+dependencies = [
+ "arrayref",
+ "bs58 0.2.5",
+ "byteorder 1.3.4",
+ "bytes 0.4.12",
+ "data-encoding",
+ "parity-multihash 0.1.3",
+ "percent-encoding 1.0.1",
+ "serde",
+ "unsigned-varint 0.2.3",
+ "url 1.7.2",
+]
+
[[package]]
name = "parity-multiaddr"
version = "0.7.2"
@@ -4552,17 +4589,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26df883298bc3f4e92528b4c5cc9f806b791955b136da3e5e939ed9de0fd958b"
dependencies = [
"arrayref",
- "bs58",
+ "bs58 0.3.0",
"byteorder 1.3.4",
"data-encoding",
- "parity-multihash",
+ "parity-multihash 0.2.3",
"percent-encoding 2.1.0",
"serde",
"static_assertions",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
"url 2.1.1",
]
+[[package]]
+name = "parity-multihash"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3"
+dependencies = [
+ "blake2",
+ "bytes 0.4.12",
+ "rand 0.6.5",
+ "sha-1",
+ "sha2",
+ "sha3",
+ "unsigned-varint 0.2.3",
+]
+
[[package]]
name = "parity-multihash"
version = "0.2.3"
@@ -4575,14 +4627,14 @@ dependencies = [
"sha-1",
"sha2",
"sha3",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
]
[[package]]
name = "parity-scale-codec"
-version = "1.1.2"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507"
+checksum = "f509c5e67ca0605ee17dcd3f91ef41cadd685c75a298fb6261b781a5acb3f910"
dependencies = [
"arrayvec 0.5.1",
"bitvec",
@@ -4593,13 +4645,13 @@ dependencies = [
[[package]]
name = "parity-scale-codec-derive"
-version = "1.1.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34e513ff3e406f3ede6796dcdc83d0b32ffb86668cea1ccf7363118abeb00476"
+checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245"
dependencies = [
"proc-macro-crate",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -4616,7 +4668,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef1476e40bf8f5c6776e9600983435821ca86eb9819d74a6207cca69d091406a"
dependencies = [
"cfg-if",
+ "ethereum-types",
+ "hashbrown",
"impl-trait-for-tuples",
+ "lru",
"parity-util-mem-derive",
"parking_lot 0.10.0",
"primitive-types",
@@ -4630,7 +4685,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"
dependencies = [
- "proc-macro2 1.0.8",
+ "proc-macro2",
"syn",
"synstructure",
]
@@ -4702,9 +4757,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49"
+checksum = "63e1afe738d71b1ebab5f1207c055054015427dbfc7bbe9ee1266894156ec046"
dependencies = [
"paste-impl",
"proc-macro-hack",
@@ -4712,13 +4767,13 @@ dependencies = [
[[package]]
name = "paste-impl"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5"
+checksum = "6d4dc4a7f6f743211c5aab239640a65091535d97d43d92a52bca435a640892bb"
dependencies = [
"proc-macro-hack",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -4781,8 +4836,8 @@ version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -4830,9 +4885,9 @@ checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
[[package]]
name = "predicates"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4"
+checksum = "1188bf092c81c18228c383b190c069a8a613c18a046ffa9fdfc0f5fc8fb2da8a"
dependencies = [
"difference",
"predicates-core",
@@ -4890,25 +4945,25 @@ dependencies = [
[[package]]
name = "proc-macro-error"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a"
+checksum = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242"
dependencies = [
"proc-macro-error-attr",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"rustversion",
"syn",
]
[[package]]
name = "proc-macro-error-attr"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a"
+checksum = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"rustversion",
"syn",
"syn-mid",
@@ -4920,8 +4975,8 @@ version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -4933,20 +4988,25 @@ checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
[[package]]
name = "proc-macro2"
-version = "0.4.30"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
+checksum = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435"
dependencies = [
- "unicode-xid 0.1.0",
+ "unicode-xid",
]
[[package]]
-name = "proc-macro2"
-version = "1.0.8"
+name = "prometheus"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548"
+checksum = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1"
dependencies = [
- "unicode-xid 0.2.0",
+ "cfg-if",
+ "fnv",
+ "lazy_static",
+ "protobuf",
+ "quick-error",
+ "spin",
]
[[package]]
@@ -4974,7 +5034,7 @@ dependencies = [
"prost",
"prost-types",
"tempfile",
- "which 3.1.0",
+ "which",
]
[[package]]
@@ -4985,8 +5045,8 @@ checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72"
dependencies = [
"anyhow",
"itertools",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -5000,6 +5060,12 @@ dependencies = [
"prost",
]
+[[package]]
+name = "protobuf"
+version = "2.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5"
+
[[package]]
name = "pwasm-utils"
version = "0.12.0"
@@ -5030,32 +5096,23 @@ dependencies = [
]
[[package]]
-name = "quicksink"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530"
-dependencies = [
- "futures-core",
- "futures-sink",
- "pin-project-lite",
-]
-
-[[package]]
-name = "quote"
-version = "0.6.13"
+name = "quicksink"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
+checksum = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530"
dependencies = [
- "proc-macro2 0.4.30",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
]
[[package]]
name = "quote"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
+checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
dependencies = [
- "proc-macro2 1.0.8",
+ "proc-macro2",
]
[[package]]
@@ -5462,8 +5519,8 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -5530,13 +5587,13 @@ dependencies = [
[[package]]
name = "sc-authority-discovery"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
- "bytes 0.4.12",
+ "bytes 0.5.4",
"derive_more",
"env_logger 0.7.1",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"libp2p",
"log 0.4.8",
"parity-scale-codec",
@@ -5559,14 +5616,13 @@ dependencies = [
[[package]]
name = "sc-basic-authorship"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"futures 0.3.4",
"log 0.4.8",
"parity-scale-codec",
"parking_lot 0.10.0",
"sc-block-builder",
- "sc-client",
"sc-client-api",
"sc-telemetry",
"sc-transaction-pool",
@@ -5583,7 +5639,7 @@ dependencies = [
[[package]]
name = "sc-block-builder"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -5598,7 +5654,7 @@ dependencies = [
[[package]]
name = "sc-chain-spec"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"impl-trait-for-tuples",
"sc-chain-spec-derive",
@@ -5612,17 +5668,17 @@ dependencies = [
[[package]]
name = "sc-chain-spec-derive"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"proc-macro-crate",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "sc-cli"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"ansi_term 0.12.1",
"app_dirs",
@@ -5653,14 +5709,15 @@ dependencies = [
"sp-runtime",
"sp-state-machine",
"structopt",
+ "substrate-prometheus-endpoint",
"tempfile",
"time",
- "tokio 0.2.11",
+ "tokio 0.2.12",
]
[[package]]
name = "sc-client"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"env_logger 0.7.1",
@@ -5690,6 +5747,7 @@ dependencies = [
"sp-std",
"sp-trie",
"sp-version",
+ "substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"tempfile",
"tracing",
@@ -5697,7 +5755,7 @@ dependencies = [
[[package]]
name = "sc-client-api"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"derive_more",
"fnv",
@@ -5720,6 +5778,7 @@ dependencies = [
"sp-runtime",
"sp-state-machine",
"sp-std",
+ "sp-storage",
"sp-test-primitives",
"sp-transaction-pool",
"sp-trie",
@@ -5728,7 +5787,7 @@ dependencies = [
[[package]]
name = "sc-client-db"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"env_logger 0.7.1",
"hash-db",
@@ -5753,19 +5812,19 @@ dependencies = [
"sp-runtime",
"sp-state-machine",
"sp-trie",
+ "substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"tempfile",
]
[[package]]
name = "sc-consensus-aura"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"env_logger 0.7.1",
- "futures 0.1.29",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"log 0.4.8",
"parity-scale-codec",
"parking_lot 0.10.0",
@@ -5793,19 +5852,17 @@ dependencies = [
"sp-version",
"substrate-test-runtime-client",
"tempfile",
- "tokio 0.1.22",
]
[[package]]
name = "sc-consensus-babe"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"env_logger 0.7.1",
"fork-tree",
- "futures 0.1.29",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"log 0.4.8",
"merlin",
"num-bigint",
@@ -5844,12 +5901,11 @@ dependencies = [
"sp-version",
"substrate-test-runtime-client",
"tempfile",
- "tokio 0.1.22",
]
[[package]]
name = "sc-consensus-babe-rpc"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -5874,7 +5930,7 @@ dependencies = [
[[package]]
name = "sc-consensus-epochs"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"fork-tree",
"parity-scale-codec",
@@ -5886,7 +5942,7 @@ dependencies = [
[[package]]
name = "sc-consensus-manual-seal"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"env_logger 0.7.1",
@@ -5909,12 +5965,12 @@ dependencies = [
"substrate-test-runtime-client",
"substrate-test-runtime-transaction-pool",
"tempfile",
- "tokio 0.2.11",
+ "tokio 0.2.12",
]
[[package]]
name = "sc-consensus-pow"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -5934,10 +5990,10 @@ dependencies = [
[[package]]
name = "sc-consensus-slots"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"log 0.4.8",
"parity-scale-codec",
"parking_lot 0.10.0",
@@ -5955,7 +6011,7 @@ dependencies = [
[[package]]
name = "sc-consensus-uncles"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"log 0.4.8",
"sc-client-api",
@@ -5968,7 +6024,7 @@ dependencies = [
[[package]]
name = "sc-executor"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"assert_matches",
"derive_more",
@@ -5987,6 +6043,7 @@ dependencies = [
"sp-externalities",
"sp-io",
"sp-panic-handler",
+ "sp-runtime",
"sp-runtime-interface",
"sp-serializer",
"sp-state-machine",
@@ -6001,7 +6058,7 @@ dependencies = [
[[package]]
name = "sc-executor-common"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"log 0.4.8",
@@ -6016,7 +6073,7 @@ dependencies = [
[[package]]
name = "sc-executor-wasmi"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"log 0.4.8",
"parity-scale-codec",
@@ -6031,37 +6088,37 @@ dependencies = [
[[package]]
name = "sc-executor-wasmtime"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"assert_matches",
"log 0.4.8",
"parity-scale-codec",
"parity-wasm 0.41.0",
"sc-executor-common",
+ "scoped-tls",
"sp-allocator",
"sp-core",
"sp-runtime-interface",
"sp-wasm-interface",
- "wasmi",
"wasmtime",
]
[[package]]
name = "sc-finality-grandpa"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"assert_matches",
"env_logger 0.7.1",
"finality-grandpa",
"fork-tree",
- "futures 0.1.29",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"log 0.4.8",
"parity-scale-codec",
"parking_lot 0.10.0",
"pin-project",
"rand 0.7.3",
+ "sc-block-builder",
"sc-client",
"sc-client-api",
"sc-keystore",
@@ -6082,14 +6139,15 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-state-machine",
+ "substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"tempfile",
- "tokio 0.1.22",
+ "tokio 0.2.12",
]
[[package]]
name = "sc-informant"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"ansi_term 0.12.1",
"futures 0.3.4",
@@ -6105,7 +6163,7 @@ dependencies = [
[[package]]
name = "sc-keystore"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"derive_more",
"hex",
@@ -6120,7 +6178,7 @@ dependencies = [
[[package]]
name = "sc-network"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"assert_matches",
"async-std",
@@ -6133,16 +6191,17 @@ dependencies = [
"fnv",
"fork-tree",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"futures_codec",
"libp2p",
"linked-hash-map",
"linked_hash_set",
"log 0.4.8",
- "lru 0.4.3",
+ "lru",
"nohash-hasher",
"parity-scale-codec",
"parking_lot 0.10.0",
+ "pin-project",
"prost",
"prost-build",
"quickcheck",
@@ -6165,12 +6224,12 @@ dependencies = [
"sp-keyring",
"sp-runtime",
"sp-test-primitives",
- "substrate-test-client",
+ "substrate-prometheus-endpoint",
"substrate-test-runtime",
"substrate-test-runtime-client",
"tempfile",
"thiserror",
- "unsigned-varint",
+ "unsigned-varint 0.3.1",
"void",
"wasm-timer",
"zeroize 1.1.0",
@@ -6178,14 +6237,13 @@ dependencies = [
[[package]]
name = "sc-network-gossip"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
- "futures 0.1.29",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"libp2p",
"log 0.4.8",
- "lru 0.1.17",
+ "lru",
"parking_lot 0.10.0",
"sc-network",
"sp-runtime",
@@ -6194,12 +6252,11 @@ dependencies = [
[[package]]
name = "sc-network-test"
-version = "0.8.0"
+version = "0.8.0-dev"
dependencies = [
"env_logger 0.7.1",
- "futures 0.1.29",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"libp2p",
"log 0.4.8",
"parking_lot 0.10.0",
@@ -6216,18 +6273,17 @@ dependencies = [
"substrate-test-runtime",
"substrate-test-runtime-client",
"tempfile",
- "tokio 0.1.22",
]
[[package]]
name = "sc-offchain"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"bytes 0.5.4",
"env_logger 0.7.1",
"fnv",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"hyper 0.13.2",
"hyper-rustls",
"log 0.4.8",
@@ -6247,12 +6303,12 @@ dependencies = [
"sp-transaction-pool",
"substrate-test-runtime-client",
"threadpool",
- "tokio 0.2.11",
+ "tokio 0.2.12",
]
[[package]]
name = "sc-peerset"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"futures 0.3.4",
"libp2p",
@@ -6264,7 +6320,7 @@ dependencies = [
[[package]]
name = "sc-rpc"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"assert_matches",
"futures 0.1.29",
@@ -6301,7 +6357,7 @@ dependencies = [
[[package]]
name = "sc-rpc-api"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -6323,7 +6379,7 @@ dependencies = [
[[package]]
name = "sc-rpc-server"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"jsonrpc-core",
"jsonrpc-http-server",
@@ -6337,7 +6393,7 @@ dependencies = [
[[package]]
name = "sc-runtime-test"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"sp-allocator",
"sp-core",
@@ -6350,18 +6406,17 @@ dependencies = [
[[package]]
name = "sc-service"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"exit-future",
"futures 0.1.29",
"futures 0.3.4",
"futures-diagnose",
- "futures-timer 3.0.1",
- "grafana-data-source",
+ "futures-timer 3.0.2",
"lazy_static",
"log 0.4.8",
- "parity-multiaddr",
+ "parity-multiaddr 0.5.0",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.10.0",
@@ -6393,17 +6448,17 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-transaction-pool",
+ "substrate-prometheus-endpoint",
"substrate-test-runtime-client",
"sysinfo",
"target_info",
- "tokio 0.2.11",
"tracing",
"wasm-timer",
]
[[package]]
name = "sc-service-test"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"env_logger 0.7.1",
"fdlimit",
@@ -6423,22 +6478,25 @@ dependencies = [
[[package]]
name = "sc-state-db"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"env_logger 0.7.1",
"log 0.4.8",
"parity-scale-codec",
+ "parity-util-mem",
+ "parity-util-mem-derive",
"parking_lot 0.10.0",
+ "sc-client-api",
"sp-core",
]
[[package]]
name = "sc-telemetry"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"bytes 0.5.4",
"futures 0.3.4",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"libp2p",
"log 0.4.8",
"parking_lot 0.10.0",
@@ -6455,10 +6513,9 @@ dependencies = [
[[package]]
name = "sc-tracing"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"erased-serde",
- "grafana-data-source",
"log 0.4.8",
"parking_lot 0.10.0",
"sc-telemetry",
@@ -6471,7 +6528,7 @@ dependencies = [
[[package]]
name = "sc-transaction-graph"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"assert_matches",
"criterion 0.3.1",
@@ -6493,7 +6550,7 @@ dependencies = [
[[package]]
name = "sc-transaction-pool"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -6544,10 +6601,16 @@ dependencies = [
]
[[package]]
-name = "scopeguard"
+name = "scoped-tls"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
+checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "scroll"
@@ -6564,8 +6627,8 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -6658,16 +6721,16 @@ version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "serde_json"
-version = "1.0.47"
+version = "1.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15913895b61e0be854afd32fd4163fcd2a3df34142cf2cb961b310ce694cbf90"
+checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
dependencies = [
"itoa",
"ryu",
@@ -6788,8 +6851,8 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -6823,7 +6886,7 @@ dependencies = [
"rustc_version",
"sha2",
"subtle 2.2.2",
- "x25519-dalek 0.6.0",
+ "x25519-dalek",
]
[[package]]
@@ -6854,7 +6917,7 @@ checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3"
[[package]]
name = "sp-allocator"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"derive_more",
"log 0.4.8",
@@ -6865,7 +6928,7 @@ dependencies = [
[[package]]
name = "sp-api"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"hash-db",
"parity-scale-codec",
@@ -6880,22 +6943,23 @@ dependencies = [
[[package]]
name = "sp-api-proc-macro"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"blake2-rfc",
"proc-macro-crate",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "sp-api-test"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"criterion 0.3.1",
"parity-scale-codec",
"rustversion",
+ "sc-block-builder",
"sp-api",
"sp-blockchain",
"sp-consensus",
@@ -6908,7 +6972,7 @@ dependencies = [
[[package]]
name = "sp-application-crypto"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"serde",
@@ -6919,7 +6983,7 @@ dependencies = [
[[package]]
name = "sp-application-crypto-test"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"sp-api",
"sp-application-crypto",
@@ -6930,7 +6994,7 @@ dependencies = [
[[package]]
name = "sp-arithmetic"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"criterion 0.3.1",
"integer-sqrt",
@@ -6945,7 +7009,7 @@ dependencies = [
[[package]]
name = "sp-authority-discovery"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -6956,7 +7020,7 @@ dependencies = [
[[package]]
name = "sp-authorship"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-inherents",
@@ -6966,7 +7030,7 @@ dependencies = [
[[package]]
name = "sp-block-builder"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -6977,11 +7041,11 @@ dependencies = [
[[package]]
name = "sp-blockchain"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"derive_more",
"log 0.4.8",
- "lru 0.4.3",
+ "lru",
"parity-scale-codec",
"parking_lot 0.10.0",
"sp-block-builder",
@@ -6992,12 +7056,12 @@ dependencies = [
[[package]]
name = "sp-consensus"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"derive_more",
"futures 0.3.4",
"futures-diagnose",
- "futures-timer 3.0.1",
+ "futures-timer 3.0.2",
"libp2p",
"log 0.4.8",
"parity-scale-codec",
@@ -7014,7 +7078,7 @@ dependencies = [
[[package]]
name = "sp-consensus-aura"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7027,7 +7091,7 @@ dependencies = [
[[package]]
name = "sp-consensus-babe"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"parity-scale-codec",
"schnorrkel",
@@ -7042,7 +7106,7 @@ dependencies = [
[[package]]
name = "sp-consensus-pow"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7053,7 +7117,7 @@ dependencies = [
[[package]]
name = "sp-core"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"base58",
"blake2-rfc",
@@ -7097,16 +7161,16 @@ dependencies = [
[[package]]
name = "sp-debug-derive"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "sp-externalities"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"environmental",
"sp-std",
@@ -7115,7 +7179,7 @@ dependencies = [
[[package]]
name = "sp-finality-grandpa"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"serde",
@@ -7127,7 +7191,7 @@ dependencies = [
[[package]]
name = "sp-finality-tracker"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-inherents",
@@ -7136,7 +7200,7 @@ dependencies = [
[[package]]
name = "sp-inherents"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"derive_more",
"parity-scale-codec",
@@ -7147,7 +7211,7 @@ dependencies = [
[[package]]
name = "sp-io"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"hash-db",
"libsecp256k1",
@@ -7164,7 +7228,7 @@ dependencies = [
[[package]]
name = "sp-keyring"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"lazy_static",
"sp-core",
@@ -7174,7 +7238,7 @@ dependencies = [
[[package]]
name = "sp-offchain"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"sp-api",
"sp-runtime",
@@ -7182,7 +7246,7 @@ dependencies = [
[[package]]
name = "sp-panic-handler"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"backtrace",
"log 0.4.8",
@@ -7190,7 +7254,7 @@ dependencies = [
[[package]]
name = "sp-phragmen"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"rand 0.7.3",
"serde",
@@ -7202,7 +7266,7 @@ dependencies = [
[[package]]
name = "sp-rpc"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"serde",
"serde_json",
@@ -7211,8 +7275,9 @@ dependencies = [
[[package]]
name = "sp-runtime"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
+ "hash256-std-hasher",
"impl-trait-for-tuples",
"log 0.4.8",
"parity-scale-codec",
@@ -7231,7 +7296,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"primitive-types",
@@ -7250,22 +7315,22 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-proc-macro"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"Inflector",
"proc-macro-crate",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "sp-runtime-interface-test"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"sc-executor",
- "sp-core",
"sp-io",
+ "sp-runtime",
"sp-runtime-interface",
"sp-runtime-interface-test-wasm",
"sp-state-machine",
@@ -7273,7 +7338,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-test-wasm"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"sp-core",
"sp-io",
@@ -7284,7 +7349,7 @@ dependencies = [
[[package]]
name = "sp-sandbox"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"assert_matches",
"parity-scale-codec",
@@ -7298,7 +7363,7 @@ dependencies = [
[[package]]
name = "sp-serializer"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"serde",
"serde_json",
@@ -7306,7 +7371,7 @@ dependencies = [
[[package]]
name = "sp-session"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"sp-api",
"sp-core",
@@ -7316,7 +7381,7 @@ dependencies = [
[[package]]
name = "sp-staking"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -7325,7 +7390,7 @@ dependencies = [
[[package]]
name = "sp-state-machine"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
dependencies = [
"hash-db",
"hex-literal",
@@ -7337,6 +7402,7 @@ dependencies = [
"sp-core",
"sp-externalities",
"sp-panic-handler",
+ "sp-runtime",
"sp-trie",
"trie-db",
"trie-root",
@@ -7344,11 +7410,11 @@ dependencies = [
[[package]]
name = "sp-std"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
[[package]]
name = "sp-storage"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"impl-serde 0.2.3",
"serde",
@@ -7358,7 +7424,7 @@ dependencies = [
[[package]]
name = "sp-test-primitives"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"parity-scale-codec",
"parity-util-mem",
@@ -7370,7 +7436,7 @@ dependencies = [
[[package]]
name = "sp-timestamp"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -7383,7 +7449,7 @@ dependencies = [
[[package]]
name = "sp-transaction-pool"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -7396,7 +7462,7 @@ dependencies = [
[[package]]
name = "sp-trie"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"criterion 0.2.11",
"hash-db",
@@ -7404,6 +7470,7 @@ dependencies = [
"memory-db",
"parity-scale-codec",
"sp-core",
+ "sp-runtime",
"sp-std",
"trie-bench",
"trie-db",
@@ -7413,7 +7480,7 @@ dependencies = [
[[package]]
name = "sp-version"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"impl-serde 0.2.3",
"parity-scale-codec",
@@ -7424,7 +7491,7 @@ dependencies = [
[[package]]
name = "sp-wasm-interface"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -7502,8 +7569,8 @@ checksum = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64"
dependencies = [
"heck",
"proc-macro-error",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -7523,14 +7590,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81"
dependencies = [
"heck",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
[[package]]
name = "subkey"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"clap",
"derive_more",
@@ -7570,13 +7637,38 @@ dependencies = [
"sha2",
]
+[[package]]
+name = "substrate-browser-utils"
+version = "0.8.0-alpha.3"
+dependencies = [
+ "chrono",
+ "clear_on_drop",
+ "console_error_panic_hook",
+ "console_log",
+ "futures 0.1.29",
+ "futures 0.3.4",
+ "futures-timer 3.0.2",
+ "js-sys",
+ "kvdb-web",
+ "libp2p",
+ "log 0.4.8",
+ "rand 0.6.5",
+ "rand 0.7.3",
+ "sc-chain-spec",
+ "sc-informant",
+ "sc-network",
+ "sc-service",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+]
+
[[package]]
name = "substrate-build-script-utils"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
[[package]]
name = "substrate-frame-rpc-support"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"frame-support",
"frame-system",
@@ -7587,12 +7679,12 @@ dependencies = [
"sc-rpc-api",
"serde",
"sp-storage",
- "tokio 0.1.22",
+ "tokio 0.2.12",
]
[[package]]
name = "substrate-frame-rpc-system"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
dependencies = [
"env_logger 0.7.1",
"frame-system-rpc-runtime-api",
@@ -7613,9 +7705,22 @@ dependencies = [
"substrate-test-runtime-client",
]
+[[package]]
+name = "substrate-prometheus-endpoint"
+version = "0.8.0-alpha.3"
+dependencies = [
+ "async-std",
+ "derive_more",
+ "futures-util",
+ "hyper 0.13.2",
+ "log 0.4.8",
+ "prometheus",
+ "tokio 0.2.12",
+]
+
[[package]]
name = "substrate-test-client"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"futures 0.3.4",
"hash-db",
@@ -7634,7 +7739,7 @@ dependencies = [
[[package]]
name = "substrate-test-runtime"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"cfg-if",
"frame-executive",
@@ -7675,7 +7780,7 @@ dependencies = [
[[package]]
name = "substrate-test-runtime-client"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"futures 0.3.4",
"parity-scale-codec",
@@ -7692,7 +7797,7 @@ dependencies = [
[[package]]
name = "substrate-test-runtime-transaction-pool"
-version = "2.0.0"
+version = "2.0.0-dev"
dependencies = [
"derive_more",
"futures 0.3.4",
@@ -7707,7 +7812,7 @@ dependencies = [
[[package]]
name = "substrate-test-utils"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
[[package]]
name = "substrate-wasm-builder"
@@ -7717,6 +7822,7 @@ dependencies = [
"build-helper",
"cargo_metadata",
"fs2",
+ "itertools",
"tempfile",
"toml",
"walkdir",
@@ -7741,13 +7847,13 @@ checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941"
[[package]]
name = "syn"
-version = "1.0.14"
+version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5"
+checksum = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
- "unicode-xid 0.2.0",
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
]
[[package]]
@@ -7756,8 +7862,8 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -7767,10 +7873,10 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
- "unicode-xid 0.2.0",
+ "unicode-xid",
]
[[package]]
@@ -7804,16 +7910,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe"
-[[package]]
-name = "tempdir"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
-dependencies = [
- "rand 0.4.6",
- "remove_dir_all",
-]
-
[[package]]
name = "tempfile"
version = "3.1.0"
@@ -7844,8 +7940,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9"
dependencies = [
"lazy_static",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
"version_check 0.9.1",
]
@@ -7861,21 +7957,21 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "1.0.10"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "205684fd018ca14432b12cce6ea3d46763311a571c3d294e71ba3f01adcf1aad"
+checksum = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.10"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57e4d2e50ca050ed44fb58309bdce3efa79948f84f9993ad1978de5eebdce5a7"
+checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -7910,9 +8006,9 @@ dependencies = [
[[package]]
name = "tiny-bip39"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd1fb03fe8e07d17cd851a624a9fff74642a997b67fbd1ccd77533241640d92"
+checksum = "a6848cd8f566953ce1e8faeba12ee23cbdbb0437754792cd857d44628b5685e3"
dependencies = [
"failure",
"hmac",
@@ -7921,6 +8017,7 @@ dependencies = [
"rand 0.7.3",
"rustc-hash",
"sha2",
+ "unicode-normalization",
]
[[package]]
@@ -7977,9 +8074,9 @@ dependencies = [
[[package]]
name = "tokio"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b"
+checksum = "b34bee1facdc352fba10c9c58b654e6ecb6a2250167772bf86071f7c5f2f5061"
dependencies = [
"bytes 0.5.4",
"fnv",
@@ -8074,12 +8171,12 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "0.2.4"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c"
+checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
]
@@ -8110,7 +8207,7 @@ checksum = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc"
dependencies = [
"futures-core",
"rustls",
- "tokio 0.2.11",
+ "tokio 0.2.12",
"webpki",
]
@@ -8233,7 +8330,7 @@ dependencies = [
"futures-sink",
"log 0.4.8",
"pin-project-lite",
- "tokio 0.2.11",
+ "tokio 0.2.12",
]
[[package]]
@@ -8253,9 +8350,9 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
[[package]]
name = "tracing"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e213bd24252abeb86a0b7060e02df677d367ce6cb772cef17e9214b8390a8d3"
+checksum = "1721cc8cf7d770cc4257872507180f35a4797272f5962f24c806af9e7faf52ab"
dependencies = [
"cfg-if",
"tracing-attributes",
@@ -8264,19 +8361,19 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3"
+checksum = "7fbad39da2f9af1cae3016339ad7f2c7a9e870f12e8fd04c4fd7ef35b30c0d2b"
dependencies = [
- "quote 1.0.2",
+ "quote",
"syn",
]
[[package]]
name = "tracing-core"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13a46f11e372b8bd4b4398ea54353412fdd7fd42a8370c7e543e218cf7661978"
+checksum = "0aa83a9a47081cd522c09c81b31aec2c9273424976f922ad61c053b58350b715"
dependencies = [
"lazy_static",
]
@@ -8316,7 +8413,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0"
dependencies = [
"hash-db",
- "hashbrown 0.6.3",
+ "hashbrown",
"log 0.4.8",
"rustc-hex",
"smallvec 1.2.0",
@@ -8349,9 +8446,9 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
[[package]]
name = "trybuild"
-version = "1.0.21"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f5b3f750c701725331ac78e389b5d143b7d25f6b6ffffd0d419759a9063ac5f"
+checksum = "26ff1b18659a2218332848d76ad1c867ce4c6ee37b085e6bc8de9a6d11401220"
dependencies = [
"glob 0.3.0",
"lazy_static",
@@ -8455,23 +8552,24 @@ checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
[[package]]
name = "unicode-xid"
-version = "0.1.0"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
+checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
[[package]]
-name = "unicode-xid"
-version = "0.2.0"
+name = "unsigned-varint"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
+checksum = "a7f0023a96687fe169081e8adce3f65e3874426b7886e9234d490af2dc077959"
[[package]]
name = "unsigned-varint"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c689459fbaeb50e56c6749275f084decfd02194ac5852e6617d95d0d3cf02eaf"
+checksum = "3b7ffb36714206d2f5f05d61a2bc350415c642f2c54433f0ebf829afbe41d570"
dependencies = [
"bytes 0.5.4",
+ "futures 0.3.4",
"futures_codec",
]
@@ -8503,6 +8601,12 @@ dependencies = [
"percent-encoding 2.1.0",
]
+[[package]]
+name = "uuid"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
+
[[package]]
name = "vcpkg"
version = "0.2.8"
@@ -8624,8 +8728,8 @@ dependencies = [
"bumpalo",
"lazy_static",
"log 0.4.8",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
"wasm-bindgen-shared",
]
@@ -8648,7 +8752,7 @@ version = "0.2.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3"
dependencies = [
- "quote 1.0.2",
+ "quote",
"wasm-bindgen-macro-support",
]
@@ -8658,8 +8762,8 @@ version = "0.2.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
@@ -8680,8 +8784,8 @@ dependencies = [
"anyhow",
"heck",
"log 0.4.8",
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
"wasm-bindgen-backend",
"weedle",
@@ -8740,21 +8844,14 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.48.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8"
-
-[[package]]
-name = "wasmparser"
-version = "0.51.1"
+version = "0.51.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e41b27a1677fe28c115de49efca55dabb14f7fece2c32947ffb9b1064fe5bd4"
+checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a"
[[package]]
name = "wasmtime"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5614d964c3e7d07a13b59aca66103c52656bd80430f0d86dc7eeb3af4f03d4a2"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"anyhow",
"backtrace",
@@ -8764,9 +8861,10 @@ dependencies = [
"region",
"rustc-demangle",
"target-lexicon",
- "wasmparser 0.51.1",
+ "wasmparser",
"wasmtime-environ",
"wasmtime-jit",
+ "wasmtime-profiling",
"wasmtime-runtime",
"wat",
"winapi 0.3.8",
@@ -8774,25 +8872,23 @@ dependencies = [
[[package]]
name = "wasmtime-debug"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "feb5900275b4ef0b621ce725b9d5660b12825d7f7d79b392b97baf089ffab8c0"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"anyhow",
"faerie",
- "gimli 0.19.0",
+ "gimli",
"more-asserts",
"target-lexicon",
"thiserror",
- "wasmparser 0.51.1",
+ "wasmparser",
"wasmtime-environ",
]
[[package]]
name = "wasmtime-environ"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f04661851e133fb11691c4a0f92a705766b4bbf7afc06811f949e295cc8414fc"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"anyhow",
"base64 0.11.0",
@@ -8812,16 +8908,15 @@ dependencies = [
"sha2",
"thiserror",
"toml",
- "wasmparser 0.51.1",
+ "wasmparser",
"winapi 0.3.8",
"zstd",
]
[[package]]
name = "wasmtime-jit"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d451353764ce55c9bb6a8b260063cfc209b7adadd277a9a872ab4563a69e357c"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"anyhow",
"cfg-if",
@@ -8834,46 +8929,63 @@ dependencies = [
"region",
"target-lexicon",
"thiserror",
- "wasmparser 0.51.1",
+ "wasmparser",
"wasmtime-debug",
"wasmtime-environ",
+ "wasmtime-profiling",
"wasmtime-runtime",
"winapi 0.3.8",
]
+[[package]]
+name = "wasmtime-profiling"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
+dependencies = [
+ "gimli",
+ "goblin",
+ "lazy_static",
+ "libc",
+ "object",
+ "scroll",
+ "serde",
+ "target-lexicon",
+]
+
[[package]]
name = "wasmtime-runtime"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7dbd4fc114b828cae3e405fed413df4b3814d87a92ea029640cec9ba41f0c162"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e"
dependencies = [
"backtrace",
"cc",
"cfg-if",
"indexmap",
+ "lazy_static",
"libc",
"memoffset",
"more-asserts",
"region",
"thiserror",
"wasmtime-environ",
+ "wasmtime-profiling",
"winapi 0.3.8",
]
[[package]]
name = "wast"
-version = "7.0.0"
+version = "9.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12a729d076deb29c8509fa71f2d427729f9394f9496844ed8fcab152f35d163d"
+checksum = "ee7b16105405ca2aa2376ba522d8d4b1a11604941dd3bb7df9fd2ece60f8d16a"
dependencies = [
"leb128",
]
[[package]]
name = "wat"
-version = "1.0.8"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5795e34a4b39893653dec97e644fac85c31398e0ce1abecc48967aac83d9e8ce"
+checksum = "56173f7f4fb59aebe35a7e71423845e1c6c7144bfb56362d497931b6b3bed0f6"
dependencies = [
"wast",
]
@@ -8969,16 +9081,6 @@ dependencies = [
"nom",
]
-[[package]]
-name = "which"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164"
-dependencies = [
- "failure",
- "libc",
-]
-
[[package]]
name = "which"
version = "3.1.0"
@@ -9059,17 +9161,6 @@ dependencies = [
"winapi-build",
]
-[[package]]
-name = "x25519-dalek"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538"
-dependencies = [
- "clear_on_drop",
- "curve25519-dalek 1.2.3",
- "rand_core 0.3.1",
-]
-
[[package]]
name = "x25519-dalek"
version = "0.6.0"
@@ -9089,9 +9180,9 @@ checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57"
[[package]]
name = "yamux"
-version = "0.4.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d73295bc9d9acf89dd9336b3b5f5b57731ee72b587857dd4312721a0196b48e5"
+checksum = "f03098897b734bd943ab23f6aa9f98aafd72a88516deedd66f9d564c57bf2f19"
dependencies = [
"bytes 0.5.4",
"futures 0.3.4",
@@ -9123,8 +9214,8 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2"
dependencies = [
- "proc-macro2 1.0.8",
- "quote 1.0.2",
+ "proc-macro2",
+ "quote",
"syn",
"synstructure",
]
diff --git a/Cargo.toml b/Cargo.toml
index a42a8e24d0f48e5412d18b93a2aa5ade5f5b0737..0459bc8ebbd6abd658db6295fefc4c699291207e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -53,15 +53,16 @@ members = [
"client/telemetry",
"client/transaction-pool",
"client/transaction-pool/graph",
+ "utils/prometheus",
"utils/wasm-builder-runner",
- "utils/grafana-data-source",
- "utils/grafana-data-source/test",
"frame/assets",
"frame/aura",
"frame/authority-discovery",
"frame/authorship",
"frame/babe",
"frame/balances",
+ "frame/benchmarking",
+ "frame/benchmark",
"frame/collective",
"frame/contracts",
"frame/contracts/rpc",
@@ -71,6 +72,7 @@ members = [
"frame/elections",
"frame/evm",
"frame/example",
+ "frame/example-offchain-worker",
"frame/executive",
"frame/finality-tracker",
"frame/generic-asset",
@@ -156,6 +158,7 @@ members = [
"utils/browser",
"utils/build-script-utils",
"utils/fork-tree",
+ "utils/frame/benchmarking-cli",
"utils/frame/rpc/support",
"utils/frame/rpc/system",
"utils/wasm-builder",
diff --git a/bin/node-template/README.md b/bin/node-template/README.md
index c411dbeef5bcccf9e05d64ddee2405cb5237c678..4ae60478fc72b77f32664b4225c023c36ff5f1af 100644
--- a/bin/node-template/README.md
+++ b/bin/node-template/README.md
@@ -1,6 +1,6 @@
# Substrate Node Template
-A new SRML-based Substrate node, ready for hacking.
+A new FRAME-based Substrate node, ready for hacking.
## Build
diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml
index 9ad4a0e8a55ad5ad82a07252f1d62fc12e8ce101..1e8c3fad2e3c0e2f1a8cef0f2d7fff57f2b45ff3 100644
--- a/bin/node-template/node/Cargo.toml
+++ b/bin/node-template/node/Cargo.toml
@@ -1,10 +1,12 @@
[package]
name = "node-template"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
authors = ["Anonymous"]
edition = "2018"
license = "Unlicense"
build = "build.rs"
+homepage = "https://substrate.dev"
+repository = "https://github.com/paritytech/substrate/"
[[bin]]
name = "node-template"
@@ -14,25 +16,26 @@ futures = "0.3.1"
log = "0.4.8"
structopt = "0.3.8"
-sc-cli = { version = "0.8.0", path = "../../../client/cli" }
-sp-core = { version = "2.0.0", path = "../../../primitives/core" }
-sc-executor = { version = "0.8", path = "../../../client/executor" }
-sc-service = { version = "0.8", path = "../../../client/service" }
-sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
-sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" }
-sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
-sc-network = { version = "0.8", path = "../../../client/network" }
-sc-consensus-aura = { version = "0.8", path = "../../../client/consensus/aura" }
-sp-consensus-aura = { version = "0.8", path = "../../../primitives/consensus/aura" }
-sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" }
-grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
-grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
-sc-client = { version = "0.8", path = "../../../client/" }
-sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
-sc-basic-authorship = { path = "../../../client/basic-authorship" }
+sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" }
+sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
+sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" }
+sc-service = { version = "0.8.0-alpha.2", path = "../../../client/service" }
+sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" }
+sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../client/transaction-pool" }
+sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" }
+sc-network = { version = "0.8.0-alpha.2", path = "../../../client/network" }
+sc-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../client/consensus/aura" }
+sp-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/aura" }
+sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" }
+grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
+grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
+sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" }
+sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" }
+sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
+sc-basic-authorship = { path = "../../../client/basic-authorship" , version = "0.8.0-alpha.2"}
-node-template-runtime = { version = "2.0.0", path = "../runtime" }
+node-template-runtime = { version = "2.0.0-alpha.2", path = "../runtime" }
[build-dependencies]
vergen = "3.0.4"
-build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
+build-script-utils = { version = "2.0.0-alpha.2", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
diff --git a/bin/node-template/node/src/chain_spec.rs b/bin/node-template/node/src/chain_spec.rs
index 9bdfea3b7820d5ed80e5912d65de7e91a3b14f9a..64b84005072fda218c5b866e8ec8a1898e27df18 100644
--- a/bin/node-template/node/src/chain_spec.rs
+++ b/bin/node-template/node/src/chain_spec.rs
@@ -1,7 +1,7 @@
use sp_core::{Pair, Public, sr25519};
use node_template_runtime::{
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig,
- IndicesConfig, SudoConfig, SystemConfig, WASM_BINARY, Signature
+ SudoConfig, SystemConfig, WASM_BINARY, Signature
};
use sp_consensus_aura::sr25519::{AuthorityId as AuraId};
use grandpa_primitives::{AuthorityId as GrandpaId};
@@ -127,21 +127,18 @@ fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>,
code: WASM_BINARY.to_vec(),
changes_trie_config: Default::default(),
}),
- indices: Some(IndicesConfig {
- indices: vec![],
- }),
balances: Some(BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(),
}),
- sudo: Some(SudoConfig {
- key: root_key,
- }),
aura: Some(AuraConfig {
authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
}),
grandpa: Some(GrandpaConfig {
authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),
}),
+ sudo: Some(SudoConfig {
+ key: root_key,
+ }),
}
}
diff --git a/bin/node-template/node/src/command.rs b/bin/node-template/node/src/command.rs
index e7e386703deee0a7894dfc5bf931c6c41fa89438..0f4c301dbff5b7defe0565bf71e85b21a6418867 100644
--- a/bin/node-template/node/src/command.rs
+++ b/bin/node-template/node/src/command.rs
@@ -15,32 +15,35 @@
// along with Substrate. If not, see .
use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
-use sc_cli::{VersionInfo, error};
+use sc_cli::VersionInfo;
use crate::service;
use crate::chain_spec;
use crate::cli::Cli;
/// Parse and run command line arguments
-pub fn run(version: VersionInfo) -> error::Result<()> {
+pub fn run(version: VersionInfo) -> sc_cli::Result<()> {
let opt = sc_cli::from_args::(&version);
- let config = sc_service::Configuration::new(&version);
+ let mut config = sc_service::Configuration::from_version(&version);
match opt.subcommand {
- Some(subcommand) => sc_cli::run_subcommand(
- config,
- subcommand,
- chain_spec::load_spec,
- |config: _| Ok(new_full_start!(config).0),
- &version,
- ),
- None => sc_cli::run(
- config,
- opt.run,
- service::new_light,
- service::new_full,
- chain_spec::load_spec,
- &version,
- )
+ Some(subcommand) => {
+ subcommand.init(&version)?;
+ subcommand.update_config(&mut config, chain_spec::load_spec, &version)?;
+ subcommand.run(
+ config,
+ |config: _| Ok(new_full_start!(config).0),
+ )
+ },
+ None => {
+ opt.run.init(&version)?;
+ opt.run.update_config(&mut config, chain_spec::load_spec, &version)?;
+ opt.run.run(
+ config,
+ service::new_light,
+ service::new_full,
+ &version,
+ )
+ },
}
}
diff --git a/bin/node-template/node/src/main.rs b/bin/node-template/node/src/main.rs
index 9d0a57d77a851d551e9a8e087365a8d8cb470977..91b2c257e0cd733f7e87d00e02857101810a2fb0 100644
--- a/bin/node-template/node/src/main.rs
+++ b/bin/node-template/node/src/main.rs
@@ -7,10 +7,8 @@ mod service;
mod cli;
mod command;
-pub use sc_cli::{VersionInfo, error};
-
-fn main() -> Result<(), error::Error> {
- let version = VersionInfo {
+fn main() -> sc_cli::Result<()> {
+ let version = sc_cli::VersionInfo {
name: "Substrate Node",
commit: env!("VERGEN_SHA_SHORT"),
version: env!("CARGO_PKG_VERSION"),
diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs
index 5466f3e919c0baa4bed2b83622fdf35d5987e5b8..f289ff58549dbc354bfdb706f8edf1659f6b044a 100644
--- a/bin/node-template/node/src/service.rs
+++ b/bin/node-template/node/src/service.rs
@@ -3,14 +3,14 @@
use std::sync::Arc;
use std::time::Duration;
use sc_client::LongestChain;
+use sc_client_api::ExecutorProvider;
use node_template_runtime::{self, GenesisConfig, opaque::Block, RuntimeApi};
use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder};
use sp_inherents::InherentDataProviders;
-use sc_network::{construct_simple_protocol};
use sc_executor::native_executor_instance;
pub use sc_executor::NativeExecutor;
use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
-use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider};
+use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
// Our native executor instance.
native_executor_instance!(
@@ -19,17 +19,13 @@ native_executor_instance!(
node_template_runtime::native_version,
);
-construct_simple_protocol! {
- /// Demo protocol attachment for substrate.
- pub struct NodeProtocol where Block = Block { }
-}
-
/// Starts a `ServiceBuilder` for a full service.
///
/// Use this macro if you don't actually need the full service, but just the builder in order to
/// be able to perform chain operations.
macro_rules! new_full_start {
($config:expr) => {{
+ use std::sync::Arc;
let mut import_setup = None;
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
@@ -43,27 +39,24 @@ macro_rules! new_full_start {
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api)))
})?
- .with_import_queue(|_config, client, mut select_chain, transaction_pool| {
+ .with_import_queue(|_config, client, mut select_chain, _transaction_pool| {
let select_chain = select_chain.take()
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
let (grandpa_block_import, grandpa_link) =
- grandpa::block_import::<_, _, _, node_template_runtime::RuntimeApi, _>(
- client.clone(), &*client, select_chain
- )?;
+ grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?;
let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
grandpa_block_import.clone(), client.clone(),
);
- let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(
- sc_consensus_aura::SlotDuration::get_or_compute(&*client)?,
+ let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair>(
+ sc_consensus_aura::slot_duration(&*client)?,
aura_block_import,
Some(Box::new(grandpa_block_import.clone())),
None,
client,
inherent_data_providers.clone(),
- Some(transaction_pool),
)?;
import_setup = Some((grandpa_block_import, grandpa_link));
@@ -95,17 +88,19 @@ pub fn new_full(config: Configuration)
import_setup.take()
.expect("Link Half and Block Import are present for Full Services or setup failed before. qed");
- let service = builder.with_network_protocol(|_| Ok(NodeProtocol::new()))?
- .with_finality_proof_provider(|client, backend|
- Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _)
- )?
+ let service = builder
+ .with_finality_proof_provider(|client, backend| {
+ // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
+ let provider = client as Arc>;
+ Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)
+ })?
.build()?;
if participates_in_consensus {
- let proposer = sc_basic_authorship::ProposerFactory {
- client: service.client(),
- transaction_pool: service.transaction_pool(),
- };
+ let proposer = sc_basic_authorship::ProposerFactory::new(
+ service.client(),
+ service.transaction_pool()
+ );
let client = service.client();
let select_chain = service.select_chain()
@@ -115,7 +110,7 @@ pub fn new_full(config: Configuration)
sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>(
- sc_consensus_aura::SlotDuration::get_or_compute(&*client)?,
+ sc_consensus_aura::slot_duration(&*client)?,
client,
select_chain,
block_import,
@@ -145,44 +140,41 @@ pub fn new_full(config: Configuration)
gossip_duration: Duration::from_millis(333),
justification_period: 512,
name: Some(name),
- observer_enabled: true,
+ observer_enabled: false,
keystore,
is_authority,
};
- match (is_authority, disable_grandpa) {
- (false, false) => {
- // start the lightweight GRANDPA observer
- service.spawn_task("grandpa-observer", grandpa::run_grandpa_observer(
- grandpa_config,
- grandpa_link,
- service.network(),
- service.on_exit(),
- )?);
- },
- (true, false) => {
- // start the full GRANDPA voter
- let voter_config = grandpa::GrandpaParams {
- config: grandpa_config,
- link: grandpa_link,
- network: service.network(),
- inherent_data_providers: inherent_data_providers.clone(),
- on_exit: service.on_exit(),
- telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
- voting_rule: grandpa::VotingRulesBuilder::default().build(),
- };
-
- // the GRANDPA voter task is considered infallible, i.e.
- // if it fails we take down the service with it.
- service.spawn_essential_task("grandpa", grandpa::run_grandpa_voter(voter_config)?);
- },
- (_, true) => {
- grandpa::setup_disabled_grandpa(
- service.client(),
- &inherent_data_providers,
- service.network(),
- )?;
- },
+ let enable_grandpa = !disable_grandpa;
+ if enable_grandpa {
+ // start the full GRANDPA voter
+ // NOTE: non-authorities could run the GRANDPA observer protocol, but at
+ // this point the full voter should provide better guarantees of block
+ // and vote data availability than the observer. The observer has not
+ // been tested extensively yet and having most nodes in a network run it
+ // could lead to finality stalls.
+ let grandpa_config = grandpa::GrandpaParams {
+ config: grandpa_config,
+ link: grandpa_link,
+ network: service.network(),
+ inherent_data_providers: inherent_data_providers.clone(),
+ telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
+ voting_rule: grandpa::VotingRulesBuilder::default().build(),
+ prometheus_registry: service.prometheus_registry()
+ };
+
+ // the GRANDPA voter task is considered infallible, i.e.
+ // if it fails we take down the service with it.
+ service.spawn_essential_task(
+ "grandpa-voter",
+ grandpa::run_grandpa_voter(grandpa_config)?
+ );
+ } else {
+ grandpa::setup_disabled_grandpa(
+ service.client(),
+ &inherent_data_providers,
+ service.network(),
+ )?;
}
Ok(service)
@@ -212,28 +204,31 @@ pub fn new_light(config: Configuration)
let fetch_checker = fetcher
.map(|fetcher| fetcher.checker().clone())
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
- let grandpa_block_import = grandpa::light_block_import::<_, _, _, RuntimeApi>(
- client.clone(), backend, &*client.clone(), Arc::new(fetch_checker),
+ let grandpa_block_import = grandpa::light_block_import(
+ client.clone(),
+ backend,
+ &(client.clone() as Arc<_>),
+ Arc::new(fetch_checker),
)?;
let finality_proof_import = grandpa_block_import.clone();
let finality_proof_request_builder =
finality_proof_import.create_finality_proof_request_builder();
- let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, ()>(
- sc_consensus_aura::SlotDuration::get_or_compute(&*client)?,
+ 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)),
client,
inherent_data_providers.clone(),
- None,
)?;
Ok((import_queue, finality_proof_request_builder))
})?
- .with_network_protocol(|_| Ok(NodeProtocol::new()))?
- .with_finality_proof_provider(|client, backend|
- Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _)
- )?
+ .with_finality_proof_provider(|client, backend| {
+ // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
+ let provider = client as Arc>;
+ Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)
+ })?
.build()
}
diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml
index 8ea3f3adabc52c2c87802b2f407d188f14bd202c..b39fcc1dae4d5bdb3b71edfaac02c55783879e29 100644
--- a/bin/node-template/pallets/template/Cargo.toml
+++ b/bin/node-template/pallets/template/Cargo.toml
@@ -2,43 +2,47 @@
authors = ['Anonymous']
edition = '2018'
name = 'pallet-template'
-version = '2.0.0'
+version = "2.0.0-alpha.3"
+license = "Unlicense"
+homepage = "https://substrate.dev"
+repository = "https://github.com/paritytech/substrate/"
+description = "FRAME pallet template"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] }
safe-mix = { default-features = false, version = '1.0.0' }
[dependencies.frame-support]
default-features = false
-version = '2.0.0'
+version = "2.0.0-alpha.2"
path = "../../../../frame/support"
[dependencies.system]
default-features = false
package = 'frame-system'
-version = '2.0.0'
+version = "2.0.0-alpha.2"
path = "../../../../frame/system"
-
[dev-dependencies.sp-core]
default-features = false
-version = '2.0.0'
+version = "2.0.0-alpha.2"
path = "../../../../primitives/core"
[dev-dependencies.sp-io]
default-features = false
-version = '2.0.0'
+version = "2.0.0-alpha.2"
path = "../../../../primitives/io"
[dev-dependencies.sp-runtime]
default-features = false
-version = '2.0.0'
+version = "2.0.0-alpha.2"
path = "../../../../primitives/runtime"
+
[features]
default = ['std']
std = [
- 'codec/std',
- 'frame-support/std',
- 'safe-mix/std',
- 'system/std'
+ 'codec/std',
+ 'frame-support/std',
+ 'safe-mix/std',
+ 'system/std'
]
diff --git a/bin/node-template/pallets/template/src/lib.rs b/bin/node-template/pallets/template/src/lib.rs
index aa4d2cbc994d398046b6a6e7668c512c1b793a7c..34e055bf546b0b57a247a8cb083a41de7d064508 100644
--- a/bin/node-template/pallets/template/src/lib.rs
+++ b/bin/node-template/pallets/template/src/lib.rs
@@ -1,12 +1,12 @@
#![cfg_attr(not(feature = "std"), no_std)]
-/// A runtime module template with necessary imports
+/// A FRAME pallet template with necessary imports
/// Feel free to remove or edit this file as needed.
/// If you change the name of this file, make sure to update its references in runtime/src/lib.rs
/// If you remove this file, you can remove those references
-/// For more guidance on Substrate modules, see the example module
+/// For more guidance on Substrate FRAME, see the example pallet
/// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs
use frame_support::{decl_module, decl_storage, decl_event, decl_error, dispatch};
diff --git a/bin/node-template/pallets/template/src/mock.rs b/bin/node-template/pallets/template/src/mock.rs
index b3c1098db6743189ec8fcad258459f2e013126e8..2ea81ffb456261122b234c6ae3c36f52eaa9c430 100644
--- a/bin/node-template/pallets/template/src/mock.rs
+++ b/bin/node-template/pallets/template/src/mock.rs
@@ -11,9 +11,9 @@ impl_outer_origin! {
pub enum Origin for Test {}
}
-// For testing the module, we construct most of a mock runtime. This means
+// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
-// configuration traits of modules we want to use.
+// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
@@ -41,7 +41,7 @@ impl system::Trait for Test {
type ModuleToIndex = ();
type AccountData = ();
type OnNewAccount = ();
- type OnReapAccount = ();
+ type OnKilledAccount = ();
}
impl Trait for Test {
type Event = ();
diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml
index ddecb0e4cff4c11da2ddf6e7973c1c57e082d1e1..9268dd8c05035f4dd8022702e9792f421ab556c5 100644
--- a/bin/node-template/runtime/Cargo.toml
+++ b/bin/node-template/runtime/Cargo.toml
@@ -1,42 +1,43 @@
[package]
name = "node-template-runtime"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
authors = ["Anonymous"]
edition = "2018"
license = "Unlicense"
+homepage = "https://substrate.dev"
+repository = "https://github.com/paritytech/substrate/"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
+codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] }
-aura = { version = "2.0.0", default-features = false, package = "pallet-aura", path = "../../../frame/aura" }
-balances = { version = "2.0.0", default-features = false, package = "pallet-balances", path = "../../../frame/balances" }
-frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" }
-grandpa = { version = "2.0.0", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" }
-indices = { version = "2.0.0", default-features = false, package = "pallet-indices", path = "../../../frame/indices" }
-randomness-collective-flip = { version = "2.0.0", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" }
-sudo = { version = "2.0.0", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" }
-system = { version = "2.0.0", default-features = false, package = "frame-system", path = "../../../frame/system" }
-timestamp = { version = "2.0.0", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" }
-transaction-payment = { version = "2.0.0", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" }
-frame-executive = { version = "2.0.0", default-features = false, path = "../../../frame/executive" }
+aura = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-aura", path = "../../../frame/aura" }
+balances = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-balances", path = "../../../frame/balances" }
+frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" }
+grandpa = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" }
+randomness-collective-flip = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" }
+sudo = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" }
+system = { version = "2.0.0-alpha.2", default-features = false, package = "frame-system", path = "../../../frame/system" }
+timestamp = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" }
+transaction-payment = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" }
+frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/executive" }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
-sp-api = { version = "2.0.0", default-features = false, path = "../../../primitives/api" }
-sp-block-builder = { path = "../../../primitives/block-builder", default-features = false}
-sp-consensus-aura = { version = "0.8", default-features = false, path = "../../../primitives/consensus/aura" }
-sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" }
-sp-inherents = { path = "../../../primitives/inherents", default-features = false}
-sp-io = { version = "2.0.0", default-features = false, path = "../../../primitives/io" }
-sp-offchain = { version = "2.0.0", default-features = false, path = "../../../primitives/offchain" }
-sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" }
-sp-session = { version = "2.0.0", default-features = false, path = "../../../primitives/session" }
-sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" }
-sp-transaction-pool = { version = "2.0.0", default-features = false, path = "../../../primitives/transaction-pool" }
-sp-version = { version = "2.0.0", default-features = false, path = "../../../primitives/version" }
+sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/api" }
+sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.2"}
+sp-consensus-aura = { version = "0.8.0-alpha.2", default-features = false, path = "../../../primitives/consensus/aura" }
+sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" }
+sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-alpha.2"}
+sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/io" }
+sp-offchain = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/offchain" }
+sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" }
+sp-session = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/session" }
+sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" }
+sp-transaction-pool = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/transaction-pool" }
+sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/version" }
-template = { version = "2.0.0", default-features = false, path = "../pallets/template", package = "pallet-template" }
+template = { version = "2.0.0-alpha.2", default-features = false, path = "../pallets/template", package = "pallet-template" }
[build-dependencies]
-wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }
+wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }
[features]
default = ["std"]
@@ -47,7 +48,6 @@ std = [
"frame-executive/std",
"frame-support/std",
"grandpa/std",
- "indices/std",
"randomness-collective-flip/std",
"serde",
"sp-api/std",
diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs
index f3ff911f16b1ce65218fb06dbad4ae39b7f90526..53ef4fc9b30e0e576eb97301fab94521eac1a458 100644
--- a/bin/node-template/runtime/src/lib.rs
+++ b/bin/node-template/runtime/src/lib.rs
@@ -15,7 +15,7 @@ use sp_runtime::{
impl_opaque_keys, MultiSignature,
};
use sp_runtime::traits::{
- BlakeTwo256, Block as BlockT, StaticLookup, Verify, ConvertInto, IdentifyAccount
+ BlakeTwo256, Block as BlockT, IdentityLookup, Verify, ConvertInto, IdentifyAccount
};
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
@@ -132,7 +132,7 @@ impl system::Trait for Runtime {
/// The aggregated dispatch type that is available for extrinsics.
type Call = Call;
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
- type Lookup = Indices;
+ type Lookup = IdentityLookup;
/// The index type for storing how many extrinsics an account has signed.
type Index = Index;
/// The index type for blocks.
@@ -164,7 +164,7 @@ impl system::Trait for Runtime {
/// What to do if a new account is created.
type OnNewAccount = ();
/// What to do if an account is fully reaped from the system.
- type OnReapAccount = Balances;
+ type OnKilledAccount = ();
/// The data to be stored in an account.
type AccountData = balances::AccountData;
}
@@ -177,23 +177,6 @@ impl grandpa::Trait for Runtime {
type Event = Event;
}
-parameter_types! {
- /// How much an index costs.
- pub const IndexDeposit: u128 = 100;
-}
-
-impl indices::Trait for Runtime {
- /// The type for recording indexing into the account enumeration. If this ever overflows, there
- /// will be problems!
- type AccountIndex = AccountIndex;
- /// The ubiquitous event type.
- type Event = Event;
- /// The currency type.
- type Currency = Balances;
- /// How much an index costs.
- type Deposit = IndexDeposit;
-}
-
parameter_types! {
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
}
@@ -252,21 +235,20 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic
{
System: system::{Module, Call, Config, Storage, Event},
+ RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
Timestamp: timestamp::{Module, Call, Storage, Inherent},
Aura: aura::{Module, Config, Inherent(Timestamp)},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
- Indices: indices::{Module, Call, Storage, Event, Config},
Balances: balances::{Module, Call, Storage, Config, Event},
TransactionPayment: transaction_payment::{Module, Storage},
Sudo: sudo::{Module, Call, Config, Storage, Event},
// Used for the module template in `./template.rs`
TemplateModule: template::{Module, Call, Storage, Event},
- RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
}
);
/// The address format for describing accounts.
-pub type Address = ::Source;
+pub type Address = AccountId;
/// Block header type as expected by this runtime.
pub type Header = generic::Header;
/// Block type as expected by this runtime.
diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml
index 079e8d13e2d690eba49701253cfddc7efa29b8fb..e18b6b228e65553543891d6e5cbcd6fb6094c752 100644
--- a/bin/node/cli/Cargo.toml
+++ b/bin/node/cli/Cargo.toml
@@ -1,12 +1,14 @@
[package]
name = "node-cli"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
authors = ["Parity Technologies "]
description = "Substrate node implementation in Rust."
build = "build.rs"
edition = "2018"
license = "GPL-3.0"
default-run = "substrate"
+homepage = "https://substrate.dev"
+repository = "https://github.com/paritytech/substrate/"
[package.metadata.wasm-pack.profile.release]
# `wasm-opt` has some problems on linux, see
@@ -29,7 +31,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
# third-party dependencies
-codec = { package = "parity-scale-codec", version = "1.0.6" }
+codec = { package = "parity-scale-codec", version = "1.2.0" }
serde = { version = "1.0.102", features = ["derive"] }
futures = { version = "0.3.1", features = ["compat"] }
hex-literal = "0.2.1"
@@ -40,81 +42,84 @@ structopt = { version = "0.3.8", optional = true }
tracing = "0.1.10"
# primitives
-sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" }
-sp-consensus-babe = { version = "0.8", path = "../../../primitives/consensus/babe" }
-grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
-sp-core = { version = "2.0.0", path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
-sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
-sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
-sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
-sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" }
-sp-io = { version = "2.0.0", path = "../../../primitives/io" }
-sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" }
+sp-authority-discovery = { version = "2.0.0-alpha.2", path = "../../../primitives/authority-discovery" }
+sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" }
+grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
+sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
+sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
+sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/timestamp" }
+sp-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/finality-tracker" }
+sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" }
+sp-keyring = { version = "2.0.0-alpha.2", path = "../../../primitives/keyring" }
+sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" }
+sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" }
# client dependencies
-sc-client-api = { version = "2.0.0", path = "../../../client/api" }
-sc-client = { version = "0.8", path = "../../../client/" }
-sc-chain-spec = { version = "2.0.0", path = "../../../client/chain-spec" }
-sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" }
-sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
-sc-network = { version = "0.8", path = "../../../client/network" }
-sc-consensus-babe = { version = "0.8", path = "../../../client/consensus/babe" }
-grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
-sc-client-db = { version = "0.8", default-features = false, path = "../../../client/db" }
-sc-offchain = { version = "2.0.0", path = "../../../client/offchain" }
-sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
-sc-basic-authorship = { version = "0.8", path = "../../../client/basic-authorship" }
-sc-service = { version = "0.8", default-features = false, path = "../../../client/service" }
-sc-tracing = { version = "2.0.0", path = "../../../client/tracing" }
-sc-telemetry = { version = "2.0.0", path = "../../../client/telemetry" }
-sc-authority-discovery = { version = "0.8", path = "../../../client/authority-discovery" }
+sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" }
+sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" }
+sc-chain-spec = { version = "2.0.0-alpha.2", path = "../../../client/chain-spec" }
+sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../client/transaction-pool" }
+sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" }
+sc-network = { version = "0.8.0-alpha.2", path = "../../../client/network" }
+sc-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../client/consensus/babe" }
+grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
+sc-client-db = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/db" }
+sc-offchain = { version = "2.0.0-alpha.2", path = "../../../client/offchain" }
+sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" }
+sc-basic-authorship = { version = "0.8.0-alpha.2", path = "../../../client/basic-authorship" }
+sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/service" }
+sc-tracing = { version = "2.0.0-alpha.2", path = "../../../client/tracing" }
+sc-telemetry = { version = "2.0.0-alpha.2", path = "../../../client/telemetry" }
+sc-authority-discovery = { version = "0.8.0-alpha.2", path = "../../../client/authority-discovery" }
# frame dependencies
-pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
-pallet-timestamp = { version = "2.0.0", default-features = false, path = "../../../frame/timestamp" }
-pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
-frame-system = { version = "2.0.0", path = "../../../frame/system" }
-pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
-pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
-frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" }
-pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" }
-pallet-authority-discovery = { version = "2.0.0", path = "../../../frame/authority-discovery" }
+pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" }
+pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/timestamp" }
+pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" }
+frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" }
+pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" }
+pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" }
+frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" }
+pallet-im-online = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/im-online" }
+pallet-authority-discovery = { version = "2.0.0-alpha.2", path = "../../../frame/authority-discovery" }
# node-specific dependencies
-node-runtime = { version = "2.0.0", path = "../runtime" }
-node-rpc = { version = "2.0.0", path = "../rpc" }
-node-primitives = { version = "2.0.0", path = "../primitives" }
-node-executor = { version = "2.0.0", path = "../executor" }
+node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" }
+node-rpc = { version = "2.0.0-alpha.2", path = "../rpc" }
+node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" }
+node-executor = { version = "2.0.0-alpha.2", path = "../executor" }
# CLI-specific dependencies
-sc-cli = { version = "0.8.0", optional = true, path = "../../../client/cli" }
-node-transaction-factory = { version = "0.8.0", optional = true, path = "../transaction-factory" }
-node-inspect = { version = "0.8.0", optional = true, path = "../inspect" }
+sc-cli = { version = "0.8.0-alpha.2", optional = true, path = "../../../client/cli" }
+frame-benchmarking-cli = { version = "2.0.0-alpha.2", optional = true, path = "../../../utils/frame/benchmarking-cli" }
+node-transaction-factory = { version = "0.8.0-alpha.2", optional = true, path = "../transaction-factory" }
+node-inspect = { version = "0.8.0-alpha.2", optional = true, path = "../inspect" }
# WASM-specific dependencies
wasm-bindgen = { version = "0.2.57", optional = true }
wasm-bindgen-futures = { version = "0.4.7", optional = true }
-browser-utils = { path = "../../../utils/browser", optional = true }
+browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.8.0-alpha.2" }
[dev-dependencies]
-sc-keystore = { version = "2.0.0", path = "../../../client/keystore" }
-sc-consensus-babe = { version = "0.8", features = ["test-helpers"], path = "../../../client/consensus/babe" }
-sc-consensus-epochs = { version = "0.8", path = "../../../client/consensus/epochs" }
-sc-service-test = { version = "2.0.0", path = "../../../client/service/test" }
+sc-keystore = { version = "2.0.0-alpha.2", path = "../../../client/keystore" }
+sc-consensus-babe = { version = "0.8.0-alpha.2", features = ["test-helpers"], path = "../../../client/consensus/babe" }
+sc-consensus-epochs = { version = "0.8.0-alpha.2", path = "../../../client/consensus/epochs" }
+sc-service-test = { version = "2.0.0-dev", path = "../../../client/service/test" }
futures = "0.3.1"
tempfile = "3.1.0"
assert_cmd = "0.12"
nix = "0.17"
+serde_json = "1.0"
[build-dependencies]
-build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
+build-script-utils = { version = "2.0.0-alpha.2", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
structopt = { version = "0.3.8", optional = true }
-node-transaction-factory = { version = "0.8.0", optional = true, path = "../transaction-factory" }
-node-inspect = { version = "0.8.0", optional = true, path = "../inspect" }
+node-transaction-factory = { version = "0.8.0-alpha.2", optional = true, path = "../transaction-factory" }
+node-inspect = { version = "0.8.0-alpha.2", optional = true, path = "../inspect" }
+frame-benchmarking-cli = { version = "2.0.0-alpha.2", optional = true, path = "../../../utils/frame/benchmarking-cli" }
[build-dependencies.sc-cli]
-version = "0.8.0"
+version = "0.8.0-alpha.2"
package = "sc-cli"
path = "../../../client/cli"
optional = true
@@ -135,6 +140,7 @@ cli = [
"node-inspect",
"node-transaction-factory",
"sc-cli",
+ "frame-benchmarking-cli",
"sc-service/rocksdb",
"structopt",
"vergen",
@@ -145,3 +151,4 @@ wasmtime = [
"sc-cli/wasmtime",
"sc-service/wasmtime",
]
+runtime-benchmarks = [ "node-runtime/runtime-benchmarks" ]
diff --git a/bin/node/cli/bin/main.rs b/bin/node/cli/bin/main.rs
index e951c04710b92ff387b2f5fd5ba3c144b68af05c..8c4412667baceec56904864413178cbc88001497 100644
--- a/bin/node/cli/bin/main.rs
+++ b/bin/node/cli/bin/main.rs
@@ -18,10 +18,8 @@
#![warn(missing_docs)]
-use sc_cli::VersionInfo;
-
-fn main() -> Result<(), sc_cli::error::Error> {
- let version = VersionInfo {
+fn main() -> sc_cli::Result<()> {
+ let version = sc_cli::VersionInfo {
name: "Substrate Node",
commit: env!("VERGEN_SHA_SHORT"),
version: env!("CARGO_PKG_VERSION"),
diff --git a/bin/node/cli/src/chain_spec.rs b/bin/node/cli/src/chain_spec.rs
index 5cdfb5cab86f591343a18596aa5ee49c9f3d3ee7..af24db704c379e4ca11faf0a359e03afb04167f8 100644
--- a/bin/node/cli/src/chain_spec.rs
+++ b/bin/node/cli/src/chain_spec.rs
@@ -243,11 +243,10 @@ pub fn testnet_genesis(
}),
pallet_session: Some(SessionConfig {
keys: initial_authorities.iter().map(|x| {
- (x.0.clone(), session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone()))
+ (x.0.clone(), x.0.clone(), session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone()))
}).collect::>(),
}),
pallet_staking: Some(StakingConfig {
- current_era: 0,
validator_count: initial_authorities.len() as u32 * 2,
minimum_validator_count: initial_authorities.len() as u32,
stakers: initial_authorities.iter().map(|x| {
diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs
index 7dcd02699d664c9c44d31cc2152e3f208007a277..b6db9c3deb7e31f8f8da62d30b6971bf572b30d1 100644
--- a/bin/node/cli/src/cli.rs
+++ b/bin/node/cli/src/cli.rs
@@ -19,11 +19,6 @@ use structopt::StructOpt;
/// An overarching CLI command definition.
#[derive(Clone, Debug, StructOpt)]
-#[structopt(settings = &[
- structopt::clap::AppSettings::GlobalVersion,
- structopt::clap::AppSettings::ArgsNegateSubcommands,
- structopt::clap::AppSettings::SubcommandsNegateReqs,
-])]
pub struct Cli {
/// Possible subcommand with parameters.
#[structopt(subcommand)]
@@ -53,6 +48,13 @@ pub enum Subcommand {
about = "Decode given block or extrinsic using current native runtime."
)]
Inspect(node_inspect::cli::InspectCmd),
+
+ /// The custom benchmark subcommmand benchmarking runtime pallets.
+ #[structopt(
+ name = "benchmark",
+ about = "Benchmark runtime pallets."
+ )]
+ Benchmark(frame_benchmarking_cli::BenchmarkCmd),
}
/// The `factory` command used to generate transactions.
diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs
index ba0f2785c1f00ba25241353cf0f2eb2fc0b92e69..dfdf5533f2b343e5f3fbe372a4b3d058f9c97f07 100644
--- a/bin/node/cli/src/command.rs
+++ b/bin/node/cli/src/command.rs
@@ -14,13 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see .
-use sc_cli::{VersionInfo, error};
+use sc_cli::VersionInfo;
use sc_service::{Roles as ServiceRoles};
use node_transaction_factory::RuntimeAdapter;
use crate::{Cli, service, ChainSpec, load_spec, Subcommand, factory_impl::FactoryState};
/// Parse command line arguments into service configuration.
-pub fn run(args: I, version: VersionInfo) -> error::Result<()>
+pub fn run(args: I, version: VersionInfo) -> sc_cli::Result<()>
where
I: Iterator- ,
T: Into + Clone,
@@ -28,42 +28,52 @@ where
let args: Vec<_> = args.collect();
let opt = sc_cli::from_iter::(args.clone(), &version);
- let mut config = sc_service::Configuration::new(&version);
+ let mut config = sc_service::Configuration::from_version(&version);
match opt.subcommand {
- None => sc_cli::run(
- config,
- opt.run,
- service::new_light,
- service::new_full,
- load_spec,
- &version,
- ),
+ None => {
+ opt.run.init(&version)?;
+ opt.run.update_config(&mut config, load_spec, &version)?;
+ opt.run.run(
+ config,
+ service::new_light,
+ service::new_full,
+ &version,
+ )
+ },
Some(Subcommand::Inspect(cmd)) => {
- cmd.init(&mut config, load_spec, &version)?;
+ cmd.init(&version)?;
+ cmd.update_config(&mut config, load_spec, &version)?;
let client = sc_service::new_full_client::<
- node_runtime::Block,node_runtime::RuntimeApi, node_executor::Executor, _, _,
+ node_runtime::Block, node_runtime::RuntimeApi, node_executor::Executor, _, _,
>(&config)?;
let inspect = node_inspect::Inspector::::new(client);
cmd.run(inspect)
},
+ Some(Subcommand::Benchmark(cmd)) => {
+ cmd.init(&version)?;
+ cmd.update_config(&mut config, load_spec, &version)?;
+
+ cmd.run::<_, _, node_runtime::Block, node_executor::Executor>(config)
+ },
Some(Subcommand::Factory(cli_args)) => {
- sc_cli::init(&cli_args.shared_params, &version)?;
- sc_cli::init_config(&mut config, &cli_args.shared_params, &version, load_spec)?;
- sc_cli::fill_import_params(
+ cli_args.shared_params.init(&version)?;
+ cli_args.shared_params.update_config(&mut config, load_spec, &version)?;
+ cli_args.import_params.update_config(
&mut config,
- &cli_args.import_params,
ServiceRoles::FULL,
cli_args.shared_params.dev,
)?;
- sc_cli::fill_config_keystore_in_memory(&mut config)?;
+ config.use_in_memory_keystore()?;
match ChainSpec::from(config.expect_chain_spec().id()) {
Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {},
- _ => panic!("Factory is only supported for development and local testnet."),
+ _ => return Err(
+ "Factory is only supported for development and local testnet.".into()
+ ),
}
// Setup tracing.
@@ -72,7 +82,9 @@ where
cli_args.import_params.tracing_receiver.into(), tracing_targets
);
if let Err(e) = tracing::subscriber::set_global_default(subscriber) {
- panic!("Unable to set global default subscriber {}", e);
+ return Err(
+ format!("Unable to set global default subscriber {}", e).into()
+ );
}
}
@@ -91,12 +103,13 @@ where
Ok(())
},
- Some(Subcommand::Base(subcommand)) => sc_cli::run_subcommand(
- config,
- subcommand,
- load_spec,
- |config: service::NodeConfiguration| Ok(new_full_start!(config).0),
- &version,
- ),
+ Some(Subcommand::Base(subcommand)) => {
+ subcommand.init(&version)?;
+ subcommand.update_config(&mut config, load_spec, &version)?;
+ subcommand.run(
+ config,
+ |config: service::NodeConfiguration| Ok(new_full_start!(config).0),
+ )
+ },
}
}
diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs
index a882483a44a3dd8411eb6892a71e0cb50a506fbd..332c47ea132ea3dc176a07a20d34a7d2e62d0d74 100644
--- a/bin/node/cli/src/service.rs
+++ b/bin/node/cli/src/service.rs
@@ -22,7 +22,7 @@ use std::sync::Arc;
use sc_consensus_babe;
use sc_client::{self, LongestChain};
-use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider};
+use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
use node_executor;
use node_primitives::Block;
use node_runtime::{GenesisConfig, RuntimeApi};
@@ -30,7 +30,6 @@ use sc_service::{
AbstractService, ServiceBuilder, config::Configuration, error::{Error as ServiceError},
};
use sp_inherents::InherentDataProviders;
-use sc_network::construct_simple_protocol;
use sc_service::{Service, NetworkStatus};
use sc_client::{Client, LocalCallExecutor};
@@ -40,17 +39,13 @@ use node_executor::NativeExecutor;
use sc_network::NetworkService;
use sc_offchain::OffchainWorkers;
-construct_simple_protocol! {
- /// Demo protocol attachment for substrate.
- pub struct NodeProtocol where Block = Block { }
-}
-
/// Starts a `ServiceBuilder` for a full service.
///
/// Use this macro if you don't actually need the full service, but just the builder in order to
/// be able to perform chain operations.
macro_rules! new_full_start {
($config:expr) => {{
+ use std::sync::Arc;
type RpcExtension = jsonrpc_core::IoHandler;
let mut import_setup = None;
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
@@ -70,7 +65,7 @@ macro_rules! new_full_start {
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
let (grandpa_block_import, grandpa_link) = grandpa::block_import(
client.clone(),
- &*client,
+ &(client.clone() as Arc<_>),
select_chain,
)?;
let justification_import = grandpa_block_import.clone();
@@ -79,7 +74,6 @@ macro_rules! new_full_start {
sc_consensus_babe::Config::get_or_compute(&*client)?,
grandpa_block_import,
client.clone(),
- client.clone(),
)?;
let import_queue = sc_consensus_babe::import_queue(
@@ -87,7 +81,6 @@ macro_rules! new_full_start {
block_import.clone(),
Some(Box::new(justification_import)),
None,
- client.clone(),
client,
inherent_data_providers.clone(),
)?;
@@ -124,6 +117,7 @@ macro_rules! new_full {
($config:expr, $with_startup_data: expr) => {{
use futures::prelude::*;
use sc_network::Event;
+ use sc_client_api::ExecutorProvider;
let (
is_authority,
@@ -146,10 +140,12 @@ macro_rules! new_full {
let (builder, mut import_setup, inherent_data_providers) = new_full_start!($config);
- let service = builder.with_network_protocol(|_| Ok(crate::service::NodeProtocol::new()))?
- .with_finality_proof_provider(|client, backend|
- Ok(Arc::new(grandpa::FinalityProofProvider::new(backend, client)) as _)
- )?
+ let service = builder
+ .with_finality_proof_provider(|client, backend| {
+ // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
+ let provider = client as Arc>;
+ Ok(Arc::new(grandpa::FinalityProofProvider::new(backend, provider)) as _)
+ })?
.build()?;
let (block_import, grandpa_link, babe_link) = import_setup.take()
@@ -158,10 +154,10 @@ macro_rules! new_full {
($with_startup_data)(&block_import, &babe_link);
if participates_in_consensus {
- let proposer = sc_basic_authorship::ProposerFactory {
- client: service.client(),
- transaction_pool: service.transaction_pool(),
- };
+ let proposer = sc_basic_authorship::ProposerFactory::new(
+ service.client(),
+ service.transaction_pool()
+ );
let client = service.client();
let select_chain = service.select_chain()
@@ -215,46 +211,41 @@ macro_rules! new_full {
gossip_duration: std::time::Duration::from_millis(333),
justification_period: 512,
name: Some(name),
- observer_enabled: true,
+ observer_enabled: false,
keystore,
is_authority,
};
- match (is_authority, disable_grandpa) {
- (false, false) => {
- // start the lightweight GRANDPA observer
- service.spawn_task("grandpa-observer", grandpa::run_grandpa_observer(
- config,
- grandpa_link,
- service.network(),
- service.on_exit(),
- )?);
- },
- (true, false) => {
- // start the full GRANDPA voter
- let grandpa_config = grandpa::GrandpaParams {
- config: config,
- link: grandpa_link,
- network: service.network(),
- inherent_data_providers: inherent_data_providers.clone(),
- on_exit: service.on_exit(),
- telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
- voting_rule: grandpa::VotingRulesBuilder::default().build(),
- };
- // the GRANDPA voter task is considered infallible, i.e.
- // if it fails we take down the service with it.
- service.spawn_essential_task(
- "grandpa-voter",
- grandpa::run_grandpa_voter(grandpa_config)?
- );
- },
- (_, true) => {
- grandpa::setup_disabled_grandpa(
- service.client(),
- &inherent_data_providers,
- service.network(),
- )?;
- },
+ let enable_grandpa = !disable_grandpa;
+ if enable_grandpa {
+ // start the full GRANDPA voter
+ // NOTE: non-authorities could run the GRANDPA observer protocol, but at
+ // this point the full voter should provide better guarantees of block
+ // and vote data availability than the observer. The observer has not
+ // been tested extensively yet and having most nodes in a network run it
+ // could lead to finality stalls.
+ let grandpa_config = grandpa::GrandpaParams {
+ config,
+ link: grandpa_link,
+ network: service.network(),
+ inherent_data_providers: inherent_data_providers.clone(),
+ telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
+ voting_rule: grandpa::VotingRulesBuilder::default().build(),
+ prometheus_registry: service.prometheus_registry(),
+ };
+
+ // the GRANDPA voter task is considered infallible, i.e.
+ // if it fails we take down the service with it.
+ service.spawn_essential_task(
+ "grandpa-voter",
+ grandpa::run_grandpa_voter(grandpa_config)?
+ );
+ } else {
+ grandpa::setup_disabled_grandpa(
+ service.client(),
+ &inherent_data_providers,
+ service.network(),
+ )?;
}
Ok((service, inherent_data_providers))
@@ -264,20 +255,15 @@ macro_rules! new_full {
}}
}
-#[allow(dead_code)]
type ConcreteBlock = node_primitives::Block;
-#[allow(dead_code)]
type ConcreteClient =
Client<
Backend,
- LocalCallExecutor,
- NativeExecutor>,
+ LocalCallExecutor, NativeExecutor>,
ConcreteBlock,
node_runtime::RuntimeApi
>;
-#[allow(dead_code)]
type ConcreteBackend = Backend;
-#[allow(dead_code)]
type ConcreteTransactionPool = sc_transaction_pool::BasicPool<
sc_transaction_pool::FullChainApi,
ConcreteBlock
@@ -294,7 +280,7 @@ pub fn new_full(config: NodeConfiguration)
ConcreteClient,
LongestChain,
NetworkStatus,
- NetworkService::Hash>,
+ NetworkService::Hash>,
ConcreteTransactionPool,
OffchainWorkers<
ConcreteClient,
@@ -331,10 +317,10 @@ pub fn new_light(config: NodeConfiguration)
let fetch_checker = fetcher
.map(|fetcher| fetcher.checker().clone())
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
- let grandpa_block_import = grandpa::light_block_import::<_, _, _, RuntimeApi>(
+ let grandpa_block_import = grandpa::light_block_import(
client.clone(),
backend,
- &*client,
+ &(client.clone() as Arc<_>),
Arc::new(fetch_checker),
)?;
@@ -346,7 +332,6 @@ pub fn new_light(config: NodeConfiguration)
sc_consensus_babe::Config::get_or_compute(&*client)?,
grandpa_block_import,
client.clone(),
- client.clone(),
)?;
let import_queue = sc_consensus_babe::import_queue(
@@ -355,16 +340,16 @@ pub fn new_light(config: NodeConfiguration)
None,
Some(Box::new(finality_proof_import)),
client.clone(),
- client,
inherent_data_providers.clone(),
)?;
Ok((import_queue, finality_proof_request_builder))
})?
- .with_network_protocol(|_| Ok(NodeProtocol::new()))?
- .with_finality_proof_provider(|client, backend|
- Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _)
- )?
+ .with_finality_proof_provider(|client, backend| {
+ // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
+ let provider = client as Arc>;
+ Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)
+ })?
.with_rpc_extensions(|builder,| ->
Result
{
@@ -504,7 +489,7 @@ mod tests {
|config| {
let mut setup_handles = None;
new_full!(config, |
- block_import: &sc_consensus_babe::BabeBlockImport<_, _, Block, _, _, _>,
+ block_import: &sc_consensus_babe::BabeBlockImport,
babe_link: &sc_consensus_babe::BabeLink,
| {
setup_handles = Some((block_import.clone(), babe_link.clone()));
@@ -521,10 +506,10 @@ mod tests {
let parent_header = service.client().header(&parent_id).unwrap().unwrap();
let parent_hash = parent_header.hash();
let parent_number = *parent_header.number();
- let mut proposer_factory = sc_basic_authorship::ProposerFactory {
- client: service.client(),
- transaction_pool: service.transaction_pool(),
- };
+ let mut proposer_factory = sc_basic_authorship::ProposerFactory::new(
+ service.client(),
+ service.transaction_pool()
+ );
let epoch = babe_link.epoch_changes().lock().epoch_for_child_of(
descendent_query(&*service.client()),
diff --git a/bin/node/cli/tests/build_spec_works.rs b/bin/node/cli/tests/build_spec_works.rs
new file mode 100644
index 0000000000000000000000000000000000000000..2eca71a5b5978de1e1de20873b6584a7d5c703b0
--- /dev/null
+++ b/bin/node/cli/tests/build_spec_works.rs
@@ -0,0 +1,37 @@
+// Copyright 2020 Parity Technologies (UK) Ltd.
+// This file is part of Substrate.
+
+// Substrate is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Substrate is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Substrate. If not, see .
+
+use assert_cmd::cargo::cargo_bin;
+use std::process::Command;
+use tempfile::tempdir;
+
+#[test]
+fn build_spec_works() {
+ let base_path = tempdir().expect("could not create a temp dir");
+
+ let output = Command::new(cargo_bin("substrate"))
+ .args(&["build-spec", "--dev", "-d"])
+ .arg(base_path.path())
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+
+ // Make sure that the `dev` chain folder exists, but the `db` doesn't
+ assert!(base_path.path().join("chains/dev/").exists());
+ assert!(!base_path.path().join("chains/dev/db").exists());
+
+ let _value: serde_json::Value = serde_json::from_slice(output.stdout.as_slice()).unwrap();
+}
diff --git a/utils/grafana-data-source/test/src/main.rs b/bin/node/cli/tests/check_block_works.rs
similarity index 52%
rename from utils/grafana-data-source/test/src/main.rs
rename to bin/node/cli/tests/check_block_works.rs
index 53deaffc3beb6088acc71bfee202bfbae41f0ef4..6bfb82a8bfafb84c1b041b87dc093e2481193ec5 100644
--- a/utils/grafana-data-source/test/src/main.rs
+++ b/bin/node/cli/tests/check_block_works.rs
@@ -1,4 +1,4 @@
-// Copyright 2019-2020 Parity Technologies (UK) Ltd.
+// Copyright 2020 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate is free software: you can redistribute it and/or modify
@@ -14,31 +14,25 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see .
-use grafana_data_source::{run_server, record_metrics};
-use std::time::Duration;
-use rand::Rng;
-use futures::{future::join, executor};
+#![cfg(unix)]
-async fn randomness() {
- loop {
- futures_timer::Delay::new(Duration::from_secs(1)).await;
+use assert_cmd::cargo::cargo_bin;
+use std::process::Command;
+use tempfile::tempdir;
- let random = rand::thread_rng().gen_range(0.0, 1000.0);
+mod common;
- let result = record_metrics!(
- "random data" => random,
- "random^2" => random * random,
- );
+#[test]
+fn check_block_works() {
+ let base_path = tempdir().expect("could not create a temp dir");
- if let Err(error) = result {
- eprintln!("{}", error);
- }
- }
-}
+ common::run_dev_node_for_a_while(base_path.path());
-fn main() {
- executor::block_on(join(
- run_server("127.0.0.1:9955".parse().unwrap()),
- randomness()
- )).0.unwrap();
+ let status = Command::new(cargo_bin("substrate"))
+ .args(&["check-block", "--dev", "--pruning", "archive", "-d"])
+ .arg(base_path.path())
+ .arg("1")
+ .status()
+ .unwrap();
+ assert!(status.success());
}
diff --git a/bin/node/cli/tests/common.rs b/bin/node/cli/tests/common.rs
index 4044f69d08168e4dda1d526ff9b1c4e5efbd32b8..34e371195c16b20e216a9426f238ce6b78bcd257 100644
--- a/bin/node/cli/tests/common.rs
+++ b/bin/node/cli/tests/common.rs
@@ -14,21 +14,53 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see .
-use std::{process::{Child, ExitStatus}, thread, time::Duration};
+#![cfg(unix)]
+#![allow(dead_code)]
+
+use std::{process::{Child, ExitStatus}, thread, time::Duration, path::Path};
+use assert_cmd::cargo::cargo_bin;
+use std::{convert::TryInto, process::Command};
+use nix::sys::signal::{kill, Signal::SIGINT};
+use nix::unistd::Pid;
/// Wait for the given `child` the given number of `secs`.
///
/// Returns the `Some(exit status)` or `None` if the process did not finish in the given time.
pub fn wait_for(child: &mut Child, secs: usize) -> Option {
- for _ in 0..secs {
+ for i in 0..secs {
match child.try_wait().unwrap() {
- Some(status) => return Some(status),
+ Some(status) => {
+ if i > 5 {
+ eprintln!("Child process took {} seconds to exit gracefully", i);
+ }
+ return Some(status)
+ },
None => thread::sleep(Duration::from_secs(1)),
}
}
- eprintln!("Took to long to exit. Killing...");
+ eprintln!("Took too long to exit (> {} seconds). Killing...", secs);
let _ = child.kill();
child.wait().unwrap();
None
}
+
+/// Run the node for a while (30 seconds)
+pub fn run_dev_node_for_a_while(base_path: &Path) {
+ let mut cmd = Command::new(cargo_bin("substrate"));
+
+ let mut cmd = cmd
+ .args(&["--dev"])
+ .arg("-d")
+ .arg(base_path)
+ .spawn()
+ .unwrap();
+
+ // Let it produce some blocks.
+ thread::sleep(Duration::from_secs(30));
+ assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running");
+
+ // Stop the process
+ kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap();
+ assert!(wait_for(&mut cmd, 40).map(|x| x.success()).unwrap_or_default());
+}
diff --git a/bin/node/cli/tests/factory.rs b/bin/node/cli/tests/factory.rs
new file mode 100644
index 0000000000000000000000000000000000000000..2930cd52e2e16e497d197849a9833d492c3868d7
--- /dev/null
+++ b/bin/node/cli/tests/factory.rs
@@ -0,0 +1,40 @@
+// 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 .
+
+#![cfg(unix)]
+
+use assert_cmd::cargo::cargo_bin;
+use std::process::{Command, Stdio};
+use tempfile::tempdir;
+
+mod common;
+
+#[test]
+fn factory_works() {
+ let base_path = tempdir().expect("could not create a temp dir");
+
+ let status = Command::new(cargo_bin("substrate"))
+ .stdout(Stdio::null())
+ .args(&["factory", "--dev", "-d"])
+ .arg(base_path.path())
+ .status()
+ .unwrap();
+ assert!(status.success());
+
+ // Make sure that the `dev` chain folder exists & `db`
+ assert!(base_path.path().join("chains/dev/").exists());
+ assert!(base_path.path().join("chains/dev/db").exists());
+}
diff --git a/bin/node/cli/tests/import_export_and_revert_work.rs b/bin/node/cli/tests/import_export_and_revert_work.rs
new file mode 100644
index 0000000000000000000000000000000000000000..131265e3b4ab9bd868b9728bca6cda558d2982f2
--- /dev/null
+++ b/bin/node/cli/tests/import_export_and_revert_work.rs
@@ -0,0 +1,59 @@
+// 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 .
+
+#![cfg(unix)]
+
+use assert_cmd::cargo::cargo_bin;
+use std::{process::Command, fs};
+use tempfile::tempdir;
+
+mod common;
+
+#[test]
+fn import_export_and_revert_work() {
+ let base_path = tempdir().expect("could not create a temp dir");
+ let exported_blocks = base_path.path().join("exported_blocks");
+
+ common::run_dev_node_for_a_while(base_path.path());
+
+ let status = Command::new(cargo_bin("substrate"))
+ .args(&["export-blocks", "--dev", "--pruning", "archive", "-d"])
+ .arg(base_path.path())
+ .arg(&exported_blocks)
+ .status()
+ .unwrap();
+ assert!(status.success());
+
+ let metadata = fs::metadata(&exported_blocks).unwrap();
+ assert!(metadata.len() > 0, "file exported_blocks should not be empty");
+
+ let _ = fs::remove_dir_all(base_path.path().join("db"));
+
+ let status = Command::new(cargo_bin("substrate"))
+ .args(&["import-blocks", "--dev", "--pruning", "archive", "-d"])
+ .arg(base_path.path())
+ .arg(&exported_blocks)
+ .status()
+ .unwrap();
+ assert!(status.success());
+
+ let status = Command::new(cargo_bin("substrate"))
+ .args(&["revert", "--dev", "--pruning", "archive", "-d"])
+ .arg(base_path.path())
+ .status()
+ .unwrap();
+ assert!(status.success());
+}
diff --git a/bin/node/cli/tests/inspect_works.rs b/bin/node/cli/tests/inspect_works.rs
new file mode 100644
index 0000000000000000000000000000000000000000..441b08ccf46da1b1ef70ec49a7a46015d94f3c4c
--- /dev/null
+++ b/bin/node/cli/tests/inspect_works.rs
@@ -0,0 +1,38 @@
+// 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 .
+
+#![cfg(unix)]
+
+use assert_cmd::cargo::cargo_bin;
+use std::process::Command;
+use tempfile::tempdir;
+
+mod common;
+
+#[test]
+fn inspect_works() {
+ let base_path = tempdir().expect("could not create a temp dir");
+
+ common::run_dev_node_for_a_while(base_path.path());
+
+ let status = Command::new(cargo_bin("substrate"))
+ .args(&["inspect", "--dev", "--pruning", "archive", "-d"])
+ .arg(base_path.path())
+ .args(&["block", "1"])
+ .status()
+ .unwrap();
+ assert!(status.success());
+}
diff --git a/bin/node/cli/tests/purge_chain_works.rs b/bin/node/cli/tests/purge_chain_works.rs
index e6b71db9910487a4e55f2fdf117e48c833b120bb..020259d0c595a57a01b8a9b113522d826e1de912 100644
--- a/bin/node/cli/tests/purge_chain_works.rs
+++ b/bin/node/cli/tests/purge_chain_works.rs
@@ -15,39 +15,27 @@
// along with Substrate. If not, see .
use assert_cmd::cargo::cargo_bin;
-use std::{convert::TryInto, process::Command, thread, time::Duration, fs, path::PathBuf};
+use std::process::Command;
+use tempfile::tempdir;
mod common;
#[test]
#[cfg(unix)]
fn purge_chain_works() {
- use nix::sys::signal::{kill, Signal::SIGINT};
- use nix::unistd::Pid;
+ let base_path = tempdir().expect("could not create a temp dir");
- let base_path = "purge_chain_test";
-
- let _ = fs::remove_dir_all(base_path);
- let mut cmd = Command::new(cargo_bin("substrate"))
- .args(&["--dev", "-d", base_path])
- .spawn()
- .unwrap();
-
- // Let it produce some blocks.
- thread::sleep(Duration::from_secs(30));
- assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running");
-
- // Stop the process
- kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap();
- assert!(common::wait_for(&mut cmd, 30).map(|x| x.success()).unwrap_or_default());
+ common::run_dev_node_for_a_while(base_path.path());
let status = Command::new(cargo_bin("substrate"))
- .args(&["purge-chain", "--dev", "-d", base_path, "-y"])
+ .args(&["purge-chain", "--dev", "-d"])
+ .arg(base_path.path())
+ .arg("-y")
.status()
.unwrap();
assert!(status.success());
// Make sure that the `dev` chain folder exists, but the `db` is deleted.
- assert!(PathBuf::from(base_path).join("chains/dev/").exists());
- assert!(!PathBuf::from(base_path).join("chains/dev/db").exists());
+ assert!(base_path.path().join("chains/dev/").exists());
+ assert!(!base_path.path().join("chains/dev/db").exists());
}
diff --git a/bin/node/cli/tests/running_the_node_and_interrupt.rs b/bin/node/cli/tests/running_the_node_and_interrupt.rs
index dbb57bdd21ab8de8add8f4faf4057aea2157fdaf..67efedccbe771a65e892b5dbe94bac702d3c01ce 100644
--- a/bin/node/cli/tests/running_the_node_and_interrupt.rs
+++ b/bin/node/cli/tests/running_the_node_and_interrupt.rs
@@ -15,7 +15,8 @@
// along with Substrate. If not, see .
use assert_cmd::cargo::cargo_bin;
-use std::{convert::TryInto, process::Command, thread, time::Duration, fs};
+use std::{convert::TryInto, process::Command, thread, time::Duration};
+use tempfile::tempdir;
mod common;
@@ -26,13 +27,14 @@ fn running_the_node_works_and_can_be_interrupted() {
use nix::unistd::Pid;
fn run_command_and_kill(signal: Signal) {
- let _ = fs::remove_dir_all("interrupt_test");
+ let base_path = tempdir().expect("could not create a temp dir");
let mut cmd = Command::new(cargo_bin("substrate"))
- .args(&["--dev", "-d", "interrupt_test"])
+ .args(&["--dev", "-d"])
+ .arg(base_path.path())
.spawn()
.unwrap();
- thread::sleep(Duration::from_secs(30));
+ thread::sleep(Duration::from_secs(20));
assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running");
kill(Pid::from_raw(cmd.id().try_into().unwrap()), signal).unwrap();
assert_eq!(
diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml
index 1d894e39fa978599d973824c2513dd96dabb62fd..c8ef75a5a2a9ae64c3949c0bd250262796ef0874 100644
--- a/bin/node/executor/Cargo.toml
+++ b/bin/node/executor/Cargo.toml
@@ -1,39 +1,42 @@
[package]
name = "node-executor"
-version = "2.0.0"
+version = "2.0.0-alpha.3"
authors = ["Parity Technologies "]
description = "Substrate node implementation in Rust."
edition = "2018"
license = "GPL-3.0"
+homepage = "https://substrate.dev"
+repository = "https://github.com/paritytech/substrate/"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.0.0" }
-node-primitives = { version = "2.0.0", path = "../primitives" }
-node-runtime = { version = "2.0.0", path = "../runtime" }
-sc-executor = { version = "0.8", path = "../../../client/executor" }
-sp-core = { version = "2.0.0", path = "../../../primitives/core" }
-sp-io = { version = "2.0.0", path = "../../../primitives/io" }
-sp-state-machine = { version = "0.8", path = "../../../primitives/state-machine" }
-sp-trie = { version = "2.0.0", path = "../../../primitives/trie" }
+codec = { package = "parity-scale-codec", version = "1.2.0" }
+node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" }
+node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" }
+sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" }
+sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
+sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" }
+sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" }
+sp-trie = { version = "2.0.0-alpha.2", path = "../../../primitives/trie" }
trie-root = "0.16.0"
+frame-benchmarking = { version = "2.0.0-alpha.2", path = "../../../frame/benchmarking" }
[dev-dependencies]
criterion = "0.3.0"
-frame-support = { version = "2.0.0", path = "../../../frame/support" }
-frame-system = { version = "2.0.0", path = "../../../frame/system" }
-node-testing = { version = "2.0.0", path = "../testing" }
-pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
-pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
-pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
-pallet-im-online = { version = "2.0.0", path = "../../../frame/im-online" }
-pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
-pallet-session = { version = "2.0.0", path = "../../../frame/session" }
-pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
-pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
-pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
-sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" }
-sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
-substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
+frame-support = { version = "2.0.0-alpha.2", path = "../../../frame/support" }
+frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" }
+node-testing = { version = "2.0.0-alpha.2", path = "../testing" }
+pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" }
+pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" }
+pallet-grandpa = { version = "2.0.0-alpha.2", path = "../../../frame/grandpa" }
+pallet-im-online = { version = "2.0.0-alpha.2", path = "../../../frame/im-online" }
+pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" }
+pallet-session = { version = "2.0.0-alpha.2", path = "../../../frame/session" }
+pallet-timestamp = { version = "2.0.0-alpha.2", path = "../../../frame/timestamp" }
+pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" }
+pallet-treasury = { version = "2.0.0-alpha.2", path = "../../../frame/treasury" }
+sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../../primitives/application-crypto" }
+sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
+substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" }
wabt = "0.9.2"
[features]
diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs
index 034c7c6759e112a7db29ab63cf7c01a81f35340a..ef0cdf445a561c813a3059602e3aef41106f4ec3 100644
--- a/bin/node/executor/benches/bench.rs
+++ b/bin/node/executor/benches/bench.rs
@@ -23,12 +23,13 @@ use node_runtime::{
};
use node_runtime::constants::currency::*;
use node_testing::keyring::*;
-use sp_core::{Blake2Hasher, NativeOrEncoded, NeverNativeValue};
+use sp_core::{NativeOrEncoded, NeverNativeValue};
use sp_core::storage::well_known_keys;
use sp_core::traits::CodeExecutor;
use frame_support::Hashable;
use sp_state_machine::TestExternalities as CoreTestExternalities;
use sc_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities};
+use sp_runtime::traits::BlakeTwo256;
criterion_group!(benches, bench_execute_block);
criterion_main!(benches);
@@ -54,7 +55,7 @@ fn sign(xt: CheckedExtrinsic) -> UncheckedExtrinsic {
node_testing::keyring::sign(xt, VERSION, GENESIS_HASH)
}
-fn new_test_ext(genesis_config: &GenesisConfig) -> TestExternalities {
+fn new_test_ext(genesis_config: &GenesisConfig) -> TestExternalities {
let mut test_ext = TestExternalities::new_with_code(
COMPACT_CODE,
genesis_config.build_storage().unwrap(),
@@ -76,7 +77,7 @@ fn construct_block(
let extrinsics = extrinsics.into_iter().map(sign).collect::>();
// calculate the header fields that we can.
- let extrinsics_root = Layout::::ordered_trie_root(
+ let extrinsics_root = Layout::::ordered_trie_root(
extrinsics.iter().map(Encode::encode)
).to_fixed_bytes()
.into();
@@ -90,7 +91,7 @@ fn construct_block(
};
// execute the block to get the real header.
- executor.call::<_, NeverNativeValue, fn() -> _>(
+ executor.call:: _>(
ext,
"Core_initialize_block",
&header.encode(),
@@ -99,7 +100,7 @@ fn construct_block(
).0.unwrap();
for i in extrinsics.iter() {
- executor.call::<_, NeverNativeValue, fn() -> _>(
+ executor.call:: _>(
ext,
"BlockBuilder_apply_extrinsic",
&i.encode(),
@@ -108,7 +109,7 @@ fn construct_block(
).0.unwrap();
}
- let header = match executor.call::<_, NeverNativeValue, fn() -> _>(
+ let header = match executor.call:: _>(
ext,
"BlockBuilder_finalize_block",
&[0u8;0],
@@ -165,7 +166,7 @@ fn bench_execute_block(c: &mut Criterion) {
// Get the runtime version to initialize the runtimes cache.
{
let mut test_ext = new_test_ext(&genesis_config);
- executor.runtime_version(&mut test_ext.ext());
+ executor.runtime_version(&mut test_ext.ext()).unwrap();
}
let blocks = test_blocks(&genesis_config, &executor);
@@ -174,7 +175,7 @@ fn bench_execute_block(c: &mut Criterion) {
|| new_test_ext(&genesis_config),
|test_ext| {
for block in blocks.iter() {
- executor.call::<_, NeverNativeValue, fn() -> _>(
+ executor.call:: _>(
&mut test_ext.ext(),
"Core_execute_block",
&block.0,
diff --git a/bin/node/executor/src/lib.rs b/bin/node/executor/src/lib.rs
index 72f40b7c1f0cd6c1984b39a914ba841452708d27..bcc7f48507398cd0ea15319460f8d13e6058f2ec 100644
--- a/bin/node/executor/src/lib.rs
+++ b/bin/node/executor/src/lib.rs
@@ -26,5 +26,5 @@ native_executor_instance!(
pub Executor,
node_runtime::api::dispatch,
node_runtime::native_version,
- sp_io::benchmarking::HostFunctions,
+ frame_benchmarking::benchmarking::HostFunctions,
);
diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs
index 100bdf3fe60ee8a90a557e4b174c6e76cc712b60..1ee0a17c81120ca32a7a9af2d704ce97699ee454 100644
--- a/bin/node/executor/tests/basic.rs
+++ b/bin/node/executor/tests/basic.rs
@@ -21,13 +21,11 @@ use frame_support::{
weights::{GetDispatchInfo, DispatchInfo, DispatchClass},
};
use sp_core::{
- Blake2Hasher, NeverNativeValue, map,
- traits::Externalities,
- storage::{well_known_keys, Storage},
+ NeverNativeValue, map, traits::Externalities, storage::{well_known_keys, Storage},
};
use sp_runtime::{
ApplyExtrinsicResult, Fixed64,
- traits::{Hash as HashT, Convert},
+ traits::{Hash as HashT, Convert, BlakeTwo256},
transaction_validity::InvalidTransaction,
};
use pallet_contracts::ContractAddressFor;
@@ -93,7 +91,6 @@ fn changes_trie_block() -> (Vec, Hash) {
)
}
-
/// block 1 and 2 must be created together to ensure transactions are only signed once (since they
/// are not guaranteed to be deterministic) and to ensure that the correct state is propagated
/// from block1's execution to block2 to derive the correct storage_root.
@@ -161,10 +158,10 @@ fn block_with_size(time: u64, nonce: u32, size: usize) -> (Vec, Hash) {
#[test]
fn panic_execution_with_foreign_code_gives_error() {
- let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage {
+ let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage {
top: map![
>::hashed_key_for(alice()) => {
- (69u128, 0u128, 0u128, 0u128).encode()
+ (69u128, 0u8, 0u128, 0u128, 0u128).encode()
},
>::hashed_key().to_vec() => {
69_u128.encode()
@@ -197,10 +194,10 @@ fn panic_execution_with_foreign_code_gives_error() {
#[test]
fn bad_extrinsic_with_native_equivalent_code_gives_error() {
- let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
+ let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
top: map![
>::hashed_key_for(alice()) => {
- (0u32, 69u128, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u8, 69u128, 0u128, 0u128, 0u128).encode()
},
>::hashed_key().to_vec() => {
69_u128.encode()
@@ -233,10 +230,10 @@ fn bad_extrinsic_with_native_equivalent_code_gives_error() {
#[test]
fn successful_execution_with_native_equivalent_code_gives_ok() {
- let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
+ let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
top: map![
>::hashed_key_for(alice()) => {
- (0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
},
>::hashed_key().to_vec() => {
(111 * DOLLARS).encode()
@@ -275,10 +272,10 @@ fn successful_execution_with_native_equivalent_code_gives_ok() {
#[test]
fn successful_execution_with_foreign_code_gives_ok() {
- let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage {
+ let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage {
top: map![
>::hashed_key_for(alice()) => {
- (0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
},
>::hashed_key().to_vec() => {
(111 * DOLLARS).encode()
@@ -347,7 +344,7 @@ fn full_native_block_import_works() {
},
EventRecord {
phase: Phase::ApplyExtrinsic(1),
- event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(1984800000000)),
+ event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(fees * 8 / 10)),
topics: vec![],
},
EventRecord {
@@ -381,13 +378,14 @@ fn full_native_block_import_works() {
).0.unwrap();
t.execute_with(|| {
+ let fees = transfer_fee(&xt(), fm);
assert_eq!(
Balances::total_balance(&alice()),
- alice_last_known_balance - 10 * DOLLARS - transfer_fee(&xt(), fm),
+ alice_last_known_balance - 10 * DOLLARS - fees,
);
assert_eq!(
Balances::total_balance(&bob()),
- 179 * DOLLARS - transfer_fee(&xt(), fm),
+ 179 * DOLLARS - fees,
);
let events = vec![
EventRecord {
@@ -399,7 +397,7 @@ fn full_native_block_import_works() {
},
EventRecord {
phase: Phase::ApplyExtrinsic(1),
- event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(1984788199392)),
+ event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(fees * 8 / 10)),
topics: vec![],
},
EventRecord {
@@ -422,7 +420,7 @@ fn full_native_block_import_works() {
},
EventRecord {
phase: Phase::ApplyExtrinsic(2),
- event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(1984788199392)),
+ event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(fees * 8 / 10)),
topics: vec![],
},
EventRecord {
@@ -699,7 +697,7 @@ fn native_big_block_import_fails_on_fallback() {
#[test]
fn panic_execution_gives_error() {
- let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage {
+ let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage {
top: map![
>::hashed_key().to_vec() => {
0_u128.encode()
@@ -730,10 +728,10 @@ fn panic_execution_gives_error() {
#[test]
fn successful_execution_gives_ok() {
- let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
+ let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
top: map![
>::hashed_key_for(alice()) => {
- (0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
+ (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode()
},
>::hashed_key().to_vec() => {
(111 * DOLLARS).encode()
diff --git a/bin/node/executor/tests/common.rs b/bin/node/executor/tests/common.rs
index 090d2ee5d4ace1b188641536e0732033fa6d0f34..34f3034208a08eb6d69cdda4929d99a77b4da0a1 100644
--- a/bin/node/executor/tests/common.rs
+++ b/bin/node/executor/tests/common.rs
@@ -17,11 +17,8 @@
use codec::{Encode, Decode};
use frame_support::Hashable;
use sp_state_machine::TestExternalities as CoreTestExternalities;
-use sp_core::{
- Blake2Hasher, NeverNativeValue, NativeOrEncoded,
- traits::CodeExecutor,
-};
-use sp_runtime::{ApplyExtrinsicResult, traits::Header as HeaderT};
+use sp_core::{NeverNativeValue, NativeOrEncoded, traits::CodeExecutor};
+use sp_runtime::{ApplyExtrinsicResult, traits::{Header as HeaderT, BlakeTwo256}};
use sc_executor::{NativeExecutor, WasmExecutionMethod};
use sc_executor::error::Result;
@@ -67,14 +64,14 @@ pub fn executor_call<
R:Decode + Encode + PartialEq,
NC: FnOnce() -> std::result::Result + std::panic::UnwindSafe
>(
- t: &mut TestExternalities,
+ t: &mut TestExternalities,
method: &str,
data: &[u8],
use_native: bool,
native_call: Option,
) -> (Result>, bool) {
let mut t = t.ext();
- executor().call::<_, R, NC>(
+ executor().call::(
&mut t,
method,
data,
@@ -83,7 +80,7 @@ pub fn executor_call<
)
}
-pub fn new_test_ext(code: &[u8], support_changes_trie: bool) -> TestExternalities {
+pub fn new_test_ext(code: &[u8], support_changes_trie: bool) -> TestExternalities {
let mut ext = TestExternalities::new_with_code(
code,
node_testing::genesis::config(support_changes_trie, Some(code)).build_storage().unwrap(),
@@ -97,7 +94,7 @@ pub fn new_test_ext(code: &[u8], support_changes_trie: bool) -> TestExternalitie
/// `extrinsics` must be a list of valid extrinsics, i.e. none of the extrinsics for example
/// can report `ExhaustResources`. Otherwise, this function panics.
pub fn construct_block(
- env: &mut TestExternalities,
+ env: &mut TestExternalities,
number: BlockNumber,
parent_hash: Hash,
extrinsics: Vec,
@@ -109,7 +106,7 @@ pub fn construct_block(
// calculate the header fields that we can.
let extrinsics_root =
- Layout::::ordered_trie_root(extrinsics.iter().map(Encode::encode))
+ Layout::::ordered_trie_root(extrinsics.iter().map(Encode::encode))
.to_fixed_bytes()
.into();
diff --git a/bin/node/executor/tests/fees.rs b/bin/node/executor/tests/fees.rs
index ba303a6feb6ff05698f59de15485f65d9beb999c..ea9d740a05ef86e77fa923c8863d55a984cdbca7 100644
--- a/bin/node/executor/tests/fees.rs
+++ b/bin/node/executor/tests/fees.rs
@@ -20,18 +20,12 @@ use frame_support::{
traits::Currency,
weights::GetDispatchInfo,
};
-use sp_core::{
- Blake2Hasher, NeverNativeValue, map,
- storage::Storage,
-};
-use sp_runtime::{
- Fixed64,
- traits::Convert,
-};
+use sp_core::{NeverNativeValue, map, storage::Storage};
+use sp_runtime::{Fixed64, Perbill, traits::{Convert, BlakeTwo256}};
use node_runtime::{
- CheckedExtrinsic, Call, Runtime, Balances,
- TransactionPayment, TransactionBaseFee, TransactionByteFee,
- WeightFeeCoefficient, constants::currency::*,
+ CheckedExtrinsic, Call, Runtime, Balances, TransactionPayment, TransactionBaseFee,
+ TransactionByteFee, WeightFeeCoefficient,
+ constants::currency::*,
};
use node_runtime::impls::LinearWeightToFee;
use node_primitives::Balance;
@@ -60,12 +54,12 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
GENESIS_HASH.into(),
vec![
CheckedExtrinsic {
- signed: None,
- function: Call::Timestamp(pallet_timestamp::Call::set(42 * 1000)),
+ signed: None,
+ function: Call::Timestamp(pallet_timestamp::Call::set(42 * 1000)),
},
CheckedExtrinsic {
signed: Some((charlie(), signed_extra(0, 0))),
- function: Call::System(frame_system::Call::fill_block()),
+ function: Call::System(frame_system::Call::fill_block(Perbill::from_percent(90))),
}
]
);
@@ -77,8 +71,8 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
block1.1.clone(),
vec![
CheckedExtrinsic {
- signed: None,
- function: Call::Timestamp(pallet_timestamp::Call::set(52 * 1000)),
+ signed: None,
+ function: Call::Timestamp(pallet_timestamp::Call::set(52 * 1000)),
},
CheckedExtrinsic {
signed: Some((charlie(), signed_extra(1, 0))),
@@ -87,7 +81,11 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
]
);
- println!("++ Block 1 size: {} / Block 2 size {}", block1.0.encode().len(), block2.0.encode().len());
+ println!(
+ "++ Block 1 size: {} / Block 2 size {}",
+ block1.0.encode().len(),
+ block2.0.encode().len(),
+ );
// execute a big block.
executor_call:: _>(
@@ -132,13 +130,13 @@ fn transaction_fee_is_correct_ultimate() {
// - 1 MILLICENTS in substrate node.
// - 1 milli-dot based on current polkadot runtime.
// (this baed on assigning 0.1 CENT to the cheapest tx with `weight = 100`)
- let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
+ let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage {
top: map![
>::hashed_key_for(alice()) => {
- (0u32, 100 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
+ (0u32, 0u8, 100 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
},
>::hashed_key_for(bob()) => {
- (0u32, 10 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
+ (0u32, 0u8, 10 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode()
},
>::hashed_key().to_vec() => {
(110 * DOLLARS).encode()
diff --git a/bin/node/executor/tests/submit_transaction.rs b/bin/node/executor/tests/submit_transaction.rs
index 90e64c41369ee9f110f87978b380f381794ad751..f06f9ff4665b886f7d92ec6140be7e090dce696b 100644
--- a/bin/node/executor/tests/submit_transaction.rs
+++ b/bin/node/executor/tests/submit_transaction.rs
@@ -167,8 +167,9 @@ fn submitted_transaction_should_be_valid() {
// add balance to the account
let author = extrinsic.signature.clone().unwrap().0;
let address = Indices::lookup(author).unwrap();
- let account = pallet_balances::AccountData { free: 5_000_000_000_000, ..Default::default() };
- >::insert(&address, (0u32, account));
+ let data = pallet_balances::AccountData { free: 5_000_000_000_000, ..Default::default() };
+ let account = frame_system::AccountInfo { nonce: 0u32, refcount: 0u8, data };
+ >::insert(&address, account);
// check validity
let res = Executive::validate_transaction(extrinsic);
diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml
index cbce7e4589698b75e7c0c0c01cb48c896628cef2..022f4d0ca49f5252cedce67ea6750a4c5aae8a18 100644
--- a/bin/node/inspect/Cargo.toml
+++ b/bin/node/inspect/Cargo.toml
@@ -1,17 +1,20 @@
[package]
name = "node-inspect"
-version = "0.8.0"
+version = "0.8.0-alpha.3"
authors = ["Parity Technologies "]
edition = "2018"
+license = "GPL-3.0"
+homepage = "https://substrate.dev"
+repository = "https://github.com/paritytech/substrate/"
[dependencies]
-codec = { package = "parity-scale-codec", version = "1.0.0" }
+codec = { package = "parity-scale-codec", version = "1.2.0" }
derive_more = "0.99"
log = "0.4.8"
-sc-cli = { version = "0.8.0", path = "../../../client/cli" }
-sc-client-api = { version = "2.0.0", path = "../../../client/api" }
-sc-service = { version = "0.8", default-features = false, path = "../../../client/service" }
-sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
-sp-core = { version = "2.0.0", path = "../../../primitives/core" }
-sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
+sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" }
+sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" }
+sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/service" }
+sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" }
+sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" }
+sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" }
structopt = "0.3.8"
diff --git a/bin/node/inspect/src/cli.rs b/bin/node/inspect/src/cli.rs
index 27afcfff919ee276220f20871a0140f6c2aa326c..5d51bd5848f17d308933fdcb69d429504fa8445e 100644
--- a/bin/node/inspect/src/cli.rs
+++ b/bin/node/inspect/src/cli.rs
@@ -16,12 +16,8 @@
//! Structs to easily compose inspect sub-command for CLI.
-use std::{
- fmt::Debug,
- str::FromStr,
-};
-use crate::{Inspector, PrettyPrinter};
-use sc_cli::{ImportParams, SharedParams, error};
+use std::fmt::Debug;
+use sc_cli::{ImportParams, SharedParams};
use structopt::StructOpt;
/// The `inspect` command used to print decoded chain data.
@@ -64,177 +60,3 @@ pub enum InspectSubCmd {
input: String,
},
}
-
-impl InspectCmd {
- /// Parse CLI arguments and initialize given config.
- pub fn init(
- &self,
- config: &mut sc_service::config::Configuration,
- spec_factory: impl FnOnce(&str) -> Result